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/projects.js
CHANGED
|
@@ -37,7 +37,7 @@ function convertReadStreamToReadableStream(readStream) {
|
|
|
37
37
|
|
|
38
38
|
const projects = new Command("projects").description(commandDescriptions['projects']).configureHelp({
|
|
39
39
|
helpWidth: process.stdout.columns || 80
|
|
40
|
-
|
|
40
|
+
})
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* @typedef {Object} ProjectsListRequestParams
|
|
@@ -52,7 +52,6 @@ const projects = new Command("projects").description(commandDescriptions['projec
|
|
|
52
52
|
*/
|
|
53
53
|
const projectsList = async ({ queries, search, parseOutput = true, sdk = undefined}) => {
|
|
54
54
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
55
|
-
|
|
56
55
|
let apiPath = '/projects';
|
|
57
56
|
let payload = {};
|
|
58
57
|
if (typeof queries !== 'undefined') {
|
|
@@ -62,14 +61,12 @@ const projectsList = async ({ queries, search, parseOutput = true, sdk = undefin
|
|
|
62
61
|
payload['search'] = search;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
|
|
66
64
|
let response = undefined;
|
|
67
|
-
|
|
65
|
+
|
|
68
66
|
response = await client.call('get', apiPath, {
|
|
69
67
|
'content-type': 'application/json',
|
|
70
68
|
}, payload);
|
|
71
69
|
|
|
72
|
-
|
|
73
70
|
if (parseOutput) {
|
|
74
71
|
parse(response)
|
|
75
72
|
success()
|
|
@@ -83,7 +80,7 @@ const projectsList = async ({ queries, search, parseOutput = true, sdk = undefin
|
|
|
83
80
|
* @property {string} projectId Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.
|
|
84
81
|
* @property {string} name Project name. Max length: 128 chars.
|
|
85
82
|
* @property {string} teamId Team unique ID.
|
|
86
|
-
* @property {
|
|
83
|
+
* @property {Region} region Project Region.
|
|
87
84
|
* @property {string} description Project description. Max length: 256 chars.
|
|
88
85
|
* @property {string} logo Project logo.
|
|
89
86
|
* @property {string} url Project URL.
|
|
@@ -102,7 +99,6 @@ const projectsList = async ({ queries, search, parseOutput = true, sdk = undefin
|
|
|
102
99
|
*/
|
|
103
100
|
const projectsCreate = async ({ projectId, name, teamId, region, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId, parseOutput = true, sdk = undefined}) => {
|
|
104
101
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
105
|
-
|
|
106
102
|
let apiPath = '/projects';
|
|
107
103
|
let payload = {};
|
|
108
104
|
if (typeof projectId !== 'undefined') {
|
|
@@ -145,14 +141,12 @@ const projectsCreate = async ({ projectId, name, teamId, region, description, lo
|
|
|
145
141
|
payload['legalTaxId'] = legalTaxId;
|
|
146
142
|
}
|
|
147
143
|
|
|
148
|
-
|
|
149
144
|
let response = undefined;
|
|
150
|
-
|
|
145
|
+
|
|
151
146
|
response = await client.call('post', apiPath, {
|
|
152
147
|
'content-type': 'application/json',
|
|
153
148
|
}, payload);
|
|
154
149
|
|
|
155
|
-
|
|
156
150
|
if (parseOutput) {
|
|
157
151
|
parse(response)
|
|
158
152
|
success()
|
|
@@ -173,18 +167,15 @@ const projectsCreate = async ({ projectId, name, teamId, region, description, lo
|
|
|
173
167
|
*/
|
|
174
168
|
const projectsGet = async ({ projectId, parseOutput = true, sdk = undefined}) => {
|
|
175
169
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
176
|
-
|
|
177
170
|
let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
178
171
|
let payload = {};
|
|
179
172
|
|
|
180
|
-
|
|
181
173
|
let response = undefined;
|
|
182
|
-
|
|
174
|
+
|
|
183
175
|
response = await client.call('get', apiPath, {
|
|
184
176
|
'content-type': 'application/json',
|
|
185
177
|
}, payload);
|
|
186
178
|
|
|
187
|
-
|
|
188
179
|
if (parseOutput) {
|
|
189
180
|
parse(response)
|
|
190
181
|
success()
|
|
@@ -215,7 +206,6 @@ const projectsGet = async ({ projectId, parseOutput = true, sdk = undefined}) =>
|
|
|
215
206
|
*/
|
|
216
207
|
const projectsUpdate = async ({ projectId, name, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId, parseOutput = true, sdk = undefined}) => {
|
|
217
208
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
218
|
-
|
|
219
209
|
let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
220
210
|
let payload = {};
|
|
221
211
|
if (typeof name !== 'undefined') {
|
|
@@ -249,14 +239,12 @@ const projectsUpdate = async ({ projectId, name, description, logo, url, legalNa
|
|
|
249
239
|
payload['legalTaxId'] = legalTaxId;
|
|
250
240
|
}
|
|
251
241
|
|
|
252
|
-
|
|
253
242
|
let response = undefined;
|
|
254
|
-
|
|
243
|
+
|
|
255
244
|
response = await client.call('patch', apiPath, {
|
|
256
245
|
'content-type': 'application/json',
|
|
257
246
|
}, payload);
|
|
258
247
|
|
|
259
|
-
|
|
260
248
|
if (parseOutput) {
|
|
261
249
|
parse(response)
|
|
262
250
|
success()
|
|
@@ -277,18 +265,85 @@ const projectsUpdate = async ({ projectId, name, description, logo, url, legalNa
|
|
|
277
265
|
*/
|
|
278
266
|
const projectsDelete = async ({ projectId, parseOutput = true, sdk = undefined}) => {
|
|
279
267
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
280
|
-
|
|
281
268
|
let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
282
269
|
let payload = {};
|
|
283
270
|
|
|
284
|
-
|
|
285
271
|
let response = undefined;
|
|
286
|
-
|
|
272
|
+
|
|
287
273
|
response = await client.call('delete', apiPath, {
|
|
288
274
|
'content-type': 'application/json',
|
|
289
275
|
}, payload);
|
|
290
276
|
|
|
277
|
+
if (parseOutput) {
|
|
278
|
+
parse(response)
|
|
279
|
+
success()
|
|
280
|
+
}
|
|
291
281
|
|
|
282
|
+
return response;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* @typedef {Object} ProjectsUpdateApiStatusRequestParams
|
|
287
|
+
* @property {string} projectId Project unique ID.
|
|
288
|
+
* @property {Api} api API name.
|
|
289
|
+
* @property {boolean} status API status.
|
|
290
|
+
* @property {boolean} parseOutput
|
|
291
|
+
* @property {libClient | undefined} sdk
|
|
292
|
+
*/
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @param {ProjectsUpdateApiStatusRequestParams} params
|
|
296
|
+
*/
|
|
297
|
+
const projectsUpdateApiStatus = async ({ projectId, api, status, parseOutput = true, sdk = undefined}) => {
|
|
298
|
+
let client = !sdk ? await sdkForConsole() : sdk;
|
|
299
|
+
let apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
|
|
300
|
+
let payload = {};
|
|
301
|
+
if (typeof api !== 'undefined') {
|
|
302
|
+
payload['api'] = api;
|
|
303
|
+
}
|
|
304
|
+
if (typeof status !== 'undefined') {
|
|
305
|
+
payload['status'] = status;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
let response = undefined;
|
|
309
|
+
|
|
310
|
+
response = await client.call('patch', apiPath, {
|
|
311
|
+
'content-type': 'application/json',
|
|
312
|
+
}, payload);
|
|
313
|
+
|
|
314
|
+
if (parseOutput) {
|
|
315
|
+
parse(response)
|
|
316
|
+
success()
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return response;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* @typedef {Object} ProjectsUpdateApiStatusAllRequestParams
|
|
324
|
+
* @property {string} projectId Project unique ID.
|
|
325
|
+
* @property {boolean} status API status.
|
|
326
|
+
* @property {boolean} parseOutput
|
|
327
|
+
* @property {libClient | undefined} sdk
|
|
328
|
+
*/
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* @param {ProjectsUpdateApiStatusAllRequestParams} params
|
|
332
|
+
*/
|
|
333
|
+
const projectsUpdateApiStatusAll = async ({ projectId, status, parseOutput = true, sdk = undefined}) => {
|
|
334
|
+
let client = !sdk ? await sdkForConsole() : sdk;
|
|
335
|
+
let apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
|
|
336
|
+
let payload = {};
|
|
337
|
+
if (typeof status !== 'undefined') {
|
|
338
|
+
payload['status'] = status;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
let response = undefined;
|
|
342
|
+
|
|
343
|
+
response = await client.call('patch', apiPath, {
|
|
344
|
+
'content-type': 'application/json',
|
|
345
|
+
}, payload);
|
|
346
|
+
|
|
292
347
|
if (parseOutput) {
|
|
293
348
|
parse(response)
|
|
294
349
|
success()
|
|
@@ -310,21 +365,18 @@ const projectsDelete = async ({ projectId, parseOutput = true, sdk = undefined})
|
|
|
310
365
|
*/
|
|
311
366
|
const projectsUpdateAuthDuration = async ({ projectId, duration, parseOutput = true, sdk = undefined}) => {
|
|
312
367
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
313
|
-
|
|
314
368
|
let apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
|
|
315
369
|
let payload = {};
|
|
316
370
|
if (typeof duration !== 'undefined') {
|
|
317
371
|
payload['duration'] = duration;
|
|
318
372
|
}
|
|
319
373
|
|
|
320
|
-
|
|
321
374
|
let response = undefined;
|
|
322
|
-
|
|
375
|
+
|
|
323
376
|
response = await client.call('patch', apiPath, {
|
|
324
377
|
'content-type': 'application/json',
|
|
325
378
|
}, payload);
|
|
326
379
|
|
|
327
|
-
|
|
328
380
|
if (parseOutput) {
|
|
329
381
|
parse(response)
|
|
330
382
|
success()
|
|
@@ -346,21 +398,18 @@ const projectsUpdateAuthDuration = async ({ projectId, duration, parseOutput = t
|
|
|
346
398
|
*/
|
|
347
399
|
const projectsUpdateAuthLimit = async ({ projectId, limit, parseOutput = true, sdk = undefined}) => {
|
|
348
400
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
349
|
-
|
|
350
401
|
let apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
|
|
351
402
|
let payload = {};
|
|
352
403
|
if (typeof limit !== 'undefined') {
|
|
353
404
|
payload['limit'] = limit;
|
|
354
405
|
}
|
|
355
406
|
|
|
356
|
-
|
|
357
407
|
let response = undefined;
|
|
358
|
-
|
|
408
|
+
|
|
359
409
|
response = await client.call('patch', apiPath, {
|
|
360
410
|
'content-type': 'application/json',
|
|
361
411
|
}, payload);
|
|
362
412
|
|
|
363
|
-
|
|
364
413
|
if (parseOutput) {
|
|
365
414
|
parse(response)
|
|
366
415
|
success()
|
|
@@ -382,21 +431,18 @@ const projectsUpdateAuthLimit = async ({ projectId, limit, parseOutput = true, s
|
|
|
382
431
|
*/
|
|
383
432
|
const projectsUpdateAuthSessionsLimit = async ({ projectId, limit, parseOutput = true, sdk = undefined}) => {
|
|
384
433
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
385
|
-
|
|
386
434
|
let apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
|
|
387
435
|
let payload = {};
|
|
388
436
|
if (typeof limit !== 'undefined') {
|
|
389
437
|
payload['limit'] = limit;
|
|
390
438
|
}
|
|
391
439
|
|
|
392
|
-
|
|
393
440
|
let response = undefined;
|
|
394
|
-
|
|
441
|
+
|
|
395
442
|
response = await client.call('patch', apiPath, {
|
|
396
443
|
'content-type': 'application/json',
|
|
397
444
|
}, payload);
|
|
398
445
|
|
|
399
|
-
|
|
400
446
|
if (parseOutput) {
|
|
401
447
|
parse(response)
|
|
402
448
|
success()
|
|
@@ -418,21 +464,18 @@ const projectsUpdateAuthSessionsLimit = async ({ projectId, limit, parseOutput =
|
|
|
418
464
|
*/
|
|
419
465
|
const projectsUpdateAuthPasswordDictionary = async ({ projectId, enabled, parseOutput = true, sdk = undefined}) => {
|
|
420
466
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
421
|
-
|
|
422
467
|
let apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
|
|
423
468
|
let payload = {};
|
|
424
469
|
if (typeof enabled !== 'undefined') {
|
|
425
470
|
payload['enabled'] = enabled;
|
|
426
471
|
}
|
|
427
472
|
|
|
428
|
-
|
|
429
473
|
let response = undefined;
|
|
430
|
-
|
|
474
|
+
|
|
431
475
|
response = await client.call('patch', apiPath, {
|
|
432
476
|
'content-type': 'application/json',
|
|
433
477
|
}, payload);
|
|
434
478
|
|
|
435
|
-
|
|
436
479
|
if (parseOutput) {
|
|
437
480
|
parse(response)
|
|
438
481
|
success()
|
|
@@ -454,21 +497,18 @@ const projectsUpdateAuthPasswordDictionary = async ({ projectId, enabled, parseO
|
|
|
454
497
|
*/
|
|
455
498
|
const projectsUpdateAuthPasswordHistory = async ({ projectId, limit, parseOutput = true, sdk = undefined}) => {
|
|
456
499
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
457
|
-
|
|
458
500
|
let apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
|
|
459
501
|
let payload = {};
|
|
460
502
|
if (typeof limit !== 'undefined') {
|
|
461
503
|
payload['limit'] = limit;
|
|
462
504
|
}
|
|
463
505
|
|
|
464
|
-
|
|
465
506
|
let response = undefined;
|
|
466
|
-
|
|
507
|
+
|
|
467
508
|
response = await client.call('patch', apiPath, {
|
|
468
509
|
'content-type': 'application/json',
|
|
469
510
|
}, payload);
|
|
470
511
|
|
|
471
|
-
|
|
472
512
|
if (parseOutput) {
|
|
473
513
|
parse(response)
|
|
474
514
|
success()
|
|
@@ -490,21 +530,18 @@ const projectsUpdateAuthPasswordHistory = async ({ projectId, limit, parseOutput
|
|
|
490
530
|
*/
|
|
491
531
|
const projectsUpdatePersonalDataCheck = async ({ projectId, enabled, parseOutput = true, sdk = undefined}) => {
|
|
492
532
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
493
|
-
|
|
494
533
|
let apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
|
|
495
534
|
let payload = {};
|
|
496
535
|
if (typeof enabled !== 'undefined') {
|
|
497
536
|
payload['enabled'] = enabled;
|
|
498
537
|
}
|
|
499
538
|
|
|
500
|
-
|
|
501
539
|
let response = undefined;
|
|
502
|
-
|
|
540
|
+
|
|
503
541
|
response = await client.call('patch', apiPath, {
|
|
504
542
|
'content-type': 'application/json',
|
|
505
543
|
}, payload);
|
|
506
544
|
|
|
507
|
-
|
|
508
545
|
if (parseOutput) {
|
|
509
546
|
parse(response)
|
|
510
547
|
success()
|
|
@@ -516,7 +553,7 @@ const projectsUpdatePersonalDataCheck = async ({ projectId, enabled, parseOutput
|
|
|
516
553
|
/**
|
|
517
554
|
* @typedef {Object} ProjectsUpdateAuthStatusRequestParams
|
|
518
555
|
* @property {string} projectId Project unique ID.
|
|
519
|
-
* @property {
|
|
556
|
+
* @property {AuthMethod} method Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
|
|
520
557
|
* @property {boolean} status Set the status of this auth method.
|
|
521
558
|
* @property {boolean} parseOutput
|
|
522
559
|
* @property {libClient | undefined} sdk
|
|
@@ -527,21 +564,18 @@ const projectsUpdatePersonalDataCheck = async ({ projectId, enabled, parseOutput
|
|
|
527
564
|
*/
|
|
528
565
|
const projectsUpdateAuthStatus = async ({ projectId, method, status, parseOutput = true, sdk = undefined}) => {
|
|
529
566
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
530
|
-
|
|
531
567
|
let apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
|
|
532
568
|
let payload = {};
|
|
533
569
|
if (typeof status !== 'undefined') {
|
|
534
570
|
payload['status'] = status;
|
|
535
571
|
}
|
|
536
572
|
|
|
537
|
-
|
|
538
573
|
let response = undefined;
|
|
539
|
-
|
|
574
|
+
|
|
540
575
|
response = await client.call('patch', apiPath, {
|
|
541
576
|
'content-type': 'application/json',
|
|
542
577
|
}, payload);
|
|
543
578
|
|
|
544
|
-
|
|
545
579
|
if (parseOutput) {
|
|
546
580
|
parse(response)
|
|
547
581
|
success()
|
|
@@ -562,18 +596,15 @@ const projectsUpdateAuthStatus = async ({ projectId, method, status, parseOutput
|
|
|
562
596
|
*/
|
|
563
597
|
const projectsListKeys = async ({ projectId, parseOutput = true, sdk = undefined}) => {
|
|
564
598
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
565
|
-
|
|
566
599
|
let apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
567
600
|
let payload = {};
|
|
568
601
|
|
|
569
|
-
|
|
570
602
|
let response = undefined;
|
|
571
|
-
|
|
603
|
+
|
|
572
604
|
response = await client.call('get', apiPath, {
|
|
573
605
|
'content-type': 'application/json',
|
|
574
606
|
}, payload);
|
|
575
607
|
|
|
576
|
-
|
|
577
608
|
if (parseOutput) {
|
|
578
609
|
parse(response)
|
|
579
610
|
success()
|
|
@@ -587,7 +618,7 @@ const projectsListKeys = async ({ projectId, parseOutput = true, sdk = undefined
|
|
|
587
618
|
* @property {string} projectId Project unique ID.
|
|
588
619
|
* @property {string} name Key name. Max length: 128 chars.
|
|
589
620
|
* @property {string[]} scopes Key scopes list. Maximum of 100 scopes are allowed.
|
|
590
|
-
* @property {string} expire Expiration time in ISO 8601 format. Use null for unlimited expiration.
|
|
621
|
+
* @property {string} expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
591
622
|
* @property {boolean} parseOutput
|
|
592
623
|
* @property {libClient | undefined} sdk
|
|
593
624
|
*/
|
|
@@ -597,7 +628,6 @@ const projectsListKeys = async ({ projectId, parseOutput = true, sdk = undefined
|
|
|
597
628
|
*/
|
|
598
629
|
const projectsCreateKey = async ({ projectId, name, scopes, expire, parseOutput = true, sdk = undefined}) => {
|
|
599
630
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
600
|
-
|
|
601
631
|
let apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
602
632
|
let payload = {};
|
|
603
633
|
if (typeof name !== 'undefined') {
|
|
@@ -611,14 +641,12 @@ const projectsCreateKey = async ({ projectId, name, scopes, expire, parseOutput
|
|
|
611
641
|
payload['expire'] = expire;
|
|
612
642
|
}
|
|
613
643
|
|
|
614
|
-
|
|
615
644
|
let response = undefined;
|
|
616
|
-
|
|
645
|
+
|
|
617
646
|
response = await client.call('post', apiPath, {
|
|
618
647
|
'content-type': 'application/json',
|
|
619
648
|
}, payload);
|
|
620
649
|
|
|
621
|
-
|
|
622
650
|
if (parseOutput) {
|
|
623
651
|
parse(response)
|
|
624
652
|
success()
|
|
@@ -640,18 +668,15 @@ const projectsCreateKey = async ({ projectId, name, scopes, expire, parseOutput
|
|
|
640
668
|
*/
|
|
641
669
|
const projectsGetKey = async ({ projectId, keyId, parseOutput = true, sdk = undefined}) => {
|
|
642
670
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
643
|
-
|
|
644
671
|
let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
645
672
|
let payload = {};
|
|
646
673
|
|
|
647
|
-
|
|
648
674
|
let response = undefined;
|
|
649
|
-
|
|
675
|
+
|
|
650
676
|
response = await client.call('get', apiPath, {
|
|
651
677
|
'content-type': 'application/json',
|
|
652
678
|
}, payload);
|
|
653
679
|
|
|
654
|
-
|
|
655
680
|
if (parseOutput) {
|
|
656
681
|
parse(response)
|
|
657
682
|
success()
|
|
@@ -666,7 +691,7 @@ const projectsGetKey = async ({ projectId, keyId, parseOutput = true, sdk = unde
|
|
|
666
691
|
* @property {string} keyId Key unique ID.
|
|
667
692
|
* @property {string} name Key name. Max length: 128 chars.
|
|
668
693
|
* @property {string[]} scopes Key scopes list. Maximum of 100 events are allowed.
|
|
669
|
-
* @property {string} expire Expiration time in ISO 8601 format. Use null for unlimited expiration.
|
|
694
|
+
* @property {string} expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
670
695
|
* @property {boolean} parseOutput
|
|
671
696
|
* @property {libClient | undefined} sdk
|
|
672
697
|
*/
|
|
@@ -676,7 +701,6 @@ const projectsGetKey = async ({ projectId, keyId, parseOutput = true, sdk = unde
|
|
|
676
701
|
*/
|
|
677
702
|
const projectsUpdateKey = async ({ projectId, keyId, name, scopes, expire, parseOutput = true, sdk = undefined}) => {
|
|
678
703
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
679
|
-
|
|
680
704
|
let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
681
705
|
let payload = {};
|
|
682
706
|
if (typeof name !== 'undefined') {
|
|
@@ -690,14 +714,12 @@ const projectsUpdateKey = async ({ projectId, keyId, name, scopes, expire, parse
|
|
|
690
714
|
payload['expire'] = expire;
|
|
691
715
|
}
|
|
692
716
|
|
|
693
|
-
|
|
694
717
|
let response = undefined;
|
|
695
|
-
|
|
718
|
+
|
|
696
719
|
response = await client.call('put', apiPath, {
|
|
697
720
|
'content-type': 'application/json',
|
|
698
721
|
}, payload);
|
|
699
722
|
|
|
700
|
-
|
|
701
723
|
if (parseOutput) {
|
|
702
724
|
parse(response)
|
|
703
725
|
success()
|
|
@@ -719,18 +741,15 @@ const projectsUpdateKey = async ({ projectId, keyId, name, scopes, expire, parse
|
|
|
719
741
|
*/
|
|
720
742
|
const projectsDeleteKey = async ({ projectId, keyId, parseOutput = true, sdk = undefined}) => {
|
|
721
743
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
722
|
-
|
|
723
744
|
let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
724
745
|
let payload = {};
|
|
725
746
|
|
|
726
|
-
|
|
727
747
|
let response = undefined;
|
|
728
|
-
|
|
748
|
+
|
|
729
749
|
response = await client.call('delete', apiPath, {
|
|
730
750
|
'content-type': 'application/json',
|
|
731
751
|
}, payload);
|
|
732
752
|
|
|
733
|
-
|
|
734
753
|
if (parseOutput) {
|
|
735
754
|
parse(response)
|
|
736
755
|
success()
|
|
@@ -742,7 +761,7 @@ const projectsDeleteKey = async ({ projectId, keyId, parseOutput = true, sdk = u
|
|
|
742
761
|
/**
|
|
743
762
|
* @typedef {Object} ProjectsUpdateOAuth2RequestParams
|
|
744
763
|
* @property {string} projectId Project unique ID.
|
|
745
|
-
* @property {
|
|
764
|
+
* @property {OAuthProvider} provider Provider Name
|
|
746
765
|
* @property {string} appId Provider app ID. Max length: 256 chars.
|
|
747
766
|
* @property {string} secret Provider secret key. Max length: 512 chars.
|
|
748
767
|
* @property {boolean} enabled Provider status. Set to 'false' to disable new session creation.
|
|
@@ -755,7 +774,6 @@ const projectsDeleteKey = async ({ projectId, keyId, parseOutput = true, sdk = u
|
|
|
755
774
|
*/
|
|
756
775
|
const projectsUpdateOAuth2 = async ({ projectId, provider, appId, secret, enabled, parseOutput = true, sdk = undefined}) => {
|
|
757
776
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
758
|
-
|
|
759
777
|
let apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
|
|
760
778
|
let payload = {};
|
|
761
779
|
if (typeof provider !== 'undefined') {
|
|
@@ -771,14 +789,12 @@ const projectsUpdateOAuth2 = async ({ projectId, provider, appId, secret, enable
|
|
|
771
789
|
payload['enabled'] = enabled;
|
|
772
790
|
}
|
|
773
791
|
|
|
774
|
-
|
|
775
792
|
let response = undefined;
|
|
776
|
-
|
|
793
|
+
|
|
777
794
|
response = await client.call('patch', apiPath, {
|
|
778
795
|
'content-type': 'application/json',
|
|
779
796
|
}, payload);
|
|
780
797
|
|
|
781
|
-
|
|
782
798
|
if (parseOutput) {
|
|
783
799
|
parse(response)
|
|
784
800
|
success()
|
|
@@ -799,18 +815,15 @@ const projectsUpdateOAuth2 = async ({ projectId, provider, appId, secret, enable
|
|
|
799
815
|
*/
|
|
800
816
|
const projectsListPlatforms = async ({ projectId, parseOutput = true, sdk = undefined}) => {
|
|
801
817
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
802
|
-
|
|
803
818
|
let apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
|
|
804
819
|
let payload = {};
|
|
805
820
|
|
|
806
|
-
|
|
807
821
|
let response = undefined;
|
|
808
|
-
|
|
822
|
+
|
|
809
823
|
response = await client.call('get', apiPath, {
|
|
810
824
|
'content-type': 'application/json',
|
|
811
825
|
}, payload);
|
|
812
826
|
|
|
813
|
-
|
|
814
827
|
if (parseOutput) {
|
|
815
828
|
parse(response)
|
|
816
829
|
success()
|
|
@@ -822,7 +835,7 @@ const projectsListPlatforms = async ({ projectId, parseOutput = true, sdk = unde
|
|
|
822
835
|
/**
|
|
823
836
|
* @typedef {Object} ProjectsCreatePlatformRequestParams
|
|
824
837
|
* @property {string} projectId Project unique ID.
|
|
825
|
-
* @property {
|
|
838
|
+
* @property {PlatformType} type Platform type.
|
|
826
839
|
* @property {string} name Platform name. Max length: 128 chars.
|
|
827
840
|
* @property {string} key Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.
|
|
828
841
|
* @property {string} store App store or Google Play store ID. Max length: 256 chars.
|
|
@@ -836,7 +849,6 @@ const projectsListPlatforms = async ({ projectId, parseOutput = true, sdk = unde
|
|
|
836
849
|
*/
|
|
837
850
|
const projectsCreatePlatform = async ({ projectId, type, name, key, store, hostname, parseOutput = true, sdk = undefined}) => {
|
|
838
851
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
839
|
-
|
|
840
852
|
let apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
|
|
841
853
|
let payload = {};
|
|
842
854
|
if (typeof type !== 'undefined') {
|
|
@@ -855,14 +867,12 @@ const projectsCreatePlatform = async ({ projectId, type, name, key, store, hostn
|
|
|
855
867
|
payload['hostname'] = hostname;
|
|
856
868
|
}
|
|
857
869
|
|
|
858
|
-
|
|
859
870
|
let response = undefined;
|
|
860
|
-
|
|
871
|
+
|
|
861
872
|
response = await client.call('post', apiPath, {
|
|
862
873
|
'content-type': 'application/json',
|
|
863
874
|
}, payload);
|
|
864
875
|
|
|
865
|
-
|
|
866
876
|
if (parseOutput) {
|
|
867
877
|
parse(response)
|
|
868
878
|
success()
|
|
@@ -884,18 +894,15 @@ const projectsCreatePlatform = async ({ projectId, type, name, key, store, hostn
|
|
|
884
894
|
*/
|
|
885
895
|
const projectsGetPlatform = async ({ projectId, platformId, parseOutput = true, sdk = undefined}) => {
|
|
886
896
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
887
|
-
|
|
888
897
|
let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
889
898
|
let payload = {};
|
|
890
899
|
|
|
891
|
-
|
|
892
900
|
let response = undefined;
|
|
893
|
-
|
|
901
|
+
|
|
894
902
|
response = await client.call('get', apiPath, {
|
|
895
903
|
'content-type': 'application/json',
|
|
896
904
|
}, payload);
|
|
897
905
|
|
|
898
|
-
|
|
899
906
|
if (parseOutput) {
|
|
900
907
|
parse(response)
|
|
901
908
|
success()
|
|
@@ -921,7 +928,6 @@ const projectsGetPlatform = async ({ projectId, platformId, parseOutput = true,
|
|
|
921
928
|
*/
|
|
922
929
|
const projectsUpdatePlatform = async ({ projectId, platformId, name, key, store, hostname, parseOutput = true, sdk = undefined}) => {
|
|
923
930
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
924
|
-
|
|
925
931
|
let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
926
932
|
let payload = {};
|
|
927
933
|
if (typeof name !== 'undefined') {
|
|
@@ -937,14 +943,12 @@ const projectsUpdatePlatform = async ({ projectId, platformId, name, key, store,
|
|
|
937
943
|
payload['hostname'] = hostname;
|
|
938
944
|
}
|
|
939
945
|
|
|
940
|
-
|
|
941
946
|
let response = undefined;
|
|
942
|
-
|
|
947
|
+
|
|
943
948
|
response = await client.call('put', apiPath, {
|
|
944
949
|
'content-type': 'application/json',
|
|
945
950
|
}, payload);
|
|
946
951
|
|
|
947
|
-
|
|
948
952
|
if (parseOutput) {
|
|
949
953
|
parse(response)
|
|
950
954
|
success()
|
|
@@ -966,18 +970,15 @@ const projectsUpdatePlatform = async ({ projectId, platformId, name, key, store,
|
|
|
966
970
|
*/
|
|
967
971
|
const projectsDeletePlatform = async ({ projectId, platformId, parseOutput = true, sdk = undefined}) => {
|
|
968
972
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
969
|
-
|
|
970
973
|
let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
971
974
|
let payload = {};
|
|
972
975
|
|
|
973
|
-
|
|
974
976
|
let response = undefined;
|
|
975
|
-
|
|
977
|
+
|
|
976
978
|
response = await client.call('delete', apiPath, {
|
|
977
979
|
'content-type': 'application/json',
|
|
978
980
|
}, payload);
|
|
979
981
|
|
|
980
|
-
|
|
981
982
|
if (parseOutput) {
|
|
982
983
|
parse(response)
|
|
983
984
|
success()
|
|
@@ -989,7 +990,7 @@ const projectsDeletePlatform = async ({ projectId, platformId, parseOutput = tru
|
|
|
989
990
|
/**
|
|
990
991
|
* @typedef {Object} ProjectsUpdateServiceStatusRequestParams
|
|
991
992
|
* @property {string} projectId Project unique ID.
|
|
992
|
-
* @property {
|
|
993
|
+
* @property {ApiService} service Service name.
|
|
993
994
|
* @property {boolean} status Service status.
|
|
994
995
|
* @property {boolean} parseOutput
|
|
995
996
|
* @property {libClient | undefined} sdk
|
|
@@ -1000,7 +1001,6 @@ const projectsDeletePlatform = async ({ projectId, platformId, parseOutput = tru
|
|
|
1000
1001
|
*/
|
|
1001
1002
|
const projectsUpdateServiceStatus = async ({ projectId, service, status, parseOutput = true, sdk = undefined}) => {
|
|
1002
1003
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1003
|
-
|
|
1004
1004
|
let apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
|
|
1005
1005
|
let payload = {};
|
|
1006
1006
|
if (typeof service !== 'undefined') {
|
|
@@ -1010,14 +1010,12 @@ const projectsUpdateServiceStatus = async ({ projectId, service, status, parseOu
|
|
|
1010
1010
|
payload['status'] = status;
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
|
-
|
|
1014
1013
|
let response = undefined;
|
|
1015
|
-
|
|
1014
|
+
|
|
1016
1015
|
response = await client.call('patch', apiPath, {
|
|
1017
1016
|
'content-type': 'application/json',
|
|
1018
1017
|
}, payload);
|
|
1019
1018
|
|
|
1020
|
-
|
|
1021
1019
|
if (parseOutput) {
|
|
1022
1020
|
parse(response)
|
|
1023
1021
|
success()
|
|
@@ -1039,21 +1037,18 @@ const projectsUpdateServiceStatus = async ({ projectId, service, status, parseOu
|
|
|
1039
1037
|
*/
|
|
1040
1038
|
const projectsUpdateServiceStatusAll = async ({ projectId, status, parseOutput = true, sdk = undefined}) => {
|
|
1041
1039
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1042
|
-
|
|
1043
1040
|
let apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
|
|
1044
1041
|
let payload = {};
|
|
1045
1042
|
if (typeof status !== 'undefined') {
|
|
1046
1043
|
payload['status'] = status;
|
|
1047
1044
|
}
|
|
1048
1045
|
|
|
1049
|
-
|
|
1050
1046
|
let response = undefined;
|
|
1051
|
-
|
|
1047
|
+
|
|
1052
1048
|
response = await client.call('patch', apiPath, {
|
|
1053
1049
|
'content-type': 'application/json',
|
|
1054
1050
|
}, payload);
|
|
1055
1051
|
|
|
1056
|
-
|
|
1057
1052
|
if (parseOutput) {
|
|
1058
1053
|
parse(response)
|
|
1059
1054
|
success()
|
|
@@ -1063,7 +1058,7 @@ const projectsUpdateServiceStatusAll = async ({ projectId, status, parseOutput =
|
|
|
1063
1058
|
}
|
|
1064
1059
|
|
|
1065
1060
|
/**
|
|
1066
|
-
* @typedef {Object}
|
|
1061
|
+
* @typedef {Object} ProjectsUpdateSmtpRequestParams
|
|
1067
1062
|
* @property {string} projectId Project unique ID.
|
|
1068
1063
|
* @property {boolean} enabled Enable custom SMTP service
|
|
1069
1064
|
* @property {string} senderName Name of the email sender
|
|
@@ -1073,17 +1068,16 @@ const projectsUpdateServiceStatusAll = async ({ projectId, status, parseOutput =
|
|
|
1073
1068
|
* @property {number} port SMTP server port
|
|
1074
1069
|
* @property {string} username SMTP server username
|
|
1075
1070
|
* @property {string} password SMTP server password
|
|
1076
|
-
* @property {
|
|
1071
|
+
* @property {SMTPSecure} secure Does SMTP server use secure connection
|
|
1077
1072
|
* @property {boolean} parseOutput
|
|
1078
1073
|
* @property {libClient | undefined} sdk
|
|
1079
1074
|
*/
|
|
1080
1075
|
|
|
1081
1076
|
/**
|
|
1082
|
-
* @param {
|
|
1077
|
+
* @param {ProjectsUpdateSmtpRequestParams} params
|
|
1083
1078
|
*/
|
|
1084
|
-
const
|
|
1079
|
+
const projectsUpdateSmtp = async ({ projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure, parseOutput = true, sdk = undefined}) => {
|
|
1085
1080
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1086
|
-
|
|
1087
1081
|
let apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
|
|
1088
1082
|
let payload = {};
|
|
1089
1083
|
if (typeof enabled !== 'undefined') {
|
|
@@ -1114,14 +1108,78 @@ const projectsUpdateSmtpConfiguration = async ({ projectId, enabled, senderName,
|
|
|
1114
1108
|
payload['secure'] = secure;
|
|
1115
1109
|
}
|
|
1116
1110
|
|
|
1117
|
-
|
|
1118
1111
|
let response = undefined;
|
|
1119
|
-
|
|
1112
|
+
|
|
1120
1113
|
response = await client.call('patch', apiPath, {
|
|
1121
1114
|
'content-type': 'application/json',
|
|
1122
1115
|
}, payload);
|
|
1123
1116
|
|
|
1117
|
+
if (parseOutput) {
|
|
1118
|
+
parse(response)
|
|
1119
|
+
success()
|
|
1120
|
+
}
|
|
1124
1121
|
|
|
1122
|
+
return response;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* @typedef {Object} ProjectsCreateSmtpTestRequestParams
|
|
1127
|
+
* @property {string} projectId Project unique ID.
|
|
1128
|
+
* @property {string[]} emails Array of emails to send test email to. Maximum of 10 emails are allowed.
|
|
1129
|
+
* @property {string} senderName Name of the email sender
|
|
1130
|
+
* @property {string} senderEmail Email of the sender
|
|
1131
|
+
* @property {string} host SMTP server host name
|
|
1132
|
+
* @property {string} replyTo Reply to email
|
|
1133
|
+
* @property {number} port SMTP server port
|
|
1134
|
+
* @property {string} username SMTP server username
|
|
1135
|
+
* @property {string} password SMTP server password
|
|
1136
|
+
* @property {SMTPSecure} secure Does SMTP server use secure connection
|
|
1137
|
+
* @property {boolean} parseOutput
|
|
1138
|
+
* @property {libClient | undefined} sdk
|
|
1139
|
+
*/
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* @param {ProjectsCreateSmtpTestRequestParams} params
|
|
1143
|
+
*/
|
|
1144
|
+
const projectsCreateSmtpTest = async ({ projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure, parseOutput = true, sdk = undefined}) => {
|
|
1145
|
+
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1146
|
+
let apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
|
|
1147
|
+
let payload = {};
|
|
1148
|
+
emails = emails === true ? [] : emails;
|
|
1149
|
+
if (typeof emails !== 'undefined') {
|
|
1150
|
+
payload['emails'] = emails;
|
|
1151
|
+
}
|
|
1152
|
+
if (typeof senderName !== 'undefined') {
|
|
1153
|
+
payload['senderName'] = senderName;
|
|
1154
|
+
}
|
|
1155
|
+
if (typeof senderEmail !== 'undefined') {
|
|
1156
|
+
payload['senderEmail'] = senderEmail;
|
|
1157
|
+
}
|
|
1158
|
+
if (typeof replyTo !== 'undefined') {
|
|
1159
|
+
payload['replyTo'] = replyTo;
|
|
1160
|
+
}
|
|
1161
|
+
if (typeof host !== 'undefined') {
|
|
1162
|
+
payload['host'] = host;
|
|
1163
|
+
}
|
|
1164
|
+
if (typeof port !== 'undefined') {
|
|
1165
|
+
payload['port'] = port;
|
|
1166
|
+
}
|
|
1167
|
+
if (typeof username !== 'undefined') {
|
|
1168
|
+
payload['username'] = username;
|
|
1169
|
+
}
|
|
1170
|
+
if (typeof password !== 'undefined') {
|
|
1171
|
+
payload['password'] = password;
|
|
1172
|
+
}
|
|
1173
|
+
if (typeof secure !== 'undefined') {
|
|
1174
|
+
payload['secure'] = secure;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
let response = undefined;
|
|
1178
|
+
|
|
1179
|
+
response = await client.call('post', apiPath, {
|
|
1180
|
+
'content-type': 'application/json',
|
|
1181
|
+
}, payload);
|
|
1182
|
+
|
|
1125
1183
|
if (parseOutput) {
|
|
1126
1184
|
parse(response)
|
|
1127
1185
|
success()
|
|
@@ -1143,21 +1201,18 @@ const projectsUpdateSmtpConfiguration = async ({ projectId, enabled, senderName,
|
|
|
1143
1201
|
*/
|
|
1144
1202
|
const projectsUpdateTeam = async ({ projectId, teamId, parseOutput = true, sdk = undefined}) => {
|
|
1145
1203
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1146
|
-
|
|
1147
1204
|
let apiPath = '/projects/{projectId}/team'.replace('{projectId}', projectId);
|
|
1148
1205
|
let payload = {};
|
|
1149
1206
|
if (typeof teamId !== 'undefined') {
|
|
1150
1207
|
payload['teamId'] = teamId;
|
|
1151
1208
|
}
|
|
1152
1209
|
|
|
1153
|
-
|
|
1154
1210
|
let response = undefined;
|
|
1155
|
-
|
|
1211
|
+
|
|
1156
1212
|
response = await client.call('patch', apiPath, {
|
|
1157
1213
|
'content-type': 'application/json',
|
|
1158
1214
|
}, payload);
|
|
1159
1215
|
|
|
1160
|
-
|
|
1161
1216
|
if (parseOutput) {
|
|
1162
1217
|
parse(response)
|
|
1163
1218
|
success()
|
|
@@ -1169,8 +1224,8 @@ const projectsUpdateTeam = async ({ projectId, teamId, parseOutput = true, sdk =
|
|
|
1169
1224
|
/**
|
|
1170
1225
|
* @typedef {Object} ProjectsGetEmailTemplateRequestParams
|
|
1171
1226
|
* @property {string} projectId Project unique ID.
|
|
1172
|
-
* @property {
|
|
1173
|
-
* @property {
|
|
1227
|
+
* @property {EmailTemplateType} type Template type
|
|
1228
|
+
* @property {EmailTemplateLocale} locale Template locale
|
|
1174
1229
|
* @property {boolean} parseOutput
|
|
1175
1230
|
* @property {libClient | undefined} sdk
|
|
1176
1231
|
*/
|
|
@@ -1180,18 +1235,15 @@ const projectsUpdateTeam = async ({ projectId, teamId, parseOutput = true, sdk =
|
|
|
1180
1235
|
*/
|
|
1181
1236
|
const projectsGetEmailTemplate = async ({ projectId, type, locale, parseOutput = true, sdk = undefined}) => {
|
|
1182
1237
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1183
|
-
|
|
1184
1238
|
let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1185
1239
|
let payload = {};
|
|
1186
1240
|
|
|
1187
|
-
|
|
1188
1241
|
let response = undefined;
|
|
1189
|
-
|
|
1242
|
+
|
|
1190
1243
|
response = await client.call('get', apiPath, {
|
|
1191
1244
|
'content-type': 'application/json',
|
|
1192
1245
|
}, payload);
|
|
1193
1246
|
|
|
1194
|
-
|
|
1195
1247
|
if (parseOutput) {
|
|
1196
1248
|
parse(response)
|
|
1197
1249
|
success()
|
|
@@ -1203,8 +1255,8 @@ const projectsGetEmailTemplate = async ({ projectId, type, locale, parseOutput =
|
|
|
1203
1255
|
/**
|
|
1204
1256
|
* @typedef {Object} ProjectsUpdateEmailTemplateRequestParams
|
|
1205
1257
|
* @property {string} projectId Project unique ID.
|
|
1206
|
-
* @property {
|
|
1207
|
-
* @property {
|
|
1258
|
+
* @property {EmailTemplateType} type Template type
|
|
1259
|
+
* @property {EmailTemplateLocale} locale Template locale
|
|
1208
1260
|
* @property {string} subject Email Subject
|
|
1209
1261
|
* @property {string} message Template message
|
|
1210
1262
|
* @property {string} senderName Name of the email sender
|
|
@@ -1219,7 +1271,6 @@ const projectsGetEmailTemplate = async ({ projectId, type, locale, parseOutput =
|
|
|
1219
1271
|
*/
|
|
1220
1272
|
const projectsUpdateEmailTemplate = async ({ projectId, type, locale, subject, message, senderName, senderEmail, replyTo, parseOutput = true, sdk = undefined}) => {
|
|
1221
1273
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1222
|
-
|
|
1223
1274
|
let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1224
1275
|
let payload = {};
|
|
1225
1276
|
if (typeof subject !== 'undefined') {
|
|
@@ -1238,14 +1289,12 @@ const projectsUpdateEmailTemplate = async ({ projectId, type, locale, subject, m
|
|
|
1238
1289
|
payload['replyTo'] = replyTo;
|
|
1239
1290
|
}
|
|
1240
1291
|
|
|
1241
|
-
|
|
1242
1292
|
let response = undefined;
|
|
1243
|
-
|
|
1293
|
+
|
|
1244
1294
|
response = await client.call('patch', apiPath, {
|
|
1245
1295
|
'content-type': 'application/json',
|
|
1246
1296
|
}, payload);
|
|
1247
1297
|
|
|
1248
|
-
|
|
1249
1298
|
if (parseOutput) {
|
|
1250
1299
|
parse(response)
|
|
1251
1300
|
success()
|
|
@@ -1257,8 +1306,8 @@ const projectsUpdateEmailTemplate = async ({ projectId, type, locale, subject, m
|
|
|
1257
1306
|
/**
|
|
1258
1307
|
* @typedef {Object} ProjectsDeleteEmailTemplateRequestParams
|
|
1259
1308
|
* @property {string} projectId Project unique ID.
|
|
1260
|
-
* @property {
|
|
1261
|
-
* @property {
|
|
1309
|
+
* @property {EmailTemplateType} type Template type
|
|
1310
|
+
* @property {EmailTemplateLocale} locale Template locale
|
|
1262
1311
|
* @property {boolean} parseOutput
|
|
1263
1312
|
* @property {libClient | undefined} sdk
|
|
1264
1313
|
*/
|
|
@@ -1268,18 +1317,15 @@ const projectsUpdateEmailTemplate = async ({ projectId, type, locale, subject, m
|
|
|
1268
1317
|
*/
|
|
1269
1318
|
const projectsDeleteEmailTemplate = async ({ projectId, type, locale, parseOutput = true, sdk = undefined}) => {
|
|
1270
1319
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1271
|
-
|
|
1272
1320
|
let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1273
1321
|
let payload = {};
|
|
1274
1322
|
|
|
1275
|
-
|
|
1276
1323
|
let response = undefined;
|
|
1277
|
-
|
|
1324
|
+
|
|
1278
1325
|
response = await client.call('delete', apiPath, {
|
|
1279
1326
|
'content-type': 'application/json',
|
|
1280
1327
|
}, payload);
|
|
1281
1328
|
|
|
1282
|
-
|
|
1283
1329
|
if (parseOutput) {
|
|
1284
1330
|
parse(response)
|
|
1285
1331
|
success()
|
|
@@ -1291,8 +1337,8 @@ const projectsDeleteEmailTemplate = async ({ projectId, type, locale, parseOutpu
|
|
|
1291
1337
|
/**
|
|
1292
1338
|
* @typedef {Object} ProjectsGetSmsTemplateRequestParams
|
|
1293
1339
|
* @property {string} projectId Project unique ID.
|
|
1294
|
-
* @property {
|
|
1295
|
-
* @property {
|
|
1340
|
+
* @property {SmsTemplateType} type Template type
|
|
1341
|
+
* @property {SmsTemplateLocale} locale Template locale
|
|
1296
1342
|
* @property {boolean} parseOutput
|
|
1297
1343
|
* @property {libClient | undefined} sdk
|
|
1298
1344
|
*/
|
|
@@ -1302,18 +1348,15 @@ const projectsDeleteEmailTemplate = async ({ projectId, type, locale, parseOutpu
|
|
|
1302
1348
|
*/
|
|
1303
1349
|
const projectsGetSmsTemplate = async ({ projectId, type, locale, parseOutput = true, sdk = undefined}) => {
|
|
1304
1350
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1305
|
-
|
|
1306
1351
|
let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1307
1352
|
let payload = {};
|
|
1308
1353
|
|
|
1309
|
-
|
|
1310
1354
|
let response = undefined;
|
|
1311
|
-
|
|
1355
|
+
|
|
1312
1356
|
response = await client.call('get', apiPath, {
|
|
1313
1357
|
'content-type': 'application/json',
|
|
1314
1358
|
}, payload);
|
|
1315
1359
|
|
|
1316
|
-
|
|
1317
1360
|
if (parseOutput) {
|
|
1318
1361
|
parse(response)
|
|
1319
1362
|
success()
|
|
@@ -1325,8 +1368,8 @@ const projectsGetSmsTemplate = async ({ projectId, type, locale, parseOutput = t
|
|
|
1325
1368
|
/**
|
|
1326
1369
|
* @typedef {Object} ProjectsUpdateSmsTemplateRequestParams
|
|
1327
1370
|
* @property {string} projectId Project unique ID.
|
|
1328
|
-
* @property {
|
|
1329
|
-
* @property {
|
|
1371
|
+
* @property {SmsTemplateType} type Template type
|
|
1372
|
+
* @property {SmsTemplateLocale} locale Template locale
|
|
1330
1373
|
* @property {string} message Template message
|
|
1331
1374
|
* @property {boolean} parseOutput
|
|
1332
1375
|
* @property {libClient | undefined} sdk
|
|
@@ -1337,21 +1380,18 @@ const projectsGetSmsTemplate = async ({ projectId, type, locale, parseOutput = t
|
|
|
1337
1380
|
*/
|
|
1338
1381
|
const projectsUpdateSmsTemplate = async ({ projectId, type, locale, message, parseOutput = true, sdk = undefined}) => {
|
|
1339
1382
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1340
|
-
|
|
1341
1383
|
let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1342
1384
|
let payload = {};
|
|
1343
1385
|
if (typeof message !== 'undefined') {
|
|
1344
1386
|
payload['message'] = message;
|
|
1345
1387
|
}
|
|
1346
1388
|
|
|
1347
|
-
|
|
1348
1389
|
let response = undefined;
|
|
1349
|
-
|
|
1390
|
+
|
|
1350
1391
|
response = await client.call('patch', apiPath, {
|
|
1351
1392
|
'content-type': 'application/json',
|
|
1352
1393
|
}, payload);
|
|
1353
1394
|
|
|
1354
|
-
|
|
1355
1395
|
if (parseOutput) {
|
|
1356
1396
|
parse(response)
|
|
1357
1397
|
success()
|
|
@@ -1363,8 +1403,8 @@ const projectsUpdateSmsTemplate = async ({ projectId, type, locale, message, par
|
|
|
1363
1403
|
/**
|
|
1364
1404
|
* @typedef {Object} ProjectsDeleteSmsTemplateRequestParams
|
|
1365
1405
|
* @property {string} projectId Project unique ID.
|
|
1366
|
-
* @property {
|
|
1367
|
-
* @property {
|
|
1406
|
+
* @property {SmsTemplateType} type Template type
|
|
1407
|
+
* @property {SmsTemplateLocale} locale Template locale
|
|
1368
1408
|
* @property {boolean} parseOutput
|
|
1369
1409
|
* @property {libClient | undefined} sdk
|
|
1370
1410
|
*/
|
|
@@ -1374,54 +1414,15 @@ const projectsUpdateSmsTemplate = async ({ projectId, type, locale, message, par
|
|
|
1374
1414
|
*/
|
|
1375
1415
|
const projectsDeleteSmsTemplate = async ({ projectId, type, locale, parseOutput = true, sdk = undefined}) => {
|
|
1376
1416
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1377
|
-
|
|
1378
1417
|
let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1379
1418
|
let payload = {};
|
|
1380
1419
|
|
|
1381
|
-
|
|
1382
1420
|
let response = undefined;
|
|
1383
|
-
|
|
1384
|
-
response = await client.call('delete', apiPath, {
|
|
1385
|
-
'content-type': 'application/json',
|
|
1386
|
-
}, payload);
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
if (parseOutput) {
|
|
1390
|
-
parse(response)
|
|
1391
|
-
success()
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
return response;
|
|
1395
|
-
}
|
|
1396
1421
|
|
|
1397
|
-
|
|
1398
|
-
* @typedef {Object} ProjectsGetUsageRequestParams
|
|
1399
|
-
* @property {string} projectId Project unique ID.
|
|
1400
|
-
* @property {string} range Date range.
|
|
1401
|
-
* @property {boolean} parseOutput
|
|
1402
|
-
* @property {libClient | undefined} sdk
|
|
1403
|
-
*/
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
* @param {ProjectsGetUsageRequestParams} params
|
|
1407
|
-
*/
|
|
1408
|
-
const projectsGetUsage = async ({ projectId, range, parseOutput = true, sdk = undefined}) => {
|
|
1409
|
-
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1410
|
-
|
|
1411
|
-
let apiPath = '/projects/{projectId}/usage'.replace('{projectId}', projectId);
|
|
1412
|
-
let payload = {};
|
|
1413
|
-
if (typeof range !== 'undefined') {
|
|
1414
|
-
payload['range'] = range;
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
let response = undefined;
|
|
1419
|
-
|
|
1420
|
-
response = await client.call('get', apiPath, {
|
|
1422
|
+
response = await client.call('delete', apiPath, {
|
|
1421
1423
|
'content-type': 'application/json',
|
|
1422
1424
|
}, payload);
|
|
1423
1425
|
|
|
1424
|
-
|
|
1425
1426
|
if (parseOutput) {
|
|
1426
1427
|
parse(response)
|
|
1427
1428
|
success()
|
|
@@ -1442,18 +1443,15 @@ const projectsGetUsage = async ({ projectId, range, parseOutput = true, sdk = un
|
|
|
1442
1443
|
*/
|
|
1443
1444
|
const projectsListWebhooks = async ({ projectId, parseOutput = true, sdk = undefined}) => {
|
|
1444
1445
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1445
|
-
|
|
1446
1446
|
let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
|
|
1447
1447
|
let payload = {};
|
|
1448
1448
|
|
|
1449
|
-
|
|
1450
1449
|
let response = undefined;
|
|
1451
|
-
|
|
1450
|
+
|
|
1452
1451
|
response = await client.call('get', apiPath, {
|
|
1453
1452
|
'content-type': 'application/json',
|
|
1454
1453
|
}, payload);
|
|
1455
1454
|
|
|
1456
|
-
|
|
1457
1455
|
if (parseOutput) {
|
|
1458
1456
|
parse(response)
|
|
1459
1457
|
success()
|
|
@@ -1469,6 +1467,7 @@ const projectsListWebhooks = async ({ projectId, parseOutput = true, sdk = undef
|
|
|
1469
1467
|
* @property {string[]} events Events list. Maximum of 100 events are allowed.
|
|
1470
1468
|
* @property {string} url Webhook URL.
|
|
1471
1469
|
* @property {boolean} security Certificate verification, false for disabled or true for enabled.
|
|
1470
|
+
* @property {boolean} enabled Enable or disable a webhook.
|
|
1472
1471
|
* @property {string} httpUser Webhook HTTP user. Max length: 256 chars.
|
|
1473
1472
|
* @property {string} httpPass Webhook HTTP password. Max length: 256 chars.
|
|
1474
1473
|
* @property {boolean} parseOutput
|
|
@@ -1478,14 +1477,16 @@ const projectsListWebhooks = async ({ projectId, parseOutput = true, sdk = undef
|
|
|
1478
1477
|
/**
|
|
1479
1478
|
* @param {ProjectsCreateWebhookRequestParams} params
|
|
1480
1479
|
*/
|
|
1481
|
-
const projectsCreateWebhook = async ({ projectId, name, events, url, security, httpUser, httpPass, parseOutput = true, sdk = undefined}) => {
|
|
1480
|
+
const projectsCreateWebhook = async ({ projectId, name, events, url, security, enabled, httpUser, httpPass, parseOutput = true, sdk = undefined}) => {
|
|
1482
1481
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1483
|
-
|
|
1484
1482
|
let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
|
|
1485
1483
|
let payload = {};
|
|
1486
1484
|
if (typeof name !== 'undefined') {
|
|
1487
1485
|
payload['name'] = name;
|
|
1488
1486
|
}
|
|
1487
|
+
if (typeof enabled !== 'undefined') {
|
|
1488
|
+
payload['enabled'] = enabled;
|
|
1489
|
+
}
|
|
1489
1490
|
events = events === true ? [] : events;
|
|
1490
1491
|
if (typeof events !== 'undefined') {
|
|
1491
1492
|
payload['events'] = events;
|
|
@@ -1503,14 +1504,12 @@ const projectsCreateWebhook = async ({ projectId, name, events, url, security, h
|
|
|
1503
1504
|
payload['httpPass'] = httpPass;
|
|
1504
1505
|
}
|
|
1505
1506
|
|
|
1506
|
-
|
|
1507
1507
|
let response = undefined;
|
|
1508
|
-
|
|
1508
|
+
|
|
1509
1509
|
response = await client.call('post', apiPath, {
|
|
1510
1510
|
'content-type': 'application/json',
|
|
1511
1511
|
}, payload);
|
|
1512
1512
|
|
|
1513
|
-
|
|
1514
1513
|
if (parseOutput) {
|
|
1515
1514
|
parse(response)
|
|
1516
1515
|
success()
|
|
@@ -1532,18 +1531,15 @@ const projectsCreateWebhook = async ({ projectId, name, events, url, security, h
|
|
|
1532
1531
|
*/
|
|
1533
1532
|
const projectsGetWebhook = async ({ projectId, webhookId, parseOutput = true, sdk = undefined}) => {
|
|
1534
1533
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1535
|
-
|
|
1536
1534
|
let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1537
1535
|
let payload = {};
|
|
1538
1536
|
|
|
1539
|
-
|
|
1540
1537
|
let response = undefined;
|
|
1541
|
-
|
|
1538
|
+
|
|
1542
1539
|
response = await client.call('get', apiPath, {
|
|
1543
1540
|
'content-type': 'application/json',
|
|
1544
1541
|
}, payload);
|
|
1545
1542
|
|
|
1546
|
-
|
|
1547
1543
|
if (parseOutput) {
|
|
1548
1544
|
parse(response)
|
|
1549
1545
|
success()
|
|
@@ -1560,6 +1556,7 @@ const projectsGetWebhook = async ({ projectId, webhookId, parseOutput = true, sd
|
|
|
1560
1556
|
* @property {string[]} events Events list. Maximum of 100 events are allowed.
|
|
1561
1557
|
* @property {string} url Webhook URL.
|
|
1562
1558
|
* @property {boolean} security Certificate verification, false for disabled or true for enabled.
|
|
1559
|
+
* @property {boolean} enabled Enable or disable a webhook.
|
|
1563
1560
|
* @property {string} httpUser Webhook HTTP user. Max length: 256 chars.
|
|
1564
1561
|
* @property {string} httpPass Webhook HTTP password. Max length: 256 chars.
|
|
1565
1562
|
* @property {boolean} parseOutput
|
|
@@ -1569,14 +1566,16 @@ const projectsGetWebhook = async ({ projectId, webhookId, parseOutput = true, sd
|
|
|
1569
1566
|
/**
|
|
1570
1567
|
* @param {ProjectsUpdateWebhookRequestParams} params
|
|
1571
1568
|
*/
|
|
1572
|
-
const projectsUpdateWebhook = async ({ projectId, webhookId, name, events, url, security, httpUser, httpPass, parseOutput = true, sdk = undefined}) => {
|
|
1569
|
+
const projectsUpdateWebhook = async ({ projectId, webhookId, name, events, url, security, enabled, httpUser, httpPass, parseOutput = true, sdk = undefined}) => {
|
|
1573
1570
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1574
|
-
|
|
1575
1571
|
let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1576
1572
|
let payload = {};
|
|
1577
1573
|
if (typeof name !== 'undefined') {
|
|
1578
1574
|
payload['name'] = name;
|
|
1579
1575
|
}
|
|
1576
|
+
if (typeof enabled !== 'undefined') {
|
|
1577
|
+
payload['enabled'] = enabled;
|
|
1578
|
+
}
|
|
1580
1579
|
events = events === true ? [] : events;
|
|
1581
1580
|
if (typeof events !== 'undefined') {
|
|
1582
1581
|
payload['events'] = events;
|
|
@@ -1594,14 +1593,12 @@ const projectsUpdateWebhook = async ({ projectId, webhookId, name, events, url,
|
|
|
1594
1593
|
payload['httpPass'] = httpPass;
|
|
1595
1594
|
}
|
|
1596
1595
|
|
|
1597
|
-
|
|
1598
1596
|
let response = undefined;
|
|
1599
|
-
|
|
1597
|
+
|
|
1600
1598
|
response = await client.call('put', apiPath, {
|
|
1601
1599
|
'content-type': 'application/json',
|
|
1602
1600
|
}, payload);
|
|
1603
1601
|
|
|
1604
|
-
|
|
1605
1602
|
if (parseOutput) {
|
|
1606
1603
|
parse(response)
|
|
1607
1604
|
success()
|
|
@@ -1623,18 +1620,15 @@ const projectsUpdateWebhook = async ({ projectId, webhookId, name, events, url,
|
|
|
1623
1620
|
*/
|
|
1624
1621
|
const projectsDeleteWebhook = async ({ projectId, webhookId, parseOutput = true, sdk = undefined}) => {
|
|
1625
1622
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1626
|
-
|
|
1627
1623
|
let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1628
1624
|
let payload = {};
|
|
1629
1625
|
|
|
1630
|
-
|
|
1631
1626
|
let response = undefined;
|
|
1632
|
-
|
|
1627
|
+
|
|
1633
1628
|
response = await client.call('delete', apiPath, {
|
|
1634
1629
|
'content-type': 'application/json',
|
|
1635
1630
|
}, payload);
|
|
1636
1631
|
|
|
1637
|
-
|
|
1638
1632
|
if (parseOutput) {
|
|
1639
1633
|
parse(response)
|
|
1640
1634
|
success()
|
|
@@ -1656,18 +1650,15 @@ const projectsDeleteWebhook = async ({ projectId, webhookId, parseOutput = true,
|
|
|
1656
1650
|
*/
|
|
1657
1651
|
const projectsUpdateWebhookSignature = async ({ projectId, webhookId, parseOutput = true, sdk = undefined}) => {
|
|
1658
1652
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1659
|
-
|
|
1660
1653
|
let apiPath = '/projects/{projectId}/webhooks/{webhookId}/signature'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1661
1654
|
let payload = {};
|
|
1662
1655
|
|
|
1663
|
-
|
|
1664
1656
|
let response = undefined;
|
|
1665
|
-
|
|
1657
|
+
|
|
1666
1658
|
response = await client.call('patch', apiPath, {
|
|
1667
1659
|
'content-type': 'application/json',
|
|
1668
1660
|
}, payload);
|
|
1669
1661
|
|
|
1670
|
-
|
|
1671
1662
|
if (parseOutput) {
|
|
1672
1663
|
parse(response)
|
|
1673
1664
|
success()
|
|
@@ -1676,7 +1667,6 @@ const projectsUpdateWebhookSignature = async ({ projectId, webhookId, parseOutpu
|
|
|
1676
1667
|
return response;
|
|
1677
1668
|
}
|
|
1678
1669
|
|
|
1679
|
-
|
|
1680
1670
|
projects
|
|
1681
1671
|
.command(`list`)
|
|
1682
1672
|
.description(``)
|
|
@@ -1730,6 +1720,21 @@ projects
|
|
|
1730
1720
|
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1731
1721
|
.action(actionRunner(projectsDelete))
|
|
1732
1722
|
|
|
1723
|
+
projects
|
|
1724
|
+
.command(`updateApiStatus`)
|
|
1725
|
+
.description(``)
|
|
1726
|
+
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1727
|
+
.requiredOption(`--api <api>`, `API name.`)
|
|
1728
|
+
.requiredOption(`--status <status>`, `API status.`, parseBool)
|
|
1729
|
+
.action(actionRunner(projectsUpdateApiStatus))
|
|
1730
|
+
|
|
1731
|
+
projects
|
|
1732
|
+
.command(`updateApiStatusAll`)
|
|
1733
|
+
.description(``)
|
|
1734
|
+
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1735
|
+
.requiredOption(`--status <status>`, `API status.`, parseBool)
|
|
1736
|
+
.action(actionRunner(projectsUpdateApiStatusAll))
|
|
1737
|
+
|
|
1733
1738
|
projects
|
|
1734
1739
|
.command(`updateAuthDuration`)
|
|
1735
1740
|
.description(``)
|
|
@@ -1776,7 +1781,7 @@ projects
|
|
|
1776
1781
|
.command(`updateAuthStatus`)
|
|
1777
1782
|
.description(``)
|
|
1778
1783
|
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1779
|
-
.requiredOption(`--method <method>`, `Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone`)
|
|
1784
|
+
.requiredOption(`--method <method>`, `Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone`)
|
|
1780
1785
|
.requiredOption(`--status <status>`, `Set the status of this auth method.`, parseBool)
|
|
1781
1786
|
.action(actionRunner(projectsUpdateAuthStatus))
|
|
1782
1787
|
|
|
@@ -1792,7 +1797,7 @@ projects
|
|
|
1792
1797
|
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1793
1798
|
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
1794
1799
|
.requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
|
|
1795
|
-
.option(`--expire <expire>`, `Expiration time in ISO 8601 format. Use null for unlimited expiration.`)
|
|
1800
|
+
.option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`)
|
|
1796
1801
|
.action(actionRunner(projectsCreateKey))
|
|
1797
1802
|
|
|
1798
1803
|
projects
|
|
@@ -1809,7 +1814,7 @@ projects
|
|
|
1809
1814
|
.requiredOption(`--keyId <keyId>`, `Key unique ID.`)
|
|
1810
1815
|
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
1811
1816
|
.requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 events are allowed.`)
|
|
1812
|
-
.option(`--expire <expire>`, `Expiration time in ISO 8601 format. Use null for unlimited expiration.`)
|
|
1817
|
+
.option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`)
|
|
1813
1818
|
.action(actionRunner(projectsUpdateKey))
|
|
1814
1819
|
|
|
1815
1820
|
projects
|
|
@@ -1887,7 +1892,7 @@ projects
|
|
|
1887
1892
|
.action(actionRunner(projectsUpdateServiceStatusAll))
|
|
1888
1893
|
|
|
1889
1894
|
projects
|
|
1890
|
-
.command(`
|
|
1895
|
+
.command(`updateSmtp`)
|
|
1891
1896
|
.description(``)
|
|
1892
1897
|
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1893
1898
|
.requiredOption(`--enabled <enabled>`, `Enable custom SMTP service`, parseBool)
|
|
@@ -1899,7 +1904,22 @@ projects
|
|
|
1899
1904
|
.option(`--username <username>`, `SMTP server username`)
|
|
1900
1905
|
.option(`--password <password>`, `SMTP server password`)
|
|
1901
1906
|
.option(`--secure <secure>`, `Does SMTP server use secure connection`)
|
|
1902
|
-
.action(actionRunner(
|
|
1907
|
+
.action(actionRunner(projectsUpdateSmtp))
|
|
1908
|
+
|
|
1909
|
+
projects
|
|
1910
|
+
.command(`createSmtpTest`)
|
|
1911
|
+
.description(``)
|
|
1912
|
+
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1913
|
+
.requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`)
|
|
1914
|
+
.requiredOption(`--senderName <senderName>`, `Name of the email sender`)
|
|
1915
|
+
.requiredOption(`--senderEmail <senderEmail>`, `Email of the sender`)
|
|
1916
|
+
.requiredOption(`--host <host>`, `SMTP server host name`)
|
|
1917
|
+
.option(`--replyTo <replyTo>`, `Reply to email`)
|
|
1918
|
+
.option(`--port <port>`, `SMTP server port`, parseInteger)
|
|
1919
|
+
.option(`--username <username>`, `SMTP server username`)
|
|
1920
|
+
.option(`--password <password>`, `SMTP server password`)
|
|
1921
|
+
.option(`--secure <secure>`, `Does SMTP server use secure connection`)
|
|
1922
|
+
.action(actionRunner(projectsCreateSmtpTest))
|
|
1903
1923
|
|
|
1904
1924
|
projects
|
|
1905
1925
|
.command(`updateTeam`)
|
|
@@ -1962,13 +1982,6 @@ projects
|
|
|
1962
1982
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1963
1983
|
.action(actionRunner(projectsDeleteSmsTemplate))
|
|
1964
1984
|
|
|
1965
|
-
projects
|
|
1966
|
-
.command(`getUsage`)
|
|
1967
|
-
.description(``)
|
|
1968
|
-
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1969
|
-
.option(`--range <range>`, `Date range.`)
|
|
1970
|
-
.action(actionRunner(projectsGetUsage))
|
|
1971
|
-
|
|
1972
1985
|
projects
|
|
1973
1986
|
.command(`listWebhooks`)
|
|
1974
1987
|
.description(``)
|
|
@@ -1983,6 +1996,7 @@ projects
|
|
|
1983
1996
|
.requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
|
|
1984
1997
|
.requiredOption(`--url <url>`, `Webhook URL.`)
|
|
1985
1998
|
.requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool)
|
|
1999
|
+
.option(`--enabled <enabled>`, `Enable or disable a webhook.`, parseBool)
|
|
1986
2000
|
.option(`--httpUser <httpUser>`, `Webhook HTTP user. Max length: 256 chars.`)
|
|
1987
2001
|
.option(`--httpPass <httpPass>`, `Webhook HTTP password. Max length: 256 chars.`)
|
|
1988
2002
|
.action(actionRunner(projectsCreateWebhook))
|
|
@@ -2003,6 +2017,7 @@ projects
|
|
|
2003
2017
|
.requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
|
|
2004
2018
|
.requiredOption(`--url <url>`, `Webhook URL.`)
|
|
2005
2019
|
.requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool)
|
|
2020
|
+
.option(`--enabled <enabled>`, `Enable or disable a webhook.`, parseBool)
|
|
2006
2021
|
.option(`--httpUser <httpUser>`, `Webhook HTTP user. Max length: 256 chars.`)
|
|
2007
2022
|
.option(`--httpPass <httpPass>`, `Webhook HTTP password. Max length: 256 chars.`)
|
|
2008
2023
|
.action(actionRunner(projectsUpdateWebhook))
|
|
@@ -2021,47 +2036,48 @@ projects
|
|
|
2021
2036
|
.requiredOption(`--webhookId <webhookId>`, `Webhook unique ID.`)
|
|
2022
2037
|
.action(actionRunner(projectsUpdateWebhookSignature))
|
|
2023
2038
|
|
|
2024
|
-
|
|
2025
2039
|
module.exports = {
|
|
2026
2040
|
projects,
|
|
2027
|
-
projectsList,
|
|
2028
|
-
projectsCreate,
|
|
2029
|
-
projectsGet,
|
|
2030
|
-
projectsUpdate,
|
|
2031
|
-
projectsDelete,
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2041
|
+
projectsList,
|
|
2042
|
+
projectsCreate,
|
|
2043
|
+
projectsGet,
|
|
2044
|
+
projectsUpdate,
|
|
2045
|
+
projectsDelete,
|
|
2046
|
+
projectsUpdateApiStatus,
|
|
2047
|
+
projectsUpdateApiStatusAll,
|
|
2048
|
+
projectsUpdateAuthDuration,
|
|
2049
|
+
projectsUpdateAuthLimit,
|
|
2050
|
+
projectsUpdateAuthSessionsLimit,
|
|
2051
|
+
projectsUpdateAuthPasswordDictionary,
|
|
2052
|
+
projectsUpdateAuthPasswordHistory,
|
|
2053
|
+
projectsUpdatePersonalDataCheck,
|
|
2054
|
+
projectsUpdateAuthStatus,
|
|
2055
|
+
projectsListKeys,
|
|
2056
|
+
projectsCreateKey,
|
|
2057
|
+
projectsGetKey,
|
|
2058
|
+
projectsUpdateKey,
|
|
2059
|
+
projectsDeleteKey,
|
|
2060
|
+
projectsUpdateOAuth2,
|
|
2061
|
+
projectsListPlatforms,
|
|
2062
|
+
projectsCreatePlatform,
|
|
2063
|
+
projectsGetPlatform,
|
|
2064
|
+
projectsUpdatePlatform,
|
|
2065
|
+
projectsDeletePlatform,
|
|
2066
|
+
projectsUpdateServiceStatus,
|
|
2067
|
+
projectsUpdateServiceStatusAll,
|
|
2068
|
+
projectsUpdateSmtp,
|
|
2069
|
+
projectsCreateSmtpTest,
|
|
2070
|
+
projectsUpdateTeam,
|
|
2071
|
+
projectsGetEmailTemplate,
|
|
2072
|
+
projectsUpdateEmailTemplate,
|
|
2073
|
+
projectsDeleteEmailTemplate,
|
|
2074
|
+
projectsGetSmsTemplate,
|
|
2075
|
+
projectsUpdateSmsTemplate,
|
|
2076
|
+
projectsDeleteSmsTemplate,
|
|
2077
|
+
projectsListWebhooks,
|
|
2078
|
+
projectsCreateWebhook,
|
|
2079
|
+
projectsGetWebhook,
|
|
2080
|
+
projectsUpdateWebhook,
|
|
2081
|
+
projectsDeleteWebhook,
|
|
2082
|
+
projectsUpdateWebhookSignature
|
|
2067
2083
|
};
|