@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.
- package/README.md +3 -3
- package/dist/cjs/sdk.js +2196 -3306
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2197 -3305
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2196 -3306
- package/docs/examples/account/delete-mfa-authenticator.md +1 -2
- package/docs/examples/databases/update-boolean-attribute.md +2 -1
- package/docs/examples/databases/update-datetime-attribute.md +2 -1
- package/docs/examples/databases/update-email-attribute.md +2 -1
- package/docs/examples/databases/update-enum-attribute.md +2 -1
- package/docs/examples/databases/update-float-attribute.md +2 -1
- package/docs/examples/databases/update-integer-attribute.md +2 -1
- package/docs/examples/databases/update-ip-attribute.md +2 -1
- package/docs/examples/databases/update-relationship-attribute.md +2 -1
- package/docs/examples/databases/update-string-attribute.md +3 -1
- package/docs/examples/databases/update-url-attribute.md +2 -1
- package/docs/examples/functions/create-build.md +1 -1
- package/docs/examples/functions/create-execution.md +2 -1
- package/docs/examples/functions/create.md +3 -1
- package/docs/examples/functions/delete-execution.md +14 -0
- package/docs/examples/functions/{download-deployment.md → get-deployment-download.md} +1 -1
- package/docs/examples/{account/list-billing-addresses.md → functions/get-template.md} +4 -4
- package/docs/examples/{account/create-payment-method.md → functions/list-specifications.md} +3 -3
- package/docs/examples/functions/list-templates.md +16 -0
- package/docs/examples/functions/update-deployment-build.md +14 -0
- package/docs/examples/functions/update.md +3 -1
- package/docs/examples/projects/create-j-w-t.md +15 -0
- package/docs/examples/projects/update-mock-numbers.md +14 -0
- package/docs/examples/projects/update-session-alerts.md +14 -0
- package/docs/examples/users/create-j-w-t.md +15 -0
- package/docs/examples/vcs/get-repository-contents.md +15 -0
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/enums/email-template-type.ts +2 -0
- package/src/enums/platform-type.ts +2 -0
- package/src/enums/runtime.ts +1 -0
- package/src/index.ts +1 -4
- package/src/models.ts +286 -960
- package/src/services/account.ts +2 -345
- package/src/services/console.ts +0 -120
- package/src/services/databases.ts +54 -10
- package/src/services/functions.ts +195 -14
- package/src/services/projects.ts +110 -1
- package/src/services/users.ts +37 -0
- package/src/services/vcs.ts +36 -0
- package/types/enums/email-template-type.d.ts +3 -1
- package/types/enums/platform-type.d.ts +3 -1
- package/types/enums/runtime.d.ts +2 -1
- package/types/index.d.ts +1 -4
- package/types/models.d.ts +286 -960
- package/types/services/account.d.ts +1 -105
- package/types/services/console.d.ts +0 -38
- package/types/services/databases.d.ts +21 -10
- package/types/services/functions.d.ts +67 -8
- package/types/services/projects.d.ts +32 -1
- package/types/services/users.d.ts +12 -0
- package/types/services/vcs.d.ts +11 -0
- package/docs/examples/account/delete-payment-method.md +0 -13
- package/docs/examples/account/get-billing-address.md +0 -13
- package/docs/examples/account/get-payment-method.md +0 -13
- package/docs/examples/account/list-credits.md +0 -14
- package/docs/examples/account/list-invoices.md +0 -13
- package/docs/examples/account/list-payment-methods.md +0 -13
- package/docs/examples/account/update-payment-method-mandate-options.md +0 -13
- package/docs/examples/account/update-payment-method-provider.md +0 -15
- package/docs/examples/account/update-payment-method.md +0 -15
- package/docs/examples/backups/create-archive.md +0 -14
- package/docs/examples/backups/create-policy.md +0 -19
- package/docs/examples/backups/create-restoration.md +0 -16
- package/docs/examples/backups/delete-archive.md +0 -13
- package/docs/examples/backups/delete-policy.md +0 -13
- package/docs/examples/backups/get-archive.md +0 -13
- package/docs/examples/backups/get-policy.md +0 -13
- package/docs/examples/backups/get-restoration.md +0 -13
- package/docs/examples/backups/list-archives.md +0 -13
- package/docs/examples/backups/list-policies.md +0 -13
- package/docs/examples/backups/list-restorations.md +0 -13
- package/docs/examples/backups/update-policy.md +0 -17
- package/docs/examples/console/create-source.md +0 -17
- package/docs/examples/console/get-copon.md +0 -13
- package/docs/examples/console/plans.md +0 -11
- package/docs/examples/console/regions.md +0 -11
- package/docs/examples/organizations/add-credit.md +0 -14
- package/docs/examples/organizations/create-invoice-payment.md +0 -15
- package/docs/examples/organizations/create.md +0 -17
- package/docs/examples/organizations/delete-backup-payment-method.md +0 -13
- package/docs/examples/organizations/delete-billing-address.md +0 -13
- package/docs/examples/organizations/delete-default-payment-method.md +0 -13
- package/docs/examples/organizations/delete.md +0 -13
- package/docs/examples/organizations/get-aggregation.md +0 -14
- package/docs/examples/organizations/get-billing-address.md +0 -14
- package/docs/examples/organizations/get-credit.md +0 -14
- package/docs/examples/organizations/get-invoice-download.md +0 -14
- package/docs/examples/organizations/get-invoice-view.md +0 -14
- package/docs/examples/organizations/get-invoice.md +0 -14
- package/docs/examples/organizations/get-payment-method.md +0 -14
- package/docs/examples/organizations/get-plan.md +0 -13
- package/docs/examples/organizations/get-usage.md +0 -15
- package/docs/examples/organizations/list-aggregations.md +0 -14
- package/docs/examples/organizations/list-invoices.md +0 -14
- package/docs/examples/organizations/list.md +0 -14
- package/docs/examples/organizations/set-backup-payment-method.md +0 -14
- package/docs/examples/organizations/set-billing-address.md +0 -14
- package/docs/examples/organizations/set-billing-email.md +0 -14
- package/docs/examples/organizations/set-billing-tax-id.md +0 -14
- package/docs/examples/organizations/set-default-payment-method.md +0 -14
- package/docs/examples/organizations/update-budget.md +0 -15
- package/docs/examples/organizations/update-plan.md +0 -16
- package/src/enums/billing-plan.ts +0 -5
- package/src/services/backups.ts +0 -425
- package/src/services/organizations.ts +0 -896
- package/types/enums/billing-plan.d.ts +0 -5
- package/types/services/backups.d.ts +0 -128
- package/types/services/organizations.d.ts +0 -273
|
@@ -10,7 +10,8 @@ const result = await databases.updateRelationshipAttribute(
|
|
|
10
10
|
'<DATABASE_ID>', // databaseId
|
|
11
11
|
'<COLLECTION_ID>', // collectionId
|
|
12
12
|
'', // key
|
|
13
|
-
RelationMutate.Cascade // onDelete (optional)
|
|
13
|
+
RelationMutate.Cascade, // onDelete (optional)
|
|
14
|
+
'' // newKey (optional)
|
|
14
15
|
);
|
|
15
16
|
|
|
16
17
|
console.log(result);
|
|
@@ -11,7 +11,9 @@ const result = await databases.updateStringAttribute(
|
|
|
11
11
|
'<COLLECTION_ID>', // collectionId
|
|
12
12
|
'', // key
|
|
13
13
|
false, // required
|
|
14
|
-
'<DEFAULT>' // default
|
|
14
|
+
'<DEFAULT>', // default
|
|
15
|
+
null, // size (optional)
|
|
16
|
+
'' // newKey (optional)
|
|
15
17
|
);
|
|
16
18
|
|
|
17
19
|
console.log(result);
|
|
@@ -12,7 +12,8 @@ const result = await functions.createExecution(
|
|
|
12
12
|
false, // async (optional)
|
|
13
13
|
'<PATH>', // path (optional)
|
|
14
14
|
ExecutionMethod.GET, // method (optional)
|
|
15
|
-
{} // headers (optional)
|
|
15
|
+
{}, // headers (optional)
|
|
16
|
+
'' // scheduledAt (optional)
|
|
16
17
|
);
|
|
17
18
|
|
|
18
19
|
console.log(result);
|
|
@@ -18,6 +18,7 @@ const result = await functions.create(
|
|
|
18
18
|
false, // logging (optional)
|
|
19
19
|
'<ENTRYPOINT>', // entrypoint (optional)
|
|
20
20
|
'<COMMANDS>', // commands (optional)
|
|
21
|
+
[], // scopes (optional)
|
|
21
22
|
'<INSTALLATION_ID>', // installationId (optional)
|
|
22
23
|
'<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional)
|
|
23
24
|
'<PROVIDER_BRANCH>', // providerBranch (optional)
|
|
@@ -26,7 +27,8 @@ const result = await functions.create(
|
|
|
26
27
|
'<TEMPLATE_REPOSITORY>', // templateRepository (optional)
|
|
27
28
|
'<TEMPLATE_OWNER>', // templateOwner (optional)
|
|
28
29
|
'<TEMPLATE_ROOT_DIRECTORY>', // templateRootDirectory (optional)
|
|
29
|
-
'<
|
|
30
|
+
'<TEMPLATE_VERSION>', // templateVersion (optional)
|
|
31
|
+
'' // specification (optional)
|
|
30
32
|
);
|
|
31
33
|
|
|
32
34
|
console.log(result);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Client, Functions } 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 functions = new Functions(client);
|
|
8
|
+
|
|
9
|
+
const result = await functions.deleteExecution(
|
|
10
|
+
'<FUNCTION_ID>', // functionId
|
|
11
|
+
'<EXECUTION_ID>' // executionId
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
console.log(result);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Client,
|
|
1
|
+
import { Client, Functions } 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
|
|
7
|
+
const functions = new Functions(client);
|
|
8
8
|
|
|
9
|
-
const result = await
|
|
10
|
-
|
|
9
|
+
const result = await functions.getTemplate(
|
|
10
|
+
'<TEMPLATE_ID>' // templateId
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
console.log(result);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Client,
|
|
1
|
+
import { Client, Functions } 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
|
|
7
|
+
const functions = new Functions(client);
|
|
8
8
|
|
|
9
|
-
const result = await
|
|
9
|
+
const result = await functions.listSpecifications();
|
|
10
10
|
|
|
11
11
|
console.log(result);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Client, Functions } 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 functions = new Functions(client);
|
|
8
|
+
|
|
9
|
+
const result = await functions.listTemplates(
|
|
10
|
+
[], // runtimes (optional)
|
|
11
|
+
[], // useCases (optional)
|
|
12
|
+
1, // limit (optional)
|
|
13
|
+
0 // offset (optional)
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
console.log(result);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Client, Functions } 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 functions = new Functions(client);
|
|
8
|
+
|
|
9
|
+
const result = await functions.updateDeploymentBuild(
|
|
10
|
+
'<FUNCTION_ID>', // functionId
|
|
11
|
+
'<DEPLOYMENT_ID>' // deploymentId
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
console.log(result);
|
|
@@ -18,11 +18,13 @@ const result = await functions.update(
|
|
|
18
18
|
false, // logging (optional)
|
|
19
19
|
'<ENTRYPOINT>', // entrypoint (optional)
|
|
20
20
|
'<COMMANDS>', // commands (optional)
|
|
21
|
+
[], // scopes (optional)
|
|
21
22
|
'<INSTALLATION_ID>', // installationId (optional)
|
|
22
23
|
'<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional)
|
|
23
24
|
'<PROVIDER_BRANCH>', // providerBranch (optional)
|
|
24
25
|
false, // providerSilentMode (optional)
|
|
25
|
-
'<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional)
|
|
26
|
+
'<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional)
|
|
27
|
+
'' // specification (optional)
|
|
26
28
|
);
|
|
27
29
|
|
|
28
30
|
console.log(result);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Client, Projects } 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 projects = new Projects(client);
|
|
8
|
+
|
|
9
|
+
const result = await projects.createJWT(
|
|
10
|
+
'<PROJECT_ID>', // projectId
|
|
11
|
+
[], // scopes
|
|
12
|
+
0 // duration (optional)
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
console.log(result);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Client, Projects } 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 projects = new Projects(client);
|
|
8
|
+
|
|
9
|
+
const result = await projects.updateMockNumbers(
|
|
10
|
+
'<PROJECT_ID>', // projectId
|
|
11
|
+
[] // numbers
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
console.log(result);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Client, Projects } 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 projects = new Projects(client);
|
|
8
|
+
|
|
9
|
+
const result = await projects.updateSessionAlerts(
|
|
10
|
+
'<PROJECT_ID>', // projectId
|
|
11
|
+
false // alerts
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
console.log(result);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Client, Users } 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 users = new Users(client);
|
|
8
|
+
|
|
9
|
+
const result = await users.createJWT(
|
|
10
|
+
'<USER_ID>', // userId
|
|
11
|
+
'<SESSION_ID>', // sessionId (optional)
|
|
12
|
+
0 // duration (optional)
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
console.log(result);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Client, Vcs } 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 vcs = new Vcs(client);
|
|
8
|
+
|
|
9
|
+
const result = await vcs.getRepositoryContents(
|
|
10
|
+
'<INSTALLATION_ID>', // installationId
|
|
11
|
+
'<PROVIDER_REPOSITORY_ID>', // providerRepositoryId
|
|
12
|
+
'<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional)
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
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.1.0
|
|
5
|
+
"version": "1.1.0",
|
|
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.1.0
|
|
308
|
-
'X-Appwrite-Response-Format': '1.
|
|
307
|
+
'x-sdk-version': '1.1.0',
|
|
308
|
+
'X-Appwrite-Response-Format': '1.6.0',
|
|
309
309
|
};
|
|
310
310
|
|
|
311
311
|
/**
|
package/src/enums/runtime.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
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.6.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';
|
|
12
11
|
export { Assistant } from './services/assistant';
|
|
13
12
|
export { Console } from './services/console';
|
|
14
13
|
export { Databases } from './services/databases';
|
|
@@ -18,7 +17,6 @@ export { Health } from './services/health';
|
|
|
18
17
|
export { Locale } from './services/locale';
|
|
19
18
|
export { Messaging } from './services/messaging';
|
|
20
19
|
export { Migrations } from './services/migrations';
|
|
21
|
-
export { Organizations } from './services/organizations';
|
|
22
20
|
export { Project } from './services/project';
|
|
23
21
|
export { Projects } from './services/projects';
|
|
24
22
|
export { Proxy } from './services/proxy';
|
|
@@ -46,7 +44,6 @@ export { FunctionUsageRange } from './enums/function-usage-range';
|
|
|
46
44
|
export { ExecutionMethod } from './enums/execution-method';
|
|
47
45
|
export { Name } from './enums/name';
|
|
48
46
|
export { SmtpEncryption } from './enums/smtp-encryption';
|
|
49
|
-
export { BillingPlan } from './enums/billing-plan';
|
|
50
47
|
export { ProjectUsageRange } from './enums/project-usage-range';
|
|
51
48
|
export { Region } from './enums/region';
|
|
52
49
|
export { Api } from './enums/api';
|