From 3dbec65f7932e22b11446b5bfbee57d52d6b0ad8 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 11 Dec 2024 01:04:02 +1300 Subject: [PATCH] Add new push message parameters --- README.md | 2 +- .../databases/update-string-attribute.md | 2 +- docs/examples/messaging/create-push.md | 11 +- docs/examples/messaging/update-push.md | 5 +- package.json | 2 +- src/client.ts | 8 +- src/enums/image-format.ts | 1 + src/enums/message-priority.ts | 4 + src/enums/runtime.ts | 15 ++- src/index.ts | 1 + src/models.ts | 100 +++++++++++++++++- src/services/account.ts | 22 ++-- src/services/locale.ts | 2 +- src/services/messaging.ts | 37 +++++-- src/services/storage.ts | 2 +- src/services/teams.ts | 4 +- src/services/users.ts | 20 ++-- 17 files changed, 189 insertions(+), 49 deletions(-) create mode 100644 src/enums/message-priority.ts diff --git a/README.md b/README.md index d77ecca..af47ac1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Appwrite Node.js SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.6.0-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.6.1-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index f379fdc..6aecbb5 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -13,6 +13,6 @@ const result = await databases.updateStringAttribute( '', // key false, // required '', // default - null, // size (optional) + 1, // size (optional) '' // newKey (optional) ); diff --git a/docs/examples/messaging/create-push.md b/docs/examples/messaging/create-push.md index 54103e1..bb98538 100644 --- a/docs/examples/messaging/create-push.md +++ b/docs/examples/messaging/create-push.md @@ -9,8 +9,8 @@ const messaging = new sdk.Messaging(client); const result = await messaging.createPush( '', // messageId - '', // title - '<BODY>', // body + '<TITLE>', // title (optional) + '<BODY>', // body (optional) [], // topics (optional) [], // users (optional) [], // targets (optional) @@ -21,7 +21,10 @@ const result = await messaging.createPush( '<SOUND>', // sound (optional) '<COLOR>', // color (optional) '<TAG>', // tag (optional) - '<BADGE>', // badge (optional) + null, // badge (optional) false, // draft (optional) - '' // scheduledAt (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + sdk.MessagePriority.Normal // priority (optional) ); diff --git a/docs/examples/messaging/update-push.md b/docs/examples/messaging/update-push.md index ec87ecf..700c3a9 100644 --- a/docs/examples/messaging/update-push.md +++ b/docs/examples/messaging/update-push.md @@ -23,5 +23,8 @@ const result = await messaging.updatePush( '<TAG>', // tag (optional) null, // badge (optional) false, // draft (optional) - '' // scheduledAt (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + sdk.MessagePriority.Normal // priority (optional) ); diff --git a/package.json b/package.json index c8dcded..84975d6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "node-appwrite", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "14.1.0", + "version": "14.2.0", "license": "BSD-3-Clause", "main": "dist/index.js", "type": "commonjs", diff --git a/src/client.ts b/src/client.ts index afe642d..ff7673d 100644 --- a/src/client.ts +++ b/src/client.ts @@ -33,7 +33,7 @@ class AppwriteException extends Error { } function getUserAgent() { - let ua = 'AppwriteNodeJSSDK/14.1.0'; + let ua = 'AppwriteNodeJSSDK/14.2.0'; // `process` is a global in Node.js, but not fully available in all runtimes. const platform: string[] = []; @@ -82,7 +82,7 @@ class Client { 'x-sdk-name': 'Node.js', 'x-sdk-platform': 'server', 'x-sdk-language': 'nodejs', - 'x-sdk-version': '14.1.0', + 'x-sdk-version': '14.2.0', 'user-agent' : getUserAgent(), 'X-Appwrite-Response-Format': '1.6.0', }; @@ -305,6 +305,10 @@ class Client { return response; } + async ping(): Promise<string> { + return this.call('GET', new URL(this.config.endpoint + '/ping')); + } + async redirect(method: string, url: URL, headers: Headers = {}, params: Payload = {}): Promise<string> { const { uri, options } = this.prepareRequest(method, url, headers, params); diff --git a/src/enums/image-format.ts b/src/enums/image-format.ts index 7e96fd8..8599e30 100644 --- a/src/enums/image-format.ts +++ b/src/enums/image-format.ts @@ -4,4 +4,5 @@ export enum ImageFormat { Gif = 'gif', Png = 'png', Webp = 'webp', + Avif = 'avif', } \ No newline at end of file diff --git a/src/enums/message-priority.ts b/src/enums/message-priority.ts new file mode 100644 index 0000000..f3113a8 --- /dev/null +++ b/src/enums/message-priority.ts @@ -0,0 +1,4 @@ +export enum MessagePriority { + Normal = 'normal', + High = 'high', +} \ No newline at end of file diff --git a/src/enums/runtime.ts b/src/enums/runtime.ts index f0524b5..a4042bb 100644 --- a/src/enums/runtime.ts +++ b/src/enums/runtime.ts @@ -5,6 +5,7 @@ export enum Runtime { Node190 = 'node-19.0', Node200 = 'node-20.0', Node210 = 'node-21.0', + Node22 = 'node-22', Php80 = 'php-8.0', Php81 = 'php-8.1', Php82 = 'php-8.2', @@ -19,7 +20,12 @@ export enum Runtime { Python311 = 'python-3.11', Python312 = 'python-3.12', Pythonml311 = 'python-ml-3.11', + Deno121 = 'deno-1.21', + Deno124 = 'deno-1.24', + Deno135 = 'deno-1.35', Deno140 = 'deno-1.40', + Deno146 = 'deno-1.46', + Deno20 = 'deno-2.0', Dart215 = 'dart-2.15', Dart216 = 'dart-2.16', Dart217 = 'dart-2.17', @@ -27,22 +33,29 @@ export enum Runtime { Dart30 = 'dart-3.0', Dart31 = 'dart-3.1', Dart33 = 'dart-3.3', - Dotnet31 = 'dotnet-3.1', + Dart35 = 'dart-3.5', Dotnet60 = 'dotnet-6.0', Dotnet70 = 'dotnet-7.0', + Dotnet80 = 'dotnet-8.0', Java80 = 'java-8.0', Java110 = 'java-11.0', Java170 = 'java-17.0', Java180 = 'java-18.0', Java210 = 'java-21.0', + Java22 = 'java-22', Swift55 = 'swift-5.5', Swift58 = 'swift-5.8', Swift59 = 'swift-5.9', + Swift510 = 'swift-5.10', Kotlin16 = 'kotlin-1.6', Kotlin18 = 'kotlin-1.8', Kotlin19 = 'kotlin-1.9', + Kotlin20 = 'kotlin-2.0', Cpp17 = 'cpp-17', Cpp20 = 'cpp-20', Bun10 = 'bun-1.0', + Bun11 = 'bun-1.1', Go123 = 'go-1.23', + Static1 = 'static-1', + Flutter324 = 'flutter-3.24', } \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 38ceb0d..bb34374 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,6 +27,7 @@ export { IndexType } from './enums/index-type'; export { Runtime } from './enums/runtime'; export { ExecutionMethod } from './enums/execution-method'; export { Name } from './enums/name'; +export { MessagePriority } from './enums/message-priority'; export { SmtpEncryption } from './enums/smtp-encryption'; export { Compression } from './enums/compression'; export { ImageGravity } from './enums/image-gravity'; diff --git a/src/models.ts b/src/models.ts index 1cbd00c..93edb69 100644 --- a/src/models.ts +++ b/src/models.ts @@ -490,6 +490,14 @@ export namespace Models { * Is attribute an array? */ array?: boolean; + /** + * Attribute creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Attribute update date in ISO 8601 format. + */ + $updatedAt: string; /** * Attribute size. */ @@ -527,6 +535,14 @@ export namespace Models { * Is attribute an array? */ array?: boolean; + /** + * Attribute creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Attribute update date in ISO 8601 format. + */ + $updatedAt: string; /** * Minimum value to enforce for new documents. */ @@ -568,6 +584,14 @@ export namespace Models { * Is attribute an array? */ array?: boolean; + /** + * Attribute creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Attribute update date in ISO 8601 format. + */ + $updatedAt: string; /** * Minimum value to enforce for new documents. */ @@ -609,6 +633,14 @@ export namespace Models { * Is attribute an array? */ array?: boolean; + /** + * Attribute creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Attribute update date in ISO 8601 format. + */ + $updatedAt: string; /** * Default value for attribute when not provided. Cannot be set when attribute is required. */ @@ -642,6 +674,14 @@ export namespace Models { * Is attribute an array? */ array?: boolean; + /** + * Attribute creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Attribute update date in ISO 8601 format. + */ + $updatedAt: string; /** * String format. */ @@ -679,6 +719,14 @@ export namespace Models { * Is attribute an array? */ array?: boolean; + /** + * Attribute creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Attribute update date in ISO 8601 format. + */ + $updatedAt: string; /** * Array of elements in enumerated type. */ @@ -720,6 +768,14 @@ export namespace Models { * Is attribute an array? */ array?: boolean; + /** + * Attribute creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Attribute update date in ISO 8601 format. + */ + $updatedAt: string; /** * String format. */ @@ -757,6 +813,14 @@ export namespace Models { * Is attribute an array? */ array?: boolean; + /** + * Attribute creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Attribute update date in ISO 8601 format. + */ + $updatedAt: string; /** * String format. */ @@ -794,6 +858,14 @@ export namespace Models { * Is attribute an array? */ array?: boolean; + /** + * Attribute creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Attribute update date in ISO 8601 format. + */ + $updatedAt: string; /** * ISO 8601 format. */ @@ -831,6 +903,14 @@ export namespace Models { * Is attribute an array? */ array?: boolean; + /** + * Attribute creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Attribute update date in ISO 8601 format. + */ + $updatedAt: string; /** * The ID of the related collection. */ @@ -884,6 +964,14 @@ export namespace Models { * Index orders. */ orders?: string[]; + /** + * Index creation date in ISO 8601 format. + */ + $createdAt: string; + /** + * Index update date in ISO 8601 format. + */ + $updatedAt: string; } /** * Document @@ -1596,11 +1684,11 @@ export namespace Models { */ userId: string; /** - * User name. + * User name. Hide this attribute by toggling membership privacy in the Console. */ userName: string; /** - * User email address. + * User email address. Hide this attribute by toggling membership privacy in the Console. */ userEmail: string; /** @@ -1624,7 +1712,7 @@ export namespace Models { */ confirm: boolean; /** - * Multi factor authentication status, true if the user has MFA enabled or false otherwise. + * Multi factor authentication status, true if the user has MFA enabled or false otherwise. Hide this attribute by toggling membership privacy in the Console. */ mfa: boolean; /** @@ -1689,7 +1777,7 @@ export namespace Models { */ events: string[]; /** - * Function execution schedult in CRON format. + * Function execution schedule in CRON format. */ schedule: string; /** @@ -2506,5 +2594,9 @@ export namespace Models { * The target identifier. */ identifier: string; + /** + * Is the target expired. + */ + expired: boolean; } } diff --git a/src/services/account.ts b/src/services/account.ts index 213b137..51c11c3 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -125,7 +125,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * List Identities + * List identities * * Get the list of identities for the currently logged in user. * @@ -264,7 +264,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * Create Authenticator + * Create authenticator * * Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method. * @@ -292,7 +292,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * Verify Authenticator + * Verify authenticator * * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. * @@ -327,7 +327,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * Delete Authenticator + * Delete authenticator * * Delete an authenticator for a user by ID. * @@ -355,7 +355,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * Create MFA Challenge + * Create MFA challenge * * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. * @@ -386,7 +386,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * Create MFA Challenge (confirmation) + * Create MFA challenge (confirmation) * * Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. * @@ -424,7 +424,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * List Factors + * List factors * * List the factors available on the account to be used as a MFA challange. * @@ -448,7 +448,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * Get MFA Recovery Codes + * Get MFA recovery codes * * Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes. * @@ -472,7 +472,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * Create MFA Recovery Codes + * Create MFA recovery codes * * Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. * @@ -496,7 +496,7 @@ This endpoint can also be used to convert an anonymous account to a normal one, ); } /** - * Regenerate MFA Recovery Codes + * Regenerate MFA recovery codes * * Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes. * @@ -1144,7 +1144,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about /** * Create magic URL token * - * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default. + * Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). diff --git a/src/services/locale.ts b/src/services/locale.ts index aae0dca..c59818d 100644 --- a/src/services/locale.ts +++ b/src/services/locale.ts @@ -35,7 +35,7 @@ export class Locale { ); } /** - * List Locale Codes + * List locale codes * * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). * diff --git a/src/services/messaging.ts b/src/services/messaging.ts index c9200a6..ed15db2 100644 --- a/src/services/messaging.ts +++ b/src/services/messaging.ts @@ -1,5 +1,6 @@ import { AppwriteException, Client, type Payload, UploadProgress } from '../client'; import type { Models } from '../models'; +import { MessagePriority } from '../enums/message-priority'; import { SmtpEncryption } from '../enums/smtp-encryption'; export class Messaging { @@ -213,22 +214,19 @@ export class Messaging { * @param {string} sound * @param {string} color * @param {string} tag - * @param {string} badge + * @param {number} badge * @param {boolean} draft * @param {string} scheduledAt + * @param {boolean} contentAvailable + * @param {boolean} critical + * @param {MessagePriority} priority * @throws {AppwriteException} * @returns {Promise<Models.Message>} */ - async createPush(messageId: string, title: string, body: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message> { + async createPush(messageId: string, title?: string, body?: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message> { if (typeof messageId === 'undefined') { throw new AppwriteException('Missing required parameter: "messageId"'); } - if (typeof title === 'undefined') { - throw new AppwriteException('Missing required parameter: "title"'); - } - if (typeof body === 'undefined') { - throw new AppwriteException('Missing required parameter: "body"'); - } const apiPath = '/messaging/messages/push'; const payload: Payload = {}; if (typeof messageId !== 'undefined') { @@ -279,6 +277,15 @@ export class Messaging { if (typeof scheduledAt !== 'undefined') { payload['scheduledAt'] = scheduledAt; } + if (typeof contentAvailable !== 'undefined') { + payload['contentAvailable'] = contentAvailable; + } + if (typeof critical !== 'undefined') { + payload['critical'] = critical; + } + if (typeof priority !== 'undefined') { + payload['priority'] = priority; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -314,10 +321,13 @@ export class Messaging { * @param {number} badge * @param {boolean} draft * @param {string} scheduledAt + * @param {boolean} contentAvailable + * @param {boolean} critical + * @param {MessagePriority} priority * @throws {AppwriteException} * @returns {Promise<Models.Message>} */ - async updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string): Promise<Models.Message> { + async updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message> { if (typeof messageId === 'undefined') { throw new AppwriteException('Missing required parameter: "messageId"'); } @@ -368,6 +378,15 @@ export class Messaging { if (typeof scheduledAt !== 'undefined') { payload['scheduledAt'] = scheduledAt; } + if (typeof contentAvailable !== 'undefined') { + payload['contentAvailable'] = contentAvailable; + } + if (typeof critical !== 'undefined') { + payload['critical'] = critical; + } + if (typeof priority !== 'undefined') { + payload['priority'] = priority; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/storage.ts b/src/services/storage.ts index 649c1ae..923dda4 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -399,7 +399,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk ); } /** - * Delete File + * Delete file * * Delete a file by its unique ID. Only users with write permissions have access to delete this resource. * diff --git a/src/services/teams.ts b/src/services/teams.ts index 6ef54a9..3911e30 100644 --- a/src/services/teams.ts +++ b/src/services/teams.ts @@ -176,7 +176,7 @@ export class Teams { /** * List team memberships * - * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. + * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console. * * @param {string} teamId * @param {string[]} queries @@ -274,7 +274,7 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee /** * Get team membership * - * Get a team member by the membership unique id. All team members have read access for this resource. + * Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console. * * @param {string} teamId * @param {string} membershipId diff --git a/src/services/users.ts b/src/services/users.ts index ba1843f..7efc333 100644 --- a/src/services/users.ts +++ b/src/services/users.ts @@ -189,7 +189,7 @@ export class Users { ); } /** - * List Identities + * List identities * * Get identities for all users. * @@ -813,7 +813,7 @@ Labels can be used to grant access to resources. While teams are a way for user& ); } /** - * Delete Authenticator + * Delete authenticator * * Delete an authenticator app. * @@ -845,7 +845,7 @@ Labels can be used to grant access to resources. While teams are a way for user& ); } /** - * List Factors + * List factors * * List the factors available on the account to be used as a MFA challange. * @@ -873,7 +873,7 @@ Labels can be used to grant access to resources. While teams are a way for user& ); } /** - * Get MFA Recovery Codes + * Get MFA recovery codes * * Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. * @@ -901,7 +901,7 @@ Labels can be used to grant access to resources. While teams are a way for user& ); } /** - * Regenerate MFA Recovery Codes + * Regenerate MFA recovery codes * * Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. * @@ -929,7 +929,7 @@ Labels can be used to grant access to resources. While teams are a way for user& ); } /** - * Create MFA Recovery Codes + * Create MFA recovery codes * * Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK. * @@ -1278,7 +1278,7 @@ If you want to generate a token for a custom authentication flow, use the [POST ); } /** - * List User Targets + * List user targets * * List the messaging targets that are associated with a user. * @@ -1310,7 +1310,7 @@ If you want to generate a token for a custom authentication flow, use the [POST ); } /** - * Create User Target + * Create user target * * Create a messaging target. * @@ -1367,7 +1367,7 @@ If you want to generate a token for a custom authentication flow, use the [POST ); } /** - * Get User Target + * Get user target * * Get a user's push notification target by ID. * @@ -1399,7 +1399,7 @@ If you want to generate a token for a custom authentication flow, use the [POST ); } /** - * Update User target + * Update user target * * Update a messaging target. *