diff --git a/README.md b/README.md index 2c90c50..4be22c4 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ import { Client, Account } from "appwrite"; To install with a CDN (content delivery network) add the following scripts to the bottom of your
tag, but before you use any Appwrite services: ```html - + ``` diff --git a/package.json b/package.json index ef42466..4f92dfc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "appwrite", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "20.0.0", + "version": "20.1.0", "license": "BSD-3-Clause", "main": "dist/cjs/sdk.js", "exports": { diff --git a/src/client.ts b/src/client.ts index 54e5f34..e9ce4bc 100644 --- a/src/client.ts +++ b/src/client.ts @@ -316,7 +316,7 @@ class Client { 'x-sdk-name': 'Web', 'x-sdk-platform': 'client', 'x-sdk-language': 'web', - 'x-sdk-version': '20.0.0', + 'x-sdk-version': '20.1.0', 'X-Appwrite-Response-Format': '1.8.0', }; diff --git a/src/models.ts b/src/models.ts index 6d2ff3c..bcab3f1 100644 --- a/src/models.ts +++ b/src/models.ts @@ -1025,7 +1025,7 @@ export namespace Models { */ requestPath: string; /** - * HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous. + * HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous. */ requestHeaders: Headers[]; /** diff --git a/src/query.ts b/src/query.ts index ddaa3f2..8b274f4 100644 --- a/src/query.ts +++ b/src/query.ts @@ -52,20 +52,20 @@ export class Query { * Filter resources where attribute is equal to value. * * @param {string} attribute - * @param {QueryTypes | any[]} value + * @param {QueryTypes} value * @returns {string} */ - static equal = (attribute: string, value: QueryTypes | any[]): string => + static equal = (attribute: string, value: QueryTypes): string => new Query("equal", attribute, value).toString(); /** * Filter resources where attribute is not equal to value. * * @param {string} attribute - * @param {QueryTypes | any[]} value + * @param {QueryTypes} value * @returns {string} */ - static notEqual = (attribute: string, value: QueryTypes | any[]): string => + static notEqual = (attribute: string, value: QueryTypes): string => new Query("notEqual", attribute, value).toString(); /** @@ -195,6 +195,14 @@ export class Query { static orderAsc = (attribute: string): string => new Query("orderAsc", attribute).toString(); + /** + * Sort results randomly. + * + * @returns {string} + */ + static orderRandom = (): string => + new Query("orderRandom").toString(); + /** * Return results after documentId. *