From da8f43ffdb8ba9e08ca0200cbda5cbcf9db53c8b Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 16 Nov 2023 17:14:22 +1300 Subject: [PATCH 1/2] Fix between query output --- README.md | 2 +- docs/examples/health/get-queue-builds.md | 21 +++ docs/examples/health/get-queue-databases.md | 21 +++ docs/examples/health/get-queue-deletes.md | 21 +++ docs/examples/health/get-queue-mails.md | 21 +++ docs/examples/health/get-queue-messaging.md | 21 +++ docs/examples/health/get-queue-migrations.md | 21 +++ src/client.ts | 4 +- src/models.d.ts | 12 +- src/query.ts | 2 +- src/services/account.ts | 66 +++---- src/services/avatars.ts | 21 ++- src/services/databases.ts | 96 +++++----- src/services/functions.ts | 48 ++--- src/services/graphql.ts | 4 +- src/services/health.ts | 185 +++++++++++++++++-- src/services/locale.ts | 14 +- src/services/storage.ts | 24 +-- src/services/teams.ts | 34 ++-- src/services/users.ts | 86 ++++----- 20 files changed, 509 insertions(+), 215 deletions(-) create mode 100644 docs/examples/health/get-queue-builds.md create mode 100644 docs/examples/health/get-queue-databases.md create mode 100644 docs/examples/health/get-queue-deletes.md create mode 100644 docs/examples/health/get-queue-mails.md create mode 100644 docs/examples/health/get-queue-messaging.md create mode 100644 docs/examples/health/get-queue-migrations.md diff --git a/README.md b/README.md index a3270d4..59c6bb7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Appwrite Deno SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-deno.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.4.12-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/health/get-queue-builds.md b/docs/examples/health/get-queue-builds.md new file mode 100644 index 0000000..4f45749 --- /dev/null +++ b/docs/examples/health/get-queue-builds.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueBuilds(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/health/get-queue-databases.md b/docs/examples/health/get-queue-databases.md new file mode 100644 index 0000000..639d109 --- /dev/null +++ b/docs/examples/health/get-queue-databases.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueDatabases(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/health/get-queue-deletes.md b/docs/examples/health/get-queue-deletes.md new file mode 100644 index 0000000..26ff3da --- /dev/null +++ b/docs/examples/health/get-queue-deletes.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueDeletes(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/health/get-queue-mails.md b/docs/examples/health/get-queue-mails.md new file mode 100644 index 0000000..478ad80 --- /dev/null +++ b/docs/examples/health/get-queue-mails.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueMails(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/health/get-queue-messaging.md b/docs/examples/health/get-queue-messaging.md new file mode 100644 index 0000000..ba018ac --- /dev/null +++ b/docs/examples/health/get-queue-messaging.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueMessaging(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/docs/examples/health/get-queue-migrations.md b/docs/examples/health/get-queue-migrations.md new file mode 100644 index 0000000..d779a1d --- /dev/null +++ b/docs/examples/health/get-queue-migrations.md @@ -0,0 +1,21 @@ +import * as sdk from "https://deno.land/x/appwrite/mod.ts"; + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + + +let promise = health.getQueueMigrations(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/src/client.ts b/src/client.ts index e6db0f3..61ffd41 100644 --- a/src/client.ts +++ b/src/client.ts @@ -11,11 +11,11 @@ export class Client { endpoint: string = 'https://HOSTNAME/v1'; headers: Payload = { 'content-type': '', - 'user-agent' : `AppwriteDenoSDK/9.0.0 (${Deno.build.os}; ${Deno.build.arch})`, + 'user-agent' : `AppwriteDenoSDK/9.0.1 (${Deno.build.os}; ${Deno.build.arch})`, 'x-sdk-name': 'Deno', 'x-sdk-platform': 'server', 'x-sdk-language': 'deno', - 'x-sdk-version': '9.0.0', + 'x-sdk-version': '9.0.1', 'X-Appwrite-Response-Format':'1.4.0', }; diff --git a/src/models.d.ts b/src/models.d.ts index f44d961..8f3fb65 100644 --- a/src/models.d.ts +++ b/src/models.d.ts @@ -340,7 +340,7 @@ export namespace Models { */ $updatedAt: string; /** - * Collection permissions. [Learn more about permissions](/docs/permissions). + * Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; /** @@ -356,7 +356,7 @@ export namespace Models { */ enabled: boolean; /** - * Whether document-level permissions are enabled. [Learn more about permissions](/docs/permissions). + * Whether document-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions). */ documentSecurity: boolean; /** @@ -829,7 +829,7 @@ export namespace Models { */ $updatedAt: string; /** - * Document permissions. [Learn more about permissions](/docs/permissions). + * Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; } @@ -1345,7 +1345,7 @@ export namespace Models { */ $updatedAt: string; /** - * File permissions. [Learn more about permissions](/docs/permissions). + * File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; /** @@ -1390,11 +1390,11 @@ export namespace Models { */ $updatedAt: string; /** - * Bucket permissions. [Learn more about permissions](/docs/permissions). + * Bucket permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). */ $permissions: string[]; /** - * Whether file-level security is enabled. [Learn more about permissions](/docs/permissions). + * Whether file-level security is enabled. [Learn more about permissions](https://appwrite.io/docs/permissions). */ fileSecurity: boolean; /** diff --git a/src/query.ts b/src/query.ts index dd7c7a1..ce87185 100644 --- a/src/query.ts +++ b/src/query.ts @@ -31,7 +31,7 @@ export class Query { `isNotNull("${attribute}")`; static between = (attribute: string, start: string|number, end: string|number): string => - `between("${attribute}", [${Query.parseValues(start)},${Query.parseValues(end)}])`; + `between("${attribute}", ${Query.parseValues(start)}, ${Query.parseValues(end)})`; static startsWith = (attribute: string, value: string): string => Query.addQuery(attribute, "startsWith", value); diff --git a/src/services/account.ts b/src/services/account.ts index b0616ec..cde2a26 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -21,7 +21,7 @@ export class Account extends Service { } /** - * Get Account + * Get account * * Get the currently logged in user. * @@ -37,7 +37,7 @@ export class Account extends Service { }, payload); } /** - * Update Email + * Update email * * Update currently logged in user account email address. After changing user * address, the user confirmation status will get reset. A new confirmation @@ -118,7 +118,7 @@ export class Account extends Service { }, payload); } /** - * List Logs + * List logs * * Get the list of latest security activity logs for the currently logged in * user. Each log returns user IP address, location and date and time of log. @@ -140,7 +140,7 @@ export class Account extends Service { }, payload); } /** - * Update Name + * Update name * * Update currently logged in user account name. * @@ -164,7 +164,7 @@ export class Account extends Service { }, payload); } /** - * Update Password + * Update password * * Update currently logged in user password. For validation, user is required * to pass in the new password, and the old password. For users created with @@ -194,12 +194,12 @@ export class Account extends Service { }, payload); } /** - * Update Phone + * Update phone * * Update the currently logged in user's phone number. After updating the * phone number, the phone verification status will be reset. A confirmation * SMS is not sent automatically, however you can use the [POST - * /account/verification/phone](/docs/client/account#accountCreatePhoneVerification) + * /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) * endpoint to send a confirmation SMS. * * @param {string} phone @@ -230,7 +230,7 @@ export class Account extends Service { }, payload); } /** - * Get Account Preferences + * Get account preferences * * Get the preferences as a key-value object for the currently logged in user. * @@ -246,7 +246,7 @@ export class Account extends Service { }, payload); } /** - * Update Preferences + * Update preferences * * Update currently logged in user account preferences. The object you pass is * stored as is, and replaces any previous value. The maximum allowed prefs @@ -272,16 +272,16 @@ export class Account extends Service { }, payload); } /** - * Create Password Recovery + * Create password recovery * * Sends the user an email with a temporary secret key for password reset. * When the user clicks the confirmation link he is redirected back to your * app password reset URL with the secret key and email address values * attached to the URL query string. Use the query string params to submit a * request to the [PUT - * /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to - * complete the process. The verification link sent to the user's email - * address is valid for 1 hour. + * /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) + * endpoint to complete the process. The verification link sent to the user's + * email address is valid for 1 hour. * * @param {string} email * @param {string} url @@ -311,12 +311,13 @@ export class Account extends Service { }, payload); } /** - * Create Password Recovery (confirmation) + * Create password recovery (confirmation) * * Use this endpoint to complete the user account password reset. Both the * **userId** and **secret** arguments will be passed as query parameters to * the redirect URL you have provided when sending your request to the [POST - * /account/recovery](/docs/client/account#accountCreateRecovery) endpoint. + * /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) + * endpoint. * * Please note that in order to avoid a [Redirect * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) @@ -367,7 +368,7 @@ export class Account extends Service { }, payload); } /** - * List Sessions + * List sessions * * Get the list of active sessions across different devices for the currently * logged in user. @@ -384,7 +385,7 @@ export class Account extends Service { }, payload); } /** - * Delete Sessions + * Delete sessions * * Delete all sessions from the user account and remove any sessions cookies * from the end client. @@ -401,7 +402,7 @@ export class Account extends Service { }, payload); } /** - * Get Session + * Get session * * Use this endpoint to get a logged in user's session using a Session ID. * Inputting 'current' will return the current session being used. @@ -423,7 +424,7 @@ export class Account extends Service { }, payload); } /** - * Update OAuth Session (Refresh Tokens) + * Update OAuth session (refresh tokens) * * Access tokens have limited lifespan and expire to mitigate security risks. * If session was created using an OAuth provider, this route can be used to @@ -446,12 +447,13 @@ export class Account extends Service { }, payload); } /** - * Delete Session + * Delete session * * Logout the user. Use 'current' as the session ID to logout on this device, * use a session ID to logout on another device. If you're looking to logout * the user on all devices, use [Delete - * Sessions](/docs/client/account#accountDeleteSessions) instead. + * Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) + * instead. * * @param {string} sessionId * @throws {AppwriteException} @@ -470,7 +472,7 @@ export class Account extends Service { }, payload); } /** - * Update Status + * Update status * * Block the currently logged in user account. Behind the scene, the user * record is not deleted but permanently blocked from any access. To @@ -488,7 +490,7 @@ export class Account extends Service { }, payload); } /** - * Create Email Verification + * Create email verification * * Use this endpoint to send a verification message to your user email address * to confirm they are the valid owners of that address. Both the **userId** @@ -497,8 +499,8 @@ export class Account extends Service { * should redirect the user back to your app and allow you to complete the * verification process by verifying both the **userId** and **secret** * parameters. Learn more about how to [complete the verification - * process](/docs/client/account#accountUpdateEmailVerification). The - * verification link sent to the user's email address is valid for 7 days. + * process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). + * The verification link sent to the user's email address is valid for 7 days. * * Please note that in order to avoid a [Redirect * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), @@ -526,7 +528,7 @@ export class Account extends Service { }, payload); } /** - * Create Email Verification (confirmation) + * Create email verification (confirmation) * * Use this endpoint to complete the user email verification process. Use both * the **userId** and **secret** parameters that were attached to your app URL @@ -561,14 +563,16 @@ export class Account extends Service { }, payload); } /** - * Create Phone Verification + * Create phone verification * * Use this endpoint to send a verification SMS to the currently logged in * user. This endpoint is meant for use after updating a user's phone number - * using the [accountUpdatePhone](/docs/client/account#accountUpdatePhone) + * using the + * [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) * endpoint. Learn more about how to [complete the verification - * process](/docs/client/account#accountUpdatePhoneVerification). The - * verification code sent to the user's phone number is valid for 15 minutes. + * process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). + * The verification code sent to the user's phone number is valid for 15 + * minutes. * * @throws {AppwriteException} * @returns {Promise} @@ -582,7 +586,7 @@ export class Account extends Service { }, payload); } /** - * Create Phone Verification (confirmation) + * Create phone verification (confirmation) * * Use this endpoint to complete the user phone verification process. Use the * **userId** and **secret** that were sent to your user's phone number to diff --git a/src/services/avatars.ts b/src/services/avatars.ts index a8a3b80..f49457e 100644 --- a/src/services/avatars.ts +++ b/src/services/avatars.ts @@ -21,12 +21,13 @@ export class Avatars extends Service { } /** - * Get Browser Icon + * Get browser icon * * You can use this endpoint to show different browser icons to your users. * The code argument receives the browser code as it appears in your user [GET - * /account/sessions](/docs/client/account#accountGetSessions) endpoint. Use - * width, height and quality arguments to change the output settings. + * /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) + * endpoint. Use width, height and quality arguments to change the output + * settings. * * When one dimension is specified and the other is 0, the image is scaled * with preserved aspect ratio. If both dimensions are 0, the API provides an @@ -65,7 +66,7 @@ export class Avatars extends Service { }, payload); } /** - * Get Credit Card Icon + * Get credit card icon * * The credit card endpoint will return you the icon of the credit card * provider you need. Use width, height and quality arguments to change the @@ -109,7 +110,7 @@ export class Avatars extends Service { }, payload); } /** - * Get Favicon + * Get favicon * * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote * website URL. @@ -136,12 +137,12 @@ export class Avatars extends Service { }, payload); } /** - * Get Country Flag + * Get country flag * * You can use this endpoint to show different country flags icons to your * users. The code argument receives the 2 letter country code. Use width, * height and quality arguments to change the output settings. Country codes - * follow the [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) standard. + * follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard. * * When one dimension is specified and the other is 0, the image is scaled * with preserved aspect ratio. If both dimensions are 0, the API provides an @@ -181,7 +182,7 @@ export class Avatars extends Service { }, payload); } /** - * Get Image from URL + * Get image from URL * * Use this endpoint to fetch a remote image URL and crop it to any image size * you want. This endpoint is very useful if you need to crop and display @@ -225,7 +226,7 @@ export class Avatars extends Service { }, payload); } /** - * Get User Initials + * Get user initials * * Use this endpoint to show your user initials avatar icon on your website or * app. By default, this route will try to print your logged-in user name or @@ -276,7 +277,7 @@ export class Avatars extends Service { }, payload); } /** - * Get QR Code + * Get QR code * * Converts a given plain text to a QR code image. You can use the query * parameters to change the size and style of the resulting image. diff --git a/src/services/databases.ts b/src/services/databases.ts index 5e6720d..9008fd4 100644 --- a/src/services/databases.ts +++ b/src/services/databases.ts @@ -21,7 +21,7 @@ export class Databases extends Service { } /** - * List Databases + * List databases * * Get a list of all databases from the current Appwrite project. You can use * the search parameter to filter your results. @@ -48,7 +48,7 @@ export class Databases extends Service { }, payload); } /** - * Create Database + * Create database * * Create a new Database. * @@ -85,7 +85,7 @@ export class Databases extends Service { }, payload); } /** - * Get Database + * Get database * * Get a database by its unique ID. This endpoint response returns a JSON * object with the database metadata. @@ -107,7 +107,7 @@ export class Databases extends Service { }, payload); } /** - * Update Database + * Update database * * Update a database by its unique ID. * @@ -140,7 +140,7 @@ export class Databases extends Service { }, payload); } /** - * Delete Database + * Delete database * * Delete a database by its unique ID. Only API keys with with databases.write * scope can delete a database. @@ -162,7 +162,7 @@ export class Databases extends Service { }, payload); } /** - * List Collections + * List collections * * Get a list of all collections that belong to the provided databaseId. You * can use the search parameter to filter your results. @@ -194,12 +194,12 @@ export class Databases extends Service { }, payload); } /** - * Create Collection + * Create collection * * Create a new Collection. Before using this route, you should create a new * database resource using either a [server - * integration](/docs/server/databases#databasesCreateCollection) API or - * directly from your database console. + * integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) + * API or directly from your database console. * * @param {string} databaseId * @param {string} collectionId @@ -246,7 +246,7 @@ export class Databases extends Service { }, payload); } /** - * Get Collection + * Get collection * * Get a collection by its unique ID. This endpoint response returns a JSON * object with the collection metadata. @@ -273,7 +273,7 @@ export class Databases extends Service { }, payload); } /** - * Update Collection + * Update collection * * Update a collection by its unique ID. * @@ -319,7 +319,7 @@ export class Databases extends Service { }, payload); } /** - * Delete Collection + * Delete collection * * Delete a collection by its unique ID. Only users with write permissions * have access to delete this resource. @@ -346,7 +346,7 @@ export class Databases extends Service { }, payload); } /** - * List Attributes + * List attributes * * @param {string} databaseId * @param {string} collectionId @@ -375,7 +375,7 @@ export class Databases extends Service { }, payload); } /** - * Create Boolean Attribute + * Create boolean attribute * * Create a boolean attribute. * @@ -426,7 +426,7 @@ export class Databases extends Service { }, payload); } /** - * Update Boolean Attribute + * Update boolean attribute * * @param {string} databaseId * @param {string} collectionId @@ -471,7 +471,7 @@ export class Databases extends Service { }, payload); } /** - * Create DateTime Attribute + * Create datetime attribute * * @param {string} databaseId * @param {string} collectionId @@ -519,7 +519,7 @@ export class Databases extends Service { }, payload); } /** - * Update DateTime Attribute + * Update dateTime attribute * * @param {string} databaseId * @param {string} collectionId @@ -564,7 +564,7 @@ export class Databases extends Service { }, payload); } /** - * Create Email Attribute + * Create email attribute * * Create an email attribute. * @@ -615,7 +615,7 @@ export class Databases extends Service { }, payload); } /** - * Update Email Attribute + * Update email attribute * * Update an email attribute. Changing the `default` value will not update * already existing documents. @@ -664,7 +664,7 @@ export class Databases extends Service { }, payload); } /** - * Create Enum Attribute + * Create enum attribute * * @param {string} databaseId * @param {string} collectionId @@ -720,7 +720,7 @@ export class Databases extends Service { }, payload); } /** - * Update Enum Attribute + * Update enum attribute * * Update an enum attribute. Changing the `default` value will not update * already existing documents. @@ -777,7 +777,7 @@ export class Databases extends Service { }, payload); } /** - * Create Float Attribute + * Create float attribute * * Create a float attribute. Optionally, minimum and maximum values can be * provided. @@ -837,7 +837,7 @@ export class Databases extends Service { }, payload); } /** - * Update Float Attribute + * Update float attribute * * Update a float attribute. Changing the `default` value will not update * already existing documents. @@ -902,7 +902,7 @@ export class Databases extends Service { }, payload); } /** - * Create Integer Attribute + * Create integer attribute * * Create an integer attribute. Optionally, minimum and maximum values can be * provided. @@ -962,7 +962,7 @@ export class Databases extends Service { }, payload); } /** - * Update Integer Attribute + * Update integer attribute * * Update an integer attribute. Changing the `default` value will not update * already existing documents. @@ -1027,7 +1027,7 @@ export class Databases extends Service { }, payload); } /** - * Create IP Address Attribute + * Create IP address attribute * * Create IP address attribute. * @@ -1078,7 +1078,7 @@ export class Databases extends Service { }, payload); } /** - * Update IP Address Attribute + * Update IP address attribute * * Update an ip attribute. Changing the `default` value will not update * already existing documents. @@ -1127,10 +1127,10 @@ export class Databases extends Service { }, payload); } /** - * Create Relationship Attribute + * Create relationship attribute * * Create relationship attribute. [Learn more about relationship - * attributes](/docs/databases-relationships#relationship-attributes). + * attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * * * @param {string} databaseId @@ -1187,7 +1187,7 @@ export class Databases extends Service { }, payload); } /** - * Create String Attribute + * Create string attribute * * Create a string attribute. * @@ -1250,7 +1250,7 @@ export class Databases extends Service { }, payload); } /** - * Update String Attribute + * Update string attribute * * Update a string attribute. Changing the `default` value will not update * already existing documents. @@ -1299,7 +1299,7 @@ export class Databases extends Service { }, payload); } /** - * Create URL Attribute + * Create URL attribute * * Create a URL attribute. * @@ -1350,7 +1350,7 @@ export class Databases extends Service { }, payload); } /** - * Update URL Attribute + * Update URL attribute * * Update an url attribute. Changing the `default` value will not update * already existing documents. @@ -1399,7 +1399,7 @@ export class Databases extends Service { }, payload); } /** - * Get Attribute + * Get attribute * * @param {string} databaseId * @param {string} collectionId @@ -1428,7 +1428,7 @@ export class Databases extends Service { }, payload); } /** - * Delete Attribute + * Delete attribute * * @param {string} databaseId * @param {string} collectionId @@ -1457,10 +1457,10 @@ export class Databases extends Service { }, payload); } /** - * Update Relationship Attribute + * Update relationship attribute * * Update relationship attribute. [Learn more about relationship - * attributes](/docs/databases-relationships#relationship-attributes). + * attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). * * * @param {string} databaseId @@ -1494,7 +1494,7 @@ export class Databases extends Service { }, payload); } /** - * List Documents + * List documents * * Get a list of all the user's documents in a given collection. You can use * the query params to filter your results. @@ -1526,12 +1526,12 @@ export class Databases extends Service { }, payload); } /** - * Create Document + * Create document * * Create a new Document. Before using this route, you should create a new * collection resource using either a [server - * integration](/docs/server/databases#databasesCreateCollection) API or - * directly from your database console. + * integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) + * API or directly from your database console. * * @param {string} databaseId * @param {string} collectionId @@ -1575,7 +1575,7 @@ export class Databases extends Service { }, payload); } /** - * Get Document + * Get document * * Get a document by its unique ID. This endpoint response returns a JSON * object with the document data. @@ -1612,7 +1612,7 @@ export class Databases extends Service { }, payload); } /** - * Update Document + * Update document * * Update a document by its unique ID. Using the patch method you can pass * only specific fields that will get updated. @@ -1652,7 +1652,7 @@ export class Databases extends Service { }, payload); } /** - * Delete Document + * Delete document * * Delete a document by its unique ID. * @@ -1683,7 +1683,7 @@ export class Databases extends Service { }, payload); } /** - * List Indexes + * List indexes * * @param {string} databaseId * @param {string} collectionId @@ -1712,7 +1712,7 @@ export class Databases extends Service { }, payload); } /** - * Create Index + * Create index * * @param {string} databaseId * @param {string} collectionId @@ -1764,7 +1764,7 @@ export class Databases extends Service { }, payload); } /** - * Get Index + * Get index * * @param {string} databaseId * @param {string} collectionId @@ -1793,7 +1793,7 @@ export class Databases extends Service { }, payload); } /** - * Delete Index + * Delete index * * @param {string} databaseId * @param {string} collectionId diff --git a/src/services/functions.ts b/src/services/functions.ts index 66a2bb5..2dd063c 100644 --- a/src/services/functions.ts +++ b/src/services/functions.ts @@ -21,7 +21,7 @@ export class Functions extends Service { } /** - * List Functions + * List functions * * Get a list of all the project's functions. You can use the query params to * filter your results. @@ -48,11 +48,12 @@ export class Functions extends Service { }, payload); } /** - * Create Function + * Create function * * Create a new function. You can pass a list of - * [permissions](/docs/permissions) to allow different project users or team - * with access to execute the function using the client API. + * [permissions](https://appwrite.io/docs/permissions) to allow different + * project users or team with access to execute the function using the client + * API. * * @param {string} functionId * @param {string} name @@ -174,7 +175,7 @@ export class Functions extends Service { }, payload); } /** - * Get Function + * Get function * * Get a function by its unique ID. * @@ -195,7 +196,7 @@ export class Functions extends Service { }, payload); } /** - * Update Function + * Update function * * Update function by its unique ID. * @@ -280,7 +281,7 @@ export class Functions extends Service { }, payload); } /** - * Delete Function + * Delete function * * Delete a function by its unique ID. * @@ -301,7 +302,7 @@ export class Functions extends Service { }, payload); } /** - * List Deployments + * List deployments * * Get a list of all the project's code deployments. You can use the query * params to filter your results. @@ -333,7 +334,7 @@ export class Functions extends Service { }, payload); } /** - * Create Deployment + * Create deployment * * Create a new function code deployment. Use this endpoint to upload a new * version of your code function. To execute your newly uploaded code, you'll @@ -342,7 +343,7 @@ export class Functions extends Service { * This endpoint accepts a tar.gz file compressed with your code. Make sure to * include any dependencies your code has within the compressed file. You can * learn more about code packaging in the [Appwrite Cloud Functions - * tutorial](/docs/functions). + * tutorial](https://appwrite.io/docs/functions). * * Use the "command" param to set the entrypoint used to execute your code. * @@ -469,7 +470,7 @@ export class Functions extends Service { return response; } /** - * Get Deployment + * Get deployment * * Get a code deployment by its unique ID. * @@ -495,7 +496,7 @@ export class Functions extends Service { }, payload); } /** - * Update Function Deployment + * Update function deployment * * Update the function code deployment ID using the unique function ID. Use * this endpoint to switch the code deployment that should be executed by the @@ -523,7 +524,7 @@ export class Functions extends Service { }, payload); } /** - * Delete Deployment + * Delete deployment * * Delete a code deployment by its unique ID. * @@ -549,7 +550,7 @@ export class Functions extends Service { }, payload); } /** - * Create Build + * Create build * * Create a new build for an Appwrite Function deployment. This endpoint can * be used to retry a failed build. @@ -583,6 +584,9 @@ export class Functions extends Service { /** * Download Deployment * + * Get a Deployment's contents by its unique ID. This endpoint supports range + * requests for partial or streaming file download. + * * @param {string} functionId * @param {string} deploymentId * @throws {AppwriteException} @@ -605,7 +609,7 @@ export class Functions extends Service { }, payload); } /** - * List Executions + * List executions * * Get a list of all the current user function execution logs. You can use the * query params to filter your results. @@ -637,7 +641,7 @@ export class Functions extends Service { }, payload); } /** - * Create Execution + * Create execution * * Trigger a function execution. The returned object will return you the * current execution status. You can ping the `Get Execution` endpoint to get @@ -681,7 +685,7 @@ export class Functions extends Service { }, payload); } /** - * Get Execution + * Get execution * * Get a function execution log by its unique ID. * @@ -707,7 +711,7 @@ export class Functions extends Service { }, payload); } /** - * List Variables + * List variables * * Get a list of all variables of a specific function. * @@ -728,7 +732,7 @@ export class Functions extends Service { }, payload); } /** - * Create Variable + * Create variable * * Create a new function environment variable. These variables can be accessed * in the function at runtime as environment variables. @@ -766,7 +770,7 @@ export class Functions extends Service { }, payload); } /** - * Get Variable + * Get variable * * Get a variable by its unique ID. * @@ -792,7 +796,7 @@ export class Functions extends Service { }, payload); } /** - * Update Variable + * Update variable * * Update variable by its unique ID. * @@ -830,7 +834,7 @@ export class Functions extends Service { }, payload); } /** - * Delete Variable + * Delete variable * * Delete a variable by its unique ID. * diff --git a/src/services/graphql.ts b/src/services/graphql.ts index 3fcbeaf..3bb06f9 100644 --- a/src/services/graphql.ts +++ b/src/services/graphql.ts @@ -21,7 +21,7 @@ export class Graphql extends Service { } /** - * GraphQL Endpoint + * GraphQL endpoint * * Execute a GraphQL mutation. * @@ -46,7 +46,7 @@ export class Graphql extends Service { }, payload); } /** - * GraphQL Endpoint + * GraphQL endpoint * * Execute a GraphQL mutation. * diff --git a/src/services/health.ts b/src/services/health.ts index 59be298..5b7a437 100644 --- a/src/services/health.ts +++ b/src/services/health.ts @@ -37,7 +37,7 @@ export class Health extends Service { }, payload); } /** - * Get Antivirus + * Get antivirus * * Check the Appwrite Antivirus server is up and connection is successful. * @@ -53,7 +53,7 @@ export class Health extends Service { }, payload); } /** - * Get Cache + * Get cache * * Check the Appwrite in-memory cache servers are up and connection is * successful. @@ -86,7 +86,7 @@ export class Health extends Service { }, payload); } /** - * Get PubSub + * Get pubsub * * Check the Appwrite pub-sub servers are up and connection is successful. * @@ -102,7 +102,7 @@ export class Health extends Service { }, payload); } /** - * Get Queue + * Get queue * * Check the Appwrite queue messaging servers are up and connection is * successful. @@ -119,73 +119,230 @@ export class Health extends Service { }, payload); } /** - * Get Certificates Queue + * Get builds queue + * + * Get the number of builds that are waiting to be processed in the Appwrite + * internal queue server. + * + * @param {number} threshold + * @throws {AppwriteException} + * @returns {Promise} + */ + async getQueueBuilds(threshold?: number): Promise { + const apiPath = '/health/queue/builds'; + const payload: Payload = {}; + + if (typeof threshold !== 'undefined') { + payload['threshold'] = threshold; + } + + return await this.client.call('get', apiPath, { + 'content-type': 'application/json', + }, payload); + } + /** + * Get certificates queue * * Get the number of certificates that are waiting to be issued against * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue * server. * + * @param {number} threshold * @throws {AppwriteException} * @returns {Promise} */ - async getQueueCertificates(): Promise { + async getQueueCertificates(threshold?: number): Promise { const apiPath = '/health/queue/certificates'; const payload: Payload = {}; + if (typeof threshold !== 'undefined') { + payload['threshold'] = threshold; + } + return await this.client.call('get', apiPath, { 'content-type': 'application/json', }, payload); } /** - * Get Functions Queue + * Get databases queue + * + * Get the number of database changes that are waiting to be processed in the + * Appwrite internal queue server. * + * @param {string} name + * @param {number} threshold * @throws {AppwriteException} * @returns {Promise} */ - async getQueueFunctions(): Promise { + async getQueueDatabases(name?: string, threshold?: number): Promise { + const apiPath = '/health/queue/databases'; + const payload: Payload = {}; + + if (typeof name !== 'undefined') { + payload['name'] = name; + } + + if (typeof threshold !== 'undefined') { + payload['threshold'] = threshold; + } + + return await this.client.call('get', apiPath, { + 'content-type': 'application/json', + }, payload); + } + /** + * Get deletes queue + * + * Get the number of background destructive changes that are waiting to be + * processed in the Appwrite internal queue server. + * + * @param {number} threshold + * @throws {AppwriteException} + * @returns {Promise} + */ + async getQueueDeletes(threshold?: number): Promise { + const apiPath = '/health/queue/deletes'; + const payload: Payload = {}; + + if (typeof threshold !== 'undefined') { + payload['threshold'] = threshold; + } + + return await this.client.call('get', apiPath, { + 'content-type': 'application/json', + }, payload); + } + /** + * Get functions queue + * + * @param {number} threshold + * @throws {AppwriteException} + * @returns {Promise} + */ + async getQueueFunctions(threshold?: number): Promise { const apiPath = '/health/queue/functions'; const payload: Payload = {}; + if (typeof threshold !== 'undefined') { + payload['threshold'] = threshold; + } + return await this.client.call('get', apiPath, { 'content-type': 'application/json', }, payload); } /** - * Get Logs Queue + * Get logs queue * * Get the number of logs that are waiting to be processed in the Appwrite * internal queue server. * + * @param {number} threshold * @throws {AppwriteException} * @returns {Promise} */ - async getQueueLogs(): Promise { + async getQueueLogs(threshold?: number): Promise { const apiPath = '/health/queue/logs'; const payload: Payload = {}; + if (typeof threshold !== 'undefined') { + payload['threshold'] = threshold; + } + + return await this.client.call('get', apiPath, { + 'content-type': 'application/json', + }, payload); + } + /** + * Get mails queue + * + * Get the number of mails that are waiting to be processed in the Appwrite + * internal queue server. + * + * @param {number} threshold + * @throws {AppwriteException} + * @returns {Promise} + */ + async getQueueMails(threshold?: number): Promise { + const apiPath = '/health/queue/mails'; + const payload: Payload = {}; + + if (typeof threshold !== 'undefined') { + payload['threshold'] = threshold; + } + return await this.client.call('get', apiPath, { 'content-type': 'application/json', }, payload); } /** - * Get Webhooks Queue + * Get messaging queue + * + * Get the number of messages that are waiting to be processed in the Appwrite + * internal queue server. + * + * @param {number} threshold + * @throws {AppwriteException} + * @returns {Promise} + */ + async getQueueMessaging(threshold?: number): Promise { + const apiPath = '/health/queue/messaging'; + const payload: Payload = {}; + + if (typeof threshold !== 'undefined') { + payload['threshold'] = threshold; + } + + return await this.client.call('get', apiPath, { + 'content-type': 'application/json', + }, payload); + } + /** + * Get migrations queue + * + * Get the number of migrations that are waiting to be processed in the + * Appwrite internal queue server. + * + * @param {number} threshold + * @throws {AppwriteException} + * @returns {Promise} + */ + async getQueueMigrations(threshold?: number): Promise { + const apiPath = '/health/queue/migrations'; + const payload: Payload = {}; + + if (typeof threshold !== 'undefined') { + payload['threshold'] = threshold; + } + + return await this.client.call('get', apiPath, { + 'content-type': 'application/json', + }, payload); + } + /** + * Get webhooks queue * * Get the number of webhooks that are waiting to be processed in the Appwrite * internal queue server. * + * @param {number} threshold * @throws {AppwriteException} * @returns {Promise} */ - async getQueueWebhooks(): Promise { + async getQueueWebhooks(threshold?: number): Promise { const apiPath = '/health/queue/webhooks'; const payload: Payload = {}; + if (typeof threshold !== 'undefined') { + payload['threshold'] = threshold; + } + return await this.client.call('get', apiPath, { 'content-type': 'application/json', }, payload); } /** - * Get Local Storage + * Get local storage * * Check the Appwrite local storage device is up and connection is successful. * @@ -201,7 +358,7 @@ export class Health extends Service { }, payload); } /** - * Get Time + * Get time * * Check the Appwrite server time is synced with Google remote NTP server. We * use this technology to smoothly handle leap seconds with no disruptive diff --git a/src/services/locale.ts b/src/services/locale.ts index 50fa48c..cd58f4a 100644 --- a/src/services/locale.ts +++ b/src/services/locale.ts @@ -21,7 +21,7 @@ export class Locale extends Service { } /** - * Get User Locale + * Get user locale * * Get the current user location based on IP. Returns an object with user * country code, country name, continent name, continent code, ip address and @@ -59,7 +59,7 @@ export class Locale extends Service { }, payload); } /** - * List Continents + * List continents * * List of all continents. You can use the locale header to get the data in a * supported language. @@ -76,7 +76,7 @@ export class Locale extends Service { }, payload); } /** - * List Countries + * List countries * * List of all countries. You can use the locale header to get the data in a * supported language. @@ -93,7 +93,7 @@ export class Locale extends Service { }, payload); } /** - * List EU Countries + * List EU countries * * List of all countries that are currently members of the EU. You can use the * locale header to get the data in a supported language. @@ -110,7 +110,7 @@ export class Locale extends Service { }, payload); } /** - * List Countries Phone Codes + * List countries phone codes * * List of all countries phone codes. You can use the locale header to get the * data in a supported language. @@ -127,7 +127,7 @@ export class Locale extends Service { }, payload); } /** - * List Currencies + * List currencies * * List of all currencies, including currency symbol, name, plural, and * decimal digits for all major and minor currencies. You can use the locale @@ -145,7 +145,7 @@ export class Locale extends Service { }, payload); } /** - * List Languages + * List languages * * List of all languages classified by ISO 639-1 including 2-letter code, name * in English, and name in the respective language. diff --git a/src/services/storage.ts b/src/services/storage.ts index 05d9272..a5a52f5 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -112,7 +112,7 @@ export class Storage extends Service { }, payload); } /** - * Get Bucket + * Get bucket * * Get a storage bucket by its unique ID. This endpoint response returns a * JSON object with the storage bucket metadata. @@ -134,7 +134,7 @@ export class Storage extends Service { }, payload); } /** - * Update Bucket + * Update bucket * * Update a storage bucket by its unique ID. * @@ -195,7 +195,7 @@ export class Storage extends Service { }, payload); } /** - * Delete Bucket + * Delete bucket * * Delete a storage bucket by its unique ID. * @@ -216,7 +216,7 @@ export class Storage extends Service { }, payload); } /** - * List Files + * List files * * Get a list of all the user files. You can use the query params to filter * your results. @@ -248,12 +248,12 @@ export class Storage extends Service { }, payload); } /** - * Create File + * Create file * * Create a new file. Before using this route, you should create a new bucket * resource using either a [server - * integration](/docs/server/storage#storageCreateBucket) API or directly from - * your Appwrite console. + * integration](https://appwrite.io/docs/server/storage#storageCreateBucket) + * API or directly from your Appwrite console. * * Larger files should be uploaded using multiple requests with the * [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) @@ -395,7 +395,7 @@ export class Storage extends Service { return response; } /** - * Get File + * Get file * * Get a file by its unique ID. This endpoint response returns a JSON object * with the file metadata. @@ -422,7 +422,7 @@ export class Storage extends Service { }, payload); } /** - * Update File + * Update file * * Update a file by its unique ID. Only users with write permissions have * access to update this resource. @@ -484,7 +484,7 @@ export class Storage extends Service { }, payload); } /** - * Get File for Download + * Get file for download * * Get a file content by its unique ID. The endpoint response return with a * 'Content-Disposition: attachment' header that tells the browser to start @@ -512,7 +512,7 @@ export class Storage extends Service { }, payload); } /** - * Get File Preview + * Get file preview * * Get a file preview image. Currently, this method supports preview for image * files (jpg, png, and gif), other supported formats, like pdf, docs, slides, @@ -597,7 +597,7 @@ export class Storage extends Service { }, payload); } /** - * Get File for View + * Get file for view * * Get a file content by its unique ID. This endpoint is similar to the * download method but returns with no 'Content-Disposition: attachment' diff --git a/src/services/teams.ts b/src/services/teams.ts index efaf137..9c09b8e 100644 --- a/src/services/teams.ts +++ b/src/services/teams.ts @@ -21,7 +21,7 @@ export class Teams extends Service { } /** - * List Teams + * List teams * * Get a list of all the teams in which the current user is a member. You can * use the parameters to filter your results. @@ -48,7 +48,7 @@ export class Teams extends Service { }, payload); } /** - * Create Team + * Create team * * Create a new team. The user who creates the team will automatically be * assigned as the owner of the team. Only the users with the owner role can @@ -86,7 +86,7 @@ export class Teams extends Service { }, payload); } /** - * Get Team + * Get team * * Get a team by its ID. All team members have read access for this resource. * @@ -107,7 +107,7 @@ export class Teams extends Service { }, payload); } /** - * Update Name + * Update name * * Update the team's name by its unique ID. * @@ -136,7 +136,7 @@ export class Teams extends Service { }, payload); } /** - * Delete Team + * Delete team * * Delete a team using its ID. Only team members with the owner role can * delete the team. @@ -158,7 +158,7 @@ export class Teams extends Service { }, payload); } /** - * List Team Memberships + * 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. @@ -190,7 +190,7 @@ export class Teams extends Service { }, payload); } /** - * Create Team Membership + * Create team membership * * Invite a new member to join your team. Provide an ID for existing users, or * invite unregistered users using an email or phone number. If initiated from @@ -205,8 +205,8 @@ export class Teams extends Service { * * Use the `url` parameter to redirect the user from the invitation email to * your app. After the user is redirected, use the [Update Team Membership - * Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow - * the user to accept the invitation to the team. + * Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) + * endpoint to allow the user to accept the invitation to the team. * * Please note that to avoid a [Redirect * Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) @@ -259,7 +259,7 @@ export class Teams extends Service { }, payload); } /** - * Get Team Membership + * Get team membership * * Get a team member by the membership unique id. All team members have read * access for this resource. @@ -286,11 +286,11 @@ export class Teams extends Service { }, payload); } /** - * Update Membership + * Update membership * * Modify the roles of a team member. Only team members with the owner role * have access to this endpoint. Learn more about [roles and - * permissions](/docs/permissions). + * permissions](https://appwrite.io/docs/permissions). * * * @param {string} teamId @@ -323,7 +323,7 @@ export class Teams extends Service { }, payload); } /** - * Delete Team Membership + * Delete team membership * * This endpoint allows a user to leave a team or for a team owner to delete * the membership of any other team member. You can also use this endpoint to @@ -351,7 +351,7 @@ export class Teams extends Service { }, payload); } /** - * Update Team Membership Status + * Update team membership status * * Use this endpoint to allow a user to accept an invitation to join a team * after being redirected back to your app from the invitation email received @@ -399,11 +399,11 @@ export class Teams extends Service { }, payload); } /** - * Get Team Preferences + * Get team preferences * * Get the team's shared preferences by its unique ID. If a preference doesn't * need to be shared by all team members, prefer storing them in [user - * preferences](/docs/client/account#accountGetPrefs). + * preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). * * @param {string} teamId * @throws {AppwriteException} @@ -422,7 +422,7 @@ export class Teams extends Service { }, payload); } /** - * Update Preferences + * Update preferences * * Update the team's preferences by its unique ID. The object you pass is * stored as is and replaces any previous value. The maximum allowed prefs diff --git a/src/services/users.ts b/src/services/users.ts index df341d3..ab6708c 100644 --- a/src/services/users.ts +++ b/src/services/users.ts @@ -21,7 +21,7 @@ export class Users extends Service { } /** - * List Users + * List users * * Get a list of all the project's users. You can use the query params to * filter your results. @@ -48,7 +48,7 @@ export class Users extends Service { }, payload); } /** - * Create User + * Create user * * Create a new user. * @@ -88,12 +88,12 @@ export class Users extends Service { }, payload); } /** - * Create User with Argon2 Password + * Create user with Argon2 password * * Create a new user. Password provided must be hashed with the * [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST - * /users](/docs/server/users#usersCreate) endpoint to create users with a - * plain text password. + * /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + * create users with a plain text password. * * @param {string} userId * @param {string} email @@ -135,12 +135,12 @@ export class Users extends Service { }, payload); } /** - * Create User with Bcrypt Password + * Create user with bcrypt password * * Create a new user. Password provided must be hashed with the * [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST - * /users](/docs/server/users#usersCreate) endpoint to create users with a - * plain text password. + * /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + * create users with a plain text password. * * @param {string} userId * @param {string} email @@ -229,12 +229,12 @@ export class Users extends Service { }, payload); } /** - * Create User with MD5 Password + * Create user with MD5 password * * Create a new user. Password provided must be hashed with the * [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST - * /users](/docs/server/users#usersCreate) endpoint to create users with a - * plain text password. + * /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + * create users with a plain text password. * * @param {string} userId * @param {string} email @@ -276,12 +276,12 @@ export class Users extends Service { }, payload); } /** - * Create User with PHPass Password + * Create user with PHPass password * * Create a new user. Password provided must be hashed with the * [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST - * /users](/docs/server/users#usersCreate) endpoint to create users with a - * plain text password. + * /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + * create users with a plain text password. * * @param {string} userId * @param {string} email @@ -323,12 +323,12 @@ export class Users extends Service { }, payload); } /** - * Create User with Scrypt Password + * Create user with Scrypt password * * Create a new user. Password provided must be hashed with the * [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST - * /users](/docs/server/users#usersCreate) endpoint to create users with a - * plain text password. + * /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + * create users with a plain text password. * * @param {string} userId * @param {string} email @@ -410,12 +410,13 @@ export class Users extends Service { }, payload); } /** - * Create User with Scrypt Modified Password + * Create user with Scrypt modified password * * Create a new user. Password provided must be hashed with the [Scrypt * Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) - * algorithm. Use the [POST /users](/docs/server/users#usersCreate) endpoint - * to create users with a plain text password. + * algorithm. Use the [POST + * /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to + * create users with a plain text password. * * @param {string} userId * @param {string} email @@ -481,12 +482,12 @@ export class Users extends Service { }, payload); } /** - * Create User with SHA Password + * Create user with SHA password * * Create a new user. Password provided must be hashed with the * [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use - * the [POST /users](/docs/server/users#usersCreate) endpoint to create users - * with a plain text password. + * the [POST /users](https://appwrite.io/docs/server/users#usersCreate) + * endpoint to create users with a plain text password. * * @param {string} userId * @param {string} email @@ -532,7 +533,7 @@ export class Users extends Service { }, payload); } /** - * Get User + * Get user * * Get a user by its unique ID. * @@ -553,12 +554,13 @@ export class Users extends Service { }, payload); } /** - * Delete User + * Delete user * * Delete a user by its unique ID, thereby releasing it's ID. Since ID is * released and can be reused, all user-related resources like documents or * storage files should be deleted before user deletion. If you want to keep - * ID reserved, use the [updateStatus](/docs/server/users#usersUpdateStatus) + * ID reserved, use the + * [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) * endpoint instead. * * @param {string} userId @@ -578,7 +580,7 @@ export class Users extends Service { }, payload); } /** - * Update Email + * Update email * * Update the user email by its unique ID. * @@ -607,14 +609,14 @@ export class Users extends Service { }, payload); } /** - * Update User Labels + * Update user labels * * Update the user labels by its unique ID. * * Labels can be used to grant access to resources. While teams are a way for * user's to share access to a resource, labels can be defined by the * developer to grant access without an invitation. See the [Permissions - * docs](/docs/permissions) for more info. + * docs](https://appwrite.io/docs/permissions) for more info. * * @param {string} userId * @param {string[]} labels @@ -641,7 +643,7 @@ export class Users extends Service { }, payload); } /** - * List User Logs + * List user logs * * Get the user activity logs list by its unique ID. * @@ -667,7 +669,7 @@ export class Users extends Service { }, payload); } /** - * List User Memberships + * List user memberships * * Get the user membership list by its unique ID. * @@ -688,7 +690,7 @@ export class Users extends Service { }, payload); } /** - * Update Name + * Update name * * Update the user name by its unique ID. * @@ -717,7 +719,7 @@ export class Users extends Service { }, payload); } /** - * Update Password + * Update password * * Update the user password by its unique ID. * @@ -746,7 +748,7 @@ export class Users extends Service { }, payload); } /** - * Update Phone + * Update phone * * Update the user phone by its unique ID. * @@ -775,7 +777,7 @@ export class Users extends Service { }, payload); } /** - * Get User Preferences + * Get user preferences * * Get the user preferences by its unique ID. * @@ -796,7 +798,7 @@ export class Users extends Service { }, payload); } /** - * Update User Preferences + * Update user preferences * * Update the user preferences by its unique ID. The object you pass is stored * as is, and replaces any previous value. The maximum allowed prefs size is @@ -827,7 +829,7 @@ export class Users extends Service { }, payload); } /** - * List User Sessions + * List user sessions * * Get the user sessions list by its unique ID. * @@ -848,7 +850,7 @@ export class Users extends Service { }, payload); } /** - * Delete User Sessions + * Delete user sessions * * Delete all user's sessions by using the user's unique ID. * @@ -869,7 +871,7 @@ export class Users extends Service { }, payload); } /** - * Delete User Session + * Delete user session * * Delete a user sessions by its unique ID. * @@ -895,7 +897,7 @@ export class Users extends Service { }, payload); } /** - * Update User Status + * Update user status * * Update the user status by its unique ID. Use this endpoint as an * alternative to deleting a user if you want to keep user's ID reserved. @@ -925,7 +927,7 @@ export class Users extends Service { }, payload); } /** - * Update Email Verification + * Update email verification * * Update the user email verification status by its unique ID. * @@ -954,7 +956,7 @@ export class Users extends Service { }, payload); } /** - * Update Phone Verification + * Update phone verification * * Update the user phone verification status by its unique ID. * From 799a55bdc6601f874148f827042cc597bab7be03 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 16 Nov 2023 21:31:25 +1300 Subject: [PATCH 2/2] Fix between query output --- src/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.ts b/src/client.ts index 61ffd41..046ed97 100644 --- a/src/client.ts +++ b/src/client.ts @@ -11,11 +11,11 @@ export class Client { endpoint: string = 'https://HOSTNAME/v1'; headers: Payload = { 'content-type': '', - 'user-agent' : `AppwriteDenoSDK/9.0.1 (${Deno.build.os}; ${Deno.build.arch})`, + 'user-agent' : `AppwriteDenoSDK/9.1.0 (${Deno.build.os}; ${Deno.build.arch})`, 'x-sdk-name': 'Deno', 'x-sdk-platform': 'server', 'x-sdk-language': 'deno', - 'x-sdk-version': '9.0.1', + 'x-sdk-version': '9.1.0', 'X-Appwrite-Response-Format':'1.4.0', };