@appwrite.io/console 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
33
33
  To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
34
34
 
35
35
  ```html
36
- <script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.5.1"></script>
36
+ <script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.5.2"></script>
37
37
  ```
38
38
 
39
39
 
@@ -108,4 +108,4 @@ This library is auto-generated by Appwrite custom [SDK Generator](https://github
108
108
 
109
109
  ## License
110
110
 
111
- Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
111
+ Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
package/dist/cjs/sdk.js CHANGED
@@ -280,7 +280,7 @@ class Client {
280
280
  'x-sdk-name': 'Console',
281
281
  'x-sdk-platform': 'console',
282
282
  'x-sdk-language': 'web',
283
- 'x-sdk-version': '1.5.1',
283
+ 'x-sdk-version': '1.5.2',
284
284
  'X-Appwrite-Response-Format': '1.6.0',
285
285
  };
286
286
  this.realtime = {
@@ -4263,14 +4263,14 @@ class Databases {
4263
4263
  * @param {string} collectionId
4264
4264
  * @param {string} key
4265
4265
  * @param {boolean} required
4266
+ * @param {number} xdefault
4266
4267
  * @param {number} min
4267
4268
  * @param {number} max
4268
- * @param {number} xdefault
4269
4269
  * @param {string} newKey
4270
4270
  * @throws {AppwriteException}
4271
4271
  * @returns {Promise<Models.AttributeFloat>}
4272
4272
  */
4273
- updateFloatAttribute(databaseId, collectionId, key, required, min, max, xdefault, newKey) {
4273
+ updateFloatAttribute(databaseId, collectionId, key, required, xdefault, min, max, newKey) {
4274
4274
  return __awaiter(this, void 0, void 0, function* () {
4275
4275
  if (typeof databaseId === 'undefined') {
4276
4276
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -4284,12 +4284,6 @@ class Databases {
4284
4284
  if (typeof required === 'undefined') {
4285
4285
  throw new AppwriteException('Missing required parameter: "required"');
4286
4286
  }
4287
- if (typeof min === 'undefined') {
4288
- throw new AppwriteException('Missing required parameter: "min"');
4289
- }
4290
- if (typeof max === 'undefined') {
4291
- throw new AppwriteException('Missing required parameter: "max"');
4292
- }
4293
4287
  if (typeof xdefault === 'undefined') {
4294
4288
  throw new AppwriteException('Missing required parameter: "xdefault"');
4295
4289
  }
@@ -4387,14 +4381,14 @@ class Databases {
4387
4381
  * @param {string} collectionId
4388
4382
  * @param {string} key
4389
4383
  * @param {boolean} required
4384
+ * @param {number} xdefault
4390
4385
  * @param {number} min
4391
4386
  * @param {number} max
4392
- * @param {number} xdefault
4393
4387
  * @param {string} newKey
4394
4388
  * @throws {AppwriteException}
4395
4389
  * @returns {Promise<Models.AttributeInteger>}
4396
4390
  */
4397
- updateIntegerAttribute(databaseId, collectionId, key, required, min, max, xdefault, newKey) {
4391
+ updateIntegerAttribute(databaseId, collectionId, key, required, xdefault, min, max, newKey) {
4398
4392
  return __awaiter(this, void 0, void 0, function* () {
4399
4393
  if (typeof databaseId === 'undefined') {
4400
4394
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -4408,12 +4402,6 @@ class Databases {
4408
4402
  if (typeof required === 'undefined') {
4409
4403
  throw new AppwriteException('Missing required parameter: "required"');
4410
4404
  }
4411
- if (typeof min === 'undefined') {
4412
- throw new AppwriteException('Missing required parameter: "min"');
4413
- }
4414
- if (typeof max === 'undefined') {
4415
- throw new AppwriteException('Missing required parameter: "max"');
4416
- }
4417
4405
  if (typeof xdefault === 'undefined') {
4418
4406
  throw new AppwriteException('Missing required parameter: "xdefault"');
4419
4407
  }
@@ -4963,6 +4951,7 @@ class Databases {
4963
4951
  * Create document
4964
4952
  *
4965
4953
  * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
4954
+
4966
4955
  *
4967
4956
  * @param {string} databaseId
4968
4957
  * @param {string} collectionId
@@ -6604,26 +6593,6 @@ class Health {
6604
6593
  return yield this.client.call('get', uri, apiHeaders, payload);
6605
6594
  });
6606
6595
  }
6607
- /**
6608
- * Get queue
6609
- *
6610
- * Check the Appwrite queue messaging servers are up and connection is successful.
6611
- *
6612
- * @throws {AppwriteException}
6613
- * @returns {Promise<Models.HealthStatus>}
6614
- */
6615
- getQueue() {
6616
- return __awaiter(this, void 0, void 0, function* () {
6617
- const apiPath = '/health/queue';
6618
- const payload = {};
6619
- const uri = new URL(this.client.config.endpoint + apiPath);
6620
- const apiHeaders = {
6621
- 'content-type': 'application/json',
6622
- };
6623
- payload['project'] = this.client.config.project;
6624
- return yield this.client.call('get', uri, apiHeaders, payload);
6625
- });
6626
- }
6627
6596
  /**
6628
6597
  * Get billing aggregation queue
6629
6598
  *
@@ -6922,17 +6891,17 @@ class Health {
6922
6891
  });
6923
6892
  }
6924
6893
  /**
6925
- * Get usage queue
6894
+ * Get stats resources queue
6926
6895
  *
6927
- * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.
6896
+ * Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.
6928
6897
  *
6929
6898
  * @param {number} threshold
6930
6899
  * @throws {AppwriteException}
6931
6900
  * @returns {Promise<Models.HealthQueue>}
6932
6901
  */
6933
- getQueueUsage(threshold) {
6902
+ getQueueStatsResources(threshold) {
6934
6903
  return __awaiter(this, void 0, void 0, function* () {
6935
- const apiPath = '/health/queue/usage';
6904
+ const apiPath = '/health/queue/stats-resources';
6936
6905
  const payload = {};
6937
6906
  if (typeof threshold !== 'undefined') {
6938
6907
  payload['threshold'] = threshold;
@@ -6946,17 +6915,17 @@ class Health {
6946
6915
  });
6947
6916
  }
6948
6917
  /**
6949
- * Get usage count aggregation queue
6918
+ * Get stats usage queue
6950
6919
  *
6951
- * Get the usage count aggregation queue.
6920
+ * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.
6952
6921
  *
6953
6922
  * @param {number} threshold
6954
6923
  * @throws {AppwriteException}
6955
6924
  * @returns {Promise<Models.HealthQueue>}
6956
6925
  */
6957
- getQueueUsageCount(threshold) {
6926
+ getQueueUsage(threshold) {
6958
6927
  return __awaiter(this, void 0, void 0, function* () {
6959
- const apiPath = '/health/queue/usage-count';
6928
+ const apiPath = '/health/queue/stats-usage';
6960
6929
  const payload = {};
6961
6930
  if (typeof threshold !== 'undefined') {
6962
6931
  payload['threshold'] = threshold;
@@ -6978,9 +6947,9 @@ class Health {
6978
6947
  * @throws {AppwriteException}
6979
6948
  * @returns {Promise<Models.HealthQueue>}
6980
6949
  */
6981
- getQueueUsageDump(threshold) {
6950
+ getQueueStatsUsageDump(threshold) {
6982
6951
  return __awaiter(this, void 0, void 0, function* () {
6983
- const apiPath = '/health/queue/usage-dump';
6952
+ const apiPath = '/health/queue/stats-usage-dump';
6984
6953
  const payload = {};
6985
6954
  if (typeof threshold !== 'undefined') {
6986
6955
  payload['threshold'] = threshold;
@@ -9913,10 +9882,14 @@ class Organizations {
9913
9882
  * @param {BillingPlan} billingPlan
9914
9883
  * @param {string} paymentMethodId
9915
9884
  * @param {string} billingAddressId
9885
+ * @param {string[]} invites
9886
+ * @param {string} couponId
9887
+ * @param {string} taxId
9888
+ * @param {number} budget
9916
9889
  * @throws {AppwriteException}
9917
9890
  * @returns {Promise<Models.Organization<Preferences>>}
9918
9891
  */
9919
- create(organizationId, name, billingPlan, paymentMethodId, billingAddressId) {
9892
+ create(organizationId, name, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget) {
9920
9893
  return __awaiter(this, void 0, void 0, function* () {
9921
9894
  if (typeof organizationId === 'undefined') {
9922
9895
  throw new AppwriteException('Missing required parameter: "organizationId"');
@@ -9944,6 +9917,18 @@ class Organizations {
9944
9917
  if (typeof billingAddressId !== 'undefined') {
9945
9918
  payload['billingAddressId'] = billingAddressId;
9946
9919
  }
9920
+ if (typeof invites !== 'undefined') {
9921
+ payload['invites'] = invites;
9922
+ }
9923
+ if (typeof couponId !== 'undefined') {
9924
+ payload['couponId'] = couponId;
9925
+ }
9926
+ if (typeof taxId !== 'undefined') {
9927
+ payload['taxId'] = taxId;
9928
+ }
9929
+ if (typeof budget !== 'undefined') {
9930
+ payload['budget'] = budget;
9931
+ }
9947
9932
  const uri = new URL(this.client.config.endpoint + apiPath);
9948
9933
  const apiHeaders = {
9949
9934
  'content-type': 'application/json',
@@ -10588,10 +10573,14 @@ class Organizations {
10588
10573
  * @param {BillingPlan} billingPlan
10589
10574
  * @param {string} paymentMethodId
10590
10575
  * @param {string} billingAddressId
10576
+ * @param {string[]} invites
10577
+ * @param {string} couponId
10578
+ * @param {string} taxId
10579
+ * @param {number} budget
10591
10580
  * @throws {AppwriteException}
10592
10581
  * @returns {Promise<Models.Organization<Preferences>>}
10593
10582
  */
10594
- updatePlan(organizationId, billingPlan, paymentMethodId, billingAddressId) {
10583
+ updatePlan(organizationId, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget) {
10595
10584
  return __awaiter(this, void 0, void 0, function* () {
10596
10585
  if (typeof organizationId === 'undefined') {
10597
10586
  throw new AppwriteException('Missing required parameter: "organizationId"');
@@ -10610,6 +10599,18 @@ class Organizations {
10610
10599
  if (typeof billingAddressId !== 'undefined') {
10611
10600
  payload['billingAddressId'] = billingAddressId;
10612
10601
  }
10602
+ if (typeof invites !== 'undefined') {
10603
+ payload['invites'] = invites;
10604
+ }
10605
+ if (typeof couponId !== 'undefined') {
10606
+ payload['couponId'] = couponId;
10607
+ }
10608
+ if (typeof taxId !== 'undefined') {
10609
+ payload['taxId'] = taxId;
10610
+ }
10611
+ if (typeof budget !== 'undefined') {
10612
+ payload['budget'] = budget;
10613
+ }
10613
10614
  const uri = new URL(this.client.config.endpoint + apiPath);
10614
10615
  const apiHeaders = {
10615
10616
  'content-type': 'application/json',
@@ -15822,6 +15823,7 @@ exports.CreditCard = void 0;
15822
15823
  CreditCard["Visa"] = "visa";
15823
15824
  CreditCard["MIR"] = "mir";
15824
15825
  CreditCard["Maestro"] = "maestro";
15826
+ CreditCard["Rupay"] = "rupay";
15825
15827
  })(exports.CreditCard || (exports.CreditCard = {}));
15826
15828
 
15827
15829
  exports.Flag = void 0;
@@ -16075,6 +16077,9 @@ exports.Runtime = void 0;
16075
16077
  Runtime["Python311"] = "python-3.11";
16076
16078
  Runtime["Python312"] = "python-3.12";
16077
16079
  Runtime["Pythonml311"] = "python-ml-3.11";
16080
+ Runtime["Deno121"] = "deno-1.21";
16081
+ Runtime["Deno124"] = "deno-1.24";
16082
+ Runtime["Deno135"] = "deno-1.35";
16078
16083
  Runtime["Deno140"] = "deno-1.40";
16079
16084
  Runtime["Deno146"] = "deno-1.46";
16080
16085
  Runtime["Deno20"] = "deno-2.0";
@@ -16136,8 +16141,9 @@ exports.Name = void 0;
16136
16141
  Name["V1audits"] = "v1-audits";
16137
16142
  Name["V1mails"] = "v1-mails";
16138
16143
  Name["V1functions"] = "v1-functions";
16139
- Name["V1usage"] = "v1-usage";
16140
- Name["V1usagedump"] = "v1-usage-dump";
16144
+ Name["V1statsresources"] = "v1-stats-resources";
16145
+ Name["V1statsusage"] = "v1-stats-usage";
16146
+ Name["V1statsusagedump"] = "v1-stats-usage-dump";
16141
16147
  Name["V1webhooks"] = "v1-webhooks";
16142
16148
  Name["V1certificates"] = "v1-certificates";
16143
16149
  Name["V1builds"] = "v1-builds";