@appwrite.io/console 1.9.0 → 1.10.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/publish.yml +1 -1
- package/CHANGELOG.md +45 -6
- package/README.md +82 -2
- package/dist/cjs/sdk.js +246 -193
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +246 -193
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +246 -193
- package/docs/examples/databases/create-document.md +1 -3
- package/docs/examples/databases/create-documents.md +1 -1
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/organizations/get-available-credits.md +13 -0
- package/docs/examples/organizations/update-projects.md +14 -0
- package/docs/examples/vcs/get-repository-contents.md +2 -1
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/models.ts +241 -9
- package/src/services/account.ts +97 -36
- package/src/services/avatars.ts +26 -20
- package/src/services/backups.ts +11 -0
- package/src/services/console.ts +8 -1
- package/src/services/databases.ts +97 -33
- package/src/services/domains.ts +111 -69
- package/src/services/functions.ts +37 -8
- package/src/services/graphql.ts +1 -0
- package/src/services/health.ts +26 -1
- package/src/services/locale.ts +9 -2
- package/src/services/messaging.ts +53 -8
- package/src/services/migrations.ts +12 -0
- package/src/services/organizations.ts +106 -16
- package/src/services/project.ts +5 -0
- package/src/services/projects.ts +50 -0
- package/src/services/proxy.ts +7 -0
- package/src/services/sites.ts +32 -4
- package/src/services/storage.ts +23 -9
- package/src/services/teams.ts +30 -17
- package/src/services/tokens.ts +4 -0
- package/src/services/users.ts +69 -27
- package/src/services/vcs.ts +16 -4
- package/types/models.d.ts +228 -192
- package/types/services/account.d.ts +36 -36
- package/types/services/avatars.d.ts +20 -20
- package/types/services/console.d.ts +1 -1
- package/types/services/databases.d.ts +43 -33
- package/types/services/domains.d.ts +69 -69
- package/types/services/functions.d.ts +8 -8
- package/types/services/health.d.ts +1 -1
- package/types/services/locale.d.ts +2 -2
- package/types/services/messaging.d.ts +8 -8
- package/types/services/organizations.d.ts +33 -16
- package/types/services/sites.d.ts +4 -4
- package/types/services/storage.d.ts +9 -9
- package/types/services/teams.d.ts +17 -17
- package/types/services/users.d.ts +27 -27
- package/types/services/vcs.d.ts +4 -4
|
@@ -2,9 +2,7 @@ import { Client, Databases } from "@appwrite.io/console";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.
|
|
6
|
-
.setKey('<YOUR_API_KEY>') // Your secret API key
|
|
7
|
-
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
8
6
|
|
|
9
7
|
const databases = new Databases(client);
|
|
10
8
|
|
|
@@ -2,7 +2,7 @@ import { Client, Databases } from "@appwrite.io/console";
|
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
-
.
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
6
|
|
|
7
7
|
const databases = new Databases(client);
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ const result = await functions.createExecution(
|
|
|
13
13
|
'<PATH>', // path (optional)
|
|
14
14
|
ExecutionMethod.GET, // method (optional)
|
|
15
15
|
{}, // headers (optional)
|
|
16
|
-
'' // scheduledAt (optional)
|
|
16
|
+
'<SCHEDULED_AT>' // scheduledAt (optional)
|
|
17
17
|
);
|
|
18
18
|
|
|
19
19
|
console.log(result);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Client, Organizations } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.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.getAvailableCredits(
|
|
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://<REGION>.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.updateProjects(
|
|
10
|
+
'<ORGANIZATION_ID>', // organizationId
|
|
11
|
+
[] // projects (optional)
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
console.log(result);
|
|
@@ -9,7 +9,8 @@ const vcs = new Vcs(client);
|
|
|
9
9
|
const result = await vcs.getRepositoryContents(
|
|
10
10
|
'<INSTALLATION_ID>', // installationId
|
|
11
11
|
'<PROVIDER_REPOSITORY_ID>', // providerRepositoryId
|
|
12
|
-
'<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional)
|
|
12
|
+
'<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional)
|
|
13
|
+
'<PROVIDER_REFERENCE>' // providerReference (optional)
|
|
13
14
|
);
|
|
14
15
|
|
|
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.
|
|
5
|
+
"version": "1.10.0",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|