Skip to content

Commit

Permalink
chore: update Appwrite version
Browse files Browse the repository at this point in the history
  • Loading branch information
christyjacob4 committed Aug 27, 2024
1 parent 7ca3e9d commit 57c82e7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 69 deletions.
16 changes: 0 additions & 16 deletions docs/examples/functions/list-templates.md

This file was deleted.

13 changes: 0 additions & 13 deletions src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,6 @@ export namespace Models {
*/
memberships: Membership[];
}
/**
* Function Templates List
*/
export type TemplateFunctionList = {
/**
* Total number of templates documents that matched your query.
*/
total: number;
/**
* List of templates.
*/
templates: TemplateFunction[];
}
/**
* Executions List
*/
Expand Down
40 changes: 0 additions & 40 deletions src/services/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,6 @@ export class Functions extends Service {
super(client);
}

/**
* List function templates
*
* List available function templates. You can use template details in
* [createFunction](/docs/references/cloud/server-nodejs/functions#create)
* method.
*
* @param {string[]} runtimes
* @param {string[]} useCases
* @param {number} limit
* @param {number} offset
* @throws {AppwriteException}
* @returns {Promise}
*/
async listTemplates(runtimes?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateFunctionList> {
const apiPath = '/functions/templates';
const payload: Payload = {};

if (typeof runtimes !== 'undefined') {
payload['runtimes'] = runtimes;
}

if (typeof useCases !== 'undefined') {
payload['useCases'] = useCases;
}

if (typeof limit !== 'undefined') {
payload['limit'] = limit;
}

if (typeof offset !== 'undefined') {
payload['offset'] = offset;
}

const uri = new URL(this.client.config.endpoint + apiPath);
return await this.client.call('get', uri, {
'content-type': 'application/json',
}, payload);
}

/**
* Get function template
*
Expand Down

0 comments on commit 57c82e7

Please sign in to comment.