node-appwrite 20.2.1 → 20.3.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.
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -2
- package/dist/client.mjs.map +1 -1
- package/dist/enums/execution-status.d.mts +2 -1
- package/dist/enums/execution-status.d.ts +2 -1
- package/dist/enums/execution-status.js +1 -0
- package/dist/enums/execution-status.js.map +1 -1
- package/dist/enums/execution-status.mjs +1 -0
- package/dist/enums/execution-status.mjs.map +1 -1
- package/dist/enums/framework.d.mts +1 -0
- package/dist/enums/framework.d.ts +1 -0
- package/dist/enums/framework.js +1 -0
- package/dist/enums/framework.js.map +1 -1
- package/dist/enums/framework.mjs +1 -0
- package/dist/enums/framework.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +1 -1
- package/dist/models.d.ts +1 -1
- package/dist/operator.d.mts +181 -0
- package/dist/operator.d.ts +181 -0
- package/dist/operator.js +268 -0
- package/dist/operator.js.map +1 -0
- package/dist/operator.mjs +266 -0
- package/dist/operator.mjs.map +1 -0
- package/dist/query.js +6 -6
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +6 -6
- package/dist/query.mjs.map +1 -1
- package/dist/services/account.d.mts +8 -2
- package/dist/services/account.d.ts +8 -2
- package/dist/services/account.js +14 -4
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +14 -4
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/databases.d.mts +20 -5
- package/dist/services/databases.d.ts +20 -5
- package/dist/services/databases.js +30 -5
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +30 -5
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +12 -3
- package/dist/services/functions.d.ts +12 -3
- package/dist/services/functions.js +18 -3
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +18 -3
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/messaging.d.mts +116 -9
- package/dist/services/messaging.d.ts +116 -9
- package/dist/services/messaging.js +182 -9
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +182 -9
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/sites.d.mts +12 -3
- package/dist/services/sites.d.ts +12 -3
- package/dist/services/sites.js +18 -3
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +18 -3
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +8 -2
- package/dist/services/storage.d.ts +8 -2
- package/dist/services/storage.js +12 -2
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +12 -2
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +20 -5
- package/dist/services/tables-db.d.ts +20 -5
- package/dist/services/tables-db.js +30 -5
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs +30 -5
- package/dist/services/tables-db.mjs.map +1 -1
- package/dist/services/teams.d.mts +8 -2
- package/dist/services/teams.d.ts +8 -2
- package/dist/services/teams.js +12 -2
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +12 -2
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/tokens.d.mts +4 -1
- package/dist/services/tokens.d.ts +4 -1
- package/dist/services/tokens.js +6 -1
- package/dist/services/tokens.js.map +1 -1
- package/dist/services/tokens.mjs +6 -1
- package/dist/services/tokens.mjs.map +1 -1
- package/dist/services/users.d.mts +24 -6
- package/dist/services/users.d.ts +24 -6
- package/dist/services/users.js +37 -7
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +37 -7
- package/dist/services/users.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ declare class Databases {
|
|
|
23
23
|
*
|
|
24
24
|
* @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
|
|
25
25
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
26
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
26
27
|
* @throws {AppwriteException}
|
|
27
28
|
* @returns {Promise<Models.DatabaseList>}
|
|
28
29
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.list` instead.
|
|
@@ -30,17 +31,19 @@ declare class Databases {
|
|
|
30
31
|
list(params?: {
|
|
31
32
|
queries?: string[];
|
|
32
33
|
search?: string;
|
|
34
|
+
total?: boolean;
|
|
33
35
|
}): Promise<Models.DatabaseList>;
|
|
34
36
|
/**
|
|
35
37
|
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
36
38
|
*
|
|
37
39
|
* @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
|
|
38
40
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
41
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
39
42
|
* @throws {AppwriteException}
|
|
40
43
|
* @returns {Promise<Models.DatabaseList>}
|
|
41
44
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
42
45
|
*/
|
|
43
|
-
list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
|
|
46
|
+
list(queries?: string[], search?: string, total?: boolean): Promise<Models.DatabaseList>;
|
|
44
47
|
/**
|
|
45
48
|
* Create a new Database.
|
|
46
49
|
*
|
|
@@ -264,6 +267,7 @@ declare class Databases {
|
|
|
264
267
|
* @param {string} params.databaseId - Database ID.
|
|
265
268
|
* @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, enabled, documentSecurity
|
|
266
269
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
270
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
267
271
|
* @throws {AppwriteException}
|
|
268
272
|
* @returns {Promise<Models.CollectionList>}
|
|
269
273
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTables` instead.
|
|
@@ -272,6 +276,7 @@ declare class Databases {
|
|
|
272
276
|
databaseId: string;
|
|
273
277
|
queries?: string[];
|
|
274
278
|
search?: string;
|
|
279
|
+
total?: boolean;
|
|
275
280
|
}): Promise<Models.CollectionList>;
|
|
276
281
|
/**
|
|
277
282
|
* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
|
|
@@ -279,11 +284,12 @@ declare class Databases {
|
|
|
279
284
|
* @param {string} databaseId - Database ID.
|
|
280
285
|
* @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, enabled, documentSecurity
|
|
281
286
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
287
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
282
288
|
* @throws {AppwriteException}
|
|
283
289
|
* @returns {Promise<Models.CollectionList>}
|
|
284
290
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
285
291
|
*/
|
|
286
|
-
listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
|
|
292
|
+
listCollections(databaseId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.CollectionList>;
|
|
287
293
|
/**
|
|
288
294
|
* Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
289
295
|
*
|
|
@@ -406,6 +412,7 @@ declare class Databases {
|
|
|
406
412
|
* @param {string} params.databaseId - Database ID.
|
|
407
413
|
* @param {string} params.collectionId - Collection ID.
|
|
408
414
|
* @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: key, type, size, required, array, status, error
|
|
415
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
409
416
|
* @throws {AppwriteException}
|
|
410
417
|
* @returns {Promise<Models.AttributeList>}
|
|
411
418
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listColumns` instead.
|
|
@@ -414,6 +421,7 @@ declare class Databases {
|
|
|
414
421
|
databaseId: string;
|
|
415
422
|
collectionId: string;
|
|
416
423
|
queries?: string[];
|
|
424
|
+
total?: boolean;
|
|
417
425
|
}): Promise<Models.AttributeList>;
|
|
418
426
|
/**
|
|
419
427
|
* List attributes in the collection.
|
|
@@ -421,11 +429,12 @@ declare class Databases {
|
|
|
421
429
|
* @param {string} databaseId - Database ID.
|
|
422
430
|
* @param {string} collectionId - Collection ID.
|
|
423
431
|
* @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: key, type, size, required, array, status, error
|
|
432
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
424
433
|
* @throws {AppwriteException}
|
|
425
434
|
* @returns {Promise<Models.AttributeList>}
|
|
426
435
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
427
436
|
*/
|
|
428
|
-
listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList>;
|
|
437
|
+
listAttributes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.AttributeList>;
|
|
429
438
|
/**
|
|
430
439
|
* Create a boolean attribute.
|
|
431
440
|
*
|
|
@@ -1462,6 +1471,7 @@ declare class Databases {
|
|
|
1462
1471
|
* @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).
|
|
1463
1472
|
* @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.
|
|
1464
1473
|
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1474
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1465
1475
|
* @throws {AppwriteException}
|
|
1466
1476
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1467
1477
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
|
|
@@ -1471,6 +1481,7 @@ declare class Databases {
|
|
|
1471
1481
|
collectionId: string;
|
|
1472
1482
|
queries?: string[];
|
|
1473
1483
|
transactionId?: string;
|
|
1484
|
+
total?: boolean;
|
|
1474
1485
|
}): Promise<Models.DocumentList<Document>>;
|
|
1475
1486
|
/**
|
|
1476
1487
|
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
@@ -1479,11 +1490,12 @@ declare class Databases {
|
|
|
1479
1490
|
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1480
1491
|
* @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.
|
|
1481
1492
|
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1493
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1482
1494
|
* @throws {AppwriteException}
|
|
1483
1495
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1484
1496
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1485
1497
|
*/
|
|
1486
|
-
listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
|
|
1498
|
+
listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.DocumentList<Document>>;
|
|
1487
1499
|
/**
|
|
1488
1500
|
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
1489
1501
|
*
|
|
@@ -1853,6 +1865,7 @@ declare class Databases {
|
|
|
1853
1865
|
* @param {string} params.databaseId - Database ID.
|
|
1854
1866
|
* @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).
|
|
1855
1867
|
* @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: key, type, status, attributes, error
|
|
1868
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1856
1869
|
* @throws {AppwriteException}
|
|
1857
1870
|
* @returns {Promise<Models.IndexList>}
|
|
1858
1871
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listIndexes` instead.
|
|
@@ -1861,6 +1874,7 @@ declare class Databases {
|
|
|
1861
1874
|
databaseId: string;
|
|
1862
1875
|
collectionId: string;
|
|
1863
1876
|
queries?: string[];
|
|
1877
|
+
total?: boolean;
|
|
1864
1878
|
}): Promise<Models.IndexList>;
|
|
1865
1879
|
/**
|
|
1866
1880
|
* List indexes in the collection.
|
|
@@ -1868,11 +1882,12 @@ declare class Databases {
|
|
|
1868
1882
|
* @param {string} databaseId - Database ID.
|
|
1869
1883
|
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1870
1884
|
* @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: key, type, status, attributes, error
|
|
1885
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1871
1886
|
* @throws {AppwriteException}
|
|
1872
1887
|
* @returns {Promise<Models.IndexList>}
|
|
1873
1888
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1874
1889
|
*/
|
|
1875
|
-
listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList>;
|
|
1890
|
+
listIndexes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.IndexList>;
|
|
1876
1891
|
/**
|
|
1877
1892
|
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
1878
1893
|
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
@@ -23,6 +23,7 @@ declare class Databases {
|
|
|
23
23
|
*
|
|
24
24
|
* @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
|
|
25
25
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
26
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
26
27
|
* @throws {AppwriteException}
|
|
27
28
|
* @returns {Promise<Models.DatabaseList>}
|
|
28
29
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.list` instead.
|
|
@@ -30,17 +31,19 @@ declare class Databases {
|
|
|
30
31
|
list(params?: {
|
|
31
32
|
queries?: string[];
|
|
32
33
|
search?: string;
|
|
34
|
+
total?: boolean;
|
|
33
35
|
}): Promise<Models.DatabaseList>;
|
|
34
36
|
/**
|
|
35
37
|
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
36
38
|
*
|
|
37
39
|
* @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
|
|
38
40
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
41
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
39
42
|
* @throws {AppwriteException}
|
|
40
43
|
* @returns {Promise<Models.DatabaseList>}
|
|
41
44
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
42
45
|
*/
|
|
43
|
-
list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
|
|
46
|
+
list(queries?: string[], search?: string, total?: boolean): Promise<Models.DatabaseList>;
|
|
44
47
|
/**
|
|
45
48
|
* Create a new Database.
|
|
46
49
|
*
|
|
@@ -264,6 +267,7 @@ declare class Databases {
|
|
|
264
267
|
* @param {string} params.databaseId - Database ID.
|
|
265
268
|
* @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, enabled, documentSecurity
|
|
266
269
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
270
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
267
271
|
* @throws {AppwriteException}
|
|
268
272
|
* @returns {Promise<Models.CollectionList>}
|
|
269
273
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTables` instead.
|
|
@@ -272,6 +276,7 @@ declare class Databases {
|
|
|
272
276
|
databaseId: string;
|
|
273
277
|
queries?: string[];
|
|
274
278
|
search?: string;
|
|
279
|
+
total?: boolean;
|
|
275
280
|
}): Promise<Models.CollectionList>;
|
|
276
281
|
/**
|
|
277
282
|
* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
|
|
@@ -279,11 +284,12 @@ declare class Databases {
|
|
|
279
284
|
* @param {string} databaseId - Database ID.
|
|
280
285
|
* @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, enabled, documentSecurity
|
|
281
286
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
287
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
282
288
|
* @throws {AppwriteException}
|
|
283
289
|
* @returns {Promise<Models.CollectionList>}
|
|
284
290
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
285
291
|
*/
|
|
286
|
-
listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
|
|
292
|
+
listCollections(databaseId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.CollectionList>;
|
|
287
293
|
/**
|
|
288
294
|
* Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
289
295
|
*
|
|
@@ -406,6 +412,7 @@ declare class Databases {
|
|
|
406
412
|
* @param {string} params.databaseId - Database ID.
|
|
407
413
|
* @param {string} params.collectionId - Collection ID.
|
|
408
414
|
* @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: key, type, size, required, array, status, error
|
|
415
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
409
416
|
* @throws {AppwriteException}
|
|
410
417
|
* @returns {Promise<Models.AttributeList>}
|
|
411
418
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listColumns` instead.
|
|
@@ -414,6 +421,7 @@ declare class Databases {
|
|
|
414
421
|
databaseId: string;
|
|
415
422
|
collectionId: string;
|
|
416
423
|
queries?: string[];
|
|
424
|
+
total?: boolean;
|
|
417
425
|
}): Promise<Models.AttributeList>;
|
|
418
426
|
/**
|
|
419
427
|
* List attributes in the collection.
|
|
@@ -421,11 +429,12 @@ declare class Databases {
|
|
|
421
429
|
* @param {string} databaseId - Database ID.
|
|
422
430
|
* @param {string} collectionId - Collection ID.
|
|
423
431
|
* @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: key, type, size, required, array, status, error
|
|
432
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
424
433
|
* @throws {AppwriteException}
|
|
425
434
|
* @returns {Promise<Models.AttributeList>}
|
|
426
435
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
427
436
|
*/
|
|
428
|
-
listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList>;
|
|
437
|
+
listAttributes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.AttributeList>;
|
|
429
438
|
/**
|
|
430
439
|
* Create a boolean attribute.
|
|
431
440
|
*
|
|
@@ -1462,6 +1471,7 @@ declare class Databases {
|
|
|
1462
1471
|
* @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).
|
|
1463
1472
|
* @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.
|
|
1464
1473
|
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1474
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1465
1475
|
* @throws {AppwriteException}
|
|
1466
1476
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1467
1477
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
|
|
@@ -1471,6 +1481,7 @@ declare class Databases {
|
|
|
1471
1481
|
collectionId: string;
|
|
1472
1482
|
queries?: string[];
|
|
1473
1483
|
transactionId?: string;
|
|
1484
|
+
total?: boolean;
|
|
1474
1485
|
}): Promise<Models.DocumentList<Document>>;
|
|
1475
1486
|
/**
|
|
1476
1487
|
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
@@ -1479,11 +1490,12 @@ declare class Databases {
|
|
|
1479
1490
|
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1480
1491
|
* @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.
|
|
1481
1492
|
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1493
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1482
1494
|
* @throws {AppwriteException}
|
|
1483
1495
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1484
1496
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1485
1497
|
*/
|
|
1486
|
-
listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
|
|
1498
|
+
listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.DocumentList<Document>>;
|
|
1487
1499
|
/**
|
|
1488
1500
|
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
1489
1501
|
*
|
|
@@ -1853,6 +1865,7 @@ declare class Databases {
|
|
|
1853
1865
|
* @param {string} params.databaseId - Database ID.
|
|
1854
1866
|
* @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).
|
|
1855
1867
|
* @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: key, type, status, attributes, error
|
|
1868
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1856
1869
|
* @throws {AppwriteException}
|
|
1857
1870
|
* @returns {Promise<Models.IndexList>}
|
|
1858
1871
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listIndexes` instead.
|
|
@@ -1861,6 +1874,7 @@ declare class Databases {
|
|
|
1861
1874
|
databaseId: string;
|
|
1862
1875
|
collectionId: string;
|
|
1863
1876
|
queries?: string[];
|
|
1877
|
+
total?: boolean;
|
|
1864
1878
|
}): Promise<Models.IndexList>;
|
|
1865
1879
|
/**
|
|
1866
1880
|
* List indexes in the collection.
|
|
@@ -1868,11 +1882,12 @@ declare class Databases {
|
|
|
1868
1882
|
* @param {string} databaseId - Database ID.
|
|
1869
1883
|
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1870
1884
|
* @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: key, type, status, attributes, error
|
|
1885
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1871
1886
|
* @throws {AppwriteException}
|
|
1872
1887
|
* @returns {Promise<Models.IndexList>}
|
|
1873
1888
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1874
1889
|
*/
|
|
1875
|
-
listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList>;
|
|
1890
|
+
listIndexes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.IndexList>;
|
|
1876
1891
|
/**
|
|
1877
1892
|
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
1878
1893
|
* Attributes can be `key`, `fulltext`, and `unique`.
|
|
@@ -13,11 +13,13 @@ class Databases {
|
|
|
13
13
|
} else {
|
|
14
14
|
params = {
|
|
15
15
|
queries: paramsOrFirst,
|
|
16
|
-
search: rest[0]
|
|
16
|
+
search: rest[0],
|
|
17
|
+
total: rest[1]
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
const queries = params.queries;
|
|
20
21
|
const search = params.search;
|
|
22
|
+
const total = params.total;
|
|
21
23
|
const apiPath = "/databases";
|
|
22
24
|
const payload = {};
|
|
23
25
|
if (typeof queries !== "undefined") {
|
|
@@ -26,6 +28,9 @@ class Databases {
|
|
|
26
28
|
if (typeof search !== "undefined") {
|
|
27
29
|
payload["search"] = search;
|
|
28
30
|
}
|
|
31
|
+
if (typeof total !== "undefined") {
|
|
32
|
+
payload["total"] = total;
|
|
33
|
+
}
|
|
29
34
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
30
35
|
const apiHeaders = {};
|
|
31
36
|
return this.client.call(
|
|
@@ -341,12 +346,14 @@ class Databases {
|
|
|
341
346
|
params = {
|
|
342
347
|
databaseId: paramsOrFirst,
|
|
343
348
|
queries: rest[0],
|
|
344
|
-
search: rest[1]
|
|
349
|
+
search: rest[1],
|
|
350
|
+
total: rest[2]
|
|
345
351
|
};
|
|
346
352
|
}
|
|
347
353
|
const databaseId = params.databaseId;
|
|
348
354
|
const queries = params.queries;
|
|
349
355
|
const search = params.search;
|
|
356
|
+
const total = params.total;
|
|
350
357
|
if (typeof databaseId === "undefined") {
|
|
351
358
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
352
359
|
}
|
|
@@ -358,6 +365,9 @@ class Databases {
|
|
|
358
365
|
if (typeof search !== "undefined") {
|
|
359
366
|
payload["search"] = search;
|
|
360
367
|
}
|
|
368
|
+
if (typeof total !== "undefined") {
|
|
369
|
+
payload["total"] = total;
|
|
370
|
+
}
|
|
361
371
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
362
372
|
const apiHeaders = {};
|
|
363
373
|
return this.client.call(
|
|
@@ -546,12 +556,14 @@ class Databases {
|
|
|
546
556
|
params = {
|
|
547
557
|
databaseId: paramsOrFirst,
|
|
548
558
|
collectionId: rest[0],
|
|
549
|
-
queries: rest[1]
|
|
559
|
+
queries: rest[1],
|
|
560
|
+
total: rest[2]
|
|
550
561
|
};
|
|
551
562
|
}
|
|
552
563
|
const databaseId = params.databaseId;
|
|
553
564
|
const collectionId = params.collectionId;
|
|
554
565
|
const queries = params.queries;
|
|
566
|
+
const total = params.total;
|
|
555
567
|
if (typeof databaseId === "undefined") {
|
|
556
568
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
557
569
|
}
|
|
@@ -563,6 +575,9 @@ class Databases {
|
|
|
563
575
|
if (typeof queries !== "undefined") {
|
|
564
576
|
payload["queries"] = queries;
|
|
565
577
|
}
|
|
578
|
+
if (typeof total !== "undefined") {
|
|
579
|
+
payload["total"] = total;
|
|
580
|
+
}
|
|
566
581
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
567
582
|
const apiHeaders = {};
|
|
568
583
|
return this.client.call(
|
|
@@ -2182,13 +2197,15 @@ class Databases {
|
|
|
2182
2197
|
databaseId: paramsOrFirst,
|
|
2183
2198
|
collectionId: rest[0],
|
|
2184
2199
|
queries: rest[1],
|
|
2185
|
-
transactionId: rest[2]
|
|
2200
|
+
transactionId: rest[2],
|
|
2201
|
+
total: rest[3]
|
|
2186
2202
|
};
|
|
2187
2203
|
}
|
|
2188
2204
|
const databaseId = params.databaseId;
|
|
2189
2205
|
const collectionId = params.collectionId;
|
|
2190
2206
|
const queries = params.queries;
|
|
2191
2207
|
const transactionId = params.transactionId;
|
|
2208
|
+
const total = params.total;
|
|
2192
2209
|
if (typeof databaseId === "undefined") {
|
|
2193
2210
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2194
2211
|
}
|
|
@@ -2203,6 +2220,9 @@ class Databases {
|
|
|
2203
2220
|
if (typeof transactionId !== "undefined") {
|
|
2204
2221
|
payload["transactionId"] = transactionId;
|
|
2205
2222
|
}
|
|
2223
|
+
if (typeof total !== "undefined") {
|
|
2224
|
+
payload["total"] = total;
|
|
2225
|
+
}
|
|
2206
2226
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2207
2227
|
const apiHeaders = {};
|
|
2208
2228
|
return this.client.call(
|
|
@@ -2754,12 +2774,14 @@ class Databases {
|
|
|
2754
2774
|
params = {
|
|
2755
2775
|
databaseId: paramsOrFirst,
|
|
2756
2776
|
collectionId: rest[0],
|
|
2757
|
-
queries: rest[1]
|
|
2777
|
+
queries: rest[1],
|
|
2778
|
+
total: rest[2]
|
|
2758
2779
|
};
|
|
2759
2780
|
}
|
|
2760
2781
|
const databaseId = params.databaseId;
|
|
2761
2782
|
const collectionId = params.collectionId;
|
|
2762
2783
|
const queries = params.queries;
|
|
2784
|
+
const total = params.total;
|
|
2763
2785
|
if (typeof databaseId === "undefined") {
|
|
2764
2786
|
throw new client.AppwriteException('Missing required parameter: "databaseId"');
|
|
2765
2787
|
}
|
|
@@ -2771,6 +2793,9 @@ class Databases {
|
|
|
2771
2793
|
if (typeof queries !== "undefined") {
|
|
2772
2794
|
payload["queries"] = queries;
|
|
2773
2795
|
}
|
|
2796
|
+
if (typeof total !== "undefined") {
|
|
2797
|
+
payload["total"] = total;
|
|
2798
|
+
}
|
|
2774
2799
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2775
2800
|
const apiHeaders = {};
|
|
2776
2801
|
return this.client.call(
|