react-native-appwrite 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-native-appwrite",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "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": "0.13.0",
5
+ "version": "0.15.0",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
package/src/client.ts CHANGED
@@ -115,7 +115,7 @@ class Client {
115
115
  'x-sdk-name': 'React Native',
116
116
  'x-sdk-platform': 'client',
117
117
  'x-sdk-language': 'reactnative',
118
- 'x-sdk-version': '0.13.0',
118
+ 'x-sdk-version': '0.15.0',
119
119
  'X-Appwrite-Response-Format': '1.8.0',
120
120
  };
121
121
 
@@ -0,0 +1,6 @@
1
+ export enum ExecutionStatus {
2
+ Waiting = 'waiting',
3
+ Processing = 'processing',
4
+ Completed = 'completed',
5
+ Failed = 'failed',
6
+ }
@@ -0,0 +1,5 @@
1
+ export enum ExecutionTrigger {
2
+ Http = 'http',
3
+ Schedule = 'schedule',
4
+ Event = 'event',
5
+ }
package/src/models.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import { ExecutionTrigger } from "./enums/execution-trigger"
2
+ import { ExecutionStatus } from "./enums/execution-status"
3
+
1
4
  export namespace Models {
2
5
 
3
6
  declare const __default: unique symbol;
@@ -1008,11 +1011,11 @@ export namespace Models {
1008
1011
  /**
1009
1012
  * The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
1010
1013
  */
1011
- trigger: string;
1014
+ trigger: ExecutionTrigger;
1012
1015
  /**
1013
1016
  * The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
1014
1017
  */
1015
- status: string;
1018
+ status: ExecutionStatus;
1016
1019
  /**
1017
1020
  * HTTP request method type.
1018
1021
  */
@@ -1022,7 +1025,7 @@ export namespace Models {
1022
1025
  */
1023
1026
  requestPath: string;
1024
1027
  /**
1025
- * 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.
1026
1029
  */
1027
1030
  requestHeaders: Headers[];
1028
1031
  /**
package/src/query.ts CHANGED
@@ -33,10 +33,10 @@ export class Query {
33
33
  });
34
34
  }
35
35
 
36
- static equal = (attribute: string, value: QueryTypes | any[]): string =>
36
+ static equal = (attribute: string, value: QueryTypes): string =>
37
37
  new Query("equal", attribute, value).toString();
38
38
 
39
- static notEqual = (attribute: string, value: QueryTypes | any[]): string =>
39
+ static notEqual = (attribute: string, value: QueryTypes): string =>
40
40
  new Query("notEqual", attribute, value).toString();
41
41
 
42
42
  static lessThan = (attribute: string, value: QueryTypes): string =>
@@ -78,6 +78,9 @@ export class Query {
78
78
  static orderAsc = (attribute: string): string =>
79
79
  new Query("orderAsc", attribute).toString();
80
80
 
81
+ static orderRandom = (): string =>
82
+ new Query("orderRandom").toString();
83
+
81
84
  static cursorAfter = (documentId: string): string =>
82
85
  new Query("cursorAfter", undefined, documentId).toString();
83
86
 
@@ -0,0 +1,6 @@
1
+ export declare enum ExecutionStatus {
2
+ Waiting = "waiting",
3
+ Processing = "processing",
4
+ Completed = "completed",
5
+ Failed = "failed"
6
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum ExecutionTrigger {
2
+ Http = "http",
3
+ Schedule = "schedule",
4
+ Event = "event"
5
+ }
package/types/models.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { ExecutionTrigger } from "./enums/execution-trigger";
2
+ import { ExecutionStatus } from "./enums/execution-status";
1
3
  export declare namespace Models {
2
4
  const __default: unique symbol;
3
5
  /**
@@ -966,11 +968,11 @@ export declare namespace Models {
966
968
  /**
967
969
  * The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
968
970
  */
969
- trigger: string;
971
+ trigger: ExecutionTrigger;
970
972
  /**
971
973
  * The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
972
974
  */
973
- status: string;
975
+ status: ExecutionStatus;
974
976
  /**
975
977
  * HTTP request method type.
976
978
  */
@@ -980,7 +982,7 @@ export declare namespace Models {
980
982
  */
981
983
  requestPath: string;
982
984
  /**
983
- * HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
985
+ * HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
984
986
  */
985
987
  requestHeaders: Headers[];
986
988
  /**
package/types/query.d.ts CHANGED
@@ -8,8 +8,8 @@ export declare class Query {
8
8
  values: QueryTypesList | undefined;
9
9
  constructor(method: string, attribute?: AttributesTypes, values?: QueryTypes);
10
10
  toString(): string;
11
- static equal: (attribute: string, value: QueryTypes | any[]) => string;
12
- static notEqual: (attribute: string, value: QueryTypes | any[]) => string;
11
+ static equal: (attribute: string, value: QueryTypes) => string;
12
+ static notEqual: (attribute: string, value: QueryTypes) => string;
13
13
  static lessThan: (attribute: string, value: QueryTypes) => string;
14
14
  static lessThanEqual: (attribute: string, value: QueryTypes) => string;
15
15
  static greaterThan: (attribute: string, value: QueryTypes) => string;
@@ -23,6 +23,7 @@ export declare class Query {
23
23
  static search: (attribute: string, value: string) => string;
24
24
  static orderDesc: (attribute: string) => string;
25
25
  static orderAsc: (attribute: string) => string;
26
+ static orderRandom: () => string;
26
27
  static cursorAfter: (documentId: string) => string;
27
28
  static cursorBefore: (documentId: string) => string;
28
29
  static limit: (limit: number) => string;