appwrite-cli 13.5.0 → 13.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +2 -2
  3. package/cli.ts +4 -2
  4. package/dist/bundle-win-arm64.mjs +658 -52
  5. package/dist/cli.cjs +658 -52
  6. package/dist/index.cjs +33 -14
  7. package/dist/index.js +33 -14
  8. package/dist/lib/commands/schema.d.ts.map +1 -1
  9. package/dist/lib/commands/services/activities.d.ts +3 -0
  10. package/dist/lib/commands/services/activities.d.ts.map +1 -0
  11. package/dist/lib/commands/services/backups.d.ts +3 -0
  12. package/dist/lib/commands/services/backups.d.ts.map +1 -0
  13. package/dist/lib/constants.d.ts +1 -1
  14. package/dist/lib/json.d.ts.map +1 -1
  15. package/docs/examples/account/create-key.md +5 -0
  16. package/docs/examples/account/delete-key.md +4 -0
  17. package/docs/examples/account/get-key.md +4 -0
  18. package/docs/examples/account/list-keys.md +3 -0
  19. package/docs/examples/account/update-key.md +6 -0
  20. package/docs/examples/activities/get-event.md +4 -0
  21. package/docs/examples/activities/list-events.md +3 -0
  22. package/docs/examples/backups/create-archive.md +4 -0
  23. package/docs/examples/backups/create-policy.md +7 -0
  24. package/docs/examples/backups/create-restoration.md +5 -0
  25. package/docs/examples/backups/delete-archive.md +4 -0
  26. package/docs/examples/backups/delete-policy.md +4 -0
  27. package/docs/examples/backups/get-archive.md +4 -0
  28. package/docs/examples/backups/get-policy.md +4 -0
  29. package/docs/examples/backups/get-restoration.md +4 -0
  30. package/docs/examples/backups/list-archives.md +3 -0
  31. package/docs/examples/backups/list-policies.md +3 -0
  32. package/docs/examples/backups/list-restorations.md +3 -0
  33. package/docs/examples/backups/update-policy.md +4 -0
  34. package/install.ps1 +2 -2
  35. package/install.sh +1 -1
  36. package/lib/commands/schema.ts +1 -3
  37. package/lib/commands/services/account.ts +234 -0
  38. package/lib/commands/services/activities.ts +51 -0
  39. package/lib/commands/services/backups.ts +184 -0
  40. package/lib/commands/services/health.ts +55 -0
  41. package/lib/commands/services/projects.ts +1 -1
  42. package/lib/commands/services/storage.ts +2 -2
  43. package/lib/constants.ts +1 -1
  44. package/lib/json.ts +6 -1
  45. package/package.json +2 -2
  46. package/scoop/appwrite.config.json +3 -3
  47. package/dist/lib/commands/services/console.d.ts +0 -3
  48. package/dist/lib/commands/services/console.d.ts.map +0 -1
  49. package/docs/examples/console/get-resource.md +0 -5
  50. package/docs/examples/console/variables.md +0 -3
  51. package/lib/commands/services/console.ts +0 -49
package/dist/index.cjs CHANGED
@@ -19581,9 +19581,9 @@ var require_stream_duplex = __commonJS({
19581
19581
  }
19582
19582
  });
19583
19583
 
19584
- // node_modules/safe-buffer/index.js
19584
+ // node_modules/string_decoder/node_modules/safe-buffer/index.js
19585
19585
  var require_safe_buffer = __commonJS({
19586
- "node_modules/safe-buffer/index.js"(exports2, module2) {
19586
+ "node_modules/string_decoder/node_modules/safe-buffer/index.js"(exports2, module2) {
19587
19587
  var buffer = require("buffer");
19588
19588
  var Buffer2 = buffer.Buffer;
19589
19589
  function copyProps(src, dst) {
@@ -19600,6 +19600,7 @@ var require_safe_buffer = __commonJS({
19600
19600
  function SafeBuffer(arg, encodingOrOffset, length) {
19601
19601
  return Buffer2(arg, encodingOrOffset, length);
19602
19602
  }
19603
+ SafeBuffer.prototype = Object.create(Buffer2.prototype);
19603
19604
  copyProps(Buffer2, SafeBuffer);
19604
19605
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
19605
19606
  if (typeof arg === "number") {
@@ -69376,7 +69377,7 @@ var id_default = ID;
69376
69377
  // lib/constants.ts
69377
69378
  var SDK_TITLE = "Appwrite";
69378
69379
  var SDK_TITLE_LOWER = "appwrite";
69379
- var SDK_VERSION = "13.5.0";
69380
+ var SDK_VERSION = "13.6.0";
69380
69381
  var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
69381
69382
  var EXECUTABLE_NAME = "appwrite";
69382
69383
  var NPM_PACKAGE_NAME = "appwrite-cli";
@@ -83644,6 +83645,8 @@ var JSONbigParser = (0, import_json_bigint.default)({ storeAsString: false });
83644
83645
  var JSONbigSerializer = (0, import_json_bigint.default)({ useNativeBigInt: true });
83645
83646
  var MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
83646
83647
  var MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
83648
+ var MAX_INT64 = BigInt("9223372036854775807");
83649
+ var MIN_INT64 = BigInt("-9223372036854775808");
83647
83650
  function isBigNumber(value) {
83648
83651
  return value !== null && typeof value === "object" && value._isBigNumber === true && typeof value.isInteger === "function" && typeof value.toFixed === "function" && typeof value.toNumber === "function";
83649
83652
  }
@@ -83655,7 +83658,10 @@ function reviver(_key, value) {
83655
83658
  if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
83656
83659
  return Number(str);
83657
83660
  }
83658
- return bi;
83661
+ if (bi >= MIN_INT64 && bi <= MAX_INT64) {
83662
+ return bi;
83663
+ }
83664
+ return value.toNumber();
83659
83665
  }
83660
83666
  return value.toNumber();
83661
83667
  }
@@ -84854,6 +84860,8 @@ Query.cursorBefore = (documentId) => new Query("cursorBefore", void 0, documentI
84854
84860
  Query.limit = (limit) => new Query("limit", void 0, limit).toString();
84855
84861
  Query.offset = (offset) => new Query("offset", void 0, offset).toString();
84856
84862
  Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
84863
+ Query.containsAny = (attribute, value) => new Query("containsAny", attribute, value).toString();
84864
+ Query.containsAll = (attribute, value) => new Query("containsAll", attribute, value).toString();
84857
84865
  Query.notContains = (attribute, value) => new Query("notContains", attribute, value).toString();
84858
84866
  Query.notSearch = (attribute, value) => new Query("notSearch", attribute, value).toString();
84859
84867
  Query.notBetween = (attribute, start, end) => new Query("notBetween", attribute, [start, end]).toString();
@@ -84884,6 +84892,8 @@ var JSONbigParser2 = (0, import_json_bigint2.default)({ storeAsString: false });
84884
84892
  var JSONbigSerializer2 = (0, import_json_bigint2.default)({ useNativeBigInt: true });
84885
84893
  var MAX_SAFE2 = BigInt(Number.MAX_SAFE_INTEGER);
84886
84894
  var MIN_SAFE2 = BigInt(Number.MIN_SAFE_INTEGER);
84895
+ var MAX_INT642 = BigInt("9223372036854775807");
84896
+ var MIN_INT642 = BigInt("-9223372036854775808");
84887
84897
  function isBigNumber2(value) {
84888
84898
  return value !== null && typeof value === "object" && value._isBigNumber === true && typeof value.isInteger === "function" && typeof value.toFixed === "function" && typeof value.toNumber === "function";
84889
84899
  }
@@ -84895,7 +84905,10 @@ function reviver2(_key, value) {
84895
84905
  if (bi >= MIN_SAFE2 && bi <= MAX_SAFE2) {
84896
84906
  return Number(str);
84897
84907
  }
84898
- return bi;
84908
+ if (bi >= MIN_INT642 && bi <= MAX_INT642) {
84909
+ return bi;
84910
+ }
84911
+ return value.toNumber();
84899
84912
  }
84900
84913
  return value.toNumber();
84901
84914
  }
@@ -84942,7 +84955,7 @@ var Client = class _Client {
84942
84955
  "x-sdk-name": "Console",
84943
84956
  "x-sdk-platform": "console",
84944
84957
  "x-sdk-language": "web",
84945
- "x-sdk-version": "3.0.0",
84958
+ "x-sdk-version": "3.1.0",
84946
84959
  "X-Appwrite-Response-Format": "1.8.0"
84947
84960
  };
84948
84961
  this.realtime = {
@@ -94020,21 +94033,26 @@ var Organizations = class {
94020
94033
  const apiHeaders = {};
94021
94034
  return this.client.call("get", uri, apiHeaders, payload);
94022
94035
  }
94023
- getScopes(paramsOrFirst) {
94036
+ getScopes(paramsOrFirst, ...rest) {
94024
94037
  let params;
94025
94038
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
94026
94039
  params = paramsOrFirst || {};
94027
94040
  } else {
94028
94041
  params = {
94029
- organizationId: paramsOrFirst
94042
+ organizationId: paramsOrFirst,
94043
+ projectId: rest[0]
94030
94044
  };
94031
94045
  }
94032
94046
  const organizationId = params.organizationId;
94047
+ const projectId = params.projectId;
94033
94048
  if (typeof organizationId === "undefined") {
94034
94049
  throw new AppwriteException('Missing required parameter: "organizationId"');
94035
94050
  }
94036
94051
  const apiPath = "/organizations/{organizationId}/roles".replace("{organizationId}", organizationId);
94037
94052
  const payload = {};
94053
+ if (typeof projectId !== "undefined") {
94054
+ payload["projectId"] = projectId;
94055
+ }
94038
94056
  const uri = new URL(this.client.config.endpoint + apiPath);
94039
94057
  const apiHeaders = {};
94040
94058
  return this.client.call("get", uri, apiHeaders, payload);
@@ -103978,7 +103996,7 @@ var package_default = {
103978
103996
  type: "module",
103979
103997
  homepage: "https://appwrite.io/support",
103980
103998
  description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
103981
- version: "13.5.0",
103999
+ version: "13.6.0",
103982
104000
  license: "BSD-3-Clause",
103983
104001
  main: "dist/index.cjs",
103984
104002
  module: "dist/index.js",
@@ -104021,7 +104039,7 @@ var package_default = {
104021
104039
  "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
104022
104040
  },
104023
104041
  dependencies: {
104024
- "@appwrite.io/console": "^3.0.0",
104042
+ "@appwrite.io/console": "^3.1.0",
104025
104043
  chalk: "4.1.2",
104026
104044
  chokidar: "^3.6.0",
104027
104045
  "cli-progress": "^3.12.0",
@@ -108864,7 +108882,6 @@ pull.command("team").alias("teams").description("Pull your Appwrite teams").acti
108864
108882
  pull.command("topic").alias("topics").description("Pull your Appwrite messaging topics").action(actionRunner(pullMessagingTopic));
108865
108883
 
108866
108884
  // lib/commands/schema.ts
108867
- var import_json_bigint3 = __toESM(require_json_bigint(), 1);
108868
108885
  var fs7 = __toESM(require("fs"), 1);
108869
108886
  var path6 = __toESM(require("path"), 1);
108870
108887
 
@@ -109506,7 +109523,6 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
109506
109523
  };
109507
109524
 
109508
109525
  // lib/commands/schema.ts
109509
- var JSONBig2 = (0, import_json_bigint3.default)({ useNativeBigInt: true });
109510
109526
  var Schema = class {
109511
109527
  pullCommand;
109512
109528
  pushCommand;
@@ -109579,7 +109595,7 @@ var Schema = class {
109579
109595
  * @returns The configuration object.
109580
109596
  */
109581
109597
  read(path7) {
109582
- return JSONBig2.parse(fs7.readFileSync(path7, "utf8"));
109598
+ return JSONBig.parse(fs7.readFileSync(path7, "utf8"));
109583
109599
  }
109584
109600
  /**
109585
109601
  * Writes the configuration object to a file.
@@ -109590,7 +109606,7 @@ var Schema = class {
109590
109606
  */
109591
109607
  write(config2, filePath) {
109592
109608
  const resolvedPath = path6.resolve(filePath);
109593
- const content = JSONBig2.stringify(config2, null, 4);
109609
+ const content = JSONBig.stringify(config2, null, 4);
109594
109610
  fs7.writeFileSync(resolvedPath, content);
109595
109611
  }
109596
109612
  };
@@ -109618,6 +109634,9 @@ var Schema = class {
109618
109634
  });
109619
109635
  /*! Bundled license information:
109620
109636
 
109637
+ safe-buffer/index.js:
109638
+ (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
109639
+
109621
109640
  undici/lib/fetch/body.js:
109622
109641
  (*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
109623
109642
 
package/dist/index.js CHANGED
@@ -19586,9 +19586,9 @@ var require_stream_duplex = __commonJS({
19586
19586
  }
19587
19587
  });
19588
19588
 
19589
- // node_modules/safe-buffer/index.js
19589
+ // node_modules/string_decoder/node_modules/safe-buffer/index.js
19590
19590
  var require_safe_buffer = __commonJS({
19591
- "node_modules/safe-buffer/index.js"(exports, module) {
19591
+ "node_modules/string_decoder/node_modules/safe-buffer/index.js"(exports, module) {
19592
19592
  var buffer = __require("buffer");
19593
19593
  var Buffer2 = buffer.Buffer;
19594
19594
  function copyProps(src, dst) {
@@ -19605,6 +19605,7 @@ var require_safe_buffer = __commonJS({
19605
19605
  function SafeBuffer(arg, encodingOrOffset, length) {
19606
19606
  return Buffer2(arg, encodingOrOffset, length);
19607
19607
  }
19608
+ SafeBuffer.prototype = Object.create(Buffer2.prototype);
19608
19609
  copyProps(Buffer2, SafeBuffer);
19609
19610
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
19610
19611
  if (typeof arg === "number") {
@@ -69356,7 +69357,7 @@ var id_default = ID;
69356
69357
  // lib/constants.ts
69357
69358
  var SDK_TITLE = "Appwrite";
69358
69359
  var SDK_TITLE_LOWER = "appwrite";
69359
- var SDK_VERSION = "13.5.0";
69360
+ var SDK_VERSION = "13.6.0";
69360
69361
  var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
69361
69362
  var EXECUTABLE_NAME = "appwrite";
69362
69363
  var NPM_PACKAGE_NAME = "appwrite-cli";
@@ -83624,6 +83625,8 @@ var JSONbigParser = (0, import_json_bigint.default)({ storeAsString: false });
83624
83625
  var JSONbigSerializer = (0, import_json_bigint.default)({ useNativeBigInt: true });
83625
83626
  var MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
83626
83627
  var MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
83628
+ var MAX_INT64 = BigInt("9223372036854775807");
83629
+ var MIN_INT64 = BigInt("-9223372036854775808");
83627
83630
  function isBigNumber(value) {
83628
83631
  return value !== null && typeof value === "object" && value._isBigNumber === true && typeof value.isInteger === "function" && typeof value.toFixed === "function" && typeof value.toNumber === "function";
83629
83632
  }
@@ -83635,7 +83638,10 @@ function reviver(_key, value) {
83635
83638
  if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
83636
83639
  return Number(str);
83637
83640
  }
83638
- return bi;
83641
+ if (bi >= MIN_INT64 && bi <= MAX_INT64) {
83642
+ return bi;
83643
+ }
83644
+ return value.toNumber();
83639
83645
  }
83640
83646
  return value.toNumber();
83641
83647
  }
@@ -84834,6 +84840,8 @@ Query.cursorBefore = (documentId) => new Query("cursorBefore", void 0, documentI
84834
84840
  Query.limit = (limit) => new Query("limit", void 0, limit).toString();
84835
84841
  Query.offset = (offset) => new Query("offset", void 0, offset).toString();
84836
84842
  Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
84843
+ Query.containsAny = (attribute, value) => new Query("containsAny", attribute, value).toString();
84844
+ Query.containsAll = (attribute, value) => new Query("containsAll", attribute, value).toString();
84837
84845
  Query.notContains = (attribute, value) => new Query("notContains", attribute, value).toString();
84838
84846
  Query.notSearch = (attribute, value) => new Query("notSearch", attribute, value).toString();
84839
84847
  Query.notBetween = (attribute, start, end) => new Query("notBetween", attribute, [start, end]).toString();
@@ -84864,6 +84872,8 @@ var JSONbigParser2 = (0, import_json_bigint2.default)({ storeAsString: false });
84864
84872
  var JSONbigSerializer2 = (0, import_json_bigint2.default)({ useNativeBigInt: true });
84865
84873
  var MAX_SAFE2 = BigInt(Number.MAX_SAFE_INTEGER);
84866
84874
  var MIN_SAFE2 = BigInt(Number.MIN_SAFE_INTEGER);
84875
+ var MAX_INT642 = BigInt("9223372036854775807");
84876
+ var MIN_INT642 = BigInt("-9223372036854775808");
84867
84877
  function isBigNumber2(value) {
84868
84878
  return value !== null && typeof value === "object" && value._isBigNumber === true && typeof value.isInteger === "function" && typeof value.toFixed === "function" && typeof value.toNumber === "function";
84869
84879
  }
@@ -84875,7 +84885,10 @@ function reviver2(_key, value) {
84875
84885
  if (bi >= MIN_SAFE2 && bi <= MAX_SAFE2) {
84876
84886
  return Number(str);
84877
84887
  }
84878
- return bi;
84888
+ if (bi >= MIN_INT642 && bi <= MAX_INT642) {
84889
+ return bi;
84890
+ }
84891
+ return value.toNumber();
84879
84892
  }
84880
84893
  return value.toNumber();
84881
84894
  }
@@ -84922,7 +84935,7 @@ var Client = class _Client {
84922
84935
  "x-sdk-name": "Console",
84923
84936
  "x-sdk-platform": "console",
84924
84937
  "x-sdk-language": "web",
84925
- "x-sdk-version": "3.0.0",
84938
+ "x-sdk-version": "3.1.0",
84926
84939
  "X-Appwrite-Response-Format": "1.8.0"
84927
84940
  };
84928
84941
  this.realtime = {
@@ -94000,21 +94013,26 @@ var Organizations = class {
94000
94013
  const apiHeaders = {};
94001
94014
  return this.client.call("get", uri, apiHeaders, payload);
94002
94015
  }
94003
- getScopes(paramsOrFirst) {
94016
+ getScopes(paramsOrFirst, ...rest) {
94004
94017
  let params;
94005
94018
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
94006
94019
  params = paramsOrFirst || {};
94007
94020
  } else {
94008
94021
  params = {
94009
- organizationId: paramsOrFirst
94022
+ organizationId: paramsOrFirst,
94023
+ projectId: rest[0]
94010
94024
  };
94011
94025
  }
94012
94026
  const organizationId = params.organizationId;
94027
+ const projectId = params.projectId;
94013
94028
  if (typeof organizationId === "undefined") {
94014
94029
  throw new AppwriteException('Missing required parameter: "organizationId"');
94015
94030
  }
94016
94031
  const apiPath = "/organizations/{organizationId}/roles".replace("{organizationId}", organizationId);
94017
94032
  const payload = {};
94033
+ if (typeof projectId !== "undefined") {
94034
+ payload["projectId"] = projectId;
94035
+ }
94018
94036
  const uri = new URL(this.client.config.endpoint + apiPath);
94019
94037
  const apiHeaders = {};
94020
94038
  return this.client.call("get", uri, apiHeaders, payload);
@@ -103958,7 +103976,7 @@ var package_default = {
103958
103976
  type: "module",
103959
103977
  homepage: "https://appwrite.io/support",
103960
103978
  description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
103961
- version: "13.5.0",
103979
+ version: "13.6.0",
103962
103980
  license: "BSD-3-Clause",
103963
103981
  main: "dist/index.cjs",
103964
103982
  module: "dist/index.js",
@@ -104001,7 +104019,7 @@ var package_default = {
104001
104019
  "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
104002
104020
  },
104003
104021
  dependencies: {
104004
- "@appwrite.io/console": "^3.0.0",
104022
+ "@appwrite.io/console": "^3.1.0",
104005
104023
  chalk: "4.1.2",
104006
104024
  chokidar: "^3.6.0",
104007
104025
  "cli-progress": "^3.12.0",
@@ -108844,7 +108862,6 @@ pull.command("team").alias("teams").description("Pull your Appwrite teams").acti
108844
108862
  pull.command("topic").alias("topics").description("Pull your Appwrite messaging topics").action(actionRunner(pullMessagingTopic));
108845
108863
 
108846
108864
  // lib/commands/schema.ts
108847
- var import_json_bigint3 = __toESM(require_json_bigint(), 1);
108848
108865
  import * as fs7 from "fs";
108849
108866
  import * as path6 from "path";
108850
108867
 
@@ -109486,7 +109503,6 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
109486
109503
  };
109487
109504
 
109488
109505
  // lib/commands/schema.ts
109489
- var JSONBig2 = (0, import_json_bigint3.default)({ useNativeBigInt: true });
109490
109506
  var Schema = class {
109491
109507
  pullCommand;
109492
109508
  pushCommand;
@@ -109559,7 +109575,7 @@ var Schema = class {
109559
109575
  * @returns The configuration object.
109560
109576
  */
109561
109577
  read(path7) {
109562
- return JSONBig2.parse(fs7.readFileSync(path7, "utf8"));
109578
+ return JSONBig.parse(fs7.readFileSync(path7, "utf8"));
109563
109579
  }
109564
109580
  /**
109565
109581
  * Writes the configuration object to a file.
@@ -109570,7 +109586,7 @@ var Schema = class {
109570
109586
  */
109571
109587
  write(config2, filePath) {
109572
109588
  const resolvedPath = path6.resolve(filePath);
109573
- const content = JSONBig2.stringify(config2, null, 4);
109589
+ const content = JSONBig.stringify(config2, null, 4);
109574
109590
  fs7.writeFileSync(resolvedPath, content);
109575
109591
  }
109576
109592
  };
@@ -109597,6 +109613,9 @@ export {
109597
109613
  };
109598
109614
  /*! Bundled license information:
109599
109615
 
109616
+ safe-buffer/index.js:
109617
+ (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
109618
+
109600
109619
  undici/lib/fetch/body.js:
109601
109620
  (*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
109602
109621
 
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../lib/commands/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAQ,WAAW,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAQ,WAAW,EAAE,MAAM,WAAW,CAAC;AAK9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAIpF,qBAAa,MAAM;IACjB,OAAO,CAAC,WAAW,CAAO;IAC1B,OAAO,CAAC,WAAW,CAAO;IAE1B,OAAO,CAAC,iBAAiB,CAAO;IAEzB,EAAE,EAAE,4BAA4B,CAAC;gBAE5B,EACV,aAAa,EACb,aAAa,GACd,EAAE;QACD,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;KACvB;IASD;;;;;;OAMG;IACI,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU;IAS/C;;;;;;;OAOG;IACU,IAAI,CACf,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,CAAC;IAQtB;;;;;;;;;OASG;IACU,IAAI,CACf,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,CAAC;IAatB;;;;;OAKG;IACI,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAIrC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAKzD"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../lib/commands/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAQ,WAAW,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAQ,WAAW,EAAE,MAAM,WAAW,CAAC;AAK9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAEpF,qBAAa,MAAM;IACjB,OAAO,CAAC,WAAW,CAAO;IAC1B,OAAO,CAAC,WAAW,CAAO;IAE1B,OAAO,CAAC,iBAAiB,CAAO;IAEzB,EAAE,EAAE,4BAA4B,CAAC;gBAE5B,EACV,aAAa,EACb,aAAa,GACd,EAAE;QACD,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;KACvB;IASD;;;;;;OAMG;IACI,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU;IAS/C;;;;;;;OAOG;IACU,IAAI,CACf,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,CAAC;IAQtB;;;;;;;;;OASG;IACU,IAAI,CACf,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,CAAC;IAatB;;;;;OAKG;IACI,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAIrC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAKzD"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const activities: Command;
3
+ //# sourceMappingURL=activities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activities.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/activities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,eAAO,MAAM,UAAU,SAInB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const backups: Command;
3
+ //# sourceMappingURL=backups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backups.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/backups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,eAAO,MAAM,OAAO,SAIhB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export declare const SDK_TITLE = "Appwrite";
2
2
  export declare const SDK_TITLE_LOWER = "appwrite";
3
- export declare const SDK_VERSION = "13.5.0";
3
+ export declare const SDK_VERSION = "13.6.0";
4
4
  export declare const SDK_NAME = "Command Line";
5
5
  export declare const SDK_PLATFORM = "console";
6
6
  export declare const SDK_LANGUAGE = "cli";
@@ -1 +1 @@
1
- {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../lib/json.ts"],"names":[],"mappings":"AAkCA,eAAO,MAAM,OAAO;kBACJ,MAAM;;;;;CAErB,CAAC"}
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../lib/json.ts"],"names":[],"mappings":"AAuCA,eAAO,MAAM,OAAO;kBACJ,MAAM;;;;;CAErB,CAAC"}
@@ -0,0 +1,5 @@
1
+ ```bash
2
+ appwrite account create-key \
3
+ --name <NAME> \
4
+ --scopes one two three
5
+ ```
@@ -0,0 +1,4 @@
1
+ ```bash
2
+ appwrite account delete-key \
3
+ --key-id <KEY_ID>
4
+ ```
@@ -0,0 +1,4 @@
1
+ ```bash
2
+ appwrite account get-key \
3
+ --key-id <KEY_ID>
4
+ ```
@@ -0,0 +1,3 @@
1
+ ```bash
2
+ appwrite account list-keys
3
+ ```
@@ -0,0 +1,6 @@
1
+ ```bash
2
+ appwrite account update-key \
3
+ --key-id <KEY_ID> \
4
+ --name <NAME> \
5
+ --scopes one two three
6
+ ```
@@ -0,0 +1,4 @@
1
+ ```bash
2
+ appwrite activities get-event \
3
+ --event-id <EVENT_ID>
4
+ ```
@@ -0,0 +1,3 @@
1
+ ```bash
2
+ appwrite activities list-events
3
+ ```
@@ -0,0 +1,4 @@
1
+ ```bash
2
+ appwrite backups create-archive \
3
+ --services one two three
4
+ ```
@@ -0,0 +1,7 @@
1
+ ```bash
2
+ appwrite backups create-policy \
3
+ --policy-id <POLICY_ID> \
4
+ --services one two three \
5
+ --retention 1 \
6
+ --schedule ''
7
+ ```
@@ -0,0 +1,5 @@
1
+ ```bash
2
+ appwrite backups create-restoration \
3
+ --archive-id <ARCHIVE_ID> \
4
+ --services one two three
5
+ ```
@@ -0,0 +1,4 @@
1
+ ```bash
2
+ appwrite backups delete-archive \
3
+ --archive-id <ARCHIVE_ID>
4
+ ```
@@ -0,0 +1,4 @@
1
+ ```bash
2
+ appwrite backups delete-policy \
3
+ --policy-id <POLICY_ID>
4
+ ```
@@ -0,0 +1,4 @@
1
+ ```bash
2
+ appwrite backups get-archive \
3
+ --archive-id <ARCHIVE_ID>
4
+ ```
@@ -0,0 +1,4 @@
1
+ ```bash
2
+ appwrite backups get-policy \
3
+ --policy-id <POLICY_ID>
4
+ ```
@@ -0,0 +1,4 @@
1
+ ```bash
2
+ appwrite backups get-restoration \
3
+ --restoration-id <RESTORATION_ID>
4
+ ```
@@ -0,0 +1,3 @@
1
+ ```bash
2
+ appwrite backups list-archives
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```bash
2
+ appwrite backups list-policies
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```bash
2
+ appwrite backups list-restorations
3
+ ```
@@ -0,0 +1,4 @@
1
+ ```bash
2
+ appwrite backups update-policy \
3
+ --policy-id <POLICY_ID>
4
+ ```
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/13.5.0/appwrite-cli-win-x64.exe"
17
- $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/13.5.0/appwrite-cli-win-arm64.exe"
16
+ $GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/13.6.0/appwrite-cli-win-x64.exe"
17
+ $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/13.6.0/appwrite-cli-win-arm64.exe"
18
18
 
19
19
  $APPWRITE_BINARY_NAME = "appwrite.exe"
20
20
 
package/install.sh CHANGED
@@ -96,7 +96,7 @@ printSuccess() {
96
96
  downloadBinary() {
97
97
  echo "[2/4] Downloading executable for $OS ($ARCH) ..."
98
98
 
99
- GITHUB_LATEST_VERSION="13.5.0"
99
+ GITHUB_LATEST_VERSION="13.6.0"
100
100
  GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
101
101
  GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
102
102
 
@@ -4,13 +4,11 @@ import { ConfigSchema } from "./config.js";
4
4
  import { Pull, PullOptions } from "./pull.js";
5
5
  import { Push, PushOptions } from "./push.js";
6
6
  import { parseWithBetterErrors } from "./utils/error-formatter.js";
7
- import JSONbig from "json-bigint";
7
+ import { JSONBig } from "../json.js";
8
8
  import * as fs from "fs";
9
9
  import * as path from "path";
10
10
  import { TypeScriptDatabasesGenerator } from "./generators/typescript/databases.js";
11
11
 
12
- const JSONBig = JSONbig({ useNativeBigInt: true });
13
-
14
12
  export class Schema {
15
13
  private pullCommand: Pull;
16
14
  private pushCommand: Push;