node-appwrite 12.0.0-rc.4 → 12.0.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/.travis.yml +2 -2
- package/README.md +4 -4
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-email-password-session.md +1 -1
- package/docs/examples/account/create-email-token.md +2 -2
- package/docs/examples/account/create-j-w-t.md +1 -1
- package/docs/examples/account/create-magic-u-r-l-token.md +2 -2
- package/docs/examples/account/{add-authenticator.md → create-mfa-authenticator.md} +1 -1
- package/docs/examples/account/{create2f-a-challenge.md → create-mfa-challenge.md} +2 -2
- package/docs/examples/account/create-mfa-recovery-codes.md +10 -0
- package/docs/examples/account/{create-o-auth2session.md → create-o-auth2token.md} +1 -2
- package/docs/examples/account/create-phone-token.md +2 -2
- package/docs/examples/account/create-phone-verification.md +1 -1
- package/docs/examples/account/create-recovery.md +1 -1
- package/docs/examples/account/create-session.md +3 -3
- package/docs/examples/account/create-verification.md +1 -1
- package/docs/examples/account/create.md +3 -3
- package/docs/examples/account/delete-identity.md +2 -2
- package/docs/examples/account/{verify-authenticator.md → delete-mfa-authenticator.md} +2 -2
- package/docs/examples/account/delete-session.md +2 -2
- package/docs/examples/account/delete-sessions.md +1 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +10 -0
- package/docs/examples/account/get-prefs.md +1 -1
- package/docs/examples/account/get-session.md +2 -2
- package/docs/examples/account/get.md +1 -1
- package/docs/examples/account/list-identities.md +1 -1
- package/docs/examples/account/list-logs.md +1 -1
- package/docs/examples/account/{list-factors.md → list-mfa-factors.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-m-f-a.md +1 -1
- package/docs/examples/account/update-magic-u-r-l-session.md +3 -3
- package/docs/examples/account/{delete-authenticator.md → update-mfa-authenticator.md} +2 -2
- package/docs/examples/account/{update-challenge.md → update-mfa-challenge.md} +3 -3
- package/docs/examples/account/update-mfa-recovery-codes.md +10 -0
- package/docs/examples/account/update-name.md +2 -2
- package/docs/examples/account/update-password.md +1 -1
- package/docs/examples/account/update-phone-session.md +12 -0
- package/docs/examples/account/update-phone-verification.md +3 -3
- 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 +3 -3
- package/docs/examples/account/update-session.md +2 -2
- package/docs/examples/account/update-status.md +1 -1
- package/docs/examples/account/update-verification.md +3 -3
- 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 +2 -2
- package/docs/examples/avatars/get-q-r.md +2 -2
- package/docs/examples/databases/create-boolean-attribute.md +3 -3
- package/docs/examples/databases/create-collection.md +4 -4
- package/docs/examples/databases/create-datetime-attribute.md +3 -3
- package/docs/examples/databases/create-document.md +4 -4
- package/docs/examples/databases/create-email-attribute.md +3 -3
- package/docs/examples/databases/create-enum-attribute.md +4 -4
- package/docs/examples/databases/create-float-attribute.md +3 -3
- package/docs/examples/databases/create-index.md +3 -3
- package/docs/examples/databases/create-integer-attribute.md +3 -3
- package/docs/examples/databases/create-ip-attribute.md +3 -3
- package/docs/examples/databases/create-relationship-attribute.md +4 -4
- package/docs/examples/databases/create-string-attribute.md +4 -4
- package/docs/examples/databases/create-url-attribute.md +3 -3
- package/docs/examples/databases/create.md +3 -3
- package/docs/examples/databases/delete-attribute.md +3 -3
- package/docs/examples/databases/delete-collection.md +3 -3
- package/docs/examples/databases/delete-document.md +4 -4
- package/docs/examples/databases/delete-index.md +3 -3
- package/docs/examples/databases/delete.md +2 -2
- package/docs/examples/databases/get-attribute.md +3 -3
- package/docs/examples/databases/get-collection.md +3 -3
- package/docs/examples/databases/get-document.md +4 -4
- package/docs/examples/databases/get-index.md +3 -3
- package/docs/examples/databases/get.md +2 -2
- package/docs/examples/databases/list-attributes.md +3 -3
- package/docs/examples/databases/list-collections.md +3 -3
- package/docs/examples/databases/list-documents.md +3 -3
- package/docs/examples/databases/list-indexes.md +3 -3
- package/docs/examples/databases/list.md +2 -2
- package/docs/examples/databases/update-boolean-attribute.md +3 -3
- package/docs/examples/databases/update-collection.md +4 -4
- package/docs/examples/databases/update-datetime-attribute.md +3 -3
- package/docs/examples/databases/update-document.md +4 -4
- package/docs/examples/databases/update-email-attribute.md +3 -3
- package/docs/examples/databases/update-enum-attribute.md +4 -4
- package/docs/examples/databases/update-float-attribute.md +3 -3
- package/docs/examples/databases/update-integer-attribute.md +3 -3
- package/docs/examples/databases/update-ip-attribute.md +3 -3
- package/docs/examples/databases/update-relationship-attribute.md +3 -3
- package/docs/examples/databases/update-string-attribute.md +4 -4
- package/docs/examples/databases/update-url-attribute.md +3 -3
- package/docs/examples/databases/update.md +3 -3
- package/docs/examples/functions/create-build.md +4 -4
- package/docs/examples/functions/create-deployment.md +4 -4
- package/docs/examples/functions/create-execution.md +4 -4
- package/docs/examples/functions/create-variable.md +4 -4
- package/docs/examples/functions/create.md +13 -13
- package/docs/examples/functions/delete-deployment.md +3 -3
- package/docs/examples/functions/delete-variable.md +3 -3
- package/docs/examples/functions/delete.md +2 -2
- package/docs/examples/functions/download-deployment.md +3 -3
- package/docs/examples/functions/get-deployment.md +3 -3
- package/docs/examples/functions/get-execution.md +3 -3
- package/docs/examples/functions/get-variable.md +3 -3
- package/docs/examples/functions/get.md +2 -2
- package/docs/examples/functions/list-deployments.md +3 -3
- package/docs/examples/functions/list-executions.md +3 -3
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-variables.md +2 -2
- package/docs/examples/functions/list.md +2 -2
- package/docs/examples/functions/update-deployment.md +3 -3
- package/docs/examples/functions/update-variable.md +5 -5
- package/docs/examples/functions/update.md +9 -9
- 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-certificate.md +1 -1
- package/docs/examples/health/get-d-b.md +1 -1
- package/docs/examples/health/get-failed-jobs.md +1 -1
- package/docs/examples/health/get-pub-sub.md +1 -1
- package/docs/examples/health/get-queue-builds.md +1 -1
- package/docs/examples/health/get-queue-certificates.md +1 -1
- package/docs/examples/health/get-queue-databases.md +2 -2
- package/docs/examples/health/get-queue-deletes.md +1 -1
- 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 +1 -1
- package/docs/examples/health/get-queue-messaging.md +1 -1
- package/docs/examples/health/get-queue-migrations.md +1 -1
- package/docs/examples/health/get-queue-usage-dump.md +12 -0
- package/docs/examples/health/get-queue-usage.md +12 -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-storage.md +10 -0
- 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 +1 -1
- 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/messaging/create-apns-provider.md +8 -7
- package/docs/examples/messaging/create-email.md +5 -5
- package/docs/examples/messaging/create-fcm-provider.md +3 -3
- package/docs/examples/messaging/create-mailgun-provider.md +7 -7
- package/docs/examples/messaging/create-msg91provider.md +5 -5
- package/docs/examples/messaging/create-push.md +11 -11
- package/docs/examples/messaging/create-sendgrid-provider.md +6 -6
- package/docs/examples/messaging/create-sms.md +4 -4
- package/docs/examples/messaging/create-smtp-provider.md +10 -10
- package/docs/examples/messaging/create-subscriber.md +4 -4
- package/docs/examples/messaging/create-telesign-provider.md +5 -5
- package/docs/examples/messaging/create-textmagic-provider.md +5 -5
- package/docs/examples/messaging/create-topic.md +3 -3
- package/docs/examples/messaging/create-twilio-provider.md +5 -5
- package/docs/examples/messaging/create-vonage-provider.md +5 -5
- package/docs/examples/messaging/delete-provider.md +2 -2
- package/docs/examples/messaging/delete-subscriber.md +3 -3
- package/docs/examples/messaging/delete-topic.md +2 -2
- package/docs/examples/messaging/delete.md +2 -2
- package/docs/examples/messaging/get-message.md +2 -2
- package/docs/examples/messaging/get-provider.md +2 -2
- package/docs/examples/messaging/get-subscriber.md +3 -3
- package/docs/examples/messaging/get-topic.md +2 -2
- package/docs/examples/messaging/list-message-logs.md +2 -2
- package/docs/examples/messaging/list-messages.md +2 -2
- package/docs/examples/messaging/list-provider-logs.md +2 -2
- package/docs/examples/messaging/list-providers.md +2 -2
- package/docs/examples/messaging/list-subscriber-logs.md +2 -2
- package/docs/examples/messaging/list-subscribers.md +3 -3
- package/docs/examples/messaging/list-targets.md +2 -2
- package/docs/examples/messaging/list-topic-logs.md +2 -2
- package/docs/examples/messaging/list-topics.md +2 -2
- package/docs/examples/messaging/{update-a-p-n-s-provider.md → update-apns-provider.md} +8 -7
- package/docs/examples/messaging/update-email.md +5 -5
- package/docs/examples/messaging/{update-f-c-m-provider.md → update-fcm-provider.md} +3 -3
- package/docs/examples/messaging/update-mailgun-provider.md +8 -8
- package/docs/examples/messaging/update-msg91provider.md +6 -6
- package/docs/examples/messaging/update-push.md +10 -10
- package/docs/examples/messaging/update-sendgrid-provider.md +7 -7
- package/docs/examples/messaging/update-sms.md +4 -4
- package/docs/examples/messaging/update-smtp-provider.md +11 -11
- package/docs/examples/messaging/update-telesign-provider.md +6 -6
- package/docs/examples/messaging/update-textmagic-provider.md +6 -6
- package/docs/examples/messaging/update-topic.md +4 -3
- package/docs/examples/messaging/update-twilio-provider.md +6 -6
- package/docs/examples/messaging/update-vonage-provider.md +6 -6
- package/docs/examples/storage/create-bucket.md +3 -3
- package/docs/examples/storage/create-file.md +3 -3
- package/docs/examples/storage/delete-bucket.md +2 -2
- package/docs/examples/storage/delete-file.md +3 -3
- package/docs/examples/storage/get-bucket.md +2 -2
- package/docs/examples/storage/get-file-download.md +3 -3
- package/docs/examples/storage/get-file-preview.md +3 -3
- package/docs/examples/storage/get-file-view.md +3 -3
- package/docs/examples/storage/get-file.md +3 -3
- package/docs/examples/storage/list-buckets.md +2 -2
- package/docs/examples/storage/list-files.md +3 -3
- package/docs/examples/storage/update-bucket.md +3 -3
- package/docs/examples/storage/update-file.md +4 -4
- package/docs/examples/teams/create-membership.md +4 -4
- package/docs/examples/teams/create.md +3 -3
- package/docs/examples/teams/delete-membership.md +3 -3
- package/docs/examples/teams/delete.md +2 -2
- package/docs/examples/teams/get-membership.md +3 -3
- package/docs/examples/teams/get-prefs.md +2 -2
- package/docs/examples/teams/get.md +2 -2
- package/docs/examples/teams/list-memberships.md +3 -3
- package/docs/examples/teams/list.md +2 -2
- package/docs/examples/teams/update-membership-status.md +5 -5
- package/docs/examples/teams/update-membership.md +3 -3
- package/docs/examples/teams/update-name.md +3 -3
- package/docs/examples/teams/update-prefs.md +2 -2
- package/docs/examples/users/create-argon2user.md +3 -3
- package/docs/examples/users/create-bcrypt-user.md +3 -3
- package/docs/examples/users/create-m-d5user.md +3 -3
- package/docs/examples/users/{delete-authenticator.md → create-mfa-recovery-codes.md} +2 -4
- package/docs/examples/users/create-p-h-pass-user.md +3 -3
- package/docs/examples/users/create-s-h-a-user.md +3 -3
- package/docs/examples/users/create-scrypt-modified-user.md +6 -6
- package/docs/examples/users/create-scrypt-user.md +4 -4
- package/docs/examples/users/create-session.md +2 -2
- package/docs/examples/users/create-target.md +6 -6
- package/docs/examples/users/create-token.md +2 -2
- package/docs/examples/users/create.md +3 -3
- package/docs/examples/users/delete-identity.md +2 -2
- package/docs/examples/users/delete-mfa-authenticator.md +13 -0
- package/docs/examples/users/delete-session.md +3 -3
- package/docs/examples/users/delete-sessions.md +2 -2
- package/docs/examples/users/delete-target.md +3 -3
- package/docs/examples/users/delete.md +2 -2
- package/docs/examples/users/get-mfa-recovery-codes.md +12 -0
- package/docs/examples/users/get-prefs.md +2 -2
- package/docs/examples/users/get-target.md +3 -3
- package/docs/examples/users/get.md +2 -2
- package/docs/examples/users/list-identities.md +2 -2
- package/docs/examples/users/list-logs.md +2 -2
- package/docs/examples/users/list-memberships.md +2 -2
- package/docs/examples/users/{list-factors.md → list-mfa-factors.md} +2 -2
- package/docs/examples/users/list-sessions.md +2 -2
- package/docs/examples/users/list-targets.md +2 -2
- package/docs/examples/users/list.md +2 -2
- package/docs/examples/users/update-email-verification.md +2 -2
- package/docs/examples/users/update-email.md +2 -2
- package/docs/examples/users/update-labels.md +2 -2
- package/docs/examples/users/update-mfa-recovery-codes.md +12 -0
- package/docs/examples/users/update-mfa.md +2 -2
- package/docs/examples/users/update-name.md +3 -3
- package/docs/examples/users/update-password.md +2 -2
- package/docs/examples/users/update-phone-verification.md +2 -2
- package/docs/examples/users/update-phone.md +2 -2
- package/docs/examples/users/update-prefs.md +2 -2
- package/docs/examples/users/update-status.md +2 -2
- package/docs/examples/users/update-target.md +6 -6
- package/index.d.ts +307 -112
- package/index.js +4 -6
- package/lib/client.js +7 -22
- package/lib/enums/authentication-factor.js +3 -2
- package/lib/enums/flag.js +1 -1
- package/lib/enums/index-type.js +1 -2
- package/lib/enums/name.js +1 -0
- package/lib/enums/runtime.js +8 -0
- package/lib/enums/smtp-encryption.js +7 -0
- package/lib/services/account.js +206 -89
- package/lib/services/databases.js +28 -0
- package/lib/services/health.js +66 -0
- package/lib/services/messaging.js +65 -45
- package/lib/services/users.js +96 -14
- package/package.json +1 -1
- package/lib/enums/encryption.js +0 -7
- package/lib/enums/message-status.js +0 -7
|
@@ -7,7 +7,7 @@ const client = new sdk.Client()
|
|
|
7
7
|
|
|
8
8
|
const users = new sdk.Users(client);
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
'
|
|
12
|
-
'
|
|
10
|
+
const result = await users.deleteSession(
|
|
11
|
+
'<USER_ID>', // userId
|
|
12
|
+
'<SESSION_ID>' // sessionId
|
|
13
13
|
);
|
|
@@ -7,7 +7,7 @@ const client = new sdk.Client()
|
|
|
7
7
|
|
|
8
8
|
const users = new sdk.Users(client);
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
'
|
|
12
|
-
'
|
|
10
|
+
const result = await users.deleteTarget(
|
|
11
|
+
'<USER_ID>', // userId
|
|
12
|
+
'<TARGET_ID>' // targetId
|
|
13
13
|
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const sdk = require('node-appwrite');
|
|
2
|
+
|
|
3
|
+
const client = new sdk.Client()
|
|
4
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
6
|
+
.setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key
|
|
7
|
+
|
|
8
|
+
const users = new sdk.Users(client);
|
|
9
|
+
|
|
10
|
+
const result = await users.getMfaRecoveryCodes(
|
|
11
|
+
'<USER_ID>' // userId
|
|
12
|
+
);
|
|
@@ -7,7 +7,7 @@ const client = new sdk.Client()
|
|
|
7
7
|
|
|
8
8
|
const users = new sdk.Users(client);
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
'
|
|
12
|
-
'
|
|
10
|
+
const result = await users.getTarget(
|
|
11
|
+
'<USER_ID>', // userId
|
|
12
|
+
'<TARGET_ID>' // targetId
|
|
13
13
|
);
|
|
@@ -7,7 +7,7 @@ const client = new sdk.Client()
|
|
|
7
7
|
|
|
8
8
|
const users = new sdk.Users(client);
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const result = await users.listIdentities(
|
|
11
11
|
[], // queries (optional)
|
|
12
|
-
'
|
|
12
|
+
'<SEARCH>' // search (optional)
|
|
13
13
|
);
|
|
@@ -7,7 +7,7 @@ const client = new sdk.Client()
|
|
|
7
7
|
|
|
8
8
|
const users = new sdk.Users(client);
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
'
|
|
10
|
+
const result = await users.updateEmailVerification(
|
|
11
|
+
'<USER_ID>', // userId
|
|
12
12
|
false // emailVerification
|
|
13
13
|
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const sdk = require('node-appwrite');
|
|
2
|
+
|
|
3
|
+
const client = new sdk.Client()
|
|
4
|
+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
6
|
+
.setKey('919c2d18fb5d4...a2ae413da83346ad2'); // Your secret API key
|
|
7
|
+
|
|
8
|
+
const users = new sdk.Users(client);
|
|
9
|
+
|
|
10
|
+
const result = await users.updateMfaRecoveryCodes(
|
|
11
|
+
'<USER_ID>' // userId
|
|
12
|
+
);
|
|
@@ -7,7 +7,7 @@ const client = new sdk.Client()
|
|
|
7
7
|
|
|
8
8
|
const users = new sdk.Users(client);
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
'
|
|
10
|
+
const result = await users.updatePhoneVerification(
|
|
11
|
+
'<USER_ID>', // userId
|
|
12
12
|
false // phoneVerification
|
|
13
13
|
);
|
|
@@ -7,10 +7,10 @@ const client = new sdk.Client()
|
|
|
7
7
|
|
|
8
8
|
const users = new sdk.Users(client);
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
10
|
+
const result = await users.updateTarget(
|
|
11
|
+
'<USER_ID>', // userId
|
|
12
|
+
'<TARGET_ID>', // targetId
|
|
13
|
+
'<IDENTIFIER>', // identifier (optional)
|
|
14
|
+
'<PROVIDER_ID>', // providerId (optional)
|
|
15
|
+
'<NAME>' // name (optional)
|
|
16
16
|
);
|