diff --git a/README.md b/README.md index 4be22c4..10990f7 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 4f92dfc..685c1e6 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.1.0", + "version": "21.0.0", "license": "BSD-3-Clause", "main": "dist/cjs/sdk.js", "exports": { diff --git a/src/client.ts b/src/client.ts index e9ce4bc..0c48c11 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.1.0', + 'x-sdk-version': '21.0.0', 'X-Appwrite-Response-Format': '1.8.0', }; diff --git a/src/enums/execution-status.ts b/src/enums/execution-status.ts new file mode 100644 index 0000000..1781e94 --- /dev/null +++ b/src/enums/execution-status.ts @@ -0,0 +1,6 @@ +export enum ExecutionStatus { + Waiting = 'waiting', + Processing = 'processing', + Completed = 'completed', + Failed = 'failed', +} \ No newline at end of file diff --git a/src/enums/execution-trigger.ts b/src/enums/execution-trigger.ts new file mode 100644 index 0000000..1829d51 --- /dev/null +++ b/src/enums/execution-trigger.ts @@ -0,0 +1,5 @@ +export enum ExecutionTrigger { + Http = 'http', + Schedule = 'schedule', + Event = 'event', +} \ No newline at end of file diff --git a/src/models.ts b/src/models.ts index bcab3f1..65cbf00 100644 --- a/src/models.ts +++ b/src/models.ts @@ -1,3 +1,6 @@ +import { ExecutionTrigger } from "./enums/execution-trigger" +import { ExecutionStatus } from "./enums/execution-status" + /** * Appwrite Models */ @@ -1011,11 +1014,11 @@ export namespace Models { /** * The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`. */ - trigger: string; + trigger: ExecutionTrigger; /** * The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`. */ - status: string; + status: ExecutionStatus; /** * HTTP request method type. */