Skip to content

Commit a301abe

Browse files
Merge pull request #46 from appwrite/dev
chore: bug fixes for Apwrite 1.4.2
2 parents 4d67f41 + 631ea0c commit a301abe

12 files changed

+14
-13
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 10.0.0
2+
3+
* Parameter `url` is now optional in the `createMembership` endpoint
4+
* Parameter `runtime` is now optional in the `update` endpoint of the `Functions` class
5+
16
## 9.0.1
27

38
* Added a new `label` function to the `Role` helper class

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file:
2323

2424
```yml
2525
dependencies:
26-
dart_appwrite: ^9.0.1
26+
dart_appwrite: ^10.0.0
2727
```
2828
2929
You can install packages from the command line:

docs/examples/functions/create.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void main() { // Init SDK
1313
Future result = functions.create(
1414
functionId: '[FUNCTION_ID]',
1515
name: '[NAME]',
16-
runtime: 'node-14.5',
16+
runtime: 'node-18.0',
1717
);
1818

1919
result

docs/examples/functions/update.md

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ void main() { // Init SDK
1313
Future result = functions.update(
1414
functionId: '[FUNCTION_ID]',
1515
name: '[NAME]',
16-
runtime: 'node-14.5',
1716
);
1817

1918
result

docs/examples/teams/create-membership.md

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ void main() { // Init SDK
1313
Future result = teams.createMembership(
1414
teamId: '[TEAM_ID]',
1515
roles: [],
16-
url: 'https://example.com',
1716
);
1817

1918
result

lib/services/functions.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class Functions extends Service {
121121
/// Update Function
122122
///
123123
/// Update function by its unique ID.
124-
Future<models.Func> update({required String functionId, required String name, required String runtime, List<String>? execute, List<String>? events, String? schedule, int? timeout, bool? enabled, bool? logging, String? entrypoint, String? commands, String? installationId, String? providerRepositoryId, String? providerBranch, bool? providerSilentMode, String? providerRootDirectory}) async {
124+
Future<models.Func> update({required String functionId, required String name, String? runtime, List<String>? execute, List<String>? events, String? schedule, int? timeout, bool? enabled, bool? logging, String? entrypoint, String? commands, String? installationId, String? providerRepositoryId, String? providerBranch, bool? providerSilentMode, String? providerRootDirectory}) async {
125125
final String apiPath = '/functions/{functionId}'.replaceAll('{functionId}', functionId);
126126

127127
final Map<String, dynamic> apiParams = {

lib/services/teams.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class Teams extends Service {
173173
/// Appwrite will accept the only redirect URLs under the domains you have
174174
/// added as a platform on the Appwrite Console.
175175
///
176-
Future<models.Membership> createMembership({required String teamId, required List<String> roles, required String url, String? email, String? userId, String? phone, String? name}) async {
176+
Future<models.Membership> createMembership({required String teamId, required List<String> roles, String? email, String? userId, String? phone, String? url, String? name}) async {
177177
final String apiPath = '/teams/{teamId}/memberships'.replaceAll('{teamId}', teamId);
178178

179179
final Map<String, dynamic> apiParams = {

lib/src/client_browser.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
3333
'x-sdk-name': 'Dart',
3434
'x-sdk-platform': 'server',
3535
'x-sdk-language': 'dart',
36-
'x-sdk-version': '9.0.1',
36+
'x-sdk-version': '10.0.0',
3737
'X-Appwrite-Response-Format' : '1.4.0',
3838
};
3939

lib/src/client_io.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class ClientIO extends ClientBase with ClientMixin {
4242
'x-sdk-name': 'Dart',
4343
'x-sdk-platform': 'server',
4444
'x-sdk-language': 'dart',
45-
'x-sdk-version': '9.0.1',
46-
'user-agent' : 'AppwriteDartSDK/9.0.1 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
45+
'x-sdk-version': '10.0.0',
46+
'user-agent' : 'AppwriteDartSDK/10.0.0 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
4747
'X-Appwrite-Response-Format' : '1.4.0',
4848
};
4949

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: dart_appwrite
2-
version: 9.0.1
2+
version: 10.0.0
33
description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
44
homepage: https://appwrite.io
55
repository: https://github.com/appwrite/sdk-for-dart

test/services/functions_test.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void main() {
105105
final response = await functions.create(
106106
functionId: '[FUNCTION_ID]',
107107
name: '[NAME]',
108-
runtime: 'node-14.5',
108+
runtime: 'node-18.0',
109109
);
110110
expect(response, isA<models.Func>());
111111

@@ -200,7 +200,6 @@ void main() {
200200
final response = await functions.update(
201201
functionId: '[FUNCTION_ID]',
202202
name: '[NAME]',
203-
runtime: 'node-14.5',
204203
);
205204
expect(response, isA<models.Func>());
206205

test/services/teams_test.dart

-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ void main() {
194194
final response = await teams.createMembership(
195195
teamId: '[TEAM_ID]',
196196
roles: [],
197-
url: 'https://example.com',
198197
);
199198
expect(response, isA<models.Membership>());
200199

0 commit comments

Comments
 (0)