Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 28.1.0

* Added: `Apps` service to create and manage OAuth2 apps, their secrets, keys, and installations
* Added: `Oauth2` service for authorization, consent, device, PAR, and token flows
* Added: `App`, `AppSecret`, `AppKey`, `AppScope` and `Oauth2*` response models

## 28.0.0

* Breaking: removed `Account.listLogs` and the `Log`, `LogList` models
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { Client, Account } from 'appwrite';
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:

```html
<script src="https://cdn.jsdelivr.net/npm/appwrite@28.0.0"></script>
<script src="https://cdn.jsdelivr.net/npm/appwrite@28.1.0"></script>
```

## Getting Started
Expand Down
16 changes: 16 additions & 0 deletions docs/examples/apps/create-installation-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Apps } from '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.createInstallationToken({
appId: '<APP_ID>',
installationId: '<INSTALLATION_ID>',
});

console.log(result);
```
15 changes: 15 additions & 0 deletions docs/examples/apps/create-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
import { Client, Apps } from '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.createKey({
appId: '<APP_ID>',
});

console.log(result);
```
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 '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);
```
33 changes: 33 additions & 0 deletions docs/examples/apps/create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
```javascript
import { Client, Apps } from '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: [],
description: '<DESCRIPTION>', // optional
clientUri: 'https://example.com', // optional
logoUri: 'https://example.com', // optional
privacyPolicyUrl: 'https://example.com', // optional
termsUrl: 'https://example.com', // optional
contacts: [], // optional
tagline: '<TAGLINE>', // optional
tags: [], // optional
images: [], // optional
supportUrl: 'https://example.com', // optional
dataDeletionUrl: 'https://example.com', // optional
postLogoutRedirectUris: [], // optional
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-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Apps } from '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.deleteInstallation({
appId: '<APP_ID>',
installationId: '<INSTALLATION_ID>',
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/apps/delete-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Apps } from '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.deleteKey({
appId: '<APP_ID>',
keyId: '<KEY_ID>',
});

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 '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 '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 '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-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Apps } from '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.getInstallation({
appId: '<APP_ID>',
installationId: '<INSTALLATION_ID>',
});

console.log(result);
```
16 changes: 16 additions & 0 deletions docs/examples/apps/get-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```javascript
import { Client, Apps } from '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.getKey({
appId: '<APP_ID>',
keyId: '<KEY_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 '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 '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);
```
13 changes: 13 additions & 0 deletions docs/examples/apps/list-installation-scopes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```javascript
import { Client, Apps } from '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.listInstallationScopes();

console.log(result);
```
17 changes: 17 additions & 0 deletions docs/examples/apps/list-installations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Apps } from '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.listInstallations({
appId: '<APP_ID>',
queries: [], // optional
total: false, // optional
});

console.log(result);
```
17 changes: 17 additions & 0 deletions docs/examples/apps/list-keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```javascript
import { Client, Apps } from '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.listKeys({
appId: '<APP_ID>',
queries: [], // optional
total: false, // optional
});

console.log(result);
```
13 changes: 13 additions & 0 deletions docs/examples/apps/list-o-auth-2-scopes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```javascript
import { Client, Apps } from '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.listOAuth2Scopes();

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 '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 '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 '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);
```
Loading