@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/dist/esm/sdk.js CHANGED
@@ -482,7 +482,7 @@ class Client {
482
482
  'x-sdk-name': 'Console',
483
483
  'x-sdk-platform': 'console',
484
484
  'x-sdk-language': 'web',
485
- 'x-sdk-version': '2.1.1',
485
+ 'x-sdk-version': '2.1.2',
486
486
  'X-Appwrite-Response-Format': '1.8.0',
487
487
  };
488
488
  this.realtime = {
@@ -6937,6 +6937,54 @@ class Domains {
6937
6937
  };
6938
6938
  return this.client.call('post', uri, apiHeaders, payload);
6939
6939
  }
6940
+ listSuggestions(paramsOrFirst, ...rest) {
6941
+ let params;
6942
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
6943
+ params = (paramsOrFirst || {});
6944
+ }
6945
+ else {
6946
+ params = {
6947
+ query: paramsOrFirst,
6948
+ tlds: rest[0],
6949
+ limit: rest[1],
6950
+ filterType: rest[2],
6951
+ priceMax: rest[3],
6952
+ priceMin: rest[4]
6953
+ };
6954
+ }
6955
+ const query = params.query;
6956
+ const tlds = params.tlds;
6957
+ const limit = params.limit;
6958
+ const filterType = params.filterType;
6959
+ const priceMax = params.priceMax;
6960
+ const priceMin = params.priceMin;
6961
+ if (typeof query === 'undefined') {
6962
+ throw new AppwriteException('Missing required parameter: "query"');
6963
+ }
6964
+ const apiPath = '/domains/suggestions';
6965
+ const payload = {};
6966
+ if (typeof query !== 'undefined') {
6967
+ payload['query'] = query;
6968
+ }
6969
+ if (typeof tlds !== 'undefined') {
6970
+ payload['tlds'] = tlds;
6971
+ }
6972
+ if (typeof limit !== 'undefined') {
6973
+ payload['limit'] = limit;
6974
+ }
6975
+ if (typeof filterType !== 'undefined') {
6976
+ payload['filterType'] = filterType;
6977
+ }
6978
+ if (typeof priceMax !== 'undefined') {
6979
+ payload['priceMax'] = priceMax;
6980
+ }
6981
+ if (typeof priceMin !== 'undefined') {
6982
+ payload['priceMin'] = priceMin;
6983
+ }
6984
+ const uri = new URL(this.client.config.endpoint + apiPath);
6985
+ const apiHeaders = {};
6986
+ return this.client.call('get', uri, apiHeaders, payload);
6987
+ }
6940
6988
  get(paramsOrFirst) {
6941
6989
  let params;
6942
6990
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -9737,7 +9785,7 @@ class Health {
9737
9785
  * Check the Appwrite in-memory cache servers are up and connection is successful.
9738
9786
  *
9739
9787
  * @throws {AppwriteException}
9740
- * @returns {Promise<Models.HealthStatus>}
9788
+ * @returns {Promise<Models.HealthStatusList>}
9741
9789
  */
9742
9790
  getCache() {
9743
9791
  const apiPath = '/health/cache';
@@ -9770,7 +9818,7 @@ class Health {
9770
9818
  * Check the Appwrite database servers are up and connection is successful.
9771
9819
  *
9772
9820
  * @throws {AppwriteException}
9773
- * @returns {Promise<Models.HealthStatus>}
9821
+ * @returns {Promise<Models.HealthStatusList>}
9774
9822
  */
9775
9823
  getDB() {
9776
9824
  const apiPath = '/health/db';
@@ -9783,7 +9831,7 @@ class Health {
9783
9831
  * Check the Appwrite pub-sub servers are up and connection is successful.
9784
9832
  *
9785
9833
  * @throws {AppwriteException}
9786
- * @returns {Promise<Models.HealthStatus>}
9834
+ * @returns {Promise<Models.HealthStatusList>}
9787
9835
  */
9788
9836
  getPubSub() {
9789
9837
  const apiPath = '/health/pubsub';
@@ -9792,6 +9840,26 @@ class Health {
9792
9840
  const apiHeaders = {};
9793
9841
  return this.client.call('get', uri, apiHeaders, payload);
9794
9842
  }
9843
+ getQueueAudits(paramsOrFirst) {
9844
+ let params;
9845
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
9846
+ params = (paramsOrFirst || {});
9847
+ }
9848
+ else {
9849
+ params = {
9850
+ threshold: paramsOrFirst
9851
+ };
9852
+ }
9853
+ const threshold = params.threshold;
9854
+ const apiPath = '/health/queue/audits';
9855
+ const payload = {};
9856
+ if (typeof threshold !== 'undefined') {
9857
+ payload['threshold'] = threshold;
9858
+ }
9859
+ const uri = new URL(this.client.config.endpoint + apiPath);
9860
+ const apiHeaders = {};
9861
+ return this.client.call('get', uri, apiHeaders, payload);
9862
+ }
9795
9863
  getQueueBillingProjectAggregation(paramsOrFirst) {
9796
9864
  let params;
9797
9865
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -13911,7 +13979,7 @@ class Organizations {
13911
13979
  }
13912
13980
  estimationCreateOrganization(paramsOrFirst, ...rest) {
13913
13981
  let params;
13914
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
13982
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'billingPlan' in paramsOrFirst)) {
13915
13983
  params = (paramsOrFirst || {});
13916
13984
  }
13917
13985
  else {
@@ -25476,8 +25544,6 @@ var OAuthProvider;
25476
25544
  OAuthProvider["Yandex"] = "yandex";
25477
25545
  OAuthProvider["Zoho"] = "zoho";
25478
25546
  OAuthProvider["Zoom"] = "zoom";
25479
- OAuthProvider["Mock"] = "mock";
25480
- OAuthProvider["Mockunverified"] = "mock-unverified";
25481
25547
  OAuthProvider["GithubImagine"] = "githubImagine";
25482
25548
  OAuthProvider["GoogleImagine"] = "googleImagine";
25483
25549
  })(OAuthProvider || (OAuthProvider = {}));
@@ -26201,6 +26267,12 @@ var IndexType;
26201
26267
  IndexType["Spatial"] = "spatial";
26202
26268
  })(IndexType || (IndexType = {}));
26203
26269
 
26270
+ var FilterType;
26271
+ (function (FilterType) {
26272
+ FilterType["Premium"] = "premium";
26273
+ FilterType["Suggestion"] = "suggestion";
26274
+ })(FilterType || (FilterType = {}));
26275
+
26204
26276
  var Runtime;
26205
26277
  (function (Runtime) {
26206
26278
  Runtime["Node145"] = "node-14.5";
@@ -26312,6 +26384,7 @@ var Name;
26312
26384
  Name["V1webhooks"] = "v1-webhooks";
26313
26385
  Name["V1certificates"] = "v1-certificates";
26314
26386
  Name["V1builds"] = "v1-builds";
26387
+ Name["V1screenshots"] = "v1-screenshots";
26315
26388
  Name["V1messaging"] = "v1-messaging";
26316
26389
  Name["V1migrations"] = "v1-migrations";
26317
26390
  })(Name || (Name = {}));
@@ -26329,6 +26402,25 @@ var SmtpEncryption;
26329
26402
  SmtpEncryption["Tls"] = "tls";
26330
26403
  })(SmtpEncryption || (SmtpEncryption = {}));
26331
26404
 
26405
+ var BillingPlan;
26406
+ (function (BillingPlan) {
26407
+ BillingPlan["Tier0"] = "tier-0";
26408
+ BillingPlan["Tier1"] = "tier-1";
26409
+ BillingPlan["Tier2"] = "tier-2";
26410
+ BillingPlan["Imaginetier0"] = "imagine-tier-0";
26411
+ BillingPlan["Imaginetier1"] = "imagine-tier-1";
26412
+ BillingPlan["Imaginetier150"] = "imagine-tier-1-50";
26413
+ BillingPlan["Imaginetier1100"] = "imagine-tier-1-100";
26414
+ BillingPlan["Imaginetier1200"] = "imagine-tier-1-200";
26415
+ BillingPlan["Imaginetier1290"] = "imagine-tier-1-290";
26416
+ BillingPlan["Imaginetier1480"] = "imagine-tier-1-480";
26417
+ BillingPlan["Imaginetier1700"] = "imagine-tier-1-700";
26418
+ BillingPlan["Imaginetier1900"] = "imagine-tier-1-900";
26419
+ BillingPlan["Imaginetier11100"] = "imagine-tier-1-1100";
26420
+ BillingPlan["Imaginetier11650"] = "imagine-tier-1-1650";
26421
+ BillingPlan["Imaginetier12200"] = "imagine-tier-1-2200";
26422
+ })(BillingPlan || (BillingPlan = {}));
26423
+
26332
26424
  var ProjectUsageRange;
26333
26425
  (function (ProjectUsageRange) {
26334
26426
  ProjectUsageRange["OneHour"] = "1h";
@@ -26956,5 +27048,5 @@ var BillingPlanGroup;
26956
27048
  BillingPlanGroup["Scale"] = "scale";
26957
27049
  })(BillingPlanGroup || (BillingPlanGroup = {}));
26958
27050
 
26959
- export { Account, Adapter, Api, ApiService, AppwriteException, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, Backups, BillingPlanGroup, Browser, BuildRuntime, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DeploymentDownloadType, DeploymentStatus, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, Flag, Framework, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, IndexType, Locale, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, Operator, Organizations, PasswordHash, Permission, Platform, PlatformType, Project, ProjectUsageRange, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, Realtime, Region, RelationMutate, RelationshipType, Role, Runtime, SMTPSecure, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, Status, StatusCode, Storage, TablesDB, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, Users, VCSDetectionType, VCSReferenceType, Vcs };
27051
+ export { Account, Adapter, Api, ApiService, AppwriteException, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, Backups, BillingPlan, BillingPlanGroup, Browser, BuildRuntime, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DeploymentDownloadType, DeploymentStatus, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, FilterType, Flag, Framework, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, IndexType, Locale, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, Operator, Organizations, PasswordHash, Permission, Platform, PlatformType, Project, ProjectUsageRange, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, Realtime, Region, RelationMutate, RelationshipType, Role, Runtime, SMTPSecure, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, Status, StatusCode, Storage, TablesDB, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, Users, VCSDetectionType, VCSReferenceType, Vcs };
26960
27052
  //# sourceMappingURL=sdk.js.map