appwrite-cli 4.2.1 → 5.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/.github/workflows/npm-publish.yml +1 -1
- package/README.md +6 -9
- package/docs/examples/account/{create-email-session.md → create-email-password-session.md} +1 -1
- package/docs/examples/account/create-email-token.md +4 -0
- package/docs/examples/account/create-magic-u-r-l-token.md +5 -0
- package/docs/examples/account/create-mfa-authenticator.md +2 -0
- package/docs/examples/account/create-mfa-challenge.md +2 -0
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/create-o-auth2token.md +5 -0
- package/docs/examples/account/create-phone-token.md +3 -0
- package/docs/examples/account/create-push-target.md +4 -0
- package/docs/examples/account/create-session.md +3 -0
- package/docs/examples/account/create.md +1 -1
- package/docs/examples/account/delete-identity.md +1 -1
- package/docs/examples/account/delete-mfa-authenticator.md +3 -0
- package/docs/examples/account/delete-push-target.md +2 -0
- package/docs/examples/account/delete-session.md +1 -1
- package/docs/examples/account/delete.md +1 -0
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/get-session.md +1 -1
- package/docs/examples/account/list-mfa-factors.md +1 -0
- package/docs/examples/account/update-m-f-a.md +2 -0
- package/docs/examples/account/update-magic-u-r-l-session.md +2 -2
- package/docs/examples/account/update-mfa-authenticator.md +3 -0
- package/docs/examples/account/update-mfa-challenge.md +3 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/update-name.md +1 -1
- package/docs/examples/account/update-phone-session.md +2 -2
- package/docs/examples/account/update-phone-verification.md +2 -2
- package/docs/examples/account/update-push-target.md +3 -0
- package/docs/examples/account/update-recovery.md +3 -4
- package/docs/examples/account/update-session.md +1 -1
- package/docs/examples/account/update-verification.md +2 -2
- package/docs/examples/assistant/chat.md +1 -1
- package/docs/examples/avatars/get-q-r.md +1 -1
- package/docs/examples/databases/create-boolean-attribute.md +2 -2
- package/docs/examples/databases/create-collection.md +3 -3
- package/docs/examples/databases/create-datetime-attribute.md +2 -2
- package/docs/examples/databases/create-document.md +3 -3
- package/docs/examples/databases/create-email-attribute.md +2 -2
- package/docs/examples/databases/create-enum-attribute.md +2 -2
- package/docs/examples/databases/create-float-attribute.md +2 -2
- package/docs/examples/databases/create-index.md +2 -2
- package/docs/examples/databases/create-integer-attribute.md +2 -2
- package/docs/examples/databases/create-ip-attribute.md +2 -2
- package/docs/examples/databases/create-relationship-attribute.md +3 -3
- package/docs/examples/databases/create-string-attribute.md +2 -2
- package/docs/examples/databases/create-url-attribute.md +2 -2
- package/docs/examples/databases/create.md +2 -2
- package/docs/examples/databases/delete-attribute.md +2 -2
- package/docs/examples/databases/delete-collection.md +2 -2
- package/docs/examples/databases/delete-document.md +3 -3
- package/docs/examples/databases/delete-index.md +2 -2
- package/docs/examples/databases/delete.md +1 -1
- package/docs/examples/databases/get-attribute.md +2 -2
- package/docs/examples/databases/get-collection-usage.md +2 -2
- package/docs/examples/databases/get-collection.md +2 -2
- package/docs/examples/databases/get-database-usage.md +1 -1
- package/docs/examples/databases/get-document.md +3 -3
- package/docs/examples/databases/get-index.md +2 -2
- package/docs/examples/databases/get.md +1 -1
- package/docs/examples/databases/list-attributes.md +2 -2
- package/docs/examples/databases/list-collection-logs.md +2 -2
- package/docs/examples/databases/list-collections.md +1 -1
- package/docs/examples/databases/list-document-logs.md +3 -3
- package/docs/examples/databases/list-documents.md +2 -2
- package/docs/examples/databases/list-indexes.md +2 -2
- package/docs/examples/databases/list-logs.md +1 -1
- package/docs/examples/databases/update-boolean-attribute.md +2 -2
- package/docs/examples/databases/update-collection.md +3 -3
- package/docs/examples/databases/update-datetime-attribute.md +2 -2
- package/docs/examples/databases/update-document.md +3 -3
- package/docs/examples/databases/update-email-attribute.md +2 -2
- package/docs/examples/databases/update-enum-attribute.md +3 -3
- package/docs/examples/databases/update-float-attribute.md +2 -2
- package/docs/examples/databases/update-integer-attribute.md +2 -2
- package/docs/examples/databases/update-ip-attribute.md +2 -2
- package/docs/examples/databases/update-relationship-attribute.md +2 -2
- package/docs/examples/databases/update-string-attribute.md +3 -3
- package/docs/examples/databases/update-url-attribute.md +2 -2
- package/docs/examples/databases/update.md +2 -2
- package/docs/examples/functions/create-build.md +3 -3
- package/docs/examples/functions/create-deployment.md +1 -1
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/functions/create-variable.md +3 -3
- package/docs/examples/functions/create.md +3 -3
- package/docs/examples/functions/delete-deployment.md +2 -2
- package/docs/examples/functions/delete-variable.md +2 -2
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/download-deployment.md +2 -2
- package/docs/examples/functions/get-deployment.md +2 -2
- package/docs/examples/functions/get-execution.md +2 -2
- package/docs/examples/functions/get-function-usage.md +1 -1
- package/docs/examples/functions/get-variable.md +2 -2
- 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-variables.md +1 -1
- package/docs/examples/functions/update-deployment.md +2 -2
- package/docs/examples/functions/update-variable.md +3 -3
- package/docs/examples/functions/update.md +2 -2
- package/docs/examples/health/get-certificate.md +2 -0
- package/docs/examples/health/get-failed-jobs.md +3 -0
- package/docs/examples/health/get-queue-usage-dump.md +2 -0
- package/docs/examples/health/get-queue-usage.md +2 -0
- package/docs/examples/health/get-storage.md +1 -0
- package/docs/examples/messaging/create-apns-provider.md +9 -0
- package/docs/examples/messaging/create-email.md +13 -0
- package/docs/examples/messaging/create-fcm-provider.md +5 -0
- package/docs/examples/messaging/create-mailgun-provider.md +11 -0
- package/docs/examples/messaging/create-msg91provider.md +7 -0
- package/docs/examples/messaging/create-push.md +17 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +9 -0
- package/docs/examples/messaging/create-sms.md +8 -0
- package/docs/examples/messaging/create-smtp-provider.md +15 -0
- package/docs/examples/messaging/create-subscriber.md +4 -0
- package/docs/examples/messaging/create-telesign-provider.md +7 -0
- package/docs/examples/messaging/create-textmagic-provider.md +7 -0
- package/docs/examples/messaging/create-topic.md +4 -0
- package/docs/examples/messaging/create-twilio-provider.md +7 -0
- package/docs/examples/messaging/create-vonage-provider.md +7 -0
- package/docs/examples/messaging/delete-provider.md +2 -0
- package/docs/examples/messaging/delete-subscriber.md +3 -0
- package/docs/examples/messaging/delete-topic.md +2 -0
- package/docs/examples/messaging/delete.md +2 -0
- package/docs/examples/messaging/get-message.md +2 -0
- package/docs/examples/messaging/get-provider.md +2 -0
- package/docs/examples/messaging/get-subscriber.md +3 -0
- package/docs/examples/messaging/get-topic.md +2 -0
- package/docs/examples/messaging/list-message-logs.md +3 -0
- package/docs/examples/messaging/list-messages.md +3 -0
- package/docs/examples/messaging/list-provider-logs.md +3 -0
- package/docs/examples/messaging/list-providers.md +3 -0
- package/docs/examples/messaging/list-subscriber-logs.md +3 -0
- package/docs/examples/messaging/list-subscribers.md +4 -0
- package/docs/examples/messaging/list-targets.md +3 -0
- package/docs/examples/messaging/list-topic-logs.md +3 -0
- package/docs/examples/messaging/list-topics.md +3 -0
- package/docs/examples/messaging/update-apns-provider.md +9 -0
- package/docs/examples/messaging/update-email.md +12 -0
- package/docs/examples/messaging/update-fcm-provider.md +5 -0
- package/docs/examples/messaging/update-mailgun-provider.md +11 -0
- package/docs/examples/messaging/update-msg91provider.md +7 -0
- package/docs/examples/messaging/update-push.md +17 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +9 -0
- package/docs/examples/messaging/update-sms.md +8 -0
- package/docs/examples/messaging/update-smtp-provider.md +15 -0
- package/docs/examples/messaging/update-telesign-provider.md +7 -0
- package/docs/examples/messaging/update-textmagic-provider.md +7 -0
- package/docs/examples/messaging/update-topic.md +4 -0
- package/docs/examples/messaging/update-twilio-provider.md +7 -0
- package/docs/examples/messaging/update-vonage-provider.md +7 -0
- package/docs/examples/migrations/create-appwrite-migration.md +2 -2
- package/docs/examples/migrations/create-firebase-migration.md +1 -1
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +1 -1
- package/docs/examples/migrations/create-n-host-migration.md +6 -6
- package/docs/examples/migrations/create-supabase-migration.md +4 -4
- package/docs/examples/migrations/delete.md +1 -1
- package/docs/examples/migrations/get-appwrite-report.md +2 -2
- package/docs/examples/migrations/get-firebase-report-o-auth.md +1 -1
- package/docs/examples/migrations/get-firebase-report.md +1 -1
- package/docs/examples/migrations/get-n-host-report.md +6 -6
- package/docs/examples/migrations/get-supabase-report.md +4 -4
- package/docs/examples/migrations/get.md +1 -1
- package/docs/examples/migrations/retry.md +1 -1
- package/docs/examples/project/create-variable.md +2 -2
- package/docs/examples/project/delete-variable.md +1 -1
- package/docs/examples/project/get-usage.md +2 -0
- package/docs/examples/project/get-variable.md +1 -1
- package/docs/examples/project/update-variable.md +2 -2
- package/docs/examples/projects/create-key.md +2 -2
- package/docs/examples/projects/create-platform.md +2 -2
- package/docs/examples/projects/create-smtp-test.md +11 -0
- package/docs/examples/projects/create-webhook.md +4 -3
- package/docs/examples/projects/create.md +2 -2
- package/docs/examples/projects/delete-email-template.md +1 -1
- package/docs/examples/projects/delete-key.md +2 -2
- package/docs/examples/projects/delete-platform.md +2 -2
- package/docs/examples/projects/delete-sms-template.md +1 -1
- package/docs/examples/projects/delete-webhook.md +2 -2
- package/docs/examples/projects/delete.md +1 -1
- package/docs/examples/projects/get-email-template.md +1 -1
- package/docs/examples/projects/get-key.md +2 -2
- package/docs/examples/projects/get-platform.md +2 -2
- package/docs/examples/projects/get-sms-template.md +1 -1
- package/docs/examples/projects/get-webhook.md +2 -2
- 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/update-api-status-all.md +3 -0
- package/docs/examples/projects/update-api-status.md +4 -0
- 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 +3 -3
- package/docs/examples/projects/update-key.md +3 -3
- package/docs/examples/projects/update-o-auth2.md +1 -1
- package/docs/examples/projects/update-personal-data-check.md +1 -1
- package/docs/examples/projects/update-platform.md +3 -3
- package/docs/examples/projects/update-service-status-all.md +1 -1
- package/docs/examples/projects/update-service-status.md +1 -1
- package/docs/examples/projects/update-sms-template.md +2 -2
- package/docs/examples/projects/update-smtp.md +11 -0
- package/docs/examples/projects/update-team.md +2 -2
- package/docs/examples/projects/update-webhook-signature.md +2 -2
- package/docs/examples/projects/update-webhook.md +5 -4
- package/docs/examples/projects/update.md +2 -2
- package/docs/examples/proxy/delete-rule.md +1 -1
- package/docs/examples/proxy/get-rule.md +1 -1
- package/docs/examples/proxy/update-rule-verification.md +1 -1
- package/docs/examples/storage/create-bucket.md +2 -2
- package/docs/examples/storage/create-file.md +2 -2
- package/docs/examples/storage/delete-bucket.md +1 -1
- package/docs/examples/storage/delete-file.md +2 -2
- 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 +2 -2
- package/docs/examples/storage/get-file-preview.md +2 -2
- package/docs/examples/storage/get-file-view.md +2 -2
- package/docs/examples/storage/get-file.md +2 -2
- package/docs/examples/storage/list-files.md +1 -1
- package/docs/examples/storage/update-bucket.md +2 -2
- package/docs/examples/storage/update-file.md +2 -2
- package/docs/examples/teams/create-membership.md +1 -1
- package/docs/examples/teams/create.md +2 -2
- package/docs/examples/teams/delete-membership.md +2 -2
- package/docs/examples/teams/delete.md +1 -1
- package/docs/examples/teams/get-membership.md +2 -2
- 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/update-membership-status.md +4 -4
- package/docs/examples/teams/update-membership.md +2 -2
- package/docs/examples/teams/update-name.md +2 -2
- 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-mfa-recovery-codes.md +2 -0
- 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 +4 -4
- package/docs/examples/users/create-scrypt-user.md +2 -2
- package/docs/examples/users/create-session.md +2 -0
- package/docs/examples/users/create-target.md +7 -0
- package/docs/examples/users/create-token.md +4 -0
- package/docs/examples/users/create.md +1 -1
- package/docs/examples/users/delete-identity.md +1 -1
- package/docs/examples/users/delete-mfa-authenticator.md +3 -0
- package/docs/examples/users/delete-session.md +2 -2
- package/docs/examples/users/delete-sessions.md +1 -1
- package/docs/examples/users/delete-target.md +3 -0
- package/docs/examples/users/delete.md +1 -1
- package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/get-prefs.md +1 -1
- package/docs/examples/users/get-target.md +3 -0
- package/docs/examples/users/get-usage.md +0 -1
- package/docs/examples/users/get.md +1 -1
- package/docs/examples/users/list-logs.md +1 -1
- package/docs/examples/users/list-memberships.md +1 -1
- package/docs/examples/users/list-mfa-factors.md +2 -0
- package/docs/examples/users/list-sessions.md +1 -1
- package/docs/examples/users/list-targets.md +3 -0
- 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 +1 -1
- package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/update-mfa.md +3 -0
- package/docs/examples/users/update-name.md +2 -2
- 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/users/update-target.md +6 -0
- package/docs/examples/vcs/create-repository-detection.md +2 -2
- package/docs/examples/vcs/create-repository.md +2 -2
- package/docs/examples/vcs/delete-installation.md +1 -1
- package/docs/examples/vcs/get-installation.md +1 -1
- package/docs/examples/vcs/get-repository.md +2 -2
- package/docs/examples/vcs/list-repositories.md +1 -1
- package/docs/examples/vcs/list-repository-branches.md +2 -2
- package/docs/examples/vcs/update-external-deployments.md +3 -3
- package/index.js +2 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +9 -4
- package/lib/commands/account.js +966 -381
- package/lib/commands/assistant.js +3 -8
- package/lib/commands/avatars.js +32 -48
- package/lib/commands/console.js +3 -8
- package/lib/commands/databases.js +119 -265
- package/lib/commands/deploy.js +45 -6
- package/lib/commands/functions.js +59 -124
- package/lib/commands/generic.js +0 -1
- package/lib/commands/graphql.js +5 -13
- package/lib/commands/health.js +225 -89
- package/lib/commands/locale.js +17 -43
- package/lib/commands/messaging.js +2815 -0
- package/lib/commands/migrations.js +35 -85
- package/lib/commands/project.js +28 -38
- package/lib/commands/projects.js +286 -270
- package/lib/commands/proxy.js +12 -29
- package/lib/commands/storage.js +42 -87
- package/lib/commands/teams.js +31 -75
- package/lib/commands/users.js +677 -235
- package/lib/commands/vcs.js +19 -48
- package/lib/paginate.js +2 -2
- package/lib/parser.js +1 -0
- package/package.json +1 -1
- package/scoop/appwrite.json +3 -3
- package/docs/examples/account/create-magic-u-r-l-session.md +0 -4
- package/docs/examples/account/create-phone-session.md +0 -3
- package/docs/examples/projects/get-usage.md +0 -3
- package/docs/examples/projects/update-smtp-configuration.md +0 -11
package/lib/commands/locale.js
CHANGED
|
@@ -37,7 +37,7 @@ function convertReadStreamToReadableStream(readStream) {
|
|
|
37
37
|
|
|
38
38
|
const locale = new Command("locale").description(commandDescriptions['locale']).configureHelp({
|
|
39
39
|
helpWidth: process.stdout.columns || 80
|
|
40
|
-
|
|
40
|
+
})
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* @typedef {Object} LocaleGetRequestParams
|
|
@@ -50,18 +50,15 @@ const locale = new Command("locale").description(commandDescriptions['locale']).
|
|
|
50
50
|
*/
|
|
51
51
|
const localeGet = async ({ parseOutput = true, sdk = undefined}) => {
|
|
52
52
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
53
|
-
|
|
54
53
|
let apiPath = '/locale';
|
|
55
54
|
let payload = {};
|
|
56
55
|
|
|
57
|
-
|
|
58
56
|
let response = undefined;
|
|
59
|
-
|
|
57
|
+
|
|
60
58
|
response = await client.call('get', apiPath, {
|
|
61
59
|
'content-type': 'application/json',
|
|
62
60
|
}, payload);
|
|
63
61
|
|
|
64
|
-
|
|
65
62
|
if (parseOutput) {
|
|
66
63
|
parse(response)
|
|
67
64
|
success()
|
|
@@ -81,18 +78,15 @@ const localeGet = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
81
78
|
*/
|
|
82
79
|
const localeListCodes = async ({ parseOutput = true, sdk = undefined}) => {
|
|
83
80
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
84
|
-
|
|
85
81
|
let apiPath = '/locale/codes';
|
|
86
82
|
let payload = {};
|
|
87
83
|
|
|
88
|
-
|
|
89
84
|
let response = undefined;
|
|
90
|
-
|
|
85
|
+
|
|
91
86
|
response = await client.call('get', apiPath, {
|
|
92
87
|
'content-type': 'application/json',
|
|
93
88
|
}, payload);
|
|
94
89
|
|
|
95
|
-
|
|
96
90
|
if (parseOutput) {
|
|
97
91
|
parse(response)
|
|
98
92
|
success()
|
|
@@ -112,18 +106,15 @@ const localeListCodes = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
112
106
|
*/
|
|
113
107
|
const localeListContinents = async ({ parseOutput = true, sdk = undefined}) => {
|
|
114
108
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
115
|
-
|
|
116
109
|
let apiPath = '/locale/continents';
|
|
117
110
|
let payload = {};
|
|
118
111
|
|
|
119
|
-
|
|
120
112
|
let response = undefined;
|
|
121
|
-
|
|
113
|
+
|
|
122
114
|
response = await client.call('get', apiPath, {
|
|
123
115
|
'content-type': 'application/json',
|
|
124
116
|
}, payload);
|
|
125
117
|
|
|
126
|
-
|
|
127
118
|
if (parseOutput) {
|
|
128
119
|
parse(response)
|
|
129
120
|
success()
|
|
@@ -143,18 +134,15 @@ const localeListContinents = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
143
134
|
*/
|
|
144
135
|
const localeListCountries = async ({ parseOutput = true, sdk = undefined}) => {
|
|
145
136
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
146
|
-
|
|
147
137
|
let apiPath = '/locale/countries';
|
|
148
138
|
let payload = {};
|
|
149
139
|
|
|
150
|
-
|
|
151
140
|
let response = undefined;
|
|
152
|
-
|
|
141
|
+
|
|
153
142
|
response = await client.call('get', apiPath, {
|
|
154
143
|
'content-type': 'application/json',
|
|
155
144
|
}, payload);
|
|
156
145
|
|
|
157
|
-
|
|
158
146
|
if (parseOutput) {
|
|
159
147
|
parse(response)
|
|
160
148
|
success()
|
|
@@ -174,18 +162,15 @@ const localeListCountries = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
174
162
|
*/
|
|
175
163
|
const localeListCountriesEU = async ({ parseOutput = true, sdk = undefined}) => {
|
|
176
164
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
177
|
-
|
|
178
165
|
let apiPath = '/locale/countries/eu';
|
|
179
166
|
let payload = {};
|
|
180
167
|
|
|
181
|
-
|
|
182
168
|
let response = undefined;
|
|
183
|
-
|
|
169
|
+
|
|
184
170
|
response = await client.call('get', apiPath, {
|
|
185
171
|
'content-type': 'application/json',
|
|
186
172
|
}, payload);
|
|
187
173
|
|
|
188
|
-
|
|
189
174
|
if (parseOutput) {
|
|
190
175
|
parse(response)
|
|
191
176
|
success()
|
|
@@ -205,18 +190,15 @@ const localeListCountriesEU = async ({ parseOutput = true, sdk = undefined}) =>
|
|
|
205
190
|
*/
|
|
206
191
|
const localeListCountriesPhones = async ({ parseOutput = true, sdk = undefined}) => {
|
|
207
192
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
208
|
-
|
|
209
193
|
let apiPath = '/locale/countries/phones';
|
|
210
194
|
let payload = {};
|
|
211
195
|
|
|
212
|
-
|
|
213
196
|
let response = undefined;
|
|
214
|
-
|
|
197
|
+
|
|
215
198
|
response = await client.call('get', apiPath, {
|
|
216
199
|
'content-type': 'application/json',
|
|
217
200
|
}, payload);
|
|
218
201
|
|
|
219
|
-
|
|
220
202
|
if (parseOutput) {
|
|
221
203
|
parse(response)
|
|
222
204
|
success()
|
|
@@ -236,18 +218,15 @@ const localeListCountriesPhones = async ({ parseOutput = true, sdk = undefined})
|
|
|
236
218
|
*/
|
|
237
219
|
const localeListCurrencies = async ({ parseOutput = true, sdk = undefined}) => {
|
|
238
220
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
239
|
-
|
|
240
221
|
let apiPath = '/locale/currencies';
|
|
241
222
|
let payload = {};
|
|
242
223
|
|
|
243
|
-
|
|
244
224
|
let response = undefined;
|
|
245
|
-
|
|
225
|
+
|
|
246
226
|
response = await client.call('get', apiPath, {
|
|
247
227
|
'content-type': 'application/json',
|
|
248
228
|
}, payload);
|
|
249
229
|
|
|
250
|
-
|
|
251
230
|
if (parseOutput) {
|
|
252
231
|
parse(response)
|
|
253
232
|
success()
|
|
@@ -267,18 +246,15 @@ const localeListCurrencies = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
267
246
|
*/
|
|
268
247
|
const localeListLanguages = async ({ parseOutput = true, sdk = undefined}) => {
|
|
269
248
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
270
|
-
|
|
271
249
|
let apiPath = '/locale/languages';
|
|
272
250
|
let payload = {};
|
|
273
251
|
|
|
274
|
-
|
|
275
252
|
let response = undefined;
|
|
276
|
-
|
|
253
|
+
|
|
277
254
|
response = await client.call('get', apiPath, {
|
|
278
255
|
'content-type': 'application/json',
|
|
279
256
|
}, payload);
|
|
280
257
|
|
|
281
|
-
|
|
282
258
|
if (parseOutput) {
|
|
283
259
|
parse(response)
|
|
284
260
|
success()
|
|
@@ -287,7 +263,6 @@ const localeListLanguages = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
287
263
|
return response;
|
|
288
264
|
}
|
|
289
265
|
|
|
290
|
-
|
|
291
266
|
locale
|
|
292
267
|
.command(`get`)
|
|
293
268
|
.description(`Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language. ([IP Geolocation by DB-IP](https://db-ip.com))`)
|
|
@@ -328,15 +303,14 @@ locale
|
|
|
328
303
|
.description(`List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.`)
|
|
329
304
|
.action(actionRunner(localeListLanguages))
|
|
330
305
|
|
|
331
|
-
|
|
332
306
|
module.exports = {
|
|
333
307
|
locale,
|
|
334
|
-
localeGet,
|
|
335
|
-
localeListCodes,
|
|
336
|
-
localeListContinents,
|
|
337
|
-
localeListCountries,
|
|
338
|
-
localeListCountriesEU,
|
|
339
|
-
localeListCountriesPhones,
|
|
340
|
-
localeListCurrencies,
|
|
341
|
-
localeListLanguages
|
|
308
|
+
localeGet,
|
|
309
|
+
localeListCodes,
|
|
310
|
+
localeListContinents,
|
|
311
|
+
localeListCountries,
|
|
312
|
+
localeListCountriesEU,
|
|
313
|
+
localeListCountriesPhones,
|
|
314
|
+
localeListCurrencies,
|
|
315
|
+
localeListLanguages
|
|
342
316
|
};
|