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/index.js CHANGED
@@ -35934,7 +35934,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
35934
35934
  }
35935
35935
  return positiveOption || option2;
35936
35936
  };
35937
- const getErrorMessage2 = (option2) => {
35937
+ const getErrorMessage3 = (option2) => {
35938
35938
  const bestOption = findBestOptionFromValue(option2);
35939
35939
  const optionKey = bestOption.attributeName();
35940
35940
  const source = this.getOptionValueSource(optionKey);
@@ -35943,7 +35943,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
35943
35943
  }
35944
35944
  return `option '${bestOption.flags}'`;
35945
35945
  };
35946
- const message = `error: ${getErrorMessage2(option)} cannot be used with ${getErrorMessage2(conflictingOption)}`;
35946
+ const message = `error: ${getErrorMessage3(option)} cannot be used with ${getErrorMessage3(conflictingOption)}`;
35947
35947
  this.error(message, { code: "commander.conflictingOption" });
35948
35948
  }
35949
35949
  /**
@@ -65545,7 +65545,7 @@ var id_default = ID;
65545
65545
  // lib/constants.ts
65546
65546
  var SDK_TITLE = "Appwrite";
65547
65547
  var SDK_TITLE_LOWER = "appwrite";
65548
- var SDK_VERSION = "22.3.0";
65548
+ var SDK_VERSION = "22.5.0";
65549
65549
  var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
65550
65550
  var EXECUTABLE_NAME = "appwrite";
65551
65551
  var UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
@@ -80692,6 +80692,9 @@ Query.distanceEqual = (attribute, values, distance, meters = true) => new Query(
80692
80692
  Query.distanceNotEqual = (attribute, values, distance, meters = true) => new Query("distanceNotEqual", attribute, [[values, distance, meters]]).toString();
80693
80693
  Query.distanceGreaterThan = (attribute, values, distance, meters = true) => new Query("distanceGreaterThan", attribute, [[values, distance, meters]]).toString();
80694
80694
  Query.distanceLessThan = (attribute, values, distance, meters = true) => new Query("distanceLessThan", attribute, [[values, distance, meters]]).toString();
80695
+ Query.vectorDot = (attribute, vector) => new Query("vectorDot", attribute, [vector]).toString();
80696
+ Query.vectorCosine = (attribute, vector) => new Query("vectorCosine", attribute, [vector]).toString();
80697
+ Query.vectorEuclidean = (attribute, vector) => new Query("vectorEuclidean", attribute, [vector]).toString();
80695
80698
  Query.intersects = (attribute, values) => new Query("intersects", attribute, [values]).toString();
80696
80699
  Query.notIntersects = (attribute, values) => new Query("notIntersects", attribute, [values]).toString();
80697
80700
  Query.crosses = (attribute, values) => new Query("crosses", attribute, [values]).toString();
@@ -80756,6 +80759,7 @@ var Client = class _Client {
80756
80759
  project: "",
80757
80760
  key: "",
80758
80761
  jwt: "",
80762
+ bearer: "",
80759
80763
  locale: "",
80760
80764
  mode: "",
80761
80765
  cookie: "",
@@ -80772,7 +80776,7 @@ var Client = class _Client {
80772
80776
  "x-sdk-name": "Console",
80773
80777
  "x-sdk-platform": "console",
80774
80778
  "x-sdk-language": "web",
80775
- "x-sdk-version": "15.1.1",
80779
+ "x-sdk-version": "15.2.0",
80776
80780
  "X-Appwrite-Response-Format": "1.9.5"
80777
80781
  };
80778
80782
  this.realtime = {
@@ -80823,7 +80827,10 @@ var Client = class _Client {
80823
80827
  return;
80824
80828
  }
80825
80829
  const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : "");
80826
- const queryParams = "project=" + encodedProject;
80830
+ let queryParams = "project=" + encodedProject;
80831
+ if (this.config.jwt) {
80832
+ queryParams += "&jwt=" + encodeURIComponent(this.config.jwt);
80833
+ }
80827
80834
  const url2 = this.config.endpointRealtime + "/realtime?" + queryParams;
80828
80835
  if (url2 !== this.realtime.url || // Check if URL is present
80829
80836
  !this.realtime.socket || // Check if WebSocket has not been created
@@ -81079,6 +81086,20 @@ var Client = class _Client {
81079
81086
  this.config.jwt = value;
81080
81087
  return this;
81081
81088
  }
81089
+ /**
81090
+ * Set Bearer
81091
+ *
81092
+ * The OAuth access token to authenticate with
81093
+ *
81094
+ * @param value string
81095
+ *
81096
+ * @return {this}
81097
+ */
81098
+ setBearer(value) {
81099
+ this.headers["Authorization"] = value;
81100
+ this.config.bearer = value;
81101
+ return this;
81102
+ }
81082
81103
  /**
81083
81104
  * Set Locale
81084
81105
  *
@@ -81450,7 +81471,7 @@ var Client = class _Client {
81450
81471
  }
81451
81472
  call(method_1, url_1) {
81452
81473
  return __awaiter(this, arguments, void 0, function* (method, url2, headers = {}, params = {}, responseType = "json") {
81453
- var _a4, _b;
81474
+ var _a4, _b, _c;
81454
81475
  const { uri, options } = this.prepareRequest(method, url2, headers, params);
81455
81476
  let data = null;
81456
81477
  const response = yield fetch(uri, options);
@@ -81477,7 +81498,7 @@ var Client = class _Client {
81477
81498
  } else {
81478
81499
  responseText = data === null || data === void 0 ? void 0 : data.message;
81479
81500
  }
81480
- throw new AppwriteException(data === null || data === void 0 ? void 0 : data.message, response.status, data === null || data === void 0 ? void 0 : data.type, responseText);
81501
+ 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);
81481
81502
  }
81482
81503
  const cookieFallback = response.headers.get("X-Fallback-Cookies");
81483
81504
  if (typeof window !== "undefined" && window.localStorage && cookieFallback && this.shouldUseFallbackCredentials(url2)) {
@@ -81575,6 +81596,38 @@ var Console = class {
81575
81596
  };
81576
81597
  return this.client.call("get", uri, apiHeaders, payload);
81577
81598
  }
81599
+ listDatabases(paramsOrFirst, ...rest) {
81600
+ let params;
81601
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
81602
+ params = paramsOrFirst || {};
81603
+ } else {
81604
+ params = {
81605
+ queries: paramsOrFirst,
81606
+ search: rest[0],
81607
+ total: rest[1]
81608
+ };
81609
+ }
81610
+ const queries = params.queries;
81611
+ const search = params.search;
81612
+ const total = params.total;
81613
+ const apiPath = "/console/databases";
81614
+ const payload = {};
81615
+ if (typeof queries !== "undefined") {
81616
+ payload["queries"] = queries;
81617
+ }
81618
+ if (typeof search !== "undefined") {
81619
+ payload["search"] = search;
81620
+ }
81621
+ if (typeof total !== "undefined") {
81622
+ payload["total"] = total;
81623
+ }
81624
+ const uri = new URL(this.client.config.endpoint + apiPath);
81625
+ const apiHeaders = {
81626
+ "X-Appwrite-Project": this.client.config.project,
81627
+ "accept": "application/json"
81628
+ };
81629
+ return this.client.call("get", uri, apiHeaders, payload);
81630
+ }
81578
81631
  /**
81579
81632
  * 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.
81580
81633
  *
@@ -81635,6 +81688,23 @@ var Console = class {
81635
81688
  };
81636
81689
  return this.client.call("get", uri, apiHeaders, payload);
81637
81690
  }
81691
+ /**
81692
+ * Get the catalog of Postgres extensions that can be installed on a dedicated Postgres database.
81693
+ *
81694
+ *
81695
+ * @throws {AppwriteException}
81696
+ * @returns {Promise<Models.PostgresExtensionList>}
81697
+ */
81698
+ listPostgresExtensions() {
81699
+ const apiPath = "/console/postgres-extensions";
81700
+ const payload = {};
81701
+ const uri = new URL(this.client.config.endpoint + apiPath);
81702
+ const apiHeaders = {
81703
+ "X-Appwrite-Project": this.client.config.project,
81704
+ "accept": "application/json"
81705
+ };
81706
+ return this.client.call("get", uri, apiHeaders, payload);
81707
+ }
81638
81708
  getProgram(paramsOrFirst) {
81639
81709
  let params;
81640
81710
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -85099,43 +85169,6 @@ var Databases = class {
85099
85169
  };
85100
85170
  return this.client.call("delete", uri, apiHeaders, payload);
85101
85171
  }
85102
- listDocumentLogs(paramsOrFirst, ...rest) {
85103
- let params;
85104
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
85105
- params = paramsOrFirst || {};
85106
- } else {
85107
- params = {
85108
- databaseId: paramsOrFirst,
85109
- collectionId: rest[0],
85110
- documentId: rest[1],
85111
- queries: rest[2]
85112
- };
85113
- }
85114
- const databaseId = params.databaseId;
85115
- const collectionId = params.collectionId;
85116
- const documentId = params.documentId;
85117
- const queries = params.queries;
85118
- if (typeof databaseId === "undefined") {
85119
- throw new AppwriteException('Missing required parameter: "databaseId"');
85120
- }
85121
- if (typeof collectionId === "undefined") {
85122
- throw new AppwriteException('Missing required parameter: "collectionId"');
85123
- }
85124
- if (typeof documentId === "undefined") {
85125
- throw new AppwriteException('Missing required parameter: "documentId"');
85126
- }
85127
- const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{collectionId}", encodeURIComponent(String(collectionId))).replace("{documentId}", encodeURIComponent(String(documentId)));
85128
- const payload = {};
85129
- if (typeof queries !== "undefined") {
85130
- payload["queries"] = queries;
85131
- }
85132
- const uri = new URL(this.client.config.endpoint + apiPath);
85133
- const apiHeaders = {
85134
- "X-Appwrite-Project": this.client.config.project,
85135
- "accept": "application/json"
85136
- };
85137
- return this.client.call("get", uri, apiHeaders, payload);
85138
- }
85139
85172
  decrementDocumentAttribute(paramsOrFirst, ...rest) {
85140
85173
  let params;
85141
85174
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -85405,38 +85438,6 @@ var Databases = class {
85405
85438
  };
85406
85439
  return this.client.call("delete", uri, apiHeaders, payload);
85407
85440
  }
85408
- listCollectionLogs(paramsOrFirst, ...rest) {
85409
- let params;
85410
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
85411
- params = paramsOrFirst || {};
85412
- } else {
85413
- params = {
85414
- databaseId: paramsOrFirst,
85415
- collectionId: rest[0],
85416
- queries: rest[1]
85417
- };
85418
- }
85419
- const databaseId = params.databaseId;
85420
- const collectionId = params.collectionId;
85421
- const queries = params.queries;
85422
- if (typeof databaseId === "undefined") {
85423
- throw new AppwriteException('Missing required parameter: "databaseId"');
85424
- }
85425
- if (typeof collectionId === "undefined") {
85426
- throw new AppwriteException('Missing required parameter: "collectionId"');
85427
- }
85428
- const apiPath = "/databases/{databaseId}/collections/{collectionId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{collectionId}", encodeURIComponent(String(collectionId)));
85429
- const payload = {};
85430
- if (typeof queries !== "undefined") {
85431
- payload["queries"] = queries;
85432
- }
85433
- const uri = new URL(this.client.config.endpoint + apiPath);
85434
- const apiHeaders = {
85435
- "X-Appwrite-Project": this.client.config.project,
85436
- "accept": "application/json"
85437
- };
85438
- return this.client.call("get", uri, apiHeaders, payload);
85439
- }
85440
85441
  getCollectionUsage(paramsOrFirst, ...rest) {
85441
85442
  let params;
85442
85443
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -85469,33 +85470,6 @@ var Databases = class {
85469
85470
  };
85470
85471
  return this.client.call("get", uri, apiHeaders, payload);
85471
85472
  }
85472
- listLogs(paramsOrFirst, ...rest) {
85473
- let params;
85474
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
85475
- params = paramsOrFirst || {};
85476
- } else {
85477
- params = {
85478
- databaseId: paramsOrFirst,
85479
- queries: rest[0]
85480
- };
85481
- }
85482
- const databaseId = params.databaseId;
85483
- const queries = params.queries;
85484
- if (typeof databaseId === "undefined") {
85485
- throw new AppwriteException('Missing required parameter: "databaseId"');
85486
- }
85487
- const apiPath = "/databases/{databaseId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId)));
85488
- const payload = {};
85489
- if (typeof queries !== "undefined") {
85490
- payload["queries"] = queries;
85491
- }
85492
- const uri = new URL(this.client.config.endpoint + apiPath);
85493
- const apiHeaders = {
85494
- "X-Appwrite-Project": this.client.config.project,
85495
- "accept": "application/json"
85496
- };
85497
- return this.client.call("get", uri, apiHeaders, payload);
85498
- }
85499
85473
  getUsage(paramsOrFirst, ...rest) {
85500
85474
  let params;
85501
85475
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -87428,38 +87402,6 @@ var Messaging = class {
87428
87402
  };
87429
87403
  return this.client.call("delete", uri, apiHeaders, payload);
87430
87404
  }
87431
- listMessageLogs(paramsOrFirst, ...rest) {
87432
- let params;
87433
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
87434
- params = paramsOrFirst || {};
87435
- } else {
87436
- params = {
87437
- messageId: paramsOrFirst,
87438
- queries: rest[0],
87439
- total: rest[1]
87440
- };
87441
- }
87442
- const messageId = params.messageId;
87443
- const queries = params.queries;
87444
- const total = params.total;
87445
- if (typeof messageId === "undefined") {
87446
- throw new AppwriteException('Missing required parameter: "messageId"');
87447
- }
87448
- const apiPath = "/messaging/messages/{messageId}/logs".replace("{messageId}", encodeURIComponent(String(messageId)));
87449
- const payload = {};
87450
- if (typeof queries !== "undefined") {
87451
- payload["queries"] = queries;
87452
- }
87453
- if (typeof total !== "undefined") {
87454
- payload["total"] = total;
87455
- }
87456
- const uri = new URL(this.client.config.endpoint + apiPath);
87457
- const apiHeaders = {
87458
- "X-Appwrite-Project": this.client.config.project,
87459
- "accept": "application/json"
87460
- };
87461
- return this.client.call("get", uri, apiHeaders, payload);
87462
- }
87463
87405
  listTargets(paramsOrFirst, ...rest) {
87464
87406
  let params;
87465
87407
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -89384,70 +89326,6 @@ var Messaging = class {
89384
89326
  };
89385
89327
  return this.client.call("delete", uri, apiHeaders, payload);
89386
89328
  }
89387
- listProviderLogs(paramsOrFirst, ...rest) {
89388
- let params;
89389
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89390
- params = paramsOrFirst || {};
89391
- } else {
89392
- params = {
89393
- providerId: paramsOrFirst,
89394
- queries: rest[0],
89395
- total: rest[1]
89396
- };
89397
- }
89398
- const providerId = params.providerId;
89399
- const queries = params.queries;
89400
- const total = params.total;
89401
- if (typeof providerId === "undefined") {
89402
- throw new AppwriteException('Missing required parameter: "providerId"');
89403
- }
89404
- const apiPath = "/messaging/providers/{providerId}/logs".replace("{providerId}", encodeURIComponent(String(providerId)));
89405
- const payload = {};
89406
- if (typeof queries !== "undefined") {
89407
- payload["queries"] = queries;
89408
- }
89409
- if (typeof total !== "undefined") {
89410
- payload["total"] = total;
89411
- }
89412
- const uri = new URL(this.client.config.endpoint + apiPath);
89413
- const apiHeaders = {
89414
- "X-Appwrite-Project": this.client.config.project,
89415
- "accept": "application/json"
89416
- };
89417
- return this.client.call("get", uri, apiHeaders, payload);
89418
- }
89419
- listSubscriberLogs(paramsOrFirst, ...rest) {
89420
- let params;
89421
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89422
- params = paramsOrFirst || {};
89423
- } else {
89424
- params = {
89425
- subscriberId: paramsOrFirst,
89426
- queries: rest[0],
89427
- total: rest[1]
89428
- };
89429
- }
89430
- const subscriberId = params.subscriberId;
89431
- const queries = params.queries;
89432
- const total = params.total;
89433
- if (typeof subscriberId === "undefined") {
89434
- throw new AppwriteException('Missing required parameter: "subscriberId"');
89435
- }
89436
- const apiPath = "/messaging/subscribers/{subscriberId}/logs".replace("{subscriberId}", encodeURIComponent(String(subscriberId)));
89437
- const payload = {};
89438
- if (typeof queries !== "undefined") {
89439
- payload["queries"] = queries;
89440
- }
89441
- if (typeof total !== "undefined") {
89442
- payload["total"] = total;
89443
- }
89444
- const uri = new URL(this.client.config.endpoint + apiPath);
89445
- const apiHeaders = {
89446
- "X-Appwrite-Project": this.client.config.project,
89447
- "accept": "application/json"
89448
- };
89449
- return this.client.call("get", uri, apiHeaders, payload);
89450
- }
89451
89329
  listTopics(paramsOrFirst, ...rest) {
89452
89330
  let params;
89453
89331
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -89596,38 +89474,6 @@ var Messaging = class {
89596
89474
  };
89597
89475
  return this.client.call("delete", uri, apiHeaders, payload);
89598
89476
  }
89599
- listTopicLogs(paramsOrFirst, ...rest) {
89600
- let params;
89601
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89602
- params = paramsOrFirst || {};
89603
- } else {
89604
- params = {
89605
- topicId: paramsOrFirst,
89606
- queries: rest[0],
89607
- total: rest[1]
89608
- };
89609
- }
89610
- const topicId = params.topicId;
89611
- const queries = params.queries;
89612
- const total = params.total;
89613
- if (typeof topicId === "undefined") {
89614
- throw new AppwriteException('Missing required parameter: "topicId"');
89615
- }
89616
- const apiPath = "/messaging/topics/{topicId}/logs".replace("{topicId}", encodeURIComponent(String(topicId)));
89617
- const payload = {};
89618
- if (typeof queries !== "undefined") {
89619
- payload["queries"] = queries;
89620
- }
89621
- if (typeof total !== "undefined") {
89622
- payload["total"] = total;
89623
- }
89624
- const uri = new URL(this.client.config.endpoint + apiPath);
89625
- const apiHeaders = {
89626
- "X-Appwrite-Project": this.client.config.project,
89627
- "accept": "application/json"
89628
- };
89629
- return this.client.call("get", uri, apiHeaders, payload);
89630
- }
89631
89477
  listSubscribers(paramsOrFirst, ...rest) {
89632
89478
  let params;
89633
89479
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -89770,11 +89616,13 @@ var Oauth2 = class {
89770
89616
  } else {
89771
89617
  params = {
89772
89618
  grantId: paramsOrFirst,
89773
- authorizationDetails: rest[0]
89619
+ authorizationDetails: rest[0],
89620
+ scope: rest[1]
89774
89621
  };
89775
89622
  }
89776
89623
  const grantId = params.grantId;
89777
89624
  const authorizationDetails = params.authorizationDetails;
89625
+ const scope = params.scope;
89778
89626
  if (typeof grantId === "undefined") {
89779
89627
  throw new AppwriteException('Missing required parameter: "grantId"');
89780
89628
  }
@@ -89786,6 +89634,9 @@ var Oauth2 = class {
89786
89634
  if (typeof authorizationDetails !== "undefined") {
89787
89635
  payload["authorization_details"] = authorizationDetails;
89788
89636
  }
89637
+ if (typeof scope !== "undefined") {
89638
+ payload["scope"] = scope;
89639
+ }
89789
89640
  const uri = new URL(this.client.config.endpoint + apiPath);
89790
89641
  const apiHeaders = {
89791
89642
  "content-type": "application/json",
@@ -89795,7 +89646,7 @@ var Oauth2 = class {
89795
89646
  }
89796
89647
  authorize(paramsOrFirst, ...rest) {
89797
89648
  let params;
89798
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89649
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89799
89650
  params = paramsOrFirst || {};
89800
89651
  } else {
89801
89652
  params = {
@@ -89810,7 +89661,8 @@ var Oauth2 = class {
89810
89661
  prompt: rest[7],
89811
89662
  maxAge: rest[8],
89812
89663
  authorizationDetails: rest[9],
89813
- resource: rest[10]
89664
+ resource: rest[10],
89665
+ requestUri: rest[11]
89814
89666
  };
89815
89667
  }
89816
89668
  const clientId = params.clientId;
@@ -89825,18 +89677,7 @@ var Oauth2 = class {
89825
89677
  const maxAge = params.maxAge;
89826
89678
  const authorizationDetails = params.authorizationDetails;
89827
89679
  const resource = params.resource;
89828
- if (typeof clientId === "undefined") {
89829
- throw new AppwriteException('Missing required parameter: "clientId"');
89830
- }
89831
- if (typeof redirectUri === "undefined") {
89832
- throw new AppwriteException('Missing required parameter: "redirectUri"');
89833
- }
89834
- if (typeof responseType === "undefined") {
89835
- throw new AppwriteException('Missing required parameter: "responseType"');
89836
- }
89837
- if (typeof scope === "undefined") {
89838
- throw new AppwriteException('Missing required parameter: "scope"');
89839
- }
89680
+ const requestUri = params.requestUri;
89840
89681
  const apiPath = "/oauth2/{project_id}/authorize".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
89841
89682
  const payload = {};
89842
89683
  if (typeof clientId !== "undefined") {
@@ -89875,6 +89716,9 @@ var Oauth2 = class {
89875
89716
  if (typeof resource !== "undefined") {
89876
89717
  payload["resource"] = resource;
89877
89718
  }
89719
+ if (typeof requestUri !== "undefined") {
89720
+ payload["request_uri"] = requestUri;
89721
+ }
89878
89722
  const uri = new URL(this.client.config.endpoint + apiPath);
89879
89723
  const apiHeaders = {
89880
89724
  "accept": "application/json"
@@ -90010,6 +89854,157 @@ var Oauth2 = class {
90010
89854
  };
90011
89855
  return this.client.call("get", uri, apiHeaders, payload);
90012
89856
  }
89857
+ listOrganizations(paramsOrFirst, ...rest) {
89858
+ let params;
89859
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89860
+ params = paramsOrFirst || {};
89861
+ } else {
89862
+ params = {
89863
+ limit: paramsOrFirst,
89864
+ offset: rest[0],
89865
+ search: rest[1]
89866
+ };
89867
+ }
89868
+ const limit = params.limit;
89869
+ const offset = params.offset;
89870
+ const search = params.search;
89871
+ const apiPath = "/oauth2/{project_id}/organizations".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
89872
+ const payload = {};
89873
+ if (typeof limit !== "undefined") {
89874
+ payload["limit"] = limit;
89875
+ }
89876
+ if (typeof offset !== "undefined") {
89877
+ payload["offset"] = offset;
89878
+ }
89879
+ if (typeof search !== "undefined") {
89880
+ payload["search"] = search;
89881
+ }
89882
+ const uri = new URL(this.client.config.endpoint + apiPath);
89883
+ const apiHeaders = {
89884
+ "accept": "application/json"
89885
+ };
89886
+ return this.client.call("get", uri, apiHeaders, payload);
89887
+ }
89888
+ createPAR(paramsOrFirst, ...rest) {
89889
+ let params;
89890
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89891
+ params = paramsOrFirst || {};
89892
+ } else {
89893
+ params = {
89894
+ clientId: paramsOrFirst,
89895
+ redirectUri: rest[0],
89896
+ responseType: rest[1],
89897
+ scope: rest[2],
89898
+ state: rest[3],
89899
+ nonce: rest[4],
89900
+ codeChallenge: rest[5],
89901
+ codeChallengeMethod: rest[6],
89902
+ prompt: rest[7],
89903
+ maxAge: rest[8],
89904
+ authorizationDetails: rest[9],
89905
+ resource: rest[10]
89906
+ };
89907
+ }
89908
+ const clientId = params.clientId;
89909
+ const redirectUri = params.redirectUri;
89910
+ const responseType = params.responseType;
89911
+ const scope = params.scope;
89912
+ const state = params.state;
89913
+ const nonce = params.nonce;
89914
+ const codeChallenge = params.codeChallenge;
89915
+ const codeChallengeMethod = params.codeChallengeMethod;
89916
+ const prompt = params.prompt;
89917
+ const maxAge = params.maxAge;
89918
+ const authorizationDetails = params.authorizationDetails;
89919
+ const resource = params.resource;
89920
+ if (typeof clientId === "undefined") {
89921
+ throw new AppwriteException('Missing required parameter: "clientId"');
89922
+ }
89923
+ if (typeof redirectUri === "undefined") {
89924
+ throw new AppwriteException('Missing required parameter: "redirectUri"');
89925
+ }
89926
+ if (typeof responseType === "undefined") {
89927
+ throw new AppwriteException('Missing required parameter: "responseType"');
89928
+ }
89929
+ if (typeof scope === "undefined") {
89930
+ throw new AppwriteException('Missing required parameter: "scope"');
89931
+ }
89932
+ const apiPath = "/oauth2/{project_id}/par".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
89933
+ const payload = {};
89934
+ if (typeof clientId !== "undefined") {
89935
+ payload["client_id"] = clientId;
89936
+ }
89937
+ if (typeof redirectUri !== "undefined") {
89938
+ payload["redirect_uri"] = redirectUri;
89939
+ }
89940
+ if (typeof responseType !== "undefined") {
89941
+ payload["response_type"] = responseType;
89942
+ }
89943
+ if (typeof scope !== "undefined") {
89944
+ payload["scope"] = scope;
89945
+ }
89946
+ if (typeof state !== "undefined") {
89947
+ payload["state"] = state;
89948
+ }
89949
+ if (typeof nonce !== "undefined") {
89950
+ payload["nonce"] = nonce;
89951
+ }
89952
+ if (typeof codeChallenge !== "undefined") {
89953
+ payload["code_challenge"] = codeChallenge;
89954
+ }
89955
+ if (typeof codeChallengeMethod !== "undefined") {
89956
+ payload["code_challenge_method"] = codeChallengeMethod;
89957
+ }
89958
+ if (typeof prompt !== "undefined") {
89959
+ payload["prompt"] = prompt;
89960
+ }
89961
+ if (typeof maxAge !== "undefined") {
89962
+ payload["max_age"] = maxAge;
89963
+ }
89964
+ if (typeof authorizationDetails !== "undefined") {
89965
+ payload["authorization_details"] = authorizationDetails;
89966
+ }
89967
+ if (typeof resource !== "undefined") {
89968
+ payload["resource"] = resource;
89969
+ }
89970
+ const uri = new URL(this.client.config.endpoint + apiPath);
89971
+ const apiHeaders = {
89972
+ "content-type": "application/json",
89973
+ "accept": "application/json"
89974
+ };
89975
+ return this.client.call("post", uri, apiHeaders, payload);
89976
+ }
89977
+ listProjects(paramsOrFirst, ...rest) {
89978
+ let params;
89979
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
89980
+ params = paramsOrFirst || {};
89981
+ } else {
89982
+ params = {
89983
+ limit: paramsOrFirst,
89984
+ offset: rest[0],
89985
+ search: rest[1]
89986
+ };
89987
+ }
89988
+ const limit = params.limit;
89989
+ const offset = params.offset;
89990
+ const search = params.search;
89991
+ const apiPath = "/oauth2/{project_id}/projects".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
89992
+ const payload = {};
89993
+ if (typeof limit !== "undefined") {
89994
+ payload["limit"] = limit;
89995
+ }
89996
+ if (typeof offset !== "undefined") {
89997
+ payload["offset"] = offset;
89998
+ }
89999
+ if (typeof search !== "undefined") {
90000
+ payload["search"] = search;
90001
+ }
90002
+ const uri = new URL(this.client.config.endpoint + apiPath);
90003
+ const apiHeaders = {
90004
+ "accept": "application/json"
90005
+ };
90006
+ return this.client.call("get", uri, apiHeaders, payload);
90007
+ }
90013
90008
  reject(paramsOrFirst) {
90014
90009
  let params;
90015
90010
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -90145,6 +90140,64 @@ var Organization = class {
90145
90140
  constructor(client) {
90146
90141
  this.client = client;
90147
90142
  }
90143
+ /**
90144
+ * Get the current organization.
90145
+ *
90146
+ * @throws {AppwriteException}
90147
+ * @returns {Promise<Models.Organization<Preferences>>}
90148
+ */
90149
+ get() {
90150
+ const apiPath = "/organization";
90151
+ const payload = {};
90152
+ const uri = new URL(this.client.config.endpoint + apiPath);
90153
+ const apiHeaders = {
90154
+ "X-Appwrite-Project": this.client.config.project,
90155
+ "accept": "application/json"
90156
+ };
90157
+ return this.client.call("get", uri, apiHeaders, payload);
90158
+ }
90159
+ update(paramsOrFirst) {
90160
+ let params;
90161
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90162
+ params = paramsOrFirst || {};
90163
+ } else {
90164
+ params = {
90165
+ name: paramsOrFirst
90166
+ };
90167
+ }
90168
+ const name = params.name;
90169
+ if (typeof name === "undefined") {
90170
+ throw new AppwriteException('Missing required parameter: "name"');
90171
+ }
90172
+ const apiPath = "/organization";
90173
+ const payload = {};
90174
+ if (typeof name !== "undefined") {
90175
+ payload["name"] = name;
90176
+ }
90177
+ const uri = new URL(this.client.config.endpoint + apiPath);
90178
+ const apiHeaders = {
90179
+ "X-Appwrite-Project": this.client.config.project,
90180
+ "content-type": "application/json",
90181
+ "accept": "application/json"
90182
+ };
90183
+ return this.client.call("put", uri, apiHeaders, payload);
90184
+ }
90185
+ /**
90186
+ * Delete the current organization. All projects that belong to the organization are deleted as well.
90187
+ *
90188
+ * @throws {AppwriteException}
90189
+ * @returns {Promise<{}>}
90190
+ */
90191
+ delete() {
90192
+ const apiPath = "/organization";
90193
+ const payload = {};
90194
+ const uri = new URL(this.client.config.endpoint + apiPath);
90195
+ const apiHeaders = {
90196
+ "X-Appwrite-Project": this.client.config.project,
90197
+ "content-type": "application/json"
90198
+ };
90199
+ return this.client.call("delete", uri, apiHeaders, payload);
90200
+ }
90148
90201
  listKeys(paramsOrFirst, ...rest) {
90149
90202
  let params;
90150
90203
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -90307,6 +90360,164 @@ var Organization = class {
90307
90360
  };
90308
90361
  return this.client.call("delete", uri, apiHeaders, payload);
90309
90362
  }
90363
+ listMemberships(paramsOrFirst, ...rest) {
90364
+ let params;
90365
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90366
+ params = paramsOrFirst || {};
90367
+ } else {
90368
+ params = {
90369
+ queries: paramsOrFirst,
90370
+ search: rest[0],
90371
+ total: rest[1]
90372
+ };
90373
+ }
90374
+ const queries = params.queries;
90375
+ const search = params.search;
90376
+ const total = params.total;
90377
+ const apiPath = "/organization/memberships";
90378
+ const payload = {};
90379
+ if (typeof queries !== "undefined") {
90380
+ payload["queries"] = queries;
90381
+ }
90382
+ if (typeof search !== "undefined") {
90383
+ payload["search"] = search;
90384
+ }
90385
+ if (typeof total !== "undefined") {
90386
+ payload["total"] = total;
90387
+ }
90388
+ const uri = new URL(this.client.config.endpoint + apiPath);
90389
+ const apiHeaders = {
90390
+ "X-Appwrite-Project": this.client.config.project,
90391
+ "accept": "application/json"
90392
+ };
90393
+ return this.client.call("get", uri, apiHeaders, payload);
90394
+ }
90395
+ createMembership(paramsOrFirst, ...rest) {
90396
+ let params;
90397
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90398
+ params = paramsOrFirst || {};
90399
+ } else {
90400
+ params = {
90401
+ roles: paramsOrFirst,
90402
+ email: rest[0],
90403
+ userId: rest[1],
90404
+ phone: rest[2],
90405
+ url: rest[3],
90406
+ name: rest[4]
90407
+ };
90408
+ }
90409
+ const roles = params.roles;
90410
+ const email3 = params.email;
90411
+ const userId = params.userId;
90412
+ const phone = params.phone;
90413
+ const url2 = params.url;
90414
+ const name = params.name;
90415
+ if (typeof roles === "undefined") {
90416
+ throw new AppwriteException('Missing required parameter: "roles"');
90417
+ }
90418
+ const apiPath = "/organization/memberships";
90419
+ const payload = {};
90420
+ if (typeof email3 !== "undefined") {
90421
+ payload["email"] = email3;
90422
+ }
90423
+ if (typeof userId !== "undefined") {
90424
+ payload["userId"] = userId;
90425
+ }
90426
+ if (typeof phone !== "undefined") {
90427
+ payload["phone"] = phone;
90428
+ }
90429
+ if (typeof roles !== "undefined") {
90430
+ payload["roles"] = roles;
90431
+ }
90432
+ if (typeof url2 !== "undefined") {
90433
+ payload["url"] = url2;
90434
+ }
90435
+ if (typeof name !== "undefined") {
90436
+ payload["name"] = name;
90437
+ }
90438
+ const uri = new URL(this.client.config.endpoint + apiPath);
90439
+ const apiHeaders = {
90440
+ "X-Appwrite-Project": this.client.config.project,
90441
+ "content-type": "application/json",
90442
+ "accept": "application/json"
90443
+ };
90444
+ return this.client.call("post", uri, apiHeaders, payload);
90445
+ }
90446
+ getMembership(paramsOrFirst) {
90447
+ let params;
90448
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90449
+ params = paramsOrFirst || {};
90450
+ } else {
90451
+ params = {
90452
+ membershipId: paramsOrFirst
90453
+ };
90454
+ }
90455
+ const membershipId = params.membershipId;
90456
+ if (typeof membershipId === "undefined") {
90457
+ throw new AppwriteException('Missing required parameter: "membershipId"');
90458
+ }
90459
+ const apiPath = "/organization/memberships/{membershipId}".replace("{membershipId}", encodeURIComponent(String(membershipId)));
90460
+ const payload = {};
90461
+ const uri = new URL(this.client.config.endpoint + apiPath);
90462
+ const apiHeaders = {
90463
+ "X-Appwrite-Project": this.client.config.project,
90464
+ "accept": "application/json"
90465
+ };
90466
+ return this.client.call("get", uri, apiHeaders, payload);
90467
+ }
90468
+ updateMembership(paramsOrFirst, ...rest) {
90469
+ let params;
90470
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90471
+ params = paramsOrFirst || {};
90472
+ } else {
90473
+ params = {
90474
+ membershipId: paramsOrFirst,
90475
+ roles: rest[0]
90476
+ };
90477
+ }
90478
+ const membershipId = params.membershipId;
90479
+ const roles = params.roles;
90480
+ if (typeof membershipId === "undefined") {
90481
+ throw new AppwriteException('Missing required parameter: "membershipId"');
90482
+ }
90483
+ if (typeof roles === "undefined") {
90484
+ throw new AppwriteException('Missing required parameter: "roles"');
90485
+ }
90486
+ const apiPath = "/organization/memberships/{membershipId}".replace("{membershipId}", encodeURIComponent(String(membershipId)));
90487
+ const payload = {};
90488
+ if (typeof roles !== "undefined") {
90489
+ payload["roles"] = roles;
90490
+ }
90491
+ const uri = new URL(this.client.config.endpoint + apiPath);
90492
+ const apiHeaders = {
90493
+ "X-Appwrite-Project": this.client.config.project,
90494
+ "content-type": "application/json",
90495
+ "accept": "application/json"
90496
+ };
90497
+ return this.client.call("patch", uri, apiHeaders, payload);
90498
+ }
90499
+ deleteMembership(paramsOrFirst) {
90500
+ let params;
90501
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90502
+ params = paramsOrFirst || {};
90503
+ } else {
90504
+ params = {
90505
+ membershipId: paramsOrFirst
90506
+ };
90507
+ }
90508
+ const membershipId = params.membershipId;
90509
+ if (typeof membershipId === "undefined") {
90510
+ throw new AppwriteException('Missing required parameter: "membershipId"');
90511
+ }
90512
+ const apiPath = "/organization/memberships/{membershipId}".replace("{membershipId}", encodeURIComponent(String(membershipId)));
90513
+ const payload = {};
90514
+ const uri = new URL(this.client.config.endpoint + apiPath);
90515
+ const apiHeaders = {
90516
+ "X-Appwrite-Project": this.client.config.project,
90517
+ "content-type": "application/json"
90518
+ };
90519
+ return this.client.call("delete", uri, apiHeaders, payload);
90520
+ }
90310
90521
  listProjects(paramsOrFirst, ...rest) {
90311
90522
  let params;
90312
90523
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -90675,6 +90886,29 @@ var Organizations = class {
90675
90886
  };
90676
90887
  return this.client.call("post", uri, apiHeaders, payload);
90677
90888
  }
90889
+ createPremiumGeoDBAddon(paramsOrFirst) {
90890
+ let params;
90891
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
90892
+ params = paramsOrFirst || {};
90893
+ } else {
90894
+ params = {
90895
+ organizationId: paramsOrFirst
90896
+ };
90897
+ }
90898
+ const organizationId = params.organizationId;
90899
+ if (typeof organizationId === "undefined") {
90900
+ throw new AppwriteException('Missing required parameter: "organizationId"');
90901
+ }
90902
+ const apiPath = "/organizations/{organizationId}/addons/premium-geo-db".replace("{organizationId}", encodeURIComponent(String(organizationId)));
90903
+ const payload = {};
90904
+ const uri = new URL(this.client.config.endpoint + apiPath);
90905
+ const apiHeaders = {
90906
+ "X-Appwrite-Project": this.client.config.project,
90907
+ "content-type": "application/json",
90908
+ "accept": "application/json"
90909
+ };
90910
+ return this.client.call("post", uri, apiHeaders, payload);
90911
+ }
90678
90912
  getAddon(paramsOrFirst, ...rest) {
90679
90913
  let params;
90680
90914
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -93220,7 +93454,9 @@ var Project = class {
93220
93454
  authorizationURL: rest[2],
93221
93455
  tokenURL: rest[3],
93222
93456
  userInfoURL: rest[4],
93223
- enabled: rest[5]
93457
+ prompt: rest[5],
93458
+ maxAge: rest[6],
93459
+ enabled: rest[7]
93224
93460
  };
93225
93461
  }
93226
93462
  const clientId = params.clientId;
@@ -93229,6 +93465,8 @@ var Project = class {
93229
93465
  const authorizationURL = params.authorizationURL;
93230
93466
  const tokenURL = params.tokenURL;
93231
93467
  const userInfoURL = params.userInfoURL;
93468
+ const prompt = params.prompt;
93469
+ const maxAge = params.maxAge;
93232
93470
  const enabled = params.enabled;
93233
93471
  const apiPath = "/project/oauth2/oidc";
93234
93472
  const payload = {};
@@ -93250,6 +93488,12 @@ var Project = class {
93250
93488
  if (typeof userInfoURL !== "undefined") {
93251
93489
  payload["userInfoURL"] = userInfoURL;
93252
93490
  }
93491
+ if (typeof prompt !== "undefined") {
93492
+ payload["prompt"] = prompt;
93493
+ }
93494
+ if (typeof maxAge !== "undefined") {
93495
+ payload["maxAge"] = maxAge;
93496
+ }
93253
93497
  if (typeof enabled !== "undefined") {
93254
93498
  payload["enabled"] = enabled;
93255
93499
  }
@@ -97339,13 +97583,13 @@ var TablesDB = class {
97339
97583
  databaseId: paramsOrFirst,
97340
97584
  name: rest[0],
97341
97585
  enabled: rest[1],
97342
- dedicatedDatabaseId: rest[2]
97586
+ specification: rest[2]
97343
97587
  };
97344
97588
  }
97345
97589
  const databaseId = params.databaseId;
97346
97590
  const name = params.name;
97347
97591
  const enabled = params.enabled;
97348
- const dedicatedDatabaseId = params.dedicatedDatabaseId;
97592
+ const specification = params.specification;
97349
97593
  if (typeof databaseId === "undefined") {
97350
97594
  throw new AppwriteException('Missing required parameter: "databaseId"');
97351
97595
  }
@@ -97363,8 +97607,8 @@ var TablesDB = class {
97363
97607
  if (typeof enabled !== "undefined") {
97364
97608
  payload["enabled"] = enabled;
97365
97609
  }
97366
- if (typeof dedicatedDatabaseId !== "undefined") {
97367
- payload["dedicatedDatabaseId"] = dedicatedDatabaseId;
97610
+ if (typeof specification !== "undefined") {
97611
+ payload["specification"] = specification;
97368
97612
  }
97369
97613
  const uri = new URL(this.client.config.endpoint + apiPath);
97370
97614
  const apiHeaders = {
@@ -97623,6 +97867,114 @@ var TablesDB = class {
97623
97867
  };
97624
97868
  return this.client.call("delete", uri, apiHeaders, payload);
97625
97869
  }
97870
+ listMigrations(paramsOrFirst) {
97871
+ let params;
97872
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
97873
+ params = paramsOrFirst || {};
97874
+ } else {
97875
+ params = {
97876
+ databaseId: paramsOrFirst
97877
+ };
97878
+ }
97879
+ const databaseId = params.databaseId;
97880
+ if (typeof databaseId === "undefined") {
97881
+ throw new AppwriteException('Missing required parameter: "databaseId"');
97882
+ }
97883
+ const apiPath = "/tablesdb/{databaseId}/migrations".replace("{databaseId}", encodeURIComponent(String(databaseId)));
97884
+ const payload = {};
97885
+ const uri = new URL(this.client.config.endpoint + apiPath);
97886
+ const apiHeaders = {
97887
+ "X-Appwrite-Project": this.client.config.project,
97888
+ "accept": "application/json"
97889
+ };
97890
+ return this.client.call("get", uri, apiHeaders, payload);
97891
+ }
97892
+ createMigration(paramsOrFirst, ...rest) {
97893
+ let params;
97894
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
97895
+ params = paramsOrFirst || {};
97896
+ } else {
97897
+ params = {
97898
+ databaseId: paramsOrFirst,
97899
+ specification: rest[0]
97900
+ };
97901
+ }
97902
+ const databaseId = params.databaseId;
97903
+ const specification = params.specification;
97904
+ if (typeof databaseId === "undefined") {
97905
+ throw new AppwriteException('Missing required parameter: "databaseId"');
97906
+ }
97907
+ if (typeof specification === "undefined") {
97908
+ throw new AppwriteException('Missing required parameter: "specification"');
97909
+ }
97910
+ const apiPath = "/tablesdb/{databaseId}/migrations".replace("{databaseId}", encodeURIComponent(String(databaseId)));
97911
+ const payload = {};
97912
+ if (typeof specification !== "undefined") {
97913
+ payload["specification"] = specification;
97914
+ }
97915
+ const uri = new URL(this.client.config.endpoint + apiPath);
97916
+ const apiHeaders = {
97917
+ "X-Appwrite-Project": this.client.config.project,
97918
+ "content-type": "application/json",
97919
+ "accept": "application/json"
97920
+ };
97921
+ return this.client.call("post", uri, apiHeaders, payload);
97922
+ }
97923
+ getMigration(paramsOrFirst, ...rest) {
97924
+ let params;
97925
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
97926
+ params = paramsOrFirst || {};
97927
+ } else {
97928
+ params = {
97929
+ databaseId: paramsOrFirst,
97930
+ migrationId: rest[0]
97931
+ };
97932
+ }
97933
+ const databaseId = params.databaseId;
97934
+ const migrationId = params.migrationId;
97935
+ if (typeof databaseId === "undefined") {
97936
+ throw new AppwriteException('Missing required parameter: "databaseId"');
97937
+ }
97938
+ if (typeof migrationId === "undefined") {
97939
+ throw new AppwriteException('Missing required parameter: "migrationId"');
97940
+ }
97941
+ const apiPath = "/tablesdb/{databaseId}/migrations/{migrationId}".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{migrationId}", encodeURIComponent(String(migrationId)));
97942
+ const payload = {};
97943
+ const uri = new URL(this.client.config.endpoint + apiPath);
97944
+ const apiHeaders = {
97945
+ "X-Appwrite-Project": this.client.config.project,
97946
+ "accept": "application/json"
97947
+ };
97948
+ return this.client.call("get", uri, apiHeaders, payload);
97949
+ }
97950
+ deleteMigration(paramsOrFirst, ...rest) {
97951
+ let params;
97952
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
97953
+ params = paramsOrFirst || {};
97954
+ } else {
97955
+ params = {
97956
+ databaseId: paramsOrFirst,
97957
+ migrationId: rest[0]
97958
+ };
97959
+ }
97960
+ const databaseId = params.databaseId;
97961
+ const migrationId = params.migrationId;
97962
+ if (typeof databaseId === "undefined") {
97963
+ throw new AppwriteException('Missing required parameter: "databaseId"');
97964
+ }
97965
+ if (typeof migrationId === "undefined") {
97966
+ throw new AppwriteException('Missing required parameter: "migrationId"');
97967
+ }
97968
+ const apiPath = "/tablesdb/{databaseId}/migrations/{migrationId}".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{migrationId}", encodeURIComponent(String(migrationId)));
97969
+ const payload = {};
97970
+ const uri = new URL(this.client.config.endpoint + apiPath);
97971
+ const apiHeaders = {
97972
+ "X-Appwrite-Project": this.client.config.project,
97973
+ "content-type": "application/json",
97974
+ "accept": "application/json"
97975
+ };
97976
+ return this.client.call("delete", uri, apiHeaders, payload);
97977
+ }
97626
97978
  listTables(paramsOrFirst, ...rest) {
97627
97979
  let params;
97628
97980
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -100141,38 +100493,6 @@ var TablesDB = class {
100141
100493
  };
100142
100494
  return this.client.call("delete", uri, apiHeaders, payload);
100143
100495
  }
100144
- listTableLogs(paramsOrFirst, ...rest) {
100145
- let params;
100146
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
100147
- params = paramsOrFirst || {};
100148
- } else {
100149
- params = {
100150
- databaseId: paramsOrFirst,
100151
- tableId: rest[0],
100152
- queries: rest[1]
100153
- };
100154
- }
100155
- const databaseId = params.databaseId;
100156
- const tableId = params.tableId;
100157
- const queries = params.queries;
100158
- if (typeof databaseId === "undefined") {
100159
- throw new AppwriteException('Missing required parameter: "databaseId"');
100160
- }
100161
- if (typeof tableId === "undefined") {
100162
- throw new AppwriteException('Missing required parameter: "tableId"');
100163
- }
100164
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{tableId}", encodeURIComponent(String(tableId)));
100165
- const payload = {};
100166
- if (typeof queries !== "undefined") {
100167
- payload["queries"] = queries;
100168
- }
100169
- const uri = new URL(this.client.config.endpoint + apiPath);
100170
- const apiHeaders = {
100171
- "X-Appwrite-Project": this.client.config.project,
100172
- "accept": "application/json"
100173
- };
100174
- return this.client.call("get", uri, apiHeaders, payload);
100175
- }
100176
100496
  listRows(paramsOrFirst, ...rest) {
100177
100497
  let params;
100178
100498
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -100612,43 +100932,6 @@ var TablesDB = class {
100612
100932
  };
100613
100933
  return this.client.call("delete", uri, apiHeaders, payload);
100614
100934
  }
100615
- listRowLogs(paramsOrFirst, ...rest) {
100616
- let params;
100617
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
100618
- params = paramsOrFirst || {};
100619
- } else {
100620
- params = {
100621
- databaseId: paramsOrFirst,
100622
- tableId: rest[0],
100623
- rowId: rest[1],
100624
- queries: rest[2]
100625
- };
100626
- }
100627
- const databaseId = params.databaseId;
100628
- const tableId = params.tableId;
100629
- const rowId = params.rowId;
100630
- const queries = params.queries;
100631
- if (typeof databaseId === "undefined") {
100632
- throw new AppwriteException('Missing required parameter: "databaseId"');
100633
- }
100634
- if (typeof tableId === "undefined") {
100635
- throw new AppwriteException('Missing required parameter: "tableId"');
100636
- }
100637
- if (typeof rowId === "undefined") {
100638
- throw new AppwriteException('Missing required parameter: "rowId"');
100639
- }
100640
- const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{tableId}", encodeURIComponent(String(tableId))).replace("{rowId}", encodeURIComponent(String(rowId)));
100641
- const payload = {};
100642
- if (typeof queries !== "undefined") {
100643
- payload["queries"] = queries;
100644
- }
100645
- const uri = new URL(this.client.config.endpoint + apiPath);
100646
- const apiHeaders = {
100647
- "X-Appwrite-Project": this.client.config.project,
100648
- "accept": "application/json"
100649
- };
100650
- return this.client.call("get", uri, apiHeaders, payload);
100651
- }
100652
100935
  decrementRowColumn(paramsOrFirst, ...rest) {
100653
100936
  let params;
100654
100937
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -102482,6 +102765,7 @@ var QuerySuggestionResource;
102482
102765
  QuerySuggestionResource2["Keys"] = "keys";
102483
102766
  QuerySuggestionResource2["DevKeys"] = "devkeys";
102484
102767
  QuerySuggestionResource2["Webhooks"] = "webhooks";
102768
+ QuerySuggestionResource2["Notifications"] = "notifications";
102485
102769
  QuerySuggestionResource2["Certificates"] = "certificates";
102486
102770
  QuerySuggestionResource2["Realtime"] = "realtime";
102487
102771
  QuerySuggestionResource2["Rules"] = "rules";
@@ -102525,6 +102809,8 @@ var QuerySuggestionResource;
102525
102809
  QuerySuggestionResource2["Feedbacks"] = "feedbacks";
102526
102810
  QuerySuggestionResource2["Disputes"] = "disputes";
102527
102811
  QuerySuggestionResource2["ShInstallations"] = "sh_installations";
102812
+ QuerySuggestionResource2["MigrationDatabases"] = "migrationdatabases";
102813
+ QuerySuggestionResource2["MigrationProjects"] = "migrationprojects";
102528
102814
  QuerySuggestionResource2["Apps"] = "apps";
102529
102815
  QuerySuggestionResource2["AppSecrets"] = "appsecrets";
102530
102816
  QuerySuggestionResource2["Oauth2Grants"] = "oauth2grants";
@@ -102848,8 +103134,12 @@ var ProjectKeyScopes;
102848
103134
  ProjectKeyScopes2["PoliciesWrite"] = "policies.write";
102849
103135
  ProjectKeyScopes2["ProjectPoliciesRead"] = "project.policies.read";
102850
103136
  ProjectKeyScopes2["ProjectPoliciesWrite"] = "project.policies.write";
103137
+ ProjectKeyScopes2["ProjectOauth2Read"] = "project.oauth2.read";
103138
+ ProjectKeyScopes2["ProjectOauth2Write"] = "project.oauth2.write";
102851
103139
  ProjectKeyScopes2["TemplatesRead"] = "templates.read";
102852
103140
  ProjectKeyScopes2["TemplatesWrite"] = "templates.write";
103141
+ ProjectKeyScopes2["StagesRead"] = "stages.read";
103142
+ ProjectKeyScopes2["StagesWrite"] = "stages.write";
102853
103143
  ProjectKeyScopes2["Oauth2Read"] = "oauth2.read";
102854
103144
  ProjectKeyScopes2["Oauth2Write"] = "oauth2.write";
102855
103145
  ProjectKeyScopes2["UsersRead"] = "users.read";
@@ -102986,6 +103276,7 @@ var HealthQueueName;
102986
103276
  HealthQueueName2["V1screenshots"] = "v1-screenshots";
102987
103277
  HealthQueueName2["V1messaging"] = "v1-messaging";
102988
103278
  HealthQueueName2["V1migrations"] = "v1-migrations";
103279
+ HealthQueueName2["V1notifications"] = "v1-notifications";
102989
103280
  })(HealthQueueName || (HealthQueueName = {}));
102990
103281
  var BlockResourceType;
102991
103282
  (function(BlockResourceType2) {
@@ -102999,6 +103290,11 @@ var BlockResourceType;
102999
103290
  BlockResourceType2["Subscribers"] = "subscribers";
103000
103291
  BlockResourceType2["Messages"] = "messages";
103001
103292
  })(BlockResourceType || (BlockResourceType = {}));
103293
+ var BlockMode;
103294
+ (function(BlockMode2) {
103295
+ BlockMode2["Full"] = "full";
103296
+ BlockMode2["Readonly"] = "readonly";
103297
+ })(BlockMode || (BlockMode = {}));
103002
103298
  var Region;
103003
103299
  (function(Region2) {
103004
103300
  Region2["Fra"] = "fra";
@@ -103131,6 +103427,10 @@ var OrganizationKeyScopes;
103131
103427
  OrganizationKeyScopes2["DevKeysWrite"] = "devKeys.write";
103132
103428
  OrganizationKeyScopes2["OrganizationKeysRead"] = "organization.keys.read";
103133
103429
  OrganizationKeyScopes2["OrganizationKeysWrite"] = "organization.keys.write";
103430
+ OrganizationKeyScopes2["OrganizationMembershipsRead"] = "organization.memberships.read";
103431
+ OrganizationKeyScopes2["OrganizationMembershipsWrite"] = "organization.memberships.write";
103432
+ OrganizationKeyScopes2["OrganizationRead"] = "organization.read";
103433
+ OrganizationKeyScopes2["OrganizationWrite"] = "organization.write";
103134
103434
  OrganizationKeyScopes2["DomainsRead"] = "domains.read";
103135
103435
  OrganizationKeyScopes2["DomainsWrite"] = "domains.write";
103136
103436
  OrganizationKeyScopes2["KeysRead"] = "keys.read";
@@ -103139,6 +103439,8 @@ var OrganizationKeyScopes;
103139
103439
  var Addon;
103140
103440
  (function(Addon2) {
103141
103441
  Addon2["Baa"] = "baa";
103442
+ Addon2["Premiumgeodb"] = "premiumgeodb";
103443
+ Addon2["Premiumgeodborg"] = "premiumgeodborg";
103142
103444
  Addon2["BackupRecovery"] = "backup_recovery";
103143
103445
  })(Addon || (Addon = {}));
103144
103446
  var ProjectAuthMethodId;
@@ -103157,6 +103459,13 @@ var ProjectOAuth2GooglePrompt;
103157
103459
  ProjectOAuth2GooglePrompt2["Consent"] = "consent";
103158
103460
  ProjectOAuth2GooglePrompt2["SelectAccount"] = "select_account";
103159
103461
  })(ProjectOAuth2GooglePrompt || (ProjectOAuth2GooglePrompt = {}));
103462
+ var ProjectOAuth2OidcPrompt;
103463
+ (function(ProjectOAuth2OidcPrompt2) {
103464
+ ProjectOAuth2OidcPrompt2["None"] = "none";
103465
+ ProjectOAuth2OidcPrompt2["Login"] = "login";
103466
+ ProjectOAuth2OidcPrompt2["Consent"] = "consent";
103467
+ ProjectOAuth2OidcPrompt2["SelectAccount"] = "select_account";
103468
+ })(ProjectOAuth2OidcPrompt || (ProjectOAuth2OidcPrompt = {}));
103160
103469
  var ProjectOAuthProviderId;
103161
103470
  (function(ProjectOAuthProviderId2) {
103162
103471
  ProjectOAuthProviderId2["Amazon"] = "amazon";
@@ -103483,6 +103792,12 @@ var DatabaseType;
103483
103792
  DatabaseType2["Documentsdb"] = "documentsdb";
103484
103793
  DatabaseType2["Vectorsdb"] = "vectorsdb";
103485
103794
  })(DatabaseType || (DatabaseType = {}));
103795
+ var DatabaseStatus;
103796
+ (function(DatabaseStatus2) {
103797
+ DatabaseStatus2["Provisioning"] = "provisioning";
103798
+ DatabaseStatus2["Ready"] = "ready";
103799
+ DatabaseStatus2["Failed"] = "failed";
103800
+ })(DatabaseStatus || (DatabaseStatus = {}));
103486
103801
  var AttributeStatus;
103487
103802
  (function(AttributeStatus2) {
103488
103803
  AttributeStatus2["Available"] = "available";
@@ -103544,6 +103859,13 @@ var OAuth2GooglePrompt;
103544
103859
  OAuth2GooglePrompt2["Consent"] = "consent";
103545
103860
  OAuth2GooglePrompt2["SelectAccount"] = "select_account";
103546
103861
  })(OAuth2GooglePrompt || (OAuth2GooglePrompt = {}));
103862
+ var OAuth2OidcPrompt;
103863
+ (function(OAuth2OidcPrompt2) {
103864
+ OAuth2OidcPrompt2["None"] = "none";
103865
+ OAuth2OidcPrompt2["Login"] = "login";
103866
+ OAuth2OidcPrompt2["Consent"] = "consent";
103867
+ OAuth2OidcPrompt2["SelectAccount"] = "select_account";
103868
+ })(OAuth2OidcPrompt || (OAuth2OidcPrompt = {}));
103547
103869
  var PlatformType;
103548
103870
  (function(PlatformType2) {
103549
103871
  PlatformType2["Windows"] = "windows";
@@ -103698,6 +104020,20 @@ var getSafeDirectoryName = (value, fallback) => {
103698
104020
  var siteRequiresBuildCommand = (site) => {
103699
104021
  return !(site.framework === "other" && site.adapter === "static");
103700
104022
  };
104023
+ var getErrorMessage = (error52) => {
104024
+ if (error52 instanceof Error) {
104025
+ const message = typeof error52.message === "string" ? error52.message.trim() : "";
104026
+ if (message) {
104027
+ return message;
104028
+ }
104029
+ const response = error52.response;
104030
+ if (typeof response === "string" && response.trim() !== "") {
104031
+ return response.trim();
104032
+ }
104033
+ return "An unknown error occurred.";
104034
+ }
104035
+ return String(error52);
104036
+ };
103701
104037
  var WINDOWS_EXECUTABLE_NAME = `${EXECUTABLE_NAME.toLowerCase()}.exe`;
103702
104038
  var CLOUD_REGION_CODES = /* @__PURE__ */ new Set(["fra", "nyc", "syd", "sfo", "sgp", "tor"]);
103703
104039
  var CLOUD_LOGIN_ENVIRONMENTS = /* @__PURE__ */ new Set(["stage"]);
@@ -104925,7 +105261,7 @@ var package_default = {
104925
105261
  type: "module",
104926
105262
  homepage: "https://appwrite.io/support",
104927
105263
  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",
104928
- version: "22.3.0",
105264
+ version: "22.5.0",
104929
105265
  license: "BSD-3-Clause",
104930
105266
  main: "dist/index.cjs",
104931
105267
  module: "dist/index.js",
@@ -104973,7 +105309,7 @@ var package_default = {
104973
105309
  "windows-arm64": "bun build cli.ts --compile --minify --target=bun-windows-arm64 --outfile build/appwrite-cli-win-arm64.exe"
104974
105310
  },
104975
105311
  dependencies: {
104976
- "@appwrite.io/console": "^15.1.1",
105312
+ "@appwrite.io/console": "15.3.0-rc.1",
104977
105313
  "@napi-rs/keyring": "^1.3.0",
104978
105314
  chalk: "4.1.2",
104979
105315
  chokidar: "^3.6.0",
@@ -105001,21 +105337,21 @@ var package_default = {
105001
105337
  esbuild: "^0.28.1"
105002
105338
  },
105003
105339
  devDependencies: {
105004
- "@typescript-eslint/eslint-plugin": "^8.0.0",
105005
- "@typescript-eslint/parser": "^8.0.0",
105006
105340
  "@types/bun": "^1.3.5",
105007
- eslint: "^9.0.0",
105008
- "eslint-plugin-unused-imports": "^4.0.0",
105009
- "typescript-eslint": "^8.0.0",
105010
105341
  "@types/cli-progress": "^3.11.5",
105011
105342
  "@types/inquirer": "^8.2.10",
105012
105343
  "@types/json-bigint": "^1.0.4",
105013
105344
  "@types/node": "^18.19.0",
105014
105345
  "@types/tar": "^6.1.13",
105346
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
105347
+ "@typescript-eslint/parser": "^8.0.0",
105015
105348
  esbuild: "^0.28.1",
105349
+ eslint: "^9.0.0",
105350
+ "eslint-plugin-unused-imports": "^4.0.0",
105016
105351
  prettier: "^3.7.4",
105017
105352
  tsx: "^4.21.0",
105018
- typescript: "^5.3.3"
105353
+ typescript: "^5.3.3",
105354
+ "typescript-eslint": "^8.0.0"
105019
105355
  }
105020
105356
  };
105021
105357
 
@@ -105925,26 +106261,51 @@ var printQueryErrorHint = (err) => {
105925
106261
  );
105926
106262
  };
105927
106263
  var ERROR_DETAIL_KEYS = ["code", "type", "response"];
106264
+ var ERROR_DETAIL_INDENT = " ";
106265
+ var ERROR_DETAIL_LABEL_WIDTH = Math.max(...ERROR_DETAIL_KEYS.map((key) => key.length)) + 2;
106266
+ var formatErrorDetail = (value) => {
106267
+ if (typeof value === "string") {
106268
+ const text = value;
106269
+ try {
106270
+ const parsed = JSON.parse(text);
106271
+ if (parsed && typeof parsed === "object") {
106272
+ value = parsed;
106273
+ }
106274
+ } catch {
106275
+ return text;
106276
+ }
106277
+ }
106278
+ try {
106279
+ const json2 = JSON.stringify(value, null, 2) ?? String(value);
106280
+ return json2.split("\n").map((line, index) => index === 0 ? line : ERROR_DETAIL_INDENT + line).join("\n");
106281
+ } catch {
106282
+ return String(value);
106283
+ }
106284
+ };
105928
106285
  var formatErrorForLog = (err) => {
105929
- const stack = err.stack || `${err.name}: ${err.message}`;
105930
- const detailLines = ERROR_DETAIL_KEYS.flatMap((key) => {
106286
+ const lines = [
106287
+ `${import_chalk2.default.red.bold(err.name || "Error")}${import_chalk2.default.red(`: ${getErrorMessage(err)}`)}`
106288
+ ];
106289
+ for (const key of ERROR_DETAIL_KEYS) {
105931
106290
  if (!Object.prototype.hasOwnProperty.call(err, key)) {
105932
- return [];
106291
+ continue;
105933
106292
  }
105934
106293
  const value = err[key];
105935
- let detail = "undefined";
105936
- try {
105937
- detail = typeof value === "string" ? JSON.stringify(value) : JSON.stringify(value) ?? String(value);
105938
- } catch {
105939
- detail = String(value);
105940
- }
105941
- return [`${key}: ${detail}`];
105942
- });
105943
- if (detailLines.length === 0) {
105944
- return stack;
106294
+ lines.push(
106295
+ `${ERROR_DETAIL_INDENT}${import_chalk2.default.cyan(`${key}:`.padEnd(ERROR_DETAIL_LABEL_WIDTH))}${formatErrorDetail(value)}`
106296
+ );
106297
+ }
106298
+ const frames = (err.stack ?? "").split("\n").filter((line) => line.trim().startsWith("at "));
106299
+ if (frames.length > 0) {
106300
+ lines.push(
106301
+ "",
106302
+ import_chalk2.default.dim(`${ERROR_DETAIL_INDENT}Stack trace:`),
106303
+ ...frames.map(
106304
+ (frame) => import_chalk2.default.dim(`${ERROR_DETAIL_INDENT.repeat(2)}${frame.trim()}`)
106305
+ )
106306
+ );
105945
106307
  }
105946
- const [summary, ...frames] = stack.split("\n");
105947
- return [summary, ...detailLines, ...frames].join("\n");
106308
+ return lines.join("\n");
105948
106309
  };
105949
106310
  var parseError = (err) => {
105950
106311
  if (cliConfig.report) {
@@ -105975,7 +106336,7 @@ Is Cloud: ${isCloud()}`;
105975
106336
  githubIssueUrl.searchParams.append("template", "bug.yaml");
105976
106337
  githubIssueUrl.searchParams.append(
105977
106338
  "title",
105978
- `\u{1F41B} Bug Report: ${err.message}`
106339
+ `\u{1F41B} Bug Report: ${getErrorMessage(err)}`
105979
106340
  );
105980
106341
  githubIssueUrl.searchParams.append(
105981
106342
  "actual-behavior",
@@ -106005,7 +106366,7 @@ ${stack}`
106005
106366
  printQueryErrorHint(err);
106006
106367
  } else {
106007
106368
  log("For detailed error pass the --verbose or --report flag");
106008
- error51(err.message);
106369
+ error51(getErrorMessage(err));
106009
106370
  printQueryErrorHint(err);
106010
106371
  }
106011
106372
  process.exit(1);
@@ -106051,7 +106412,7 @@ var commandDescriptions = {
106051
106412
  avatars: `The avatars command aims to help you complete everyday tasks related to your app image, icons, and avatars.`,
106052
106413
  databases: `(Legacy) The databases command allows you to create structured collections of documents and query and filter lists of documents.`,
106053
106414
  "tables-db": `The tables-db command allows you to create structured tables of columns and query and filter lists of rows.`,
106054
- 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}.`,
106415
+ init: `The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, messaging-topics, and skills in ${SDK_TITLE}.`,
106055
106416
  push: `The push command provides a convenient wrapper for pushing your functions, collections, buckets, teams, and messaging-topics.`,
106056
106417
  run: `The run command allows you to run the project locally to allow easy development and quick debugging.`,
106057
106418
  functions: `The functions command allows you to view, create, and manage your Cloud Functions.`,
@@ -106100,7 +106461,9 @@ var configFilters = [
106100
106461
  new URL(
106101
106462
  `${consoleClient.config.endpoint}/projects/${encodeURIComponent(config2.projectId)}`
106102
106463
  ),
106103
- {},
106464
+ {
106465
+ "X-Appwrite-Project": "console"
106466
+ },
106104
106467
  {}
106105
106468
  );
106106
106469
  organizationId = project.teamId;
@@ -110134,7 +110497,7 @@ async function downloadDeploymentCode(params) {
110134
110497
  }
110135
110498
  } catch (e) {
110136
110499
  if (e instanceof AppwriteException) {
110137
- error51(e.message);
110500
+ error51(getErrorMessage(e));
110138
110501
  return;
110139
110502
  } else {
110140
110503
  throw e;
@@ -112057,12 +112420,12 @@ async function getTerminalImage() {
112057
112420
  );
112058
112421
  return terminalImageModulePromise;
112059
112422
  }
112060
- function getErrorMessage(error52) {
112423
+ function getErrorMessage2(error52) {
112061
112424
  if (error52 instanceof Error && error52.message.trim().length > 0) {
112062
112425
  return error52.message.trim();
112063
112426
  }
112064
112427
  if (Array.isArray(error52)) {
112065
- const messages = error52.map((entry) => getErrorMessage(entry)).filter((entry) => entry !== "Unknown error");
112428
+ const messages = error52.map((entry) => getErrorMessage2(entry)).filter((entry) => entry !== "Unknown error");
112066
112429
  if (messages.length > 0) {
112067
112430
  return messages.join("; ");
112068
112431
  }
@@ -112220,7 +112583,7 @@ async function renderSiteTerminalPreview(params) {
112220
112583
  };
112221
112584
  } catch (previewError) {
112222
112585
  warnings.add(
112223
- `${label === "dark" ? "Dark mode" : "Light mode"} screenshot: ${getErrorMessage(previewError)}`
112586
+ `${label === "dark" ? "Dark mode" : "Light mode"} screenshot: ${getErrorMessage2(previewError)}`
112224
112587
  );
112225
112588
  }
112226
112589
  }
@@ -113946,7 +114309,7 @@ var Push = class {
113946
114309
  storageService: await getStorageService(consoleClient)
113947
114310
  };
113948
114311
  } catch (previewSetupError) {
113949
- sitePreviewSetupWarning = getErrorMessage(previewSetupError);
114312
+ sitePreviewSetupWarning = getErrorMessage2(previewSetupError);
113950
114313
  }
113951
114314
  }
113952
114315
  process.stdout.write("\n");