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: 3 additions & 3 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: true
ref: ${{ github.event.pull_request.head.ref }}

- name: Install Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
with:
channel: stable

Expand All @@ -33,7 +33,7 @@ jobs:
run: git config --global --add safe.directory /__w/sdk-for-flutter/sdk-for-flutter # required to fix dubious ownership

- name: Add & Commit
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
uses: EndBug/add-and-commit@290ea2c423ad77ca9c62ae0f5b224379612c0321 # v10.0.0
with:
add: '["lib", "test"]'

4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
with:
channel: stable
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
with:
channel: stable
- run: flutter pub get
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

## 25.4.0

* Added: `Organization` service for managing app installations
* Added: app installation management methods to the `Teams` service
* Added: account OAuth2 consent methods `listConsents`, `getConsent`, `deleteConsent`
* Added: account consent token methods `listConsentTokens`, `getConsentToken`, `deleteConsentToken`
* Added: `folder` parameter to `storage.createFile`, and `folder` and `key` to `File`
* Fixed: Null optional parameters are no longer sent in request bodies
* Fixed: Binary endpoints now authenticate with headers, not query parameters

## 25.3.0

* Added: `Client.setBearer()` method for OAuth access token authentication
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Add this to your package's `pubspec.yaml` file:

```yml
dependencies:
appwrite: ^25.3.0
appwrite: ^25.4.0
```

You can install packages from the command line:
Expand Down
14 changes: 14 additions & 0 deletions docs/examples/account/delete-consent-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

await account.deleteConsentToken(
consentId: '<CONSENT_ID>',
tokenId: '<TOKEN_ID>',
);
```
13 changes: 13 additions & 0 deletions docs/examples/account/delete-consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

await account.deleteConsent(
consentId: '<CONSENT_ID>',
);
```
14 changes: 14 additions & 0 deletions docs/examples/account/get-consent-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

Oauth2ConsentToken result = await account.getConsentToken(
consentId: '<CONSENT_ID>',
tokenId: '<TOKEN_ID>',
);
```
13 changes: 13 additions & 0 deletions docs/examples/account/get-consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

Oauth2Consent result = await account.getConsent(
consentId: '<CONSENT_ID>',
);
```
15 changes: 15 additions & 0 deletions docs/examples/account/list-consent-tokens.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

Oauth2ConsentTokenList result = await account.listConsentTokens(
consentId: '<CONSENT_ID>',
queries: [], // optional
total: false, // optional
);
```
14 changes: 14 additions & 0 deletions docs/examples/account/list-consents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Account account = Account(client);

Oauth2ConsentList result = await account.listConsents(
queries: [], // optional
total: false, // optional
);
```
14 changes: 14 additions & 0 deletions docs/examples/organization/create-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Organization organization = Organization(client);

AppInstallation result = await organization.createInstallation(
appId: '<APP_ID>',
authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional
);
```
13 changes: 13 additions & 0 deletions docs/examples/organization/delete-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Organization organization = Organization(client);

await organization.deleteInstallation(
installationId: '<INSTALLATION_ID>',
);
```
13 changes: 13 additions & 0 deletions docs/examples/organization/get-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Organization organization = Organization(client);

AppInstallation result = await organization.getInstallation(
installationId: '<INSTALLATION_ID>',
);
```
14 changes: 14 additions & 0 deletions docs/examples/organization/list-installations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Organization organization = Organization(client);

AppInstallationList result = await organization.listInstallations(
queries: [], // optional
total: false, // optional
);
```
14 changes: 14 additions & 0 deletions docs/examples/organization/update-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Organization organization = Organization(client);

AppInstallation result = await organization.updateInstallation(
installationId: '<INSTALLATION_ID>',
authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional
);
```
1 change: 1 addition & 0 deletions docs/examples/storage/create-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ File result = await storage.createFile(
fileId: '<FILE_ID>',
file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'),
permissions: [Permission.read(Role.any())], // optional
folder: '', // optional
);
```
15 changes: 15 additions & 0 deletions docs/examples/teams/create-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Teams teams = Teams(client);

AppInstallation result = await teams.createInstallation(
teamId: '<TEAM_ID>',
appId: '<APP_ID>',
authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional
);
```
14 changes: 14 additions & 0 deletions docs/examples/teams/delete-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Teams teams = Teams(client);

await teams.deleteInstallation(
teamId: '<TEAM_ID>',
installationId: '<INSTALLATION_ID>',
);
```
14 changes: 14 additions & 0 deletions docs/examples/teams/get-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Teams teams = Teams(client);

AppInstallation result = await teams.getInstallation(
teamId: '<TEAM_ID>',
installationId: '<INSTALLATION_ID>',
);
```
15 changes: 15 additions & 0 deletions docs/examples/teams/list-installations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Teams teams = Teams(client);

AppInstallationList result = await teams.listInstallations(
teamId: '<TEAM_ID>',
queries: [], // optional
total: false, // optional
);
```
15 changes: 15 additions & 0 deletions docs/examples/teams/update-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```dart
import 'package:appwrite/appwrite.dart';

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

Teams teams = Teams(client);

AppInstallation result = await teams.updateInstallation(
teamId: '<TEAM_ID>',
installationId: '<INSTALLATION_ID>',
authorizationDetails: '<AUTHORIZATION_DETAILS>', // optional
);
```
1 change: 1 addition & 0 deletions lib/appwrite.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ part 'services/functions.dart';
part 'services/graphql.dart';
part 'services/locale.dart';
part 'services/messaging.dart';
part 'services/organization.dart';
part 'services/presences.dart';
part 'services/storage.dart';
part 'services/tables_db.dart';
Expand Down
6 changes: 6 additions & 0 deletions lib/models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ part 'src/models/mfa_factors.dart';
part 'src/models/transaction.dart';
part 'src/models/subscriber.dart';
part 'src/models/target.dart';
part 'src/models/app_installation.dart';
part 'src/models/oauth2_consent.dart';
part 'src/models/oauth2_consent_token.dart';
part 'src/models/oauth2_consent_list.dart';
part 'src/models/oauth2_consent_token_list.dart';
part 'src/models/app_installation_list.dart';
Loading