@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.
- package/README.md +3 -3
- package/dist/cjs/sdk.js +3565 -2411
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +3564 -2412
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +3565 -2411
- package/docs/examples/{functions/list-specifications.md → account/create-payment-method.md} +3 -3
- package/docs/examples/account/delete-mfa-authenticator.md +2 -1
- 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/{functions/get-template.md → account/list-billing-addresses.md} +4 -4
- 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-copon.md +13 -0
- package/docs/examples/console/plans.md +11 -0
- package/docs/examples/console/regions.md +11 -0
- package/docs/examples/functions/create-build.md +1 -1
- package/docs/examples/functions/create-execution.md +1 -2
- package/docs/examples/functions/create.md +1 -3
- package/docs/examples/functions/{get-deployment-download.md → download-deployment.md} +1 -1
- package/docs/examples/functions/update.md +1 -3
- 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-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 +2 -2
- package/src/enums/billing-plan.ts +5 -0
- package/src/enums/email-template-type.ts +0 -2
- package/src/enums/platform-type.ts +0 -2
- package/src/enums/runtime.ts +0 -1
- package/src/index.ts +4 -1
- package/src/models.ts +956 -282
- package/src/services/account.ts +345 -2
- package/src/services/backups.ts +425 -0
- package/src/services/console.ts +120 -0
- package/src/services/functions.ts +14 -195
- package/src/services/organizations.ts +896 -0
- package/src/services/projects.ts +1 -110
- package/src/services/users.ts +0 -37
- package/src/services/vcs.ts +0 -36
- package/types/enums/billing-plan.d.ts +5 -0
- package/types/enums/email-template-type.d.ts +1 -3
- package/types/enums/platform-type.d.ts +1 -3
- package/types/enums/runtime.d.ts +1 -2
- package/types/index.d.ts +4 -1
- package/types/models.d.ts +956 -282
- package/types/services/account.d.ts +105 -1
- package/types/services/backups.d.ts +128 -0
- package/types/services/console.d.ts +38 -0
- package/types/services/functions.d.ts +8 -67
- package/types/services/organizations.d.ts +273 -0
- package/types/services/projects.d.ts +1 -32
- package/types/services/users.d.ts +0 -12
- package/types/services/vcs.d.ts +0 -11
- package/docs/examples/functions/delete-execution.md +0 -14
- package/docs/examples/functions/list-templates.md +0 -16
- package/docs/examples/functions/update-deployment-build.md +0 -14
- package/docs/examples/projects/create-j-w-t.md +0 -15
- package/docs/examples/projects/update-mock-numbers.md +0 -14
- package/docs/examples/projects/update-session-alerts.md +0 -14
- package/docs/examples/users/create-j-w-t.md +0 -15
- package/docs/examples/vcs/get-repository-contents.md +0 -15
|
@@ -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);
|
|
@@ -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.getInvoice(
|
|
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.getPaymentMethod(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
'<PAYMENT_METHOD_ID>' // paymentMethodId
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
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.getPlan(
|
|
10
|
+
'<ORGANIZATION_ID>' // organizationId
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
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.getUsage(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
'', // startDate (optional)
|
|
12
|
+
'' // endDate (optional)
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
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.listAggregations(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
[] // queries (optional)
|
|
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.listInvoices(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
[] // queries (optional)
|
|
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.list(
|
|
10
|
+
[], // queries (optional)
|
|
11
|
+
'<SEARCH>' // search (optional)
|
|
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.setBackupPaymentMethod(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
'<PAYMENT_METHOD_ID>' // paymentMethodId
|
|
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.setBillingAddress(
|
|
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.setBillingEmail(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
'email@example.com' // billingEmail
|
|
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.setBillingTaxId(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
'<TAX_ID>' // taxId
|
|
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.setDefaultPaymentMethod(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
'<PAYMENT_METHOD_ID>' // paymentMethodId
|
|
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.updateBudget(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
0, // budget
|
|
12
|
+
[] // alerts (optional)
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
console.log(result);
|
|
@@ -0,0 +1,16 @@
|
|
|
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.updatePlan(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
.Tier0, // billingPlan
|
|
12
|
+
'<PAYMENT_METHOD_ID>', // paymentMethodId (optional)
|
|
13
|
+
'<BILLING_ADDRESS_ID>' // billingAddressId (optional)
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
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 abstract and simplify complex and repetitive development tasks behind a very simple REST API",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.1.0-rc.2",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
package/src/client.ts
CHANGED
|
@@ -304,8 +304,8 @@ class Client {
|
|
|
304
304
|
'x-sdk-name': 'Console',
|
|
305
305
|
'x-sdk-platform': 'console',
|
|
306
306
|
'x-sdk-language': 'web',
|
|
307
|
-
'x-sdk-version': '1.0.
|
|
308
|
-
'X-Appwrite-Response-Format': '1.
|
|
307
|
+
'x-sdk-version': '1.1.0-rc.2',
|
|
308
|
+
'X-Appwrite-Response-Format': '1.5.0',
|
|
309
309
|
};
|
|
310
310
|
|
|
311
311
|
/**
|
package/src/enums/runtime.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Appwrite Console SDK
|
|
3
3
|
*
|
|
4
|
-
* This SDK is compatible with Appwrite server version 1.
|
|
4
|
+
* This SDK is compatible with Appwrite server version 1.5.x.
|
|
5
5
|
* For older versions, please check
|
|
6
6
|
* [previous releases](https://github.com/appwrite/sdk-for-console/releases).
|
|
7
7
|
*/
|
|
8
8
|
export { Client, Query, AppwriteException } from './client';
|
|
9
9
|
export { Account } from './services/account';
|
|
10
10
|
export { Avatars } from './services/avatars';
|
|
11
|
+
export { Backups } from './services/backups';
|
|
11
12
|
export { Assistant } from './services/assistant';
|
|
12
13
|
export { Console } from './services/console';
|
|
13
14
|
export { Databases } from './services/databases';
|
|
@@ -17,6 +18,7 @@ export { Health } from './services/health';
|
|
|
17
18
|
export { Locale } from './services/locale';
|
|
18
19
|
export { Messaging } from './services/messaging';
|
|
19
20
|
export { Migrations } from './services/migrations';
|
|
21
|
+
export { Organizations } from './services/organizations';
|
|
20
22
|
export { Project } from './services/project';
|
|
21
23
|
export { Projects } from './services/projects';
|
|
22
24
|
export { Proxy } from './services/proxy';
|
|
@@ -44,6 +46,7 @@ export { FunctionUsageRange } from './enums/function-usage-range';
|
|
|
44
46
|
export { ExecutionMethod } from './enums/execution-method';
|
|
45
47
|
export { Name } from './enums/name';
|
|
46
48
|
export { SmtpEncryption } from './enums/smtp-encryption';
|
|
49
|
+
export { BillingPlan } from './enums/billing-plan';
|
|
47
50
|
export { ProjectUsageRange } from './enums/project-usage-range';
|
|
48
51
|
export { Region } from './enums/region';
|
|
49
52
|
export { Api } from './enums/api';
|