appwrite-cli 4.2.2 → 5.0.1
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 +5 -5
- package/install.sh +4 -4
- package/lib/client.js +4 -4
- package/lib/commands/account.js +906 -226
- package/lib/commands/avatars.js +3 -3
- package/lib/commands/databases.js +22 -22
- package/lib/commands/deploy.js +45 -6
- package/lib/commands/functions.js +5 -5
- package/lib/commands/generic.js +2 -2
- package/lib/commands/health.js +193 -1
- package/lib/commands/messaging.js +2815 -0
- package/lib/commands/migrations.js +2 -2
- package/lib/commands/project.js +15 -5
- package/lib/commands/projects.js +210 -72
- package/lib/commands/proxy.js +1 -1
- package/lib/commands/storage.js +6 -6
- package/lib/commands/teams.js +2 -2
- package/lib/commands/users.js +545 -14
- package/lib/paginate.js +2 -2
- package/lib/parser.js +2 -1
- 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
|
@@ -41,7 +41,7 @@ const migrations = new Command("migrations").description(commandDescriptions['mi
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* @typedef {Object} MigrationsListRequestParams
|
|
44
|
-
* @property {string} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, resources, statusCounters, resourceData, errors
|
|
44
|
+
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, resources, statusCounters, resourceData, errors
|
|
45
45
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
46
46
|
* @property {boolean} parseOutput
|
|
47
47
|
* @property {libClient | undefined} sdk
|
|
@@ -690,7 +690,7 @@ const migrationsDelete = async ({ migrationId, parseOutput = true, sdk = undefin
|
|
|
690
690
|
migrations
|
|
691
691
|
.command(`list`)
|
|
692
692
|
.description(``)
|
|
693
|
-
.option(`--queries
|
|
693
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, resources, statusCounters, resourceData, errors`)
|
|
694
694
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
695
695
|
.action(actionRunner(migrationsList))
|
|
696
696
|
|
package/lib/commands/project.js
CHANGED
|
@@ -41,7 +41,9 @@ const project = new Command("project").description(commandDescriptions['project'
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* @typedef {Object} ProjectGetUsageRequestParams
|
|
44
|
-
* @property {string}
|
|
44
|
+
* @property {string} startDate Starting date for the usage
|
|
45
|
+
* @property {string} endDate End date for the usage
|
|
46
|
+
* @property {ProjectUsageRange} period Period used
|
|
45
47
|
* @property {boolean} parseOutput
|
|
46
48
|
* @property {libClient | undefined} sdk
|
|
47
49
|
*/
|
|
@@ -49,12 +51,18 @@ const project = new Command("project").description(commandDescriptions['project'
|
|
|
49
51
|
/**
|
|
50
52
|
* @param {ProjectGetUsageRequestParams} params
|
|
51
53
|
*/
|
|
52
|
-
const projectGetUsage = async ({
|
|
54
|
+
const projectGetUsage = async ({ startDate, endDate, period, parseOutput = true, sdk = undefined}) => {
|
|
53
55
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
54
56
|
let apiPath = '/project/usage';
|
|
55
57
|
let payload = {};
|
|
56
|
-
if (typeof
|
|
57
|
-
payload['
|
|
58
|
+
if (typeof startDate !== 'undefined') {
|
|
59
|
+
payload['startDate'] = startDate;
|
|
60
|
+
}
|
|
61
|
+
if (typeof endDate !== 'undefined') {
|
|
62
|
+
payload['endDate'] = endDate;
|
|
63
|
+
}
|
|
64
|
+
if (typeof period !== 'undefined') {
|
|
65
|
+
payload['period'] = period;
|
|
58
66
|
}
|
|
59
67
|
|
|
60
68
|
let response = undefined;
|
|
@@ -233,7 +241,9 @@ const projectDeleteVariable = async ({ variableId, parseOutput = true, sdk = und
|
|
|
233
241
|
project
|
|
234
242
|
.command(`getUsage`)
|
|
235
243
|
.description(``)
|
|
236
|
-
.
|
|
244
|
+
.requiredOption(`--startDate <startDate>`, `Starting date for the usage`)
|
|
245
|
+
.requiredOption(`--endDate <endDate>`, `End date for the usage`)
|
|
246
|
+
.option(`--period <period>`, `Period used`)
|
|
237
247
|
.action(actionRunner(projectGetUsage))
|
|
238
248
|
|
|
239
249
|
project
|
package/lib/commands/projects.js
CHANGED
|
@@ -80,7 +80,7 @@ const projectsList = async ({ queries, search, parseOutput = true, sdk = undefin
|
|
|
80
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.
|
|
81
81
|
* @property {string} name Project name. Max length: 128 chars.
|
|
82
82
|
* @property {string} teamId Team unique ID.
|
|
83
|
-
* @property {
|
|
83
|
+
* @property {Region} region Project Region.
|
|
84
84
|
* @property {string} description Project description. Max length: 256 chars.
|
|
85
85
|
* @property {string} logo Project logo.
|
|
86
86
|
* @property {string} url Project URL.
|
|
@@ -282,6 +282,76 @@ const projectsDelete = async ({ projectId, parseOutput = true, sdk = undefined})
|
|
|
282
282
|
return response;
|
|
283
283
|
}
|
|
284
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
|
+
|
|
347
|
+
if (parseOutput) {
|
|
348
|
+
parse(response)
|
|
349
|
+
success()
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
return response;
|
|
353
|
+
}
|
|
354
|
+
|
|
285
355
|
/**
|
|
286
356
|
* @typedef {Object} ProjectsUpdateAuthDurationRequestParams
|
|
287
357
|
* @property {string} projectId Project unique ID.
|
|
@@ -483,7 +553,7 @@ const projectsUpdatePersonalDataCheck = async ({ projectId, enabled, parseOutput
|
|
|
483
553
|
/**
|
|
484
554
|
* @typedef {Object} ProjectsUpdateAuthStatusRequestParams
|
|
485
555
|
* @property {string} projectId Project unique ID.
|
|
486
|
-
* @property {
|
|
556
|
+
* @property {AuthMethod} method Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
|
|
487
557
|
* @property {boolean} status Set the status of this auth method.
|
|
488
558
|
* @property {boolean} parseOutput
|
|
489
559
|
* @property {libClient | undefined} sdk
|
|
@@ -548,7 +618,7 @@ const projectsListKeys = async ({ projectId, parseOutput = true, sdk = undefined
|
|
|
548
618
|
* @property {string} projectId Project unique ID.
|
|
549
619
|
* @property {string} name Key name. Max length: 128 chars.
|
|
550
620
|
* @property {string[]} scopes Key scopes list. Maximum of 100 scopes are allowed.
|
|
551
|
-
* @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.
|
|
552
622
|
* @property {boolean} parseOutput
|
|
553
623
|
* @property {libClient | undefined} sdk
|
|
554
624
|
*/
|
|
@@ -621,7 +691,7 @@ const projectsGetKey = async ({ projectId, keyId, parseOutput = true, sdk = unde
|
|
|
621
691
|
* @property {string} keyId Key unique ID.
|
|
622
692
|
* @property {string} name Key name. Max length: 128 chars.
|
|
623
693
|
* @property {string[]} scopes Key scopes list. Maximum of 100 events are allowed.
|
|
624
|
-
* @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.
|
|
625
695
|
* @property {boolean} parseOutput
|
|
626
696
|
* @property {libClient | undefined} sdk
|
|
627
697
|
*/
|
|
@@ -691,7 +761,7 @@ const projectsDeleteKey = async ({ projectId, keyId, parseOutput = true, sdk = u
|
|
|
691
761
|
/**
|
|
692
762
|
* @typedef {Object} ProjectsUpdateOAuth2RequestParams
|
|
693
763
|
* @property {string} projectId Project unique ID.
|
|
694
|
-
* @property {
|
|
764
|
+
* @property {OAuthProvider} provider Provider Name
|
|
695
765
|
* @property {string} appId Provider app ID. Max length: 256 chars.
|
|
696
766
|
* @property {string} secret Provider secret key. Max length: 512 chars.
|
|
697
767
|
* @property {boolean} enabled Provider status. Set to 'false' to disable new session creation.
|
|
@@ -765,7 +835,7 @@ const projectsListPlatforms = async ({ projectId, parseOutput = true, sdk = unde
|
|
|
765
835
|
/**
|
|
766
836
|
* @typedef {Object} ProjectsCreatePlatformRequestParams
|
|
767
837
|
* @property {string} projectId Project unique ID.
|
|
768
|
-
* @property {
|
|
838
|
+
* @property {PlatformType} type Platform type.
|
|
769
839
|
* @property {string} name Platform name. Max length: 128 chars.
|
|
770
840
|
* @property {string} key Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.
|
|
771
841
|
* @property {string} store App store or Google Play store ID. Max length: 256 chars.
|
|
@@ -920,7 +990,7 @@ const projectsDeletePlatform = async ({ projectId, platformId, parseOutput = tru
|
|
|
920
990
|
/**
|
|
921
991
|
* @typedef {Object} ProjectsUpdateServiceStatusRequestParams
|
|
922
992
|
* @property {string} projectId Project unique ID.
|
|
923
|
-
* @property {
|
|
993
|
+
* @property {ApiService} service Service name.
|
|
924
994
|
* @property {boolean} status Service status.
|
|
925
995
|
* @property {boolean} parseOutput
|
|
926
996
|
* @property {libClient | undefined} sdk
|
|
@@ -988,7 +1058,7 @@ const projectsUpdateServiceStatusAll = async ({ projectId, status, parseOutput =
|
|
|
988
1058
|
}
|
|
989
1059
|
|
|
990
1060
|
/**
|
|
991
|
-
* @typedef {Object}
|
|
1061
|
+
* @typedef {Object} ProjectsUpdateSmtpRequestParams
|
|
992
1062
|
* @property {string} projectId Project unique ID.
|
|
993
1063
|
* @property {boolean} enabled Enable custom SMTP service
|
|
994
1064
|
* @property {string} senderName Name of the email sender
|
|
@@ -998,15 +1068,15 @@ const projectsUpdateServiceStatusAll = async ({ projectId, status, parseOutput =
|
|
|
998
1068
|
* @property {number} port SMTP server port
|
|
999
1069
|
* @property {string} username SMTP server username
|
|
1000
1070
|
* @property {string} password SMTP server password
|
|
1001
|
-
* @property {
|
|
1071
|
+
* @property {SMTPSecure} secure Does SMTP server use secure connection
|
|
1002
1072
|
* @property {boolean} parseOutput
|
|
1003
1073
|
* @property {libClient | undefined} sdk
|
|
1004
1074
|
*/
|
|
1005
1075
|
|
|
1006
1076
|
/**
|
|
1007
|
-
* @param {
|
|
1077
|
+
* @param {ProjectsUpdateSmtpRequestParams} params
|
|
1008
1078
|
*/
|
|
1009
|
-
const
|
|
1079
|
+
const projectsUpdateSmtp = async ({ projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure, parseOutput = true, sdk = undefined}) => {
|
|
1010
1080
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1011
1081
|
let apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
|
|
1012
1082
|
let payload = {};
|
|
@@ -1052,6 +1122,72 @@ const projectsUpdateSmtpConfiguration = async ({ projectId, enabled, senderName,
|
|
|
1052
1122
|
return response;
|
|
1053
1123
|
}
|
|
1054
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
|
+
|
|
1183
|
+
if (parseOutput) {
|
|
1184
|
+
parse(response)
|
|
1185
|
+
success()
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
return response;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1055
1191
|
/**
|
|
1056
1192
|
* @typedef {Object} ProjectsUpdateTeamRequestParams
|
|
1057
1193
|
* @property {string} projectId Project unique ID.
|
|
@@ -1088,8 +1224,8 @@ const projectsUpdateTeam = async ({ projectId, teamId, parseOutput = true, sdk =
|
|
|
1088
1224
|
/**
|
|
1089
1225
|
* @typedef {Object} ProjectsGetEmailTemplateRequestParams
|
|
1090
1226
|
* @property {string} projectId Project unique ID.
|
|
1091
|
-
* @property {
|
|
1092
|
-
* @property {
|
|
1227
|
+
* @property {EmailTemplateType} type Template type
|
|
1228
|
+
* @property {EmailTemplateLocale} locale Template locale
|
|
1093
1229
|
* @property {boolean} parseOutput
|
|
1094
1230
|
* @property {libClient | undefined} sdk
|
|
1095
1231
|
*/
|
|
@@ -1119,8 +1255,8 @@ const projectsGetEmailTemplate = async ({ projectId, type, locale, parseOutput =
|
|
|
1119
1255
|
/**
|
|
1120
1256
|
* @typedef {Object} ProjectsUpdateEmailTemplateRequestParams
|
|
1121
1257
|
* @property {string} projectId Project unique ID.
|
|
1122
|
-
* @property {
|
|
1123
|
-
* @property {
|
|
1258
|
+
* @property {EmailTemplateType} type Template type
|
|
1259
|
+
* @property {EmailTemplateLocale} locale Template locale
|
|
1124
1260
|
* @property {string} subject Email Subject
|
|
1125
1261
|
* @property {string} message Template message
|
|
1126
1262
|
* @property {string} senderName Name of the email sender
|
|
@@ -1170,8 +1306,8 @@ const projectsUpdateEmailTemplate = async ({ projectId, type, locale, subject, m
|
|
|
1170
1306
|
/**
|
|
1171
1307
|
* @typedef {Object} ProjectsDeleteEmailTemplateRequestParams
|
|
1172
1308
|
* @property {string} projectId Project unique ID.
|
|
1173
|
-
* @property {
|
|
1174
|
-
* @property {
|
|
1309
|
+
* @property {EmailTemplateType} type Template type
|
|
1310
|
+
* @property {EmailTemplateLocale} locale Template locale
|
|
1175
1311
|
* @property {boolean} parseOutput
|
|
1176
1312
|
* @property {libClient | undefined} sdk
|
|
1177
1313
|
*/
|
|
@@ -1201,8 +1337,8 @@ const projectsDeleteEmailTemplate = async ({ projectId, type, locale, parseOutpu
|
|
|
1201
1337
|
/**
|
|
1202
1338
|
* @typedef {Object} ProjectsGetSmsTemplateRequestParams
|
|
1203
1339
|
* @property {string} projectId Project unique ID.
|
|
1204
|
-
* @property {
|
|
1205
|
-
* @property {
|
|
1340
|
+
* @property {SmsTemplateType} type Template type
|
|
1341
|
+
* @property {SmsTemplateLocale} locale Template locale
|
|
1206
1342
|
* @property {boolean} parseOutput
|
|
1207
1343
|
* @property {libClient | undefined} sdk
|
|
1208
1344
|
*/
|
|
@@ -1232,8 +1368,8 @@ const projectsGetSmsTemplate = async ({ projectId, type, locale, parseOutput = t
|
|
|
1232
1368
|
/**
|
|
1233
1369
|
* @typedef {Object} ProjectsUpdateSmsTemplateRequestParams
|
|
1234
1370
|
* @property {string} projectId Project unique ID.
|
|
1235
|
-
* @property {
|
|
1236
|
-
* @property {
|
|
1371
|
+
* @property {SmsTemplateType} type Template type
|
|
1372
|
+
* @property {SmsTemplateLocale} locale Template locale
|
|
1237
1373
|
* @property {string} message Template message
|
|
1238
1374
|
* @property {boolean} parseOutput
|
|
1239
1375
|
* @property {libClient | undefined} sdk
|
|
@@ -1267,8 +1403,8 @@ const projectsUpdateSmsTemplate = async ({ projectId, type, locale, message, par
|
|
|
1267
1403
|
/**
|
|
1268
1404
|
* @typedef {Object} ProjectsDeleteSmsTemplateRequestParams
|
|
1269
1405
|
* @property {string} projectId Project unique ID.
|
|
1270
|
-
* @property {
|
|
1271
|
-
* @property {
|
|
1406
|
+
* @property {SmsTemplateType} type Template type
|
|
1407
|
+
* @property {SmsTemplateLocale} locale Template locale
|
|
1272
1408
|
* @property {boolean} parseOutput
|
|
1273
1409
|
* @property {libClient | undefined} sdk
|
|
1274
1410
|
*/
|
|
@@ -1295,39 +1431,6 @@ const projectsDeleteSmsTemplate = async ({ projectId, type, locale, parseOutput
|
|
|
1295
1431
|
return response;
|
|
1296
1432
|
}
|
|
1297
1433
|
|
|
1298
|
-
/**
|
|
1299
|
-
* @typedef {Object} ProjectsGetUsageRequestParams
|
|
1300
|
-
* @property {string} projectId Project unique ID.
|
|
1301
|
-
* @property {string} range Date range.
|
|
1302
|
-
* @property {boolean} parseOutput
|
|
1303
|
-
* @property {libClient | undefined} sdk
|
|
1304
|
-
*/
|
|
1305
|
-
|
|
1306
|
-
/**
|
|
1307
|
-
* @param {ProjectsGetUsageRequestParams} params
|
|
1308
|
-
*/
|
|
1309
|
-
const projectsGetUsage = async ({ projectId, range, parseOutput = true, sdk = undefined}) => {
|
|
1310
|
-
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1311
|
-
let apiPath = '/projects/{projectId}/usage'.replace('{projectId}', projectId);
|
|
1312
|
-
let payload = {};
|
|
1313
|
-
if (typeof range !== 'undefined') {
|
|
1314
|
-
payload['range'] = range;
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
let response = undefined;
|
|
1318
|
-
|
|
1319
|
-
response = await client.call('get', apiPath, {
|
|
1320
|
-
'content-type': 'application/json',
|
|
1321
|
-
}, payload);
|
|
1322
|
-
|
|
1323
|
-
if (parseOutput) {
|
|
1324
|
-
parse(response)
|
|
1325
|
-
success()
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
return response;
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
1434
|
/**
|
|
1332
1435
|
* @typedef {Object} ProjectsListWebhooksRequestParams
|
|
1333
1436
|
* @property {string} projectId Project unique ID.
|
|
@@ -1364,6 +1467,7 @@ const projectsListWebhooks = async ({ projectId, parseOutput = true, sdk = undef
|
|
|
1364
1467
|
* @property {string[]} events Events list. Maximum of 100 events are allowed.
|
|
1365
1468
|
* @property {string} url Webhook URL.
|
|
1366
1469
|
* @property {boolean} security Certificate verification, false for disabled or true for enabled.
|
|
1470
|
+
* @property {boolean} enabled Enable or disable a webhook.
|
|
1367
1471
|
* @property {string} httpUser Webhook HTTP user. Max length: 256 chars.
|
|
1368
1472
|
* @property {string} httpPass Webhook HTTP password. Max length: 256 chars.
|
|
1369
1473
|
* @property {boolean} parseOutput
|
|
@@ -1373,13 +1477,16 @@ const projectsListWebhooks = async ({ projectId, parseOutput = true, sdk = undef
|
|
|
1373
1477
|
/**
|
|
1374
1478
|
* @param {ProjectsCreateWebhookRequestParams} params
|
|
1375
1479
|
*/
|
|
1376
|
-
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}) => {
|
|
1377
1481
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1378
1482
|
let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
|
|
1379
1483
|
let payload = {};
|
|
1380
1484
|
if (typeof name !== 'undefined') {
|
|
1381
1485
|
payload['name'] = name;
|
|
1382
1486
|
}
|
|
1487
|
+
if (typeof enabled !== 'undefined') {
|
|
1488
|
+
payload['enabled'] = enabled;
|
|
1489
|
+
}
|
|
1383
1490
|
events = events === true ? [] : events;
|
|
1384
1491
|
if (typeof events !== 'undefined') {
|
|
1385
1492
|
payload['events'] = events;
|
|
@@ -1449,6 +1556,7 @@ const projectsGetWebhook = async ({ projectId, webhookId, parseOutput = true, sd
|
|
|
1449
1556
|
* @property {string[]} events Events list. Maximum of 100 events are allowed.
|
|
1450
1557
|
* @property {string} url Webhook URL.
|
|
1451
1558
|
* @property {boolean} security Certificate verification, false for disabled or true for enabled.
|
|
1559
|
+
* @property {boolean} enabled Enable or disable a webhook.
|
|
1452
1560
|
* @property {string} httpUser Webhook HTTP user. Max length: 256 chars.
|
|
1453
1561
|
* @property {string} httpPass Webhook HTTP password. Max length: 256 chars.
|
|
1454
1562
|
* @property {boolean} parseOutput
|
|
@@ -1458,13 +1566,16 @@ const projectsGetWebhook = async ({ projectId, webhookId, parseOutput = true, sd
|
|
|
1458
1566
|
/**
|
|
1459
1567
|
* @param {ProjectsUpdateWebhookRequestParams} params
|
|
1460
1568
|
*/
|
|
1461
|
-
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}) => {
|
|
1462
1570
|
let client = !sdk ? await sdkForConsole() : sdk;
|
|
1463
1571
|
let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1464
1572
|
let payload = {};
|
|
1465
1573
|
if (typeof name !== 'undefined') {
|
|
1466
1574
|
payload['name'] = name;
|
|
1467
1575
|
}
|
|
1576
|
+
if (typeof enabled !== 'undefined') {
|
|
1577
|
+
payload['enabled'] = enabled;
|
|
1578
|
+
}
|
|
1468
1579
|
events = events === true ? [] : events;
|
|
1469
1580
|
if (typeof events !== 'undefined') {
|
|
1470
1581
|
payload['events'] = events;
|
|
@@ -1609,6 +1720,21 @@ projects
|
|
|
1609
1720
|
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1610
1721
|
.action(actionRunner(projectsDelete))
|
|
1611
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
|
+
|
|
1612
1738
|
projects
|
|
1613
1739
|
.command(`updateAuthDuration`)
|
|
1614
1740
|
.description(``)
|
|
@@ -1655,7 +1781,7 @@ projects
|
|
|
1655
1781
|
.command(`updateAuthStatus`)
|
|
1656
1782
|
.description(``)
|
|
1657
1783
|
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1658
|
-
.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`)
|
|
1659
1785
|
.requiredOption(`--status <status>`, `Set the status of this auth method.`, parseBool)
|
|
1660
1786
|
.action(actionRunner(projectsUpdateAuthStatus))
|
|
1661
1787
|
|
|
@@ -1671,7 +1797,7 @@ projects
|
|
|
1671
1797
|
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1672
1798
|
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
1673
1799
|
.requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
|
|
1674
|
-
.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.`)
|
|
1675
1801
|
.action(actionRunner(projectsCreateKey))
|
|
1676
1802
|
|
|
1677
1803
|
projects
|
|
@@ -1688,7 +1814,7 @@ projects
|
|
|
1688
1814
|
.requiredOption(`--keyId <keyId>`, `Key unique ID.`)
|
|
1689
1815
|
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
1690
1816
|
.requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 events are allowed.`)
|
|
1691
|
-
.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.`)
|
|
1692
1818
|
.action(actionRunner(projectsUpdateKey))
|
|
1693
1819
|
|
|
1694
1820
|
projects
|
|
@@ -1766,7 +1892,7 @@ projects
|
|
|
1766
1892
|
.action(actionRunner(projectsUpdateServiceStatusAll))
|
|
1767
1893
|
|
|
1768
1894
|
projects
|
|
1769
|
-
.command(`
|
|
1895
|
+
.command(`updateSmtp`)
|
|
1770
1896
|
.description(``)
|
|
1771
1897
|
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1772
1898
|
.requiredOption(`--enabled <enabled>`, `Enable custom SMTP service`, parseBool)
|
|
@@ -1778,7 +1904,22 @@ projects
|
|
|
1778
1904
|
.option(`--username <username>`, `SMTP server username`)
|
|
1779
1905
|
.option(`--password <password>`, `SMTP server password`)
|
|
1780
1906
|
.option(`--secure <secure>`, `Does SMTP server use secure connection`)
|
|
1781
|
-
.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))
|
|
1782
1923
|
|
|
1783
1924
|
projects
|
|
1784
1925
|
.command(`updateTeam`)
|
|
@@ -1841,13 +1982,6 @@ projects
|
|
|
1841
1982
|
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1842
1983
|
.action(actionRunner(projectsDeleteSmsTemplate))
|
|
1843
1984
|
|
|
1844
|
-
projects
|
|
1845
|
-
.command(`getUsage`)
|
|
1846
|
-
.description(``)
|
|
1847
|
-
.requiredOption(`--projectId <projectId>`, `Project unique ID.`)
|
|
1848
|
-
.option(`--range <range>`, `Date range.`)
|
|
1849
|
-
.action(actionRunner(projectsGetUsage))
|
|
1850
|
-
|
|
1851
1985
|
projects
|
|
1852
1986
|
.command(`listWebhooks`)
|
|
1853
1987
|
.description(``)
|
|
@@ -1862,6 +1996,7 @@ projects
|
|
|
1862
1996
|
.requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
|
|
1863
1997
|
.requiredOption(`--url <url>`, `Webhook URL.`)
|
|
1864
1998
|
.requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool)
|
|
1999
|
+
.option(`--enabled <enabled>`, `Enable or disable a webhook.`, parseBool)
|
|
1865
2000
|
.option(`--httpUser <httpUser>`, `Webhook HTTP user. Max length: 256 chars.`)
|
|
1866
2001
|
.option(`--httpPass <httpPass>`, `Webhook HTTP password. Max length: 256 chars.`)
|
|
1867
2002
|
.action(actionRunner(projectsCreateWebhook))
|
|
@@ -1882,6 +2017,7 @@ projects
|
|
|
1882
2017
|
.requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
|
|
1883
2018
|
.requiredOption(`--url <url>`, `Webhook URL.`)
|
|
1884
2019
|
.requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool)
|
|
2020
|
+
.option(`--enabled <enabled>`, `Enable or disable a webhook.`, parseBool)
|
|
1885
2021
|
.option(`--httpUser <httpUser>`, `Webhook HTTP user. Max length: 256 chars.`)
|
|
1886
2022
|
.option(`--httpPass <httpPass>`, `Webhook HTTP password. Max length: 256 chars.`)
|
|
1887
2023
|
.action(actionRunner(projectsUpdateWebhook))
|
|
@@ -1907,6 +2043,8 @@ module.exports = {
|
|
|
1907
2043
|
projectsGet,
|
|
1908
2044
|
projectsUpdate,
|
|
1909
2045
|
projectsDelete,
|
|
2046
|
+
projectsUpdateApiStatus,
|
|
2047
|
+
projectsUpdateApiStatusAll,
|
|
1910
2048
|
projectsUpdateAuthDuration,
|
|
1911
2049
|
projectsUpdateAuthLimit,
|
|
1912
2050
|
projectsUpdateAuthSessionsLimit,
|
|
@@ -1927,7 +2065,8 @@ module.exports = {
|
|
|
1927
2065
|
projectsDeletePlatform,
|
|
1928
2066
|
projectsUpdateServiceStatus,
|
|
1929
2067
|
projectsUpdateServiceStatusAll,
|
|
1930
|
-
|
|
2068
|
+
projectsUpdateSmtp,
|
|
2069
|
+
projectsCreateSmtpTest,
|
|
1931
2070
|
projectsUpdateTeam,
|
|
1932
2071
|
projectsGetEmailTemplate,
|
|
1933
2072
|
projectsUpdateEmailTemplate,
|
|
@@ -1935,7 +2074,6 @@ module.exports = {
|
|
|
1935
2074
|
projectsGetSmsTemplate,
|
|
1936
2075
|
projectsUpdateSmsTemplate,
|
|
1937
2076
|
projectsDeleteSmsTemplate,
|
|
1938
|
-
projectsGetUsage,
|
|
1939
2077
|
projectsListWebhooks,
|
|
1940
2078
|
projectsCreateWebhook,
|
|
1941
2079
|
projectsGetWebhook,
|
package/lib/commands/proxy.js
CHANGED
|
@@ -78,7 +78,7 @@ const proxyListRules = async ({ queries, search, parseOutput = true, sdk = undef
|
|
|
78
78
|
/**
|
|
79
79
|
* @typedef {Object} ProxyCreateRuleRequestParams
|
|
80
80
|
* @property {string} domain Domain name.
|
|
81
|
-
* @property {
|
|
81
|
+
* @property {ResourceType} resourceType Action definition for the rule. Possible values are "api", "function"
|
|
82
82
|
* @property {string} resourceId ID of resource for the action type. If resourceType is "api", leave empty. If resourceType is "function", provide ID of the function.
|
|
83
83
|
* @property {boolean} parseOutput
|
|
84
84
|
* @property {libClient | undefined} sdk
|
package/lib/commands/storage.js
CHANGED
|
@@ -84,7 +84,7 @@ const storageListBuckets = async ({ queries, search, parseOutput = true, sdk = u
|
|
|
84
84
|
* @property {boolean} enabled Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
|
|
85
85
|
* @property {number} maximumFileSize Maximum file size allowed in bytes. Maximum allowed value is 30MB.
|
|
86
86
|
* @property {string[]} allowedFileExtensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
|
|
87
|
-
* @property {
|
|
87
|
+
* @property {Compression} compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
88
88
|
* @property {boolean} encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
89
89
|
* @property {boolean} antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
|
90
90
|
* @property {boolean} parseOutput
|
|
@@ -183,7 +183,7 @@ const storageGetBucket = async ({ bucketId, parseOutput = true, sdk = undefined}
|
|
|
183
183
|
* @property {boolean} enabled Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
|
|
184
184
|
* @property {number} maximumFileSize Maximum file size allowed in bytes. Maximum allowed value is 30MB.
|
|
185
185
|
* @property {string[]} allowedFileExtensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
|
|
186
|
-
* @property {
|
|
186
|
+
* @property {Compression} compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
187
187
|
* @property {boolean} encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
188
188
|
* @property {boolean} antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
|
189
189
|
* @property {boolean} parseOutput
|
|
@@ -581,7 +581,7 @@ const storageGetFileDownload = async ({ bucketId, fileId, parseOutput = true, sd
|
|
|
581
581
|
* @property {string} fileId File ID
|
|
582
582
|
* @property {number} width Resize preview image width, Pass an integer between 0 to 4000.
|
|
583
583
|
* @property {number} height Resize preview image height, Pass an integer between 0 to 4000.
|
|
584
|
-
* @property {
|
|
584
|
+
* @property {ImageGravity} gravity Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
|
|
585
585
|
* @property {number} quality Preview image quality. Pass an integer between 0 to 100. Defaults to 100.
|
|
586
586
|
* @property {number} borderWidth Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
|
|
587
587
|
* @property {string} borderColor Preview image border color. Use a valid HEX color, no # is needed for prefix.
|
|
@@ -589,7 +589,7 @@ const storageGetFileDownload = async ({ bucketId, fileId, parseOutput = true, sd
|
|
|
589
589
|
* @property {number} opacity Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
|
|
590
590
|
* @property {number} rotation Preview image rotation in degrees. Pass an integer between -360 and 360.
|
|
591
591
|
* @property {string} background Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.
|
|
592
|
-
* @property {
|
|
592
|
+
* @property {ImageFormat} output Output format type (jpeg, jpg, png, gif and webp).
|
|
593
593
|
* @property {boolean} parseOutput
|
|
594
594
|
* @property {libClient | undefined} sdk
|
|
595
595
|
* @property {string} destination
|
|
@@ -695,7 +695,7 @@ const storageGetFileView = async ({ bucketId, fileId, parseOutput = true, sdk =
|
|
|
695
695
|
|
|
696
696
|
/**
|
|
697
697
|
* @typedef {Object} StorageGetUsageRequestParams
|
|
698
|
-
* @property {
|
|
698
|
+
* @property {StorageUsageRange} range Date range.
|
|
699
699
|
* @property {boolean} parseOutput
|
|
700
700
|
* @property {libClient | undefined} sdk
|
|
701
701
|
*/
|
|
@@ -728,7 +728,7 @@ const storageGetUsage = async ({ range, parseOutput = true, sdk = undefined}) =>
|
|
|
728
728
|
/**
|
|
729
729
|
* @typedef {Object} StorageGetBucketUsageRequestParams
|
|
730
730
|
* @property {string} bucketId Bucket ID.
|
|
731
|
-
* @property {
|
|
731
|
+
* @property {StorageUsageRange} range Date range.
|
|
732
732
|
* @property {boolean} parseOutput
|
|
733
733
|
* @property {libClient | undefined} sdk
|
|
734
734
|
*/
|