Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change log

## 0.32.0

* Breaking: Renamed `Theme` enum to `BrowserTheme`.
* Breaking: Removed `Models.DefaultPresence` and dropped the `Presence` generic from `presences` methods.
* Added: `apps` service with app and secret management methods.
* Added: `oauth2` service with `authorize`, `approve`, `reject`, `createGrant`, and `getGrant`.
* Added: `App`, `AppSecret`, `AppSecretPlaintext`, `AppsList`, and `AppSecretList` models.
* Added: `Oauth2Authorize`, `Oauth2Approve`, `Oauth2Reject`, and `Oauth2Grant` models.
* Added: Email metadata fields to `User`, plus `Membership.userAccessedAt` and `Presence.metadata`.

## 0.30.1

* Fixed: Removed `Advisor` service and `Insight`, `InsightCTA`, `InsightList`, `Report`, `ReportList` models (admin-only endpoints, not intended for client SDKs)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-password.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const account = new Account(client);

const result = await account.updatePassword({
password: '',
oldPassword: 'password' // optional
oldPassword: '<OLD_PASSWORD>' // optional
});

console.log(result);
Expand Down
15 changes: 15 additions & 0 deletions docs/examples/apps/create-secret.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
import { Client, Apps } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const apps = new Apps(client);

const result = await apps.createSecret({
appId: '<APP_ID>'
});

console.log(result);
```
21 changes: 21 additions & 0 deletions docs/examples/apps/create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
```javascript
import { Client, Apps } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const apps = new Apps(client);

const result = await apps.create({
appId: '<APP_ID>',
name: '<NAME>',
redirectUris: [],
enabled: false, // optional
type: 'public', // optional
deviceFlow: false, // optional
teamId: '<TEAM_ID>' // optional
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/apps/delete-secret.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Apps } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const apps = new Apps(client);

const result = await apps.deleteSecret({
appId: '<APP_ID>',
secretId: '<SECRET_ID>'
});

console.log(result);
```
15 changes: 15 additions & 0 deletions docs/examples/apps/delete-tokens.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
import { Client, Apps } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const apps = new Apps(client);

const result = await apps.deleteTokens({
appId: '<APP_ID>'
});

console.log(result);
```
15 changes: 15 additions & 0 deletions docs/examples/apps/delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
import { Client, Apps } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const apps = new Apps(client);

const result = await apps.delete({
appId: '<APP_ID>'
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/apps/get-secret.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Apps } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const apps = new Apps(client);

const result = await apps.getSecret({
appId: '<APP_ID>',
secretId: '<SECRET_ID>'
});

console.log(result);
```
15 changes: 15 additions & 0 deletions docs/examples/apps/get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
import { Client, Apps } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const apps = new Apps(client);

const result = await apps.get({
appId: '<APP_ID>'
});

console.log(result);
```
17 changes: 17 additions & 0 deletions docs/examples/apps/list-secrets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Apps } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const apps = new Apps(client);

const result = await apps.listSecrets({
appId: '<APP_ID>',
queries: [], // optional
total: false // optional
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/apps/list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Apps } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const apps = new Apps(client);

const result = await apps.list({
queries: [], // optional
total: false // optional
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/apps/update-team.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Apps } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const apps = new Apps(client);

const result = await apps.updateTeam({
appId: '<APP_ID>',
teamId: '<TEAM_ID>'
});

console.log(result);
```
20 changes: 20 additions & 0 deletions docs/examples/apps/update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
```javascript
import { Client, Apps } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const apps = new Apps(client);

const result = await apps.update({
appId: '<APP_ID>',
name: '<NAME>',
enabled: false, // optional
redirectUris: [], // optional
type: 'public', // optional
deviceFlow: false // optional
});

console.log(result);
```
6 changes: 3 additions & 3 deletions docs/examples/avatars/get-screenshot.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```javascript
import { Client, Avatars, Theme, Timezone, BrowserPermission, ImageFormat } from "react-native-appwrite";
import { Client, Avatars, BrowserTheme, Timezone, BrowserPermission, ImageFormat } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand All @@ -16,11 +16,11 @@ const result = avatars.getScreenshot({
viewportWidth: 1920, // optional
viewportHeight: 1080, // optional
scale: 2, // optional
theme: Theme.Dark, // optional
theme: BrowserTheme.Dark, // optional
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional
fullpage: true, // optional
locale: 'en-US', // optional
timezone: Timezone.AmericaNewYork, // optional
timezone: Timezone.AfricaAbidjan, // optional
latitude: 37.7749, // optional
longitude: -122.4194, // optional
accuracy: 100, // optional
Expand Down
17 changes: 17 additions & 0 deletions docs/examples/oauth2/approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Oauth2 } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProjectQuery('<YOUR_PROJECT_ID>'); // Your project ID

const oauth2 = new Oauth2(client);

const result = await oauth2.approve({
projectId: '<PROJECT_ID>',
grantId: '<GRANT_ID>',
authorizationDetails: '<AUTHORIZATION_DETAILS>' // optional
});

console.log(result);
```
26 changes: 26 additions & 0 deletions docs/examples/oauth2/authorize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
```javascript
import { Client, Oauth2 } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProjectQuery('<YOUR_PROJECT_ID>'); // Your project ID

const oauth2 = new Oauth2(client);

const result = await oauth2.authorize({
projectId: '<PROJECT_ID>',
clientId: '<CLIENT_ID>',
redirectUri: 'https://example.com',
responseType: 'code',
scope: '<SCOPE>',
state: '<STATE>', // optional
nonce: '<NONCE>', // optional
codeChallenge: '<CODE_CHALLENGE>', // optional
codeChallengeMethod: 's256', // optional
prompt: '<PROMPT>', // optional
maxAge: 0, // optional
authorizationDetails: '<AUTHORIZATION_DETAILS>' // optional
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/oauth2/create-grant.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Oauth2 } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const oauth2 = new Oauth2(client);

const result = await oauth2.createGrant({
projectId: '<PROJECT_ID>',
userCode: '<USER_CODE>'
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/oauth2/get-grant.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Oauth2 } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const oauth2 = new Oauth2(client);

const result = await oauth2.getGrant({
projectId: '<PROJECT_ID>',
grantId: '<GRANT_ID>'
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/oauth2/reject.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Oauth2 } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProjectQuery('<YOUR_PROJECT_ID>'); // Your project ID

const oauth2 = new Oauth2(client);

const result = await oauth2.reject({
projectId: '<PROJECT_ID>',
grantId: '<GRANT_ID>'
});

console.log(result);
```
Loading
Loading