@appwrite.io/console 1.0.1 → 1.1.0-rc.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 (103) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/sdk.js +3565 -2411
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +3564 -2412
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +3565 -2411
  7. package/docs/examples/{functions/list-specifications.md → account/create-payment-method.md} +3 -3
  8. package/docs/examples/account/delete-mfa-authenticator.md +2 -1
  9. package/docs/examples/account/delete-payment-method.md +13 -0
  10. package/docs/examples/account/get-billing-address.md +13 -0
  11. package/docs/examples/account/get-payment-method.md +13 -0
  12. package/docs/examples/{functions/get-template.md → account/list-billing-addresses.md} +4 -4
  13. package/docs/examples/account/list-credits.md +14 -0
  14. package/docs/examples/account/list-invoices.md +13 -0
  15. package/docs/examples/account/list-payment-methods.md +13 -0
  16. package/docs/examples/account/update-payment-method-mandate-options.md +13 -0
  17. package/docs/examples/account/update-payment-method-provider.md +15 -0
  18. package/docs/examples/account/update-payment-method.md +15 -0
  19. package/docs/examples/backups/create-archive.md +14 -0
  20. package/docs/examples/backups/create-policy.md +19 -0
  21. package/docs/examples/backups/create-restoration.md +16 -0
  22. package/docs/examples/backups/delete-archive.md +13 -0
  23. package/docs/examples/backups/delete-policy.md +13 -0
  24. package/docs/examples/backups/get-archive.md +13 -0
  25. package/docs/examples/backups/get-policy.md +13 -0
  26. package/docs/examples/backups/get-restoration.md +13 -0
  27. package/docs/examples/backups/list-archives.md +13 -0
  28. package/docs/examples/backups/list-policies.md +13 -0
  29. package/docs/examples/backups/list-restorations.md +13 -0
  30. package/docs/examples/backups/update-policy.md +17 -0
  31. package/docs/examples/console/create-source.md +17 -0
  32. package/docs/examples/console/get-copon.md +13 -0
  33. package/docs/examples/console/plans.md +11 -0
  34. package/docs/examples/console/regions.md +11 -0
  35. package/docs/examples/functions/create-build.md +1 -1
  36. package/docs/examples/functions/create-execution.md +1 -2
  37. package/docs/examples/functions/create.md +1 -3
  38. package/docs/examples/functions/{get-deployment-download.md → download-deployment.md} +1 -1
  39. package/docs/examples/functions/update.md +1 -3
  40. package/docs/examples/organizations/add-credit.md +14 -0
  41. package/docs/examples/organizations/create-invoice-payment.md +15 -0
  42. package/docs/examples/organizations/create.md +17 -0
  43. package/docs/examples/organizations/delete-backup-payment-method.md +13 -0
  44. package/docs/examples/organizations/delete-billing-address.md +13 -0
  45. package/docs/examples/organizations/delete-default-payment-method.md +13 -0
  46. package/docs/examples/organizations/delete.md +13 -0
  47. package/docs/examples/organizations/get-aggregation.md +14 -0
  48. package/docs/examples/organizations/get-billing-address.md +14 -0
  49. package/docs/examples/organizations/get-credit.md +14 -0
  50. package/docs/examples/organizations/get-invoice-download.md +14 -0
  51. package/docs/examples/organizations/get-invoice-view.md +14 -0
  52. package/docs/examples/organizations/get-invoice.md +14 -0
  53. package/docs/examples/organizations/get-payment-method.md +14 -0
  54. package/docs/examples/organizations/get-plan.md +13 -0
  55. package/docs/examples/organizations/get-usage.md +15 -0
  56. package/docs/examples/organizations/list-aggregations.md +14 -0
  57. package/docs/examples/organizations/list-invoices.md +14 -0
  58. package/docs/examples/organizations/list.md +14 -0
  59. package/docs/examples/organizations/set-backup-payment-method.md +14 -0
  60. package/docs/examples/organizations/set-billing-address.md +14 -0
  61. package/docs/examples/organizations/set-billing-email.md +14 -0
  62. package/docs/examples/organizations/set-billing-tax-id.md +14 -0
  63. package/docs/examples/organizations/set-default-payment-method.md +14 -0
  64. package/docs/examples/organizations/update-budget.md +15 -0
  65. package/docs/examples/organizations/update-plan.md +16 -0
  66. package/package.json +1 -1
  67. package/src/client.ts +2 -2
  68. package/src/enums/billing-plan.ts +5 -0
  69. package/src/enums/email-template-type.ts +0 -2
  70. package/src/enums/platform-type.ts +0 -2
  71. package/src/enums/runtime.ts +0 -1
  72. package/src/index.ts +4 -1
  73. package/src/models.ts +956 -282
  74. package/src/services/account.ts +345 -2
  75. package/src/services/backups.ts +425 -0
  76. package/src/services/console.ts +120 -0
  77. package/src/services/functions.ts +14 -195
  78. package/src/services/organizations.ts +896 -0
  79. package/src/services/projects.ts +1 -110
  80. package/src/services/users.ts +0 -37
  81. package/src/services/vcs.ts +0 -36
  82. package/types/enums/billing-plan.d.ts +5 -0
  83. package/types/enums/email-template-type.d.ts +1 -3
  84. package/types/enums/platform-type.d.ts +1 -3
  85. package/types/enums/runtime.d.ts +1 -2
  86. package/types/index.d.ts +4 -1
  87. package/types/models.d.ts +956 -282
  88. package/types/services/account.d.ts +105 -1
  89. package/types/services/backups.d.ts +128 -0
  90. package/types/services/console.d.ts +38 -0
  91. package/types/services/functions.d.ts +8 -67
  92. package/types/services/organizations.d.ts +273 -0
  93. package/types/services/projects.d.ts +1 -32
  94. package/types/services/users.d.ts +0 -12
  95. package/types/services/vcs.d.ts +0 -11
  96. package/docs/examples/functions/delete-execution.md +0 -14
  97. package/docs/examples/functions/list-templates.md +0 -16
  98. package/docs/examples/functions/update-deployment-build.md +0 -14
  99. package/docs/examples/projects/create-j-w-t.md +0 -15
  100. package/docs/examples/projects/update-mock-numbers.md +0 -14
  101. package/docs/examples/projects/update-session-alerts.md +0 -14
  102. package/docs/examples/users/create-j-w-t.md +0 -15
  103. package/docs/examples/vcs/get-repository-contents.md +0 -15
@@ -1,11 +1,11 @@
1
- import { Client, Functions } from "@appwrite.io/console";
1
+ import { Client, Account } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
- const functions = new Functions(client);
7
+ const account = new Account(client);
8
8
 
9
- const result = await functions.listSpecifications();
9
+ const result = await account.createPaymentMethod();
10
10
 
11
11
  console.log(result);
@@ -7,7 +7,8 @@ const client = new Client()
7
7
  const account = new Account(client);
8
8
 
9
9
  const result = await account.deleteMfaAuthenticator(
10
- AuthenticatorType.Totp // type
10
+ AuthenticatorType.Totp, // type
11
+ '<OTP>' // otp
11
12
  );
12
13
 
13
14
  console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Account } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const account = new Account(client);
8
+
9
+ const result = await account.deletePaymentMethod(
10
+ '<PAYMENT_METHOD_ID>' // paymentMethodId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Account } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const account = new Account(client);
8
+
9
+ const result = await account.getBillingAddress(
10
+ '<BILLING_ADDRESS_ID>' // billingAddressId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Account } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const account = new Account(client);
8
+
9
+ const result = await account.getPaymentMethod(
10
+ '<PAYMENT_METHOD_ID>' // paymentMethodId
11
+ );
12
+
13
+ console.log(result);
@@ -1,13 +1,13 @@
1
- import { Client, Functions } from "@appwrite.io/console";
1
+ import { Client, Account } from "@appwrite.io/console";
2
2
 
3
3
  const client = new Client()
4
4
  .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
5
  .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
6
 
7
- const functions = new Functions(client);
7
+ const account = new Account(client);
8
8
 
9
- const result = await functions.getTemplate(
10
- '<TEMPLATE_ID>' // templateId
9
+ const result = await account.listBillingAddresses(
10
+ [] // queries (optional)
11
11
  );
12
12
 
13
13
  console.log(result);
@@ -0,0 +1,14 @@
1
+ import { Client, Account } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const account = new Account(client);
8
+
9
+ const result = await account.listCredits(
10
+ '<ORGANIZATION_ID>', // organizationId
11
+ [] // queries (optional)
12
+ );
13
+
14
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Account } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const account = new Account(client);
8
+
9
+ const result = await account.listInvoices(
10
+ [] // queries (optional)
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Account } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const account = new Account(client);
8
+
9
+ const result = await account.listPaymentMethods(
10
+ [] // queries (optional)
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Account } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const account = new Account(client);
8
+
9
+ const result = await account.updatePaymentMethodMandateOptions(
10
+ '<PAYMENT_METHOD_ID>' // paymentMethodId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,15 @@
1
+ import { Client, Account } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const account = new Account(client);
8
+
9
+ const result = await account.updatePaymentMethodProvider(
10
+ '<PAYMENT_METHOD_ID>', // paymentMethodId
11
+ '<PROVIDER_METHOD_ID>', // providerMethodId
12
+ '<NAME>' // name
13
+ );
14
+
15
+ console.log(result);
@@ -0,0 +1,15 @@
1
+ import { Client, Account } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const account = new Account(client);
8
+
9
+ const result = await account.updatePaymentMethod(
10
+ '<PAYMENT_METHOD_ID>', // paymentMethodId
11
+ 1, // expiryMonth
12
+ 2024 // expiryYear
13
+ );
14
+
15
+ console.log(result);
@@ -0,0 +1,14 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.createArchive(
10
+ [], // services
11
+ '<RESOURCE_ID>' // resourceId (optional)
12
+ );
13
+
14
+ console.log(result);
@@ -0,0 +1,19 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.createPolicy(
10
+ '<POLICY_ID>', // policyId
11
+ [], // services
12
+ 1, // retention
13
+ '', // schedule
14
+ '<NAME>', // name (optional)
15
+ '<RESOURCE_ID>', // resourceId (optional)
16
+ false // enabled (optional)
17
+ );
18
+
19
+ console.log(result);
@@ -0,0 +1,16 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.createRestoration(
10
+ '<ARCHIVE_ID>', // archiveId
11
+ [], // services
12
+ '<NEW_RESOURCE_ID>', // newResourceId (optional)
13
+ '<NEW_RESOURCE_NAME>' // newResourceName (optional)
14
+ );
15
+
16
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.deleteArchive(
10
+ '<ARCHIVE_ID>' // archiveId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.deletePolicy(
10
+ '<POLICY_ID>' // policyId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.getArchive(
10
+ '<ARCHIVE_ID>' // archiveId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.getPolicy(
10
+ '<POLICY_ID>' // policyId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.getRestoration(
10
+ '<RESTORATION_ID>' // restorationId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.listArchives(
10
+ [] // queries (optional)
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.listPolicies(
10
+ [] // queries (optional)
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.listRestorations(
10
+ [] // queries (optional)
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,17 @@
1
+ import { Client, Backups } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const backups = new Backups(client);
8
+
9
+ const result = await backups.updatePolicy(
10
+ '<POLICY_ID>', // policyId
11
+ '<NAME>', // name (optional)
12
+ 1, // retention (optional)
13
+ '', // schedule (optional)
14
+ false // enabled (optional)
15
+ );
16
+
17
+ console.log(result);
@@ -0,0 +1,17 @@
1
+ import { Client, Console } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const console = new Console(client);
8
+
9
+ const result = await console.createSource(
10
+ '<REF>', // ref (optional)
11
+ 'https://example.com', // referrer (optional)
12
+ '<UTM_SOURCE>', // utmSource (optional)
13
+ '<UTM_CAMPAIGN>', // utmCampaign (optional)
14
+ '<UTM_MEDIUM>' // utmMedium (optional)
15
+ );
16
+
17
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Console } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const console = new Console(client);
8
+
9
+ const result = await console.getCopon(
10
+ '<COUPON_ID>' // couponId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,11 @@
1
+ import { Client, Console } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const console = new Console(client);
8
+
9
+ const result = await console.plans();
10
+
11
+ console.log(result);
@@ -0,0 +1,11 @@
1
+ import { Client, Console } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const console = new Console(client);
8
+
9
+ const result = await console.regions();
10
+
11
+ console.log(result);
@@ -9,7 +9,7 @@ const functions = new Functions(client);
9
9
  const result = await functions.createBuild(
10
10
  '<FUNCTION_ID>', // functionId
11
11
  '<DEPLOYMENT_ID>', // deploymentId
12
- '<BUILD_ID>' // buildId (optional)
12
+ '<BUILD_ID>' // buildId
13
13
  );
14
14
 
15
15
  console.log(result);
@@ -12,8 +12,7 @@ const result = await functions.createExecution(
12
12
  false, // async (optional)
13
13
  '<PATH>', // path (optional)
14
14
  ExecutionMethod.GET, // method (optional)
15
- {}, // headers (optional)
16
- '' // scheduledAt (optional)
15
+ {} // headers (optional)
17
16
  );
18
17
 
19
18
  console.log(result);
@@ -18,7 +18,6 @@ const result = await functions.create(
18
18
  false, // logging (optional)
19
19
  '<ENTRYPOINT>', // entrypoint (optional)
20
20
  '<COMMANDS>', // commands (optional)
21
- [], // scopes (optional)
22
21
  '<INSTALLATION_ID>', // installationId (optional)
23
22
  '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional)
24
23
  '<PROVIDER_BRANCH>', // providerBranch (optional)
@@ -27,8 +26,7 @@ const result = await functions.create(
27
26
  '<TEMPLATE_REPOSITORY>', // templateRepository (optional)
28
27
  '<TEMPLATE_OWNER>', // templateOwner (optional)
29
28
  '<TEMPLATE_ROOT_DIRECTORY>', // templateRootDirectory (optional)
30
- '<TEMPLATE_VERSION>', // templateVersion (optional)
31
- '' // specification (optional)
29
+ '<TEMPLATE_BRANCH>' // templateBranch (optional)
32
30
  );
33
31
 
34
32
  console.log(result);
@@ -6,7 +6,7 @@ const client = new Client()
6
6
 
7
7
  const functions = new Functions(client);
8
8
 
9
- const result = functions.getDeploymentDownload(
9
+ const result = functions.downloadDeployment(
10
10
  '<FUNCTION_ID>', // functionId
11
11
  '<DEPLOYMENT_ID>' // deploymentId
12
12
  );
@@ -18,13 +18,11 @@ const result = await functions.update(
18
18
  false, // logging (optional)
19
19
  '<ENTRYPOINT>', // entrypoint (optional)
20
20
  '<COMMANDS>', // commands (optional)
21
- [], // scopes (optional)
22
21
  '<INSTALLATION_ID>', // installationId (optional)
23
22
  '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional)
24
23
  '<PROVIDER_BRANCH>', // providerBranch (optional)
25
24
  false, // providerSilentMode (optional)
26
- '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional)
27
- '' // specification (optional)
25
+ '<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional)
28
26
  );
29
27
 
30
28
  console.log(result);
@@ -0,0 +1,14 @@
1
+ import { Client, Organizations } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const organizations = new Organizations(client);
8
+
9
+ const result = await organizations.addCredit(
10
+ '<ORGANIZATION_ID>', // organizationId
11
+ '<COUPON_ID>' // couponId
12
+ );
13
+
14
+ console.log(result);
@@ -0,0 +1,15 @@
1
+ import { Client, Organizations } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const organizations = new Organizations(client);
8
+
9
+ const result = await organizations.createInvoicePayment(
10
+ '<ORGANIZATION_ID>', // organizationId
11
+ '<INVOICE_ID>', // invoiceId
12
+ '<PAYMENT_METHOD_ID>' // paymentMethodId
13
+ );
14
+
15
+ console.log(result);
@@ -0,0 +1,17 @@
1
+ import { Client, Organizations, } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const organizations = new Organizations(client);
8
+
9
+ const result = await organizations.create(
10
+ '<ORGANIZATION_ID>', // organizationId
11
+ '<NAME>', // name
12
+ .Tier0, // billingPlan
13
+ '<PAYMENT_METHOD_ID>', // paymentMethodId (optional)
14
+ '<BILLING_ADDRESS_ID>' // billingAddressId (optional)
15
+ );
16
+
17
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Organizations } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const organizations = new Organizations(client);
8
+
9
+ const result = await organizations.deleteBackupPaymentMethod(
10
+ '<ORGANIZATION_ID>' // organizationId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Organizations } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const organizations = new Organizations(client);
8
+
9
+ const result = await organizations.deleteBillingAddress(
10
+ '<ORGANIZATION_ID>' // organizationId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Organizations } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const organizations = new Organizations(client);
8
+
9
+ const result = await organizations.deleteDefaultPaymentMethod(
10
+ '<ORGANIZATION_ID>' // organizationId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,13 @@
1
+ import { Client, Organizations } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const organizations = new Organizations(client);
8
+
9
+ const result = await organizations.delete(
10
+ '<ORGANIZATION_ID>' // organizationId
11
+ );
12
+
13
+ console.log(result);
@@ -0,0 +1,14 @@
1
+ import { Client, Organizations } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const organizations = new Organizations(client);
8
+
9
+ const result = await organizations.getAggregation(
10
+ '<ORGANIZATION_ID>', // organizationId
11
+ '<AGGREGATION_ID>' // aggregationId
12
+ );
13
+
14
+ console.log(result);
@@ -0,0 +1,14 @@
1
+ import { Client, Organizations } from "@appwrite.io/console";
2
+
3
+ const client = new Client()
4
+ .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
6
+
7
+ const organizations = new Organizations(client);
8
+
9
+ const result = await organizations.getBillingAddress(
10
+ '<ORGANIZATION_ID>', // organizationId
11
+ '<BILLING_ADDRESS_ID>' // billingAddressId
12
+ );
13
+
14
+ console.log(result);