Skip to content

Commit d34d57d

Browse files
committed
Add order random
1 parent f6b6421 commit d34d57d

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { Client, Account } from "appwrite";
3333
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
3434

3535
```html
36-
<script src="https://cdn.jsdelivr.net/npm/appwrite@20.0.0"></script>
36+
<script src="https://cdn.jsdelivr.net/npm/appwrite@20.1.0"></script>
3737
```
3838

3939

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "appwrite",
33
"homepage": "https://appwrite.io/support",
44
"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",
5-
"version": "20.0.0",
5+
"version": "20.1.0",
66
"license": "BSD-3-Clause",
77
"main": "dist/cjs/sdk.js",
88
"exports": {

src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ class Client {
316316
'x-sdk-name': 'Web',
317317
'x-sdk-platform': 'client',
318318
'x-sdk-language': 'web',
319-
'x-sdk-version': '20.0.0',
319+
'x-sdk-version': '20.1.0',
320320
'X-Appwrite-Response-Format': '1.8.0',
321321
};
322322

src/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ export namespace Models {
10251025
*/
10261026
requestPath: string;
10271027
/**
1028-
* HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
1028+
* HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
10291029
*/
10301030
requestHeaders: Headers[];
10311031
/**

src/query.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ export class Query {
5252
* Filter resources where attribute is equal to value.
5353
*
5454
* @param {string} attribute
55-
* @param {QueryTypes | any[]} value
55+
* @param {QueryTypes} value
5656
* @returns {string}
5757
*/
58-
static equal = (attribute: string, value: QueryTypes | any[]): string =>
58+
static equal = (attribute: string, value: QueryTypes): string =>
5959
new Query("equal", attribute, value).toString();
6060

6161
/**
6262
* Filter resources where attribute is not equal to value.
6363
*
6464
* @param {string} attribute
65-
* @param {QueryTypes | any[]} value
65+
* @param {QueryTypes} value
6666
* @returns {string}
6767
*/
68-
static notEqual = (attribute: string, value: QueryTypes | any[]): string =>
68+
static notEqual = (attribute: string, value: QueryTypes): string =>
6969
new Query("notEqual", attribute, value).toString();
7070

7171
/**
@@ -195,6 +195,14 @@ export class Query {
195195
static orderAsc = (attribute: string): string =>
196196
new Query("orderAsc", attribute).toString();
197197

198+
/**
199+
* Sort results randomly.
200+
*
201+
* @returns {string}
202+
*/
203+
static orderRandom = (): string =>
204+
new Query("orderRandom").toString();
205+
198206
/**
199207
* Return results after documentId.
200208
*

0 commit comments

Comments
 (0)