@appwrite.io/console 2.1.1 → 2.1.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +99 -7
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +100 -8
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +99 -7
  8. package/docs/examples/domains/list-suggestions.md +18 -0
  9. package/docs/examples/health/get-queue-audits.md +13 -0
  10. package/docs/examples/organizations/create.md +2 -2
  11. package/docs/examples/organizations/estimation-create-organization.md +2 -2
  12. package/docs/examples/organizations/estimation-update-plan.md +2 -2
  13. package/docs/examples/organizations/update-plan.md +2 -2
  14. package/package.json +1 -1
  15. package/src/client.ts +1 -1
  16. package/src/enums/billing-plan.ts +17 -0
  17. package/src/enums/filter-type.ts +4 -0
  18. package/src/enums/name.ts +1 -0
  19. package/src/enums/o-auth-provider.ts +0 -2
  20. package/src/index.ts +2 -0
  21. package/src/models.ts +437 -375
  22. package/src/services/account.ts +20 -20
  23. package/src/services/avatars.ts +117 -117
  24. package/src/services/backups.ts +18 -18
  25. package/src/services/console.ts +24 -24
  26. package/src/services/databases.ts +89 -89
  27. package/src/services/domains.ts +295 -204
  28. package/src/services/functions.ts +30 -30
  29. package/src/services/health.ts +201 -152
  30. package/src/services/messaging.ts +54 -54
  31. package/src/services/migrations.ts +36 -36
  32. package/src/services/organizations.ts +67 -66
  33. package/src/services/projects.ts +81 -81
  34. package/src/services/sites.ts +30 -30
  35. package/src/services/storage.ts +45 -45
  36. package/src/services/tables-db.ts +89 -89
  37. package/src/services/users.ts +39 -39
  38. package/types/enums/billing-plan.d.ts +17 -0
  39. package/types/enums/filter-type.d.ts +4 -0
  40. package/types/enums/name.d.ts +1 -0
  41. package/types/enums/o-auth-provider.d.ts +0 -2
  42. package/types/index.d.ts +2 -0
  43. package/types/models.d.ts +434 -375
  44. package/types/services/account.d.ts +11 -11
  45. package/types/services/avatars.d.ts +82 -82
  46. package/types/services/backups.d.ts +8 -8
  47. package/types/services/console.d.ts +14 -14
  48. package/types/services/databases.d.ts +50 -50
  49. package/types/services/domains.d.ts +139 -104
  50. package/types/services/functions.d.ts +15 -15
  51. package/types/services/health.d.ts +95 -78
  52. package/types/services/messaging.d.ts +24 -24
  53. package/types/services/migrations.d.ts +16 -16
  54. package/types/services/organizations.d.ts +37 -36
  55. package/types/services/projects.d.ts +36 -36
  56. package/types/services/sites.d.ts +15 -15
  57. package/types/services/storage.d.ts +30 -30
  58. package/types/services/tables-db.d.ts +50 -50
  59. package/types/services/users.d.ts +24 -24
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.1.2
4
+
5
+ * Fix only use `bigint` for min, max and default attributes
6
+
3
7
  ## 2.1.1
4
8
 
5
9
  * Allow `bigint` to be passed in all methods that previously only accepted `number`
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@2.1.1"></script>
36
+ <script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@2.1.2"></script>
37
37
  ```
38
38
 
39
39
 
package/dist/cjs/sdk.js CHANGED
@@ -488,7 +488,7 @@ class Client {
488
488
  'x-sdk-name': 'Console',
489
489
  'x-sdk-platform': 'console',
490
490
  'x-sdk-language': 'web',
491
- 'x-sdk-version': '2.1.1',
491
+ 'x-sdk-version': '2.1.2',
492
492
  'X-Appwrite-Response-Format': '1.8.0',
493
493
  };
494
494
  this.realtime = {
@@ -6943,6 +6943,54 @@ class Domains {
6943
6943
  };
6944
6944
  return this.client.call('post', uri, apiHeaders, payload);
6945
6945
  }
6946
+ listSuggestions(paramsOrFirst, ...rest) {
6947
+ let params;
6948
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6949
+ params = (paramsOrFirst || {});
6950
+ }
6951
+ else {
6952
+ params = {
6953
+ query: paramsOrFirst,
6954
+ tlds: rest[0],
6955
+ limit: rest[1],
6956
+ filterType: rest[2],
6957
+ priceMax: rest[3],
6958
+ priceMin: rest[4]
6959
+ };
6960
+ }
6961
+ const query = params.query;
6962
+ const tlds = params.tlds;
6963
+ const limit = params.limit;
6964
+ const filterType = params.filterType;
6965
+ const priceMax = params.priceMax;
6966
+ const priceMin = params.priceMin;
6967
+ if (typeof query === 'undefined') {
6968
+ throw new AppwriteException('Missing required parameter: "query"');
6969
+ }
6970
+ const apiPath = '/domains/suggestions';
6971
+ const payload = {};
6972
+ if (typeof query !== 'undefined') {
6973
+ payload['query'] = query;
6974
+ }
6975
+ if (typeof tlds !== 'undefined') {
6976
+ payload['tlds'] = tlds;
6977
+ }
6978
+ if (typeof limit !== 'undefined') {
6979
+ payload['limit'] = limit;
6980
+ }
6981
+ if (typeof filterType !== 'undefined') {
6982
+ payload['filterType'] = filterType;
6983
+ }
6984
+ if (typeof priceMax !== 'undefined') {
6985
+ payload['priceMax'] = priceMax;
6986
+ }
6987
+ if (typeof priceMin !== 'undefined') {
6988
+ payload['priceMin'] = priceMin;
6989
+ }
6990
+ const uri = new URL(this.client.config.endpoint + apiPath);
6991
+ const apiHeaders = {};
6992
+ return this.client.call('get', uri, apiHeaders, payload);
6993
+ }
6946
6994
  get(paramsOrFirst) {
6947
6995
  let params;
6948
6996
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -9743,7 +9791,7 @@ class Health {
9743
9791
  * Check the Appwrite in-memory cache servers are up and connection is successful.
9744
9792
  *
9745
9793
  * @throws {AppwriteException}
9746
- * @returns {Promise<Models.HealthStatus>}
9794
+ * @returns {Promise<Models.HealthStatusList>}
9747
9795
  */
9748
9796
  getCache() {
9749
9797
  const apiPath = '/health/cache';
@@ -9776,7 +9824,7 @@ class Health {
9776
9824
  * Check the Appwrite database servers are up and connection is successful.
9777
9825
  *
9778
9826
  * @throws {AppwriteException}
9779
- * @returns {Promise<Models.HealthStatus>}
9827
+ * @returns {Promise<Models.HealthStatusList>}
9780
9828
  */
9781
9829
  getDB() {
9782
9830
  const apiPath = '/health/db';
@@ -9789,7 +9837,7 @@ class Health {
9789
9837
  * Check the Appwrite pub-sub servers are up and connection is successful.
9790
9838
  *
9791
9839
  * @throws {AppwriteException}
9792
- * @returns {Promise<Models.HealthStatus>}
9840
+ * @returns {Promise<Models.HealthStatusList>}
9793
9841
  */
9794
9842
  getPubSub() {
9795
9843
  const apiPath = '/health/pubsub';
@@ -9798,6 +9846,26 @@ class Health {
9798
9846
  const apiHeaders = {};
9799
9847
  return this.client.call('get', uri, apiHeaders, payload);
9800
9848
  }
9849
+ getQueueAudits(paramsOrFirst) {
9850
+ let params;
9851
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9852
+ params = (paramsOrFirst || {});
9853
+ }
9854
+ else {
9855
+ params = {
9856
+ threshold: paramsOrFirst
9857
+ };
9858
+ }
9859
+ const threshold = params.threshold;
9860
+ const apiPath = '/health/queue/audits';
9861
+ const payload = {};
9862
+ if (typeof threshold !== 'undefined') {
9863
+ payload['threshold'] = threshold;
9864
+ }
9865
+ const uri = new URL(this.client.config.endpoint + apiPath);
9866
+ const apiHeaders = {};
9867
+ return this.client.call('get', uri, apiHeaders, payload);
9868
+ }
9801
9869
  getQueueBillingProjectAggregation(paramsOrFirst) {
9802
9870
  let params;
9803
9871
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -13917,7 +13985,7 @@ class Organizations {
13917
13985
  }
13918
13986
  estimationCreateOrganization(paramsOrFirst, ...rest) {
13919
13987
  let params;
13920
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13988
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'billingPlan' in paramsOrFirst)) {
13921
13989
  params = (paramsOrFirst || {});
13922
13990
  }
13923
13991
  else {
@@ -25482,8 +25550,6 @@ exports.OAuthProvider = void 0;
25482
25550
  OAuthProvider["Yandex"] = "yandex";
25483
25551
  OAuthProvider["Zoho"] = "zoho";
25484
25552
  OAuthProvider["Zoom"] = "zoom";
25485
- OAuthProvider["Mock"] = "mock";
25486
- OAuthProvider["Mockunverified"] = "mock-unverified";
25487
25553
  OAuthProvider["GithubImagine"] = "githubImagine";
25488
25554
  OAuthProvider["GoogleImagine"] = "googleImagine";
25489
25555
  })(exports.OAuthProvider || (exports.OAuthProvider = {}));
@@ -26207,6 +26273,12 @@ exports.IndexType = void 0;
26207
26273
  IndexType["Spatial"] = "spatial";
26208
26274
  })(exports.IndexType || (exports.IndexType = {}));
26209
26275
 
26276
+ exports.FilterType = void 0;
26277
+ (function (FilterType) {
26278
+ FilterType["Premium"] = "premium";
26279
+ FilterType["Suggestion"] = "suggestion";
26280
+ })(exports.FilterType || (exports.FilterType = {}));
26281
+
26210
26282
  exports.Runtime = void 0;
26211
26283
  (function (Runtime) {
26212
26284
  Runtime["Node145"] = "node-14.5";
@@ -26318,6 +26390,7 @@ exports.Name = void 0;
26318
26390
  Name["V1webhooks"] = "v1-webhooks";
26319
26391
  Name["V1certificates"] = "v1-certificates";
26320
26392
  Name["V1builds"] = "v1-builds";
26393
+ Name["V1screenshots"] = "v1-screenshots";
26321
26394
  Name["V1messaging"] = "v1-messaging";
26322
26395
  Name["V1migrations"] = "v1-migrations";
26323
26396
  })(exports.Name || (exports.Name = {}));
@@ -26335,6 +26408,25 @@ exports.SmtpEncryption = void 0;
26335
26408
  SmtpEncryption["Tls"] = "tls";
26336
26409
  })(exports.SmtpEncryption || (exports.SmtpEncryption = {}));
26337
26410
 
26411
+ exports.BillingPlan = void 0;
26412
+ (function (BillingPlan) {
26413
+ BillingPlan["Tier0"] = "tier-0";
26414
+ BillingPlan["Tier1"] = "tier-1";
26415
+ BillingPlan["Tier2"] = "tier-2";
26416
+ BillingPlan["Imaginetier0"] = "imagine-tier-0";
26417
+ BillingPlan["Imaginetier1"] = "imagine-tier-1";
26418
+ BillingPlan["Imaginetier150"] = "imagine-tier-1-50";
26419
+ BillingPlan["Imaginetier1100"] = "imagine-tier-1-100";
26420
+ BillingPlan["Imaginetier1200"] = "imagine-tier-1-200";
26421
+ BillingPlan["Imaginetier1290"] = "imagine-tier-1-290";
26422
+ BillingPlan["Imaginetier1480"] = "imagine-tier-1-480";
26423
+ BillingPlan["Imaginetier1700"] = "imagine-tier-1-700";
26424
+ BillingPlan["Imaginetier1900"] = "imagine-tier-1-900";
26425
+ BillingPlan["Imaginetier11100"] = "imagine-tier-1-1100";
26426
+ BillingPlan["Imaginetier11650"] = "imagine-tier-1-1650";
26427
+ BillingPlan["Imaginetier12200"] = "imagine-tier-1-2200";
26428
+ })(exports.BillingPlan || (exports.BillingPlan = {}));
26429
+
26338
26430
  exports.ProjectUsageRange = void 0;
26339
26431
  (function (ProjectUsageRange) {
26340
26432
  ProjectUsageRange["OneHour"] = "1h";