@appwrite.io/console 1.1.0-rc.2 → 1.1.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 (115) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/sdk.js +2196 -3306
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +2197 -3305
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +2196 -3306
  7. package/docs/examples/account/delete-mfa-authenticator.md +1 -2
  8. package/docs/examples/databases/update-boolean-attribute.md +2 -1
  9. package/docs/examples/databases/update-datetime-attribute.md +2 -1
  10. package/docs/examples/databases/update-email-attribute.md +2 -1
  11. package/docs/examples/databases/update-enum-attribute.md +2 -1
  12. package/docs/examples/databases/update-float-attribute.md +2 -1
  13. package/docs/examples/databases/update-integer-attribute.md +2 -1
  14. package/docs/examples/databases/update-ip-attribute.md +2 -1
  15. package/docs/examples/databases/update-relationship-attribute.md +2 -1
  16. package/docs/examples/databases/update-string-attribute.md +3 -1
  17. package/docs/examples/databases/update-url-attribute.md +2 -1
  18. package/docs/examples/functions/create-build.md +1 -1
  19. package/docs/examples/functions/create-execution.md +2 -1
  20. package/docs/examples/functions/create.md +3 -1
  21. package/docs/examples/functions/delete-execution.md +14 -0
  22. package/docs/examples/functions/{download-deployment.md → get-deployment-download.md} +1 -1
  23. package/docs/examples/{account/list-billing-addresses.md → functions/get-template.md} +4 -4
  24. package/docs/examples/{account/create-payment-method.md → functions/list-specifications.md} +3 -3
  25. package/docs/examples/functions/list-templates.md +16 -0
  26. package/docs/examples/functions/update-deployment-build.md +14 -0
  27. package/docs/examples/functions/update.md +3 -1
  28. package/docs/examples/projects/create-j-w-t.md +15 -0
  29. package/docs/examples/projects/update-mock-numbers.md +14 -0
  30. package/docs/examples/projects/update-session-alerts.md +14 -0
  31. package/docs/examples/users/create-j-w-t.md +15 -0
  32. package/docs/examples/vcs/get-repository-contents.md +15 -0
  33. package/package.json +1 -1
  34. package/src/client.ts +2 -2
  35. package/src/enums/email-template-type.ts +2 -0
  36. package/src/enums/platform-type.ts +2 -0
  37. package/src/enums/runtime.ts +1 -0
  38. package/src/index.ts +1 -4
  39. package/src/models.ts +286 -960
  40. package/src/services/account.ts +2 -345
  41. package/src/services/console.ts +0 -120
  42. package/src/services/databases.ts +54 -10
  43. package/src/services/functions.ts +195 -14
  44. package/src/services/projects.ts +110 -1
  45. package/src/services/users.ts +37 -0
  46. package/src/services/vcs.ts +36 -0
  47. package/types/enums/email-template-type.d.ts +3 -1
  48. package/types/enums/platform-type.d.ts +3 -1
  49. package/types/enums/runtime.d.ts +2 -1
  50. package/types/index.d.ts +1 -4
  51. package/types/models.d.ts +286 -960
  52. package/types/services/account.d.ts +1 -105
  53. package/types/services/console.d.ts +0 -38
  54. package/types/services/databases.d.ts +21 -10
  55. package/types/services/functions.d.ts +67 -8
  56. package/types/services/projects.d.ts +32 -1
  57. package/types/services/users.d.ts +12 -0
  58. package/types/services/vcs.d.ts +11 -0
  59. package/docs/examples/account/delete-payment-method.md +0 -13
  60. package/docs/examples/account/get-billing-address.md +0 -13
  61. package/docs/examples/account/get-payment-method.md +0 -13
  62. package/docs/examples/account/list-credits.md +0 -14
  63. package/docs/examples/account/list-invoices.md +0 -13
  64. package/docs/examples/account/list-payment-methods.md +0 -13
  65. package/docs/examples/account/update-payment-method-mandate-options.md +0 -13
  66. package/docs/examples/account/update-payment-method-provider.md +0 -15
  67. package/docs/examples/account/update-payment-method.md +0 -15
  68. package/docs/examples/backups/create-archive.md +0 -14
  69. package/docs/examples/backups/create-policy.md +0 -19
  70. package/docs/examples/backups/create-restoration.md +0 -16
  71. package/docs/examples/backups/delete-archive.md +0 -13
  72. package/docs/examples/backups/delete-policy.md +0 -13
  73. package/docs/examples/backups/get-archive.md +0 -13
  74. package/docs/examples/backups/get-policy.md +0 -13
  75. package/docs/examples/backups/get-restoration.md +0 -13
  76. package/docs/examples/backups/list-archives.md +0 -13
  77. package/docs/examples/backups/list-policies.md +0 -13
  78. package/docs/examples/backups/list-restorations.md +0 -13
  79. package/docs/examples/backups/update-policy.md +0 -17
  80. package/docs/examples/console/create-source.md +0 -17
  81. package/docs/examples/console/get-copon.md +0 -13
  82. package/docs/examples/console/plans.md +0 -11
  83. package/docs/examples/console/regions.md +0 -11
  84. package/docs/examples/organizations/add-credit.md +0 -14
  85. package/docs/examples/organizations/create-invoice-payment.md +0 -15
  86. package/docs/examples/organizations/create.md +0 -17
  87. package/docs/examples/organizations/delete-backup-payment-method.md +0 -13
  88. package/docs/examples/organizations/delete-billing-address.md +0 -13
  89. package/docs/examples/organizations/delete-default-payment-method.md +0 -13
  90. package/docs/examples/organizations/delete.md +0 -13
  91. package/docs/examples/organizations/get-aggregation.md +0 -14
  92. package/docs/examples/organizations/get-billing-address.md +0 -14
  93. package/docs/examples/organizations/get-credit.md +0 -14
  94. package/docs/examples/organizations/get-invoice-download.md +0 -14
  95. package/docs/examples/organizations/get-invoice-view.md +0 -14
  96. package/docs/examples/organizations/get-invoice.md +0 -14
  97. package/docs/examples/organizations/get-payment-method.md +0 -14
  98. package/docs/examples/organizations/get-plan.md +0 -13
  99. package/docs/examples/organizations/get-usage.md +0 -15
  100. package/docs/examples/organizations/list-aggregations.md +0 -14
  101. package/docs/examples/organizations/list-invoices.md +0 -14
  102. package/docs/examples/organizations/list.md +0 -14
  103. package/docs/examples/organizations/set-backup-payment-method.md +0 -14
  104. package/docs/examples/organizations/set-billing-address.md +0 -14
  105. package/docs/examples/organizations/set-billing-email.md +0 -14
  106. package/docs/examples/organizations/set-billing-tax-id.md +0 -14
  107. package/docs/examples/organizations/set-default-payment-method.md +0 -14
  108. package/docs/examples/organizations/update-budget.md +0 -15
  109. package/docs/examples/organizations/update-plan.md +0 -16
  110. package/src/enums/billing-plan.ts +0 -5
  111. package/src/services/backups.ts +0 -425
  112. package/src/services/organizations.ts +0 -896
  113. package/types/enums/billing-plan.d.ts +0 -5
  114. package/types/services/backups.d.ts +0 -128
  115. package/types/services/organizations.d.ts +0 -273
@@ -1,15 +0,0 @@
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);
@@ -1,15 +0,0 @@
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);
@@ -1,14 +0,0 @@
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);
@@ -1,19 +0,0 @@
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);
@@ -1,16 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,17 +0,0 @@
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);
@@ -1,17 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,11 +0,0 @@
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);
@@ -1,11 +0,0 @@
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);
@@ -1,14 +0,0 @@
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);
@@ -1,15 +0,0 @@
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);
@@ -1,17 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,13 +0,0 @@
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);
@@ -1,14 +0,0 @@
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);
@@ -1,14 +0,0 @@
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);
@@ -1,14 +0,0 @@
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.getCredit(
10
- '<ORGANIZATION_ID>', // organizationId
11
- '<CREDIT_ID>' // creditId
12
- );
13
-
14
- console.log(result);
@@ -1,14 +0,0 @@
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.getInvoiceDownload(
10
- '<ORGANIZATION_ID>', // organizationId
11
- '<INVOICE_ID>' // invoiceId
12
- );
13
-
14
- console.log(result);
@@ -1,14 +0,0 @@
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.getInvoiceView(
10
- '<ORGANIZATION_ID>', // organizationId
11
- '<INVOICE_ID>' // invoiceId
12
- );
13
-
14
- console.log(result);
@@ -1,14 +0,0 @@
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.getInvoice(
10
- '<ORGANIZATION_ID>', // organizationId
11
- '<INVOICE_ID>' // invoiceId
12
- );
13
-
14
- console.log(result);
@@ -1,14 +0,0 @@
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.getPaymentMethod(
10
- '<ORGANIZATION_ID>', // organizationId
11
- '<PAYMENT_METHOD_ID>' // paymentMethodId
12
- );
13
-
14
- console.log(result);
@@ -1,13 +0,0 @@
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.getPlan(
10
- '<ORGANIZATION_ID>' // organizationId
11
- );
12
-
13
- console.log(result);
@@ -1,15 +0,0 @@
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.getUsage(
10
- '<ORGANIZATION_ID>', // organizationId
11
- '', // startDate (optional)
12
- '' // endDate (optional)
13
- );
14
-
15
- console.log(result);
@@ -1,14 +0,0 @@
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.listAggregations(
10
- '<ORGANIZATION_ID>', // organizationId
11
- [] // queries (optional)
12
- );
13
-
14
- console.log(result);
@@ -1,14 +0,0 @@
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.listInvoices(
10
- '<ORGANIZATION_ID>', // organizationId
11
- [] // queries (optional)
12
- );
13
-
14
- console.log(result);
@@ -1,14 +0,0 @@
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.list(
10
- [], // queries (optional)
11
- '<SEARCH>' // search (optional)
12
- );
13
-
14
- console.log(result);
@@ -1,14 +0,0 @@
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.setBackupPaymentMethod(
10
- '<ORGANIZATION_ID>', // organizationId
11
- '<PAYMENT_METHOD_ID>' // paymentMethodId
12
- );
13
-
14
- console.log(result);
@@ -1,14 +0,0 @@
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.setBillingAddress(
10
- '<ORGANIZATION_ID>', // organizationId
11
- '<BILLING_ADDRESS_ID>' // billingAddressId
12
- );
13
-
14
- console.log(result);
@@ -1,14 +0,0 @@
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.setBillingEmail(
10
- '<ORGANIZATION_ID>', // organizationId
11
- 'email@example.com' // billingEmail
12
- );
13
-
14
- console.log(result);
@@ -1,14 +0,0 @@
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.setBillingTaxId(
10
- '<ORGANIZATION_ID>', // organizationId
11
- '<TAX_ID>' // taxId
12
- );
13
-
14
- console.log(result);