appwrite-cli 6.2.0 → 6.2.3

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/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
- 6.2.0
32
+ 6.2.3
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
- 6.2.0
63
+ 6.2.3
64
64
  ```
65
65
 
66
66
  ## Getting Started
@@ -124,7 +124,7 @@ My Awesome Function
124
124
  You can now deploy this function using
125
125
 
126
126
  ```sh
127
- $ appwrite deploy function
127
+ $ appwrite push function
128
128
 
129
129
  ? Which functions would you like to deploy? My Awesome Function (61d1a4c81dfcd95bc834)
130
130
  ℹ Info Deploying function My Awesome Function ( 61d1a4c81dfcd95bc834 )
@@ -138,7 +138,7 @@ Your function has now been deployed on your Appwrite server! As soon as the buil
138
138
  Similarly, you can deploy all your collections to your Appwrite server using
139
139
 
140
140
  ```sh
141
- appwrite deploy collections
141
+ appwrite push collections
142
142
  ```
143
143
 
144
144
  > ### Note
@@ -163,7 +163,7 @@ $ appwrite users list
163
163
 
164
164
  To create a document you can use the following command
165
165
  ```sh
166
- $ appwrite database createDocument --collectionId <ID> --documentId 'unique()' --data '{ "Name": "Iron Man" }' --permissions 'read("any")' 'read("team:abc")'
166
+ $ appwrite databases create-document --database-id <DATABASE_ID> --collection-id <COLLECTION_ID> --document-id "unique()" --data '{"name": "Walter O Brein"}' --permissions 'read("any")' 'read("team:abc")'
167
167
  ```
168
168
 
169
169
  ### Some Gotchas
@@ -207,6 +207,7 @@ The Appwrite CLI can also work in a CI environment. The initialisation of the CL
207
207
  appwrite client --endpoint http://localhost/v1 --projectId <PROJECT_ID> --key <API KEY>
208
208
  ```
209
209
 
210
+
210
211
  ## Contribution
211
212
 
212
213
  This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
@@ -3,7 +3,7 @@ appwrite databases updateFloatAttribute \
3
3
  --collectionId <COLLECTION_ID> \
4
4
  --key '' \
5
5
  --required false \
6
- --min null \
7
- --max null \
8
6
  --default null \
9
7
 
8
+
9
+
@@ -3,7 +3,7 @@ appwrite databases updateIntegerAttribute \
3
3
  --collectionId <COLLECTION_ID> \
4
4
  --key '' \
5
5
  --required false \
6
- --min null \
7
- --max null \
8
6
  --default null \
9
7
 
8
+
9
+
@@ -0,0 +1,2 @@
1
+ appwrite health getQueueStatsResources \
2
+
@@ -0,0 +1,2 @@
1
+ appwrite health getQueueStatsUsageDump \
2
+
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/6.2.0/appwrite-cli-win-x64.exe"
17
- $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.0/appwrite-cli-win-arm64.exe"
16
+ $GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.3/appwrite-cli-win-x64.exe"
17
+ $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.3/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="6.2.0"
100
+ GITHUB_LATEST_VERSION="6.2.3"
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': '6.2.0',
20
- 'user-agent' : `AppwriteCLI/6.2.0 (${os.type()} ${os.version()}; ${os.arch()})`,
19
+ 'x-sdk-version': '6.2.3',
20
+ 'user-agent' : `AppwriteCLI/6.2.3 (${os.type()} ${os.version()}; ${os.arch()})`,
21
21
  'X-Appwrite-Response-Format' : '1.6.0',
22
22
  };
23
23
  }
@@ -129,8 +129,11 @@ class Client {
129
129
  * @return this
130
130
  */
131
131
  setEndpoint(endpoint) {
132
- this.endpoint = endpoint;
132
+ if (!endpoint.startsWith('http://') && !endpoint.startsWith('https://')) {
133
+ throw new AppwriteException('Invalid endpoint URL: ' + endpoint);
134
+ }
133
135
 
136
+ this.endpoint = endpoint;
134
137
  return this;
135
138
  }
136
139
 
@@ -208,7 +211,7 @@ class Client {
208
211
  globalConfig.setCurrentSession('');
209
212
  globalConfig.removeSession(current);
210
213
  }
211
- throw new AppwriteException(json.message, json.code, json.type, json);
214
+ throw new AppwriteException(json.message, json.code, json.type, text);
212
215
  }
213
216
 
214
217
  if (responseType === "arraybuffer") {
@@ -1954,7 +1954,7 @@ account
1954
1954
 
1955
1955
  account
1956
1956
  .command(`create-push-target`)
1957
- .description(``)
1957
+ .description(`Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.`)
1958
1958
  .requiredOption(`--target-id <target-id>`, `Target ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
1959
1959
  .requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
1960
1960
  .option(`--provider-id <provider-id>`, `Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.`)
@@ -1962,14 +1962,14 @@ account
1962
1962
 
1963
1963
  account
1964
1964
  .command(`update-push-target`)
1965
- .description(``)
1965
+ .description(`Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.`)
1966
1966
  .requiredOption(`--target-id <target-id>`, `Target ID.`)
1967
1967
  .requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
1968
1968
  .action(actionRunner(accountUpdatePushTarget))
1969
1969
 
1970
1970
  account
1971
1971
  .command(`delete-push-target`)
1972
- .description(``)
1972
+ .description(`Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.`)
1973
1973
  .requiredOption(`--target-id <target-id>`, `Target ID.`)
1974
1974
  .action(actionRunner(accountDeletePushTarget))
1975
1975
 
@@ -75,7 +75,7 @@ const assistantChat = async ({prompt,parseOutput = true, overrideForCli = false,
75
75
 
76
76
  assistant
77
77
  .command(`chat`)
78
- .description(``)
78
+ .description(`Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. `)
79
79
  .requiredOption(`--prompt <prompt>`, `Prompt. A string containing questions asked to the AI assistant.`)
80
80
  .action(actionRunner(assistantChat))
81
81
 
@@ -96,7 +96,7 @@ const avatarsGetBrowser = async ({code,width,height,quality,parseOutput = true,
96
96
 
97
97
  /**
98
98
  * @typedef {Object} AvatarsGetCreditCardRequestParams
99
- * @property {CreditCard} code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.
99
+ * @property {CreditCard} code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.
100
100
  * @property {number} width Image width. Pass an integer between 0 to 2000. Defaults to 100.
101
101
  * @property {number} height Image height. Pass an integer between 0 to 2000. Defaults to 100.
102
102
  * @property {number} quality Image quality. Pass an integer between 0 to 100. Defaults to 100.
@@ -433,7 +433,7 @@ avatars
433
433
  avatars
434
434
  .command(`get-credit-card`)
435
435
  .description(`The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. `)
436
- .requiredOption(`--code <code>`, `Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.`)
436
+ .requiredOption(`--code <code>`, `Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.`)
437
437
  .option(`--width <width>`, `Image width. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
438
438
  .option(`--height <height>`, `Image height. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
439
439
  .option(`--quality <quality>`, `Image quality. Pass an integer between 0 to 100. Defaults to 100.`, parseInteger)
@@ -958,9 +958,9 @@ const databasesCreateFloatAttribute = async ({databaseId,collectionId,key,requir
958
958
  * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
959
959
  * @property {string} key Attribute Key.
960
960
  * @property {boolean} required Is attribute required?
961
+ * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
961
962
  * @property {number} min Minimum value to enforce on new documents
962
963
  * @property {number} max Maximum value to enforce on new documents
963
- * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
964
964
  * @property {string} newKey New attribute key.
965
965
  * @property {boolean} overrideForCli
966
966
  * @property {boolean} parseOutput
@@ -970,7 +970,7 @@ const databasesCreateFloatAttribute = async ({databaseId,collectionId,key,requir
970
970
  /**
971
971
  * @param {DatabasesUpdateFloatAttributeRequestParams} params
972
972
  */
973
- const databasesUpdateFloatAttribute = async ({databaseId,collectionId,key,required,min,max,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
973
+ const databasesUpdateFloatAttribute = async ({databaseId,collectionId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
974
974
  let client = !sdk ? await sdkForProject() :
975
975
  sdk;
976
976
  let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
@@ -1067,9 +1067,9 @@ const databasesCreateIntegerAttribute = async ({databaseId,collectionId,key,requ
1067
1067
  * @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1068
1068
  * @property {string} key Attribute Key.
1069
1069
  * @property {boolean} required Is attribute required?
1070
+ * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
1070
1071
  * @property {number} min Minimum value to enforce on new documents
1071
1072
  * @property {number} max Maximum value to enforce on new documents
1072
- * @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
1073
1073
  * @property {string} newKey New attribute key.
1074
1074
  * @property {boolean} overrideForCli
1075
1075
  * @property {boolean} parseOutput
@@ -1079,7 +1079,7 @@ const databasesCreateIntegerAttribute = async ({databaseId,collectionId,key,requ
1079
1079
  /**
1080
1080
  * @param {DatabasesUpdateIntegerAttributeRequestParams} params
1081
1081
  */
1082
- const databasesUpdateIntegerAttribute = async ({databaseId,collectionId,key,required,min,max,xdefault,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1082
+ const databasesUpdateIntegerAttribute = async ({databaseId,collectionId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1083
1083
  let client = !sdk ? await sdkForProject() :
1084
1084
  sdk;
1085
1085
  let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
@@ -2126,7 +2126,7 @@ databases
2126
2126
 
2127
2127
  databases
2128
2128
  .command(`get-usage`)
2129
- .description(``)
2129
+ .description(`Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
2130
2130
  .option(`--range <range>`, `'Date range.`)
2131
2131
  .action(actionRunner(databasesGetUsage))
2132
2132
 
@@ -2316,9 +2316,9 @@ databases
2316
2316
  .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).`)
2317
2317
  .requiredOption(`--key <key>`, `Attribute Key.`)
2318
2318
  .requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
2319
- .requiredOption(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
2320
- .requiredOption(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
2321
2319
  .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger)
2320
+ .option(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
2321
+ .option(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
2322
2322
  .option(`--new-key <new-key>`, `New attribute key.`)
2323
2323
  .action(actionRunner(databasesUpdateFloatAttribute))
2324
2324
 
@@ -2342,9 +2342,9 @@ databases
2342
2342
  .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).`)
2343
2343
  .requiredOption(`--key <key>`, `Attribute Key.`)
2344
2344
  .requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
2345
- .requiredOption(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
2346
- .requiredOption(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
2347
2345
  .option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger)
2346
+ .option(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
2347
+ .option(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
2348
2348
  .option(`--new-key <new-key>`, `New attribute key.`)
2349
2349
  .action(actionRunner(databasesUpdateIntegerAttribute))
2350
2350
 
@@ -2467,7 +2467,7 @@ databases
2467
2467
 
2468
2468
  databases
2469
2469
  .command(`create-document`)
2470
- .description(`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.`)
2470
+ .description(`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. `)
2471
2471
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2472
2472
  .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). Make sure to define attributes before creating documents.`)
2473
2473
  .requiredOption(`--document-id <document-id>`, `Document ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
@@ -2558,7 +2558,7 @@ databases
2558
2558
 
2559
2559
  databases
2560
2560
  .command(`get-collection-usage`)
2561
- .description(``)
2561
+ .description(`Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
2562
2562
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2563
2563
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2564
2564
  .option(`--range <range>`, `Date range.`)
@@ -2573,7 +2573,7 @@ databases
2573
2573
 
2574
2574
  databases
2575
2575
  .command(`get-database-usage`)
2576
- .description(``)
2576
+ .description(`Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
2577
2577
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2578
2578
  .option(`--range <range>`, `'Date range.`)
2579
2579
  .option(`--console`, `Get the resource console url`)
@@ -1420,7 +1420,7 @@ functions
1420
1420
 
1421
1421
  functions
1422
1422
  .command(`get-usage`)
1423
- .description(``)
1423
+ .description(`Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.`)
1424
1424
  .option(`--range <range>`, `Date range.`)
1425
1425
  .action(actionRunner(functionsGetUsage))
1426
1426
 
@@ -1503,7 +1503,7 @@ functions
1503
1503
 
1504
1504
  functions
1505
1505
  .command(`create-build`)
1506
- .description(``)
1506
+ .description(`Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.`)
1507
1507
  .requiredOption(`--function-id <function-id>`, `Function ID.`)
1508
1508
  .requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
1509
1509
  .option(`--build-id <build-id>`, `Build unique ID.`)
@@ -1511,7 +1511,7 @@ functions
1511
1511
 
1512
1512
  functions
1513
1513
  .command(`update-deployment-build`)
1514
- .description(``)
1514
+ .description(`Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.`)
1515
1515
  .requiredOption(`--function-id <function-id>`, `Function ID.`)
1516
1516
  .requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
1517
1517
  .action(actionRunner(functionsUpdateDeploymentBuild))
@@ -1563,7 +1563,7 @@ functions
1563
1563
 
1564
1564
  functions
1565
1565
  .command(`get-function-usage`)
1566
- .description(``)
1566
+ .description(`Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.`)
1567
1567
  .requiredOption(`--function-id <function-id>`, `Function ID.`)
1568
1568
  .option(`--range <range>`, `Date range.`)
1569
1569
  .option(`--console`, `Get the resource console url`)
@@ -223,36 +223,6 @@ const healthGetPubSub = async ({parseOutput = true, overrideForCli = false, sdk
223
223
 
224
224
  }
225
225
 
226
- /**
227
- * @typedef {Object} HealthGetQueueRequestParams
228
- * @property {boolean} overrideForCli
229
- * @property {boolean} parseOutput
230
- * @property {libClient | undefined} sdk
231
- */
232
-
233
- /**
234
- * @param {HealthGetQueueRequestParams} params
235
- */
236
- const healthGetQueue = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
237
- let client = !sdk ? await sdkForProject() :
238
- sdk;
239
- let apiPath = '/health/queue';
240
- let payload = {};
241
-
242
- let response = undefined;
243
-
244
- response = await client.call('get', apiPath, {
245
- 'content-type': 'application/json',
246
- }, payload);
247
-
248
- if (parseOutput) {
249
- parse(response)
250
- }
251
-
252
- return response;
253
-
254
- }
255
-
256
226
  /**
257
227
  * @typedef {Object} HealthGetQueueBuildsRequestParams
258
228
  * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
@@ -598,6 +568,40 @@ const healthGetQueueMigrations = async ({threshold,parseOutput = true, overrideF
598
568
 
599
569
  }
600
570
 
571
+ /**
572
+ * @typedef {Object} HealthGetQueueStatsResourcesRequestParams
573
+ * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
574
+ * @property {boolean} overrideForCli
575
+ * @property {boolean} parseOutput
576
+ * @property {libClient | undefined} sdk
577
+ */
578
+
579
+ /**
580
+ * @param {HealthGetQueueStatsResourcesRequestParams} params
581
+ */
582
+ const healthGetQueueStatsResources = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
583
+ let client = !sdk ? await sdkForProject() :
584
+ sdk;
585
+ let apiPath = '/health/queue/stats-resources';
586
+ let payload = {};
587
+ if (typeof threshold !== 'undefined') {
588
+ payload['threshold'] = threshold;
589
+ }
590
+
591
+ let response = undefined;
592
+
593
+ response = await client.call('get', apiPath, {
594
+ 'content-type': 'application/json',
595
+ }, payload);
596
+
597
+ if (parseOutput) {
598
+ parse(response)
599
+ }
600
+
601
+ return response;
602
+
603
+ }
604
+
601
605
  /**
602
606
  * @typedef {Object} HealthGetQueueUsageRequestParams
603
607
  * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
@@ -612,7 +616,7 @@ const healthGetQueueMigrations = async ({threshold,parseOutput = true, overrideF
612
616
  const healthGetQueueUsage = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
613
617
  let client = !sdk ? await sdkForProject() :
614
618
  sdk;
615
- let apiPath = '/health/queue/usage';
619
+ let apiPath = '/health/queue/stats-usage';
616
620
  let payload = {};
617
621
  if (typeof threshold !== 'undefined') {
618
622
  payload['threshold'] = threshold;
@@ -633,7 +637,7 @@ const healthGetQueueUsage = async ({threshold,parseOutput = true, overrideForCli
633
637
  }
634
638
 
635
639
  /**
636
- * @typedef {Object} HealthGetQueueUsageDumpRequestParams
640
+ * @typedef {Object} HealthGetQueueStatsUsageDumpRequestParams
637
641
  * @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
638
642
  * @property {boolean} overrideForCli
639
643
  * @property {boolean} parseOutput
@@ -641,12 +645,12 @@ const healthGetQueueUsage = async ({threshold,parseOutput = true, overrideForCli
641
645
  */
642
646
 
643
647
  /**
644
- * @param {HealthGetQueueUsageDumpRequestParams} params
648
+ * @param {HealthGetQueueStatsUsageDumpRequestParams} params
645
649
  */
646
- const healthGetQueueUsageDump = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
650
+ const healthGetQueueStatsUsageDump = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
647
651
  let client = !sdk ? await sdkForProject() :
648
652
  sdk;
649
- let apiPath = '/health/queue/usage-dump';
653
+ let apiPath = '/health/queue/stats-usage-dump';
650
654
  let payload = {};
651
655
  if (typeof threshold !== 'undefined') {
652
656
  payload['threshold'] = threshold;
@@ -821,11 +825,6 @@ health
821
825
  .description(`Check the Appwrite pub-sub servers are up and connection is successful.`)
822
826
  .action(actionRunner(healthGetPubSub))
823
827
 
824
- health
825
- .command(`get-queue`)
826
- .description(`Check the Appwrite queue messaging servers are up and connection is successful.`)
827
- .action(actionRunner(healthGetQueue))
828
-
829
828
  health
830
829
  .command(`get-queue-builds`)
831
830
  .description(`Get the number of builds that are waiting to be processed in the Appwrite internal queue server.`)
@@ -888,6 +887,12 @@ health
888
887
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
889
888
  .action(actionRunner(healthGetQueueMigrations))
890
889
 
890
+ health
891
+ .command(`get-queue-stats-resources`)
892
+ .description(`Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.`)
893
+ .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
894
+ .action(actionRunner(healthGetQueueStatsResources))
895
+
891
896
  health
892
897
  .command(`get-queue-usage`)
893
898
  .description(`Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.`)
@@ -895,10 +900,10 @@ health
895
900
  .action(actionRunner(healthGetQueueUsage))
896
901
 
897
902
  health
898
- .command(`get-queue-usage-dump`)
903
+ .command(`get-queue-stats-usage-dump`)
899
904
  .description(`Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.`)
900
905
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
901
- .action(actionRunner(healthGetQueueUsageDump))
906
+ .action(actionRunner(healthGetQueueStatsUsageDump))
902
907
 
903
908
  health
904
909
  .command(`get-queue-webhooks`)
@@ -929,7 +934,6 @@ module.exports = {
929
934
  healthGetCertificate,
930
935
  healthGetDB,
931
936
  healthGetPubSub,
932
- healthGetQueue,
933
937
  healthGetQueueBuilds,
934
938
  healthGetQueueCertificates,
935
939
  healthGetQueueDatabases,
@@ -940,8 +944,9 @@ module.exports = {
940
944
  healthGetQueueMails,
941
945
  healthGetQueueMessaging,
942
946
  healthGetQueueMigrations,
947
+ healthGetQueueStatsResources,
943
948
  healthGetQueueUsage,
944
- healthGetQueueUsageDump,
949
+ healthGetQueueStatsUsageDump,
945
950
  healthGetQueueWebhooks,
946
951
  healthGetStorage,
947
952
  healthGetStorageLocal,
@@ -2459,7 +2459,7 @@ messaging
2459
2459
 
2460
2460
  messaging
2461
2461
  .command(`update-email`)
2462
- .description(`Update an email message by its unique ID. `)
2462
+ .description(`Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. `)
2463
2463
  .requiredOption(`--message-id <message-id>`, `Message ID.`)
2464
2464
  .option(`--topics [topics...]`, `List of Topic IDs.`)
2465
2465
  .option(`--users [users...]`, `List of User IDs.`)
@@ -2500,7 +2500,7 @@ messaging
2500
2500
 
2501
2501
  messaging
2502
2502
  .command(`update-push`)
2503
- .description(`Update a push notification by its unique ID. `)
2503
+ .description(`Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. `)
2504
2504
  .requiredOption(`--message-id <message-id>`, `Message ID.`)
2505
2505
  .option(`--topics [topics...]`, `List of Topic IDs.`)
2506
2506
  .option(`--users [users...]`, `List of User IDs.`)
@@ -2536,7 +2536,7 @@ messaging
2536
2536
 
2537
2537
  messaging
2538
2538
  .command(`update-sms`)
2539
- .description(`Update an email message by its unique ID. `)
2539
+ .description(`Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. `)
2540
2540
  .requiredOption(`--message-id <message-id>`, `Message ID.`)
2541
2541
  .option(`--topics [topics...]`, `List of Topic IDs.`)
2542
2542
  .option(`--users [users...]`, `List of User IDs.`)
@@ -80,9 +80,9 @@ const migrationsList = async ({queries,search,parseOutput = true, overrideForCli
80
80
  /**
81
81
  * @typedef {Object} MigrationsCreateAppwriteMigrationRequestParams
82
82
  * @property {string[]} resources List of resources to migrate
83
- * @property {string} endpoint Source&#039;s Appwrite Endpoint
84
- * @property {string} projectId Source&#039;s Project ID
85
- * @property {string} apiKey Source&#039;s API Key
83
+ * @property {string} endpoint Source Appwrite endpoint
84
+ * @property {string} projectId Source Project ID
85
+ * @property {string} apiKey Source API Key
86
86
  * @property {boolean} overrideForCli
87
87
  * @property {boolean} parseOutput
88
88
  * @property {libClient | undefined} sdk
@@ -584,23 +584,23 @@ const migrationsDelete = async ({migrationId,parseOutput = true, overrideForCli
584
584
 
585
585
  migrations
586
586
  .command(`list`)
587
- .description(``)
587
+ .description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`)
588
588
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors`)
589
589
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
590
590
  .action(actionRunner(migrationsList))
591
591
 
592
592
  migrations
593
593
  .command(`create-appwrite-migration`)
594
- .description(``)
594
+ .description(`Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. `)
595
595
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
596
- .requiredOption(`--endpoint <endpoint>`, `Source's Appwrite Endpoint`)
597
- .requiredOption(`--project-id <project-id>`, `Source's Project ID`)
598
- .requiredOption(`--api-key <api-key>`, `Source's API Key`)
596
+ .requiredOption(`--endpoint <endpoint>`, `Source Appwrite endpoint`)
597
+ .requiredOption(`--project-id <project-id>`, `Source Project ID`)
598
+ .requiredOption(`--api-key <api-key>`, `Source API Key`)
599
599
  .action(actionRunner(migrationsCreateAppwriteMigration))
600
600
 
601
601
  migrations
602
602
  .command(`get-appwrite-report`)
603
- .description(``)
603
+ .description(`Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`)
604
604
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
605
605
  .requiredOption(`--endpoint <endpoint>`, `Source's Appwrite Endpoint`)
606
606
  .requiredOption(`--project-id <project-id>`, `Source's Project ID`)
@@ -609,21 +609,21 @@ migrations
609
609
 
610
610
  migrations
611
611
  .command(`create-firebase-migration`)
612
- .description(``)
612
+ .description(`Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. `)
613
613
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
614
614
  .requiredOption(`--service-account <service-account>`, `JSON of the Firebase service account credentials`)
615
615
  .action(actionRunner(migrationsCreateFirebaseMigration))
616
616
 
617
617
  migrations
618
618
  .command(`get-firebase-report`)
619
- .description(``)
619
+ .description(`Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`)
620
620
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
621
621
  .requiredOption(`--service-account <service-account>`, `JSON of the Firebase service account credentials`)
622
622
  .action(actionRunner(migrationsGetFirebaseReport))
623
623
 
624
624
  migrations
625
625
  .command(`create-n-host-migration`)
626
- .description(``)
626
+ .description(`Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. `)
627
627
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
628
628
  .requiredOption(`--subdomain <subdomain>`, `Source's Subdomain`)
629
629
  .requiredOption(`--region <region>`, `Source's Region`)
@@ -636,7 +636,7 @@ migrations
636
636
 
637
637
  migrations
638
638
  .command(`get-n-host-report`)
639
- .description(``)
639
+ .description(`Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `)
640
640
  .requiredOption(`--resources [resources...]`, `List of resources to migrate.`)
641
641
  .requiredOption(`--subdomain <subdomain>`, `Source's Subdomain.`)
642
642
  .requiredOption(`--region <region>`, `Source's Region.`)
@@ -649,7 +649,7 @@ migrations
649
649
 
650
650
  migrations
651
651
  .command(`create-supabase-migration`)
652
- .description(``)
652
+ .description(`Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. `)
653
653
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
654
654
  .requiredOption(`--endpoint <endpoint>`, `Source's Supabase Endpoint`)
655
655
  .requiredOption(`--api-key <api-key>`, `Source's API Key`)
@@ -661,7 +661,7 @@ migrations
661
661
 
662
662
  migrations
663
663
  .command(`get-supabase-report`)
664
- .description(``)
664
+ .description(`Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `)
665
665
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
666
666
  .requiredOption(`--endpoint <endpoint>`, `Source's Supabase Endpoint.`)
667
667
  .requiredOption(`--api-key <api-key>`, `Source's API Key.`)
@@ -673,19 +673,19 @@ migrations
673
673
 
674
674
  migrations
675
675
  .command(`get`)
676
- .description(``)
676
+ .description(`Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. `)
677
677
  .requiredOption(`--migration-id <migration-id>`, `Migration unique ID.`)
678
678
  .action(actionRunner(migrationsGet))
679
679
 
680
680
  migrations
681
681
  .command(`retry`)
682
- .description(``)
682
+ .description(`Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.`)
683
683
  .requiredOption(`--migration-id <migration-id>`, `Migration unique ID.`)
684
684
  .action(actionRunner(migrationsRetry))
685
685
 
686
686
  migrations
687
687
  .command(`delete`)
688
- .description(``)
688
+ .description(`Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. `)
689
689
  .requiredOption(`--migration-id <migration-id>`, `Migration ID.`)
690
690
  .action(actionRunner(migrationsDelete))
691
691