@appwrite.io/console 4.0.0 → 5.0.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +172 -34
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +173 -35
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +172 -34
  8. package/docs/examples/domains/confirm-purchase.md +16 -0
  9. package/docs/examples/domains/confirm-transfer-in.md +16 -0
  10. package/docs/examples/functions/create.md +3 -1
  11. package/docs/examples/functions/update.md +3 -1
  12. package/docs/examples/sites/create.md +4 -1
  13. package/docs/examples/sites/update.md +4 -1
  14. package/package.json +1 -1
  15. package/src/client.ts +5 -1
  16. package/src/enums/appwrite-migration-resource.ts +4 -0
  17. package/src/enums/build-runtime.ts +3 -0
  18. package/src/enums/domain-purchase-payment-status.ts +10 -0
  19. package/src/enums/runtime.ts +3 -0
  20. package/src/enums/runtimes.ts +3 -0
  21. package/src/index.ts +1 -0
  22. package/src/models.ts +90 -5
  23. package/src/services/account.ts +2 -2
  24. package/src/services/domains.ts +126 -0
  25. package/src/services/functions.ts +52 -24
  26. package/src/services/organizations.ts +2 -2
  27. package/src/services/sites.ts +83 -41
  28. package/types/enums/appwrite-migration-resource.d.ts +4 -0
  29. package/types/enums/build-runtime.d.ts +3 -0
  30. package/types/enums/domain-purchase-payment-status.d.ts +10 -0
  31. package/types/enums/runtime.d.ts +3 -0
  32. package/types/enums/runtimes.d.ts +3 -0
  33. package/types/index.d.ts +1 -0
  34. package/types/models.d.ts +90 -5
  35. package/types/services/account.d.ts +2 -2
  36. package/types/services/domains.d.ts +44 -0
  37. package/types/services/functions.d.ts +20 -8
  38. package/types/services/organizations.d.ts +2 -2
  39. package/types/services/sites.d.ts +26 -8
package/dist/iife/sdk.js CHANGED
@@ -4332,7 +4332,7 @@
4332
4332
  'x-sdk-name': 'Console',
4333
4333
  'x-sdk-platform': 'console',
4334
4334
  'x-sdk-language': 'web',
4335
- 'x-sdk-version': '4.0.0',
4335
+ 'x-sdk-version': '5.0.0',
4336
4336
  'X-Appwrite-Response-Format': '1.8.0',
4337
4337
  };
4338
4338
  this.realtime = {
@@ -4874,6 +4874,9 @@
4874
4874
  window.console.warn('Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.');
4875
4875
  window.localStorage.setItem('cookieFallback', cookieFallback);
4876
4876
  }
4877
+ if (data && typeof data === 'object') {
4878
+ data.toString = () => JSONbig.stringify(data);
4879
+ }
4877
4880
  return data;
4878
4881
  });
4879
4882
  }
@@ -11622,6 +11625,36 @@
11622
11625
  };
11623
11626
  return this.client.call('post', uri, apiHeaders, payload);
11624
11627
  }
11628
+ confirmPurchase(paramsOrFirst, ...rest) {
11629
+ let params;
11630
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
11631
+ params = (paramsOrFirst || {});
11632
+ }
11633
+ else {
11634
+ params = {
11635
+ domainId: paramsOrFirst,
11636
+ organizationId: rest[0]
11637
+ };
11638
+ }
11639
+ const domainId = params.domainId;
11640
+ const organizationId = params.organizationId;
11641
+ if (typeof domainId === 'undefined') {
11642
+ throw new AppwriteException('Missing required parameter: "domainId"');
11643
+ }
11644
+ if (typeof organizationId === 'undefined') {
11645
+ throw new AppwriteException('Missing required parameter: "organizationId"');
11646
+ }
11647
+ const apiPath = '/domains/purchases/{domainId}/confirm'.replace('{domainId}', domainId);
11648
+ const payload = {};
11649
+ if (typeof organizationId !== 'undefined') {
11650
+ payload['organizationId'] = organizationId;
11651
+ }
11652
+ const uri = new URL(this.client.config.endpoint + apiPath);
11653
+ const apiHeaders = {
11654
+ 'content-type': 'application/json',
11655
+ };
11656
+ return this.client.call('post', uri, apiHeaders, payload);
11657
+ }
11625
11658
  listSuggestions(paramsOrFirst, ...rest) {
11626
11659
  let params;
11627
11660
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -11719,6 +11752,36 @@
11719
11752
  };
11720
11753
  return this.client.call('post', uri, apiHeaders, payload);
11721
11754
  }
11755
+ confirmTransferIn(paramsOrFirst, ...rest) {
11756
+ let params;
11757
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
11758
+ params = (paramsOrFirst || {});
11759
+ }
11760
+ else {
11761
+ params = {
11762
+ domainId: paramsOrFirst,
11763
+ organizationId: rest[0]
11764
+ };
11765
+ }
11766
+ const domainId = params.domainId;
11767
+ const organizationId = params.organizationId;
11768
+ if (typeof domainId === 'undefined') {
11769
+ throw new AppwriteException('Missing required parameter: "domainId"');
11770
+ }
11771
+ if (typeof organizationId === 'undefined') {
11772
+ throw new AppwriteException('Missing required parameter: "organizationId"');
11773
+ }
11774
+ const apiPath = '/domains/transfers/in/{domainId}/confirm'.replace('{domainId}', domainId);
11775
+ const payload = {};
11776
+ if (typeof organizationId !== 'undefined') {
11777
+ payload['organizationId'] = organizationId;
11778
+ }
11779
+ const uri = new URL(this.client.config.endpoint + apiPath);
11780
+ const apiHeaders = {
11781
+ 'content-type': 'application/json',
11782
+ };
11783
+ return this.client.call('post', uri, apiHeaders, payload);
11784
+ }
11722
11785
  createTransferOut(paramsOrFirst, ...rest) {
11723
11786
  let params;
11724
11787
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -13436,7 +13499,9 @@
13436
13499
  providerBranch: rest[13],
13437
13500
  providerSilentMode: rest[14],
13438
13501
  providerRootDirectory: rest[15],
13439
- specification: rest[16]
13502
+ buildSpecification: rest[16],
13503
+ runtimeSpecification: rest[17],
13504
+ deploymentRetention: rest[18]
13440
13505
  };
13441
13506
  }
13442
13507
  const functionId = params.functionId;
@@ -13456,7 +13521,9 @@
13456
13521
  const providerBranch = params.providerBranch;
13457
13522
  const providerSilentMode = params.providerSilentMode;
13458
13523
  const providerRootDirectory = params.providerRootDirectory;
13459
- const specification = params.specification;
13524
+ const buildSpecification = params.buildSpecification;
13525
+ const runtimeSpecification = params.runtimeSpecification;
13526
+ const deploymentRetention = params.deploymentRetention;
13460
13527
  if (typeof functionId === 'undefined') {
13461
13528
  throw new AppwriteException('Missing required parameter: "functionId"');
13462
13529
  }
@@ -13519,8 +13586,14 @@
13519
13586
  if (typeof providerRootDirectory !== 'undefined') {
13520
13587
  payload['providerRootDirectory'] = providerRootDirectory;
13521
13588
  }
13522
- if (typeof specification !== 'undefined') {
13523
- payload['specification'] = specification;
13589
+ if (typeof buildSpecification !== 'undefined') {
13590
+ payload['buildSpecification'] = buildSpecification;
13591
+ }
13592
+ if (typeof runtimeSpecification !== 'undefined') {
13593
+ payload['runtimeSpecification'] = runtimeSpecification;
13594
+ }
13595
+ if (typeof deploymentRetention !== 'undefined') {
13596
+ payload['deploymentRetention'] = deploymentRetention;
13524
13597
  }
13525
13598
  const uri = new URL(this.client.config.endpoint + apiPath);
13526
13599
  const apiHeaders = {
@@ -13678,7 +13751,9 @@
13678
13751
  providerBranch: rest[13],
13679
13752
  providerSilentMode: rest[14],
13680
13753
  providerRootDirectory: rest[15],
13681
- specification: rest[16]
13754
+ buildSpecification: rest[16],
13755
+ runtimeSpecification: rest[17],
13756
+ deploymentRetention: rest[18]
13682
13757
  };
13683
13758
  }
13684
13759
  const functionId = params.functionId;
@@ -13698,7 +13773,9 @@
13698
13773
  const providerBranch = params.providerBranch;
13699
13774
  const providerSilentMode = params.providerSilentMode;
13700
13775
  const providerRootDirectory = params.providerRootDirectory;
13701
- const specification = params.specification;
13776
+ const buildSpecification = params.buildSpecification;
13777
+ const runtimeSpecification = params.runtimeSpecification;
13778
+ const deploymentRetention = params.deploymentRetention;
13702
13779
  if (typeof functionId === 'undefined') {
13703
13780
  throw new AppwriteException('Missing required parameter: "functionId"');
13704
13781
  }
@@ -13755,8 +13832,14 @@
13755
13832
  if (typeof providerRootDirectory !== 'undefined') {
13756
13833
  payload['providerRootDirectory'] = providerRootDirectory;
13757
13834
  }
13758
- if (typeof specification !== 'undefined') {
13759
- payload['specification'] = specification;
13835
+ if (typeof buildSpecification !== 'undefined') {
13836
+ payload['buildSpecification'] = buildSpecification;
13837
+ }
13838
+ if (typeof runtimeSpecification !== 'undefined') {
13839
+ payload['runtimeSpecification'] = runtimeSpecification;
13840
+ }
13841
+ if (typeof deploymentRetention !== 'undefined') {
13842
+ payload['deploymentRetention'] = deploymentRetention;
13760
13843
  }
13761
13844
  const uri = new URL(this.client.config.endpoint + apiPath);
13762
13845
  const apiHeaders = {
@@ -22944,15 +23027,18 @@
22944
23027
  timeout: rest[5],
22945
23028
  installCommand: rest[6],
22946
23029
  buildCommand: rest[7],
22947
- outputDirectory: rest[8],
22948
- adapter: rest[9],
22949
- installationId: rest[10],
22950
- fallbackFile: rest[11],
22951
- providerRepositoryId: rest[12],
22952
- providerBranch: rest[13],
22953
- providerSilentMode: rest[14],
22954
- providerRootDirectory: rest[15],
22955
- specification: rest[16]
23030
+ startCommand: rest[8],
23031
+ outputDirectory: rest[9],
23032
+ adapter: rest[10],
23033
+ installationId: rest[11],
23034
+ fallbackFile: rest[12],
23035
+ providerRepositoryId: rest[13],
23036
+ providerBranch: rest[14],
23037
+ providerSilentMode: rest[15],
23038
+ providerRootDirectory: rest[16],
23039
+ buildSpecification: rest[17],
23040
+ runtimeSpecification: rest[18],
23041
+ deploymentRetention: rest[19]
22956
23042
  };
22957
23043
  }
22958
23044
  const siteId = params.siteId;
@@ -22964,6 +23050,7 @@
22964
23050
  const timeout = params.timeout;
22965
23051
  const installCommand = params.installCommand;
22966
23052
  const buildCommand = params.buildCommand;
23053
+ const startCommand = params.startCommand;
22967
23054
  const outputDirectory = params.outputDirectory;
22968
23055
  const adapter = params.adapter;
22969
23056
  const installationId = params.installationId;
@@ -22972,7 +23059,9 @@
22972
23059
  const providerBranch = params.providerBranch;
22973
23060
  const providerSilentMode = params.providerSilentMode;
22974
23061
  const providerRootDirectory = params.providerRootDirectory;
22975
- const specification = params.specification;
23062
+ const buildSpecification = params.buildSpecification;
23063
+ const runtimeSpecification = params.runtimeSpecification;
23064
+ const deploymentRetention = params.deploymentRetention;
22976
23065
  if (typeof siteId === 'undefined') {
22977
23066
  throw new AppwriteException('Missing required parameter: "siteId"');
22978
23067
  }
@@ -23011,6 +23100,9 @@
23011
23100
  if (typeof buildCommand !== 'undefined') {
23012
23101
  payload['buildCommand'] = buildCommand;
23013
23102
  }
23103
+ if (typeof startCommand !== 'undefined') {
23104
+ payload['startCommand'] = startCommand;
23105
+ }
23014
23106
  if (typeof outputDirectory !== 'undefined') {
23015
23107
  payload['outputDirectory'] = outputDirectory;
23016
23108
  }
@@ -23038,8 +23130,14 @@
23038
23130
  if (typeof providerRootDirectory !== 'undefined') {
23039
23131
  payload['providerRootDirectory'] = providerRootDirectory;
23040
23132
  }
23041
- if (typeof specification !== 'undefined') {
23042
- payload['specification'] = specification;
23133
+ if (typeof buildSpecification !== 'undefined') {
23134
+ payload['buildSpecification'] = buildSpecification;
23135
+ }
23136
+ if (typeof runtimeSpecification !== 'undefined') {
23137
+ payload['runtimeSpecification'] = runtimeSpecification;
23138
+ }
23139
+ if (typeof deploymentRetention !== 'undefined') {
23140
+ payload['deploymentRetention'] = deploymentRetention;
23043
23141
  }
23044
23142
  const uri = new URL(this.client.config.endpoint + apiPath);
23045
23143
  const apiHeaders = {
@@ -23183,16 +23281,19 @@
23183
23281
  timeout: rest[4],
23184
23282
  installCommand: rest[5],
23185
23283
  buildCommand: rest[6],
23186
- outputDirectory: rest[7],
23187
- buildRuntime: rest[8],
23188
- adapter: rest[9],
23189
- fallbackFile: rest[10],
23190
- installationId: rest[11],
23191
- providerRepositoryId: rest[12],
23192
- providerBranch: rest[13],
23193
- providerSilentMode: rest[14],
23194
- providerRootDirectory: rest[15],
23195
- specification: rest[16]
23284
+ startCommand: rest[7],
23285
+ outputDirectory: rest[8],
23286
+ buildRuntime: rest[9],
23287
+ adapter: rest[10],
23288
+ fallbackFile: rest[11],
23289
+ installationId: rest[12],
23290
+ providerRepositoryId: rest[13],
23291
+ providerBranch: rest[14],
23292
+ providerSilentMode: rest[15],
23293
+ providerRootDirectory: rest[16],
23294
+ buildSpecification: rest[17],
23295
+ runtimeSpecification: rest[18],
23296
+ deploymentRetention: rest[19]
23196
23297
  };
23197
23298
  }
23198
23299
  const siteId = params.siteId;
@@ -23203,6 +23304,7 @@
23203
23304
  const timeout = params.timeout;
23204
23305
  const installCommand = params.installCommand;
23205
23306
  const buildCommand = params.buildCommand;
23307
+ const startCommand = params.startCommand;
23206
23308
  const outputDirectory = params.outputDirectory;
23207
23309
  const buildRuntime = params.buildRuntime;
23208
23310
  const adapter = params.adapter;
@@ -23212,7 +23314,9 @@
23212
23314
  const providerBranch = params.providerBranch;
23213
23315
  const providerSilentMode = params.providerSilentMode;
23214
23316
  const providerRootDirectory = params.providerRootDirectory;
23215
- const specification = params.specification;
23317
+ const buildSpecification = params.buildSpecification;
23318
+ const runtimeSpecification = params.runtimeSpecification;
23319
+ const deploymentRetention = params.deploymentRetention;
23216
23320
  if (typeof siteId === 'undefined') {
23217
23321
  throw new AppwriteException('Missing required parameter: "siteId"');
23218
23322
  }
@@ -23245,6 +23349,9 @@
23245
23349
  if (typeof buildCommand !== 'undefined') {
23246
23350
  payload['buildCommand'] = buildCommand;
23247
23351
  }
23352
+ if (typeof startCommand !== 'undefined') {
23353
+ payload['startCommand'] = startCommand;
23354
+ }
23248
23355
  if (typeof outputDirectory !== 'undefined') {
23249
23356
  payload['outputDirectory'] = outputDirectory;
23250
23357
  }
@@ -23272,8 +23379,14 @@
23272
23379
  if (typeof providerRootDirectory !== 'undefined') {
23273
23380
  payload['providerRootDirectory'] = providerRootDirectory;
23274
23381
  }
23275
- if (typeof specification !== 'undefined') {
23276
- payload['specification'] = specification;
23382
+ if (typeof buildSpecification !== 'undefined') {
23383
+ payload['buildSpecification'] = buildSpecification;
23384
+ }
23385
+ if (typeof runtimeSpecification !== 'undefined') {
23386
+ payload['runtimeSpecification'] = runtimeSpecification;
23387
+ }
23388
+ if (typeof deploymentRetention !== 'undefined') {
23389
+ payload['deploymentRetention'] = deploymentRetention;
23277
23390
  }
23278
23391
  const uri = new URL(this.client.config.endpoint + apiPath);
23279
23392
  const apiHeaders = {
@@ -32198,6 +32311,9 @@
32198
32311
  Runtime["Pythonml311"] = "python-ml-3.11";
32199
32312
  Runtime["Pythonml312"] = "python-ml-3.12";
32200
32313
  Runtime["Pythonml313"] = "python-ml-3.13";
32314
+ Runtime["Deno121"] = "deno-1.21";
32315
+ Runtime["Deno124"] = "deno-1.24";
32316
+ Runtime["Deno135"] = "deno-1.35";
32201
32317
  Runtime["Deno140"] = "deno-1.40";
32202
32318
  Runtime["Deno146"] = "deno-1.46";
32203
32319
  Runtime["Deno20"] = "deno-2.0";
@@ -32288,6 +32404,9 @@
32288
32404
  Runtimes["Pythonml311"] = "python-ml-3.11";
32289
32405
  Runtimes["Pythonml312"] = "python-ml-3.12";
32290
32406
  Runtimes["Pythonml313"] = "python-ml-3.13";
32407
+ Runtimes["Deno121"] = "deno-1.21";
32408
+ Runtimes["Deno124"] = "deno-1.24";
32409
+ Runtimes["Deno135"] = "deno-1.35";
32291
32410
  Runtimes["Deno140"] = "deno-1.40";
32292
32411
  Runtimes["Deno146"] = "deno-1.46";
32293
32412
  Runtimes["Deno20"] = "deno-2.0";
@@ -32437,6 +32556,10 @@
32437
32556
  AppwriteMigrationResource["Function"] = "function";
32438
32557
  AppwriteMigrationResource["Deployment"] = "deployment";
32439
32558
  AppwriteMigrationResource["Environmentvariable"] = "environment-variable";
32559
+ AppwriteMigrationResource["Provider"] = "provider";
32560
+ AppwriteMigrationResource["Topic"] = "topic";
32561
+ AppwriteMigrationResource["Subscriber"] = "subscriber";
32562
+ AppwriteMigrationResource["Message"] = "message";
32440
32563
  AppwriteMigrationResource["Site"] = "site";
32441
32564
  AppwriteMigrationResource["Sitedeployment"] = "site-deployment";
32442
32565
  AppwriteMigrationResource["Sitevariable"] = "site-variable";
@@ -32930,6 +33053,9 @@
32930
33053
  BuildRuntime["Pythonml311"] = "python-ml-3.11";
32931
33054
  BuildRuntime["Pythonml312"] = "python-ml-3.12";
32932
33055
  BuildRuntime["Pythonml313"] = "python-ml-3.13";
33056
+ BuildRuntime["Deno121"] = "deno-1.21";
33057
+ BuildRuntime["Deno124"] = "deno-1.24";
33058
+ BuildRuntime["Deno135"] = "deno-1.35";
32933
33059
  BuildRuntime["Deno140"] = "deno-1.40";
32934
33060
  BuildRuntime["Deno146"] = "deno-1.46";
32935
33061
  BuildRuntime["Deno20"] = "deno-2.0";
@@ -33162,6 +33288,18 @@
33162
33288
  BillingPlanGroup["Scale"] = "scale";
33163
33289
  })(exports.BillingPlanGroup || (exports.BillingPlanGroup = {}));
33164
33290
 
33291
+ exports.DomainPurchasePaymentStatus = void 0;
33292
+ (function (DomainPurchasePaymentStatus) {
33293
+ DomainPurchasePaymentStatus["Pending"] = "pending";
33294
+ DomainPurchasePaymentStatus["PendingConfirmation"] = "pending_confirmation";
33295
+ DomainPurchasePaymentStatus["PendingPaymentProcessing"] = "pending_payment_processing";
33296
+ DomainPurchasePaymentStatus["Authorized"] = "authorized";
33297
+ DomainPurchasePaymentStatus["Captured"] = "captured";
33298
+ DomainPurchasePaymentStatus["Failed"] = "failed";
33299
+ DomainPurchasePaymentStatus["CaptureFailed"] = "capture_failed";
33300
+ DomainPurchasePaymentStatus["RenewalCaptureFailed"] = "renewal_capture_failed";
33301
+ })(exports.DomainPurchasePaymentStatus || (exports.DomainPurchasePaymentStatus = {}));
33302
+
33165
33303
  exports.DomainTransferStatusStatus = void 0;
33166
33304
  (function (DomainTransferStatusStatus) {
33167
33305
  DomainTransferStatusStatus["Transferrable"] = "transferrable";
@@ -0,0 +1,16 @@
1
+ ```javascript
2
+ import { Client, Domains } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const domains = new Domains(client);
9
+
10
+ const result = await domains.confirmPurchase({
11
+ domainId: '<DOMAIN_ID>',
12
+ organizationId: '<ORGANIZATION_ID>'
13
+ });
14
+
15
+ console.log(result);
16
+ ```
@@ -0,0 +1,16 @@
1
+ ```javascript
2
+ import { Client, Domains } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const domains = new Domains(client);
9
+
10
+ const result = await domains.confirmTransferIn({
11
+ domainId: '<DOMAIN_ID>',
12
+ organizationId: '<ORGANIZATION_ID>'
13
+ });
14
+
15
+ console.log(result);
16
+ ```
@@ -25,7 +25,9 @@ const result = await functions.create({
25
25
  providerBranch: '<PROVIDER_BRANCH>', // optional
26
26
  providerSilentMode: false, // optional
27
27
  providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional
28
- specification: '' // optional
28
+ buildSpecification: '', // optional
29
+ runtimeSpecification: '', // optional
30
+ deploymentRetention: 0 // optional
29
31
  });
30
32
 
31
33
  console.log(result);
@@ -25,7 +25,9 @@ const result = await functions.update({
25
25
  providerBranch: '<PROVIDER_BRANCH>', // optional
26
26
  providerSilentMode: false, // optional
27
27
  providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional
28
- specification: '' // optional
28
+ buildSpecification: '', // optional
29
+ runtimeSpecification: '', // optional
30
+ deploymentRetention: 0 // optional
29
31
  });
30
32
 
31
33
  console.log(result);
@@ -17,6 +17,7 @@ const result = await sites.create({
17
17
  timeout: 1, // optional
18
18
  installCommand: '<INSTALL_COMMAND>', // optional
19
19
  buildCommand: '<BUILD_COMMAND>', // optional
20
+ startCommand: '<START_COMMAND>', // optional
20
21
  outputDirectory: '<OUTPUT_DIRECTORY>', // optional
21
22
  adapter: Adapter.Static, // optional
22
23
  installationId: '<INSTALLATION_ID>', // optional
@@ -25,7 +26,9 @@ const result = await sites.create({
25
26
  providerBranch: '<PROVIDER_BRANCH>', // optional
26
27
  providerSilentMode: false, // optional
27
28
  providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional
28
- specification: '' // optional
29
+ buildSpecification: '', // optional
30
+ runtimeSpecification: '', // optional
31
+ deploymentRetention: 0 // optional
29
32
  });
30
33
 
31
34
  console.log(result);
@@ -16,6 +16,7 @@ const result = await sites.update({
16
16
  timeout: 1, // optional
17
17
  installCommand: '<INSTALL_COMMAND>', // optional
18
18
  buildCommand: '<BUILD_COMMAND>', // optional
19
+ startCommand: '<START_COMMAND>', // optional
19
20
  outputDirectory: '<OUTPUT_DIRECTORY>', // optional
20
21
  buildRuntime: BuildRuntime.Node145, // optional
21
22
  adapter: Adapter.Static, // optional
@@ -25,7 +26,9 @@ const result = await sites.update({
25
26
  providerBranch: '<PROVIDER_BRANCH>', // optional
26
27
  providerSilentMode: false, // optional
27
28
  providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional
28
- specification: '' // optional
29
+ buildSpecification: '', // optional
30
+ runtimeSpecification: '', // optional
31
+ deploymentRetention: 0 // optional
29
32
  });
30
33
 
31
34
  console.log(result);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@appwrite.io/console",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "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",
5
- "version": "4.0.0",
5
+ "version": "5.0.0",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
package/src/client.ts CHANGED
@@ -400,7 +400,7 @@ class Client {
400
400
  'x-sdk-name': 'Console',
401
401
  'x-sdk-platform': 'console',
402
402
  'x-sdk-language': 'web',
403
- 'x-sdk-version': '4.0.0',
403
+ 'x-sdk-version': '5.0.0',
404
404
  'X-Appwrite-Response-Format': '1.8.0',
405
405
  };
406
406
 
@@ -995,6 +995,10 @@ class Client {
995
995
  window.localStorage.setItem('cookieFallback', cookieFallback);
996
996
  }
997
997
 
998
+ if (data && typeof data === 'object') {
999
+ data.toString = () => JSONbig.stringify(data);
1000
+ }
1001
+
998
1002
  return data;
999
1003
  }
1000
1004
 
@@ -15,6 +15,10 @@ export enum AppwriteMigrationResource {
15
15
  Function = 'function',
16
16
  Deployment = 'deployment',
17
17
  Environmentvariable = 'environment-variable',
18
+ Provider = 'provider',
19
+ Topic = 'topic',
20
+ Subscriber = 'subscriber',
21
+ Message = 'message',
18
22
  Site = 'site',
19
23
  Sitedeployment = 'site-deployment',
20
24
  Sitevariable = 'site-variable',
@@ -30,6 +30,9 @@ export enum BuildRuntime {
30
30
  Pythonml311 = 'python-ml-3.11',
31
31
  Pythonml312 = 'python-ml-3.12',
32
32
  Pythonml313 = 'python-ml-3.13',
33
+ Deno121 = 'deno-1.21',
34
+ Deno124 = 'deno-1.24',
35
+ Deno135 = 'deno-1.35',
33
36
  Deno140 = 'deno-1.40',
34
37
  Deno146 = 'deno-1.46',
35
38
  Deno20 = 'deno-2.0',
@@ -0,0 +1,10 @@
1
+ export enum DomainPurchasePaymentStatus {
2
+ Pending = 'pending',
3
+ PendingConfirmation = 'pending_confirmation',
4
+ PendingPaymentProcessing = 'pending_payment_processing',
5
+ Authorized = 'authorized',
6
+ Captured = 'captured',
7
+ Failed = 'failed',
8
+ CaptureFailed = 'capture_failed',
9
+ RenewalCaptureFailed = 'renewal_capture_failed',
10
+ }
@@ -30,6 +30,9 @@ export enum Runtime {
30
30
  Pythonml311 = 'python-ml-3.11',
31
31
  Pythonml312 = 'python-ml-3.12',
32
32
  Pythonml313 = 'python-ml-3.13',
33
+ Deno121 = 'deno-1.21',
34
+ Deno124 = 'deno-1.24',
35
+ Deno135 = 'deno-1.35',
33
36
  Deno140 = 'deno-1.40',
34
37
  Deno146 = 'deno-1.46',
35
38
  Deno20 = 'deno-2.0',
@@ -30,6 +30,9 @@ export enum Runtimes {
30
30
  Pythonml311 = 'python-ml-3.11',
31
31
  Pythonml312 = 'python-ml-3.12',
32
32
  Pythonml313 = 'python-ml-3.13',
33
+ Deno121 = 'deno-1.21',
34
+ Deno124 = 'deno-1.24',
35
+ Deno135 = 'deno-1.35',
33
36
  Deno140 = 'deno-1.40',
34
37
  Deno146 = 'deno-1.46',
35
38
  Deno20 = 'deno-2.0',
package/src/index.ts CHANGED
@@ -112,4 +112,5 @@ export { ProxyRuleDeploymentResourceType } from './enums/proxy-rule-deployment-r
112
112
  export { ProxyRuleStatus } from './enums/proxy-rule-status';
113
113
  export { MessageStatus } from './enums/message-status';
114
114
  export { BillingPlanGroup } from './enums/billing-plan-group';
115
+ export { DomainPurchasePaymentStatus } from './enums/domain-purchase-payment-status';
115
116
  export { DomainTransferStatusStatus } from './enums/domain-transfer-status-status';