appwrite-cli 22.3.0 → 22.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -24569,16 +24569,16 @@ var require_base = __commonJS({
24569
24569
  }),
24570
24570
  share()
24571
24571
  );
24572
- const success24 = validation.pipe(
24572
+ const success25 = validation.pipe(
24573
24573
  filter((state) => state.isValid === true),
24574
24574
  take(1)
24575
24575
  );
24576
24576
  const error52 = validation.pipe(
24577
24577
  filter((state) => state.isValid !== true),
24578
- takeUntil(success24)
24578
+ takeUntil(success25)
24579
24579
  );
24580
24580
  return {
24581
- success: success24,
24581
+ success: success25,
24582
24582
  error: error52
24583
24583
  };
24584
24584
  }
@@ -47241,14 +47241,14 @@ var require_base2 = __commonJS({
47241
47241
  return { isValid: err };
47242
47242
  });
47243
47243
  }).share();
47244
- var success24 = validation.filter(function(state) {
47244
+ var success25 = validation.filter(function(state) {
47245
47245
  return state.isValid === true;
47246
47246
  }).take(1);
47247
47247
  var error52 = validation.filter(function(state) {
47248
47248
  return state.isValid !== true;
47249
- }).takeUntil(success24);
47249
+ }).takeUntil(success25);
47250
47250
  return {
47251
- success: success24,
47251
+ success: success25,
47252
47252
  error: error52
47253
47253
  };
47254
47254
  };
@@ -86539,7 +86539,7 @@ var package_default = {
86539
86539
  type: "module",
86540
86540
  homepage: "https://appwrite.io/support",
86541
86541
  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",
86542
- version: "22.3.0",
86542
+ version: "22.5.0",
86543
86543
  license: "BSD-3-Clause",
86544
86544
  main: "dist/index.cjs",
86545
86545
  module: "dist/index.js",
@@ -86587,7 +86587,7 @@ var package_default = {
86587
86587
  "windows-arm64": "bun build cli.ts --compile --minify --target=bun-windows-arm64 --outfile build/appwrite-cli-win-arm64.exe"
86588
86588
  },
86589
86589
  dependencies: {
86590
- "@appwrite.io/console": "^15.1.1",
86590
+ "@appwrite.io/console": "15.3.0-rc.1",
86591
86591
  "@napi-rs/keyring": "^1.3.0",
86592
86592
  chalk: "4.1.2",
86593
86593
  chokidar: "^3.6.0",
@@ -86615,21 +86615,21 @@ var package_default = {
86615
86615
  esbuild: "^0.28.1"
86616
86616
  },
86617
86617
  devDependencies: {
86618
- "@typescript-eslint/eslint-plugin": "^8.0.0",
86619
- "@typescript-eslint/parser": "^8.0.0",
86620
86618
  "@types/bun": "^1.3.5",
86621
- eslint: "^9.0.0",
86622
- "eslint-plugin-unused-imports": "^4.0.0",
86623
- "typescript-eslint": "^8.0.0",
86624
86619
  "@types/cli-progress": "^3.11.5",
86625
86620
  "@types/inquirer": "^8.2.10",
86626
86621
  "@types/json-bigint": "^1.0.4",
86627
86622
  "@types/node": "^18.19.0",
86628
86623
  "@types/tar": "^6.1.13",
86624
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
86625
+ "@typescript-eslint/parser": "^8.0.0",
86629
86626
  esbuild: "^0.28.1",
86627
+ eslint: "^9.0.0",
86628
+ "eslint-plugin-unused-imports": "^4.0.0",
86630
86629
  prettier: "^3.7.4",
86631
86630
  tsx: "^4.21.0",
86632
- typescript: "^5.3.3"
86631
+ typescript: "^5.3.3",
86632
+ "typescript-eslint": "^8.0.0"
86633
86633
  }
86634
86634
  };
86635
86635
 
@@ -101271,7 +101271,7 @@ var validateCrossDatabase = (data, ctx) => {
101271
101271
  // lib/constants.ts
101272
101272
  var SDK_TITLE = "Appwrite";
101273
101273
  var SDK_TITLE_LOWER = "appwrite";
101274
- var SDK_VERSION = "22.3.0";
101274
+ var SDK_VERSION = "22.5.0";
101275
101275
  var SDK_NAME = "Command Line";
101276
101276
  var SDK_PLATFORM = "console";
101277
101277
  var SDK_LANGUAGE = "cli";
@@ -101280,13 +101280,14 @@ var EXECUTABLE_NAME = "appwrite";
101280
101280
  var UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
101281
101281
  var HOMEBREW_TAP = "appwrite/appwrite";
101282
101282
  var HOMEBREW_FORMULA = `${HOMEBREW_TAP}/appwrite`;
101283
+ var HOMEBREW_TAP_FORMULA_URL = "https://raw.githubusercontent.com/appwrite/homebrew-appwrite/main/Formula/appwrite.rb";
101283
101284
  var NPM_PACKAGE_NAME = "appwrite-cli";
101284
101285
  var NPM_REGISTRY_URL = `https://registry.npmjs.org/${NPM_PACKAGE_NAME}/latest`;
101285
101286
  var GITHUB_REPO = "appwrite/sdk-for-cli";
101286
101287
  var GITHUB_RELEASES_URL = `https://github.com/${GITHUB_REPO}/releases`;
101287
101288
  var DEFAULT_ENDPOINT = "https://cloud.appwrite.io/v1";
101288
101289
  var OAUTH2_CLIENT_ID = "appwrite-cli";
101289
- var OAUTH2_SCOPES = "openid email profile account.admin";
101290
+ var OAUTH2_SCOPES = "openid email profile all";
101290
101291
  var CONFIG_RESOURCE_KEYS = [
101291
101292
  "databases",
101292
101293
  "functions",
@@ -101798,6 +101799,9 @@ Query.distanceEqual = (attribute, values, distance, meters = true) => new Query(
101798
101799
  Query.distanceNotEqual = (attribute, values, distance, meters = true) => new Query("distanceNotEqual", attribute, [[values, distance, meters]]).toString();
101799
101800
  Query.distanceGreaterThan = (attribute, values, distance, meters = true) => new Query("distanceGreaterThan", attribute, [[values, distance, meters]]).toString();
101800
101801
  Query.distanceLessThan = (attribute, values, distance, meters = true) => new Query("distanceLessThan", attribute, [[values, distance, meters]]).toString();
101802
+ Query.vectorDot = (attribute, vector) => new Query("vectorDot", attribute, [vector]).toString();
101803
+ Query.vectorCosine = (attribute, vector) => new Query("vectorCosine", attribute, [vector]).toString();
101804
+ Query.vectorEuclidean = (attribute, vector) => new Query("vectorEuclidean", attribute, [vector]).toString();
101801
101805
  Query.intersects = (attribute, values) => new Query("intersects", attribute, [values]).toString();
101802
101806
  Query.notIntersects = (attribute, values) => new Query("notIntersects", attribute, [values]).toString();
101803
101807
  Query.crosses = (attribute, values) => new Query("crosses", attribute, [values]).toString();
@@ -101862,6 +101866,7 @@ var Client = class _Client {
101862
101866
  project: "",
101863
101867
  key: "",
101864
101868
  jwt: "",
101869
+ bearer: "",
101865
101870
  locale: "",
101866
101871
  mode: "",
101867
101872
  cookie: "",
@@ -101878,7 +101883,7 @@ var Client = class _Client {
101878
101883
  "x-sdk-name": "Console",
101879
101884
  "x-sdk-platform": "console",
101880
101885
  "x-sdk-language": "web",
101881
- "x-sdk-version": "15.1.1",
101886
+ "x-sdk-version": "15.2.0",
101882
101887
  "X-Appwrite-Response-Format": "1.9.5"
101883
101888
  };
101884
101889
  this.realtime = {
@@ -101929,7 +101934,10 @@ var Client = class _Client {
101929
101934
  return;
101930
101935
  }
101931
101936
  const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : "");
101932
- const queryParams = "project=" + encodedProject;
101937
+ let queryParams = "project=" + encodedProject;
101938
+ if (this.config.jwt) {
101939
+ queryParams += "&jwt=" + encodeURIComponent(this.config.jwt);
101940
+ }
101933
101941
  const url2 = this.config.endpointRealtime + "/realtime?" + queryParams;
101934
101942
  if (url2 !== this.realtime.url || // Check if URL is present
101935
101943
  !this.realtime.socket || // Check if WebSocket has not been created
@@ -102185,6 +102193,20 @@ var Client = class _Client {
102185
102193
  this.config.jwt = value;
102186
102194
  return this;
102187
102195
  }
102196
+ /**
102197
+ * Set Bearer
102198
+ *
102199
+ * The OAuth access token to authenticate with
102200
+ *
102201
+ * @param value string
102202
+ *
102203
+ * @return {this}
102204
+ */
102205
+ setBearer(value) {
102206
+ this.headers["Authorization"] = value;
102207
+ this.config.bearer = value;
102208
+ return this;
102209
+ }
102188
102210
  /**
102189
102211
  * Set Locale
102190
102212
  *
@@ -102556,7 +102578,7 @@ var Client = class _Client {
102556
102578
  }
102557
102579
  call(method_1, url_1) {
102558
102580
  return __awaiter(this, arguments, void 0, function* (method, url2, headers = {}, params = {}, responseType = "json") {
102559
- var _a4, _b;
102581
+ var _a4, _b, _c;
102560
102582
  const { uri, options } = this.prepareRequest(method, url2, headers, params);
102561
102583
  let data = null;
102562
102584
  const response = yield fetch(uri, options);
@@ -102583,7 +102605,7 @@ var Client = class _Client {
102583
102605
  } else {
102584
102606
  responseText = data === null || data === void 0 ? void 0 : data.message;
102585
102607
  }
102586
- throw new AppwriteException(data === null || data === void 0 ? void 0 : data.message, response.status, data === null || data === void 0 ? void 0 : data.type, responseText);
102608
+ throw new AppwriteException((_c = data === null || data === void 0 ? void 0 : data.message) !== null && _c !== void 0 ? _c : responseText, response.status, data === null || data === void 0 ? void 0 : data.type, responseText);
102587
102609
  }
102588
102610
  const cookieFallback = response.headers.get("X-Fallback-Cookies");
102589
102611
  if (typeof window !== "undefined" && window.localStorage && cookieFallback && this.shouldUseFallbackCredentials(url2)) {
@@ -104197,7 +104219,7 @@ var Account = class {
104197
104219
  };
104198
104220
  }
104199
104221
  const provider = params.provider;
104200
- const success24 = params.success;
104222
+ const success25 = params.success;
104201
104223
  const failure = params.failure;
104202
104224
  const scopes = params.scopes;
104203
104225
  if (typeof provider === "undefined") {
@@ -104205,8 +104227,8 @@ var Account = class {
104205
104227
  }
104206
104228
  const apiPath = "/account/sessions/oauth2/{provider}".replace("{provider}", encodeURIComponent(String(provider)));
104207
104229
  const payload = {};
104208
- if (typeof success24 !== "undefined") {
104209
- payload["success"] = success24;
104230
+ if (typeof success25 !== "undefined") {
104231
+ payload["success"] = success25;
104210
104232
  }
104211
104233
  if (typeof failure !== "undefined") {
104212
104234
  payload["failure"] = failure;
@@ -104569,7 +104591,7 @@ var Account = class {
104569
104591
  };
104570
104592
  }
104571
104593
  const provider = params.provider;
104572
- const success24 = params.success;
104594
+ const success25 = params.success;
104573
104595
  const failure = params.failure;
104574
104596
  const scopes = params.scopes;
104575
104597
  if (typeof provider === "undefined") {
@@ -104577,8 +104599,8 @@ var Account = class {
104577
104599
  }
104578
104600
  const apiPath = "/account/tokens/oauth2/{provider}".replace("{provider}", encodeURIComponent(String(provider)));
104579
104601
  const payload = {};
104580
- if (typeof success24 !== "undefined") {
104581
- payload["success"] = success24;
104602
+ if (typeof success25 !== "undefined") {
104603
+ payload["success"] = success25;
104582
104604
  }
104583
104605
  if (typeof failure !== "undefined") {
104584
104606
  payload["failure"] = failure;
@@ -105142,13 +105164,15 @@ var Backups = class {
105142
105164
  archiveId: paramsOrFirst,
105143
105165
  services: rest[0],
105144
105166
  newResourceId: rest[1],
105145
- newResourceName: rest[2]
105167
+ newResourceName: rest[2],
105168
+ newSpecification: rest[3]
105146
105169
  };
105147
105170
  }
105148
105171
  const archiveId = params.archiveId;
105149
105172
  const services = params.services;
105150
105173
  const newResourceId = params.newResourceId;
105151
105174
  const newResourceName = params.newResourceName;
105175
+ const newSpecification = params.newSpecification;
105152
105176
  if (typeof archiveId === "undefined") {
105153
105177
  throw new AppwriteException('Missing required parameter: "archiveId"');
105154
105178
  }
@@ -105169,6 +105193,9 @@ var Backups = class {
105169
105193
  if (typeof newResourceName !== "undefined") {
105170
105194
  payload["newResourceName"] = newResourceName;
105171
105195
  }
105196
+ if (typeof newSpecification !== "undefined") {
105197
+ payload["newSpecification"] = newSpecification;
105198
+ }
105172
105199
  const uri = new URL(this.client.config.endpoint + apiPath);
105173
105200
  const apiHeaders = {
105174
105201
  "X-Appwrite-Project": this.client.config.project,
@@ -105270,6 +105297,38 @@ var Console = class {
105270
105297
  };
105271
105298
  return this.client.call("get", uri, apiHeaders, payload);
105272
105299
  }
105300
+ listDatabases(paramsOrFirst, ...rest) {
105301
+ let params;
105302
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
105303
+ params = paramsOrFirst || {};
105304
+ } else {
105305
+ params = {
105306
+ queries: paramsOrFirst,
105307
+ search: rest[0],
105308
+ total: rest[1]
105309
+ };
105310
+ }
105311
+ const queries = params.queries;
105312
+ const search = params.search;
105313
+ const total = params.total;
105314
+ const apiPath = "/console/databases";
105315
+ const payload = {};
105316
+ if (typeof queries !== "undefined") {
105317
+ payload["queries"] = queries;
105318
+ }
105319
+ if (typeof search !== "undefined") {
105320
+ payload["search"] = search;
105321
+ }
105322
+ if (typeof total !== "undefined") {
105323
+ payload["total"] = total;
105324
+ }
105325
+ const uri = new URL(this.client.config.endpoint + apiPath);
105326
+ const apiHeaders = {
105327
+ "X-Appwrite-Project": this.client.config.project,
105328
+ "accept": "application/json"
105329
+ };
105330
+ return this.client.call("get", uri, apiHeaders, payload);
105331
+ }
105273
105332
  /**
105274
105333
  * List all OAuth2 providers supported by the Appwrite server, along with the parameters required to configure each provider. The response excludes mock providers but includes sandbox providers.
105275
105334
  *
@@ -105330,6 +105389,23 @@ var Console = class {
105330
105389
  };
105331
105390
  return this.client.call("get", uri, apiHeaders, payload);
105332
105391
  }
105392
+ /**
105393
+ * Get the catalog of Postgres extensions that can be installed on a dedicated Postgres database.
105394
+ *
105395
+ *
105396
+ * @throws {AppwriteException}
105397
+ * @returns {Promise<Models.PostgresExtensionList>}
105398
+ */
105399
+ listPostgresExtensions() {
105400
+ const apiPath = "/console/postgres-extensions";
105401
+ const payload = {};
105402
+ const uri = new URL(this.client.config.endpoint + apiPath);
105403
+ const apiHeaders = {
105404
+ "X-Appwrite-Project": this.client.config.project,
105405
+ "accept": "application/json"
105406
+ };
105407
+ return this.client.call("get", uri, apiHeaders, payload);
105408
+ }
105333
105409
  getProgram(paramsOrFirst) {
105334
105410
  let params;
105335
105411
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -108794,43 +108870,6 @@ var Databases = class {
108794
108870
  };
108795
108871
  return this.client.call("delete", uri, apiHeaders, payload);
108796
108872
  }
108797
- listDocumentLogs(paramsOrFirst, ...rest) {
108798
- let params;
108799
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
108800
- params = paramsOrFirst || {};
108801
- } else {
108802
- params = {
108803
- databaseId: paramsOrFirst,
108804
- collectionId: rest[0],
108805
- documentId: rest[1],
108806
- queries: rest[2]
108807
- };
108808
- }
108809
- const databaseId = params.databaseId;
108810
- const collectionId = params.collectionId;
108811
- const documentId = params.documentId;
108812
- const queries = params.queries;
108813
- if (typeof databaseId === "undefined") {
108814
- throw new AppwriteException('Missing required parameter: "databaseId"');
108815
- }
108816
- if (typeof collectionId === "undefined") {
108817
- throw new AppwriteException('Missing required parameter: "collectionId"');
108818
- }
108819
- if (typeof documentId === "undefined") {
108820
- throw new AppwriteException('Missing required parameter: "documentId"');
108821
- }
108822
- const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{collectionId}", encodeURIComponent(String(collectionId))).replace("{documentId}", encodeURIComponent(String(documentId)));
108823
- const payload = {};
108824
- if (typeof queries !== "undefined") {
108825
- payload["queries"] = queries;
108826
- }
108827
- const uri = new URL(this.client.config.endpoint + apiPath);
108828
- const apiHeaders = {
108829
- "X-Appwrite-Project": this.client.config.project,
108830
- "accept": "application/json"
108831
- };
108832
- return this.client.call("get", uri, apiHeaders, payload);
108833
- }
108834
108873
  decrementDocumentAttribute(paramsOrFirst, ...rest) {
108835
108874
  let params;
108836
108875
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -109100,38 +109139,6 @@ var Databases = class {
109100
109139
  };
109101
109140
  return this.client.call("delete", uri, apiHeaders, payload);
109102
109141
  }
109103
- listCollectionLogs(paramsOrFirst, ...rest) {
109104
- let params;
109105
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
109106
- params = paramsOrFirst || {};
109107
- } else {
109108
- params = {
109109
- databaseId: paramsOrFirst,
109110
- collectionId: rest[0],
109111
- queries: rest[1]
109112
- };
109113
- }
109114
- const databaseId = params.databaseId;
109115
- const collectionId = params.collectionId;
109116
- const queries = params.queries;
109117
- if (typeof databaseId === "undefined") {
109118
- throw new AppwriteException('Missing required parameter: "databaseId"');
109119
- }
109120
- if (typeof collectionId === "undefined") {
109121
- throw new AppwriteException('Missing required parameter: "collectionId"');
109122
- }
109123
- const apiPath = "/databases/{databaseId}/collections/{collectionId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{collectionId}", encodeURIComponent(String(collectionId)));
109124
- const payload = {};
109125
- if (typeof queries !== "undefined") {
109126
- payload["queries"] = queries;
109127
- }
109128
- const uri = new URL(this.client.config.endpoint + apiPath);
109129
- const apiHeaders = {
109130
- "X-Appwrite-Project": this.client.config.project,
109131
- "accept": "application/json"
109132
- };
109133
- return this.client.call("get", uri, apiHeaders, payload);
109134
- }
109135
109142
  getCollectionUsage(paramsOrFirst, ...rest) {
109136
109143
  let params;
109137
109144
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -109164,33 +109171,6 @@ var Databases = class {
109164
109171
  };
109165
109172
  return this.client.call("get", uri, apiHeaders, payload);
109166
109173
  }
109167
- listLogs(paramsOrFirst, ...rest) {
109168
- let params;
109169
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
109170
- params = paramsOrFirst || {};
109171
- } else {
109172
- params = {
109173
- databaseId: paramsOrFirst,
109174
- queries: rest[0]
109175
- };
109176
- }
109177
- const databaseId = params.databaseId;
109178
- const queries = params.queries;
109179
- if (typeof databaseId === "undefined") {
109180
- throw new AppwriteException('Missing required parameter: "databaseId"');
109181
- }
109182
- const apiPath = "/databases/{databaseId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId)));
109183
- const payload = {};
109184
- if (typeof queries !== "undefined") {
109185
- payload["queries"] = queries;
109186
- }
109187
- const uri = new URL(this.client.config.endpoint + apiPath);
109188
- const apiHeaders = {
109189
- "X-Appwrite-Project": this.client.config.project,
109190
- "accept": "application/json"
109191
- };
109192
- return this.client.call("get", uri, apiHeaders, payload);
109193
- }
109194
109174
  getUsage(paramsOrFirst, ...rest) {
109195
109175
  let params;
109196
109176
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -110618,6 +110598,39 @@ var Health = class {
110618
110598
  };
110619
110599
  return this.client.call("get", uri, apiHeaders, payload);
110620
110600
  }
110601
+ /**
110602
+ * Check the Appwrite geo service is up and connection is successful.
110603
+ *
110604
+ * @throws {AppwriteException}
110605
+ * @returns {Promise<Models.HealthStatus>}
110606
+ */
110607
+ getGeo() {
110608
+ const apiPath = "/health/geo";
110609
+ const payload = {};
110610
+ const uri = new URL(this.client.config.endpoint + apiPath);
110611
+ const apiHeaders = {
110612
+ "X-Appwrite-Project": this.client.config.project,
110613
+ "accept": "application/json"
110614
+ };
110615
+ return this.client.call("get", uri, apiHeaders, payload);
110616
+ }
110617
+ /**
110618
+ * Get the health status of the premium geo service. This endpoint probes the internal `appwrite-geo-premium` service used for premium IP-to-location lookups (organizations or projects on the premium geo DB addon) and returns a `pass` status when reachable.
110619
+ *
110620
+ *
110621
+ * @throws {AppwriteException}
110622
+ * @returns {Promise<Models.HealthStatus>}
110623
+ */
110624
+ getGeoPremium() {
110625
+ const apiPath = "/health/geo-premium";
110626
+ const payload = {};
110627
+ const uri = new URL(this.client.config.endpoint + apiPath);
110628
+ const apiHeaders = {
110629
+ "X-Appwrite-Project": this.client.config.project,
110630
+ "accept": "application/json"
110631
+ };
110632
+ return this.client.call("get", uri, apiHeaders, payload);
110633
+ }
110621
110634
  /**
110622
110635
  * Check the Appwrite pub-sub servers are up and connection is successful.
110623
110636
  *
@@ -110842,7 +110855,7 @@ var Health = class {
110842
110855
  };
110843
110856
  return this.client.call("get", uri, apiHeaders, payload);
110844
110857
  }
110845
- getQueueLogs(paramsOrFirst) {
110858
+ getQueueMails(paramsOrFirst) {
110846
110859
  let params;
110847
110860
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110848
110861
  params = paramsOrFirst || {};
@@ -110852,7 +110865,7 @@ var Health = class {
110852
110865
  };
110853
110866
  }
110854
110867
  const threshold = params.threshold;
110855
- const apiPath = "/health/queue/logs";
110868
+ const apiPath = "/health/queue/mails";
110856
110869
  const payload = {};
110857
110870
  if (typeof threshold !== "undefined") {
110858
110871
  payload["threshold"] = threshold;
@@ -110864,7 +110877,7 @@ var Health = class {
110864
110877
  };
110865
110878
  return this.client.call("get", uri, apiHeaders, payload);
110866
110879
  }
110867
- getQueueMails(paramsOrFirst) {
110880
+ getQueueMessaging(paramsOrFirst) {
110868
110881
  let params;
110869
110882
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110870
110883
  params = paramsOrFirst || {};
@@ -110874,7 +110887,7 @@ var Health = class {
110874
110887
  };
110875
110888
  }
110876
110889
  const threshold = params.threshold;
110877
- const apiPath = "/health/queue/mails";
110890
+ const apiPath = "/health/queue/messaging";
110878
110891
  const payload = {};
110879
110892
  if (typeof threshold !== "undefined") {
110880
110893
  payload["threshold"] = threshold;
@@ -110886,7 +110899,7 @@ var Health = class {
110886
110899
  };
110887
110900
  return this.client.call("get", uri, apiHeaders, payload);
110888
110901
  }
110889
- getQueueMessaging(paramsOrFirst) {
110902
+ getQueueMigrations(paramsOrFirst) {
110890
110903
  let params;
110891
110904
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110892
110905
  params = paramsOrFirst || {};
@@ -110896,7 +110909,7 @@ var Health = class {
110896
110909
  };
110897
110910
  }
110898
110911
  const threshold = params.threshold;
110899
- const apiPath = "/health/queue/messaging";
110912
+ const apiPath = "/health/queue/migrations";
110900
110913
  const payload = {};
110901
110914
  if (typeof threshold !== "undefined") {
110902
110915
  payload["threshold"] = threshold;
@@ -110908,7 +110921,7 @@ var Health = class {
110908
110921
  };
110909
110922
  return this.client.call("get", uri, apiHeaders, payload);
110910
110923
  }
110911
- getQueueMigrations(paramsOrFirst) {
110924
+ getQueueNotifications(paramsOrFirst) {
110912
110925
  let params;
110913
110926
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110914
110927
  params = paramsOrFirst || {};
@@ -110918,7 +110931,7 @@ var Health = class {
110918
110931
  };
110919
110932
  }
110920
110933
  const threshold = params.threshold;
110921
- const apiPath = "/health/queue/migrations";
110934
+ const apiPath = "/health/queue/notifications";
110922
110935
  const payload = {};
110923
110936
  if (typeof threshold !== "undefined") {
110924
110937
  payload["threshold"] = threshold;
@@ -111099,7 +111112,7 @@ var Locale = class {
111099
111112
  * ([IP Geolocation by DB-IP](https://db-ip.com))
111100
111113
  *
111101
111114
  * @throws {AppwriteException}
111102
- * @returns {Promise<Models.Locale>}
111115
+ * @returns {Promise<Models.CloudLocale>}
111103
111116
  */
111104
111117
  get() {
111105
111118
  const apiPath = "/locale";
@@ -111922,7 +111935,7 @@ var Messaging = class {
111922
111935
  };
111923
111936
  return this.client.call("delete", uri, apiHeaders, payload);
111924
111937
  }
111925
- listMessageLogs(paramsOrFirst, ...rest) {
111938
+ listTargets(paramsOrFirst, ...rest) {
111926
111939
  let params;
111927
111940
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
111928
111941
  params = paramsOrFirst || {};
@@ -111939,7 +111952,7 @@ var Messaging = class {
111939
111952
  if (typeof messageId === "undefined") {
111940
111953
  throw new AppwriteException('Missing required parameter: "messageId"');
111941
111954
  }
111942
- const apiPath = "/messaging/messages/{messageId}/logs".replace("{messageId}", encodeURIComponent(String(messageId)));
111955
+ const apiPath = "/messaging/messages/{messageId}/targets".replace("{messageId}", encodeURIComponent(String(messageId)));
111943
111956
  const payload = {};
111944
111957
  if (typeof queries !== "undefined") {
111945
111958
  payload["queries"] = queries;
@@ -111954,28 +111967,28 @@ var Messaging = class {
111954
111967
  };
111955
111968
  return this.client.call("get", uri, apiHeaders, payload);
111956
111969
  }
111957
- listTargets(paramsOrFirst, ...rest) {
111970
+ listProviders(paramsOrFirst, ...rest) {
111958
111971
  let params;
111959
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
111972
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
111960
111973
  params = paramsOrFirst || {};
111961
111974
  } else {
111962
111975
  params = {
111963
- messageId: paramsOrFirst,
111964
- queries: rest[0],
111976
+ queries: paramsOrFirst,
111977
+ search: rest[0],
111965
111978
  total: rest[1]
111966
111979
  };
111967
111980
  }
111968
- const messageId = params.messageId;
111969
111981
  const queries = params.queries;
111982
+ const search = params.search;
111970
111983
  const total = params.total;
111971
- if (typeof messageId === "undefined") {
111972
- throw new AppwriteException('Missing required parameter: "messageId"');
111973
- }
111974
- const apiPath = "/messaging/messages/{messageId}/targets".replace("{messageId}", encodeURIComponent(String(messageId)));
111984
+ const apiPath = "/messaging/providers";
111975
111985
  const payload = {};
111976
111986
  if (typeof queries !== "undefined") {
111977
111987
  payload["queries"] = queries;
111978
111988
  }
111989
+ if (typeof search !== "undefined") {
111990
+ payload["search"] = search;
111991
+ }
111979
111992
  if (typeof total !== "undefined") {
111980
111993
  payload["total"] = total;
111981
111994
  }
@@ -111986,103 +111999,71 @@ var Messaging = class {
111986
111999
  };
111987
112000
  return this.client.call("get", uri, apiHeaders, payload);
111988
112001
  }
111989
- listProviders(paramsOrFirst, ...rest) {
112002
+ createApnsProvider(paramsOrFirst, ...rest) {
111990
112003
  let params;
111991
- if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
112004
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
111992
112005
  params = paramsOrFirst || {};
111993
112006
  } else {
111994
112007
  params = {
111995
- queries: paramsOrFirst,
111996
- search: rest[0],
111997
- total: rest[1]
112008
+ providerId: paramsOrFirst,
112009
+ name: rest[0],
112010
+ authKey: rest[1],
112011
+ authKeyId: rest[2],
112012
+ teamId: rest[3],
112013
+ bundleId: rest[4],
112014
+ sandbox: rest[5],
112015
+ enabled: rest[6]
111998
112016
  };
111999
112017
  }
112000
- const queries = params.queries;
112001
- const search = params.search;
112002
- const total = params.total;
112003
- const apiPath = "/messaging/providers";
112018
+ const providerId = params.providerId;
112019
+ const name = params.name;
112020
+ const authKey = params.authKey;
112021
+ const authKeyId = params.authKeyId;
112022
+ const teamId = params.teamId;
112023
+ const bundleId = params.bundleId;
112024
+ const sandbox = params.sandbox;
112025
+ const enabled = params.enabled;
112026
+ if (typeof providerId === "undefined") {
112027
+ throw new AppwriteException('Missing required parameter: "providerId"');
112028
+ }
112029
+ if (typeof name === "undefined") {
112030
+ throw new AppwriteException('Missing required parameter: "name"');
112031
+ }
112032
+ const apiPath = "/messaging/providers/apns";
112004
112033
  const payload = {};
112005
- if (typeof queries !== "undefined") {
112006
- payload["queries"] = queries;
112034
+ if (typeof providerId !== "undefined") {
112035
+ payload["providerId"] = providerId;
112007
112036
  }
112008
- if (typeof search !== "undefined") {
112009
- payload["search"] = search;
112037
+ if (typeof name !== "undefined") {
112038
+ payload["name"] = name;
112010
112039
  }
112011
- if (typeof total !== "undefined") {
112012
- payload["total"] = total;
112040
+ if (typeof authKey !== "undefined") {
112041
+ payload["authKey"] = authKey;
112042
+ }
112043
+ if (typeof authKeyId !== "undefined") {
112044
+ payload["authKeyId"] = authKeyId;
112045
+ }
112046
+ if (typeof teamId !== "undefined") {
112047
+ payload["teamId"] = teamId;
112048
+ }
112049
+ if (typeof bundleId !== "undefined") {
112050
+ payload["bundleId"] = bundleId;
112051
+ }
112052
+ if (typeof sandbox !== "undefined") {
112053
+ payload["sandbox"] = sandbox;
112054
+ }
112055
+ if (typeof enabled !== "undefined") {
112056
+ payload["enabled"] = enabled;
112013
112057
  }
112014
112058
  const uri = new URL(this.client.config.endpoint + apiPath);
112015
112059
  const apiHeaders = {
112016
112060
  "X-Appwrite-Project": this.client.config.project,
112061
+ "content-type": "application/json",
112017
112062
  "accept": "application/json"
112018
112063
  };
112019
- return this.client.call("get", uri, apiHeaders, payload);
112064
+ return this.client.call("post", uri, apiHeaders, payload);
112020
112065
  }
112021
- createApnsProvider(paramsOrFirst, ...rest) {
112022
- let params;
112023
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
112024
- params = paramsOrFirst || {};
112025
- } else {
112026
- params = {
112027
- providerId: paramsOrFirst,
112028
- name: rest[0],
112029
- authKey: rest[1],
112030
- authKeyId: rest[2],
112031
- teamId: rest[3],
112032
- bundleId: rest[4],
112033
- sandbox: rest[5],
112034
- enabled: rest[6]
112035
- };
112036
- }
112037
- const providerId = params.providerId;
112038
- const name = params.name;
112039
- const authKey = params.authKey;
112040
- const authKeyId = params.authKeyId;
112041
- const teamId = params.teamId;
112042
- const bundleId = params.bundleId;
112043
- const sandbox = params.sandbox;
112044
- const enabled = params.enabled;
112045
- if (typeof providerId === "undefined") {
112046
- throw new AppwriteException('Missing required parameter: "providerId"');
112047
- }
112048
- if (typeof name === "undefined") {
112049
- throw new AppwriteException('Missing required parameter: "name"');
112050
- }
112051
- const apiPath = "/messaging/providers/apns";
112052
- const payload = {};
112053
- if (typeof providerId !== "undefined") {
112054
- payload["providerId"] = providerId;
112055
- }
112056
- if (typeof name !== "undefined") {
112057
- payload["name"] = name;
112058
- }
112059
- if (typeof authKey !== "undefined") {
112060
- payload["authKey"] = authKey;
112061
- }
112062
- if (typeof authKeyId !== "undefined") {
112063
- payload["authKeyId"] = authKeyId;
112064
- }
112065
- if (typeof teamId !== "undefined") {
112066
- payload["teamId"] = teamId;
112067
- }
112068
- if (typeof bundleId !== "undefined") {
112069
- payload["bundleId"] = bundleId;
112070
- }
112071
- if (typeof sandbox !== "undefined") {
112072
- payload["sandbox"] = sandbox;
112073
- }
112074
- if (typeof enabled !== "undefined") {
112075
- payload["enabled"] = enabled;
112076
- }
112077
- const uri = new URL(this.client.config.endpoint + apiPath);
112078
- const apiHeaders = {
112079
- "X-Appwrite-Project": this.client.config.project,
112080
- "content-type": "application/json",
112081
- "accept": "application/json"
112082
- };
112083
- return this.client.call("post", uri, apiHeaders, payload);
112084
- }
112085
- createAPNSProvider(paramsOrFirst, ...rest) {
112066
+ createAPNSProvider(paramsOrFirst, ...rest) {
112086
112067
  let params;
112087
112068
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
112088
112069
  params = paramsOrFirst || {};
@@ -113878,70 +113859,6 @@ var Messaging = class {
113878
113859
  };
113879
113860
  return this.client.call("delete", uri, apiHeaders, payload);
113880
113861
  }
113881
- listProviderLogs(paramsOrFirst, ...rest) {
113882
- let params;
113883
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
113884
- params = paramsOrFirst || {};
113885
- } else {
113886
- params = {
113887
- providerId: paramsOrFirst,
113888
- queries: rest[0],
113889
- total: rest[1]
113890
- };
113891
- }
113892
- const providerId = params.providerId;
113893
- const queries = params.queries;
113894
- const total = params.total;
113895
- if (typeof providerId === "undefined") {
113896
- throw new AppwriteException('Missing required parameter: "providerId"');
113897
- }
113898
- const apiPath = "/messaging/providers/{providerId}/logs".replace("{providerId}", encodeURIComponent(String(providerId)));
113899
- const payload = {};
113900
- if (typeof queries !== "undefined") {
113901
- payload["queries"] = queries;
113902
- }
113903
- if (typeof total !== "undefined") {
113904
- payload["total"] = total;
113905
- }
113906
- const uri = new URL(this.client.config.endpoint + apiPath);
113907
- const apiHeaders = {
113908
- "X-Appwrite-Project": this.client.config.project,
113909
- "accept": "application/json"
113910
- };
113911
- return this.client.call("get", uri, apiHeaders, payload);
113912
- }
113913
- listSubscriberLogs(paramsOrFirst, ...rest) {
113914
- let params;
113915
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
113916
- params = paramsOrFirst || {};
113917
- } else {
113918
- params = {
113919
- subscriberId: paramsOrFirst,
113920
- queries: rest[0],
113921
- total: rest[1]
113922
- };
113923
- }
113924
- const subscriberId = params.subscriberId;
113925
- const queries = params.queries;
113926
- const total = params.total;
113927
- if (typeof subscriberId === "undefined") {
113928
- throw new AppwriteException('Missing required parameter: "subscriberId"');
113929
- }
113930
- const apiPath = "/messaging/subscribers/{subscriberId}/logs".replace("{subscriberId}", encodeURIComponent(String(subscriberId)));
113931
- const payload = {};
113932
- if (typeof queries !== "undefined") {
113933
- payload["queries"] = queries;
113934
- }
113935
- if (typeof total !== "undefined") {
113936
- payload["total"] = total;
113937
- }
113938
- const uri = new URL(this.client.config.endpoint + apiPath);
113939
- const apiHeaders = {
113940
- "X-Appwrite-Project": this.client.config.project,
113941
- "accept": "application/json"
113942
- };
113943
- return this.client.call("get", uri, apiHeaders, payload);
113944
- }
113945
113862
  listTopics(paramsOrFirst, ...rest) {
113946
113863
  let params;
113947
113864
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -114090,38 +114007,6 @@ var Messaging = class {
114090
114007
  };
114091
114008
  return this.client.call("delete", uri, apiHeaders, payload);
114092
114009
  }
114093
- listTopicLogs(paramsOrFirst, ...rest) {
114094
- let params;
114095
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
114096
- params = paramsOrFirst || {};
114097
- } else {
114098
- params = {
114099
- topicId: paramsOrFirst,
114100
- queries: rest[0],
114101
- total: rest[1]
114102
- };
114103
- }
114104
- const topicId = params.topicId;
114105
- const queries = params.queries;
114106
- const total = params.total;
114107
- if (typeof topicId === "undefined") {
114108
- throw new AppwriteException('Missing required parameter: "topicId"');
114109
- }
114110
- const apiPath = "/messaging/topics/{topicId}/logs".replace("{topicId}", encodeURIComponent(String(topicId)));
114111
- const payload = {};
114112
- if (typeof queries !== "undefined") {
114113
- payload["queries"] = queries;
114114
- }
114115
- if (typeof total !== "undefined") {
114116
- payload["total"] = total;
114117
- }
114118
- const uri = new URL(this.client.config.endpoint + apiPath);
114119
- const apiHeaders = {
114120
- "X-Appwrite-Project": this.client.config.project,
114121
- "accept": "application/json"
114122
- };
114123
- return this.client.call("get", uri, apiHeaders, payload);
114124
- }
114125
114010
  listSubscribers(paramsOrFirst, ...rest) {
114126
114011
  let params;
114127
114012
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -115048,6 +114933,64 @@ var Migrations = class {
115048
114933
  return this.client.call("delete", uri, apiHeaders, payload);
115049
114934
  }
115050
114935
  };
114936
+ var Notifications = class {
114937
+ constructor(client2) {
114938
+ this.client = client2;
114939
+ }
114940
+ list(paramsOrFirst) {
114941
+ let params;
114942
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
114943
+ params = paramsOrFirst || {};
114944
+ } else {
114945
+ params = {
114946
+ queries: paramsOrFirst
114947
+ };
114948
+ }
114949
+ const queries = params.queries;
114950
+ const apiPath = "/notifications";
114951
+ const payload = {};
114952
+ if (typeof queries !== "undefined") {
114953
+ payload["queries"] = queries;
114954
+ }
114955
+ const uri = new URL(this.client.config.endpoint + apiPath);
114956
+ const apiHeaders = {
114957
+ "X-Appwrite-Project": this.client.config.project,
114958
+ "accept": "application/json"
114959
+ };
114960
+ return this.client.call("get", uri, apiHeaders, payload);
114961
+ }
114962
+ update(paramsOrFirst, ...rest) {
114963
+ let params;
114964
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
114965
+ params = paramsOrFirst || {};
114966
+ } else {
114967
+ params = {
114968
+ notificationId: paramsOrFirst,
114969
+ read: rest[0]
114970
+ };
114971
+ }
114972
+ const notificationId = params.notificationId;
114973
+ const read = params.read;
114974
+ if (typeof notificationId === "undefined") {
114975
+ throw new AppwriteException('Missing required parameter: "notificationId"');
114976
+ }
114977
+ if (typeof read === "undefined") {
114978
+ throw new AppwriteException('Missing required parameter: "read"');
114979
+ }
114980
+ const apiPath = "/notifications/{notificationId}".replace("{notificationId}", encodeURIComponent(String(notificationId)));
114981
+ const payload = {};
114982
+ if (typeof read !== "undefined") {
114983
+ payload["read"] = read;
114984
+ }
114985
+ const uri = new URL(this.client.config.endpoint + apiPath);
114986
+ const apiHeaders = {
114987
+ "X-Appwrite-Project": this.client.config.project,
114988
+ "content-type": "application/json",
114989
+ "accept": "application/json"
114990
+ };
114991
+ return this.client.call("patch", uri, apiHeaders, payload);
114992
+ }
114993
+ };
115051
114994
  var Oauth2 = class {
115052
114995
  constructor(client2) {
115053
114996
  this.client = client2;
@@ -115059,11 +115002,13 @@ var Oauth2 = class {
115059
115002
  } else {
115060
115003
  params = {
115061
115004
  grantId: paramsOrFirst,
115062
- authorizationDetails: rest[0]
115005
+ authorizationDetails: rest[0],
115006
+ scope: rest[1]
115063
115007
  };
115064
115008
  }
115065
115009
  const grantId = params.grantId;
115066
115010
  const authorizationDetails = params.authorizationDetails;
115011
+ const scope = params.scope;
115067
115012
  if (typeof grantId === "undefined") {
115068
115013
  throw new AppwriteException('Missing required parameter: "grantId"');
115069
115014
  }
@@ -115075,6 +115020,9 @@ var Oauth2 = class {
115075
115020
  if (typeof authorizationDetails !== "undefined") {
115076
115021
  payload["authorization_details"] = authorizationDetails;
115077
115022
  }
115023
+ if (typeof scope !== "undefined") {
115024
+ payload["scope"] = scope;
115025
+ }
115078
115026
  const uri = new URL(this.client.config.endpoint + apiPath);
115079
115027
  const apiHeaders = {
115080
115028
  "content-type": "application/json",
@@ -115084,7 +115032,7 @@ var Oauth2 = class {
115084
115032
  }
115085
115033
  authorize(paramsOrFirst, ...rest) {
115086
115034
  let params;
115087
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
115035
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
115088
115036
  params = paramsOrFirst || {};
115089
115037
  } else {
115090
115038
  params = {
@@ -115099,7 +115047,8 @@ var Oauth2 = class {
115099
115047
  prompt: rest[7],
115100
115048
  maxAge: rest[8],
115101
115049
  authorizationDetails: rest[9],
115102
- resource: rest[10]
115050
+ resource: rest[10],
115051
+ requestUri: rest[11]
115103
115052
  };
115104
115053
  }
115105
115054
  const clientId = params.clientId;
@@ -115114,18 +115063,7 @@ var Oauth2 = class {
115114
115063
  const maxAge = params.maxAge;
115115
115064
  const authorizationDetails = params.authorizationDetails;
115116
115065
  const resource = params.resource;
115117
- if (typeof clientId === "undefined") {
115118
- throw new AppwriteException('Missing required parameter: "clientId"');
115119
- }
115120
- if (typeof redirectUri === "undefined") {
115121
- throw new AppwriteException('Missing required parameter: "redirectUri"');
115122
- }
115123
- if (typeof responseType === "undefined") {
115124
- throw new AppwriteException('Missing required parameter: "responseType"');
115125
- }
115126
- if (typeof scope === "undefined") {
115127
- throw new AppwriteException('Missing required parameter: "scope"');
115128
- }
115066
+ const requestUri = params.requestUri;
115129
115067
  const apiPath = "/oauth2/{project_id}/authorize".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
115130
115068
  const payload = {};
115131
115069
  if (typeof clientId !== "undefined") {
@@ -115164,6 +115102,9 @@ var Oauth2 = class {
115164
115102
  if (typeof resource !== "undefined") {
115165
115103
  payload["resource"] = resource;
115166
115104
  }
115105
+ if (typeof requestUri !== "undefined") {
115106
+ payload["request_uri"] = requestUri;
115107
+ }
115167
115108
  const uri = new URL(this.client.config.endpoint + apiPath);
115168
115109
  const apiHeaders = {
115169
115110
  "accept": "application/json"
@@ -115299,6 +115240,157 @@ var Oauth2 = class {
115299
115240
  };
115300
115241
  return this.client.call("get", uri, apiHeaders, payload);
115301
115242
  }
115243
+ listOrganizations(paramsOrFirst, ...rest) {
115244
+ let params;
115245
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
115246
+ params = paramsOrFirst || {};
115247
+ } else {
115248
+ params = {
115249
+ limit: paramsOrFirst,
115250
+ offset: rest[0],
115251
+ search: rest[1]
115252
+ };
115253
+ }
115254
+ const limit = params.limit;
115255
+ const offset = params.offset;
115256
+ const search = params.search;
115257
+ const apiPath = "/oauth2/{project_id}/organizations".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
115258
+ const payload = {};
115259
+ if (typeof limit !== "undefined") {
115260
+ payload["limit"] = limit;
115261
+ }
115262
+ if (typeof offset !== "undefined") {
115263
+ payload["offset"] = offset;
115264
+ }
115265
+ if (typeof search !== "undefined") {
115266
+ payload["search"] = search;
115267
+ }
115268
+ const uri = new URL(this.client.config.endpoint + apiPath);
115269
+ const apiHeaders = {
115270
+ "accept": "application/json"
115271
+ };
115272
+ return this.client.call("get", uri, apiHeaders, payload);
115273
+ }
115274
+ createPAR(paramsOrFirst, ...rest) {
115275
+ let params;
115276
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
115277
+ params = paramsOrFirst || {};
115278
+ } else {
115279
+ params = {
115280
+ clientId: paramsOrFirst,
115281
+ redirectUri: rest[0],
115282
+ responseType: rest[1],
115283
+ scope: rest[2],
115284
+ state: rest[3],
115285
+ nonce: rest[4],
115286
+ codeChallenge: rest[5],
115287
+ codeChallengeMethod: rest[6],
115288
+ prompt: rest[7],
115289
+ maxAge: rest[8],
115290
+ authorizationDetails: rest[9],
115291
+ resource: rest[10]
115292
+ };
115293
+ }
115294
+ const clientId = params.clientId;
115295
+ const redirectUri = params.redirectUri;
115296
+ const responseType = params.responseType;
115297
+ const scope = params.scope;
115298
+ const state = params.state;
115299
+ const nonce = params.nonce;
115300
+ const codeChallenge = params.codeChallenge;
115301
+ const codeChallengeMethod = params.codeChallengeMethod;
115302
+ const prompt = params.prompt;
115303
+ const maxAge = params.maxAge;
115304
+ const authorizationDetails = params.authorizationDetails;
115305
+ const resource = params.resource;
115306
+ if (typeof clientId === "undefined") {
115307
+ throw new AppwriteException('Missing required parameter: "clientId"');
115308
+ }
115309
+ if (typeof redirectUri === "undefined") {
115310
+ throw new AppwriteException('Missing required parameter: "redirectUri"');
115311
+ }
115312
+ if (typeof responseType === "undefined") {
115313
+ throw new AppwriteException('Missing required parameter: "responseType"');
115314
+ }
115315
+ if (typeof scope === "undefined") {
115316
+ throw new AppwriteException('Missing required parameter: "scope"');
115317
+ }
115318
+ const apiPath = "/oauth2/{project_id}/par".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
115319
+ const payload = {};
115320
+ if (typeof clientId !== "undefined") {
115321
+ payload["client_id"] = clientId;
115322
+ }
115323
+ if (typeof redirectUri !== "undefined") {
115324
+ payload["redirect_uri"] = redirectUri;
115325
+ }
115326
+ if (typeof responseType !== "undefined") {
115327
+ payload["response_type"] = responseType;
115328
+ }
115329
+ if (typeof scope !== "undefined") {
115330
+ payload["scope"] = scope;
115331
+ }
115332
+ if (typeof state !== "undefined") {
115333
+ payload["state"] = state;
115334
+ }
115335
+ if (typeof nonce !== "undefined") {
115336
+ payload["nonce"] = nonce;
115337
+ }
115338
+ if (typeof codeChallenge !== "undefined") {
115339
+ payload["code_challenge"] = codeChallenge;
115340
+ }
115341
+ if (typeof codeChallengeMethod !== "undefined") {
115342
+ payload["code_challenge_method"] = codeChallengeMethod;
115343
+ }
115344
+ if (typeof prompt !== "undefined") {
115345
+ payload["prompt"] = prompt;
115346
+ }
115347
+ if (typeof maxAge !== "undefined") {
115348
+ payload["max_age"] = maxAge;
115349
+ }
115350
+ if (typeof authorizationDetails !== "undefined") {
115351
+ payload["authorization_details"] = authorizationDetails;
115352
+ }
115353
+ if (typeof resource !== "undefined") {
115354
+ payload["resource"] = resource;
115355
+ }
115356
+ const uri = new URL(this.client.config.endpoint + apiPath);
115357
+ const apiHeaders = {
115358
+ "content-type": "application/json",
115359
+ "accept": "application/json"
115360
+ };
115361
+ return this.client.call("post", uri, apiHeaders, payload);
115362
+ }
115363
+ listProjects(paramsOrFirst, ...rest) {
115364
+ let params;
115365
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
115366
+ params = paramsOrFirst || {};
115367
+ } else {
115368
+ params = {
115369
+ limit: paramsOrFirst,
115370
+ offset: rest[0],
115371
+ search: rest[1]
115372
+ };
115373
+ }
115374
+ const limit = params.limit;
115375
+ const offset = params.offset;
115376
+ const search = params.search;
115377
+ const apiPath = "/oauth2/{project_id}/projects".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
115378
+ const payload = {};
115379
+ if (typeof limit !== "undefined") {
115380
+ payload["limit"] = limit;
115381
+ }
115382
+ if (typeof offset !== "undefined") {
115383
+ payload["offset"] = offset;
115384
+ }
115385
+ if (typeof search !== "undefined") {
115386
+ payload["search"] = search;
115387
+ }
115388
+ const uri = new URL(this.client.config.endpoint + apiPath);
115389
+ const apiHeaders = {
115390
+ "accept": "application/json"
115391
+ };
115392
+ return this.client.call("get", uri, apiHeaders, payload);
115393
+ }
115302
115394
  reject(paramsOrFirst) {
115303
115395
  let params;
115304
115396
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -115434,6 +115526,64 @@ var Organization = class {
115434
115526
  constructor(client2) {
115435
115527
  this.client = client2;
115436
115528
  }
115529
+ /**
115530
+ * Get the current organization.
115531
+ *
115532
+ * @throws {AppwriteException}
115533
+ * @returns {Promise<Models.Organization<Preferences>>}
115534
+ */
115535
+ get() {
115536
+ const apiPath = "/organization";
115537
+ const payload = {};
115538
+ const uri = new URL(this.client.config.endpoint + apiPath);
115539
+ const apiHeaders = {
115540
+ "X-Appwrite-Project": this.client.config.project,
115541
+ "accept": "application/json"
115542
+ };
115543
+ return this.client.call("get", uri, apiHeaders, payload);
115544
+ }
115545
+ update(paramsOrFirst) {
115546
+ let params;
115547
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
115548
+ params = paramsOrFirst || {};
115549
+ } else {
115550
+ params = {
115551
+ name: paramsOrFirst
115552
+ };
115553
+ }
115554
+ const name = params.name;
115555
+ if (typeof name === "undefined") {
115556
+ throw new AppwriteException('Missing required parameter: "name"');
115557
+ }
115558
+ const apiPath = "/organization";
115559
+ const payload = {};
115560
+ if (typeof name !== "undefined") {
115561
+ payload["name"] = name;
115562
+ }
115563
+ const uri = new URL(this.client.config.endpoint + apiPath);
115564
+ const apiHeaders = {
115565
+ "X-Appwrite-Project": this.client.config.project,
115566
+ "content-type": "application/json",
115567
+ "accept": "application/json"
115568
+ };
115569
+ return this.client.call("put", uri, apiHeaders, payload);
115570
+ }
115571
+ /**
115572
+ * Delete the current organization. All projects that belong to the organization are deleted as well.
115573
+ *
115574
+ * @throws {AppwriteException}
115575
+ * @returns {Promise<{}>}
115576
+ */
115577
+ delete() {
115578
+ const apiPath = "/organization";
115579
+ const payload = {};
115580
+ const uri = new URL(this.client.config.endpoint + apiPath);
115581
+ const apiHeaders = {
115582
+ "X-Appwrite-Project": this.client.config.project,
115583
+ "content-type": "application/json"
115584
+ };
115585
+ return this.client.call("delete", uri, apiHeaders, payload);
115586
+ }
115437
115587
  listKeys(paramsOrFirst, ...rest) {
115438
115588
  let params;
115439
115589
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -115596,6 +115746,164 @@ var Organization = class {
115596
115746
  };
115597
115747
  return this.client.call("delete", uri, apiHeaders, payload);
115598
115748
  }
115749
+ listMemberships(paramsOrFirst, ...rest) {
115750
+ let params;
115751
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
115752
+ params = paramsOrFirst || {};
115753
+ } else {
115754
+ params = {
115755
+ queries: paramsOrFirst,
115756
+ search: rest[0],
115757
+ total: rest[1]
115758
+ };
115759
+ }
115760
+ const queries = params.queries;
115761
+ const search = params.search;
115762
+ const total = params.total;
115763
+ const apiPath = "/organization/memberships";
115764
+ const payload = {};
115765
+ if (typeof queries !== "undefined") {
115766
+ payload["queries"] = queries;
115767
+ }
115768
+ if (typeof search !== "undefined") {
115769
+ payload["search"] = search;
115770
+ }
115771
+ if (typeof total !== "undefined") {
115772
+ payload["total"] = total;
115773
+ }
115774
+ const uri = new URL(this.client.config.endpoint + apiPath);
115775
+ const apiHeaders = {
115776
+ "X-Appwrite-Project": this.client.config.project,
115777
+ "accept": "application/json"
115778
+ };
115779
+ return this.client.call("get", uri, apiHeaders, payload);
115780
+ }
115781
+ createMembership(paramsOrFirst, ...rest) {
115782
+ let params;
115783
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
115784
+ params = paramsOrFirst || {};
115785
+ } else {
115786
+ params = {
115787
+ roles: paramsOrFirst,
115788
+ email: rest[0],
115789
+ userId: rest[1],
115790
+ phone: rest[2],
115791
+ url: rest[3],
115792
+ name: rest[4]
115793
+ };
115794
+ }
115795
+ const roles = params.roles;
115796
+ const email3 = params.email;
115797
+ const userId = params.userId;
115798
+ const phone = params.phone;
115799
+ const url2 = params.url;
115800
+ const name = params.name;
115801
+ if (typeof roles === "undefined") {
115802
+ throw new AppwriteException('Missing required parameter: "roles"');
115803
+ }
115804
+ const apiPath = "/organization/memberships";
115805
+ const payload = {};
115806
+ if (typeof email3 !== "undefined") {
115807
+ payload["email"] = email3;
115808
+ }
115809
+ if (typeof userId !== "undefined") {
115810
+ payload["userId"] = userId;
115811
+ }
115812
+ if (typeof phone !== "undefined") {
115813
+ payload["phone"] = phone;
115814
+ }
115815
+ if (typeof roles !== "undefined") {
115816
+ payload["roles"] = roles;
115817
+ }
115818
+ if (typeof url2 !== "undefined") {
115819
+ payload["url"] = url2;
115820
+ }
115821
+ if (typeof name !== "undefined") {
115822
+ payload["name"] = name;
115823
+ }
115824
+ const uri = new URL(this.client.config.endpoint + apiPath);
115825
+ const apiHeaders = {
115826
+ "X-Appwrite-Project": this.client.config.project,
115827
+ "content-type": "application/json",
115828
+ "accept": "application/json"
115829
+ };
115830
+ return this.client.call("post", uri, apiHeaders, payload);
115831
+ }
115832
+ getMembership(paramsOrFirst) {
115833
+ let params;
115834
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
115835
+ params = paramsOrFirst || {};
115836
+ } else {
115837
+ params = {
115838
+ membershipId: paramsOrFirst
115839
+ };
115840
+ }
115841
+ const membershipId = params.membershipId;
115842
+ if (typeof membershipId === "undefined") {
115843
+ throw new AppwriteException('Missing required parameter: "membershipId"');
115844
+ }
115845
+ const apiPath = "/organization/memberships/{membershipId}".replace("{membershipId}", encodeURIComponent(String(membershipId)));
115846
+ const payload = {};
115847
+ const uri = new URL(this.client.config.endpoint + apiPath);
115848
+ const apiHeaders = {
115849
+ "X-Appwrite-Project": this.client.config.project,
115850
+ "accept": "application/json"
115851
+ };
115852
+ return this.client.call("get", uri, apiHeaders, payload);
115853
+ }
115854
+ updateMembership(paramsOrFirst, ...rest) {
115855
+ let params;
115856
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
115857
+ params = paramsOrFirst || {};
115858
+ } else {
115859
+ params = {
115860
+ membershipId: paramsOrFirst,
115861
+ roles: rest[0]
115862
+ };
115863
+ }
115864
+ const membershipId = params.membershipId;
115865
+ const roles = params.roles;
115866
+ if (typeof membershipId === "undefined") {
115867
+ throw new AppwriteException('Missing required parameter: "membershipId"');
115868
+ }
115869
+ if (typeof roles === "undefined") {
115870
+ throw new AppwriteException('Missing required parameter: "roles"');
115871
+ }
115872
+ const apiPath = "/organization/memberships/{membershipId}".replace("{membershipId}", encodeURIComponent(String(membershipId)));
115873
+ const payload = {};
115874
+ if (typeof roles !== "undefined") {
115875
+ payload["roles"] = roles;
115876
+ }
115877
+ const uri = new URL(this.client.config.endpoint + apiPath);
115878
+ const apiHeaders = {
115879
+ "X-Appwrite-Project": this.client.config.project,
115880
+ "content-type": "application/json",
115881
+ "accept": "application/json"
115882
+ };
115883
+ return this.client.call("patch", uri, apiHeaders, payload);
115884
+ }
115885
+ deleteMembership(paramsOrFirst) {
115886
+ let params;
115887
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
115888
+ params = paramsOrFirst || {};
115889
+ } else {
115890
+ params = {
115891
+ membershipId: paramsOrFirst
115892
+ };
115893
+ }
115894
+ const membershipId = params.membershipId;
115895
+ if (typeof membershipId === "undefined") {
115896
+ throw new AppwriteException('Missing required parameter: "membershipId"');
115897
+ }
115898
+ const apiPath = "/organization/memberships/{membershipId}".replace("{membershipId}", encodeURIComponent(String(membershipId)));
115899
+ const payload = {};
115900
+ const uri = new URL(this.client.config.endpoint + apiPath);
115901
+ const apiHeaders = {
115902
+ "X-Appwrite-Project": this.client.config.project,
115903
+ "content-type": "application/json"
115904
+ };
115905
+ return this.client.call("delete", uri, apiHeaders, payload);
115906
+ }
115599
115907
  listProjects(paramsOrFirst, ...rest) {
115600
115908
  let params;
115601
115909
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -115964,6 +116272,29 @@ var Organizations = class {
115964
116272
  };
115965
116273
  return this.client.call("post", uri, apiHeaders, payload);
115966
116274
  }
116275
+ createPremiumGeoDBAddon(paramsOrFirst) {
116276
+ let params;
116277
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
116278
+ params = paramsOrFirst || {};
116279
+ } else {
116280
+ params = {
116281
+ organizationId: paramsOrFirst
116282
+ };
116283
+ }
116284
+ const organizationId = params.organizationId;
116285
+ if (typeof organizationId === "undefined") {
116286
+ throw new AppwriteException('Missing required parameter: "organizationId"');
116287
+ }
116288
+ const apiPath = "/organizations/{organizationId}/addons/premium-geo-db".replace("{organizationId}", encodeURIComponent(String(organizationId)));
116289
+ const payload = {};
116290
+ const uri = new URL(this.client.config.endpoint + apiPath);
116291
+ const apiHeaders = {
116292
+ "X-Appwrite-Project": this.client.config.project,
116293
+ "content-type": "application/json",
116294
+ "accept": "application/json"
116295
+ };
116296
+ return this.client.call("post", uri, apiHeaders, payload);
116297
+ }
115967
116298
  getAddon(paramsOrFirst, ...rest) {
115968
116299
  let params;
115969
116300
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -118706,7 +119037,9 @@ var Project = class {
118706
119037
  authorizationURL: rest[2],
118707
119038
  tokenURL: rest[3],
118708
119039
  userInfoURL: rest[4],
118709
- enabled: rest[5]
119040
+ prompt: rest[5],
119041
+ maxAge: rest[6],
119042
+ enabled: rest[7]
118710
119043
  };
118711
119044
  }
118712
119045
  const clientId = params.clientId;
@@ -118715,6 +119048,8 @@ var Project = class {
118715
119048
  const authorizationURL = params.authorizationURL;
118716
119049
  const tokenURL = params.tokenURL;
118717
119050
  const userInfoURL = params.userInfoURL;
119051
+ const prompt = params.prompt;
119052
+ const maxAge = params.maxAge;
118718
119053
  const enabled = params.enabled;
118719
119054
  const apiPath = "/project/oauth2/oidc";
118720
119055
  const payload = {};
@@ -118736,6 +119071,12 @@ var Project = class {
118736
119071
  if (typeof userInfoURL !== "undefined") {
118737
119072
  payload["userInfoURL"] = userInfoURL;
118738
119073
  }
119074
+ if (typeof prompt !== "undefined") {
119075
+ payload["prompt"] = prompt;
119076
+ }
119077
+ if (typeof maxAge !== "undefined") {
119078
+ payload["maxAge"] = maxAge;
119079
+ }
118739
119080
  if (typeof enabled !== "undefined") {
118740
119081
  payload["enabled"] = enabled;
118741
119082
  }
@@ -120737,6 +121078,161 @@ var Projects = class {
120737
121078
  constructor(client2) {
120738
121079
  this.client = client2;
120739
121080
  }
121081
+ listAddons(paramsOrFirst) {
121082
+ let params;
121083
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121084
+ params = paramsOrFirst || {};
121085
+ } else {
121086
+ params = {
121087
+ projectId: paramsOrFirst
121088
+ };
121089
+ }
121090
+ const projectId = params.projectId;
121091
+ if (typeof projectId === "undefined") {
121092
+ throw new AppwriteException('Missing required parameter: "projectId"');
121093
+ }
121094
+ const apiPath = "/projects/{projectId}/addons".replace("{projectId}", encodeURIComponent(String(projectId)));
121095
+ const payload = {};
121096
+ const uri = new URL(this.client.config.endpoint + apiPath);
121097
+ const apiHeaders = {
121098
+ "X-Appwrite-Project": this.client.config.project,
121099
+ "accept": "application/json"
121100
+ };
121101
+ return this.client.call("get", uri, apiHeaders, payload);
121102
+ }
121103
+ createPremiumGeoDBAddon(paramsOrFirst) {
121104
+ let params;
121105
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121106
+ params = paramsOrFirst || {};
121107
+ } else {
121108
+ params = {
121109
+ projectId: paramsOrFirst
121110
+ };
121111
+ }
121112
+ const projectId = params.projectId;
121113
+ if (typeof projectId === "undefined") {
121114
+ throw new AppwriteException('Missing required parameter: "projectId"');
121115
+ }
121116
+ const apiPath = "/projects/{projectId}/addons/premium-geo-db".replace("{projectId}", encodeURIComponent(String(projectId)));
121117
+ const payload = {};
121118
+ const uri = new URL(this.client.config.endpoint + apiPath);
121119
+ const apiHeaders = {
121120
+ "X-Appwrite-Project": this.client.config.project,
121121
+ "content-type": "application/json",
121122
+ "accept": "application/json"
121123
+ };
121124
+ return this.client.call("post", uri, apiHeaders, payload);
121125
+ }
121126
+ getAddon(paramsOrFirst, ...rest) {
121127
+ let params;
121128
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121129
+ params = paramsOrFirst || {};
121130
+ } else {
121131
+ params = {
121132
+ projectId: paramsOrFirst,
121133
+ addonId: rest[0]
121134
+ };
121135
+ }
121136
+ const projectId = params.projectId;
121137
+ const addonId = params.addonId;
121138
+ if (typeof projectId === "undefined") {
121139
+ throw new AppwriteException('Missing required parameter: "projectId"');
121140
+ }
121141
+ if (typeof addonId === "undefined") {
121142
+ throw new AppwriteException('Missing required parameter: "addonId"');
121143
+ }
121144
+ const apiPath = "/projects/{projectId}/addons/{addonId}".replace("{projectId}", encodeURIComponent(String(projectId))).replace("{addonId}", encodeURIComponent(String(addonId)));
121145
+ const payload = {};
121146
+ const uri = new URL(this.client.config.endpoint + apiPath);
121147
+ const apiHeaders = {
121148
+ "X-Appwrite-Project": this.client.config.project,
121149
+ "accept": "application/json"
121150
+ };
121151
+ return this.client.call("get", uri, apiHeaders, payload);
121152
+ }
121153
+ deleteAddon(paramsOrFirst, ...rest) {
121154
+ let params;
121155
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121156
+ params = paramsOrFirst || {};
121157
+ } else {
121158
+ params = {
121159
+ projectId: paramsOrFirst,
121160
+ addonId: rest[0]
121161
+ };
121162
+ }
121163
+ const projectId = params.projectId;
121164
+ const addonId = params.addonId;
121165
+ if (typeof projectId === "undefined") {
121166
+ throw new AppwriteException('Missing required parameter: "projectId"');
121167
+ }
121168
+ if (typeof addonId === "undefined") {
121169
+ throw new AppwriteException('Missing required parameter: "addonId"');
121170
+ }
121171
+ const apiPath = "/projects/{projectId}/addons/{addonId}".replace("{projectId}", encodeURIComponent(String(projectId))).replace("{addonId}", encodeURIComponent(String(addonId)));
121172
+ const payload = {};
121173
+ const uri = new URL(this.client.config.endpoint + apiPath);
121174
+ const apiHeaders = {
121175
+ "X-Appwrite-Project": this.client.config.project,
121176
+ "content-type": "application/json",
121177
+ "accept": "application/json"
121178
+ };
121179
+ return this.client.call("delete", uri, apiHeaders, payload);
121180
+ }
121181
+ confirmAddonPayment(paramsOrFirst, ...rest) {
121182
+ let params;
121183
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121184
+ params = paramsOrFirst || {};
121185
+ } else {
121186
+ params = {
121187
+ projectId: paramsOrFirst,
121188
+ addonId: rest[0]
121189
+ };
121190
+ }
121191
+ const projectId = params.projectId;
121192
+ const addonId = params.addonId;
121193
+ if (typeof projectId === "undefined") {
121194
+ throw new AppwriteException('Missing required parameter: "projectId"');
121195
+ }
121196
+ if (typeof addonId === "undefined") {
121197
+ throw new AppwriteException('Missing required parameter: "addonId"');
121198
+ }
121199
+ const apiPath = "/projects/{projectId}/addons/{addonId}/confirmations".replace("{projectId}", encodeURIComponent(String(projectId))).replace("{addonId}", encodeURIComponent(String(addonId)));
121200
+ const payload = {};
121201
+ const uri = new URL(this.client.config.endpoint + apiPath);
121202
+ const apiHeaders = {
121203
+ "X-Appwrite-Project": this.client.config.project,
121204
+ "content-type": "application/json",
121205
+ "accept": "application/json"
121206
+ };
121207
+ return this.client.call("post", uri, apiHeaders, payload);
121208
+ }
121209
+ getAddonPrice(paramsOrFirst, ...rest) {
121210
+ let params;
121211
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121212
+ params = paramsOrFirst || {};
121213
+ } else {
121214
+ params = {
121215
+ projectId: paramsOrFirst,
121216
+ addon: rest[0]
121217
+ };
121218
+ }
121219
+ const projectId = params.projectId;
121220
+ const addon = params.addon;
121221
+ if (typeof projectId === "undefined") {
121222
+ throw new AppwriteException('Missing required parameter: "projectId"');
121223
+ }
121224
+ if (typeof addon === "undefined") {
121225
+ throw new AppwriteException('Missing required parameter: "addon"');
121226
+ }
121227
+ const apiPath = "/projects/{projectId}/addons/{addon}/price".replace("{projectId}", encodeURIComponent(String(projectId))).replace("{addon}", encodeURIComponent(String(addon)));
121228
+ const payload = {};
121229
+ const uri = new URL(this.client.config.endpoint + apiPath);
121230
+ const apiHeaders = {
121231
+ "X-Appwrite-Project": this.client.config.project,
121232
+ "accept": "application/json"
121233
+ };
121234
+ return this.client.call("get", uri, apiHeaders, payload);
121235
+ }
120740
121236
  updateConsoleAccess(paramsOrFirst) {
120741
121237
  let params;
120742
121238
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -121040,6 +121536,61 @@ var Projects = class {
121040
121536
  };
121041
121537
  return this.client.call("get", uri, apiHeaders, payload);
121042
121538
  }
121539
+ listStages(paramsOrFirst) {
121540
+ let params;
121541
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121542
+ params = paramsOrFirst || {};
121543
+ } else {
121544
+ params = {
121545
+ projectId: paramsOrFirst
121546
+ };
121547
+ }
121548
+ const projectId = params.projectId;
121549
+ if (typeof projectId === "undefined") {
121550
+ throw new AppwriteException('Missing required parameter: "projectId"');
121551
+ }
121552
+ const apiPath = "/projects/{projectId}/stages".replace("{projectId}", encodeURIComponent(String(projectId)));
121553
+ const payload = {};
121554
+ const uri = new URL(this.client.config.endpoint + apiPath);
121555
+ const apiHeaders = {
121556
+ "X-Appwrite-Project": this.client.config.project,
121557
+ "accept": "application/json"
121558
+ };
121559
+ return this.client.call("get", uri, apiHeaders, payload);
121560
+ }
121561
+ updateStage(paramsOrFirst, ...rest) {
121562
+ let params;
121563
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121564
+ params = paramsOrFirst || {};
121565
+ } else {
121566
+ params = {
121567
+ projectId: paramsOrFirst,
121568
+ stageId: rest[0],
121569
+ skip: rest[1]
121570
+ };
121571
+ }
121572
+ const projectId = params.projectId;
121573
+ const stageId = params.stageId;
121574
+ const skip = params.skip;
121575
+ if (typeof projectId === "undefined") {
121576
+ throw new AppwriteException('Missing required parameter: "projectId"');
121577
+ }
121578
+ if (typeof stageId === "undefined") {
121579
+ throw new AppwriteException('Missing required parameter: "stageId"');
121580
+ }
121581
+ const apiPath = "/projects/{projectId}/stages/{stageId}".replace("{projectId}", encodeURIComponent(String(projectId))).replace("{stageId}", encodeURIComponent(String(stageId)));
121582
+ const payload = {};
121583
+ if (typeof skip !== "undefined") {
121584
+ payload["skip"] = skip;
121585
+ }
121586
+ const uri = new URL(this.client.config.endpoint + apiPath);
121587
+ const apiHeaders = {
121588
+ "X-Appwrite-Project": this.client.config.project,
121589
+ "content-type": "application/json",
121590
+ "accept": "application/json"
121591
+ };
121592
+ return this.client.call("patch", uri, apiHeaders, payload);
121593
+ }
121043
121594
  updateStatus(paramsOrFirst, ...rest) {
121044
121595
  let params;
121045
121596
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -123195,13 +123746,13 @@ var TablesDB = class {
123195
123746
  databaseId: paramsOrFirst,
123196
123747
  name: rest[0],
123197
123748
  enabled: rest[1],
123198
- dedicatedDatabaseId: rest[2]
123749
+ specification: rest[2]
123199
123750
  };
123200
123751
  }
123201
123752
  const databaseId = params.databaseId;
123202
123753
  const name = params.name;
123203
123754
  const enabled = params.enabled;
123204
- const dedicatedDatabaseId = params.dedicatedDatabaseId;
123755
+ const specification = params.specification;
123205
123756
  if (typeof databaseId === "undefined") {
123206
123757
  throw new AppwriteException('Missing required parameter: "databaseId"');
123207
123758
  }
@@ -123219,8 +123770,8 @@ var TablesDB = class {
123219
123770
  if (typeof enabled !== "undefined") {
123220
123771
  payload["enabled"] = enabled;
123221
123772
  }
123222
- if (typeof dedicatedDatabaseId !== "undefined") {
123223
- payload["dedicatedDatabaseId"] = dedicatedDatabaseId;
123773
+ if (typeof specification !== "undefined") {
123774
+ payload["specification"] = specification;
123224
123775
  }
123225
123776
  const uri = new URL(this.client.config.endpoint + apiPath);
123226
123777
  const apiHeaders = {
@@ -123479,6 +124030,114 @@ var TablesDB = class {
123479
124030
  };
123480
124031
  return this.client.call("delete", uri, apiHeaders, payload);
123481
124032
  }
124033
+ listMigrations(paramsOrFirst) {
124034
+ let params;
124035
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
124036
+ params = paramsOrFirst || {};
124037
+ } else {
124038
+ params = {
124039
+ databaseId: paramsOrFirst
124040
+ };
124041
+ }
124042
+ const databaseId = params.databaseId;
124043
+ if (typeof databaseId === "undefined") {
124044
+ throw new AppwriteException('Missing required parameter: "databaseId"');
124045
+ }
124046
+ const apiPath = "/tablesdb/{databaseId}/migrations".replace("{databaseId}", encodeURIComponent(String(databaseId)));
124047
+ const payload = {};
124048
+ const uri = new URL(this.client.config.endpoint + apiPath);
124049
+ const apiHeaders = {
124050
+ "X-Appwrite-Project": this.client.config.project,
124051
+ "accept": "application/json"
124052
+ };
124053
+ return this.client.call("get", uri, apiHeaders, payload);
124054
+ }
124055
+ createMigration(paramsOrFirst, ...rest) {
124056
+ let params;
124057
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
124058
+ params = paramsOrFirst || {};
124059
+ } else {
124060
+ params = {
124061
+ databaseId: paramsOrFirst,
124062
+ specification: rest[0]
124063
+ };
124064
+ }
124065
+ const databaseId = params.databaseId;
124066
+ const specification = params.specification;
124067
+ if (typeof databaseId === "undefined") {
124068
+ throw new AppwriteException('Missing required parameter: "databaseId"');
124069
+ }
124070
+ if (typeof specification === "undefined") {
124071
+ throw new AppwriteException('Missing required parameter: "specification"');
124072
+ }
124073
+ const apiPath = "/tablesdb/{databaseId}/migrations".replace("{databaseId}", encodeURIComponent(String(databaseId)));
124074
+ const payload = {};
124075
+ if (typeof specification !== "undefined") {
124076
+ payload["specification"] = specification;
124077
+ }
124078
+ const uri = new URL(this.client.config.endpoint + apiPath);
124079
+ const apiHeaders = {
124080
+ "X-Appwrite-Project": this.client.config.project,
124081
+ "content-type": "application/json",
124082
+ "accept": "application/json"
124083
+ };
124084
+ return this.client.call("post", uri, apiHeaders, payload);
124085
+ }
124086
+ getMigration(paramsOrFirst, ...rest) {
124087
+ let params;
124088
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
124089
+ params = paramsOrFirst || {};
124090
+ } else {
124091
+ params = {
124092
+ databaseId: paramsOrFirst,
124093
+ migrationId: rest[0]
124094
+ };
124095
+ }
124096
+ const databaseId = params.databaseId;
124097
+ const migrationId = params.migrationId;
124098
+ if (typeof databaseId === "undefined") {
124099
+ throw new AppwriteException('Missing required parameter: "databaseId"');
124100
+ }
124101
+ if (typeof migrationId === "undefined") {
124102
+ throw new AppwriteException('Missing required parameter: "migrationId"');
124103
+ }
124104
+ const apiPath = "/tablesdb/{databaseId}/migrations/{migrationId}".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{migrationId}", encodeURIComponent(String(migrationId)));
124105
+ const payload = {};
124106
+ const uri = new URL(this.client.config.endpoint + apiPath);
124107
+ const apiHeaders = {
124108
+ "X-Appwrite-Project": this.client.config.project,
124109
+ "accept": "application/json"
124110
+ };
124111
+ return this.client.call("get", uri, apiHeaders, payload);
124112
+ }
124113
+ deleteMigration(paramsOrFirst, ...rest) {
124114
+ let params;
124115
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
124116
+ params = paramsOrFirst || {};
124117
+ } else {
124118
+ params = {
124119
+ databaseId: paramsOrFirst,
124120
+ migrationId: rest[0]
124121
+ };
124122
+ }
124123
+ const databaseId = params.databaseId;
124124
+ const migrationId = params.migrationId;
124125
+ if (typeof databaseId === "undefined") {
124126
+ throw new AppwriteException('Missing required parameter: "databaseId"');
124127
+ }
124128
+ if (typeof migrationId === "undefined") {
124129
+ throw new AppwriteException('Missing required parameter: "migrationId"');
124130
+ }
124131
+ const apiPath = "/tablesdb/{databaseId}/migrations/{migrationId}".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{migrationId}", encodeURIComponent(String(migrationId)));
124132
+ const payload = {};
124133
+ const uri = new URL(this.client.config.endpoint + apiPath);
124134
+ const apiHeaders = {
124135
+ "X-Appwrite-Project": this.client.config.project,
124136
+ "content-type": "application/json",
124137
+ "accept": "application/json"
124138
+ };
124139
+ return this.client.call("delete", uri, apiHeaders, payload);
124140
+ }
123482
124141
  listTables(paramsOrFirst, ...rest) {
123483
124142
  let params;
123484
124143
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -125997,38 +126656,6 @@ var TablesDB = class {
125997
126656
  };
125998
126657
  return this.client.call("delete", uri, apiHeaders, payload);
125999
126658
  }
126000
- listTableLogs(paramsOrFirst, ...rest) {
126001
- let params;
126002
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
126003
- params = paramsOrFirst || {};
126004
- } else {
126005
- params = {
126006
- databaseId: paramsOrFirst,
126007
- tableId: rest[0],
126008
- queries: rest[1]
126009
- };
126010
- }
126011
- const databaseId = params.databaseId;
126012
- const tableId = params.tableId;
126013
- const queries = params.queries;
126014
- if (typeof databaseId === "undefined") {
126015
- throw new AppwriteException('Missing required parameter: "databaseId"');
126016
- }
126017
- if (typeof tableId === "undefined") {
126018
- throw new AppwriteException('Missing required parameter: "tableId"');
126019
- }
126020
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{tableId}", encodeURIComponent(String(tableId)));
126021
- const payload = {};
126022
- if (typeof queries !== "undefined") {
126023
- payload["queries"] = queries;
126024
- }
126025
- const uri = new URL(this.client.config.endpoint + apiPath);
126026
- const apiHeaders = {
126027
- "X-Appwrite-Project": this.client.config.project,
126028
- "accept": "application/json"
126029
- };
126030
- return this.client.call("get", uri, apiHeaders, payload);
126031
- }
126032
126659
  listRows(paramsOrFirst, ...rest) {
126033
126660
  let params;
126034
126661
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -126468,43 +127095,6 @@ var TablesDB = class {
126468
127095
  };
126469
127096
  return this.client.call("delete", uri, apiHeaders, payload);
126470
127097
  }
126471
- listRowLogs(paramsOrFirst, ...rest) {
126472
- let params;
126473
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
126474
- params = paramsOrFirst || {};
126475
- } else {
126476
- params = {
126477
- databaseId: paramsOrFirst,
126478
- tableId: rest[0],
126479
- rowId: rest[1],
126480
- queries: rest[2]
126481
- };
126482
- }
126483
- const databaseId = params.databaseId;
126484
- const tableId = params.tableId;
126485
- const rowId = params.rowId;
126486
- const queries = params.queries;
126487
- if (typeof databaseId === "undefined") {
126488
- throw new AppwriteException('Missing required parameter: "databaseId"');
126489
- }
126490
- if (typeof tableId === "undefined") {
126491
- throw new AppwriteException('Missing required parameter: "tableId"');
126492
- }
126493
- if (typeof rowId === "undefined") {
126494
- throw new AppwriteException('Missing required parameter: "rowId"');
126495
- }
126496
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{tableId}", encodeURIComponent(String(tableId))).replace("{rowId}", encodeURIComponent(String(rowId)));
126497
- const payload = {};
126498
- if (typeof queries !== "undefined") {
126499
- payload["queries"] = queries;
126500
- }
126501
- const uri = new URL(this.client.config.endpoint + apiPath);
126502
- const apiHeaders = {
126503
- "X-Appwrite-Project": this.client.config.project,
126504
- "accept": "application/json"
126505
- };
126506
- return this.client.call("get", uri, apiHeaders, payload);
126507
- }
126508
127098
  decrementRowColumn(paramsOrFirst, ...rest) {
126509
127099
  let params;
126510
127100
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -130475,6 +131065,7 @@ var QuerySuggestionResource;
130475
131065
  QuerySuggestionResource2["Keys"] = "keys";
130476
131066
  QuerySuggestionResource2["DevKeys"] = "devkeys";
130477
131067
  QuerySuggestionResource2["Webhooks"] = "webhooks";
131068
+ QuerySuggestionResource2["Notifications"] = "notifications";
130478
131069
  QuerySuggestionResource2["Certificates"] = "certificates";
130479
131070
  QuerySuggestionResource2["Realtime"] = "realtime";
130480
131071
  QuerySuggestionResource2["Rules"] = "rules";
@@ -130518,6 +131109,8 @@ var QuerySuggestionResource;
130518
131109
  QuerySuggestionResource2["Feedbacks"] = "feedbacks";
130519
131110
  QuerySuggestionResource2["Disputes"] = "disputes";
130520
131111
  QuerySuggestionResource2["ShInstallations"] = "sh_installations";
131112
+ QuerySuggestionResource2["MigrationDatabases"] = "migrationdatabases";
131113
+ QuerySuggestionResource2["MigrationProjects"] = "migrationprojects";
130521
131114
  QuerySuggestionResource2["Apps"] = "apps";
130522
131115
  QuerySuggestionResource2["AppSecrets"] = "appsecrets";
130523
131116
  QuerySuggestionResource2["Oauth2Grants"] = "oauth2grants";
@@ -130841,8 +131434,12 @@ var ProjectKeyScopes;
130841
131434
  ProjectKeyScopes3["PoliciesWrite"] = "policies.write";
130842
131435
  ProjectKeyScopes3["ProjectPoliciesRead"] = "project.policies.read";
130843
131436
  ProjectKeyScopes3["ProjectPoliciesWrite"] = "project.policies.write";
131437
+ ProjectKeyScopes3["ProjectOauth2Read"] = "project.oauth2.read";
131438
+ ProjectKeyScopes3["ProjectOauth2Write"] = "project.oauth2.write";
130844
131439
  ProjectKeyScopes3["TemplatesRead"] = "templates.read";
130845
131440
  ProjectKeyScopes3["TemplatesWrite"] = "templates.write";
131441
+ ProjectKeyScopes3["StagesRead"] = "stages.read";
131442
+ ProjectKeyScopes3["StagesWrite"] = "stages.write";
130846
131443
  ProjectKeyScopes3["Oauth2Read"] = "oauth2.read";
130847
131444
  ProjectKeyScopes3["Oauth2Write"] = "oauth2.write";
130848
131445
  ProjectKeyScopes3["UsersRead"] = "users.read";
@@ -130979,6 +131576,7 @@ var HealthQueueName;
130979
131576
  HealthQueueName2["V1screenshots"] = "v1-screenshots";
130980
131577
  HealthQueueName2["V1messaging"] = "v1-messaging";
130981
131578
  HealthQueueName2["V1migrations"] = "v1-migrations";
131579
+ HealthQueueName2["V1notifications"] = "v1-notifications";
130982
131580
  })(HealthQueueName || (HealthQueueName = {}));
130983
131581
  var BlockResourceType;
130984
131582
  (function(BlockResourceType2) {
@@ -130992,6 +131590,11 @@ var BlockResourceType;
130992
131590
  BlockResourceType2["Subscribers"] = "subscribers";
130993
131591
  BlockResourceType2["Messages"] = "messages";
130994
131592
  })(BlockResourceType || (BlockResourceType = {}));
131593
+ var BlockMode;
131594
+ (function(BlockMode2) {
131595
+ BlockMode2["Full"] = "full";
131596
+ BlockMode2["Readonly"] = "readonly";
131597
+ })(BlockMode || (BlockMode = {}));
130995
131598
  var Region;
130996
131599
  (function(Region2) {
130997
131600
  Region2["Fra"] = "fra";
@@ -131124,6 +131727,10 @@ var OrganizationKeyScopes;
131124
131727
  OrganizationKeyScopes2["DevKeysWrite"] = "devKeys.write";
131125
131728
  OrganizationKeyScopes2["OrganizationKeysRead"] = "organization.keys.read";
131126
131729
  OrganizationKeyScopes2["OrganizationKeysWrite"] = "organization.keys.write";
131730
+ OrganizationKeyScopes2["OrganizationMembershipsRead"] = "organization.memberships.read";
131731
+ OrganizationKeyScopes2["OrganizationMembershipsWrite"] = "organization.memberships.write";
131732
+ OrganizationKeyScopes2["OrganizationRead"] = "organization.read";
131733
+ OrganizationKeyScopes2["OrganizationWrite"] = "organization.write";
131127
131734
  OrganizationKeyScopes2["DomainsRead"] = "domains.read";
131128
131735
  OrganizationKeyScopes2["DomainsWrite"] = "domains.write";
131129
131736
  OrganizationKeyScopes2["KeysRead"] = "keys.read";
@@ -131132,6 +131739,8 @@ var OrganizationKeyScopes;
131132
131739
  var Addon;
131133
131740
  (function(Addon2) {
131134
131741
  Addon2["Baa"] = "baa";
131742
+ Addon2["Premiumgeodb"] = "premiumgeodb";
131743
+ Addon2["Premiumgeodborg"] = "premiumgeodborg";
131135
131744
  Addon2["BackupRecovery"] = "backup_recovery";
131136
131745
  })(Addon || (Addon = {}));
131137
131746
  var ProjectAuthMethodId;
@@ -131150,6 +131759,13 @@ var ProjectOAuth2GooglePrompt;
131150
131759
  ProjectOAuth2GooglePrompt2["Consent"] = "consent";
131151
131760
  ProjectOAuth2GooglePrompt2["SelectAccount"] = "select_account";
131152
131761
  })(ProjectOAuth2GooglePrompt || (ProjectOAuth2GooglePrompt = {}));
131762
+ var ProjectOAuth2OidcPrompt;
131763
+ (function(ProjectOAuth2OidcPrompt2) {
131764
+ ProjectOAuth2OidcPrompt2["None"] = "none";
131765
+ ProjectOAuth2OidcPrompt2["Login"] = "login";
131766
+ ProjectOAuth2OidcPrompt2["Consent"] = "consent";
131767
+ ProjectOAuth2OidcPrompt2["SelectAccount"] = "select_account";
131768
+ })(ProjectOAuth2OidcPrompt || (ProjectOAuth2OidcPrompt = {}));
131153
131769
  var ProjectOAuthProviderId;
131154
131770
  (function(ProjectOAuthProviderId2) {
131155
131771
  ProjectOAuthProviderId2["Amazon"] = "amazon";
@@ -131476,6 +132092,12 @@ var DatabaseType;
131476
132092
  DatabaseType2["Documentsdb"] = "documentsdb";
131477
132093
  DatabaseType2["Vectorsdb"] = "vectorsdb";
131478
132094
  })(DatabaseType || (DatabaseType = {}));
132095
+ var DatabaseStatus;
132096
+ (function(DatabaseStatus2) {
132097
+ DatabaseStatus2["Provisioning"] = "provisioning";
132098
+ DatabaseStatus2["Ready"] = "ready";
132099
+ DatabaseStatus2["Failed"] = "failed";
132100
+ })(DatabaseStatus || (DatabaseStatus = {}));
131479
132101
  var AttributeStatus;
131480
132102
  (function(AttributeStatus2) {
131481
132103
  AttributeStatus2["Available"] = "available";
@@ -131537,6 +132159,13 @@ var OAuth2GooglePrompt;
131537
132159
  OAuth2GooglePrompt2["Consent"] = "consent";
131538
132160
  OAuth2GooglePrompt2["SelectAccount"] = "select_account";
131539
132161
  })(OAuth2GooglePrompt || (OAuth2GooglePrompt = {}));
132162
+ var OAuth2OidcPrompt;
132163
+ (function(OAuth2OidcPrompt2) {
132164
+ OAuth2OidcPrompt2["None"] = "none";
132165
+ OAuth2OidcPrompt2["Login"] = "login";
132166
+ OAuth2OidcPrompt2["Consent"] = "consent";
132167
+ OAuth2OidcPrompt2["SelectAccount"] = "select_account";
132168
+ })(OAuth2OidcPrompt || (OAuth2OidcPrompt = {}));
131540
132169
  var PlatformType;
131541
132170
  (function(PlatformType2) {
131542
132171
  PlatformType2["Windows"] = "windows";
@@ -131693,7 +132322,15 @@ var siteRequiresBuildCommand = (site) => {
131693
132322
  };
131694
132323
  var getErrorMessage = (error52) => {
131695
132324
  if (error52 instanceof Error) {
131696
- return error52.message;
132325
+ const message = typeof error52.message === "string" ? error52.message.trim() : "";
132326
+ if (message) {
132327
+ return message;
132328
+ }
132329
+ const response = error52.response;
132330
+ if (typeof response === "string" && response.trim() !== "") {
132331
+ return response.trim();
132332
+ }
132333
+ return "An unknown error occurred.";
131697
132334
  }
131698
132335
  return String(error52);
131699
132336
  };
@@ -131810,6 +132447,27 @@ var getInstalledHomebrewFormula = (options = {}) => {
131810
132447
  };
131811
132448
  var getHomebrewLatestVersion = async (options = {}) => {
131812
132449
  const formulaName = options.homebrewFormula ?? getInstalledHomebrewFormula(options) ?? HOMEBREW_FORMULA;
132450
+ if (formulaName === HOMEBREW_FORMULA) {
132451
+ try {
132452
+ const signal = AbortSignal.timeout(
132453
+ options.timeoutMs ?? DEFAULT_HOMEBREW_COMMAND_TIMEOUT_MS
132454
+ );
132455
+ const response = await fetch(HOMEBREW_TAP_FORMULA_URL, { signal });
132456
+ if (!response.ok) {
132457
+ throw new Error(`HTTP ${response.status}`);
132458
+ }
132459
+ const formulaSource = (await response.text()).replace(
132460
+ /^\s*resource\s+"[^"]*"\s+do[\s\S]*?^\s*end/gm,
132461
+ ""
132462
+ );
132463
+ const match = formulaSource.match(/^\s*version\s+"([^"]+)"/m);
132464
+ if (!match) {
132465
+ throw new Error("Could not find a version in the tap formula.");
132466
+ }
132467
+ return normalizeHomebrewVersion(match[1].trim());
132468
+ } catch (_error) {
132469
+ }
132470
+ }
131813
132471
  try {
131814
132472
  const output = import_child_process.default.execFileSync(
131815
132473
  "brew",
@@ -132218,7 +132876,7 @@ function isCloud() {
132218
132876
  const hostname3 = new URL(endpoint).hostname;
132219
132877
  return hostname3.endsWith("appwrite.io");
132220
132878
  }
132221
- var SKILLS_REPO = "https://github.com/appwrite/agent-skills";
132879
+ var SKILLS_REPO = "https://github.com/appwrite/skills";
132222
132880
  var LANGUAGE_MARKERS = {
132223
132881
  typescript: [
132224
132882
  "package.json",
@@ -134510,26 +135168,51 @@ var printQueryErrorHint = (err) => {
134510
135168
  );
134511
135169
  };
134512
135170
  var ERROR_DETAIL_KEYS = ["code", "type", "response"];
135171
+ var ERROR_DETAIL_INDENT = " ";
135172
+ var ERROR_DETAIL_LABEL_WIDTH = Math.max(...ERROR_DETAIL_KEYS.map((key) => key.length)) + 2;
135173
+ var formatErrorDetail = (value) => {
135174
+ if (typeof value === "string") {
135175
+ const text = value;
135176
+ try {
135177
+ const parsed = JSON.parse(text);
135178
+ if (parsed && typeof parsed === "object") {
135179
+ value = parsed;
135180
+ }
135181
+ } catch {
135182
+ return text;
135183
+ }
135184
+ }
135185
+ try {
135186
+ const json2 = JSON.stringify(value, null, 2) ?? String(value);
135187
+ return json2.split("\n").map((line, index) => index === 0 ? line : ERROR_DETAIL_INDENT + line).join("\n");
135188
+ } catch {
135189
+ return String(value);
135190
+ }
135191
+ };
134513
135192
  var formatErrorForLog = (err) => {
134514
- const stack = err.stack || `${err.name}: ${err.message}`;
134515
- const detailLines = ERROR_DETAIL_KEYS.flatMap((key) => {
135193
+ const lines = [
135194
+ `${import_chalk2.default.red.bold(err.name || "Error")}${import_chalk2.default.red(`: ${getErrorMessage(err)}`)}`
135195
+ ];
135196
+ for (const key of ERROR_DETAIL_KEYS) {
134516
135197
  if (!Object.prototype.hasOwnProperty.call(err, key)) {
134517
- return [];
135198
+ continue;
134518
135199
  }
134519
135200
  const value = err[key];
134520
- let detail = "undefined";
134521
- try {
134522
- detail = typeof value === "string" ? JSON.stringify(value) : JSON.stringify(value) ?? String(value);
134523
- } catch {
134524
- detail = String(value);
134525
- }
134526
- return [`${key}: ${detail}`];
134527
- });
134528
- if (detailLines.length === 0) {
134529
- return stack;
135201
+ lines.push(
135202
+ `${ERROR_DETAIL_INDENT}${import_chalk2.default.cyan(`${key}:`.padEnd(ERROR_DETAIL_LABEL_WIDTH))}${formatErrorDetail(value)}`
135203
+ );
134530
135204
  }
134531
- const [summary, ...frames] = stack.split("\n");
134532
- return [summary, ...detailLines, ...frames].join("\n");
135205
+ const frames = (err.stack ?? "").split("\n").filter((line) => line.trim().startsWith("at "));
135206
+ if (frames.length > 0) {
135207
+ lines.push(
135208
+ "",
135209
+ import_chalk2.default.dim(`${ERROR_DETAIL_INDENT}Stack trace:`),
135210
+ ...frames.map(
135211
+ (frame) => import_chalk2.default.dim(`${ERROR_DETAIL_INDENT.repeat(2)}${frame.trim()}`)
135212
+ )
135213
+ );
135214
+ }
135215
+ return lines.join("\n");
134533
135216
  };
134534
135217
  var parseError = (err) => {
134535
135218
  if (cliConfig.report) {
@@ -134560,7 +135243,7 @@ Is Cloud: ${isCloud()}`;
134560
135243
  githubIssueUrl.searchParams.append("template", "bug.yaml");
134561
135244
  githubIssueUrl.searchParams.append(
134562
135245
  "title",
134563
- `\u{1F41B} Bug Report: ${err.message}`
135246
+ `\u{1F41B} Bug Report: ${getErrorMessage(err)}`
134564
135247
  );
134565
135248
  githubIssueUrl.searchParams.append(
134566
135249
  "actual-behavior",
@@ -134590,7 +135273,7 @@ ${stack}`
134590
135273
  printQueryErrorHint(err);
134591
135274
  } else {
134592
135275
  log("For detailed error pass the --verbose or --report flag");
134593
- error51(err.message);
135276
+ error51(getErrorMessage(err));
134594
135277
  printQueryErrorHint(err);
134595
135278
  }
134596
135279
  process.exit(1);
@@ -134659,7 +135342,7 @@ var commandDescriptions = {
134659
135342
  avatars: `The avatars command aims to help you complete everyday tasks related to your app image, icons, and avatars.`,
134660
135343
  databases: `(Legacy) The databases command allows you to create structured collections of documents and query and filter lists of documents.`,
134661
135344
  "tables-db": `The tables-db command allows you to create structured tables of columns and query and filter lists of rows.`,
134662
- init: `The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, messaging-topics, and agent skills in ${SDK_TITLE}.`,
135345
+ init: `The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, messaging-topics, and skills in ${SDK_TITLE}.`,
134663
135346
  push: `The push command provides a convenient wrapper for pushing your functions, collections, buckets, teams, and messaging-topics.`,
134664
135347
  run: `The run command allows you to run the project locally to allow easy development and quick debugging.`,
134665
135348
  functions: `The functions command allows you to view, create, and manage your Cloud Functions.`,
@@ -137015,7 +137698,7 @@ var deleteServerSession = async (sessionId) => {
137015
137698
  } catch (e) {
137016
137699
  return {
137017
137700
  deleted: false,
137018
- error: e instanceof Error ? e.message : String(e)
137701
+ error: getErrorMessage(e)
137019
137702
  };
137020
137703
  }
137021
137704
  };
@@ -137565,10 +138248,8 @@ var logout = new Command("logout").description(commandDescriptions["logout"]).co
137565
138248
  } else if (remainingSessions.length > 0) {
137566
138249
  const nextSession = remainingSessions.find((session) => session.email) ?? remainingSessions[0];
137567
138250
  globalConfig2.setCurrentSession(nextSession.id);
137568
- if (!logoutFailed) {
137569
- success2(
137570
- nextSession.email ? `Switched to ${nextSession.email}` : `Switched to session at ${nextSession.endpoint}`
137571
- );
138251
+ if (!logoutFailed && nextSession.email) {
138252
+ success2(`Switched to ${nextSession.email}`);
137572
138253
  }
137573
138254
  } else if (remainingSessions.length === 0) {
137574
138255
  globalConfig2.setCurrentSession("");
@@ -137731,7 +138412,9 @@ var configFilters = [
137731
138412
  new URL(
137732
138413
  `${consoleClient.config.endpoint}/projects/${encodeURIComponent(config2.projectId)}`
137733
138414
  ),
137734
- {},
138415
+ {
138416
+ "X-Appwrite-Project": "console"
138417
+ },
137735
138418
  {}
137736
138419
  );
137737
138420
  organizationId = project2.teamId;
@@ -141206,7 +141889,7 @@ async function downloadDeploymentCode(params) {
141206
141889
  }
141207
141890
  } catch (e) {
141208
141891
  if (e instanceof AppwriteException) {
141209
- error51(e.message);
141892
+ error51(getErrorMessage(e));
141210
141893
  return;
141211
141894
  } else {
141212
141895
  throw e;
@@ -142353,7 +143036,7 @@ var installInitProjectSkills = async () => {
142353
143036
  }
142354
143037
  } catch (e) {
142355
143038
  const msg = e instanceof Error ? e.message : String(e);
142356
- error51(`Failed to install agent skills: ${msg}`);
143039
+ error51(`Failed to install skills: ${msg}`);
142357
143040
  hint(`You can install them later with '${EXECUTABLE_NAME} init skill'.`);
142358
143041
  }
142359
143042
  };
@@ -142615,7 +143298,7 @@ var initTopic = async () => {
142615
143298
  var initSkill = async () => {
142616
143299
  process.chdir(localConfig.configDirectoryPath);
142617
143300
  const cwd = process.cwd();
142618
- log("Fetching available Appwrite agent skills ...");
143301
+ log("Fetching available Appwrite skills ...");
142619
143302
  const { skills, tempDir } = fetchAvailableSkills();
142620
143303
  try {
142621
143304
  const { selectedSkills } = await import_inquirer5.default.prompt([
@@ -143030,7 +143713,7 @@ var init = new Command("init").description(commandDescriptions["init"]).action(a
143030
143713
  init.command("project").description("Init a new Appwrite project").option("--organization-id <organization-id>", "Appwrite organization ID").option("--project-id <project-id>", "Appwrite project ID").option("--project-name <project-name>", "Appwrite project ID").action(actionRunner(initProject));
143031
143714
  init.command("function").alias("functions").description("Init a new Appwrite function").action(actionRunner(initFunction));
143032
143715
  init.command("site").alias("sites").description("Init a new Appwrite site").action(actionRunner(initSite));
143033
- init.command("skill").alias("skills").description("Install Appwrite agent skills for AI coding agents").action(actionRunner(initSkill));
143716
+ init.command("skill").alias("skills").description("Install Appwrite skills for AI coding agents").action(actionRunner(initSkill));
143034
143717
  init.command("bucket").alias("buckets").description("Init a new Appwrite bucket").action(actionRunner(initBucket));
143035
143718
  init.command("team").alias("teams").description("Init a new Appwrite team").action(actionRunner(initTeam));
143036
143719
  init.command("collection").alias("collections").description("Init a new Appwrite collection").action(actionRunner(initCollection));
@@ -151206,7 +151889,7 @@ var accountListKeysCommand = account.command(`list-keys`).description(`Get a lis
151206
151889
  async ({ total }) => parse3(await (await getAccountClient()).listKeys(total))
151207
151890
  )
151208
151891
  );
151209
- var accountCreateKeyCommand = account.command(`create-key`).description(`Create a new account API key.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).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.`).action(
151892
+ var accountCreateKeyCommand = account.command(`create-key`).description(`Create a new account API key.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 200 scopes are allowed.`).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.`).action(
151210
151893
  actionRunner(
151211
151894
  async ({ name, scopes, expire }) => parse3(await (await getAccountClient()).createKey(name, scopes, expire))
151212
151895
  )
@@ -151216,7 +151899,7 @@ var accountGetKeyCommand = account.command(`get-key`).description(`Get a key by
151216
151899
  async ({ keyId }) => parse3(await (await getAccountClient()).getKey(keyId))
151217
151900
  )
151218
151901
  );
151219
- var accountUpdateKeyCommand = account.command(`update-key`).description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).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.`).action(
151902
+ var accountUpdateKeyCommand = account.command(`update-key`).description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 200 scopes are allowed.`).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.`).action(
151220
151903
  actionRunner(
151221
151904
  async ({ keyId, name, scopes, expire }) => parse3(await (await getAccountClient()).updateKey(keyId, name, scopes, expire))
151222
151905
  )
@@ -151356,8 +152039,8 @@ If there is already an active session, the new session will be attached to the l
151356
152039
  A user is limited to 10 active sessions at a time by default. Learn more about session limits (https://appwrite.io/docs/authentication-security#limits).
151357
152040
  `).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
151358
152041
  actionRunner(
151359
- async ({ provider, success: success24, failure, scopes }) => {
151360
- const url2 = (await getAccountClient()).createOAuth2Session(provider, success24, failure, scopes);
152042
+ async ({ provider, success: success25, failure, scopes }) => {
152043
+ const url2 = (await getAccountClient()).createOAuth2Session(provider, success25, failure, scopes);
151361
152044
  if (url2) console.log(url2);
151362
152045
  }
151363
152046
  )
@@ -151437,8 +152120,8 @@ If authentication succeeds, \`userId\` and \`secret\` of a token will be appende
151437
152120
 
151438
152121
  A user is limited to 10 active sessions at a time by default. Learn more about session limits (https://appwrite.io/docs/authentication-security#limits).`).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an open redirect (https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
151439
152122
  actionRunner(
151440
- async ({ provider, success: success24, failure, scopes }) => {
151441
- const url2 = (await getAccountClient()).createOAuth2Token(provider, success24, failure, scopes);
152123
+ async ({ provider, success: success25, failure, scopes }) => {
152124
+ const url2 = (await getAccountClient()).createOAuth2Token(provider, success25, failure, scopes);
151442
152125
  if (url2) console.log(url2);
151443
152126
  }
151444
152127
  )
@@ -151576,9 +152259,12 @@ var backupsDeletePolicyCommand = backups.command(`delete-policy`).description(`D
151576
152259
  async ({ policyId }) => parse3(await (await getBackupsClient()).deletePolicy(policyId))
151577
152260
  )
151578
152261
  );
151579
- var backupsCreateRestorationCommand = backups.command(`create-restoration`).description(`Create and trigger a new restoration for a backup on a project.`).requiredOption(`--archive-id <archive-id>`, `Backup archive ID to restore`).requiredOption(`--services [services...]`, `Array of services to restore`).option(`--new-resource-id <new-resource-id>`, `Unique 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.`).option(`--new-resource-name <new-resource-name>`, `Database name. Max length: 128 chars.`).action(
152262
+ var backupsCreateRestorationCommand = backups.command(`create-restoration`).description(`Create and trigger a new restoration for a backup on a project.
152263
+
152264
+ When restoring a DocumentsDB or VectorsDB database to a new resource, pass \`newSpecification\` to provision the restored database on a different specification than the archived one (for example, restoring onto a larger or smaller dedicated database). Use \`serverless\` to restore onto the shared pool, or a dedicated specification slug to restore onto a dedicated database of that size. The specification must be permitted by the organization's plan. \`newSpecification\` is not supported for legacy/TablesDB databases or for bucket restores.
152265
+ `).requiredOption(`--archive-id <archive-id>`, `Backup archive ID to restore`).requiredOption(`--services [services...]`, `Array of services to restore`).option(`--new-resource-id <new-resource-id>`, `Unique 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.`).option(`--new-resource-name <new-resource-name>`, `Database name. Max length: 128 chars.`).option(`--new-specification <new-specification>`, `Specification to provision the restored database on, when restoring a DocumentsDB or VectorsDB database to a new resource. Defaults to the archived database's specification. Use \`serverless\` for the shared pool or a dedicated specification slug.`).action(
151580
152266
  actionRunner(
151581
- async ({ archiveId, services, newResourceId, newResourceName }) => parse3(await (await getBackupsClient()).createRestoration(archiveId, services, newResourceId, newResourceName))
152267
+ async ({ archiveId, services, newResourceId, newResourceName, newSpecification }) => parse3(await (await getBackupsClient()).createRestoration(archiveId, services, newResourceId, newResourceName, newSpecification))
151582
152268
  )
151583
152269
  );
151584
152270
  var backupsListRestorationsCommand = backups.command(`list-restorations`).description(`List all backup restorations for a project.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag 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.`).option(`--filter <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseFilterQuery(value), previous)).option(`--where <expression>`, `Deprecated. Use --filter instead. Filter using a simple comparison expression. Repeat for multiple filters.`, (value, previous) => collectQueryValue(parseDeprecatedWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
@@ -152099,11 +152785,6 @@ var databasesDeleteDocumentCommand = databases.command(`delete-document`).descri
152099
152785
  async ({ databaseId, collectionId, documentId, transactionId }) => parse3(await (await getDatabasesClient()).deleteDocument(databaseId, collectionId, documentId, transactionId))
152100
152786
  )
152101
152787
  );
152102
- var databasesListDocumentLogsCommand = databases.command(`list-document-logs`).description(`Get the document activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).requiredOption(`--document-id <document-id>`, `Document ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag 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`).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
152103
- actionRunner(
152104
- async ({ databaseId, collectionId, documentId, queries, limit, offset }) => parse3(await (await getDatabasesClient()).listDocumentLogs(databaseId, collectionId, documentId, buildQueries({ queries, limit, offset })))
152105
- )
152106
- );
152107
152788
  var databasesDecrementDocumentAttributeCommand = databases.command(`decrement-document-attribute`).description(`Decrement a specific attribute of a document by a given value.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).requiredOption(`--document-id <document-id>`, `Document ID.`).requiredOption(`--attribute <attribute>`, `Attribute key.`).option(`--value <value>`, `Value to increment the attribute by. The value must be a number.`, parseInteger).option(`--min <min>`, `Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.`, parseInteger).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
152108
152789
  actionRunner(
152109
152790
  async ({ databaseId, collectionId, documentId, attribute, value, min, transactionId }) => parse3(await (await getDatabasesClient()).decrementDocumentAttribute(databaseId, collectionId, documentId, attribute, value, min, transactionId))
@@ -152139,21 +152820,11 @@ var databasesDeleteIndexCommand = databases.command(`delete-index`).description(
152139
152820
  async ({ databaseId, collectionId, key }) => parse3(await (await getDatabasesClient()).deleteIndex(databaseId, collectionId, key))
152140
152821
  )
152141
152822
  );
152142
- var databasesListCollectionLogsCommand = databases.command(`list-collection-logs`).description(`Get the collection activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag 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`).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
152143
- actionRunner(
152144
- async ({ databaseId, collectionId, queries, limit, offset }) => parse3(await (await getDatabasesClient()).listCollectionLogs(databaseId, collectionId, buildQueries({ queries, limit, offset })))
152145
- )
152146
- );
152147
152823
  var databasesGetCollectionUsageCommand = databases.command(`get-collection-usage`).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.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).option(`--range <range>`, `Date range.`).action(
152148
152824
  actionRunner(
152149
152825
  async ({ databaseId, collectionId, range }) => parse3(await (await getDatabasesClient()).getCollectionUsage(databaseId, collectionId, range))
152150
152826
  )
152151
152827
  );
152152
- var databasesListLogsCommand = databases.command(`list-logs`).description(`Get the database activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag 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`).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
152153
- actionRunner(
152154
- async ({ databaseId, queries, limit, offset }) => parse3(await (await getDatabasesClient()).listLogs(databaseId, buildQueries({ queries, limit, offset })))
152155
- )
152156
- );
152157
152828
  var databasesGetUsageCommand = databases.command(`get-usage`).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.`).requiredOption(`--database-id <database-id>`, `Database ID.`).option(`--range <range>`, `Date range.`).action(
152158
152829
  actionRunner(
152159
152830
  async ({ databaseId, range }) => parse3(await (await getDatabasesClient()).getUsage(databaseId, range))
@@ -152190,7 +152861,7 @@ var functionsCreateCommand = functions.command(`create`).description(`Create a n
152190
152861
  `--logging [value]`,
152191
152862
  `When disabled, executions will exclude logs and errors, and will be slightly faster.`,
152192
152863
  (value) => value === void 0 ? true : parseBool(value)
152193
- ).option(`--entrypoint <entrypoint>`, `Entrypoint File. This path is relative to the "providerRootDirectory".`).option(`--commands <commands>`, `Build Commands.`).option(`--scopes [scopes...]`, `List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.`).option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`).option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the function.`).option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the function.`).option(
152864
+ ).option(`--entrypoint <entrypoint>`, `Entrypoint File. This path is relative to the "providerRootDirectory".`).option(`--commands <commands>`, `Build Commands.`).option(`--scopes [scopes...]`, `List of scopes allowed for API key auto-generated for every execution. Maximum of 200 scopes are allowed.`).option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`).option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the function.`).option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the function.`).option(
152194
152865
  `--provider-silent-mode [value]`,
152195
152866
  `Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.`,
152196
152867
  (value) => value === void 0 ? true : parseBool(value)
@@ -152241,7 +152912,7 @@ var functionsUpdateCommand = functions.command(`update`).description(`Update fun
152241
152912
  `--logging [value]`,
152242
152913
  `When disabled, executions will exclude logs and errors, and will be slightly faster.`,
152243
152914
  (value) => value === void 0 ? true : parseBool(value)
152244
- ).option(`--entrypoint <entrypoint>`, `Entrypoint File. This path is relative to the "providerRootDirectory".`).option(`--commands <commands>`, `Build Commands.`).option(`--scopes [scopes...]`, `List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.`).option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Controle System) deployment.`).option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the function`).option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the function`).option(
152915
+ ).option(`--entrypoint <entrypoint>`, `Entrypoint File. This path is relative to the "providerRootDirectory".`).option(`--commands <commands>`, `Build Commands.`).option(`--scopes [scopes...]`, `List of scopes allowed for API Key auto-generated for every execution. Maximum of 200 scopes are allowed.`).option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Controle System) deployment.`).option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the function`).option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the function`).option(
152245
152916
  `--provider-silent-mode [value]`,
152246
152917
  `Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.`,
152247
152918
  (value) => value === void 0 ? true : parseBool(value)
@@ -152465,6 +153136,17 @@ var healthGetDBCommand = health.command(`get-db`).description(`Check the Appwrit
152465
153136
  async () => parse3(await (await getHealthClient()).getDB())
152466
153137
  )
152467
153138
  );
153139
+ var healthGetGeoCommand = health.command(`get-geo`).description(`Check the Appwrite geo service is up and connection is successful.`).action(
153140
+ actionRunner(
153141
+ async () => parse3(await (await getHealthClient()).getGeo())
153142
+ )
153143
+ );
153144
+ var healthGetGeoPremiumCommand = health.command(`get-geo-premium`).description(`Get the health status of the premium geo service. This endpoint probes the internal \`appwrite-geo-premium\` service used for premium IP-to-location lookups (organizations or projects on the premium geo DB addon) and returns a \`pass\` status when reachable.
153145
+ `).action(
153146
+ actionRunner(
153147
+ async () => parse3(await (await getHealthClient()).getGeoPremium())
153148
+ )
153149
+ );
152468
153150
  var healthGetPubSubCommand = health.command(`get-pub-sub`).description(`Check the Appwrite pub-sub servers are up and connection is successful.`).action(
152469
153151
  actionRunner(
152470
153152
  async () => parse3(await (await getHealthClient()).getPubSub())
@@ -152507,11 +153189,6 @@ var healthGetQueueFunctionsCommand = health.command(`get-queue-functions`).descr
152507
153189
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueFunctions(threshold))
152508
153190
  )
152509
153191
  );
152510
- var healthGetQueueLogsCommand = health.command(`get-queue-logs`).description(`Get the number of logs that are waiting to be processed in the Appwrite internal queue server.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
152511
- actionRunner(
152512
- async ({ threshold }) => parse3(await (await getHealthClient()).getQueueLogs(threshold))
152513
- )
152514
- );
152515
153192
  var healthGetQueueMailsCommand = health.command(`get-queue-mails`).description(`Get the number of mails that are waiting to be processed in the Appwrite internal queue server.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
152516
153193
  actionRunner(
152517
153194
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueMails(threshold))
@@ -152726,15 +153403,6 @@ var messagingDeleteCommand = messaging.command(`delete`).description(`Delete a m
152726
153403
  async ({ messageId }) => parse3(await (await getMessagingClient()).delete(messageId))
152727
153404
  )
152728
153405
  );
152729
- var messagingListMessageLogsCommand = messaging.command(`list-message-logs`).description(`Get the message activity logs listed by its unique ID.`).requiredOption(`--message-id <message-id>`, `Message ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag 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`).option(
152730
- `--total [value]`,
152731
- `When set to false, the total count returned will be 0 and will not be calculated.`,
152732
- (value) => value === void 0 ? true : parseBool(value)
152733
- ).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
152734
- actionRunner(
152735
- async ({ messageId, queries, total, limit, offset }) => parse3(await (await getMessagingClient()).listMessageLogs(messageId, buildQueries({ queries, limit, offset }), total))
152736
- )
152737
- );
152738
153406
  var messagingListTargetsCommand = messaging.command(`list-targets`).description(`Get a list of the targets associated with a message.`).requiredOption(`--message-id <message-id>`, `Message ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType`).option(
152739
153407
  `--total [value]`,
152740
153408
  `When set to false, the total count returned will be 0 and will not be calculated.`,
@@ -153004,24 +153672,6 @@ var messagingDeleteProviderCommand = messaging.command(`delete-provider`).descri
153004
153672
  async ({ providerId }) => parse3(await (await getMessagingClient()).deleteProvider(providerId))
153005
153673
  )
153006
153674
  );
153007
- var messagingListProviderLogsCommand = messaging.command(`list-provider-logs`).description(`Get the provider activity logs listed by its unique ID.`).requiredOption(`--provider-id <provider-id>`, `Provider ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag 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`).option(
153008
- `--total [value]`,
153009
- `When set to false, the total count returned will be 0 and will not be calculated.`,
153010
- (value) => value === void 0 ? true : parseBool(value)
153011
- ).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
153012
- actionRunner(
153013
- async ({ providerId, queries, total, limit, offset }) => parse3(await (await getMessagingClient()).listProviderLogs(providerId, buildQueries({ queries, limit, offset }), total))
153014
- )
153015
- );
153016
- var messagingListSubscriberLogsCommand = messaging.command(`list-subscriber-logs`).description(`Get the subscriber activity logs listed by its unique ID.`).requiredOption(`--subscriber-id <subscriber-id>`, `Subscriber ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag 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`).option(
153017
- `--total [value]`,
153018
- `When set to false, the total count returned will be 0 and will not be calculated.`,
153019
- (value) => value === void 0 ? true : parseBool(value)
153020
- ).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
153021
- actionRunner(
153022
- async ({ subscriberId, queries, total, limit, offset }) => parse3(await (await getMessagingClient()).listSubscriberLogs(subscriberId, buildQueries({ queries, limit, offset }), total))
153023
- )
153024
- );
153025
153675
  var messagingListTopicsCommand = messaging.command(`list-topics`).description(`Get a list of all topics from the current Appwrite project.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
153026
153676
  `--total [value]`,
153027
153677
  `When set to false, the total count returned will be 0 and will not be calculated.`,
@@ -153053,15 +153703,6 @@ var messagingDeleteTopicCommand = messaging.command(`delete-topic`).description(
153053
153703
  async ({ topicId }) => parse3(await (await getMessagingClient()).deleteTopic(topicId))
153054
153704
  )
153055
153705
  );
153056
- var messagingListTopicLogsCommand = messaging.command(`list-topic-logs`).description(`Get the topic activity logs listed by its unique ID.`).requiredOption(`--topic-id <topic-id>`, `Topic ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag 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`).option(
153057
- `--total [value]`,
153058
- `When set to false, the total count returned will be 0 and will not be calculated.`,
153059
- (value) => value === void 0 ? true : parseBool(value)
153060
- ).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
153061
- actionRunner(
153062
- async ({ topicId, queries, total, limit, offset }) => parse3(await (await getMessagingClient()).listTopicLogs(topicId, buildQueries({ queries, limit, offset }), total))
153063
- )
153064
- );
153065
153706
  var messagingListSubscribersCommand = messaging.command(`list-subscribers`).description(`Get a list of all subscribers from the current Appwrite project.`).requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID subscribed to.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag 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: targetId, topicId, userId, providerType`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
153066
153707
  `--total [value]`,
153067
153708
  `When set to false, the total count returned will be 0 and will not be calculated.`,
@@ -153207,6 +153848,31 @@ var migrationsDeleteCommand = migrations.command(`delete`).description(`Delete a
153207
153848
  )
153208
153849
  );
153209
153850
 
153851
+ // lib/commands/services/notifications.ts
153852
+ var notificationsClient = null;
153853
+ var getNotificationsClient = async () => {
153854
+ if (!notificationsClient) {
153855
+ const sdkClient = await sdkForProject();
153856
+ notificationsClient = new Notifications(sdkClient);
153857
+ }
153858
+ return notificationsClient;
153859
+ };
153860
+ var notifications = new Command("notifications").description(commandDescriptions["notifications"] ?? "").configureHelp({
153861
+ helpWidth: process.stdout.columns || 80
153862
+ });
153863
+ var notificationsListCommand = notifications.command(`list`).description(`Get the list of notifications for the currently logged in console user. Use queries to filter the results by attributes such as read status, view timestamps, or creation date.
153864
+ `).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag 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: read, type, channel, messageId, projectId, resourceType, resourceId, parentResourceType, parentResourceId, firstSeen, lastSeen`).option(`--filter <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseFilterQuery(value), previous)).option(`--where <expression>`, `Deprecated. Use --filter instead. Filter using a simple comparison expression. Repeat for multiple filters.`, (value, previous) => collectQueryValue(parseDeprecatedWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
153865
+ actionRunner(
153866
+ async ({ queries, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getNotificationsClient()).list(buildQueries({ queries, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset })))
153867
+ )
153868
+ );
153869
+ var notificationsUpdateCommand = notifications.command(`update`).description(`Update a notification by its unique ID. Use the \`read\` parameter to mark the notification as read or unread.
153870
+ `).requiredOption(`--notification-id <notification-id>`, `Notification ID.`).requiredOption(`--read <read>`, `Notification read status.`, parseBool).action(
153871
+ actionRunner(
153872
+ async ({ notificationId, read }) => parse3(await (await getNotificationsClient()).update(notificationId, read))
153873
+ )
153874
+ );
153875
+
153210
153876
  // lib/commands/services/oauth-2.ts
153211
153877
  var oauth2Client = null;
153212
153878
  var getOauth2Client = async () => {
@@ -153219,14 +153885,9 @@ var getOauth2Client = async () => {
153219
153885
  var oauth2 = new Command("oauth-2").description(commandDescriptions["oauth2"] ?? "").configureHelp({
153220
153886
  helpWidth: process.stdout.columns || 80
153221
153887
  });
153222
- var oauth2ApproveCommand = oauth2.command(`approve`).description(`Approve an OAuth2 grant after the user gives consent. Returns the \`redirectUrl\` the end user should be sent to. The consent screen may optionally pass enriched \`authorization_details\` to record the concrete resources the user selected. You can pass Accept header of \`application/json\` to receive a JSON response instead of a redirect.`).requiredOption(`--grant-_id <grant-_id>`, `Grant ID made during authorization, provided to consent screen in URL search params.`).option(`--authorization-_details <authorization-_details>`, `Enriched \`authorization_details\` the user consented to, replacing what the client requested. Each entry must use a \`type\` the project accepts. Optional; omit to keep the originally requested details.`).action(
153888
+ var oauth2AuthorizeCommand = oauth2.command(`authorize`).description(`Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of \`application/json\` to receive a JSON response instead of a redirect.`).option(`--client-_id <client-_id>`, `OAuth2 client ID.`).option(`--redirect-_uri <redirect-_uri>`, `Redirect URI where visitor will be redirected after authorization, whether successful or not.`).option(`--response-_type <response-_type>`, `OAuth2 / OIDC response type. One of \`code\` (Authorization Code Flow), \`id_token\` (Implicit Flow, OIDC login only), or \`code id_token\` (Hybrid Flow).`).option(`--scope <scope>`, `Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: \`openid\`, \`email\`, \`profile\`, \`phone\`.`).option(`--state <state>`, `OAuth2 state. You receive this back in the redirect URI.`).option(`--nonce <nonce>`, `OIDC nonce parameter to prevent replay attacks. Required when response_type includes \`id_token\`.`).option(`--code-_challenge <code-_challenge>`, `PKCE code challenge. Required when OAuth2 app is public.`).option(`--code-_challenge-_method <code-_challenge-_method>`, `PKCE code challenge method. Required when OAuth2 app is public.`).option(`--prompt <prompt>`, `OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.`).option(`--max-_age <max-_age>`, `OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.`, parseInteger).option(`--authorization-_details <authorization-_details>`, `Rich authorization request. JSON array of objects, each with a \`type\` and project-defined fields`).option(`--resource <resource>`, `RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.`).option(`--request-_uri <request-_uri>`, `OAuth2 authorization request handle returned by the pushed authorization request endpoint.`).action(
153223
153889
  actionRunner(
153224
- async ({ grant_id, authorization_details }) => parse3(await (await getOauth2Client()).approve(grant_id, authorization_details))
153225
- )
153226
- );
153227
- var oauth2AuthorizeCommand = oauth2.command(`authorize`).description(`Begin the OAuth2 authorization flow. When called without a session, the user is redirected to the consent screen without grant ID. When called with a session, the redirect URL includes param for grant ID. You can pass Accept header of \`application/json\` to receive a JSON response instead of a redirect.`).requiredOption(`--client-_id <client-_id>`, `OAuth2 client ID.`).requiredOption(`--redirect-_uri <redirect-_uri>`, `Redirect URI where visitor will be redirected after authorization, whether successful or not.`).requiredOption(`--response-_type <response-_type>`, `OAuth2 / OIDC response type. One of \`code\` (Authorization Code Flow), \`id_token\` (Implicit Flow, OIDC login only), or \`code id_token\` (Hybrid Flow).`).requiredOption(`--scope <scope>`, `Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: \`openid\`, \`email\`, \`profile\`.`).option(`--state <state>`, `OAuth2 state. You receive this back in the redirect URI.`).option(`--nonce <nonce>`, `OIDC nonce parameter to prevent replay attacks. Required when response_type includes \`id_token\`.`).option(`--code-_challenge <code-_challenge>`, `PKCE code challenge. Required when OAuth2 app is public.`).option(`--code-_challenge-_method <code-_challenge-_method>`, `PKCE code challenge method. Required when OAuth2 app is public.`).option(`--prompt <prompt>`, `OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.`).option(`--max-_age <max-_age>`, `OIDC max_age paraleter for customization of consent screen. Maximum allowable elapsed time in seconds since the user last authenticated. If exceeded, re-authentication is required.`, parseInteger).option(`--authorization-_details <authorization-_details>`, `Rich authorization request. JSON array of objects, each with a \`type\` and project-defined fields`).option(`--resource <resource>`, `RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.`).action(
153228
- actionRunner(
153229
- async ({ client_id, redirect_uri, response_type, scope, state, nonce, code_challenge, code_challenge_method, prompt, max_age, authorization_details, resource }) => parse3(await (await getOauth2Client()).authorize(client_id, redirect_uri, response_type, scope, state, nonce, code_challenge, code_challenge_method, prompt, max_age, authorization_details, resource))
153890
+ async ({ client_id, redirect_uri, response_type, scope, state, nonce, code_challenge, code_challenge_method, prompt, max_age, authorization_details, resource, request_uri }) => parse3(await (await getOauth2Client()).authorize(client_id, redirect_uri, response_type, scope, state, nonce, code_challenge, code_challenge_method, prompt, max_age, authorization_details, resource, request_uri))
153230
153891
  )
153231
153892
  );
153232
153893
  var oauth2CreateDeviceAuthorizationCommand = oauth2.command(`create-device-authorization`).description(`Start the OAuth2 Device Authorization Grant. Returns the device code, user code, verification URL, expiration, and polling interval.`).option(`--client-_id <client-_id>`, `OAuth2 client ID.`).option(`--scope <scope>`, `Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: \`openid\`, \`email\`, \`profile\`.`).option(`--authorization-_details <authorization-_details>`, `Rich authorization request. JSON array of objects, each with a \`type\` and project-defined fields`).option(`--resource <resource>`, `RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.`).action(
@@ -153249,6 +153910,21 @@ var oauth2LogoutCommand = oauth2.command(`logout`).description(`OpenID Connect R
153249
153910
  async ({ id_token_hint, logout_hint, client_id, post_logout_redirect_uri, state, ui_locales }) => parse3(await (await getOauth2Client()).logout(id_token_hint, logout_hint, client_id, post_logout_redirect_uri, state, ui_locales))
153250
153911
  )
153251
153912
  );
153913
+ var oauth2ListOrganizationsCommand = oauth2.command(`list-organizations`).description(`List the organizations the OAuth2 access token can access. Resolves the token's \`organization\` authorization details, expanding the \`*\` wildcard into the concrete set of organizations the user can see.`).option(`--limit <limit>`, `Maximum number of organizations to return. Between 1 and 5000.`, parseInteger).option(`--offset <offset>`, `Number of organizations to skip before returning results. Used for pagination.`, parseInteger).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).action(
153914
+ actionRunner(
153915
+ async ({ limit, offset, search }) => parse3(await (await getOauth2Client()).listOrganizations(limit, offset, search))
153916
+ )
153917
+ );
153918
+ var oauth2CreatePARCommand = oauth2.command(`create-par`).description(`Store an OAuth2 authorization request server-side and receive a short-lived request_uri handle for the authorize endpoint.`).requiredOption(`--client-_id <client-_id>`, `OAuth2 client ID.`).requiredOption(`--redirect-_uri <redirect-_uri>`, `Redirect URI where visitor will be redirected after authorization, whether successful or not.`).requiredOption(`--response-_type <response-_type>`, `OAuth2 / OIDC response type.`).requiredOption(`--scope <scope>`, `Space-separated OAuth2 scopes. Can include project scopes, and built-in scopes: \`openid\`, \`email\`, \`profile\`, \`phone\`.`).option(`--state <state>`, `OAuth2 state. You receive this back in the redirect URI.`).option(`--nonce <nonce>`, `OIDC nonce parameter to prevent replay attacks. Required when response_type includes \`id_token\`.`).option(`--code-_challenge <code-_challenge>`, `PKCE code challenge. Required when OAuth2 app is public.`).option(`--code-_challenge-_method <code-_challenge-_method>`, `PKCE code challenge method. Required when OAuth2 app is public.`).option(`--prompt <prompt>`, `OIDC prompt parameter for customization of consent screen. Space-separated list of: none, login, consent, select_account.`).option(`--max-_age <max-_age>`, `OIDC max_age parameter for customization of consent screen.`, parseInteger).option(`--authorization-_details <authorization-_details>`, `Rich authorization request. JSON array of objects, each with a \`type\` and project-defined fields`).option(`--resource <resource>`, `RFC 8707 resource indicator URI or URI list. Each value must be an absolute URI without a fragment.`).action(
153919
+ actionRunner(
153920
+ async ({ client_id, redirect_uri, response_type, scope, state, nonce, code_challenge, code_challenge_method, prompt, max_age, authorization_details, resource }) => parse3(await (await getOauth2Client()).createPAR(client_id, redirect_uri, response_type, scope, state, nonce, code_challenge, code_challenge_method, prompt, max_age, authorization_details, resource))
153921
+ )
153922
+ );
153923
+ var oauth2ListProjectsCommand = oauth2.command(`list-projects`).description(`List the projects the OAuth2 access token can access. Resolves the token's \`project\` authorization details, expanding the \`*\` wildcard into the concrete set of projects the user can see.`).option(`--limit <limit>`, `Maximum number of projects to return. Between 1 and 5000.`, parseInteger).option(`--offset <offset>`, `Number of projects to skip before returning results. Used for pagination.`, parseInteger).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).action(
153924
+ actionRunner(
153925
+ async ({ limit, offset, search }) => parse3(await (await getOauth2Client()).listProjects(limit, offset, search))
153926
+ )
153927
+ );
153252
153928
  var oauth2RejectCommand = oauth2.command(`reject`).description(`Reject an OAuth2 grant when the user denies consent. Returns the \`redirectUrl\` the end user should be sent to with an \`access_denied\` error. You can pass Accept header of \`application/json\` to receive a JSON response instead of a redirect.`).requiredOption(`--grant-_id <grant-_id>`, `Grant ID made during authorization, provided to consent screen in URL search params.`).action(
153253
153929
  actionRunner(
153254
153930
  async ({ grant_id }) => parse3(await (await getOauth2Client()).reject(grant_id))
@@ -153277,6 +153953,21 @@ var getOrganizationClient = async () => {
153277
153953
  var organization = new Command("organization").description(commandDescriptions["organization"] ?? "").configureHelp({
153278
153954
  helpWidth: process.stdout.columns || 80
153279
153955
  });
153956
+ var organizationGetCommand = organization.command(`get`).description(`Get the current organization.`).action(
153957
+ actionRunner(
153958
+ async () => parse3(await (await getOrganizationClient()).get())
153959
+ )
153960
+ );
153961
+ var organizationUpdateCommand = organization.command(`update`).description(`Update the current organization's name.`).requiredOption(`--name <name>`, `New organization name. Max length: 128 chars.`).action(
153962
+ actionRunner(
153963
+ async ({ name }) => parse3(await (await getOrganizationClient()).update(name))
153964
+ )
153965
+ );
153966
+ var organizationDeleteCommand = organization.command(`delete`).description(`Delete the current organization. All projects that belong to the organization are deleted as well.`).action(
153967
+ actionRunner(
153968
+ async () => parse3(await (await getOrganizationClient()).delete())
153969
+ )
153970
+ );
153280
153971
  var organizationListKeysCommand = organization.command(`list-keys`).description(`Get a list of all API keys from the current organization.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag 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: expire, accessedAt, name, scopes`).option(
153281
153972
  `--total [value]`,
153282
153973
  `When set to false, the total count returned will be 0 and will not be calculated.`,
@@ -153286,7 +153977,7 @@ var organizationListKeysCommand = organization.command(`list-keys`).description(
153286
153977
  async ({ queries, total, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getOrganizationClient()).listKeys(buildQueries({ queries, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), total))
153287
153978
  )
153288
153979
  );
153289
- var organizationCreateKeyCommand = organization.command(`create-key`).description(`Create a new organization API key.`).requiredOption(`--key-id <key-id>`, `Key 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.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).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.`).action(
153980
+ var organizationCreateKeyCommand = organization.command(`create-key`).description(`Create a new organization API key.`).requiredOption(`--key-id <key-id>`, `Key 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.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 200 scopes are allowed.`).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.`).action(
153290
153981
  actionRunner(
153291
153982
  async ({ keyId, name, scopes, expire }) => parse3(await (await getOrganizationClient()).createKey(keyId, name, scopes, expire))
153292
153983
  )
@@ -153296,7 +153987,7 @@ var organizationGetKeyCommand = organization.command(`get-key`).description(`Get
153296
153987
  async ({ keyId }) => parse3(await (await getOrganizationClient()).getKey(keyId))
153297
153988
  )
153298
153989
  );
153299
- var organizationUpdateKeyCommand = organization.command(`update-key`).description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).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.`).action(
153990
+ var organizationUpdateKeyCommand = organization.command(`update-key`).description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 200 scopes are allowed.`).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.`).action(
153300
153991
  actionRunner(
153301
153992
  async ({ keyId, name, scopes, expire }) => parse3(await (await getOrganizationClient()).updateKey(keyId, name, scopes, expire))
153302
153993
  )
@@ -153306,7 +153997,36 @@ var organizationDeleteKeyCommand = organization.command(`delete-key`).descriptio
153306
153997
  async ({ keyId }) => parse3(await (await getOrganizationClient()).deleteKey(keyId))
153307
153998
  )
153308
153999
  );
153309
- var organizationListProjectsCommand = organization.command(`list-projects`).description(`Get a list of all projects. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
154000
+ var organizationListMembershipsCommand = organization.command(`list-memberships`).description(`Get a list of all memberships from the current organization.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
154001
+ `--total [value]`,
154002
+ `When set to false, the total count returned will be 0 and will not be calculated.`,
154003
+ (value) => value === void 0 ? true : parseBool(value)
154004
+ ).option(`--filter <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseFilterQuery(value), previous)).option(`--where <expression>`, `Deprecated. Use --filter instead. Filter using a simple comparison expression. Repeat for multiple filters.`, (value, previous) => collectQueryValue(parseDeprecatedWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
154005
+ actionRunner(
154006
+ async ({ queries, search, total, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getOrganizationClient()).listMemberships(buildQueries({ queries, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }), search, total))
154007
+ )
154008
+ );
154009
+ var organizationCreateMembershipCommand = organization.command(`create-membership`).description(`Invite a new member to join the current organization. An email with a link to join the organization will be sent to the new member's email address. If member doesn't exist in the project it will be automatically created.`).requiredOption(`--roles [roles...]`, `Array of strings. Use this param to set the user roles in the organization. A role can be any string. Learn more about roles and permissions (https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.`).option(`--email <email>`, `Email of the new organization member.`).option(`--user-id <user-id>`, `ID of the user to be added to the organization.`).option(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`).option(`--url <url>`, `URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied.`).option(`--name <name>`, `Name of the new organization member. Max length: 128 chars.`).action(
154010
+ actionRunner(
154011
+ async ({ roles, email: email3, userId, phone, url: url2, name }) => parse3(await (await getOrganizationClient()).createMembership(roles, email3, userId, phone, url2, name))
154012
+ )
154013
+ );
154014
+ var organizationGetMembershipCommand = organization.command(`get-membership`).description(`Get a membership from the current organization by its unique ID.`).requiredOption(`--membership-id <membership-id>`, `Membership ID.`).action(
154015
+ actionRunner(
154016
+ async ({ membershipId }) => parse3(await (await getOrganizationClient()).getMembership(membershipId))
154017
+ )
154018
+ );
154019
+ var organizationUpdateMembershipCommand = organization.command(`update-membership`).description(`Modify the roles of a member in the current organization.`).requiredOption(`--membership-id <membership-id>`, `Membership ID.`).requiredOption(`--roles [roles...]`, `An array of strings. Use this param to set the user's roles in the organization. A role can be any string. Learn more about roles and permissions (https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.`).action(
154020
+ actionRunner(
154021
+ async ({ membershipId, roles }) => parse3(await (await getOrganizationClient()).updateMembership(membershipId, roles))
154022
+ )
154023
+ );
154024
+ var organizationDeleteMembershipCommand = organization.command(`delete-membership`).description(`Remove a member from the current organization. The member is removed whether they accepted the invitation or not; a pending invitation is revoked.`).requiredOption(`--membership-id <membership-id>`, `Membership ID.`).action(
154025
+ actionRunner(
154026
+ async ({ membershipId }) => parse3(await (await getOrganizationClient()).deleteMembership(membershipId))
154027
+ )
154028
+ );
154029
+ var organizationListProjectsCommand = organization.command(`list-projects`).description(`Get a list of all projects. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search, accessedAt`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
153310
154030
  `--total [value]`,
153311
154031
  `When set to false, the total count returned will be 0 and will not be calculated.`,
153312
154032
  (value) => value === void 0 ? true : parseBool(value)
@@ -153382,6 +154102,12 @@ var organizationsCreateBaaAddonCommand = organizations.command(`create-baa-addon
153382
154102
  async ({ organizationId }) => parse3(await (await getOrganizationsClient()).createBaaAddon(organizationId))
153383
154103
  )
153384
154104
  );
154105
+ var organizationsCreatePremiumGeoDBAddonCommand = organizations.command(`create-premium-geo-db-addon`).description(`Create a Premium Geo DB addon for an organization.
154106
+ `).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
154107
+ actionRunner(
154108
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).createPremiumGeoDBAddon(organizationId))
154109
+ )
154110
+ );
153385
154111
  var organizationsGetAddonCommand = organizations.command(`get-addon`).description(`Get the details of a billing addon for an organization.
153386
154112
  `).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--addon-id <addon-id>`, `Addon ID`).action(
153387
154113
  actionRunner(
@@ -153668,14 +154394,14 @@ var projectListKeysCommand = project.command(`list-keys`).description(`Get a lis
153668
154394
  );
153669
154395
  var projectCreateKeyCommand = project.command(`create-key`).description(`Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
153670
154396
 
153671
- You can also create an ephemeral API key if you need a short-lived key instead.`).requiredOption(`--key-id <key-id>`, `Key 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.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).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.`).action(
154397
+ You can also create an ephemeral API key if you need a short-lived key instead.`).requiredOption(`--key-id <key-id>`, `Key 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.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 200 scopes are allowed.`).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.`).action(
153672
154398
  actionRunner(
153673
154399
  async ({ keyId, name, scopes, expire }) => parse3(await (await getProjectClient()).createKey(keyId, name, scopes, expire))
153674
154400
  )
153675
154401
  );
153676
154402
  var projectCreateEphemeralKeyCommand = project.command(`create-ephemeral-key`).description(`Create a new ephemeral API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
153677
154403
 
153678
- You can also create a standard API key if you need a longer-lived key instead.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).requiredOption(`--duration <duration>`, `Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.`, parseInteger).action(
154404
+ You can also create a standard API key if you need a longer-lived key instead.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 200 scopes are allowed.`).requiredOption(`--duration <duration>`, `Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.`, parseInteger).action(
153679
154405
  actionRunner(
153680
154406
  async ({ scopes, duration: duration3 }) => parse3(await (await getProjectClient()).createEphemeralKey(scopes, duration3))
153681
154407
  )
@@ -153685,7 +154411,7 @@ var projectGetKeyCommand = project.command(`get-key`).description(`Get a key by
153685
154411
  async ({ keyId }) => parse3(await (await getProjectClient()).getKey(keyId))
153686
154412
  )
153687
154413
  );
153688
- var projectUpdateKeyCommand = project.command(`update-key`).description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.`).requiredOption(`--key-id <key-id>`, `Key ID.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).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.`).action(
154414
+ var projectUpdateKeyCommand = project.command(`update-key`).description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.`).requiredOption(`--key-id <key-id>`, `Key ID.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 200 scopes are allowed.`).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.`).action(
153689
154415
  actionRunner(
153690
154416
  async ({ keyId, name, scopes, expire }) => parse3(await (await getProjectClient()).updateKey(keyId, name, scopes, expire))
153691
154417
  )
@@ -153963,13 +154689,13 @@ var projectUpdateOAuth2NotionCommand = project.command(`update-o-auth-2-notion`)
153963
154689
  async ({ oauthClientId, oauthClientSecret, enabled }) => parse3(await (await getProjectClient()).updateOAuth2Notion(oauthClientId, oauthClientSecret, enabled))
153964
154690
  )
153965
154691
  );
153966
- var projectUpdateOAuth2OidcCommand = project.command(`update-o-auth-2-oidc`).description(`Update the project OAuth2 Oidc configuration.`).option(`--client-id <client-id>`, `'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG`).option(`--client-secret <client-secret>`, `'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV`).option(`--well-known-url <well-known-url>`, `OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https://myoauth.com/.well-known/openid-configuration`).option(`--authorization-url <authorization-url>`, `OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/authorize`).option(`--token-url <token-url>`, `OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/token`).option(`--user-info-url <user-info-url>`, `OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/userinfo`).option(
154692
+ var projectUpdateOAuth2OidcCommand = project.command(`update-o-auth-2-oidc`).description(`Update the project OAuth2 Oidc configuration.`).option(`--client-id <client-id>`, `'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG`).option(`--client-secret <client-secret>`, `'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV`).option(`--well-known-url <well-known-url>`, `OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https://myoauth.com/.well-known/openid-configuration`).option(`--authorization-url <authorization-url>`, `OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/authorize`).option(`--token-url <token-url>`, `OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/token`).option(`--user-info-url <user-info-url>`, `OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/userinfo`).option(`--prompt [prompt...]`, `Array of OpenID Connect prompt values controlling the authentication and consent screens. If "none" is included, it must be the only element. "none" means: don't display any authentication or consent screens. "login" means: prompt the user to re-authenticate. "consent" means: prompt the user for consent. "select_account" means: prompt the user to select an account.`).option(`--max-age <max-age>`, `Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds, otherwise they are prompted to re-authenticate.`, parseInteger).option(
153967
154693
  `--enabled [value]`,
153968
154694
  `OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.`,
153969
154695
  (value) => value === void 0 ? true : parseBool(value)
153970
154696
  ).action(
153971
154697
  actionRunner(
153972
- async ({ clientId, clientSecret, wellKnownUrl, authorizationUrl, tokenUrl, userInfoUrl, enabled }) => parse3(await (await getProjectClient()).updateOAuth2Oidc(clientId, clientSecret, wellKnownUrl, authorizationUrl, tokenUrl, userInfoUrl, enabled))
154698
+ async ({ clientId, clientSecret, wellKnownUrl, authorizationUrl, tokenUrl, userInfoUrl, prompt, maxAge, enabled }) => parse3(await (await getProjectClient()).updateOAuth2Oidc(clientId, clientSecret, wellKnownUrl, authorizationUrl, tokenUrl, userInfoUrl, prompt, maxAge, enabled))
153973
154699
  )
153974
154700
  );
153975
154701
  var projectUpdateOAuth2OktaCommand = project.command(`update-o-auth-2-okta`).description(`Update the project OAuth2 Okta configuration.`).option(`--client-id <client-id>`, `'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698`).option(`--client-secret <client-secret>`, `'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV`).option(`--domain <domain>`, `Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https://trial-6400025.okta.com/`).option(`--authorization-server-id <authorization-server-id>`, `Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z`).option(
@@ -154423,6 +155149,42 @@ var getProjectsClient = async () => {
154423
155149
  var projects = new Command("projects").description(commandDescriptions["projects"] ?? "").configureHelp({
154424
155150
  helpWidth: process.stdout.columns || 80
154425
155151
  });
155152
+ var projectsListAddonsCommand = projects.command(`list-addons`).description(`List all billing addons for a project.
155153
+ `).requiredOption(`--project-id <project-id>`, `Project ID`).action(
155154
+ actionRunner(
155155
+ async ({ projectId }) => parse3(await (await getProjectsClient()).listAddons(projectId))
155156
+ )
155157
+ );
155158
+ var projectsCreatePremiumGeoDBAddonCommand = projects.command(`create-premium-geo-db-addon`).description(`Create a Premium Geo DB addon for a project.
155159
+ `).requiredOption(`--project-id <project-id>`, `Project ID`).action(
155160
+ actionRunner(
155161
+ async ({ projectId }) => parse3(await (await getProjectsClient()).createPremiumGeoDBAddon(projectId))
155162
+ )
155163
+ );
155164
+ var projectsGetAddonCommand = projects.command(`get-addon`).description(`Get the details of a billing addon for a project.
155165
+ `).requiredOption(`--project-id <project-id>`, `Project ID`).requiredOption(`--addon-id <addon-id>`, `Addon ID`).action(
155166
+ actionRunner(
155167
+ async ({ projectId, addonId }) => parse3(await (await getProjectsClient()).getAddon(projectId, addonId))
155168
+ )
155169
+ );
155170
+ var projectsDeleteAddonCommand = projects.command(`delete-addon`).description(`Delete a billing addon for a project.
155171
+ `).requiredOption(`--project-id <project-id>`, `Project ID`).requiredOption(`--addon-id <addon-id>`, `Addon ID`).action(
155172
+ actionRunner(
155173
+ async ({ projectId, addonId }) => parse3(await (await getProjectsClient()).deleteAddon(projectId, addonId))
155174
+ )
155175
+ );
155176
+ var projectsConfirmAddonPaymentCommand = projects.command(`confirm-addon-payment`).description(`Confirm payment for a billing addon for a project.
155177
+ `).requiredOption(`--project-id <project-id>`, `Project ID`).requiredOption(`--addon-id <addon-id>`, `Addon ID`).action(
155178
+ actionRunner(
155179
+ async ({ projectId, addonId }) => parse3(await (await getProjectsClient()).confirmAddonPayment(projectId, addonId))
155180
+ )
155181
+ );
155182
+ var projectsGetAddonPriceCommand = projects.command(`get-addon-price`).description(`Get the price details for a billing addon for a project, including the prorated amount for the remaining days in the current billing cycle.
155183
+ `).requiredOption(`--project-id <project-id>`, `Project ID`).requiredOption(`--addon <addon>`, `Addon key identifier (e.g. premiumGeoDB).`).action(
155184
+ actionRunner(
155185
+ async ({ projectId, addon }) => parse3(await (await getProjectsClient()).getAddonPrice(projectId, addon))
155186
+ )
155187
+ );
154426
155188
  var projectsListDevKeysCommand = projects.command(`list-dev-keys`).description(`List all the project's dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag 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: accessedAt, expire`).option(`--filter <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseFilterQuery(value), previous)).option(`--where <expression>`, `Deprecated. Use --filter instead. Filter using a simple comparison expression. Repeat for multiple filters.`, (value, previous) => collectQueryValue(parseDeprecatedWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
154427
155189
  actionRunner(
154428
155190
  async ({ projectId, queries, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) => parse3(await (await getProjectsClient()).listDevKeys(projectId, buildQueries({ queries, filter, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset })))
@@ -154979,9 +155741,9 @@ var tablesDBCreateCommand = tablesDB.command(`create`).description(`Create a new
154979
155741
  `--enabled [value]`,
154980
155742
  `Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.`,
154981
155743
  (value) => value === void 0 ? true : parseBool(value)
154982
- ).option(`--dedicated-database-id <dedicated-database-id>`, `Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.`).action(
155744
+ ).option(`--specification <specification>`, `Database specification. Defaults to \`serverless\`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.`).action(
154983
155745
  actionRunner(
154984
- async ({ databaseId, name, enabled, dedicatedDatabaseId }) => parse3(await (await getTablesDBClient()).create(databaseId, name, enabled, dedicatedDatabaseId))
155746
+ async ({ databaseId, name, enabled, specification }) => parse3(await (await getTablesDBClient()).create(databaseId, name, enabled, specification))
154985
155747
  )
154986
155748
  );
154987
155749
  var tablesDBListTransactionsCommand = tablesDB.command(`list-transactions`).description(`List transactions across all databases.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries).`).option(`--filter <expression>`, `Filter using a simple comparison expression. Repeat for multiple filters. Supports field=value, field!=value, field>value, field>=value, field<value, and field<=value.`, (value, previous) => collectQueryValue(parseFilterQuery(value), previous)).option(`--where <expression>`, `Deprecated. Use --filter instead. Filter using a simple comparison expression. Repeat for multiple filters.`, (value, previous) => collectQueryValue(parseDeprecatedWhereQuery(value), previous)).option(`--sort-asc <attribute>`, `Sort results by an attribute in ascending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--sort-desc <attribute>`, `Sort results by an attribute in descending order. Repeat for multiple sort fields.`, (value, previous) => collectQueryValue(value, previous)).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).option(`--cursor-after <id>`, `Return results after this cursor ID.`).option(`--cursor-before <id>`, `Return results before this cursor ID.`).action(
@@ -155046,6 +155808,26 @@ var tablesDBDeleteCommand = tablesDB.command(`delete`).description(`Delete a dat
155046
155808
  async ({ databaseId }) => parse3(await (await getTablesDBClient()).delete(databaseId))
155047
155809
  )
155048
155810
  );
155811
+ var tablesDBListMigrationsCommand = tablesDB.command(`list-migrations`).description(`List the dedicated migrations for a TablesDB database. A database has at most one in-flight migration.`).requiredOption(`--database-id <database-id>`, `Database ID.`).action(
155812
+ actionRunner(
155813
+ async ({ databaseId }) => parse3(await (await getTablesDBClient()).listMigrations(databaseId))
155814
+ )
155815
+ );
155816
+ var tablesDBCreateMigrationCommand = tablesDB.command(`create-migration`).description(`Start migrating a serverless TablesDB database onto a dedicated MySQL compute. Data is copied to the target while the source stays live, with a brief read-only window during cutover.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--specification <specification>`, `Dedicated compute specification to provision as the migration target (e.g. s-2vcpu-4gb). The migration always targets a dedicated compute, so \`serverless\` is not accepted.`).action(
155817
+ actionRunner(
155818
+ async ({ databaseId, specification }) => parse3(await (await getTablesDBClient()).createMigration(databaseId, specification))
155819
+ )
155820
+ );
155821
+ var tablesDBGetMigrationCommand = tablesDB.command(`get-migration`).description(`Get a single dedicated migration for a TablesDB database by its ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--migration-id <migration-id>`, `Migration ID.`).action(
155822
+ actionRunner(
155823
+ async ({ databaseId, migrationId }) => parse3(await (await getTablesDBClient()).getMigration(databaseId, migrationId))
155824
+ )
155825
+ );
155826
+ var tablesDBDeleteMigrationCommand = tablesDB.command(`delete-migration`).description(`Abort an in-flight TablesDB dedicated migration. Only allowed before cutover; once the migration has cut over it cannot be aborted.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--migration-id <migration-id>`, `Migration ID.`).action(
155827
+ actionRunner(
155828
+ async ({ databaseId, migrationId }) => parse3(await (await getTablesDBClient()).deleteMigration(databaseId, migrationId))
155829
+ )
155830
+ );
155049
155831
  var tablesDBListTablesCommand = tablesDB.command(`list-tables`).description(`Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.`).requiredOption(`--database-id <database-id>`, `Database ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag 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 columns: name, enabled, rowSecurity`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
155050
155832
  `--total [value]`,
155051
155833
  `When set to false, the total count returned will be 0 and will not be calculated.`,
@@ -155429,11 +156211,6 @@ var tablesDBDeleteIndexCommand = tablesDB.command(`delete-index`).description(`D
155429
156211
  async ({ databaseId, tableId, key }) => parse3(await (await getTablesDBClient()).deleteIndex(databaseId, tableId, key))
155430
156212
  )
155431
156213
  );
155432
- var tablesDBListTableLogsCommand = tablesDB.command(`list-table-logs`).description(`Get the table activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag 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`).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
155433
- actionRunner(
155434
- async ({ databaseId, tableId, queries, limit, offset }) => parse3(await (await getTablesDBClient()).listTableLogs(databaseId, tableId, buildQueries({ queries, limit, offset })))
155435
- )
155436
- );
155437
156214
  var tablesDBListRowsCommand = tablesDB.command(`list-rows`).description(`Get a list of all the user's rows in a given table. You can use the query params to filter your results.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the TablesDB service server integration (https://appwrite.io/docs/products/databases/tables#create-table).`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, pagination, and selection prefer --filter, --sort-asc, --sort-desc, --limit, --offset, and --select. When mixed, raw --queries are sent before generated flag 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.`).option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`).option(
155438
156215
  `--total [value]`,
155439
156216
  `When set to false, the total count returned will be 0 and will not be calculated.`,
@@ -155489,11 +156266,6 @@ var tablesDBDeleteRowCommand = tablesDB.command(`delete-row`).description(`Delet
155489
156266
  async ({ databaseId, tableId, rowId, transactionId }) => parse3(await (await getTablesDBClient()).deleteRow(databaseId, tableId, rowId, transactionId))
155490
156267
  )
155491
156268
  );
155492
- var tablesDBListRowLogsCommand = tablesDB.command(`list-row-logs`).description(`Get the row activity logs list by its unique ID.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).requiredOption(`--row-id <row-id>`, `Row ID.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common pagination prefer --limit and --offset. When mixed, raw --queries are sent before generated flag 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`).option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger).option(`--offset <offset>`, `Number of results to skip.`, parseInteger).action(
155493
- actionRunner(
155494
- async ({ databaseId, tableId, rowId, queries, limit, offset }) => parse3(await (await getTablesDBClient()).listRowLogs(databaseId, tableId, rowId, buildQueries({ queries, limit, offset })))
155495
- )
155496
- );
155497
156269
  var tablesDBDecrementRowColumnCommand = tablesDB.command(`decrement-row-column`).description(`Decrement a specific column of a row by a given value.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID.`).requiredOption(`--row-id <row-id>`, `Row ID.`).requiredOption(`--column <column>`, `Column key.`).option(`--value <value>`, `Value to increment the column by. The value must be a number.`, parseInteger).option(`--min <min>`, `Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.`, parseInteger).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
155498
156270
  actionRunner(
155499
156271
  async ({ databaseId, tableId, rowId, column, value, min, transactionId }) => parse3(await (await getTablesDBClient()).decrementRowColumn(databaseId, tableId, rowId, column, value, min, transactionId))
@@ -155683,7 +156455,7 @@ var getUsersClient = async () => {
155683
156455
  var users = new Command("users").description(commandDescriptions["users"] ?? "").configureHelp({
155684
156456
  helpWidth: process.stdout.columns || 80
155685
156457
  });
155686
- var usersListCommand = users.command(`list`).description(`Get a list of all the project's users. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
156458
+ var usersListCommand = users.command(`list`).description(`Get a list of all the project's users. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Raw Appwrite JSON query strings (legacy). Use this for advanced queries or automation; for common filtering, sorting, and pagination prefer --filter, --sort-asc, --sort-desc, --limit, and --offset. When mixed, raw --queries are sent before generated flag queries. Array of query strings generated using the Query class provided by the SDK. Learn more about queries (https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator, accessedAt`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
155687
156459
  `--total [value]`,
155688
156460
  `When set to false, the total count returned will be 0 and will not be calculated.`,
155689
156461
  (value) => value === void 0 ? true : parseBool(value)
@@ -156159,7 +156931,7 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
156159
156931
  cliConfig.all = true;
156160
156932
  }).on("option:id", function() {
156161
156933
  cliConfig.ids = this.opts().id;
156162
- }).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(oauth2).addCommand(organization).addCommand(organizations).addCommand(presences).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(webhooks).addCommand(createCompletionCommand(program)).addCommand(client).parse(process.argv);
156934
+ }).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(notifications).addCommand(oauth2).addCommand(organization).addCommand(organizations).addCommand(presences).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(webhooks).addCommand(createCompletionCommand(program)).addCommand(client).parse(process.argv);
156163
156935
  process.stdout.columns = oldWidth;
156164
156936
  })();
156165
156937
  }