@appwrite.io/console 1.2.1 → 1.3.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.
- package/.github/workflows/autoclose.yml +1 -1
- package/README.md +1 -1
- package/dist/cjs/sdk.js +4877 -3337
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +4876 -3338
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +4877 -3337
- package/docs/examples/account/create-payment-method.md +11 -0
- package/docs/examples/account/delete-payment-method.md +13 -0
- package/docs/examples/account/get-billing-address.md +13 -0
- package/docs/examples/account/get-payment-method.md +13 -0
- package/docs/examples/account/list-billing-addresses.md +13 -0
- package/docs/examples/account/list-credits.md +14 -0
- package/docs/examples/account/list-invoices.md +13 -0
- package/docs/examples/account/list-payment-methods.md +13 -0
- package/docs/examples/account/update-payment-method-mandate-options.md +13 -0
- package/docs/examples/account/update-payment-method-provider.md +15 -0
- package/docs/examples/account/update-payment-method.md +15 -0
- package/docs/examples/backups/create-archive.md +14 -0
- package/docs/examples/backups/create-policy.md +19 -0
- package/docs/examples/backups/create-restoration.md +16 -0
- package/docs/examples/backups/delete-archive.md +13 -0
- package/docs/examples/backups/delete-policy.md +13 -0
- package/docs/examples/backups/get-archive.md +13 -0
- package/docs/examples/backups/get-policy.md +13 -0
- package/docs/examples/backups/get-restoration.md +13 -0
- package/docs/examples/backups/list-archives.md +13 -0
- package/docs/examples/backups/list-policies.md +13 -0
- package/docs/examples/backups/list-restorations.md +13 -0
- package/docs/examples/backups/update-policy.md +17 -0
- package/docs/examples/console/create-source.md +17 -0
- package/docs/examples/console/get-campaign.md +13 -0
- package/docs/examples/console/get-copon.md +13 -0
- package/docs/examples/console/plans.md +11 -0
- package/docs/examples/console/regions.md +11 -0
- package/docs/examples/health/get-queue-billing-aggregation.md +13 -0
- package/docs/examples/health/get-queue-priority-builds.md +13 -0
- package/docs/examples/organizations/add-credit.md +14 -0
- package/docs/examples/organizations/create-invoice-payment.md +15 -0
- package/docs/examples/organizations/create.md +17 -0
- package/docs/examples/organizations/delete-backup-payment-method.md +13 -0
- package/docs/examples/organizations/delete-billing-address.md +13 -0
- package/docs/examples/organizations/delete-default-payment-method.md +13 -0
- package/docs/examples/organizations/delete.md +13 -0
- package/docs/examples/organizations/get-aggregation.md +14 -0
- package/docs/examples/organizations/get-billing-address.md +14 -0
- package/docs/examples/organizations/get-credit.md +14 -0
- package/docs/examples/organizations/get-invoice-download.md +14 -0
- package/docs/examples/organizations/get-invoice-view.md +14 -0
- package/docs/examples/organizations/get-invoice.md +14 -0
- package/docs/examples/organizations/get-payment-method.md +14 -0
- package/docs/examples/organizations/get-plan.md +13 -0
- package/docs/examples/organizations/get-scopes.md +13 -0
- package/docs/examples/organizations/get-usage.md +15 -0
- package/docs/examples/organizations/list-aggregations.md +14 -0
- package/docs/examples/organizations/list-invoices.md +14 -0
- package/docs/examples/organizations/list.md +14 -0
- package/docs/examples/organizations/set-backup-payment-method.md +14 -0
- package/docs/examples/organizations/set-billing-address.md +14 -0
- package/docs/examples/organizations/set-billing-email.md +14 -0
- package/docs/examples/organizations/set-billing-tax-id.md +14 -0
- package/docs/examples/organizations/set-default-payment-method.md +14 -0
- package/docs/examples/organizations/update-budget.md +15 -0
- package/docs/examples/organizations/update-plan.md +16 -0
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/billing-plan.ts +5 -0
- package/src/enums/runtime.ts +2 -5
- package/src/index.ts +3 -0
- package/src/models.ts +1120 -1
- package/src/services/account.ts +336 -0
- package/src/services/backups.ts +425 -0
- package/src/services/console.ts +148 -0
- package/src/services/health.ts +56 -0
- package/src/services/organizations.ts +924 -0
- package/types/enums/billing-plan.d.ts +5 -0
- package/types/enums/runtime.d.ts +2 -5
- package/types/index.d.ts +3 -0
- package/types/models.d.ts +1120 -1
- package/types/services/account.d.ts +103 -0
- package/types/services/backups.d.ts +128 -0
- package/types/services/console.d.ts +47 -0
- package/types/services/health.d.ts +18 -0
- package/types/services/organizations.d.ts +282 -0
- package/.travis.yml +0 -32
|
@@ -0,0 +1,11 @@
|
|
|
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.createPaymentMethod();
|
|
10
|
+
|
|
11
|
+
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);
|
|
@@ -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.listBillingAddresses(
|
|
10
|
+
[] // queries (optional)
|
|
11
|
+
);
|
|
12
|
+
|
|
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.getCampaign(
|
|
10
|
+
'<CAMPAIGN_ID>' // campaignId
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
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);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Client, Health } 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 health = new Health(client);
|
|
8
|
+
|
|
9
|
+
const result = await health.getQueueBillingAggregation(
|
|
10
|
+
null // threshold (optional)
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
console.log(result);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Client, Health } 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 health = new Health(client);
|
|
8
|
+
|
|
9
|
+
const result = await health.getQueuePriorityBuilds(
|
|
10
|
+
null // threshold (optional)
|
|
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.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);
|
|
@@ -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.getCredit(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
'<CREDIT_ID>' // creditId
|
|
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.getInvoiceDownload(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
'<INVOICE_ID>' // invoiceId
|
|
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.getInvoiceView(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
'<INVOICE_ID>' // invoiceId
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
console.log(result);
|