Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix between query output #17

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
21 changes: 21 additions & 0 deletions docs/examples/health/get-queue-builds.md
Original file line number Diff line number Diff line change
@@ -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);
});
21 changes: 21 additions & 0 deletions docs/examples/health/get-queue-databases.md
Original file line number Diff line number Diff line change
@@ -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);
});
21 changes: 21 additions & 0 deletions docs/examples/health/get-queue-deletes.md
Original file line number Diff line number Diff line change
@@ -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);
});
21 changes: 21 additions & 0 deletions docs/examples/health/get-queue-mails.md
Original file line number Diff line number Diff line change
@@ -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);
});
21 changes: 21 additions & 0 deletions docs/examples/health/get-queue-messaging.md
Original file line number Diff line number Diff line change
@@ -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);
});
21 changes: 21 additions & 0 deletions docs/examples/health/get-queue-migrations.md
Original file line number Diff line number Diff line change
@@ -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);
});
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.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.0',
'x-sdk-version': '9.1.0',
'X-Appwrite-Response-Format':'1.4.0',
};

Expand Down
12 changes: 6 additions & 6 deletions src/models.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
/**
Expand All @@ -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;
/**
Expand Down Expand Up @@ -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[];
}
Expand Down Expand Up @@ -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[];
/**
Expand Down Expand Up @@ -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;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading