appwrite-cli 11.0.0 → 11.1.1
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/CHANGELOG.md +8 -0
- package/README.md +2 -2
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +2 -2
- package/lib/commands/account.js +12 -2
- package/lib/commands/databases.js +30 -5
- package/lib/commands/functions.js +24 -4
- package/lib/commands/messaging.js +54 -9
- package/lib/commands/migrations.js +6 -1
- package/lib/commands/projects.js +24 -4
- package/lib/commands/proxy.js +6 -1
- package/lib/commands/sites.js +19 -4
- package/lib/commands/storage.js +12 -2
- package/lib/commands/tables-db.js +30 -5
- package/lib/commands/teams.js +18 -3
- package/lib/commands/tokens.js +6 -1
- package/lib/commands/users.js +36 -6
- package/lib/commands/vcs.js +6 -1
- package/lib/parser.js +1 -1
- package/lib/type-generation/languages/csharp.js +8 -8
- package/lib/type-generation/languages/dart.js +7 -7
- package/lib/type-generation/languages/java.js +7 -7
- package/lib/type-generation/languages/kotlin.js +4 -4
- package/lib/type-generation/languages/php.js +9 -9
- package/lib/type-generation/languages/swift.js +8 -8
- package/lib/type-generation/languages/typescript.js +4 -4
- package/package.json +1 -1
- package/scoop/appwrite.config.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 11.1.1
|
|
4
|
+
|
|
5
|
+
* Fix duplicate `enums` during type generation by prefixing them with table name. For example, `enum MyEnum` will now be generated as `enum MyTableMyEnum` to avoid conflicts.
|
|
6
|
+
|
|
7
|
+
## 11.1.0
|
|
8
|
+
|
|
9
|
+
* Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance
|
|
10
|
+
|
|
3
11
|
## 11.0.0
|
|
4
12
|
|
|
5
13
|
* Rename `create-csv-migration` to `create-csv-import` command to create a CSV import of a collection/table
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
|
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
$ appwrite -v
|
|
32
|
-
11.
|
|
32
|
+
11.1.1
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Install using prebuilt binaries
|
|
@@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
|
|
|
60
60
|
Once the installation completes, you can verify your install using
|
|
61
61
|
```
|
|
62
62
|
$ appwrite -v
|
|
63
|
-
11.
|
|
63
|
+
11.1.1
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Getting Started
|
package/install.ps1
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
# You can use "View source" of this page to see the full script.
|
|
14
14
|
|
|
15
15
|
# REPO
|
|
16
|
-
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/11.
|
|
17
|
-
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/11.
|
|
16
|
+
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/11.1.1/appwrite-cli-win-x64.exe"
|
|
17
|
+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/11.1.1/appwrite-cli-win-arm64.exe"
|
|
18
18
|
|
|
19
19
|
$APPWRITE_BINARY_NAME = "appwrite.exe"
|
|
20
20
|
|
package/install.sh
CHANGED
|
@@ -97,7 +97,7 @@ printSuccess() {
|
|
|
97
97
|
downloadBinary() {
|
|
98
98
|
echo "[2/4] Downloading executable for $OS ($ARCH) ..."
|
|
99
99
|
|
|
100
|
-
GITHUB_LATEST_VERSION="11.
|
|
100
|
+
GITHUB_LATEST_VERSION="11.1.1"
|
|
101
101
|
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
|
|
102
102
|
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
|
|
103
103
|
|
package/lib/client.js
CHANGED
|
@@ -16,8 +16,8 @@ class Client {
|
|
|
16
16
|
'x-sdk-name': 'Command Line',
|
|
17
17
|
'x-sdk-platform': 'console',
|
|
18
18
|
'x-sdk-language': 'cli',
|
|
19
|
-
'x-sdk-version': '11.
|
|
20
|
-
'user-agent' : `AppwriteCLI/11.
|
|
19
|
+
'x-sdk-version': '11.1.1',
|
|
20
|
+
'user-agent' : `AppwriteCLI/11.1.1 (${os.type()} ${os.version()}; ${os.arch()})`,
|
|
21
21
|
'X-Appwrite-Response-Format' : '1.8.0',
|
|
22
22
|
};
|
|
23
23
|
}
|
package/lib/commands/account.js
CHANGED
|
@@ -185,6 +185,7 @@ const accountUpdateEmail = async ({email,password,parseOutput = true, overrideFo
|
|
|
185
185
|
/**
|
|
186
186
|
* @typedef {Object} AccountListIdentitiesRequestParams
|
|
187
187
|
* @property {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
|
|
188
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
188
189
|
* @property {boolean} overrideForCli
|
|
189
190
|
* @property {boolean} parseOutput
|
|
190
191
|
* @property {libClient | undefined} sdk
|
|
@@ -193,7 +194,7 @@ const accountUpdateEmail = async ({email,password,parseOutput = true, overrideFo
|
|
|
193
194
|
/**
|
|
194
195
|
* @param {AccountListIdentitiesRequestParams} params
|
|
195
196
|
*/
|
|
196
|
-
const accountListIdentities = async ({queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
197
|
+
const accountListIdentities = async ({queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
197
198
|
let client = !sdk ? await sdkForProject() :
|
|
198
199
|
sdk;
|
|
199
200
|
let apiPath = '/account/identities';
|
|
@@ -201,6 +202,9 @@ const accountListIdentities = async ({queries,parseOutput = true, overrideForCli
|
|
|
201
202
|
if (typeof queries !== 'undefined') {
|
|
202
203
|
payload['queries'] = queries;
|
|
203
204
|
}
|
|
205
|
+
if (typeof total !== 'undefined') {
|
|
206
|
+
payload['total'] = total;
|
|
207
|
+
}
|
|
204
208
|
|
|
205
209
|
let response = undefined;
|
|
206
210
|
|
|
@@ -276,6 +280,7 @@ const accountCreateJWT = async ({parseOutput = true, overrideForCli = false, sdk
|
|
|
276
280
|
/**
|
|
277
281
|
* @typedef {Object} AccountListLogsRequestParams
|
|
278
282
|
* @property {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
|
|
283
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
279
284
|
* @property {boolean} overrideForCli
|
|
280
285
|
* @property {boolean} parseOutput
|
|
281
286
|
* @property {libClient | undefined} sdk
|
|
@@ -284,7 +289,7 @@ const accountCreateJWT = async ({parseOutput = true, overrideForCli = false, sdk
|
|
|
284
289
|
/**
|
|
285
290
|
* @param {AccountListLogsRequestParams} params
|
|
286
291
|
*/
|
|
287
|
-
const accountListLogs = async ({queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
292
|
+
const accountListLogs = async ({queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
288
293
|
let client = !sdk ? await sdkForProject() :
|
|
289
294
|
sdk;
|
|
290
295
|
let apiPath = '/account/logs';
|
|
@@ -292,6 +297,9 @@ const accountListLogs = async ({queries,parseOutput = true, overrideForCli = fal
|
|
|
292
297
|
if (typeof queries !== 'undefined') {
|
|
293
298
|
payload['queries'] = queries;
|
|
294
299
|
}
|
|
300
|
+
if (typeof total !== 'undefined') {
|
|
301
|
+
payload['total'] = total;
|
|
302
|
+
}
|
|
295
303
|
|
|
296
304
|
let response = undefined;
|
|
297
305
|
|
|
@@ -1765,6 +1773,7 @@ account
|
|
|
1765
1773
|
.command(`list-identities`)
|
|
1766
1774
|
.description(`Get the list of identities for the currently logged in user.`)
|
|
1767
1775
|
.option(`--queries [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`)
|
|
1776
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
1768
1777
|
.action(actionRunner(accountListIdentities))
|
|
1769
1778
|
|
|
1770
1779
|
account
|
|
@@ -1782,6 +1791,7 @@ account
|
|
|
1782
1791
|
.command(`list-logs`)
|
|
1783
1792
|
.description(`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.`)
|
|
1784
1793
|
.option(`--queries [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`)
|
|
1794
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
1785
1795
|
.action(actionRunner(accountListLogs))
|
|
1786
1796
|
|
|
1787
1797
|
account
|
|
@@ -43,6 +43,7 @@ const databases = new Command("databases").description(commandDescriptions['data
|
|
|
43
43
|
* @typedef {Object} DatabasesListRequestParams
|
|
44
44
|
* @property {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
|
|
45
45
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
46
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
46
47
|
* @property {boolean} overrideForCli
|
|
47
48
|
* @property {boolean} parseOutput
|
|
48
49
|
* @property {libClient | undefined} sdk
|
|
@@ -51,7 +52,7 @@ const databases = new Command("databases").description(commandDescriptions['data
|
|
|
51
52
|
/**
|
|
52
53
|
* @param {DatabasesListRequestParams} params
|
|
53
54
|
*/
|
|
54
|
-
const databasesList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
55
|
+
const databasesList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
55
56
|
let client = !sdk ? await sdkForProject() :
|
|
56
57
|
sdk;
|
|
57
58
|
let apiPath = '/databases';
|
|
@@ -62,6 +63,9 @@ const databasesList = async ({queries,search,parseOutput = true, overrideForCli
|
|
|
62
63
|
if (typeof search !== 'undefined') {
|
|
63
64
|
payload['search'] = search;
|
|
64
65
|
}
|
|
66
|
+
if (typeof total !== 'undefined') {
|
|
67
|
+
payload['total'] = total;
|
|
68
|
+
}
|
|
65
69
|
|
|
66
70
|
let response = undefined;
|
|
67
71
|
|
|
@@ -467,6 +471,7 @@ const databasesDelete = async ({databaseId,parseOutput = true, overrideForCli =
|
|
|
467
471
|
* @property {string} databaseId Database ID.
|
|
468
472
|
* @property {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
|
|
469
473
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
474
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
470
475
|
* @property {boolean} overrideForCli
|
|
471
476
|
* @property {boolean} parseOutput
|
|
472
477
|
* @property {libClient | undefined} sdk
|
|
@@ -475,7 +480,7 @@ const databasesDelete = async ({databaseId,parseOutput = true, overrideForCli =
|
|
|
475
480
|
/**
|
|
476
481
|
* @param {DatabasesListCollectionsRequestParams} params
|
|
477
482
|
*/
|
|
478
|
-
const databasesListCollections = async ({databaseId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
483
|
+
const databasesListCollections = async ({databaseId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
479
484
|
let client = !sdk ? await sdkForProject() :
|
|
480
485
|
sdk;
|
|
481
486
|
let apiPath = '/databases/{databaseId}/collections'.replace('{databaseId}', databaseId);
|
|
@@ -486,6 +491,9 @@ const databasesListCollections = async ({databaseId,queries,search,parseOutput =
|
|
|
486
491
|
if (typeof search !== 'undefined') {
|
|
487
492
|
payload['search'] = search;
|
|
488
493
|
}
|
|
494
|
+
if (typeof total !== 'undefined') {
|
|
495
|
+
payload['total'] = total;
|
|
496
|
+
}
|
|
489
497
|
|
|
490
498
|
let response = undefined;
|
|
491
499
|
|
|
@@ -672,6 +680,7 @@ const databasesDeleteCollection = async ({databaseId,collectionId,parseOutput =
|
|
|
672
680
|
* @property {string} databaseId Database ID.
|
|
673
681
|
* @property {string} collectionId Collection ID.
|
|
674
682
|
* @property {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
|
|
683
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
675
684
|
* @property {boolean} overrideForCli
|
|
676
685
|
* @property {boolean} parseOutput
|
|
677
686
|
* @property {libClient | undefined} sdk
|
|
@@ -680,7 +689,7 @@ const databasesDeleteCollection = async ({databaseId,collectionId,parseOutput =
|
|
|
680
689
|
/**
|
|
681
690
|
* @param {DatabasesListAttributesRequestParams} params
|
|
682
691
|
*/
|
|
683
|
-
const databasesListAttributes = async ({databaseId,collectionId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
692
|
+
const databasesListAttributes = async ({databaseId,collectionId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
684
693
|
let client = !sdk ? await sdkForProject() :
|
|
685
694
|
sdk;
|
|
686
695
|
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
@@ -688,6 +697,9 @@ const databasesListAttributes = async ({databaseId,collectionId,queries,parseOut
|
|
|
688
697
|
if (typeof queries !== 'undefined') {
|
|
689
698
|
payload['queries'] = queries;
|
|
690
699
|
}
|
|
700
|
+
if (typeof total !== 'undefined') {
|
|
701
|
+
payload['total'] = total;
|
|
702
|
+
}
|
|
691
703
|
|
|
692
704
|
let response = undefined;
|
|
693
705
|
|
|
@@ -2009,6 +2021,7 @@ const databasesUpdateRelationshipAttribute = async ({databaseId,collectionId,key
|
|
|
2009
2021
|
* @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
2010
2022
|
* @property {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.
|
|
2011
2023
|
* @property {string} transactionId Transaction ID to read uncommitted changes within the transaction.
|
|
2024
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
2012
2025
|
* @property {boolean} overrideForCli
|
|
2013
2026
|
* @property {boolean} parseOutput
|
|
2014
2027
|
* @property {libClient | undefined} sdk
|
|
@@ -2017,7 +2030,7 @@ const databasesUpdateRelationshipAttribute = async ({databaseId,collectionId,key
|
|
|
2017
2030
|
/**
|
|
2018
2031
|
* @param {DatabasesListDocumentsRequestParams} params
|
|
2019
2032
|
*/
|
|
2020
|
-
const databasesListDocuments = async ({databaseId,collectionId,queries,transactionId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2033
|
+
const databasesListDocuments = async ({databaseId,collectionId,queries,transactionId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2021
2034
|
let client = !sdk ? await sdkForProject() :
|
|
2022
2035
|
sdk;
|
|
2023
2036
|
let apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
@@ -2028,6 +2041,9 @@ const databasesListDocuments = async ({databaseId,collectionId,queries,transacti
|
|
|
2028
2041
|
if (typeof transactionId !== 'undefined') {
|
|
2029
2042
|
payload['transactionId'] = transactionId;
|
|
2030
2043
|
}
|
|
2044
|
+
if (typeof total !== 'undefined') {
|
|
2045
|
+
payload['total'] = total;
|
|
2046
|
+
}
|
|
2031
2047
|
|
|
2032
2048
|
let response = undefined;
|
|
2033
2049
|
|
|
@@ -2556,6 +2572,7 @@ const databasesIncrementDocumentAttribute = async ({databaseId,collectionId,docu
|
|
|
2556
2572
|
* @property {string} databaseId Database ID.
|
|
2557
2573
|
* @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
2558
2574
|
* @property {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
|
|
2575
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
2559
2576
|
* @property {boolean} overrideForCli
|
|
2560
2577
|
* @property {boolean} parseOutput
|
|
2561
2578
|
* @property {libClient | undefined} sdk
|
|
@@ -2564,7 +2581,7 @@ const databasesIncrementDocumentAttribute = async ({databaseId,collectionId,docu
|
|
|
2564
2581
|
/**
|
|
2565
2582
|
* @param {DatabasesListIndexesRequestParams} params
|
|
2566
2583
|
*/
|
|
2567
|
-
const databasesListIndexes = async ({databaseId,collectionId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2584
|
+
const databasesListIndexes = async ({databaseId,collectionId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2568
2585
|
let client = !sdk ? await sdkForProject() :
|
|
2569
2586
|
sdk;
|
|
2570
2587
|
let apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
@@ -2572,6 +2589,9 @@ const databasesListIndexes = async ({databaseId,collectionId,queries,parseOutput
|
|
|
2572
2589
|
if (typeof queries !== 'undefined') {
|
|
2573
2590
|
payload['queries'] = queries;
|
|
2574
2591
|
}
|
|
2592
|
+
if (typeof total !== 'undefined') {
|
|
2593
|
+
payload['total'] = total;
|
|
2594
|
+
}
|
|
2575
2595
|
|
|
2576
2596
|
let response = undefined;
|
|
2577
2597
|
|
|
@@ -2845,6 +2865,7 @@ databases
|
|
|
2845
2865
|
.description(`[**DEPRECATED** - This command is deprecated. Please use 'tables-db list' instead] Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.`)
|
|
2846
2866
|
.option(`--queries [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`)
|
|
2847
2867
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2868
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2848
2869
|
.option(`--console`, `Get the resource console url`)
|
|
2849
2870
|
.action(actionRunner(databasesList))
|
|
2850
2871
|
|
|
@@ -2931,6 +2952,7 @@ databases
|
|
|
2931
2952
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2932
2953
|
.option(`--queries [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`)
|
|
2933
2954
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2955
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2934
2956
|
.option(`--console`, `Get the resource console url`)
|
|
2935
2957
|
.action(actionRunner(databasesListCollections))
|
|
2936
2958
|
|
|
@@ -2977,6 +2999,7 @@ databases
|
|
|
2977
2999
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2978
3000
|
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2979
3001
|
.option(`--queries [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`)
|
|
3002
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2980
3003
|
.option(`--console`, `Get the resource console url`)
|
|
2981
3004
|
.action(actionRunner(databasesListAttributes))
|
|
2982
3005
|
|
|
@@ -3300,6 +3323,7 @@ databases
|
|
|
3300
3323
|
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3301
3324
|
.option(`--queries [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.`)
|
|
3302
3325
|
.option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`)
|
|
3326
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
3303
3327
|
.option(`--console`, `Get the resource console url`)
|
|
3304
3328
|
.action(actionRunner(databasesListDocuments))
|
|
3305
3329
|
|
|
@@ -3432,6 +3456,7 @@ databases
|
|
|
3432
3456
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
3433
3457
|
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
3434
3458
|
.option(`--queries [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`)
|
|
3459
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
3435
3460
|
.option(`--console`, `Get the resource console url`)
|
|
3436
3461
|
.action(actionRunner(databasesListIndexes))
|
|
3437
3462
|
|
|
@@ -43,6 +43,7 @@ const functions = new Command("functions").description(commandDescriptions['func
|
|
|
43
43
|
* @typedef {Object} FunctionsListRequestParams
|
|
44
44
|
* @property {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, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId
|
|
45
45
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
46
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
46
47
|
* @property {boolean} overrideForCli
|
|
47
48
|
* @property {boolean} parseOutput
|
|
48
49
|
* @property {libClient | undefined} sdk
|
|
@@ -51,7 +52,7 @@ const functions = new Command("functions").description(commandDescriptions['func
|
|
|
51
52
|
/**
|
|
52
53
|
* @param {FunctionsListRequestParams} params
|
|
53
54
|
*/
|
|
54
|
-
const functionsList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
55
|
+
const functionsList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
55
56
|
let client = !sdk ? await sdkForProject() :
|
|
56
57
|
sdk;
|
|
57
58
|
let apiPath = '/functions';
|
|
@@ -62,6 +63,9 @@ const functionsList = async ({queries,search,parseOutput = true, overrideForCli
|
|
|
62
63
|
if (typeof search !== 'undefined') {
|
|
63
64
|
payload['search'] = search;
|
|
64
65
|
}
|
|
66
|
+
if (typeof total !== 'undefined') {
|
|
67
|
+
payload['total'] = total;
|
|
68
|
+
}
|
|
65
69
|
|
|
66
70
|
let response = undefined;
|
|
67
71
|
|
|
@@ -249,6 +253,7 @@ const functionsListSpecifications = async ({parseOutput = true, overrideForCli =
|
|
|
249
253
|
* @property {string[]} useCases List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.
|
|
250
254
|
* @property {number} limit Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
|
|
251
255
|
* @property {number} offset Offset the list of returned templates. Maximum offset is 5000.
|
|
256
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
252
257
|
* @property {boolean} overrideForCli
|
|
253
258
|
* @property {boolean} parseOutput
|
|
254
259
|
* @property {libClient | undefined} sdk
|
|
@@ -257,7 +262,7 @@ const functionsListSpecifications = async ({parseOutput = true, overrideForCli =
|
|
|
257
262
|
/**
|
|
258
263
|
* @param {FunctionsListTemplatesRequestParams} params
|
|
259
264
|
*/
|
|
260
|
-
const functionsListTemplates = async ({runtimes,useCases,limit,offset,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
265
|
+
const functionsListTemplates = async ({runtimes,useCases,limit,offset,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
261
266
|
let client = !sdk ? await sdkForProject() :
|
|
262
267
|
sdk;
|
|
263
268
|
let apiPath = '/functions/templates';
|
|
@@ -274,6 +279,9 @@ const functionsListTemplates = async ({runtimes,useCases,limit,offset,parseOutpu
|
|
|
274
279
|
if (typeof offset !== 'undefined') {
|
|
275
280
|
payload['offset'] = offset;
|
|
276
281
|
}
|
|
282
|
+
if (typeof total !== 'undefined') {
|
|
283
|
+
payload['total'] = total;
|
|
284
|
+
}
|
|
277
285
|
|
|
278
286
|
let response = undefined;
|
|
279
287
|
|
|
@@ -563,6 +571,7 @@ const functionsUpdateFunctionDeployment = async ({functionId,deploymentId,parseO
|
|
|
563
571
|
* @property {string} functionId Function ID.
|
|
564
572
|
* @property {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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
|
|
565
573
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
574
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
566
575
|
* @property {boolean} overrideForCli
|
|
567
576
|
* @property {boolean} parseOutput
|
|
568
577
|
* @property {libClient | undefined} sdk
|
|
@@ -571,7 +580,7 @@ const functionsUpdateFunctionDeployment = async ({functionId,deploymentId,parseO
|
|
|
571
580
|
/**
|
|
572
581
|
* @param {FunctionsListDeploymentsRequestParams} params
|
|
573
582
|
*/
|
|
574
|
-
const functionsListDeployments = async ({functionId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
583
|
+
const functionsListDeployments = async ({functionId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
575
584
|
let client = !sdk ? await sdkForProject() :
|
|
576
585
|
sdk;
|
|
577
586
|
let apiPath = '/functions/{functionId}/deployments'.replace('{functionId}', functionId);
|
|
@@ -582,6 +591,9 @@ const functionsListDeployments = async ({functionId,queries,search,parseOutput =
|
|
|
582
591
|
if (typeof search !== 'undefined') {
|
|
583
592
|
payload['search'] = search;
|
|
584
593
|
}
|
|
594
|
+
if (typeof total !== 'undefined') {
|
|
595
|
+
payload['total'] = total;
|
|
596
|
+
}
|
|
585
597
|
|
|
586
598
|
let response = undefined;
|
|
587
599
|
|
|
@@ -1043,6 +1055,7 @@ const functionsUpdateDeploymentStatus = async ({functionId,deploymentId,parseOut
|
|
|
1043
1055
|
* @typedef {Object} FunctionsListExecutionsRequestParams
|
|
1044
1056
|
* @property {string} functionId Function ID.
|
|
1045
1057
|
* @property {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
|
|
1058
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
1046
1059
|
* @property {boolean} overrideForCli
|
|
1047
1060
|
* @property {boolean} parseOutput
|
|
1048
1061
|
* @property {libClient | undefined} sdk
|
|
@@ -1051,7 +1064,7 @@ const functionsUpdateDeploymentStatus = async ({functionId,deploymentId,parseOut
|
|
|
1051
1064
|
/**
|
|
1052
1065
|
* @param {FunctionsListExecutionsRequestParams} params
|
|
1053
1066
|
*/
|
|
1054
|
-
const functionsListExecutions = async ({functionId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
1067
|
+
const functionsListExecutions = async ({functionId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
1055
1068
|
let client = !sdk ? await sdkForProject() :
|
|
1056
1069
|
sdk;
|
|
1057
1070
|
let apiPath = '/functions/{functionId}/executions'.replace('{functionId}', functionId);
|
|
@@ -1059,6 +1072,9 @@ const functionsListExecutions = async ({functionId,queries,parseOutput = true, o
|
|
|
1059
1072
|
if (typeof queries !== 'undefined') {
|
|
1060
1073
|
payload['queries'] = queries;
|
|
1061
1074
|
}
|
|
1075
|
+
if (typeof total !== 'undefined') {
|
|
1076
|
+
payload['total'] = total;
|
|
1077
|
+
}
|
|
1062
1078
|
|
|
1063
1079
|
let response = undefined;
|
|
1064
1080
|
|
|
@@ -1408,6 +1424,7 @@ functions
|
|
|
1408
1424
|
.description(`Get a list of all the project's functions. You can use the query params to filter your results.`)
|
|
1409
1425
|
.option(`--queries [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, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId`)
|
|
1410
1426
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
1427
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
1411
1428
|
.option(`--console`, `Get the resource console url`)
|
|
1412
1429
|
.action(actionRunner(functionsList))
|
|
1413
1430
|
|
|
@@ -1452,6 +1469,7 @@ functions
|
|
|
1452
1469
|
.option(`--use-cases [use-cases...]`, `List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.`)
|
|
1453
1470
|
.option(`--limit <limit>`, `Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.`, parseInteger)
|
|
1454
1471
|
.option(`--offset <offset>`, `Offset the list of returned templates. Maximum offset is 5000.`, parseInteger)
|
|
1472
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
1455
1473
|
.option(`--console`, `Get the resource console url`)
|
|
1456
1474
|
.action(actionRunner(functionsListTemplates))
|
|
1457
1475
|
|
|
@@ -1518,6 +1536,7 @@ functions
|
|
|
1518
1536
|
.requiredOption(`--function-id <function-id>`, `Function ID.`)
|
|
1519
1537
|
.option(`--queries [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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type`)
|
|
1520
1538
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
1539
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
1521
1540
|
.option(`--console`, `Get the resource console url`)
|
|
1522
1541
|
.action(actionRunner(functionsListDeployments))
|
|
1523
1542
|
|
|
@@ -1596,6 +1615,7 @@ functions
|
|
|
1596
1615
|
.description(`Get a list of all the current user function execution logs. You can use the query params to filter your results.`)
|
|
1597
1616
|
.requiredOption(`--function-id <function-id>`, `Function ID.`)
|
|
1598
1617
|
.option(`--queries [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`)
|
|
1618
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
1599
1619
|
.option(`--console`, `Get the resource console url`)
|
|
1600
1620
|
.action(actionRunner(functionsListExecutions))
|
|
1601
1621
|
|