Skip to content

Commit 18bd0ca

Browse files
committed
chore: updates for appwrite 1.6.x
1 parent 57c82e7 commit 18bd0ca

File tree

4 files changed

+0
-208
lines changed

4 files changed

+0
-208
lines changed

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

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

docs/examples/functions/get-template.md

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

src/models.ts

Lines changed: 0 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -875,129 +875,6 @@ export namespace Models {
875875
*/
876876
roles: string[];
877877
}
878-
/**
879-
* Template Function
880-
*/
881-
export type TemplateFunction = {
882-
/**
883-
* Function Template Icon.
884-
*/
885-
icon: string;
886-
/**
887-
* Function Template ID.
888-
*/
889-
id: string;
890-
/**
891-
* Function Template Name.
892-
*/
893-
name: string;
894-
/**
895-
* Function Template Tagline.
896-
*/
897-
tagline: string;
898-
/**
899-
* Execution permissions.
900-
*/
901-
permissions: string[];
902-
/**
903-
* Function trigger events.
904-
*/
905-
events: string[];
906-
/**
907-
* Function execution schedult in CRON format.
908-
*/
909-
cron: string;
910-
/**
911-
* Function execution timeout in seconds.
912-
*/
913-
timeout: number;
914-
/**
915-
* Function use cases.
916-
*/
917-
useCases: string[];
918-
/**
919-
* List of runtimes that can be used with this template.
920-
*/
921-
runtimes: TemplateRuntime[];
922-
/**
923-
* Function Template Instructions.
924-
*/
925-
instructions: string;
926-
/**
927-
* VCS (Version Control System) Provider.
928-
*/
929-
vcsProvider: string;
930-
/**
931-
* VCS (Version Control System) Repository ID
932-
*/
933-
providerRepositoryId: string;
934-
/**
935-
* VCS (Version Control System) Owner.
936-
*/
937-
providerOwner: string;
938-
/**
939-
* VCS (Version Control System) branch version (tag).
940-
*/
941-
providerVersion: string;
942-
/**
943-
* Function variables.
944-
*/
945-
variables: TemplateVariable[];
946-
/**
947-
* Function scopes.
948-
*/
949-
scopes: string[];
950-
}
951-
/**
952-
* Template Runtime
953-
*/
954-
export type TemplateRuntime = {
955-
/**
956-
* Runtime Name.
957-
*/
958-
name: string;
959-
/**
960-
* The build command used to build the deployment.
961-
*/
962-
commands: string;
963-
/**
964-
* The entrypoint file used to execute the deployment.
965-
*/
966-
entrypoint: string;
967-
/**
968-
* Path to function in VCS (Version Control System) repository
969-
*/
970-
providerRootDirectory: string;
971-
}
972-
/**
973-
* Template Variable
974-
*/
975-
export type TemplateVariable = {
976-
/**
977-
* Variable Name.
978-
*/
979-
name: string;
980-
/**
981-
* Variable Description.
982-
*/
983-
description: string;
984-
/**
985-
* Variable Value.
986-
*/
987-
value: string;
988-
/**
989-
* Variable Placeholder.
990-
*/
991-
placeholder: string;
992-
/**
993-
* Is the variable required?
994-
*/
995-
required: boolean;
996-
/**
997-
* Variable Type.
998-
*/
999-
type: string;
1000-
}
1001878
/**
1002879
* Execution
1003880
*/

src/services/functions.ts

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -14,64 +14,6 @@ export class Functions extends Service {
1414
super(client);
1515
}
1616

17-
/**
18-
* Get function template
19-
*
20-
* Get a function template using ID. You can use template details in
21-
* [createFunction](/docs/references/cloud/server-nodejs/functions#create)
22-
* method.
23-
*
24-
* @param {string} templateId
25-
* @throws {AppwriteException}
26-
* @returns {Promise}
27-
*/
28-
async getTemplate(templateId: string): Promise<Models.TemplateFunction> {
29-
if (typeof templateId === 'undefined') {
30-
throw new AppwriteException('Missing required parameter: "templateId"');
31-
}
32-
33-
const apiPath = '/functions/templates/{templateId}'.replace('{templateId}', templateId);
34-
const payload: Payload = {};
35-
36-
const uri = new URL(this.client.config.endpoint + apiPath);
37-
return await this.client.call('get', uri, {
38-
'content-type': 'application/json',
39-
}, payload);
40-
}
41-
42-
/**
43-
* Download deployment
44-
*
45-
* Get a Deployment's contents by its unique ID. This endpoint supports range
46-
* requests for partial or streaming file download.
47-
*
48-
* @param {string} functionId
49-
* @param {string} deploymentId
50-
* @throws {AppwriteException}
51-
* @returns {URL}
52-
*/
53-
getDeploymentDownload(functionId: string, deploymentId: string): URL {
54-
if (typeof functionId === 'undefined') {
55-
throw new AppwriteException('Missing required parameter: "functionId"');
56-
}
57-
58-
if (typeof deploymentId === 'undefined') {
59-
throw new AppwriteException('Missing required parameter: "deploymentId"');
60-
}
61-
62-
const apiPath = '/functions/{functionId}/deployments/{deploymentId}/download'.replace('{functionId}', functionId).replace('{deploymentId}', deploymentId);
63-
const payload: Payload = {};
64-
65-
const uri = new URL(this.client.config.endpoint + apiPath);
66-
payload['project'] = this.client.config.project;
67-
68-
69-
for (const [key, value] of Object.entries(Service.flatten(payload))) {
70-
uri.searchParams.append(key, value);
71-
}
72-
return uri;
73-
}
74-
7517
/**
7618
* List executions
7719
*

0 commit comments

Comments
 (0)