node-appwrite 22.1.2 → 23.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/client.d.mts +33 -0
- package/dist/client.d.ts +33 -0
- package/dist/client.js +52 -4
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +52 -4
- package/dist/client.mjs.map +1 -1
- package/dist/enums/backup-services.d.mts +3 -0
- package/dist/enums/backup-services.d.ts +3 -0
- package/dist/enums/backup-services.js +3 -0
- package/dist/enums/backup-services.js.map +1 -1
- package/dist/enums/backup-services.mjs +3 -0
- package/dist/enums/backup-services.mjs.map +1 -1
- package/dist/enums/database-type.d.mts +3 -1
- package/dist/enums/database-type.d.ts +3 -1
- package/dist/enums/database-type.js +2 -0
- package/dist/enums/database-type.js.map +1 -1
- package/dist/enums/database-type.mjs +2 -0
- package/dist/enums/database-type.mjs.map +1 -1
- package/dist/enums/databases-index-type.d.mts +8 -0
- package/dist/enums/databases-index-type.d.ts +8 -0
- package/dist/enums/databases-index-type.js +13 -0
- package/dist/enums/databases-index-type.js.map +1 -0
- package/dist/enums/databases-index-type.mjs +12 -0
- package/dist/enums/databases-index-type.mjs.map +1 -0
- package/dist/enums/scopes.d.mts +4 -0
- package/dist/enums/scopes.d.ts +4 -0
- package/dist/enums/scopes.js +4 -0
- package/dist/enums/scopes.js.map +1 -1
- package/dist/enums/scopes.mjs +4 -0
- package/dist/enums/scopes.mjs.map +1 -1
- package/dist/enums/{index-type.d.mts → tables-db-index-type.d.mts} +2 -2
- package/dist/enums/{index-type.d.ts → tables-db-index-type.d.ts} +2 -2
- package/dist/enums/tables-db-index-type.js +13 -0
- package/dist/enums/tables-db-index-type.js.map +1 -0
- package/dist/enums/tables-db-index-type.mjs +12 -0
- package/dist/enums/tables-db-index-type.mjs.map +1 -0
- package/dist/enums/template-reference-type.d.mts +1 -1
- package/dist/enums/template-reference-type.d.ts +1 -1
- package/dist/enums/template-reference-type.js +1 -1
- package/dist/enums/template-reference-type.js.map +1 -1
- package/dist/enums/template-reference-type.mjs +1 -1
- package/dist/enums/template-reference-type.mjs.map +1 -1
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +109 -11
- package/dist/models.d.ts +109 -11
- package/dist/services/databases.d.mts +45 -42
- package/dist/services/databases.d.ts +45 -42
- package/dist/services/databases.js +52 -47
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +52 -47
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +20 -8
- package/dist/services/functions.d.ts +20 -8
- package/dist/services/functions.js +28 -8
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +28 -8
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/health.d.mts +23 -94
- package/dist/services/health.d.ts +23 -94
- package/dist/services/health.js +28 -119
- package/dist/services/health.js.map +1 -1
- package/dist/services/health.mjs +28 -119
- package/dist/services/health.mjs.map +1 -1
- package/dist/services/messaging.d.mts +2 -2
- package/dist/services/messaging.d.ts +2 -2
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/project.d.mts +136 -0
- package/dist/services/project.d.ts +136 -0
- package/dist/services/project.js +183 -0
- package/dist/services/project.js.map +1 -0
- package/dist/services/project.mjs +182 -0
- package/dist/services/project.mjs.map +1 -0
- package/dist/services/sites.d.mts +30 -12
- package/dist/services/sites.d.ts +30 -12
- package/dist/services/sites.js +60 -33
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +60 -33
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +9 -6
- package/dist/services/tables-db.d.ts +9 -6
- package/dist/services/tables-db.js +6 -1
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs +6 -1
- package/dist/services/tables-db.mjs.map +1 -1
- package/dist/services/teams.d.mts +4 -4
- package/dist/services/teams.d.ts +4 -4
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/users.d.mts +26 -2
- package/dist/services/users.d.ts +26 -2
- package/dist/services/users.js +34 -0
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +34 -0
- package/dist/services/users.mjs.map +1 -1
- package/dist/services/webhooks.d.mts +179 -0
- package/dist/services/webhooks.d.ts +179 -0
- package/dist/services/webhooks.js +261 -0
- package/dist/services/webhooks.js.map +1 -0
- package/dist/services/webhooks.mjs +260 -0
- package/dist/services/webhooks.mjs.map +1 -0
- package/package.json +5 -3
- package/dist/enums/index-type.js +0 -13
- package/dist/enums/index-type.js.map +0 -1
- package/dist/enums/index-type.mjs +0 -12
- package/dist/enums/index-type.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/services/project.ts"],"names":[],"mappings":"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","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\n\nexport class Project {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get a list of all project environment variables.\n *\n * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.VariableList>}\n */\n listVariables(params?: { queries?: string[], total?: boolean }): Promise<Models.VariableList>;\n /**\n * Get a list of all project environment variables.\n *\n * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.VariableList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listVariables(queries?: string[], total?: boolean): Promise<Models.VariableList>;\n listVariables(\n paramsOrFirst?: { queries?: string[], total?: boolean } | string[],\n ...rest: [(boolean)?] \n ): Promise<Models.VariableList> {\n let params: { queries?: string[], total?: boolean };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[], total?: boolean };\n } else {\n params = {\n queries: paramsOrFirst as string[],\n total: rest[0] as boolean \n };\n }\n \n const queries = params.queries;\n const total = params.total;\n\n\n const apiPath = '/project/variables';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new project environment variable. These variables can be accessed by all functions and sites in the project.\n *\n * @param {string} params.variableId - Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {string} params.key - Variable key. Max length: 255 chars.\n * @param {string} params.value - Variable value. Max length: 8192 chars.\n * @param {boolean} params.secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Variable>}\n */\n createVariable(params: { variableId: string, key: string, value: string, secret?: boolean }): Promise<Models.Variable>;\n /**\n * Create a new project environment variable. These variables can be accessed by all functions and sites in the project.\n *\n * @param {string} variableId - Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {string} key - Variable key. Max length: 255 chars.\n * @param {string} value - Variable value. Max length: 8192 chars.\n * @param {boolean} secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Variable>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createVariable(variableId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable>;\n createVariable(\n paramsOrFirst: { variableId: string, key: string, value: string, secret?: boolean } | string,\n ...rest: [(string)?, (string)?, (boolean)?] \n ): Promise<Models.Variable> {\n let params: { variableId: string, key: string, value: string, secret?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { variableId: string, key: string, value: string, secret?: boolean };\n } else {\n params = {\n variableId: paramsOrFirst as string,\n key: rest[0] as string,\n value: rest[1] as string,\n secret: rest[2] as boolean \n };\n }\n \n const variableId = params.variableId;\n const key = params.key;\n const value = params.value;\n const secret = params.secret;\n\n if (typeof variableId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"variableId\"');\n }\n if (typeof key === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"key\"');\n }\n if (typeof value === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"value\"');\n }\n\n const apiPath = '/project/variables';\n const payload: Payload = {};\n if (typeof variableId !== 'undefined') {\n payload['variableId'] = variableId;\n }\n if (typeof key !== 'undefined') {\n payload['key'] = key;\n }\n if (typeof value !== 'undefined') {\n payload['value'] = value;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a variable by its unique ID. \n *\n * @param {string} params.variableId - Variable ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Variable>}\n */\n getVariable(params: { variableId: string }): Promise<Models.Variable>;\n /**\n * Get a variable by its unique ID. \n *\n * @param {string} variableId - Variable ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Variable>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getVariable(variableId: string): Promise<Models.Variable>;\n getVariable(\n paramsOrFirst: { variableId: string } | string \n ): Promise<Models.Variable> {\n let params: { variableId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { variableId: string };\n } else {\n params = {\n variableId: paramsOrFirst as string \n };\n }\n \n const variableId = params.variableId;\n\n if (typeof variableId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"variableId\"');\n }\n\n const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update variable by its unique ID.\n *\n * @param {string} params.variableId - Variable ID.\n * @param {string} params.key - Variable key. Max length: 255 chars.\n * @param {string} params.value - Variable value. Max length: 8192 chars.\n * @param {boolean} params.secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Variable>}\n */\n updateVariable(params: { variableId: string, key?: string, value?: string, secret?: boolean }): Promise<Models.Variable>;\n /**\n * Update variable by its unique ID.\n *\n * @param {string} variableId - Variable ID.\n * @param {string} key - Variable key. Max length: 255 chars.\n * @param {string} value - Variable value. Max length: 8192 chars.\n * @param {boolean} secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Variable>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateVariable(variableId: string, key?: string, value?: string, secret?: boolean): Promise<Models.Variable>;\n updateVariable(\n paramsOrFirst: { variableId: string, key?: string, value?: string, secret?: boolean } | string,\n ...rest: [(string)?, (string)?, (boolean)?] \n ): Promise<Models.Variable> {\n let params: { variableId: string, key?: string, value?: string, secret?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { variableId: string, key?: string, value?: string, secret?: boolean };\n } else {\n params = {\n variableId: paramsOrFirst as string,\n key: rest[0] as string,\n value: rest[1] as string,\n secret: rest[2] as boolean \n };\n }\n \n const variableId = params.variableId;\n const key = params.key;\n const value = params.value;\n const secret = params.secret;\n\n if (typeof variableId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"variableId\"');\n }\n\n const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);\n const payload: Payload = {};\n if (typeof key !== 'undefined') {\n payload['key'] = key;\n }\n if (typeof value !== 'undefined') {\n payload['value'] = value;\n }\n if (typeof secret !== 'undefined') {\n payload['secret'] = secret;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a variable by its unique ID. \n *\n * @param {string} params.variableId - Variable ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteVariable(params: { variableId: string }): Promise<{}>;\n /**\n * Delete a variable by its unique ID. \n *\n * @param {string} variableId - Variable ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteVariable(variableId: string): Promise<{}>;\n deleteVariable(\n paramsOrFirst: { variableId: string } | string \n ): Promise<{}> {\n let params: { variableId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { variableId: string };\n } else {\n params = {\n variableId: paramsOrFirst as string \n };\n }\n \n const variableId = params.variableId;\n\n if (typeof variableId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"variableId\"');\n }\n\n const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
|
|
@@ -58,6 +58,7 @@ declare class Sites {
|
|
|
58
58
|
* @param {number} params.timeout - Maximum request time in seconds.
|
|
59
59
|
* @param {string} params.installCommand - Install Command.
|
|
60
60
|
* @param {string} params.buildCommand - Build Command.
|
|
61
|
+
* @param {string} params.startCommand - Custom start command. Leave empty to use default.
|
|
61
62
|
* @param {string} params.outputDirectory - Output Directory for site.
|
|
62
63
|
* @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
63
64
|
* @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
@@ -66,7 +67,9 @@ declare class Sites {
|
|
|
66
67
|
* @param {string} params.providerBranch - Production branch for the repo linked to the site.
|
|
67
68
|
* @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
68
69
|
* @param {string} params.providerRootDirectory - Path to site code in the linked repo.
|
|
69
|
-
* @param {string} params.
|
|
70
|
+
* @param {string} params.buildSpecification - Build specification for the site deployments.
|
|
71
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
|
|
72
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
70
73
|
* @throws {AppwriteException}
|
|
71
74
|
* @returns {Promise<Models.Site>}
|
|
72
75
|
*/
|
|
@@ -80,6 +83,7 @@ declare class Sites {
|
|
|
80
83
|
timeout?: number;
|
|
81
84
|
installCommand?: string;
|
|
82
85
|
buildCommand?: string;
|
|
86
|
+
startCommand?: string;
|
|
83
87
|
outputDirectory?: string;
|
|
84
88
|
adapter?: Adapter;
|
|
85
89
|
installationId?: string;
|
|
@@ -88,7 +92,9 @@ declare class Sites {
|
|
|
88
92
|
providerBranch?: string;
|
|
89
93
|
providerSilentMode?: boolean;
|
|
90
94
|
providerRootDirectory?: string;
|
|
91
|
-
|
|
95
|
+
buildSpecification?: string;
|
|
96
|
+
runtimeSpecification?: string;
|
|
97
|
+
deploymentRetention?: number;
|
|
92
98
|
}): Promise<Models.Site>;
|
|
93
99
|
/**
|
|
94
100
|
* Create a new site.
|
|
@@ -102,6 +108,7 @@ declare class Sites {
|
|
|
102
108
|
* @param {number} timeout - Maximum request time in seconds.
|
|
103
109
|
* @param {string} installCommand - Install Command.
|
|
104
110
|
* @param {string} buildCommand - Build Command.
|
|
111
|
+
* @param {string} startCommand - Custom start command. Leave empty to use default.
|
|
105
112
|
* @param {string} outputDirectory - Output Directory for site.
|
|
106
113
|
* @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
107
114
|
* @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
@@ -110,12 +117,14 @@ declare class Sites {
|
|
|
110
117
|
* @param {string} providerBranch - Production branch for the repo linked to the site.
|
|
111
118
|
* @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
112
119
|
* @param {string} providerRootDirectory - Path to site code in the linked repo.
|
|
113
|
-
* @param {string}
|
|
120
|
+
* @param {string} buildSpecification - Build specification for the site deployments.
|
|
121
|
+
* @param {string} runtimeSpecification - Runtime specification for the SSR executions.
|
|
122
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
114
123
|
* @throws {AppwriteException}
|
|
115
124
|
* @returns {Promise<Models.Site>}
|
|
116
125
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
117
126
|
*/
|
|
118
|
-
create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
127
|
+
create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
|
|
119
128
|
/**
|
|
120
129
|
* Get a list of all frameworks that are currently available on the server instance.
|
|
121
130
|
*
|
|
@@ -160,6 +169,7 @@ declare class Sites {
|
|
|
160
169
|
* @param {number} params.timeout - Maximum request time in seconds.
|
|
161
170
|
* @param {string} params.installCommand - Install Command.
|
|
162
171
|
* @param {string} params.buildCommand - Build Command.
|
|
172
|
+
* @param {string} params.startCommand - Custom start command. Leave empty to use default.
|
|
163
173
|
* @param {string} params.outputDirectory - Output Directory for site.
|
|
164
174
|
* @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
|
|
165
175
|
* @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
@@ -169,7 +179,9 @@ declare class Sites {
|
|
|
169
179
|
* @param {string} params.providerBranch - Production branch for the repo linked to the site.
|
|
170
180
|
* @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
171
181
|
* @param {string} params.providerRootDirectory - Path to site code in the linked repo.
|
|
172
|
-
* @param {string} params.
|
|
182
|
+
* @param {string} params.buildSpecification - Build specification for the site deployments.
|
|
183
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
|
|
184
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
173
185
|
* @throws {AppwriteException}
|
|
174
186
|
* @returns {Promise<Models.Site>}
|
|
175
187
|
*/
|
|
@@ -182,6 +194,7 @@ declare class Sites {
|
|
|
182
194
|
timeout?: number;
|
|
183
195
|
installCommand?: string;
|
|
184
196
|
buildCommand?: string;
|
|
197
|
+
startCommand?: string;
|
|
185
198
|
outputDirectory?: string;
|
|
186
199
|
buildRuntime?: BuildRuntime;
|
|
187
200
|
adapter?: Adapter;
|
|
@@ -191,7 +204,9 @@ declare class Sites {
|
|
|
191
204
|
providerBranch?: string;
|
|
192
205
|
providerSilentMode?: boolean;
|
|
193
206
|
providerRootDirectory?: string;
|
|
194
|
-
|
|
207
|
+
buildSpecification?: string;
|
|
208
|
+
runtimeSpecification?: string;
|
|
209
|
+
deploymentRetention?: number;
|
|
195
210
|
}): Promise<Models.Site>;
|
|
196
211
|
/**
|
|
197
212
|
* Update site by its unique ID.
|
|
@@ -204,6 +219,7 @@ declare class Sites {
|
|
|
204
219
|
* @param {number} timeout - Maximum request time in seconds.
|
|
205
220
|
* @param {string} installCommand - Install Command.
|
|
206
221
|
* @param {string} buildCommand - Build Command.
|
|
222
|
+
* @param {string} startCommand - Custom start command. Leave empty to use default.
|
|
207
223
|
* @param {string} outputDirectory - Output Directory for site.
|
|
208
224
|
* @param {BuildRuntime} buildRuntime - Runtime to use during build step.
|
|
209
225
|
* @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
@@ -213,12 +229,14 @@ declare class Sites {
|
|
|
213
229
|
* @param {string} providerBranch - Production branch for the repo linked to the site.
|
|
214
230
|
* @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
215
231
|
* @param {string} providerRootDirectory - Path to site code in the linked repo.
|
|
216
|
-
* @param {string}
|
|
232
|
+
* @param {string} buildSpecification - Build specification for the site deployments.
|
|
233
|
+
* @param {string} runtimeSpecification - Runtime specification for the SSR executions.
|
|
234
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
217
235
|
* @throws {AppwriteException}
|
|
218
236
|
* @returns {Promise<Models.Site>}
|
|
219
237
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
220
238
|
*/
|
|
221
|
-
update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
239
|
+
update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
|
|
222
240
|
/**
|
|
223
241
|
* Delete a site by its unique ID.
|
|
224
242
|
*
|
|
@@ -293,20 +311,20 @@ declare class Sites {
|
|
|
293
311
|
*
|
|
294
312
|
* @param {string} params.siteId - Site ID.
|
|
295
313
|
* @param {File} params.code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
296
|
-
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
297
314
|
* @param {string} params.installCommand - Install Commands.
|
|
298
315
|
* @param {string} params.buildCommand - Build Commands.
|
|
299
316
|
* @param {string} params.outputDirectory - Output Directory.
|
|
317
|
+
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
300
318
|
* @throws {AppwriteException}
|
|
301
319
|
* @returns {Promise<Models.Deployment>}
|
|
302
320
|
*/
|
|
303
321
|
createDeployment(params: {
|
|
304
322
|
siteId: string;
|
|
305
323
|
code: File;
|
|
306
|
-
activate: boolean;
|
|
307
324
|
installCommand?: string;
|
|
308
325
|
buildCommand?: string;
|
|
309
326
|
outputDirectory?: string;
|
|
327
|
+
activate?: boolean;
|
|
310
328
|
onProgress?: (progress: UploadProgress) => void;
|
|
311
329
|
}): Promise<Models.Deployment>;
|
|
312
330
|
/**
|
|
@@ -314,15 +332,15 @@ declare class Sites {
|
|
|
314
332
|
*
|
|
315
333
|
* @param {string} siteId - Site ID.
|
|
316
334
|
* @param {File} code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
317
|
-
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
318
335
|
* @param {string} installCommand - Install Commands.
|
|
319
336
|
* @param {string} buildCommand - Build Commands.
|
|
320
337
|
* @param {string} outputDirectory - Output Directory.
|
|
338
|
+
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
321
339
|
* @throws {AppwriteException}
|
|
322
340
|
* @returns {Promise<Models.Deployment>}
|
|
323
341
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
324
342
|
*/
|
|
325
|
-
createDeployment(siteId: string, code: File,
|
|
343
|
+
createDeployment(siteId: string, code: File, installCommand?: string, buildCommand?: string, outputDirectory?: string, activate?: boolean, onProgress?: (progress: UploadProgress) => void): Promise<Models.Deployment>;
|
|
326
344
|
/**
|
|
327
345
|
* Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.
|
|
328
346
|
*
|
package/dist/services/sites.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ declare class Sites {
|
|
|
58
58
|
* @param {number} params.timeout - Maximum request time in seconds.
|
|
59
59
|
* @param {string} params.installCommand - Install Command.
|
|
60
60
|
* @param {string} params.buildCommand - Build Command.
|
|
61
|
+
* @param {string} params.startCommand - Custom start command. Leave empty to use default.
|
|
61
62
|
* @param {string} params.outputDirectory - Output Directory for site.
|
|
62
63
|
* @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
63
64
|
* @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
@@ -66,7 +67,9 @@ declare class Sites {
|
|
|
66
67
|
* @param {string} params.providerBranch - Production branch for the repo linked to the site.
|
|
67
68
|
* @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
68
69
|
* @param {string} params.providerRootDirectory - Path to site code in the linked repo.
|
|
69
|
-
* @param {string} params.
|
|
70
|
+
* @param {string} params.buildSpecification - Build specification for the site deployments.
|
|
71
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
|
|
72
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
70
73
|
* @throws {AppwriteException}
|
|
71
74
|
* @returns {Promise<Models.Site>}
|
|
72
75
|
*/
|
|
@@ -80,6 +83,7 @@ declare class Sites {
|
|
|
80
83
|
timeout?: number;
|
|
81
84
|
installCommand?: string;
|
|
82
85
|
buildCommand?: string;
|
|
86
|
+
startCommand?: string;
|
|
83
87
|
outputDirectory?: string;
|
|
84
88
|
adapter?: Adapter;
|
|
85
89
|
installationId?: string;
|
|
@@ -88,7 +92,9 @@ declare class Sites {
|
|
|
88
92
|
providerBranch?: string;
|
|
89
93
|
providerSilentMode?: boolean;
|
|
90
94
|
providerRootDirectory?: string;
|
|
91
|
-
|
|
95
|
+
buildSpecification?: string;
|
|
96
|
+
runtimeSpecification?: string;
|
|
97
|
+
deploymentRetention?: number;
|
|
92
98
|
}): Promise<Models.Site>;
|
|
93
99
|
/**
|
|
94
100
|
* Create a new site.
|
|
@@ -102,6 +108,7 @@ declare class Sites {
|
|
|
102
108
|
* @param {number} timeout - Maximum request time in seconds.
|
|
103
109
|
* @param {string} installCommand - Install Command.
|
|
104
110
|
* @param {string} buildCommand - Build Command.
|
|
111
|
+
* @param {string} startCommand - Custom start command. Leave empty to use default.
|
|
105
112
|
* @param {string} outputDirectory - Output Directory for site.
|
|
106
113
|
* @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
107
114
|
* @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
@@ -110,12 +117,14 @@ declare class Sites {
|
|
|
110
117
|
* @param {string} providerBranch - Production branch for the repo linked to the site.
|
|
111
118
|
* @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
112
119
|
* @param {string} providerRootDirectory - Path to site code in the linked repo.
|
|
113
|
-
* @param {string}
|
|
120
|
+
* @param {string} buildSpecification - Build specification for the site deployments.
|
|
121
|
+
* @param {string} runtimeSpecification - Runtime specification for the SSR executions.
|
|
122
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
114
123
|
* @throws {AppwriteException}
|
|
115
124
|
* @returns {Promise<Models.Site>}
|
|
116
125
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
117
126
|
*/
|
|
118
|
-
create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
127
|
+
create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
|
|
119
128
|
/**
|
|
120
129
|
* Get a list of all frameworks that are currently available on the server instance.
|
|
121
130
|
*
|
|
@@ -160,6 +169,7 @@ declare class Sites {
|
|
|
160
169
|
* @param {number} params.timeout - Maximum request time in seconds.
|
|
161
170
|
* @param {string} params.installCommand - Install Command.
|
|
162
171
|
* @param {string} params.buildCommand - Build Command.
|
|
172
|
+
* @param {string} params.startCommand - Custom start command. Leave empty to use default.
|
|
163
173
|
* @param {string} params.outputDirectory - Output Directory for site.
|
|
164
174
|
* @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
|
|
165
175
|
* @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
@@ -169,7 +179,9 @@ declare class Sites {
|
|
|
169
179
|
* @param {string} params.providerBranch - Production branch for the repo linked to the site.
|
|
170
180
|
* @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
171
181
|
* @param {string} params.providerRootDirectory - Path to site code in the linked repo.
|
|
172
|
-
* @param {string} params.
|
|
182
|
+
* @param {string} params.buildSpecification - Build specification for the site deployments.
|
|
183
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
|
|
184
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
173
185
|
* @throws {AppwriteException}
|
|
174
186
|
* @returns {Promise<Models.Site>}
|
|
175
187
|
*/
|
|
@@ -182,6 +194,7 @@ declare class Sites {
|
|
|
182
194
|
timeout?: number;
|
|
183
195
|
installCommand?: string;
|
|
184
196
|
buildCommand?: string;
|
|
197
|
+
startCommand?: string;
|
|
185
198
|
outputDirectory?: string;
|
|
186
199
|
buildRuntime?: BuildRuntime;
|
|
187
200
|
adapter?: Adapter;
|
|
@@ -191,7 +204,9 @@ declare class Sites {
|
|
|
191
204
|
providerBranch?: string;
|
|
192
205
|
providerSilentMode?: boolean;
|
|
193
206
|
providerRootDirectory?: string;
|
|
194
|
-
|
|
207
|
+
buildSpecification?: string;
|
|
208
|
+
runtimeSpecification?: string;
|
|
209
|
+
deploymentRetention?: number;
|
|
195
210
|
}): Promise<Models.Site>;
|
|
196
211
|
/**
|
|
197
212
|
* Update site by its unique ID.
|
|
@@ -204,6 +219,7 @@ declare class Sites {
|
|
|
204
219
|
* @param {number} timeout - Maximum request time in seconds.
|
|
205
220
|
* @param {string} installCommand - Install Command.
|
|
206
221
|
* @param {string} buildCommand - Build Command.
|
|
222
|
+
* @param {string} startCommand - Custom start command. Leave empty to use default.
|
|
207
223
|
* @param {string} outputDirectory - Output Directory for site.
|
|
208
224
|
* @param {BuildRuntime} buildRuntime - Runtime to use during build step.
|
|
209
225
|
* @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
@@ -213,12 +229,14 @@ declare class Sites {
|
|
|
213
229
|
* @param {string} providerBranch - Production branch for the repo linked to the site.
|
|
214
230
|
* @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
|
|
215
231
|
* @param {string} providerRootDirectory - Path to site code in the linked repo.
|
|
216
|
-
* @param {string}
|
|
232
|
+
* @param {string} buildSpecification - Build specification for the site deployments.
|
|
233
|
+
* @param {string} runtimeSpecification - Runtime specification for the SSR executions.
|
|
234
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
217
235
|
* @throws {AppwriteException}
|
|
218
236
|
* @returns {Promise<Models.Site>}
|
|
219
237
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
220
238
|
*/
|
|
221
|
-
update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
239
|
+
update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
|
|
222
240
|
/**
|
|
223
241
|
* Delete a site by its unique ID.
|
|
224
242
|
*
|
|
@@ -293,20 +311,20 @@ declare class Sites {
|
|
|
293
311
|
*
|
|
294
312
|
* @param {string} params.siteId - Site ID.
|
|
295
313
|
* @param {File} params.code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
296
|
-
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
297
314
|
* @param {string} params.installCommand - Install Commands.
|
|
298
315
|
* @param {string} params.buildCommand - Build Commands.
|
|
299
316
|
* @param {string} params.outputDirectory - Output Directory.
|
|
317
|
+
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
300
318
|
* @throws {AppwriteException}
|
|
301
319
|
* @returns {Promise<Models.Deployment>}
|
|
302
320
|
*/
|
|
303
321
|
createDeployment(params: {
|
|
304
322
|
siteId: string;
|
|
305
323
|
code: File;
|
|
306
|
-
activate: boolean;
|
|
307
324
|
installCommand?: string;
|
|
308
325
|
buildCommand?: string;
|
|
309
326
|
outputDirectory?: string;
|
|
327
|
+
activate?: boolean;
|
|
310
328
|
onProgress?: (progress: UploadProgress) => void;
|
|
311
329
|
}): Promise<Models.Deployment>;
|
|
312
330
|
/**
|
|
@@ -314,15 +332,15 @@ declare class Sites {
|
|
|
314
332
|
*
|
|
315
333
|
* @param {string} siteId - Site ID.
|
|
316
334
|
* @param {File} code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
317
|
-
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
318
335
|
* @param {string} installCommand - Install Commands.
|
|
319
336
|
* @param {string} buildCommand - Build Commands.
|
|
320
337
|
* @param {string} outputDirectory - Output Directory.
|
|
338
|
+
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
321
339
|
* @throws {AppwriteException}
|
|
322
340
|
* @returns {Promise<Models.Deployment>}
|
|
323
341
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
324
342
|
*/
|
|
325
|
-
createDeployment(siteId: string, code: File,
|
|
343
|
+
createDeployment(siteId: string, code: File, installCommand?: string, buildCommand?: string, outputDirectory?: string, activate?: boolean, onProgress?: (progress: UploadProgress) => void): Promise<Models.Deployment>;
|
|
326
344
|
/**
|
|
327
345
|
* Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.
|
|
328
346
|
*
|
package/dist/services/sites.js
CHANGED
|
@@ -55,15 +55,18 @@ class Sites {
|
|
|
55
55
|
timeout: rest[5],
|
|
56
56
|
installCommand: rest[6],
|
|
57
57
|
buildCommand: rest[7],
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
startCommand: rest[8],
|
|
59
|
+
outputDirectory: rest[9],
|
|
60
|
+
adapter: rest[10],
|
|
61
|
+
installationId: rest[11],
|
|
62
|
+
fallbackFile: rest[12],
|
|
63
|
+
providerRepositoryId: rest[13],
|
|
64
|
+
providerBranch: rest[14],
|
|
65
|
+
providerSilentMode: rest[15],
|
|
66
|
+
providerRootDirectory: rest[16],
|
|
67
|
+
buildSpecification: rest[17],
|
|
68
|
+
runtimeSpecification: rest[18],
|
|
69
|
+
deploymentRetention: rest[19]
|
|
67
70
|
};
|
|
68
71
|
}
|
|
69
72
|
const siteId = params.siteId;
|
|
@@ -75,6 +78,7 @@ class Sites {
|
|
|
75
78
|
const timeout = params.timeout;
|
|
76
79
|
const installCommand = params.installCommand;
|
|
77
80
|
const buildCommand = params.buildCommand;
|
|
81
|
+
const startCommand = params.startCommand;
|
|
78
82
|
const outputDirectory = params.outputDirectory;
|
|
79
83
|
const adapter = params.adapter;
|
|
80
84
|
const installationId = params.installationId;
|
|
@@ -83,7 +87,9 @@ class Sites {
|
|
|
83
87
|
const providerBranch = params.providerBranch;
|
|
84
88
|
const providerSilentMode = params.providerSilentMode;
|
|
85
89
|
const providerRootDirectory = params.providerRootDirectory;
|
|
86
|
-
const
|
|
90
|
+
const buildSpecification = params.buildSpecification;
|
|
91
|
+
const runtimeSpecification = params.runtimeSpecification;
|
|
92
|
+
const deploymentRetention = params.deploymentRetention;
|
|
87
93
|
if (typeof siteId === "undefined") {
|
|
88
94
|
throw new client.AppwriteException('Missing required parameter: "siteId"');
|
|
89
95
|
}
|
|
@@ -122,6 +128,9 @@ class Sites {
|
|
|
122
128
|
if (typeof buildCommand !== "undefined") {
|
|
123
129
|
payload["buildCommand"] = buildCommand;
|
|
124
130
|
}
|
|
131
|
+
if (typeof startCommand !== "undefined") {
|
|
132
|
+
payload["startCommand"] = startCommand;
|
|
133
|
+
}
|
|
125
134
|
if (typeof outputDirectory !== "undefined") {
|
|
126
135
|
payload["outputDirectory"] = outputDirectory;
|
|
127
136
|
}
|
|
@@ -149,8 +158,14 @@ class Sites {
|
|
|
149
158
|
if (typeof providerRootDirectory !== "undefined") {
|
|
150
159
|
payload["providerRootDirectory"] = providerRootDirectory;
|
|
151
160
|
}
|
|
152
|
-
if (typeof
|
|
153
|
-
payload["
|
|
161
|
+
if (typeof buildSpecification !== "undefined") {
|
|
162
|
+
payload["buildSpecification"] = buildSpecification;
|
|
163
|
+
}
|
|
164
|
+
if (typeof runtimeSpecification !== "undefined") {
|
|
165
|
+
payload["runtimeSpecification"] = runtimeSpecification;
|
|
166
|
+
}
|
|
167
|
+
if (typeof deploymentRetention !== "undefined") {
|
|
168
|
+
payload["deploymentRetention"] = deploymentRetention;
|
|
154
169
|
}
|
|
155
170
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
156
171
|
const apiHeaders = {
|
|
@@ -237,16 +252,19 @@ class Sites {
|
|
|
237
252
|
timeout: rest[4],
|
|
238
253
|
installCommand: rest[5],
|
|
239
254
|
buildCommand: rest[6],
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
255
|
+
startCommand: rest[7],
|
|
256
|
+
outputDirectory: rest[8],
|
|
257
|
+
buildRuntime: rest[9],
|
|
258
|
+
adapter: rest[10],
|
|
259
|
+
fallbackFile: rest[11],
|
|
260
|
+
installationId: rest[12],
|
|
261
|
+
providerRepositoryId: rest[13],
|
|
262
|
+
providerBranch: rest[14],
|
|
263
|
+
providerSilentMode: rest[15],
|
|
264
|
+
providerRootDirectory: rest[16],
|
|
265
|
+
buildSpecification: rest[17],
|
|
266
|
+
runtimeSpecification: rest[18],
|
|
267
|
+
deploymentRetention: rest[19]
|
|
250
268
|
};
|
|
251
269
|
}
|
|
252
270
|
const siteId = params.siteId;
|
|
@@ -257,6 +275,7 @@ class Sites {
|
|
|
257
275
|
const timeout = params.timeout;
|
|
258
276
|
const installCommand = params.installCommand;
|
|
259
277
|
const buildCommand = params.buildCommand;
|
|
278
|
+
const startCommand = params.startCommand;
|
|
260
279
|
const outputDirectory = params.outputDirectory;
|
|
261
280
|
const buildRuntime = params.buildRuntime;
|
|
262
281
|
const adapter = params.adapter;
|
|
@@ -266,7 +285,9 @@ class Sites {
|
|
|
266
285
|
const providerBranch = params.providerBranch;
|
|
267
286
|
const providerSilentMode = params.providerSilentMode;
|
|
268
287
|
const providerRootDirectory = params.providerRootDirectory;
|
|
269
|
-
const
|
|
288
|
+
const buildSpecification = params.buildSpecification;
|
|
289
|
+
const runtimeSpecification = params.runtimeSpecification;
|
|
290
|
+
const deploymentRetention = params.deploymentRetention;
|
|
270
291
|
if (typeof siteId === "undefined") {
|
|
271
292
|
throw new client.AppwriteException('Missing required parameter: "siteId"');
|
|
272
293
|
}
|
|
@@ -299,6 +320,9 @@ class Sites {
|
|
|
299
320
|
if (typeof buildCommand !== "undefined") {
|
|
300
321
|
payload["buildCommand"] = buildCommand;
|
|
301
322
|
}
|
|
323
|
+
if (typeof startCommand !== "undefined") {
|
|
324
|
+
payload["startCommand"] = startCommand;
|
|
325
|
+
}
|
|
302
326
|
if (typeof outputDirectory !== "undefined") {
|
|
303
327
|
payload["outputDirectory"] = outputDirectory;
|
|
304
328
|
}
|
|
@@ -326,8 +350,14 @@ class Sites {
|
|
|
326
350
|
if (typeof providerRootDirectory !== "undefined") {
|
|
327
351
|
payload["providerRootDirectory"] = providerRootDirectory;
|
|
328
352
|
}
|
|
329
|
-
if (typeof
|
|
330
|
-
payload["
|
|
353
|
+
if (typeof buildSpecification !== "undefined") {
|
|
354
|
+
payload["buildSpecification"] = buildSpecification;
|
|
355
|
+
}
|
|
356
|
+
if (typeof runtimeSpecification !== "undefined") {
|
|
357
|
+
payload["runtimeSpecification"] = runtimeSpecification;
|
|
358
|
+
}
|
|
359
|
+
if (typeof deploymentRetention !== "undefined") {
|
|
360
|
+
payload["deploymentRetention"] = deploymentRetention;
|
|
331
361
|
}
|
|
332
362
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
333
363
|
const apiHeaders = {
|
|
@@ -449,28 +479,25 @@ class Sites {
|
|
|
449
479
|
params = {
|
|
450
480
|
siteId: paramsOrFirst,
|
|
451
481
|
code: rest[0],
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
482
|
+
installCommand: rest[1],
|
|
483
|
+
buildCommand: rest[2],
|
|
484
|
+
outputDirectory: rest[3],
|
|
485
|
+
activate: rest[4]
|
|
456
486
|
};
|
|
457
487
|
onProgress = rest[5];
|
|
458
488
|
}
|
|
459
489
|
const siteId = params.siteId;
|
|
460
490
|
const code = params.code;
|
|
461
|
-
const activate = params.activate;
|
|
462
491
|
const installCommand = params.installCommand;
|
|
463
492
|
const buildCommand = params.buildCommand;
|
|
464
493
|
const outputDirectory = params.outputDirectory;
|
|
494
|
+
const activate = params.activate;
|
|
465
495
|
if (typeof siteId === "undefined") {
|
|
466
496
|
throw new client.AppwriteException('Missing required parameter: "siteId"');
|
|
467
497
|
}
|
|
468
498
|
if (typeof code === "undefined") {
|
|
469
499
|
throw new client.AppwriteException('Missing required parameter: "code"');
|
|
470
500
|
}
|
|
471
|
-
if (typeof activate === "undefined") {
|
|
472
|
-
throw new client.AppwriteException('Missing required parameter: "activate"');
|
|
473
|
-
}
|
|
474
501
|
const apiPath = "/sites/{siteId}/deployments".replace("{siteId}", siteId);
|
|
475
502
|
const payload = {};
|
|
476
503
|
if (typeof installCommand !== "undefined") {
|