Skip to content

Commit 1390e2d

Browse files
Merge pull request #61 from appwrite/dev
chore: bug fixes for Apwrite 1.4.2
2 parents 27e7a62 + 7082eec commit 1390e2d

File tree

9 files changed

+12
-20
lines changed

9 files changed

+12
-20
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Node.js SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.4.1-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.4.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/functions/create.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ client
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-14.5');
14+
const promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-18.0');
1515

1616
promise.then(function (response) {
1717
console.log(response);

docs/examples/functions/update.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ client
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = functions.update('[FUNCTION_ID]', '[NAME]', 'node-14.5');
14+
const promise = functions.update('[FUNCTION_ID]', '[NAME]');
1515

1616
promise.then(function (response) {
1717
console.log(response);

docs/examples/teams/create-membership.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ client
1111
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
1212
;
1313

14-
const promise = teams.createMembership('[TEAM_ID]', [], 'https://example.com');
14+
const promise = teams.createMembership('[TEAM_ID]', []);
1515

1616
promise.then(function (response) {
1717
console.log(response);

index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -3279,7 +3279,7 @@ declare module "node-appwrite" {
32793279
* @throws {AppwriteException}
32803280
* @returns {Promise}
32813281
*/
3282-
update(functionId: string, name: string, runtime: string, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string): Promise<Models.Function>;
3282+
update(functionId: string, name: string, runtime?: string, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string): Promise<Models.Function>;
32833283
/**
32843284
* Delete Function
32853285
*
@@ -4028,15 +4028,15 @@ declare module "node-appwrite" {
40284028
*
40294029
* @param {string} teamId
40304030
* @param {string[]} roles
4031-
* @param {string} url
40324031
* @param {string} email
40334032
* @param {string} userId
40344033
* @param {string} phone
4034+
* @param {string} url
40354035
* @param {string} name
40364036
* @throws {AppwriteException}
40374037
* @returns {Promise}
40384038
*/
4039-
createMembership(teamId: string, roles: string[], url: string, email?: string, userId?: string, phone?: string, name?: string): Promise<Models.Membership>;
4039+
createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;
40404040
/**
40414041
* Get Team Membership
40424042
*

lib/client.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ class Client {
1212
this.headers = {
1313
'accept-encoding': '*',
1414
'content-type': '',
15-
'user-agent' : `AppwriteNodeJSSDK/10.0.1 (${os.type()}; ${os.version()}; ${os.arch()})`,
15+
'user-agent' : `AppwriteNodeJSSDK/11.0.0 (${os.type()}; ${os.version()}; ${os.arch()})`,
1616
'x-sdk-name': 'Node.js',
1717
'x-sdk-platform': 'server',
1818
'x-sdk-language': 'nodejs',
19-
'x-sdk-version': '10.0.1',
19+
'x-sdk-version': '11.0.0',
2020
'X-Appwrite-Response-Format' : '1.4.0',
2121
};
2222
this.selfSigned = false;

lib/services/functions.js

-4
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,6 @@ class Functions extends Service {
247247
throw new AppwriteException('Missing required parameter: "name"');
248248
}
249249

250-
if (typeof runtime === 'undefined') {
251-
throw new AppwriteException('Missing required parameter: "runtime"');
252-
}
253-
254250

255251
if (typeof name !== 'undefined') {
256252
payload['name'] = name;

lib/services/teams.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,15 @@ class Teams extends Service {
220220
*
221221
* @param {string} teamId
222222
* @param {string[]} roles
223-
* @param {string} url
224223
* @param {string} email
225224
* @param {string} userId
226225
* @param {string} phone
226+
* @param {string} url
227227
* @param {string} name
228228
* @throws {AppwriteException}
229229
* @returns {Promise}
230230
*/
231-
async createMembership(teamId, roles, url, email, userId, phone, name) {
231+
async createMembership(teamId, roles, email, userId, phone, url, name) {
232232
const apiPath = '/teams/{teamId}/memberships'.replace('{teamId}', teamId);
233233
let payload = {};
234234
if (typeof teamId === 'undefined') {
@@ -239,10 +239,6 @@ class Teams extends Service {
239239
throw new AppwriteException('Missing required parameter: "roles"');
240240
}
241241

242-
if (typeof url === 'undefined') {
243-
throw new AppwriteException('Missing required parameter: "url"');
244-
}
245-
246242

247243
if (typeof email !== 'undefined') {
248244
payload['email'] = email;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "node-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": "10.0.1",
5+
"version": "11.0.0",
66
"license": "BSD-3-Clause",
77
"main": "./index.js",
88
"types": "./index.d.ts",

0 commit comments

Comments
 (0)