Skip to content

Commit 851e598

Browse files
committed
chore: release rc
1 parent c2c1258 commit 851e598

File tree

13 files changed

+264
-31
lines changed

13 files changed

+264
-31
lines changed

README.md

Lines changed: 1 addition & 1 deletion
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.5.7-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.6.0-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/account/delete-mfa-authenticator.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ const client = new sdk.Client()
88
const account = new sdk.Account(client);
99

1010
const result = await account.deleteMfaAuthenticator(
11-
sdk.AuthenticatorType.Totp, // type
12-
'<OTP>' // otp
11+
sdk.AuthenticatorType.Totp // type
1312
);

docs/examples/functions/create-execution.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const sdk = require('node-appwrite');
2+
const fs = require('fs');
23

34
const client = new sdk.Client()
45
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint

docs/examples/functions/create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ const result = await functions.create(
2828
'<TEMPLATE_REPOSITORY>', // templateRepository (optional)
2929
'<TEMPLATE_OWNER>', // templateOwner (optional)
3030
'<TEMPLATE_ROOT_DIRECTORY>', // templateRootDirectory (optional)
31-
'<TEMPLATE_BRANCH>' // templateBranch (optional)
31+
'<TEMPLATE_VERSION>' // templateVersion (optional)
3232
);

docs/examples/functions/download-deployment.md renamed to docs/examples/functions/get-deployment-download.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ const sdk = require('node-appwrite');
33
const client = new sdk.Client()
44
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
55
.setProject('&lt;YOUR_PROJECT_ID&gt;') // Your project ID
6-
.setKey('&lt;YOUR_API_KEY&gt;'); // Your secret API key
6+
.setSession(''); // The user session to authenticate with
77

88
const functions = new sdk.Functions(client);
99

10-
const result = await functions.downloadDeployment(
10+
const result = await functions.getDeploymentDownload(
1111
'<FUNCTION_ID>', // functionId
1212
'<DEPLOYMENT_ID>' // deploymentId
1313
);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const sdk = require('node-appwrite');
2+
3+
const client = new sdk.Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
6+
7+
const functions = new sdk.Functions(client);
8+
9+
const result = await functions.getTemplate(
10+
'<TEMPLATE_ID>' // templateId
11+
);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const sdk = require('node-appwrite');
2+
3+
const client = new sdk.Client()
4+
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
5+
.setProject('&lt;YOUR_PROJECT_ID&gt;'); // Your project ID
6+
7+
const functions = new sdk.Functions(client);
8+
9+
const result = await functions.listTemplates(
10+
[], // runtimes (optional)
11+
[], // useCases (optional)
12+
1, // limit (optional)
13+
0 // offset (optional)
14+
);

package.json

Lines changed: 1 addition & 1 deletion
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": "14.0.0-rc.1",
5+
"version": "14.0.0-rc.2",
66
"license": "BSD-3-Clause",
77
"main": "dist/index.js",
88
"type": "commonjs",

src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class AppwriteException extends Error {
3333
}
3434

3535
function getUserAgent() {
36-
let ua = 'AppwriteNodeJSSDK/14.0.0-rc.1';
36+
let ua = 'AppwriteNodeJSSDK/14.0.0-rc.2';
3737

3838
// `process` is a global in Node.js, but not fully available in all runtimes.
3939
const platform: string[] = [];
@@ -82,9 +82,9 @@ class Client {
8282
'x-sdk-name': 'Node.js',
8383
'x-sdk-platform': 'server',
8484
'x-sdk-language': 'nodejs',
85-
'x-sdk-version': '14.0.0-rc.1',
85+
'x-sdk-version': '14.0.0-rc.2',
8686
'user-agent' : getUserAgent(),
87-
'X-Appwrite-Response-Format': '1.5.0',
87+
'X-Appwrite-Response-Format': '1.6.0',
8888
};
8989

9090
/**

src/models.ts

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,19 @@ export namespace Models {
171171
*/
172172
functions: Function[];
173173
}
174+
/**
175+
* Function Templates List
176+
*/
177+
export type TemplateFunctionList = {
178+
/**
179+
* Total number of templates documents that matched your query.
180+
*/
181+
total: number;
182+
/**
183+
* List of templates.
184+
*/
185+
templates: TemplateFunction[];
186+
}
174187
/**
175188
* Runtimes List
176189
*/
@@ -1716,6 +1729,129 @@ export namespace Models {
17161729
*/
17171730
providerSilentMode: boolean;
17181731
}
1732+
/**
1733+
* Template Function
1734+
*/
1735+
export type TemplateFunction = {
1736+
/**
1737+
* Function Template Icon.
1738+
*/
1739+
icon: string;
1740+
/**
1741+
* Function Template ID.
1742+
*/
1743+
id: string;
1744+
/**
1745+
* Function Template Name.
1746+
*/
1747+
name: string;
1748+
/**
1749+
* Function Template Tagline.
1750+
*/
1751+
tagline: string;
1752+
/**
1753+
* Execution permissions.
1754+
*/
1755+
permissions: string[];
1756+
/**
1757+
* Function trigger events.
1758+
*/
1759+
events: string[];
1760+
/**
1761+
* Function execution schedult in CRON format.
1762+
*/
1763+
cron: string;
1764+
/**
1765+
* Function execution timeout in seconds.
1766+
*/
1767+
timeout: number;
1768+
/**
1769+
* Function use cases.
1770+
*/
1771+
useCases: string[];
1772+
/**
1773+
* List of runtimes that can be used with this template.
1774+
*/
1775+
runtimes: TemplateRuntime[];
1776+
/**
1777+
* Function Template Instructions.
1778+
*/
1779+
instructions: string;
1780+
/**
1781+
* VCS (Version Control System) Provider.
1782+
*/
1783+
vcsProvider: string;
1784+
/**
1785+
* VCS (Version Control System) Repository ID
1786+
*/
1787+
providerRepositoryId: string;
1788+
/**
1789+
* VCS (Version Control System) Owner.
1790+
*/
1791+
providerOwner: string;
1792+
/**
1793+
* VCS (Version Control System) branch version (tag).
1794+
*/
1795+
providerVersion: string;
1796+
/**
1797+
* Function variables.
1798+
*/
1799+
variables: TemplateVariable[];
1800+
/**
1801+
* Function scopes.
1802+
*/
1803+
scopes: string[];
1804+
}
1805+
/**
1806+
* Template Runtime
1807+
*/
1808+
export type TemplateRuntime = {
1809+
/**
1810+
* Runtime Name.
1811+
*/
1812+
name: string;
1813+
/**
1814+
* The build command used to build the deployment.
1815+
*/
1816+
commands: string;
1817+
/**
1818+
* The entrypoint file used to execute the deployment.
1819+
*/
1820+
entrypoint: string;
1821+
/**
1822+
* Path to function in VCS (Version Control System) repository
1823+
*/
1824+
providerRootDirectory: string;
1825+
}
1826+
/**
1827+
* Template Variable
1828+
*/
1829+
export type TemplateVariable = {
1830+
/**
1831+
* Variable Name.
1832+
*/
1833+
name: string;
1834+
/**
1835+
* Variable Description.
1836+
*/
1837+
description: string;
1838+
/**
1839+
* Variable Value.
1840+
*/
1841+
value: string;
1842+
/**
1843+
* Variable Placeholder.
1844+
*/
1845+
placeholder: string;
1846+
/**
1847+
* Is the variable required?
1848+
*/
1849+
required: boolean;
1850+
/**
1851+
* Variable Type.
1852+
*/
1853+
type: string;
1854+
}
17191855
/**
17201856
* Runtime
17211857
*/
@@ -1724,6 +1860,10 @@ export namespace Models {
17241860
* Runtime ID.
17251861
*/
17261862
$id: string;
1863+
/**
1864+
* Parent runtime key.
1865+
*/
1866+
key: string;
17271867
/**
17281868
* Runtime Name.
17291869
*/
@@ -1914,6 +2054,10 @@ export namespace Models {
19142054
* Function execution duration in seconds.
19152055
*/
19162056
duration: number;
2057+
/**
2058+
* The scheduled time for execution. If left empty, execution will be queued immediately.
2059+
*/
2060+
scheduledAt?: string;
19172061
}
19182062
/**
19192063
* Build

0 commit comments

Comments
 (0)