Skip to content

Commit 879a81e

Browse files
Merge pull request #27 from appwrite/1.6.x
1.6.x
2 parents 6446482 + 0369ad7 commit 879a81e

22 files changed

+42
-726
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Deno SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-deno.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.6.1-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.6.2-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

docs/examples/databases/update-float-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const response = await databases.updateFloatAttribute(
1212
'<COLLECTION_ID>', // collectionId
1313
'', // key
1414
false, // required
15-
null, // min
16-
null, // max
1715
null, // default
16+
null, // min (optional)
17+
null, // max (optional)
1818
'' // newKey (optional)
1919
);

docs/examples/databases/update-integer-attribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const response = await databases.updateIntegerAttribute(
1212
'<COLLECTION_ID>', // collectionId
1313
'', // key
1414
false, // required
15-
null, // min
16-
null, // max
1715
null, // default
16+
null, // min (optional)
17+
null, // max (optional)
1818
'' // newKey (optional)
1919
);

docs/examples/health/get-queue-usage-dump.md renamed to docs/examples/health/get-queue-stats-resources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ const client = new Client()
77

88
const health = new Health(client);
99

10-
const response = await health.getQueueUsageDump(
10+
const response = await health.getQueueStatsResources(
1111
null // threshold (optional)
1212
);

docs/examples/health/get-queue.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/client.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ export class Client {
1111
endpoint: string = 'https://cloud.appwrite.io/v1';
1212
headers: Payload = {
1313
'content-type': '',
14-
'user-agent' : `AppwriteDenoSDK/13.0.0 (${Deno.build.os}; ${Deno.build.arch})`,
14+
'user-agent' : `AppwriteDenoSDK/14.0.0 (${Deno.build.os}; ${Deno.build.arch})`,
1515
'x-sdk-name': 'Deno',
1616
'x-sdk-platform': 'server',
1717
'x-sdk-language': 'deno',
18-
'x-sdk-version': '13.0.0',
18+
'x-sdk-version': '14.0.0',
1919
'X-Appwrite-Response-Format':'1.6.0',
2020
};
2121

@@ -113,8 +113,11 @@ export class Client {
113113
* @return this
114114
*/
115115
setEndpoint(endpoint: string): this {
116-
this.endpoint = endpoint;
116+
if (!endpoint.startsWith('http://') && !endpoint.startsWith('https://')) {
117+
throw new AppwriteException('Invalid endpoint URL: ' + endpoint);
118+
}
117119

120+
this.endpoint = endpoint;
118121
return this;
119122
}
120123

@@ -180,7 +183,7 @@ export class Client {
180183
} catch (error) {
181184
throw new AppwriteException(text, response.status, "", text);
182185
}
183-
throw new AppwriteException(json.message, json.code, json.type, json);
186+
throw new AppwriteException(json.message, json.code, json.type, text);
184187
}
185188

186189
if (responseType === "arraybuffer") {

src/enums/credit-card.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ export enum CreditCard {
1515
Visa = 'visa',
1616
MIR = 'mir',
1717
Maestro = 'maestro',
18+
Rupay = 'rupay',
1819
}

src/enums/name.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export enum Name {
44
V1Audits = 'v1-audits',
55
V1Mails = 'v1-mails',
66
V1Functions = 'v1-functions',
7-
V1Usage = 'v1-usage',
8-
V1UsageDump = 'v1-usage-dump',
7+
V1StatsResources = 'v1-stats-resources',
8+
V1StatsUsage = 'v1-stats-usage',
99
V1Webhooks = 'v1-webhooks',
1010
V1Certificates = 'v1-certificates',
1111
V1Builds = 'v1-builds',

src/enums/o-auth-provider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export enum OAuthProvider {
1313
Dropbox = 'dropbox',
1414
Etsy = 'etsy',
1515
Facebook = 'facebook',
16+
Figma = 'figma',
1617
Github = 'github',
1718
Gitlab = 'gitlab',
1819
Google = 'google',

0 commit comments

Comments
 (0)