Skip to content

Commit 3b8ea20

Browse files
committed
chore: updates for appwrite 1.6.x
1 parent c427226 commit 3b8ea20

File tree

4 files changed

+1
-163
lines changed

4 files changed

+1
-163
lines changed

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

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

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

docs/examples/functions/get-template.md

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

src/models.ts

Lines changed: 0 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,129 +1733,6 @@ export namespace Models {
17331733
*/
17341734
specification: string;
17351735
}
1736-
/**
1737-
* Template Function
1738-
*/
1739-
export type TemplateFunction = {
1740-
/**
1741-
* Function Template Icon.
1742-
*/
1743-
icon: string;
1744-
/**
1745-
* Function Template ID.
1746-
*/
1747-
id: string;
1748-
/**
1749-
* Function Template Name.
1750-
*/
1751-
name: string;
1752-
/**
1753-
* Function Template Tagline.
1754-
*/
1755-
tagline: string;
1756-
/**
1757-
* Execution permissions.
1758-
*/
1759-
permissions: string[];
1760-
/**
1761-
* Function trigger events.
1762-
*/
1763-
events: string[];
1764-
/**
1765-
* Function execution schedult in CRON format.
1766-
*/
1767-
cron: string;
1768-
/**
1769-
* Function execution timeout in seconds.
1770-
*/
1771-
timeout: number;
1772-
/**
1773-
* Function use cases.
1774-
*/
1775-
useCases: string[];
1776-
/**
1777-
* List of runtimes that can be used with this template.
1778-
*/
1779-
runtimes: TemplateRuntime[];
1780-
/**
1781-
* Function Template Instructions.
1782-
*/
1783-
instructions: string;
1784-
/**
1785-
* VCS (Version Control System) Provider.
1786-
*/
1787-
vcsProvider: string;
1788-
/**
1789-
* VCS (Version Control System) Repository ID
1790-
*/
1791-
providerRepositoryId: string;
1792-
/**
1793-
* VCS (Version Control System) Owner.
1794-
*/
1795-
providerOwner: string;
1796-
/**
1797-
* VCS (Version Control System) branch version (tag).
1798-
*/
1799-
providerVersion: string;
1800-
/**
1801-
* Function variables.
1802-
*/
1803-
variables: TemplateVariable[];
1804-
/**
1805-
* Function scopes.
1806-
*/
1807-
scopes: string[];
1808-
}
1809-
/**
1810-
* Template Runtime
1811-
*/
1812-
export type TemplateRuntime = {
1813-
/**
1814-
* Runtime Name.
1815-
*/
1816-
name: string;
1817-
/**
1818-
* The build command used to build the deployment.
1819-
*/
1820-
commands: string;
1821-
/**
1822-
* The entrypoint file used to execute the deployment.
1823-
*/
1824-
entrypoint: string;
1825-
/**
1826-
* Path to function in VCS (Version Control System) repository
1827-
*/
1828-
providerRootDirectory: string;
1829-
}
1830-
/**
1831-
* Template Variable
1832-
*/
1833-
export type TemplateVariable = {
1834-
/**
1835-
* Variable Name.
1836-
*/
1837-
name: string;
1838-
/**
1839-
* Variable Description.
1840-
*/
1841-
description: string;
1842-
/**
1843-
* Variable Value.
1844-
*/
1845-
value: string;
1846-
/**
1847-
* Variable Placeholder.
1848-
*/
1849-
placeholder: string;
1850-
/**
1851-
* Is the variable required?
1852-
*/
1853-
required: boolean;
1854-
/**
1855-
* Variable Type.
1856-
*/
1857-
type: string;
1858-
}
18591736
/**
18601737
* Runtime
18611738
*/

src/services/functions.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -212,34 +212,6 @@ export class Functions {
212212
payload,
213213
);
214214
}
215-
/**
216-
* Get function template
217-
*
218-
* Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
219-
*
220-
* @param {string} templateId
221-
* @throws {AppwriteException}
222-
* @returns {Promise<Models.TemplateFunction>}
223-
*/
224-
async getTemplate(templateId: string): Promise<Models.TemplateFunction> {
225-
if (typeof templateId === 'undefined') {
226-
throw new AppwriteException('Missing required parameter: "templateId"');
227-
}
228-
const apiPath = '/functions/templates/{templateId}'.replace('{templateId}', templateId);
229-
const payload: Payload = {};
230-
const uri = new URL(this.client.config.endpoint + apiPath);
231-
232-
const apiHeaders: { [header: string]: string } = {
233-
'content-type': 'application/json',
234-
}
235-
236-
return await this.client.call(
237-
'get',
238-
uri,
239-
apiHeaders,
240-
payload,
241-
);
242-
}
243215
/**
244216
* Get function
245217
*

0 commit comments

Comments
 (0)