node-appwrite
Advanced tools
Comparing version
@@ -126,2 +126,3 @@ export { Models } from './models.js'; | ||
chunkedUpload(method: string, url: URL, headers: Headers | undefined, originalPayload: Payload | undefined, onProgress: (progress: UploadProgress) => void): Promise<any>; | ||
ping(): Promise<string>; | ||
redirect(method: string, url: URL, headers?: Headers, params?: Payload): Promise<string>; | ||
@@ -128,0 +129,0 @@ call(method: string, url: URL, headers?: Headers, params?: Payload, responseType?: string): Promise<any>; |
@@ -18,3 +18,3 @@ 'use strict'; | ||
function getUserAgent() { | ||
let ua = "AppwriteNodeJSSDK/14.1.0"; | ||
let ua = "AppwriteNodeJSSDK/14.2.0"; | ||
const platform = []; | ||
@@ -55,3 +55,3 @@ if (typeof process !== "undefined") { | ||
"x-sdk-language": "nodejs", | ||
"x-sdk-version": "14.1.0", | ||
"x-sdk-version": "14.2.0", | ||
"user-agent": getUserAgent(), | ||
@@ -251,2 +251,5 @@ "X-Appwrite-Response-Format": "1.6.0" | ||
} | ||
async ping() { | ||
return this.call("GET", new URL(this.config.endpoint + "/ping")); | ||
} | ||
async redirect(method, url, headers = {}, params = {}) { | ||
@@ -253,0 +256,0 @@ const { uri, options } = this.prepareRequest(method, url, headers, params); |
@@ -6,5 +6,6 @@ declare enum ImageFormat { | ||
Png = "png", | ||
Webp = "webp" | ||
Webp = "webp", | ||
Avif = "avif" | ||
} | ||
export { ImageFormat }; |
@@ -9,2 +9,3 @@ 'use strict'; | ||
ImageFormat2["Webp"] = "webp"; | ||
ImageFormat2["Avif"] = "avif"; | ||
return ImageFormat2; | ||
@@ -11,0 +12,0 @@ })(ImageFormat || {}); |
@@ -8,2 +8,3 @@ declare enum Runtime { | ||
Node210 = "node-21.0", | ||
Node22 = "node-22", | ||
Php80 = "php-8.0", | ||
@@ -23,3 +24,8 @@ Php81 = "php-8.1", | ||
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", | ||
@@ -32,5 +38,6 @@ Dart216 = "dart-2.16", | ||
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", | ||
@@ -41,14 +48,20 @@ Java110 = "java-11.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", | ||
Go123 = "go-1.23" | ||
Bun11 = "bun-1.1", | ||
Go123 = "go-1.23", | ||
Static1 = "static-1", | ||
Flutter324 = "flutter-3.24" | ||
} | ||
export { Runtime }; |
@@ -10,2 +10,3 @@ 'use strict'; | ||
Runtime2["Node210"] = "node-21.0"; | ||
Runtime2["Node22"] = "node-22"; | ||
Runtime2["Php80"] = "php-8.0"; | ||
@@ -25,3 +26,8 @@ Runtime2["Php81"] = "php-8.1"; | ||
Runtime2["Pythonml311"] = "python-ml-3.11"; | ||
Runtime2["Deno121"] = "deno-1.21"; | ||
Runtime2["Deno124"] = "deno-1.24"; | ||
Runtime2["Deno135"] = "deno-1.35"; | ||
Runtime2["Deno140"] = "deno-1.40"; | ||
Runtime2["Deno146"] = "deno-1.46"; | ||
Runtime2["Deno20"] = "deno-2.0"; | ||
Runtime2["Dart215"] = "dart-2.15"; | ||
@@ -34,5 +40,6 @@ Runtime2["Dart216"] = "dart-2.16"; | ||
Runtime2["Dart33"] = "dart-3.3"; | ||
Runtime2["Dotnet31"] = "dotnet-3.1"; | ||
Runtime2["Dart35"] = "dart-3.5"; | ||
Runtime2["Dotnet60"] = "dotnet-6.0"; | ||
Runtime2["Dotnet70"] = "dotnet-7.0"; | ||
Runtime2["Dotnet80"] = "dotnet-8.0"; | ||
Runtime2["Java80"] = "java-8.0"; | ||
@@ -43,12 +50,18 @@ Runtime2["Java110"] = "java-11.0"; | ||
Runtime2["Java210"] = "java-21.0"; | ||
Runtime2["Java22"] = "java-22"; | ||
Runtime2["Swift55"] = "swift-5.5"; | ||
Runtime2["Swift58"] = "swift-5.8"; | ||
Runtime2["Swift59"] = "swift-5.9"; | ||
Runtime2["Swift510"] = "swift-5.10"; | ||
Runtime2["Kotlin16"] = "kotlin-1.6"; | ||
Runtime2["Kotlin18"] = "kotlin-1.8"; | ||
Runtime2["Kotlin19"] = "kotlin-1.9"; | ||
Runtime2["Kotlin20"] = "kotlin-2.0"; | ||
Runtime2["Cpp17"] = "cpp-17"; | ||
Runtime2["Cpp20"] = "cpp-20"; | ||
Runtime2["Bun10"] = "bun-1.0"; | ||
Runtime2["Bun11"] = "bun-1.1"; | ||
Runtime2["Go123"] = "go-1.23"; | ||
Runtime2["Static1"] = "static-1"; | ||
Runtime2["Flutter324"] = "flutter-3.24"; | ||
return Runtime2; | ||
@@ -55,0 +68,0 @@ })(Runtime || {}); |
@@ -29,2 +29,3 @@ export { AppwriteException, Client, Payload, UploadProgress } from './client.js'; | ||
export { Name } from './enums/name.js'; | ||
export { MessagePriority } from './enums/message-priority.js'; | ||
export { SmtpEncryption } from './enums/smtp-encryption.js'; | ||
@@ -31,0 +32,0 @@ export { Compression } from './enums/compression.js'; |
@@ -30,2 +30,3 @@ 'use strict'; | ||
var name = require('./enums/name'); | ||
var messagePriority = require('./enums/message-priority'); | ||
var smtpEncryption = require('./enums/smtp-encryption'); | ||
@@ -156,2 +157,6 @@ var compression = require('./enums/compression'); | ||
}); | ||
Object.defineProperty(exports, 'MessagePriority', { | ||
enumerable: true, | ||
get: function () { return messagePriority.MessagePriority; } | ||
}); | ||
Object.defineProperty(exports, 'SmtpEncryption', { | ||
@@ -158,0 +163,0 @@ enumerable: true, |
@@ -494,2 +494,10 @@ /** | ||
/** | ||
* Attribute creation date in ISO 8601 format. | ||
*/ | ||
$createdAt: string; | ||
/** | ||
* Attribute update date in ISO 8601 format. | ||
*/ | ||
$updatedAt: string; | ||
/** | ||
* Attribute size. | ||
@@ -532,2 +540,10 @@ */ | ||
/** | ||
* 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. | ||
@@ -574,2 +590,10 @@ */ | ||
/** | ||
* 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. | ||
@@ -616,2 +640,10 @@ */ | ||
/** | ||
* 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. | ||
@@ -650,2 +682,10 @@ */ | ||
/** | ||
* Attribute creation date in ISO 8601 format. | ||
*/ | ||
$createdAt: string; | ||
/** | ||
* Attribute update date in ISO 8601 format. | ||
*/ | ||
$updatedAt: string; | ||
/** | ||
* String format. | ||
@@ -688,2 +728,10 @@ */ | ||
/** | ||
* Attribute creation date in ISO 8601 format. | ||
*/ | ||
$createdAt: string; | ||
/** | ||
* Attribute update date in ISO 8601 format. | ||
*/ | ||
$updatedAt: string; | ||
/** | ||
* Array of elements in enumerated type. | ||
@@ -730,2 +778,10 @@ */ | ||
/** | ||
* Attribute creation date in ISO 8601 format. | ||
*/ | ||
$createdAt: string; | ||
/** | ||
* Attribute update date in ISO 8601 format. | ||
*/ | ||
$updatedAt: string; | ||
/** | ||
* String format. | ||
@@ -768,2 +824,10 @@ */ | ||
/** | ||
* Attribute creation date in ISO 8601 format. | ||
*/ | ||
$createdAt: string; | ||
/** | ||
* Attribute update date in ISO 8601 format. | ||
*/ | ||
$updatedAt: string; | ||
/** | ||
* String format. | ||
@@ -806,2 +870,10 @@ */ | ||
/** | ||
* Attribute creation date in ISO 8601 format. | ||
*/ | ||
$createdAt: string; | ||
/** | ||
* Attribute update date in ISO 8601 format. | ||
*/ | ||
$updatedAt: string; | ||
/** | ||
* ISO 8601 format. | ||
@@ -844,2 +916,10 @@ */ | ||
/** | ||
* Attribute creation date in ISO 8601 format. | ||
*/ | ||
$createdAt: string; | ||
/** | ||
* Attribute update date in ISO 8601 format. | ||
*/ | ||
$updatedAt: string; | ||
/** | ||
* The ID of the related collection. | ||
@@ -897,2 +977,10 @@ */ | ||
orders?: string[]; | ||
/** | ||
* Index creation date in ISO 8601 format. | ||
*/ | ||
$createdAt: string; | ||
/** | ||
* Index update date in ISO 8601 format. | ||
*/ | ||
$updatedAt: string; | ||
}; | ||
@@ -1610,7 +1698,7 @@ /** | ||
/** | ||
* 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. | ||
*/ | ||
@@ -1639,3 +1727,3 @@ userEmail: string; | ||
/** | ||
* 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. | ||
*/ | ||
@@ -1705,3 +1793,3 @@ mfa: boolean; | ||
/** | ||
* Function execution schedult in CRON format. | ||
* Function execution schedule in CRON format. | ||
*/ | ||
@@ -2523,2 +2611,6 @@ schedule: string; | ||
identifier: string; | ||
/** | ||
* Is the target expired. | ||
*/ | ||
expired: boolean; | ||
}; | ||
@@ -2525,0 +2617,0 @@ } |
@@ -47,3 +47,3 @@ import { Client } from '../client.js'; | ||
/** | ||
* List Identities | ||
* List identities | ||
* | ||
@@ -97,3 +97,3 @@ * Get the list of identities for the currently logged in user. | ||
/** | ||
* Create Authenticator | ||
* Create authenticator | ||
* | ||
@@ -108,3 +108,3 @@ * 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. | ||
/** | ||
* Verify Authenticator | ||
* Verify authenticator | ||
* | ||
@@ -120,3 +120,3 @@ * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. | ||
/** | ||
* Delete Authenticator | ||
* Delete authenticator | ||
* | ||
@@ -131,3 +131,3 @@ * Delete an authenticator for a user by ID. | ||
/** | ||
* Create MFA Challenge | ||
* Create MFA challenge | ||
* | ||
@@ -142,3 +142,3 @@ * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. | ||
/** | ||
* Create MFA Challenge (confirmation) | ||
* Create MFA challenge (confirmation) | ||
* | ||
@@ -154,3 +154,3 @@ * 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. | ||
/** | ||
* List Factors | ||
* List factors | ||
* | ||
@@ -164,3 +164,3 @@ * List the factors available on the account to be used as a MFA challange. | ||
/** | ||
* Get MFA Recovery Codes | ||
* Get MFA recovery codes | ||
* | ||
@@ -174,3 +174,3 @@ * 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. | ||
/** | ||
* Create MFA Recovery Codes | ||
* Create MFA recovery codes | ||
* | ||
@@ -184,3 +184,3 @@ * 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. | ||
/** | ||
* Regenerate MFA Recovery Codes | ||
* Regenerate MFA recovery codes | ||
* | ||
@@ -398,3 +398,3 @@ * 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. | ||
* | ||
* 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. | ||
@@ -401,0 +401,0 @@ 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). |
@@ -117,3 +117,3 @@ 'use strict'; | ||
/** | ||
* List Identities | ||
* List identities | ||
* | ||
@@ -247,3 +247,3 @@ * Get the list of identities for the currently logged in user. | ||
/** | ||
* Create Authenticator | ||
* Create authenticator | ||
* | ||
@@ -274,3 +274,3 @@ * 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. | ||
/** | ||
* Verify Authenticator | ||
* Verify authenticator | ||
* | ||
@@ -308,3 +308,3 @@ * Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. | ||
/** | ||
* Delete Authenticator | ||
* Delete authenticator | ||
* | ||
@@ -335,3 +335,3 @@ * Delete an authenticator for a user by ID. | ||
/** | ||
* Create MFA Challenge | ||
* Create MFA challenge | ||
* | ||
@@ -365,3 +365,3 @@ * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. | ||
/** | ||
* Create MFA Challenge (confirmation) | ||
* Create MFA challenge (confirmation) | ||
* | ||
@@ -402,3 +402,3 @@ * 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. | ||
/** | ||
* List Factors | ||
* List factors | ||
* | ||
@@ -425,3 +425,3 @@ * List the factors available on the account to be used as a MFA challange. | ||
/** | ||
* Get MFA Recovery Codes | ||
* Get MFA recovery codes | ||
* | ||
@@ -448,3 +448,3 @@ * 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. | ||
/** | ||
* Create MFA Recovery Codes | ||
* Create MFA recovery codes | ||
* | ||
@@ -471,3 +471,3 @@ * 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. | ||
/** | ||
* Regenerate MFA Recovery Codes | ||
* Regenerate MFA recovery codes | ||
* | ||
@@ -1080,3 +1080,3 @@ * 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. | ||
* | ||
* 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. | ||
@@ -1083,0 +1083,0 @@ 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). |
@@ -20,3 +20,3 @@ import { Client } from '../client.js'; | ||
/** | ||
* List Locale Codes | ||
* List locale codes | ||
* | ||
@@ -23,0 +23,0 @@ * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). |
@@ -32,3 +32,3 @@ 'use strict'; | ||
/** | ||
* List Locale Codes | ||
* List locale codes | ||
* | ||
@@ -35,0 +35,0 @@ * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). |
import { Client } from '../client.js'; | ||
import { Models } from '../models.js'; | ||
import { MessagePriority } from '../enums/message-priority.js'; | ||
import { SmtpEncryption } from '../enums/smtp-encryption.js'; | ||
@@ -81,9 +82,12 @@ import '../query.js'; | ||
* @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>} | ||
*/ | ||
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>; | ||
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>; | ||
/** | ||
@@ -111,6 +115,9 @@ * Update push notification | ||
* @param {string} scheduledAt | ||
* @param {boolean} contentAvailable | ||
* @param {boolean} critical | ||
* @param {MessagePriority} priority | ||
* @throws {AppwriteException} | ||
* @returns {Promise<Models.Message>} | ||
*/ | ||
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>; | ||
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>; | ||
/** | ||
@@ -117,0 +124,0 @@ * Create SMS |
@@ -207,18 +207,15 @@ 'use strict'; | ||
* @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, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) { | ||
async createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority) { | ||
if (typeof messageId === "undefined") { | ||
throw new client.AppwriteException('Missing required parameter: "messageId"'); | ||
} | ||
if (typeof title === "undefined") { | ||
throw new client.AppwriteException('Missing required parameter: "title"'); | ||
} | ||
if (typeof body === "undefined") { | ||
throw new client.AppwriteException('Missing required parameter: "body"'); | ||
} | ||
const apiPath = "/messaging/messages/push"; | ||
@@ -274,2 +271,11 @@ const payload = {}; | ||
} | ||
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); | ||
@@ -308,6 +314,9 @@ const apiHeaders = { | ||
* @param {string} scheduledAt | ||
* @param {boolean} contentAvailable | ||
* @param {boolean} critical | ||
* @param {MessagePriority} priority | ||
* @throws {AppwriteException} | ||
* @returns {Promise<Models.Message>} | ||
*/ | ||
async updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) { | ||
async updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority) { | ||
if (typeof messageId === "undefined") { | ||
@@ -363,2 +372,11 @@ throw new client.AppwriteException('Missing required parameter: "messageId"'); | ||
} | ||
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); | ||
@@ -365,0 +383,0 @@ const apiHeaders = { |
@@ -137,3 +137,3 @@ import { Client, UploadProgress } from '../client.js'; | ||
/** | ||
* Delete File | ||
* Delete file | ||
* | ||
@@ -140,0 +140,0 @@ * Delete a file by its unique ID. Only users with write permissions have access to delete this resource. |
@@ -380,3 +380,3 @@ 'use strict'; | ||
/** | ||
* Delete File | ||
* Delete file | ||
* | ||
@@ -383,0 +383,0 @@ * Delete a file by its unique ID. Only users with write permissions have access to delete this resource. |
@@ -65,3 +65,3 @@ import { Client } from '../client.js'; | ||
* | ||
* 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. | ||
* | ||
@@ -101,3 +101,3 @@ * @param {string} teamId | ||
* | ||
* 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. | ||
* | ||
@@ -104,0 +104,0 @@ * @param {string} teamId |
@@ -167,3 +167,3 @@ 'use strict'; | ||
* | ||
* 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. | ||
* | ||
@@ -262,3 +262,3 @@ * @param {string} teamId | ||
* | ||
* 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. | ||
* | ||
@@ -265,0 +265,0 @@ * @param {string} teamId |
@@ -63,3 +63,3 @@ import { Client } from '../client.js'; | ||
/** | ||
* List Identities | ||
* List identities | ||
* | ||
@@ -247,3 +247,3 @@ * Get identities for all users. | ||
/** | ||
* Delete Authenticator | ||
* Delete authenticator | ||
* | ||
@@ -259,3 +259,3 @@ * Delete an authenticator app. | ||
/** | ||
* List Factors | ||
* List factors | ||
* | ||
@@ -270,3 +270,3 @@ * List the factors available on the account to be used as a MFA challange. | ||
/** | ||
* Get MFA Recovery Codes | ||
* Get MFA recovery codes | ||
* | ||
@@ -281,3 +281,3 @@ * 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. | ||
/** | ||
* Regenerate MFA Recovery Codes | ||
* Regenerate MFA recovery codes | ||
* | ||
@@ -292,3 +292,3 @@ * 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. | ||
/** | ||
* Create MFA Recovery Codes | ||
* Create MFA recovery codes | ||
* | ||
@@ -411,3 +411,3 @@ * 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. | ||
/** | ||
* List User Targets | ||
* List user targets | ||
* | ||
@@ -423,3 +423,3 @@ * List the messaging targets that are associated with a user. | ||
/** | ||
* Create User Target | ||
* Create user target | ||
* | ||
@@ -439,3 +439,3 @@ * Create a messaging target. | ||
/** | ||
* Get User Target | ||
* Get user target | ||
* | ||
@@ -451,3 +451,3 @@ * Get a user's push notification target by ID. | ||
/** | ||
* Update User target | ||
* Update user target | ||
* | ||
@@ -454,0 +454,0 @@ * Update a messaging target. |
@@ -179,3 +179,3 @@ 'use strict'; | ||
/** | ||
* List Identities | ||
* List identities | ||
* | ||
@@ -774,3 +774,3 @@ * Get identities for all users. | ||
/** | ||
* Delete Authenticator | ||
* Delete authenticator | ||
* | ||
@@ -805,3 +805,3 @@ * Delete an authenticator app. | ||
/** | ||
* List Factors | ||
* List factors | ||
* | ||
@@ -832,3 +832,3 @@ * List the factors available on the account to be used as a MFA challange. | ||
/** | ||
* Get MFA Recovery Codes | ||
* Get MFA recovery codes | ||
* | ||
@@ -859,3 +859,3 @@ * 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. | ||
/** | ||
* Regenerate MFA Recovery Codes | ||
* Regenerate MFA recovery codes | ||
* | ||
@@ -886,3 +886,3 @@ * 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. | ||
/** | ||
* Create MFA Recovery Codes | ||
* Create MFA recovery codes | ||
* | ||
@@ -1214,3 +1214,3 @@ * 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. | ||
/** | ||
* List User Targets | ||
* List user targets | ||
* | ||
@@ -1245,3 +1245,3 @@ * List the messaging targets that are associated with a user. | ||
/** | ||
* Create User Target | ||
* Create user target | ||
* | ||
@@ -1301,3 +1301,3 @@ * Create a messaging target. | ||
/** | ||
* Get User Target | ||
* Get user target | ||
* | ||
@@ -1332,3 +1332,3 @@ * Get a user's push notification target by ID. | ||
/** | ||
* Update User target | ||
* Update user target | ||
* | ||
@@ -1335,0 +1335,0 @@ * Update a messaging target. |
@@ -5,3 +5,3 @@ { | ||
"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", | ||
@@ -8,0 +8,0 @@ "main": "dist/index.js", |
# Appwrite Node.js SDK | ||
 | ||
 | ||
 | ||
[](https://travis-ci.com/appwrite/sdk-generator) | ||
@@ -6,0 +6,0 @@ [](https://twitter.com/appwrite) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2381751
0.66%231
2.67%29527
0.71%