react-native-appwrite 0.17.1 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/cjs/sdk.js +339 -17
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +339 -18
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/docs/examples/account/list-identities.md +2 -1
  7. package/docs/examples/account/list-logs.md +2 -1
  8. package/docs/examples/databases/create-document.md +1 -1
  9. package/docs/examples/databases/list-documents.md +2 -1
  10. package/docs/examples/databases/update-document.md +1 -1
  11. package/docs/examples/databases/upsert-document.md +1 -1
  12. package/docs/examples/functions/list-executions.md +2 -1
  13. package/docs/examples/storage/create-file.md +1 -1
  14. package/docs/examples/storage/list-files.md +2 -1
  15. package/docs/examples/storage/update-file.md +1 -1
  16. package/docs/examples/tablesdb/create-row.md +1 -1
  17. package/docs/examples/tablesdb/list-rows.md +2 -1
  18. package/docs/examples/tablesdb/update-row.md +1 -1
  19. package/docs/examples/tablesdb/upsert-row.md +1 -1
  20. package/docs/examples/teams/list-memberships.md +2 -1
  21. package/docs/examples/teams/list.md +2 -1
  22. package/package.json +2 -3
  23. package/src/client.ts +1 -1
  24. package/src/enums/execution-status.ts +1 -0
  25. package/src/index.ts +3 -0
  26. package/src/models.ts +1 -1
  27. package/src/operator.ts +308 -0
  28. package/src/query.ts +6 -6
  29. package/src/services/account.ts +30 -12
  30. package/src/services/databases.ts +15 -7
  31. package/src/services/functions.ts +15 -7
  32. package/src/services/storage.ts +15 -7
  33. package/src/services/tables-db.ts +15 -7
  34. package/src/services/teams.ts +30 -14
  35. package/types/enums/execution-status.d.ts +2 -1
  36. package/types/index.d.ts +3 -0
  37. package/types/models.d.ts +1 -1
  38. package/types/operator.d.ts +180 -0
  39. package/types/services/account.d.ts +8 -2
  40. package/types/services/databases.d.ts +4 -1
  41. package/types/services/functions.d.ts +4 -1
  42. package/types/services/storage.d.ts +4 -1
  43. package/types/services/tables-db.d.ts +4 -1
  44. package/types/services/teams.d.ts +8 -2
@@ -183,33 +183,38 @@ export class Account extends Service {
183
183
  * Get the list of identities for the currently logged in user.
184
184
  *
185
185
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
186
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
186
187
  * @throws {AppwriteException}
187
188
  * @returns {Promise}
188
189
  */
189
- listIdentities(params?: { queries?: string[] }): Promise<Models.IdentityList>;
190
+ listIdentities(params?: { queries?: string[], total?: boolean }): Promise<Models.IdentityList>;
190
191
  /**
191
192
  * Get the list of identities for the currently logged in user.
192
193
  *
193
194
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
195
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
194
196
  * @throws {AppwriteException}
195
197
  * @returns {Promise<Models.IdentityList>}
196
198
  * @deprecated Use the object parameter style method for a better developer experience.
197
199
  */
198
- listIdentities(queries?: string[]): Promise<Models.IdentityList>;
200
+ listIdentities(queries?: string[], total?: boolean): Promise<Models.IdentityList>;
199
201
  listIdentities(
200
- paramsOrFirst?: { queries?: string[] } | string[]
202
+ paramsOrFirst?: { queries?: string[], total?: boolean } | string[],
203
+ ...rest: [(boolean)?]
201
204
  ): Promise<Models.IdentityList> {
202
- let params: { queries?: string[] };
205
+ let params: { queries?: string[], total?: boolean };
203
206
 
204
207
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
205
- params = (paramsOrFirst || {}) as { queries?: string[] };
208
+ params = (paramsOrFirst || {}) as { queries?: string[], total?: boolean };
206
209
  } else {
207
210
  params = {
208
- queries: paramsOrFirst as string[]
211
+ queries: paramsOrFirst as string[],
212
+ total: rest[0] as boolean
209
213
  };
210
214
  }
211
215
 
212
216
  const queries = params.queries;
217
+ const total = params.total;
213
218
 
214
219
  const apiPath = '/account/identities';
215
220
  const payload: Payload = {};
@@ -218,6 +223,10 @@ export class Account extends Service {
218
223
  payload['queries'] = queries;
219
224
  }
220
225
 
226
+ if (typeof total !== 'undefined') {
227
+ payload['total'] = total;
228
+ }
229
+
221
230
  const uri = new URL(this.client.config.endpoint + apiPath);
222
231
  return this.client.call('get', uri, {
223
232
  }, payload);
@@ -288,33 +297,38 @@ export class Account extends Service {
288
297
  * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
289
298
  *
290
299
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
300
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
291
301
  * @throws {AppwriteException}
292
302
  * @returns {Promise}
293
303
  */
294
- listLogs(params?: { queries?: string[] }): Promise<Models.LogList>;
304
+ listLogs(params?: { queries?: string[], total?: boolean }): Promise<Models.LogList>;
295
305
  /**
296
306
  * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
297
307
  *
298
308
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
309
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
299
310
  * @throws {AppwriteException}
300
311
  * @returns {Promise<Models.LogList>}
301
312
  * @deprecated Use the object parameter style method for a better developer experience.
302
313
  */
303
- listLogs(queries?: string[]): Promise<Models.LogList>;
314
+ listLogs(queries?: string[], total?: boolean): Promise<Models.LogList>;
304
315
  listLogs(
305
- paramsOrFirst?: { queries?: string[] } | string[]
316
+ paramsOrFirst?: { queries?: string[], total?: boolean } | string[],
317
+ ...rest: [(boolean)?]
306
318
  ): Promise<Models.LogList> {
307
- let params: { queries?: string[] };
319
+ let params: { queries?: string[], total?: boolean };
308
320
 
309
321
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
310
- params = (paramsOrFirst || {}) as { queries?: string[] };
322
+ params = (paramsOrFirst || {}) as { queries?: string[], total?: boolean };
311
323
  } else {
312
324
  params = {
313
- queries: paramsOrFirst as string[]
325
+ queries: paramsOrFirst as string[],
326
+ total: rest[0] as boolean
314
327
  };
315
328
  }
316
329
 
317
330
  const queries = params.queries;
331
+ const total = params.total;
318
332
 
319
333
  const apiPath = '/account/logs';
320
334
  const payload: Payload = {};
@@ -323,6 +337,10 @@ export class Account extends Service {
323
337
  payload['queries'] = queries;
324
338
  }
325
339
 
340
+ if (typeof total !== 'undefined') {
341
+ payload['total'] = total;
342
+ }
343
+
326
344
  const uri = new URL(this.client.config.endpoint + apiPath);
327
345
  return this.client.call('get', uri, {
328
346
  }, payload);
@@ -314,11 +314,12 @@ export class Databases extends Service {
314
314
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
315
315
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
316
316
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
317
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
317
318
  * @throws {AppwriteException}
318
319
  * @returns {Promise}
319
320
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
320
321
  */
321
- listDocuments<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, queries?: string[], transactionId?: string }): Promise<Models.DocumentList<Document>>;
322
+ listDocuments<Document extends Models.Document = Models.DefaultDocument>(params: { databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean }): Promise<Models.DocumentList<Document>>;
322
323
  /**
323
324
  * Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
324
325
  *
@@ -326,25 +327,27 @@ export class Databases extends Service {
326
327
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
327
328
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
328
329
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
330
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
329
331
  * @throws {AppwriteException}
330
332
  * @returns {Promise<Models.DocumentList<Document>>}
331
333
  * @deprecated Use the object parameter style method for a better developer experience.
332
334
  */
333
- listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
335
+ listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.DocumentList<Document>>;
334
336
  listDocuments<Document extends Models.Document = Models.DefaultDocument>(
335
- paramsOrFirst: { databaseId: string, collectionId: string, queries?: string[], transactionId?: string } | string,
336
- ...rest: [(string)?, (string[])?, (string)?]
337
+ paramsOrFirst: { databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean } | string,
338
+ ...rest: [(string)?, (string[])?, (string)?, (boolean)?]
337
339
  ): Promise<Models.DocumentList<Document>> {
338
- let params: { databaseId: string, collectionId: string, queries?: string[], transactionId?: string };
340
+ let params: { databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean };
339
341
 
340
342
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
341
- params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, queries?: string[], transactionId?: string };
343
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean };
342
344
  } else {
343
345
  params = {
344
346
  databaseId: paramsOrFirst as string,
345
347
  collectionId: rest[0] as string,
346
348
  queries: rest[1] as string[],
347
- transactionId: rest[2] as string
349
+ transactionId: rest[2] as string,
350
+ total: rest[3] as boolean
348
351
  };
349
352
  }
350
353
 
@@ -352,6 +355,7 @@ export class Databases extends Service {
352
355
  const collectionId = params.collectionId;
353
356
  const queries = params.queries;
354
357
  const transactionId = params.transactionId;
358
+ const total = params.total;
355
359
 
356
360
  if (typeof databaseId === 'undefined') {
357
361
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -372,6 +376,10 @@ export class Databases extends Service {
372
376
  payload['transactionId'] = transactionId;
373
377
  }
374
378
 
379
+ if (typeof total !== 'undefined') {
380
+ payload['total'] = total;
381
+ }
382
+
375
383
  const uri = new URL(this.client.config.endpoint + apiPath);
376
384
  return this.client.call('get', uri, {
377
385
  }, payload);
@@ -19,37 +19,41 @@ export class Functions extends Service {
19
19
  *
20
20
  * @param {string} params.functionId - Function ID.
21
21
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
22
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
22
23
  * @throws {AppwriteException}
23
24
  * @returns {Promise}
24
25
  */
25
- listExecutions(params: { functionId: string, queries?: string[] }): Promise<Models.ExecutionList>;
26
+ listExecutions(params: { functionId: string, queries?: string[], total?: boolean }): Promise<Models.ExecutionList>;
26
27
  /**
27
28
  * Get a list of all the current user function execution logs. You can use the query params to filter your results.
28
29
  *
29
30
  * @param {string} functionId - Function ID.
30
31
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
32
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
31
33
  * @throws {AppwriteException}
32
34
  * @returns {Promise<Models.ExecutionList>}
33
35
  * @deprecated Use the object parameter style method for a better developer experience.
34
36
  */
35
- listExecutions(functionId: string, queries?: string[]): Promise<Models.ExecutionList>;
37
+ listExecutions(functionId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
36
38
  listExecutions(
37
- paramsOrFirst: { functionId: string, queries?: string[] } | string,
38
- ...rest: [(string[])?]
39
+ paramsOrFirst: { functionId: string, queries?: string[], total?: boolean } | string,
40
+ ...rest: [(string[])?, (boolean)?]
39
41
  ): Promise<Models.ExecutionList> {
40
- let params: { functionId: string, queries?: string[] };
42
+ let params: { functionId: string, queries?: string[], total?: boolean };
41
43
 
42
44
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
43
- params = (paramsOrFirst || {}) as { functionId: string, queries?: string[] };
45
+ params = (paramsOrFirst || {}) as { functionId: string, queries?: string[], total?: boolean };
44
46
  } else {
45
47
  params = {
46
48
  functionId: paramsOrFirst as string,
47
- queries: rest[0] as string[]
49
+ queries: rest[0] as string[],
50
+ total: rest[1] as boolean
48
51
  };
49
52
  }
50
53
 
51
54
  const functionId = params.functionId;
52
55
  const queries = params.queries;
56
+ const total = params.total;
53
57
 
54
58
  if (typeof functionId === 'undefined') {
55
59
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -62,6 +66,10 @@ export class Functions extends Service {
62
66
  payload['queries'] = queries;
63
67
  }
64
68
 
69
+ if (typeof total !== 'undefined') {
70
+ payload['total'] = total;
71
+ }
72
+
65
73
  const uri = new URL(this.client.config.endpoint + apiPath);
66
74
  return this.client.call('get', uri, {
67
75
  }, payload);
@@ -21,40 +21,44 @@ export class Storage extends Service {
21
21
  * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
22
22
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded
23
23
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
24
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
24
25
  * @throws {AppwriteException}
25
26
  * @returns {Promise}
26
27
  */
27
- listFiles(params: { bucketId: string, queries?: string[], search?: string }): Promise<Models.FileList>;
28
+ listFiles(params: { bucketId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.FileList>;
28
29
  /**
29
30
  * Get a list of all the user files. You can use the query params to filter your results.
30
31
  *
31
32
  * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
32
33
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded
33
34
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
35
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
34
36
  * @throws {AppwriteException}
35
37
  * @returns {Promise<Models.FileList>}
36
38
  * @deprecated Use the object parameter style method for a better developer experience.
37
39
  */
38
- listFiles(bucketId: string, queries?: string[], search?: string): Promise<Models.FileList>;
40
+ listFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.FileList>;
39
41
  listFiles(
40
- paramsOrFirst: { bucketId: string, queries?: string[], search?: string } | string,
41
- ...rest: [(string[])?, (string)?]
42
+ paramsOrFirst: { bucketId: string, queries?: string[], search?: string, total?: boolean } | string,
43
+ ...rest: [(string[])?, (string)?, (boolean)?]
42
44
  ): Promise<Models.FileList> {
43
- let params: { bucketId: string, queries?: string[], search?: string };
45
+ let params: { bucketId: string, queries?: string[], search?: string, total?: boolean };
44
46
 
45
47
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
46
- params = (paramsOrFirst || {}) as { bucketId: string, queries?: string[], search?: string };
48
+ params = (paramsOrFirst || {}) as { bucketId: string, queries?: string[], search?: string, total?: boolean };
47
49
  } else {
48
50
  params = {
49
51
  bucketId: paramsOrFirst as string,
50
52
  queries: rest[0] as string[],
51
- search: rest[1] as string
53
+ search: rest[1] as string,
54
+ total: rest[2] as boolean
52
55
  };
53
56
  }
54
57
 
55
58
  const bucketId = params.bucketId;
56
59
  const queries = params.queries;
57
60
  const search = params.search;
61
+ const total = params.total;
58
62
 
59
63
  if (typeof bucketId === 'undefined') {
60
64
  throw new AppwriteException('Missing required parameter: "bucketId"');
@@ -71,6 +75,10 @@ export class Storage extends Service {
71
75
  payload['search'] = search;
72
76
  }
73
77
 
78
+ if (typeof total !== 'undefined') {
79
+ payload['total'] = total;
80
+ }
81
+
74
82
  const uri = new URL(this.client.config.endpoint + apiPath);
75
83
  return this.client.call('get', uri, {
76
84
  }, payload);
@@ -314,10 +314,11 @@ export class TablesDB extends Service {
314
314
  * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
315
315
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
316
316
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
317
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
317
318
  * @throws {AppwriteException}
318
319
  * @returns {Promise}
319
320
  */
320
- listRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string }): Promise<Models.RowList<Row>>;
321
+ listRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean }): Promise<Models.RowList<Row>>;
321
322
  /**
322
323
  * Get a list of all the user's rows in a given table. You can use the query params to filter your results.
323
324
  *
@@ -325,25 +326,27 @@ export class TablesDB extends Service {
325
326
  * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
326
327
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
327
328
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
329
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
328
330
  * @throws {AppwriteException}
329
331
  * @returns {Promise<Models.RowList<Row>>}
330
332
  * @deprecated Use the object parameter style method for a better developer experience.
331
333
  */
332
- listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string): Promise<Models.RowList<Row>>;
334
+ listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.RowList<Row>>;
333
335
  listRows<Row extends Models.Row = Models.DefaultRow>(
334
- paramsOrFirst: { databaseId: string, tableId: string, queries?: string[], transactionId?: string } | string,
335
- ...rest: [(string)?, (string[])?, (string)?]
336
+ paramsOrFirst: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean } | string,
337
+ ...rest: [(string)?, (string[])?, (string)?, (boolean)?]
336
338
  ): Promise<Models.RowList<Row>> {
337
- let params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string };
339
+ let params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean };
338
340
 
339
341
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
340
- params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, queries?: string[], transactionId?: string };
342
+ params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean };
341
343
  } else {
342
344
  params = {
343
345
  databaseId: paramsOrFirst as string,
344
346
  tableId: rest[0] as string,
345
347
  queries: rest[1] as string[],
346
- transactionId: rest[2] as string
348
+ transactionId: rest[2] as string,
349
+ total: rest[3] as boolean
347
350
  };
348
351
  }
349
352
 
@@ -351,6 +354,7 @@ export class TablesDB extends Service {
351
354
  const tableId = params.tableId;
352
355
  const queries = params.queries;
353
356
  const transactionId = params.transactionId;
357
+ const total = params.total;
354
358
 
355
359
  if (typeof databaseId === 'undefined') {
356
360
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -371,6 +375,10 @@ export class TablesDB extends Service {
371
375
  payload['transactionId'] = transactionId;
372
376
  }
373
377
 
378
+ if (typeof total !== 'undefined') {
379
+ payload['total'] = total;
380
+ }
381
+
374
382
  const uri = new URL(this.client.config.endpoint + apiPath);
375
383
  return this.client.call('get', uri, {
376
384
  }, payload);
@@ -18,37 +18,41 @@ export class Teams extends Service {
18
18
  *
19
19
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan
20
20
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
21
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
21
22
  * @throws {AppwriteException}
22
23
  * @returns {Promise}
23
24
  */
24
- list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: { queries?: string[], search?: string }): Promise<Models.TeamList<Preferences>>;
25
+ list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.TeamList<Preferences>>;
25
26
  /**
26
27
  * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
27
28
  *
28
29
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan
29
30
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
31
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
30
32
  * @throws {AppwriteException}
31
33
  * @returns {Promise<Models.TeamList<Preferences>>}
32
34
  * @deprecated Use the object parameter style method for a better developer experience.
33
35
  */
34
- list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.TeamList<Preferences>>;
36
+ list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string, total?: boolean): Promise<Models.TeamList<Preferences>>;
35
37
  list<Preferences extends Models.Preferences = Models.DefaultPreferences>(
36
- paramsOrFirst?: { queries?: string[], search?: string } | string[],
37
- ...rest: [(string)?]
38
+ paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],
39
+ ...rest: [(string)?, (boolean)?]
38
40
  ): Promise<Models.TeamList<Preferences>> {
39
- let params: { queries?: string[], search?: string };
41
+ let params: { queries?: string[], search?: string, total?: boolean };
40
42
 
41
43
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
42
- params = (paramsOrFirst || {}) as { queries?: string[], search?: string };
44
+ params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };
43
45
  } else {
44
46
  params = {
45
47
  queries: paramsOrFirst as string[],
46
- search: rest[0] as string
48
+ search: rest[0] as string,
49
+ total: rest[1] as boolean
47
50
  };
48
51
  }
49
52
 
50
53
  const queries = params.queries;
51
54
  const search = params.search;
55
+ const total = params.total;
52
56
 
53
57
  const apiPath = '/teams';
54
58
  const payload: Payload = {};
@@ -61,6 +65,10 @@ export class Teams extends Service {
61
65
  payload['search'] = search;
62
66
  }
63
67
 
68
+ if (typeof total !== 'undefined') {
69
+ payload['total'] = total;
70
+ }
71
+
64
72
  const uri = new URL(this.client.config.endpoint + apiPath);
65
73
  return this.client.call('get', uri, {
66
74
  }, payload);
@@ -289,40 +297,44 @@ export class Teams extends Service {
289
297
  * @param {string} params.teamId - Team ID.
290
298
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles
291
299
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
300
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
292
301
  * @throws {AppwriteException}
293
302
  * @returns {Promise}
294
303
  */
295
- listMemberships(params: { teamId: string, queries?: string[], search?: string }): Promise<Models.MembershipList>;
304
+ listMemberships(params: { teamId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.MembershipList>;
296
305
  /**
297
306
  * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.
298
307
  *
299
308
  * @param {string} teamId - Team ID.
300
309
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles
301
310
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
311
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
302
312
  * @throws {AppwriteException}
303
313
  * @returns {Promise<Models.MembershipList>}
304
314
  * @deprecated Use the object parameter style method for a better developer experience.
305
315
  */
306
- listMemberships(teamId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
316
+ listMemberships(teamId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.MembershipList>;
307
317
  listMemberships(
308
- paramsOrFirst: { teamId: string, queries?: string[], search?: string } | string,
309
- ...rest: [(string[])?, (string)?]
318
+ paramsOrFirst: { teamId: string, queries?: string[], search?: string, total?: boolean } | string,
319
+ ...rest: [(string[])?, (string)?, (boolean)?]
310
320
  ): Promise<Models.MembershipList> {
311
- let params: { teamId: string, queries?: string[], search?: string };
321
+ let params: { teamId: string, queries?: string[], search?: string, total?: boolean };
312
322
 
313
323
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
314
- params = (paramsOrFirst || {}) as { teamId: string, queries?: string[], search?: string };
324
+ params = (paramsOrFirst || {}) as { teamId: string, queries?: string[], search?: string, total?: boolean };
315
325
  } else {
316
326
  params = {
317
327
  teamId: paramsOrFirst as string,
318
328
  queries: rest[0] as string[],
319
- search: rest[1] as string
329
+ search: rest[1] as string,
330
+ total: rest[2] as boolean
320
331
  };
321
332
  }
322
333
 
323
334
  const teamId = params.teamId;
324
335
  const queries = params.queries;
325
336
  const search = params.search;
337
+ const total = params.total;
326
338
 
327
339
  if (typeof teamId === 'undefined') {
328
340
  throw new AppwriteException('Missing required parameter: "teamId"');
@@ -339,6 +351,10 @@ export class Teams extends Service {
339
351
  payload['search'] = search;
340
352
  }
341
353
 
354
+ if (typeof total !== 'undefined') {
355
+ payload['total'] = total;
356
+ }
357
+
342
358
  const uri = new URL(this.client.config.endpoint + apiPath);
343
359
  return this.client.call('get', uri, {
344
360
  }, payload);
@@ -2,5 +2,6 @@ export declare enum ExecutionStatus {
2
2
  Waiting = "waiting",
3
3
  Processing = "processing",
4
4
  Completed = "completed",
5
- Failed = "failed"
5
+ Failed = "failed",
6
+ Scheduled = "scheduled"
6
7
  }
package/types/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export { Query } from './query';
15
15
  export { Permission } from './permission';
16
16
  export { Role } from './role';
17
17
  export { ID } from './id';
18
+ export { Operator, Condition } from './operator';
18
19
  export { AuthenticatorType } from './enums/authenticator-type';
19
20
  export { AuthenticationFactor } from './enums/authentication-factor';
20
21
  export { OAuthProvider } from './enums/o-auth-provider';
@@ -24,3 +25,5 @@ export { Flag } from './enums/flag';
24
25
  export { ExecutionMethod } from './enums/execution-method';
25
26
  export { ImageGravity } from './enums/image-gravity';
26
27
  export { ImageFormat } from './enums/image-format';
28
+ export { ExecutionTrigger } from './enums/execution-trigger';
29
+ export { ExecutionStatus } from './enums/execution-status';
package/types/models.d.ts CHANGED
@@ -983,7 +983,7 @@ export declare namespace Models {
983
983
  */
984
984
  trigger: ExecutionTrigger;
985
985
  /**
986
- * The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
986
+ * The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.
987
987
  */
988
988
  status: ExecutionStatus;
989
989
  /**