appwrite-cli 11.1.1 → 12.0.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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # Change Log
2
2
 
3
+ ## 12.0.1
4
+
5
+ Fix type generation for `point`, `lineString` and `polygon` columns
6
+
7
+ ## 12.0.0
8
+
9
+ * Change `create-deployment-template`'s `version` parameter to `type` and `reference`. eg. usage - `create-deployment-template --type tag --reference 1.0.0`
10
+ * Remove `bucket-id` parameter from `create-csv-export` command
11
+ * Allow enabling or disabling of image `transformations` in a bucket
12
+ * Fix type generation for `point`, `lineString` and `polygon` columns
13
+
3
14
  ## 11.1.1
4
15
 
5
16
  * 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.
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.1.1
32
+ 12.0.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.1.1
63
+ 12.0.1
64
64
  ```
65
65
 
66
66
  ## Getting Started
@@ -3,4 +3,5 @@ appwrite functions create-template-deployment \
3
3
  --repository <REPOSITORY> \
4
4
  --owner <OWNER> \
5
5
  --root-directory <ROOT_DIRECTORY> \
6
- --version <VERSION>
6
+ --type commit \
7
+ --reference <REFERENCE>
@@ -1,4 +1,3 @@
1
1
  appwrite migrations create-csv-export \
2
2
  --resource-id <ID1:ID2> \
3
- --bucket-id <BUCKET_ID> \
4
3
  --filename <FILENAME>
@@ -3,4 +3,5 @@ appwrite sites create-template-deployment \
3
3
  --repository <REPOSITORY> \
4
4
  --owner <OWNER> \
5
5
  --root-directory <ROOT_DIRECTORY> \
6
- --version <VERSION>
6
+ --type branch \
7
+ --reference <REFERENCE>
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.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"
16
+ $GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.1/appwrite-cli-win-x64.exe"
17
+ $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.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.1.1"
100
+ GITHUB_LATEST_VERSION="12.0.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.1.1',
20
- 'user-agent' : `AppwriteCLI/11.1.1 (${os.type()} ${os.version()}; ${os.arch()})`,
19
+ 'x-sdk-version': '12.0.1',
20
+ 'user-agent' : `AppwriteCLI/12.0.1 (${os.type()} ${os.version()}; ${os.arch()})`,
21
21
  'X-Appwrite-Response-Format' : '1.8.0',
22
22
  };
23
23
  }
@@ -454,7 +454,7 @@ const accountDeleteMFAAuthenticator = async ({type,parseOutput = true, overrideF
454
454
  const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
455
455
  let client = !sdk ? await sdkForProject() :
456
456
  sdk;
457
- let apiPath = '/account/mfa/challenge';
457
+ let apiPath = '/account/mfa/challenges';
458
458
  let payload = {};
459
459
  if (typeof factor !== 'undefined') {
460
460
  payload['factor'] = factor;
@@ -488,7 +488,7 @@ const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideFor
488
488
  const accountUpdateMFAChallenge = async ({challengeId,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
489
489
  let client = !sdk ? await sdkForProject() :
490
490
  sdk;
491
- let apiPath = '/account/mfa/challenge';
491
+ let apiPath = '/account/mfa/challenges';
492
492
  let payload = {};
493
493
  if (typeof challengeId !== 'undefined') {
494
494
  payload['challengeId'] = challengeId;
@@ -819,7 +819,8 @@ const functionsCreateDuplicateDeployment = async ({functionId,deploymentId,build
819
819
  * @property {string} repository Repository name of the template.
820
820
  * @property {string} owner The name of the owner of the template.
821
821
  * @property {string} rootDirectory Path to function code in the template repo.
822
- * @property {string} version Version (tag) for the repo linked to the function template.
822
+ * @property {TemplateReferenceType} type Type for the reference provided. Can be commit, branch, or tag
823
+ * @property {string} reference Reference value, can be a commit hash, branch name, or release tag
823
824
  * @property {boolean} activate Automatically activate the deployment when it is finished building.
824
825
  * @property {boolean} overrideForCli
825
826
  * @property {boolean} parseOutput
@@ -829,7 +830,7 @@ const functionsCreateDuplicateDeployment = async ({functionId,deploymentId,build
829
830
  /**
830
831
  * @param {FunctionsCreateTemplateDeploymentRequestParams} params
831
832
  */
832
- const functionsCreateTemplateDeployment = async ({functionId,repository,owner,rootDirectory,version,activate,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
833
+ const functionsCreateTemplateDeployment = async ({functionId,repository,owner,rootDirectory,type,reference,activate,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
833
834
  let client = !sdk ? await sdkForProject() :
834
835
  sdk;
835
836
  let apiPath = '/functions/{functionId}/deployments/template'.replace('{functionId}', functionId);
@@ -843,8 +844,11 @@ const functionsCreateTemplateDeployment = async ({functionId,repository,owner,ro
843
844
  if (typeof rootDirectory !== 'undefined') {
844
845
  payload['rootDirectory'] = rootDirectory;
845
846
  }
846
- if (typeof version !== 'undefined') {
847
- payload['version'] = version;
847
+ if (typeof type !== 'undefined') {
848
+ payload['type'] = type;
849
+ }
850
+ if (typeof reference !== 'undefined') {
851
+ payload['reference'] = reference;
848
852
  }
849
853
  if (typeof activate !== 'undefined') {
850
854
  payload['activate'] = activate;
@@ -866,7 +870,7 @@ const functionsCreateTemplateDeployment = async ({functionId,repository,owner,ro
866
870
  /**
867
871
  * @typedef {Object} FunctionsCreateVcsDeploymentRequestParams
868
872
  * @property {string} functionId Function ID.
869
- * @property {VCSDeploymentType} type Type of reference passed. Allowed values are: branch, commit
873
+ * @property {VCSReferenceType} type Type of reference passed. Allowed values are: branch, commit
870
874
  * @property {string} reference VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
871
875
  * @property {boolean} activate Automatically activate the deployment when it is finished building.
872
876
  * @property {boolean} overrideForCli
@@ -1565,7 +1569,8 @@ functions
1565
1569
  .requiredOption(`--repository <repository>`, `Repository name of the template.`)
1566
1570
  .requiredOption(`--owner <owner>`, `The name of the owner of the template.`)
1567
1571
  .requiredOption(`--root-directory <root-directory>`, `Path to function code in the template repo.`)
1568
- .requiredOption(`--version <version>`, `Version (tag) for the repo linked to the function template.`)
1572
+ .requiredOption(`--type <type>`, `Type for the reference provided. Can be commit, branch, or tag`)
1573
+ .requiredOption(`--reference <reference>`, `Reference value, can be a commit hash, branch name, or release tag`)
1569
1574
  .option(`--activate [value]`, `Automatically activate the deployment when it is finished building.`, (value) => value === undefined ? true : parseBool(value))
1570
1575
  .action(actionRunner(functionsCreateTemplateDeployment))
1571
1576
 
@@ -172,7 +172,6 @@ const migrationsGetAppwriteReport = async ({resources,endpoint,projectID,key,par
172
172
  /**
173
173
  * @typedef {Object} MigrationsCreateCSVExportRequestParams
174
174
  * @property {string} resourceId Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.
175
- * @property {string} bucketId Storage bucket unique ID where the exported CSV will be stored.
176
175
  * @property {string} filename The name of the file to be created for the export, excluding the .csv extension.
177
176
  * @property {string[]} columns List of attributes to export. If empty, all attributes will be exported. You can use the &#039;*&#039; wildcard to export all attributes from the collection.
178
177
  * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.
@@ -189,7 +188,7 @@ const migrationsGetAppwriteReport = async ({resources,endpoint,projectID,key,par
189
188
  /**
190
189
  * @param {MigrationsCreateCSVExportRequestParams} params
191
190
  */
192
- const migrationsCreateCSVExport = async ({resourceId,bucketId,filename,columns,queries,delimiter,enclosure,escape,header,notify,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
191
+ const migrationsCreateCSVExport = async ({resourceId,filename,columns,queries,delimiter,enclosure,escape,header,notify,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
193
192
  let client = !sdk ? await sdkForProject() :
194
193
  sdk;
195
194
  let apiPath = '/migrations/csv/exports';
@@ -197,9 +196,6 @@ const migrationsCreateCSVExport = async ({resourceId,bucketId,filename,columns,q
197
196
  if (typeof resourceId !== 'undefined') {
198
197
  payload['resourceId'] = resourceId;
199
198
  }
200
- if (typeof bucketId !== 'undefined') {
201
- payload['bucketId'] = bucketId;
202
- }
203
199
  if (typeof filename !== 'undefined') {
204
200
  payload['filename'] = filename;
205
201
  }
@@ -712,9 +708,8 @@ migrations
712
708
 
713
709
  migrations
714
710
  .command(`create-csv-export`)
715
- .description(`Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in an Appwrite Storage bucket.`)
711
+ .description(`Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.`)
716
712
  .requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.`)
717
- .requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID where the exported CSV will be stored.`)
718
713
  .requiredOption(`--filename <filename>`, `The name of the file to be created for the export, excluding the .csv extension.`)
719
714
  .option(`--columns [columns...]`, `List of attributes to export. If empty, all attributes will be exported. You can use the '*' wildcard to export all attributes from the collection.`)
720
715
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`)
@@ -2322,7 +2322,7 @@ projects
2322
2322
  .description(`Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.`)
2323
2323
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2324
2324
  .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
2325
- .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
2325
+ .option(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
2326
2326
  .option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`)
2327
2327
  .action(actionRunner(projectsCreateKey))
2328
2328
 
@@ -2340,7 +2340,7 @@ projects
2340
2340
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2341
2341
  .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2342
2342
  .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
2343
- .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 events are allowed.`)
2343
+ .option(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 events are allowed.`)
2344
2344
  .option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`)
2345
2345
  .action(actionRunner(projectsUpdateKey))
2346
2346
 
@@ -813,7 +813,8 @@ const sitesCreateDuplicateDeployment = async ({siteId,deploymentId,parseOutput =
813
813
  * @property {string} repository Repository name of the template.
814
814
  * @property {string} owner The name of the owner of the template.
815
815
  * @property {string} rootDirectory Path to site code in the template repo.
816
- * @property {string} version Version (tag) for the repo linked to the site template.
816
+ * @property {TemplateReferenceType} type Type for the reference provided. Can be commit, branch, or tag
817
+ * @property {string} reference Reference value, can be a commit hash, branch name, or release tag
817
818
  * @property {boolean} activate Automatically activate the deployment when it is finished building.
818
819
  * @property {boolean} overrideForCli
819
820
  * @property {boolean} parseOutput
@@ -823,7 +824,7 @@ const sitesCreateDuplicateDeployment = async ({siteId,deploymentId,parseOutput =
823
824
  /**
824
825
  * @param {SitesCreateTemplateDeploymentRequestParams} params
825
826
  */
826
- const sitesCreateTemplateDeployment = async ({siteId,repository,owner,rootDirectory,version,activate,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
827
+ const sitesCreateTemplateDeployment = async ({siteId,repository,owner,rootDirectory,type,reference,activate,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
827
828
  let client = !sdk ? await sdkForProject() :
828
829
  sdk;
829
830
  let apiPath = '/sites/{siteId}/deployments/template'.replace('{siteId}', siteId);
@@ -837,8 +838,11 @@ const sitesCreateTemplateDeployment = async ({siteId,repository,owner,rootDirect
837
838
  if (typeof rootDirectory !== 'undefined') {
838
839
  payload['rootDirectory'] = rootDirectory;
839
840
  }
840
- if (typeof version !== 'undefined') {
841
- payload['version'] = version;
841
+ if (typeof type !== 'undefined') {
842
+ payload['type'] = type;
843
+ }
844
+ if (typeof reference !== 'undefined') {
845
+ payload['reference'] = reference;
842
846
  }
843
847
  if (typeof activate !== 'undefined') {
844
848
  payload['activate'] = activate;
@@ -860,7 +864,7 @@ const sitesCreateTemplateDeployment = async ({siteId,repository,owner,rootDirect
860
864
  /**
861
865
  * @typedef {Object} SitesCreateVcsDeploymentRequestParams
862
866
  * @property {string} siteId Site ID.
863
- * @property {VCSDeploymentType} type Type of reference passed. Allowed values are: branch, commit
867
+ * @property {VCSReferenceType} type Type of reference passed. Allowed values are: branch, commit
864
868
  * @property {string} reference VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
865
869
  * @property {boolean} activate Automatically activate the deployment when it is finished building.
866
870
  * @property {boolean} overrideForCli
@@ -1501,7 +1505,8 @@ sites
1501
1505
  .requiredOption(`--repository <repository>`, `Repository name of the template.`)
1502
1506
  .requiredOption(`--owner <owner>`, `The name of the owner of the template.`)
1503
1507
  .requiredOption(`--root-directory <root-directory>`, `Path to site code in the template repo.`)
1504
- .requiredOption(`--version <version>`, `Version (tag) for the repo linked to the site template.`)
1508
+ .requiredOption(`--type <type>`, `Type for the reference provided. Can be commit, branch, or tag`)
1509
+ .requiredOption(`--reference <reference>`, `Reference value, can be a commit hash, branch name, or release tag`)
1505
1510
  .option(`--activate [value]`, `Automatically activate the deployment when it is finished building.`, (value) => value === undefined ? true : parseBool(value))
1506
1511
  .action(actionRunner(sitesCreateTemplateDeployment))
1507
1512
 
@@ -41,7 +41,7 @@ const storage = new Command("storage").description(commandDescriptions['storage'
41
41
 
42
42
  /**
43
43
  * @typedef {Object} StorageListBucketsRequestParams
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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus
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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations
45
45
  * @property {string} search Search term to filter your list results. Max length: 256 chars.
46
46
  * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
47
47
  * @property {boolean} overrideForCli
@@ -95,6 +95,7 @@ const storageListBuckets = async ({queries,search,total,parseOutput = true, over
95
95
  * @property {Compression} compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it&#039;s enabled
96
96
  * @property {boolean} encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it&#039;s enabled
97
97
  * @property {boolean} antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it&#039;s enabled
98
+ * @property {boolean} transformations Are image transformations enabled?
98
99
  * @property {boolean} overrideForCli
99
100
  * @property {boolean} parseOutput
100
101
  * @property {libClient | undefined} sdk
@@ -103,7 +104,7 @@ const storageListBuckets = async ({queries,search,total,parseOutput = true, over
103
104
  /**
104
105
  * @param {StorageCreateBucketRequestParams} params
105
106
  */
106
- const storageCreateBucket = async ({bucketId,name,permissions,fileSecurity,enabled,maximumFileSize,allowedFileExtensions,compression,encryption,antivirus,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
107
+ const storageCreateBucket = async ({bucketId,name,permissions,fileSecurity,enabled,maximumFileSize,allowedFileExtensions,compression,encryption,antivirus,transformations,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
107
108
  let client = !sdk ? await sdkForProject() :
108
109
  sdk;
109
110
  let apiPath = '/storage/buckets';
@@ -140,6 +141,9 @@ const storageCreateBucket = async ({bucketId,name,permissions,fileSecurity,enabl
140
141
  if (typeof antivirus !== 'undefined') {
141
142
  payload['antivirus'] = antivirus;
142
143
  }
144
+ if (typeof transformations !== 'undefined') {
145
+ payload['transformations'] = transformations;
146
+ }
143
147
 
144
148
  let response = undefined;
145
149
 
@@ -199,6 +203,7 @@ const storageGetBucket = async ({bucketId,parseOutput = true, overrideForCli = f
199
203
  * @property {Compression} compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it&#039;s enabled
200
204
  * @property {boolean} encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it&#039;s enabled
201
205
  * @property {boolean} antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it&#039;s enabled
206
+ * @property {boolean} transformations Are image transformations enabled?
202
207
  * @property {boolean} overrideForCli
203
208
  * @property {boolean} parseOutput
204
209
  * @property {libClient | undefined} sdk
@@ -207,7 +212,7 @@ const storageGetBucket = async ({bucketId,parseOutput = true, overrideForCli = f
207
212
  /**
208
213
  * @param {StorageUpdateBucketRequestParams} params
209
214
  */
210
- const storageUpdateBucket = async ({bucketId,name,permissions,fileSecurity,enabled,maximumFileSize,allowedFileExtensions,compression,encryption,antivirus,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
215
+ const storageUpdateBucket = async ({bucketId,name,permissions,fileSecurity,enabled,maximumFileSize,allowedFileExtensions,compression,encryption,antivirus,transformations,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
211
216
  let client = !sdk ? await sdkForProject() :
212
217
  sdk;
213
218
  let apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);
@@ -241,6 +246,9 @@ const storageUpdateBucket = async ({bucketId,name,permissions,fileSecurity,enabl
241
246
  if (typeof antivirus !== 'undefined') {
242
247
  payload['antivirus'] = antivirus;
243
248
  }
249
+ if (typeof transformations !== 'undefined') {
250
+ payload['transformations'] = transformations;
251
+ }
244
252
 
245
253
  let response = undefined;
246
254
 
@@ -821,7 +829,7 @@ const storageGetBucketUsage = async ({bucketId,range,parseOutput = true, overrid
821
829
  storage
822
830
  .command(`list-buckets`)
823
831
  .description(`Get a list of all the storage buckets. You can use the query params to filter your results.`)
824
- .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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus`)
832
+ .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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations`)
825
833
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
826
834
  .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))
827
835
  .option(`--console`, `Get the resource console url`)
@@ -840,6 +848,7 @@ storage
840
848
  .option(`--compression <compression>`, `Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`)
841
849
  .option(`--encryption [value]`, `Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled`, (value) => value === undefined ? true : parseBool(value))
842
850
  .option(`--antivirus [value]`, `Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled`, (value) => value === undefined ? true : parseBool(value))
851
+ .option(`--transformations [value]`, `Are image transformations enabled?`, (value) => value === undefined ? true : parseBool(value))
843
852
  .action(actionRunner(storageCreateBucket))
844
853
 
845
854
  storage
@@ -862,6 +871,7 @@ storage
862
871
  .option(`--compression <compression>`, `Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`)
863
872
  .option(`--encryption [value]`, `Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled`, (value) => value === undefined ? true : parseBool(value))
864
873
  .option(`--antivirus [value]`, `Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled`, (value) => value === undefined ? true : parseBool(value))
874
+ .option(`--transformations [value]`, `Are image transformations enabled?`, (value) => value === undefined ? true : parseBool(value))
865
875
  .action(actionRunner(storageUpdateBucket))
866
876
 
867
877
  storage
@@ -602,7 +602,7 @@ const tablesDBGetTable = async ({databaseId,tableId,parseOutput = true, override
602
602
  * @property {string} tableId Table ID.
603
603
  * @property {string} name Table name. Max length: 128 chars.
604
604
  * @property {string[]} permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
605
- * @property {boolean} rowSecurity Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
605
+ * @property {boolean} rowSecurity Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).
606
606
  * @property {boolean} enabled Is table enabled? When set to &#039;disabled&#039;, users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.
607
607
  * @property {boolean} overrideForCli
608
608
  * @property {boolean} parseOutput
@@ -2965,7 +2965,7 @@ tablesDB
2965
2965
  .requiredOption(`--table-id <table-id>`, `Table ID.`)
2966
2966
  .requiredOption(`--name <name>`, `Table name. Max length: 128 chars.`)
2967
2967
  .option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
2968
- .option(`--row-security [value]`, `Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).`, (value) => value === undefined ? true : parseBool(value))
2968
+ .option(`--row-security [value]`, `Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).`, (value) => value === undefined ? true : parseBool(value))
2969
2969
  .option(`--enabled [value]`, `Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
2970
2970
  .action(actionRunner(tablesDBUpdateTable))
2971
2971
 
@@ -86,6 +86,7 @@ const vcsCreateRepositoryDetection = async ({installationId,providerRepositoryId
86
86
  * @property {string} installationId Installation Id
87
87
  * @property {VCSDetectionType} type Detector type. Must be one of the following: runtime, framework
88
88
  * @property {string} search Search term to filter your list results. Max length: 256 chars.
89
+ * @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
89
90
  * @property {boolean} overrideForCli
90
91
  * @property {boolean} parseOutput
91
92
  * @property {libClient | undefined} sdk
@@ -94,7 +95,7 @@ const vcsCreateRepositoryDetection = async ({installationId,providerRepositoryId
94
95
  /**
95
96
  * @param {VcsListRepositoriesRequestParams} params
96
97
  */
97
- const vcsListRepositories = async ({installationId,type,search,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
98
+ const vcsListRepositories = async ({installationId,type,search,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
98
99
  let client = !sdk ? await sdkForProject() :
99
100
  sdk;
100
101
  let apiPath = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
@@ -105,6 +106,9 @@ const vcsListRepositories = async ({installationId,type,search,parseOutput = tru
105
106
  if (typeof search !== 'undefined') {
106
107
  payload['search'] = search;
107
108
  }
109
+ if (typeof queries !== 'undefined') {
110
+ payload['queries'] = queries;
111
+ }
108
112
 
109
113
  let response = undefined;
110
114
 
@@ -403,6 +407,7 @@ vcs
403
407
  .requiredOption(`--installation-id <installation-id>`, `Installation Id`)
404
408
  .requiredOption(`--type <type>`, `Detector type. Must be one of the following: runtime, framework`)
405
409
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
410
+ .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`)
406
411
  .action(actionRunner(vcsListRepositories))
407
412
 
408
413
  vcs
package/lib/parser.js CHANGED
@@ -122,7 +122,7 @@ const parseError = (err) => {
122
122
  } catch {
123
123
  }
124
124
 
125
- const version = '11.1.1';
125
+ const version = '12.0.1';
126
126
  const stepsToReproduce = `Running \`appwrite ${cliConfig.reportData.data.args.join(' ')}\``;
127
127
  const yourEnvironment = `CLI version: ${version}\nOperation System: ${os.type()}\nAppwrite version: ${appwriteVersion}\nIs Cloud: ${isCloud()}`;
128
128
 
@@ -9,6 +9,9 @@ const AttributeType = {
9
9
  URL: "url",
10
10
  ENUM: "enum",
11
11
  RELATIONSHIP: "relationship",
12
+ POINT: "point",
13
+ LINESTRING: "linestring",
14
+ POLYGON: "polygon",
12
15
  };
13
16
 
14
17
  module.exports = {
@@ -33,6 +33,15 @@ class CSharp extends LanguageMeta {
33
33
  type = `List<${type}>`;
34
34
  }
35
35
  break;
36
+ case AttributeType.POINT:
37
+ type = "List<double>";
38
+ break;
39
+ case AttributeType.LINESTRING:
40
+ type = "List<List<double>>";
41
+ break;
42
+ case AttributeType.POLYGON:
43
+ type = "List<List<List<double>>>";
44
+ break;
36
45
  default:
37
46
  throw new Error(`Unknown attribute type: ${attribute.type}`);
38
47
  }
@@ -70,6 +70,15 @@ class Dart extends LanguageMeta {
70
70
  type = `List<${type}>`;
71
71
  }
72
72
  break;
73
+ case AttributeType.POINT:
74
+ type = "List<double>";
75
+ break;
76
+ case AttributeType.LINESTRING:
77
+ type = "List<List<double>>";
78
+ break;
79
+ case AttributeType.POLYGON:
80
+ type = "List<List<List<double>>>";
81
+ break;
73
82
  default:
74
83
  throw new Error(`Unknown attribute type: ${attribute.type}`);
75
84
  }
@@ -33,6 +33,15 @@ class Java extends LanguageMeta {
33
33
  type = "List<" + type + ">";
34
34
  }
35
35
  break;
36
+ case AttributeType.POINT:
37
+ type = "List<Double>";
38
+ break;
39
+ case AttributeType.LINESTRING:
40
+ type = "List<List<Double>>";
41
+ break;
42
+ case AttributeType.POLYGON:
43
+ type = "List<List<List<Double>>>";
44
+ break;
36
45
  default:
37
46
  throw new Error(`Unknown attribute type: ${attribute.type}`);
38
47
  }
@@ -38,6 +38,15 @@ class JavaScript extends LanguageMeta {
38
38
  type = `${type}[]`;
39
39
  }
40
40
  break;
41
+ case AttributeType.POINT:
42
+ type = "number[]";
43
+ break;
44
+ case AttributeType.LINESTRING:
45
+ type = "number[][]";
46
+ break;
47
+ case AttributeType.POLYGON:
48
+ type = "number[][][]";
49
+ break;
41
50
  default:
42
51
  throw new Error(`Unknown attribute type: ${attribute.type}`);
43
52
  }
@@ -33,6 +33,15 @@ class Kotlin extends LanguageMeta {
33
33
  type = `List<${type}>`;
34
34
  }
35
35
  break;
36
+ case AttributeType.POINT:
37
+ type = "List<Double>";
38
+ break;
39
+ case AttributeType.LINESTRING:
40
+ type = "List<List<Double>>";
41
+ break;
42
+ case AttributeType.POLYGON:
43
+ type = "List<List<List<Double>>>";
44
+ break;
36
45
  default:
37
46
  throw new Error(`Unknown attribute type: ${attribute.type}`);
38
47
  }
@@ -36,6 +36,11 @@ class PHP extends LanguageMeta {
36
36
  type = "array";
37
37
  }
38
38
  break;
39
+ case AttributeType.POINT:
40
+ case AttributeType.LINESTRING:
41
+ case AttributeType.POLYGON:
42
+ type = "array";
43
+ break;
39
44
  default:
40
45
  throw new Error(`Unknown attribute type: ${attribute.type}`);
41
46
  }
@@ -33,6 +33,15 @@ class Swift extends LanguageMeta {
33
33
  type = `[${type}]`;
34
34
  }
35
35
  break;
36
+ case AttributeType.POINT:
37
+ type = "[Double]";
38
+ break;
39
+ case AttributeType.LINESTRING:
40
+ type = "[[Double]]";
41
+ break;
42
+ case AttributeType.POLYGON:
43
+ type = "[[[Double]]]";
44
+ break;
36
45
  default:
37
46
  throw new Error(`Unknown attribute type: ${attribute.type}`);
38
47
  }
@@ -38,6 +38,15 @@ class TypeScript extends LanguageMeta {
38
38
  type = `${type}[]`;
39
39
  }
40
40
  break;
41
+ case AttributeType.POINT:
42
+ type = "Array<number>";
43
+ break;
44
+ case AttributeType.LINESTRING:
45
+ type = "Array<Array<number>>";
46
+ break;
47
+ case AttributeType.POLYGON:
48
+ type = "Array<Array<Array<number>>>";
49
+ break;
41
50
  default:
42
51
  throw new Error(`Unknown attribute type: ${attribute.type}`);
43
52
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "appwrite-cli",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5
- "version": "11.1.1",
5
+ "version": "12.0.1",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "index.js",
8
8
  "bin": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
3
- "version": "11.1.1",
3
+ "version": "12.0.1",
4
4
  "description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.",
5
5
  "homepage": "https://github.com/appwrite/sdk-for-cli",
6
6
  "license": "BSD-3-Clause",
7
7
  "architecture": {
8
8
  "64bit": {
9
- "url": "https://github.com/appwrite/sdk-for-cli/releases/download/11.1.1/appwrite-cli-win-x64.exe",
9
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.1/appwrite-cli-win-x64.exe",
10
10
  "bin": [
11
11
  [
12
12
  "appwrite-cli-win-x64.exe",
@@ -15,7 +15,7 @@
15
15
  ]
16
16
  },
17
17
  "arm64": {
18
- "url": "https://github.com/appwrite/sdk-for-cli/releases/download/11.1.1/appwrite-cli-win-arm64.exe",
18
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.1/appwrite-cli-win-arm64.exe",
19
19
  "bin": [
20
20
  [
21
21
  "appwrite-cli-win-arm64.exe",