@appwrite.io/console 0.2.0 → 0.4.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 +3353 -1497
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +3350 -1498
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +3353 -1497
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-email-session.md +1 -1
- package/docs/examples/account/create-j-w-t.md +1 -1
- package/docs/examples/account/create-magic-u-r-l-session.md +1 -1
- package/docs/examples/account/create-o-auth2session.md +1 -1
- package/docs/examples/account/create-phone-session.md +1 -1
- package/docs/examples/account/create-phone-verification.md +1 -1
- package/docs/examples/account/create-recovery.md +1 -1
- package/docs/examples/account/create-verification.md +1 -1
- package/docs/examples/account/create.md +1 -1
- package/docs/examples/account/{create-with-invite-code.md → delete-identity.md} +2 -2
- package/docs/examples/account/delete-session.md +1 -1
- package/docs/examples/account/delete-sessions.md +1 -1
- package/docs/examples/account/get-prefs.md +1 -1
- package/docs/examples/account/get-session.md +1 -1
- package/docs/examples/account/get.md +1 -1
- package/docs/examples/account/list-identities.md +18 -0
- package/docs/examples/account/list-logs.md +1 -1
- package/docs/examples/account/list-sessions.md +1 -1
- package/docs/examples/account/update-email.md +1 -1
- package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
- package/docs/examples/account/update-name.md +1 -1
- package/docs/examples/account/update-password.md +1 -1
- package/docs/examples/account/update-phone-session.md +1 -1
- package/docs/examples/account/update-phone-verification.md +1 -1
- package/docs/examples/account/update-phone.md +1 -1
- package/docs/examples/account/update-prefs.md +1 -1
- package/docs/examples/account/update-recovery.md +1 -1
- package/docs/examples/account/update-session.md +1 -1
- package/docs/examples/account/update-status.md +1 -1
- package/docs/examples/account/update-verification.md +1 -1
- package/docs/examples/assistant/chat.md +18 -0
- package/docs/examples/avatars/get-browser.md +1 -1
- package/docs/examples/avatars/get-credit-card.md +1 -1
- package/docs/examples/avatars/get-favicon.md +1 -1
- package/docs/examples/avatars/get-flag.md +1 -1
- package/docs/examples/avatars/get-image.md +1 -1
- package/docs/examples/avatars/get-initials.md +1 -1
- package/docs/examples/avatars/get-q-r.md +1 -1
- package/docs/examples/console/variables.md +1 -1
- package/docs/examples/databases/create-boolean-attribute.md +1 -1
- package/docs/examples/databases/create-collection.md +1 -1
- package/docs/examples/databases/create-datetime-attribute.md +1 -1
- package/docs/examples/databases/create-document.md +1 -1
- package/docs/examples/databases/create-email-attribute.md +1 -1
- package/docs/examples/databases/create-enum-attribute.md +1 -1
- package/docs/examples/databases/create-float-attribute.md +1 -1
- package/docs/examples/databases/create-index.md +1 -1
- package/docs/examples/databases/create-integer-attribute.md +1 -1
- package/docs/examples/databases/create-ip-attribute.md +1 -1
- package/docs/examples/databases/create-relationship-attribute.md +1 -1
- package/docs/examples/databases/create-string-attribute.md +1 -1
- package/docs/examples/databases/create-url-attribute.md +1 -1
- package/docs/examples/databases/create.md +1 -1
- package/docs/examples/databases/delete-attribute.md +1 -1
- package/docs/examples/databases/delete-collection.md +1 -1
- package/docs/examples/databases/delete-document.md +1 -1
- package/docs/examples/databases/delete-index.md +1 -1
- package/docs/examples/databases/delete.md +1 -1
- package/docs/examples/databases/get-attribute.md +1 -1
- package/docs/examples/databases/get-collection-usage.md +1 -1
- package/docs/examples/databases/get-collection.md +1 -1
- package/docs/examples/databases/get-database-usage.md +1 -1
- package/docs/examples/databases/get-document.md +1 -1
- package/docs/examples/databases/get-index.md +1 -1
- package/docs/examples/databases/get-usage.md +1 -1
- package/docs/examples/databases/get.md +1 -1
- package/docs/examples/databases/list-attributes.md +1 -1
- package/docs/examples/databases/list-collection-logs.md +1 -1
- package/docs/examples/databases/list-collections.md +1 -1
- package/docs/examples/databases/list-document-logs.md +1 -1
- package/docs/examples/databases/list-documents.md +1 -1
- package/docs/examples/databases/list-indexes.md +1 -1
- package/docs/examples/databases/list-logs.md +1 -1
- package/docs/examples/databases/list.md +1 -1
- package/docs/examples/databases/update-boolean-attribute.md +1 -1
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-datetime-attribute.md +1 -1
- package/docs/examples/databases/update-document.md +1 -1
- package/docs/examples/databases/update-email-attribute.md +1 -1
- package/docs/examples/databases/update-enum-attribute.md +1 -1
- package/docs/examples/databases/update-float-attribute.md +1 -1
- package/docs/examples/databases/update-integer-attribute.md +1 -1
- package/docs/examples/databases/update-ip-attribute.md +1 -1
- package/docs/examples/databases/update-relationship-attribute.md +1 -1
- package/docs/examples/databases/update-string-attribute.md +1 -1
- package/docs/examples/databases/update-url-attribute.md +1 -1
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/functions/create-build.md +1 -1
- package/docs/examples/functions/create-deployment.md +2 -2
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/functions/create-variable.md +1 -1
- package/docs/examples/functions/create.md +2 -2
- package/docs/examples/functions/delete-deployment.md +1 -1
- package/docs/examples/functions/delete-variable.md +1 -1
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/download-deployment.md +14 -0
- package/docs/examples/functions/get-deployment.md +1 -1
- package/docs/examples/functions/get-execution.md +1 -1
- package/docs/examples/functions/get-function-usage.md +1 -1
- package/docs/examples/functions/get-usage.md +1 -1
- package/docs/examples/functions/get-variable.md +1 -1
- package/docs/examples/functions/get.md +1 -1
- package/docs/examples/functions/list-deployments.md +1 -1
- package/docs/examples/functions/list-executions.md +1 -1
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-variables.md +1 -1
- package/docs/examples/functions/list.md +1 -1
- package/docs/examples/functions/update-deployment.md +1 -1
- package/docs/examples/functions/update-variable.md +1 -1
- package/docs/examples/functions/update.md +1 -1
- package/docs/examples/graphql/mutation.md +1 -1
- package/docs/examples/graphql/query.md +1 -1
- package/docs/examples/health/get-antivirus.md +1 -1
- package/docs/examples/health/get-cache.md +1 -1
- package/docs/examples/health/get-d-b.md +1 -1
- package/docs/examples/health/get-pub-sub.md +1 -1
- package/docs/examples/health/get-queue-builds.md +18 -0
- package/docs/examples/health/get-queue-certificates.md +1 -1
- package/docs/examples/health/get-queue-databases.md +18 -0
- package/docs/examples/health/get-queue-deletes.md +18 -0
- package/docs/examples/health/get-queue-functions.md +1 -1
- package/docs/examples/health/get-queue-logs.md +1 -1
- package/docs/examples/health/get-queue-mails.md +18 -0
- package/docs/examples/health/get-queue-messaging.md +18 -0
- package/docs/examples/health/get-queue-migrations.md +18 -0
- package/docs/examples/health/get-queue-webhooks.md +1 -1
- package/docs/examples/health/get-queue.md +1 -1
- package/docs/examples/health/get-storage-local.md +1 -1
- package/docs/examples/health/get-time.md +1 -1
- package/docs/examples/health/get.md +1 -1
- package/docs/examples/locale/get.md +1 -1
- package/docs/examples/locale/list-codes.md +18 -0
- package/docs/examples/locale/list-continents.md +1 -1
- package/docs/examples/locale/list-countries-e-u.md +1 -1
- package/docs/examples/locale/list-countries-phones.md +1 -1
- package/docs/examples/locale/list-countries.md +1 -1
- package/docs/examples/locale/list-currencies.md +1 -1
- package/docs/examples/locale/list-languages.md +1 -1
- package/docs/examples/migrations/create-appwrite-migration.md +18 -0
- package/docs/examples/migrations/create-firebase-migration.md +18 -0
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +18 -0
- package/docs/examples/migrations/create-n-host-migration.md +18 -0
- package/docs/examples/migrations/create-supabase-migration.md +18 -0
- package/docs/examples/migrations/delete-firebase-auth.md +18 -0
- package/docs/examples/migrations/delete.md +18 -0
- package/docs/examples/migrations/get-appwrite-report.md +18 -0
- package/docs/examples/migrations/get-firebase-report-o-auth.md +18 -0
- package/docs/examples/migrations/get-firebase-report.md +18 -0
- package/docs/examples/migrations/get-n-host-report.md +18 -0
- package/docs/examples/migrations/get-supabase-report.md +18 -0
- package/docs/examples/migrations/get.md +18 -0
- package/docs/examples/migrations/list-firebase-projects.md +18 -0
- package/docs/examples/migrations/list.md +18 -0
- package/docs/examples/migrations/retry.md +18 -0
- package/docs/examples/project/create-variable.md +18 -0
- package/docs/examples/project/delete-variable.md +18 -0
- package/docs/examples/project/get-usage.md +2 -2
- package/docs/examples/project/get-variable.md +18 -0
- package/docs/examples/project/list-variables.md +18 -0
- package/docs/examples/project/update-variable.md +18 -0
- package/docs/examples/projects/create-key.md +1 -1
- package/docs/examples/projects/create-platform.md +1 -1
- package/docs/examples/projects/create-webhook.md +1 -1
- package/docs/examples/projects/create.md +2 -2
- package/docs/examples/projects/delete-email-template.md +18 -0
- package/docs/examples/projects/delete-key.md +1 -1
- package/docs/examples/projects/delete-platform.md +1 -1
- package/docs/examples/projects/delete-sms-template.md +18 -0
- package/docs/examples/projects/delete-webhook.md +1 -1
- package/docs/examples/projects/delete.md +2 -2
- package/docs/examples/projects/get-email-template.md +18 -0
- package/docs/examples/projects/get-key.md +1 -1
- package/docs/examples/projects/get-platform.md +1 -1
- package/docs/examples/projects/get-sms-template.md +18 -0
- package/docs/examples/projects/get-webhook.md +1 -1
- package/docs/examples/projects/get.md +1 -1
- package/docs/examples/projects/list-keys.md +1 -1
- package/docs/examples/projects/list-platforms.md +1 -1
- package/docs/examples/projects/list-webhooks.md +1 -1
- package/docs/examples/projects/list.md +1 -1
- package/docs/examples/projects/update-auth-duration.md +1 -1
- package/docs/examples/projects/update-auth-limit.md +1 -1
- package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
- package/docs/examples/projects/update-auth-password-history.md +1 -1
- package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
- package/docs/examples/projects/update-auth-status.md +1 -1
- package/docs/examples/projects/update-email-template.md +18 -0
- package/docs/examples/projects/update-key.md +1 -1
- package/docs/examples/projects/update-o-auth2.md +1 -1
- package/docs/examples/projects/{delete-domain.md → update-personal-data-check.md} +2 -2
- package/docs/examples/projects/update-platform.md +1 -1
- package/docs/examples/projects/{create-domain.md → update-service-status-all.md} +2 -2
- package/docs/examples/projects/update-service-status.md +1 -1
- package/docs/examples/projects/update-sms-template.md +18 -0
- package/docs/examples/projects/{get-domain.md → update-smtp-configuration.md} +2 -2
- package/docs/examples/projects/{list-domains.md → update-team.md} +2 -2
- package/docs/examples/projects/update-webhook-signature.md +1 -1
- package/docs/examples/projects/update-webhook.md +1 -1
- package/docs/examples/projects/update.md +1 -1
- package/docs/examples/proxy/create-rule.md +18 -0
- package/docs/examples/proxy/delete-rule.md +18 -0
- package/docs/examples/proxy/get-rule.md +18 -0
- package/docs/examples/proxy/list-rules.md +18 -0
- package/docs/examples/proxy/update-rule-verification.md +18 -0
- package/docs/examples/storage/create-bucket.md +1 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/storage/delete-bucket.md +1 -1
- package/docs/examples/storage/delete-file.md +1 -1
- package/docs/examples/storage/get-bucket-usage.md +1 -1
- package/docs/examples/storage/get-bucket.md +1 -1
- package/docs/examples/storage/get-file-download.md +1 -1
- package/docs/examples/storage/get-file-preview.md +1 -1
- package/docs/examples/storage/get-file-view.md +1 -1
- package/docs/examples/storage/get-file.md +1 -1
- package/docs/examples/storage/get-usage.md +1 -1
- package/docs/examples/storage/list-buckets.md +1 -1
- package/docs/examples/storage/list-files.md +1 -1
- package/docs/examples/storage/update-bucket.md +1 -1
- package/docs/examples/storage/update-file.md +1 -1
- package/docs/examples/teams/create-membership.md +2 -2
- package/docs/examples/teams/create.md +1 -1
- package/docs/examples/teams/delete-membership.md +1 -1
- package/docs/examples/teams/delete.md +1 -1
- package/docs/examples/teams/get-membership.md +1 -1
- package/docs/examples/teams/get-prefs.md +1 -1
- package/docs/examples/teams/get.md +1 -1
- package/docs/examples/teams/list-logs.md +1 -1
- package/docs/examples/teams/list-memberships.md +1 -1
- package/docs/examples/teams/list.md +1 -1
- package/docs/examples/teams/update-membership-status.md +1 -1
- package/docs/examples/teams/{update-membership-roles.md → update-membership.md} +2 -2
- package/docs/examples/teams/update-name.md +1 -1
- package/docs/examples/teams/update-prefs.md +1 -1
- package/docs/examples/users/create-argon2user.md +1 -1
- package/docs/examples/users/create-bcrypt-user.md +1 -1
- package/docs/examples/users/create-m-d5user.md +1 -1
- package/docs/examples/users/create-p-h-pass-user.md +1 -1
- package/docs/examples/users/create-s-h-a-user.md +1 -1
- package/docs/examples/users/create-scrypt-modified-user.md +1 -1
- package/docs/examples/users/create-scrypt-user.md +1 -1
- package/docs/examples/users/create.md +1 -1
- package/docs/examples/users/delete-identity.md +18 -0
- package/docs/examples/users/delete-session.md +1 -1
- package/docs/examples/users/delete-sessions.md +1 -1
- package/docs/examples/users/delete.md +1 -1
- package/docs/examples/users/get-prefs.md +1 -1
- package/docs/examples/users/get-usage.md +1 -1
- package/docs/examples/users/get.md +1 -1
- package/docs/examples/users/list-identities.md +18 -0
- package/docs/examples/users/list-logs.md +1 -1
- package/docs/examples/users/list-memberships.md +1 -1
- package/docs/examples/users/list-sessions.md +1 -1
- package/docs/examples/users/list.md +1 -1
- package/docs/examples/users/update-email-verification.md +1 -1
- package/docs/examples/users/update-email.md +1 -1
- package/docs/examples/users/update-labels.md +18 -0
- package/docs/examples/users/update-name.md +1 -1
- package/docs/examples/users/update-password.md +1 -1
- package/docs/examples/users/update-phone-verification.md +1 -1
- package/docs/examples/users/update-phone.md +1 -1
- package/docs/examples/users/update-prefs.md +1 -1
- package/docs/examples/users/update-status.md +1 -1
- package/docs/examples/vcs/create-repository-detection.md +18 -0
- package/docs/examples/vcs/create-repository.md +18 -0
- package/docs/examples/vcs/delete-installation.md +18 -0
- package/docs/examples/vcs/get-installation.md +18 -0
- package/docs/examples/vcs/get-repository.md +18 -0
- package/docs/examples/vcs/list-installations.md +18 -0
- package/docs/examples/vcs/list-repositories.md +18 -0
- package/docs/examples/vcs/list-repository-branches.md +18 -0
- package/docs/examples/vcs/update-external-deployments.md +18 -0
- package/package.json +3 -2
- package/src/client.ts +2 -2
- package/src/index.ts +4 -0
- package/src/models.ts +863 -233
- package/src/query.ts +1 -1
- package/src/role.ts +72 -6
- package/src/services/account.ts +1052 -1055
- package/src/services/assistant.ts +38 -0
- package/src/services/avatars.ts +338 -337
- package/src/services/console.ts +16 -16
- package/src/services/databases.ts +2170 -2140
- package/src/services/functions.ts +804 -657
- package/src/services/graphql.ts +47 -47
- package/src/services/health.ts +373 -204
- package/src/services/locale.ts +156 -137
- package/src/services/migrations.ts +707 -0
- package/src/services/project.ts +178 -20
- package/src/services/projects.ts +1511 -1256
- package/src/services/proxy.ts +150 -0
- package/src/services/storage.ts +572 -577
- package/src/services/teams.ts +498 -501
- package/src/services/users.ts +1091 -1001
- package/src/services/vcs.ts +272 -0
- package/types/index.d.ts +4 -0
- package/types/models.d.ts +863 -233
- package/types/role.d.ts +62 -0
- package/types/services/account.d.ts +116 -104
- package/types/services/assistant.d.ts +14 -0
- package/types/services/avatars.d.ts +18 -17
- package/types/services/console.d.ts +2 -2
- package/types/services/databases.d.ts +111 -105
- package/types/services/functions.d.ts +95 -55
- package/types/services/graphql.d.ts +4 -4
- package/types/services/health.d.ts +97 -26
- package/types/services/locale.d.ts +24 -14
- package/types/services/migrations.d.ts +185 -0
- package/types/services/project.d.ts +60 -3
- package/types/services/projects.d.ts +174 -104
- package/types/services/proxy.d.ts +59 -0
- package/types/services/storage.d.ts +29 -28
- package/types/services/teams.d.ts +36 -35
- package/types/services/users.d.ts +105 -66
- package/types/services/vcs.d.ts +97 -0
- package/docs/examples/projects/update-domain-verification.md +0 -18
package/src/services/health.ts
CHANGED
|
@@ -10,230 +10,399 @@ export class Health extends Service {
|
|
|
10
10
|
super(client);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Get HTTP
|
|
15
|
+
*
|
|
16
|
+
* Check the Appwrite HTTP server is up and responsive.
|
|
17
|
+
*
|
|
18
|
+
* @throws {AppwriteException}
|
|
19
|
+
* @returns {Promise}
|
|
20
|
+
*/
|
|
21
|
+
async get(): Promise<Models.HealthStatus> {
|
|
22
|
+
const apiPath = '/health';
|
|
23
|
+
const payload: Payload = {};
|
|
24
|
+
|
|
25
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
26
|
+
return await this.client.call('get', uri, {
|
|
27
|
+
'content-type': 'application/json',
|
|
28
|
+
}, payload);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get antivirus
|
|
33
|
+
*
|
|
34
|
+
* Check the Appwrite Antivirus server is up and connection is successful.
|
|
35
|
+
*
|
|
36
|
+
* @throws {AppwriteException}
|
|
37
|
+
* @returns {Promise}
|
|
38
|
+
*/
|
|
39
|
+
async getAntivirus(): Promise<Models.HealthAntivirus> {
|
|
40
|
+
const apiPath = '/health/anti-virus';
|
|
41
|
+
const payload: Payload = {};
|
|
42
|
+
|
|
43
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
44
|
+
return await this.client.call('get', uri, {
|
|
45
|
+
'content-type': 'application/json',
|
|
46
|
+
}, payload);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Get cache
|
|
51
|
+
*
|
|
52
|
+
* Check the Appwrite in-memory cache servers are up and connection is
|
|
53
|
+
* successful.
|
|
54
|
+
*
|
|
55
|
+
* @throws {AppwriteException}
|
|
56
|
+
* @returns {Promise}
|
|
57
|
+
*/
|
|
58
|
+
async getCache(): Promise<Models.HealthStatus> {
|
|
59
|
+
const apiPath = '/health/cache';
|
|
60
|
+
const payload: Payload = {};
|
|
61
|
+
|
|
62
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
63
|
+
return await this.client.call('get', uri, {
|
|
64
|
+
'content-type': 'application/json',
|
|
65
|
+
}, payload);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Get DB
|
|
70
|
+
*
|
|
71
|
+
* Check the Appwrite database servers are up and connection is successful.
|
|
72
|
+
*
|
|
73
|
+
* @throws {AppwriteException}
|
|
74
|
+
* @returns {Promise}
|
|
75
|
+
*/
|
|
76
|
+
async getDB(): Promise<Models.HealthStatus> {
|
|
77
|
+
const apiPath = '/health/db';
|
|
78
|
+
const payload: Payload = {};
|
|
79
|
+
|
|
80
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
81
|
+
return await this.client.call('get', uri, {
|
|
82
|
+
'content-type': 'application/json',
|
|
83
|
+
}, payload);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Get pubsub
|
|
88
|
+
*
|
|
89
|
+
* Check the Appwrite pub-sub servers are up and connection is successful.
|
|
90
|
+
*
|
|
91
|
+
* @throws {AppwriteException}
|
|
92
|
+
* @returns {Promise}
|
|
93
|
+
*/
|
|
94
|
+
async getPubSub(): Promise<Models.HealthStatus> {
|
|
95
|
+
const apiPath = '/health/pubsub';
|
|
96
|
+
const payload: Payload = {};
|
|
30
97
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
98
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
99
|
+
return await this.client.call('get', uri, {
|
|
100
|
+
'content-type': 'application/json',
|
|
101
|
+
}, payload);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Get queue
|
|
106
|
+
*
|
|
107
|
+
* Check the Appwrite queue messaging servers are up and connection is
|
|
108
|
+
* successful.
|
|
109
|
+
*
|
|
110
|
+
* @throws {AppwriteException}
|
|
111
|
+
* @returns {Promise}
|
|
112
|
+
*/
|
|
113
|
+
async getQueue(): Promise<Models.HealthStatus> {
|
|
114
|
+
const apiPath = '/health/queue';
|
|
115
|
+
const payload: Payload = {};
|
|
116
|
+
|
|
117
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
118
|
+
return await this.client.call('get', uri, {
|
|
119
|
+
'content-type': 'application/json',
|
|
120
|
+
}, payload);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Get builds queue
|
|
125
|
+
*
|
|
126
|
+
* Get the number of builds that are waiting to be processed in the Appwrite
|
|
127
|
+
* internal queue server.
|
|
128
|
+
*
|
|
129
|
+
* @param {number} threshold
|
|
130
|
+
* @throws {AppwriteException}
|
|
131
|
+
* @returns {Promise}
|
|
132
|
+
*/
|
|
133
|
+
async getQueueBuilds(threshold?: number): Promise<Models.HealthQueue> {
|
|
134
|
+
const apiPath = '/health/queue/builds';
|
|
135
|
+
const payload: Payload = {};
|
|
136
|
+
|
|
137
|
+
if (typeof threshold !== 'undefined') {
|
|
138
|
+
payload['threshold'] = threshold;
|
|
47
139
|
}
|
|
48
140
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
141
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
142
|
+
return await this.client.call('get', uri, {
|
|
143
|
+
'content-type': 'application/json',
|
|
144
|
+
}, payload);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Get certificates queue
|
|
149
|
+
*
|
|
150
|
+
* Get the number of certificates that are waiting to be issued against
|
|
151
|
+
* [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
|
|
152
|
+
* server.
|
|
153
|
+
*
|
|
154
|
+
* @param {number} threshold
|
|
155
|
+
* @throws {AppwriteException}
|
|
156
|
+
* @returns {Promise}
|
|
157
|
+
*/
|
|
158
|
+
async getQueueCertificates(threshold?: number): Promise<Models.HealthQueue> {
|
|
159
|
+
const apiPath = '/health/queue/certificates';
|
|
160
|
+
const payload: Payload = {};
|
|
161
|
+
|
|
162
|
+
if (typeof threshold !== 'undefined') {
|
|
163
|
+
payload['threshold'] = threshold;
|
|
66
164
|
}
|
|
67
165
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
166
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
167
|
+
return await this.client.call('get', uri, {
|
|
168
|
+
'content-type': 'application/json',
|
|
169
|
+
}, payload);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Get databases queue
|
|
174
|
+
*
|
|
175
|
+
* Get the number of database changes that are waiting to be processed in the
|
|
176
|
+
* Appwrite internal queue server.
|
|
177
|
+
*
|
|
178
|
+
* @param {string} name
|
|
179
|
+
* @param {number} threshold
|
|
180
|
+
* @throws {AppwriteException}
|
|
181
|
+
* @returns {Promise}
|
|
182
|
+
*/
|
|
183
|
+
async getQueueDatabases(name?: string, threshold?: number): Promise<Models.HealthQueue> {
|
|
184
|
+
const apiPath = '/health/queue/databases';
|
|
185
|
+
const payload: Payload = {};
|
|
186
|
+
|
|
187
|
+
if (typeof name !== 'undefined') {
|
|
188
|
+
payload['name'] = name;
|
|
84
189
|
}
|
|
85
190
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*
|
|
89
|
-
* Check the Appwrite pub-sub servers are up and connection is successful.
|
|
90
|
-
*
|
|
91
|
-
* @throws {AppwriteException}
|
|
92
|
-
* @returns {Promise}
|
|
93
|
-
*/
|
|
94
|
-
async getPubSub(): Promise<Models.HealthStatus> {
|
|
95
|
-
let path = '/health/pubsub';
|
|
96
|
-
let payload: Payload = {};
|
|
97
|
-
|
|
98
|
-
const uri = new URL(this.client.config.endpoint + path);
|
|
99
|
-
return await this.client.call('get', uri, {
|
|
100
|
-
'content-type': 'application/json',
|
|
101
|
-
}, payload);
|
|
191
|
+
if (typeof threshold !== 'undefined') {
|
|
192
|
+
payload['threshold'] = threshold;
|
|
102
193
|
}
|
|
103
194
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
195
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
196
|
+
return await this.client.call('get', uri, {
|
|
197
|
+
'content-type': 'application/json',
|
|
198
|
+
}, payload);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Get deletes queue
|
|
203
|
+
*
|
|
204
|
+
* Get the number of background destructive changes that are waiting to be
|
|
205
|
+
* processed in the Appwrite internal queue server.
|
|
206
|
+
*
|
|
207
|
+
* @param {number} threshold
|
|
208
|
+
* @throws {AppwriteException}
|
|
209
|
+
* @returns {Promise}
|
|
210
|
+
*/
|
|
211
|
+
async getQueueDeletes(threshold?: number): Promise<Models.HealthQueue> {
|
|
212
|
+
const apiPath = '/health/queue/deletes';
|
|
213
|
+
const payload: Payload = {};
|
|
214
|
+
|
|
215
|
+
if (typeof threshold !== 'undefined') {
|
|
216
|
+
payload['threshold'] = threshold;
|
|
121
217
|
}
|
|
122
218
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
219
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
220
|
+
return await this.client.call('get', uri, {
|
|
221
|
+
'content-type': 'application/json',
|
|
222
|
+
}, payload);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Get functions queue
|
|
227
|
+
*
|
|
228
|
+
*
|
|
229
|
+
* @param {number} threshold
|
|
230
|
+
* @throws {AppwriteException}
|
|
231
|
+
* @returns {Promise}
|
|
232
|
+
*/
|
|
233
|
+
async getQueueFunctions(threshold?: number): Promise<Models.HealthQueue> {
|
|
234
|
+
const apiPath = '/health/queue/functions';
|
|
235
|
+
const payload: Payload = {};
|
|
236
|
+
|
|
237
|
+
if (typeof threshold !== 'undefined') {
|
|
238
|
+
payload['threshold'] = threshold;
|
|
141
239
|
}
|
|
142
240
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
241
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
242
|
+
return await this.client.call('get', uri, {
|
|
243
|
+
'content-type': 'application/json',
|
|
244
|
+
}, payload);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Get logs queue
|
|
249
|
+
*
|
|
250
|
+
* Get the number of logs that are waiting to be processed in the Appwrite
|
|
251
|
+
* internal queue server.
|
|
252
|
+
*
|
|
253
|
+
* @param {number} threshold
|
|
254
|
+
* @throws {AppwriteException}
|
|
255
|
+
* @returns {Promise}
|
|
256
|
+
*/
|
|
257
|
+
async getQueueLogs(threshold?: number): Promise<Models.HealthQueue> {
|
|
258
|
+
const apiPath = '/health/queue/logs';
|
|
259
|
+
const payload: Payload = {};
|
|
260
|
+
|
|
261
|
+
if (typeof threshold !== 'undefined') {
|
|
262
|
+
payload['threshold'] = threshold;
|
|
158
263
|
}
|
|
159
264
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
265
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
266
|
+
return await this.client.call('get', uri, {
|
|
267
|
+
'content-type': 'application/json',
|
|
268
|
+
}, payload);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Get mails queue
|
|
273
|
+
*
|
|
274
|
+
* Get the number of mails that are waiting to be processed in the Appwrite
|
|
275
|
+
* internal queue server.
|
|
276
|
+
*
|
|
277
|
+
* @param {number} threshold
|
|
278
|
+
* @throws {AppwriteException}
|
|
279
|
+
* @returns {Promise}
|
|
280
|
+
*/
|
|
281
|
+
async getQueueMails(threshold?: number): Promise<Models.HealthQueue> {
|
|
282
|
+
const apiPath = '/health/queue/mails';
|
|
283
|
+
const payload: Payload = {};
|
|
284
|
+
|
|
285
|
+
if (typeof threshold !== 'undefined') {
|
|
286
|
+
payload['threshold'] = threshold;
|
|
177
287
|
}
|
|
178
288
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
289
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
290
|
+
return await this.client.call('get', uri, {
|
|
291
|
+
'content-type': 'application/json',
|
|
292
|
+
}, payload);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Get messaging queue
|
|
297
|
+
*
|
|
298
|
+
* Get the number of messages that are waiting to be processed in the Appwrite
|
|
299
|
+
* internal queue server.
|
|
300
|
+
*
|
|
301
|
+
* @param {number} threshold
|
|
302
|
+
* @throws {AppwriteException}
|
|
303
|
+
* @returns {Promise}
|
|
304
|
+
*/
|
|
305
|
+
async getQueueMessaging(threshold?: number): Promise<Models.HealthQueue> {
|
|
306
|
+
const apiPath = '/health/queue/messaging';
|
|
307
|
+
const payload: Payload = {};
|
|
308
|
+
|
|
309
|
+
if (typeof threshold !== 'undefined') {
|
|
310
|
+
payload['threshold'] = threshold;
|
|
196
311
|
}
|
|
197
312
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
313
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
314
|
+
return await this.client.call('get', uri, {
|
|
315
|
+
'content-type': 'application/json',
|
|
316
|
+
}, payload);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Get migrations queue
|
|
321
|
+
*
|
|
322
|
+
* Get the number of migrations that are waiting to be processed in the
|
|
323
|
+
* Appwrite internal queue server.
|
|
324
|
+
*
|
|
325
|
+
* @param {number} threshold
|
|
326
|
+
* @throws {AppwriteException}
|
|
327
|
+
* @returns {Promise}
|
|
328
|
+
*/
|
|
329
|
+
async getQueueMigrations(threshold?: number): Promise<Models.HealthQueue> {
|
|
330
|
+
const apiPath = '/health/queue/migrations';
|
|
331
|
+
const payload: Payload = {};
|
|
332
|
+
|
|
333
|
+
if (typeof threshold !== 'undefined') {
|
|
334
|
+
payload['threshold'] = threshold;
|
|
214
335
|
}
|
|
215
336
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
337
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
338
|
+
return await this.client.call('get', uri, {
|
|
339
|
+
'content-type': 'application/json',
|
|
340
|
+
}, payload);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Get webhooks queue
|
|
345
|
+
*
|
|
346
|
+
* Get the number of webhooks that are waiting to be processed in the Appwrite
|
|
347
|
+
* internal queue server.
|
|
348
|
+
*
|
|
349
|
+
* @param {number} threshold
|
|
350
|
+
* @throws {AppwriteException}
|
|
351
|
+
* @returns {Promise}
|
|
352
|
+
*/
|
|
353
|
+
async getQueueWebhooks(threshold?: number): Promise<Models.HealthQueue> {
|
|
354
|
+
const apiPath = '/health/queue/webhooks';
|
|
355
|
+
const payload: Payload = {};
|
|
356
|
+
|
|
357
|
+
if (typeof threshold !== 'undefined') {
|
|
358
|
+
payload['threshold'] = threshold;
|
|
238
359
|
}
|
|
360
|
+
|
|
361
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
362
|
+
return await this.client.call('get', uri, {
|
|
363
|
+
'content-type': 'application/json',
|
|
364
|
+
}, payload);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Get local storage
|
|
369
|
+
*
|
|
370
|
+
* Check the Appwrite local storage device is up and connection is successful.
|
|
371
|
+
*
|
|
372
|
+
* @throws {AppwriteException}
|
|
373
|
+
* @returns {Promise}
|
|
374
|
+
*/
|
|
375
|
+
async getStorageLocal(): Promise<Models.HealthStatus> {
|
|
376
|
+
const apiPath = '/health/storage/local';
|
|
377
|
+
const payload: Payload = {};
|
|
378
|
+
|
|
379
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
380
|
+
return await this.client.call('get', uri, {
|
|
381
|
+
'content-type': 'application/json',
|
|
382
|
+
}, payload);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Get time
|
|
387
|
+
*
|
|
388
|
+
* Check the Appwrite server time is synced with Google remote NTP server. We
|
|
389
|
+
* use this technology to smoothly handle leap seconds with no disruptive
|
|
390
|
+
* events. The [Network Time
|
|
391
|
+
* Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is
|
|
392
|
+
* used by hundreds of millions of computers and devices to synchronize their
|
|
393
|
+
* clocks over the Internet. If your computer sets its own clock, it likely
|
|
394
|
+
* uses NTP.
|
|
395
|
+
*
|
|
396
|
+
* @throws {AppwriteException}
|
|
397
|
+
* @returns {Promise}
|
|
398
|
+
*/
|
|
399
|
+
async getTime(): Promise<Models.HealthTime> {
|
|
400
|
+
const apiPath = '/health/time';
|
|
401
|
+
const payload: Payload = {};
|
|
402
|
+
|
|
403
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
404
|
+
return await this.client.call('get', uri, {
|
|
405
|
+
'content-type': 'application/json',
|
|
406
|
+
}, payload);
|
|
407
|
+
}
|
|
239
408
|
};
|