@appwrite.io/console 4.0.0 → 5.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/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +172 -34
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +173 -35
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +172 -34
- package/docs/examples/domains/confirm-purchase.md +16 -0
- package/docs/examples/domains/confirm-transfer-in.md +16 -0
- package/docs/examples/functions/create.md +3 -1
- package/docs/examples/functions/update.md +3 -1
- package/docs/examples/sites/create.md +4 -1
- package/docs/examples/sites/update.md +4 -1
- package/package.json +1 -1
- package/src/client.ts +5 -1
- package/src/enums/appwrite-migration-resource.ts +4 -0
- package/src/enums/build-runtime.ts +3 -0
- package/src/enums/domain-purchase-payment-status.ts +10 -0
- package/src/enums/runtime.ts +3 -0
- package/src/enums/runtimes.ts +3 -0
- package/src/index.ts +1 -0
- package/src/models.ts +90 -5
- package/src/services/account.ts +2 -2
- package/src/services/domains.ts +126 -0
- package/src/services/functions.ts +52 -24
- package/src/services/organizations.ts +2 -2
- package/src/services/sites.ts +83 -41
- package/types/enums/appwrite-migration-resource.d.ts +4 -0
- package/types/enums/build-runtime.d.ts +3 -0
- package/types/enums/domain-purchase-payment-status.d.ts +10 -0
- package/types/enums/runtime.d.ts +3 -0
- package/types/enums/runtimes.d.ts +3 -0
- package/types/index.d.ts +1 -0
- package/types/models.d.ts +90 -5
- package/types/services/account.d.ts +2 -2
- package/types/services/domains.d.ts +44 -0
- package/types/services/functions.d.ts +20 -8
- package/types/services/organizations.d.ts +2 -2
- package/types/services/sites.d.ts +26 -8
package/src/services/sites.ts
CHANGED
|
@@ -97,6 +97,7 @@ export class Sites {
|
|
|
97
97
|
* @param {number} params.timeout - Maximum request time in seconds.
|
|
98
98
|
* @param {string} params.installCommand - Install Command.
|
|
99
99
|
* @param {string} params.buildCommand - Build Command.
|
|
100
|
+
* @param {string} params.startCommand - Custom start command. Leave empty to use default.
|
|
100
101
|
* @param {string} params.outputDirectory - Output Directory for site.
|
|
101
102
|
* @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
102
103
|
* @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
@@ -105,11 +106,13 @@ export class Sites {
|
|
|
105
106
|
* @param {string} params.providerBranch - Production branch for the repo linked to the site.
|
|
106
107
|
* @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.
|
|
107
108
|
* @param {string} params.providerRootDirectory - Path to site code in the linked repo.
|
|
108
|
-
* @param {string} params.
|
|
109
|
+
* @param {string} params.buildSpecification - Build specification for the site deployments.
|
|
110
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
|
|
111
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
109
112
|
* @throws {AppwriteException}
|
|
110
113
|
* @returns {Promise<Models.Site>}
|
|
111
114
|
*/
|
|
112
|
-
create(params: { 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,
|
|
115
|
+
create(params: { 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>;
|
|
113
116
|
/**
|
|
114
117
|
* Create a new site.
|
|
115
118
|
*
|
|
@@ -122,6 +125,7 @@ export class Sites {
|
|
|
122
125
|
* @param {number} timeout - Maximum request time in seconds.
|
|
123
126
|
* @param {string} installCommand - Install Command.
|
|
124
127
|
* @param {string} buildCommand - Build Command.
|
|
128
|
+
* @param {string} startCommand - Custom start command. Leave empty to use default.
|
|
125
129
|
* @param {string} outputDirectory - Output Directory for site.
|
|
126
130
|
* @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
127
131
|
* @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
@@ -130,20 +134,22 @@ export class Sites {
|
|
|
130
134
|
* @param {string} providerBranch - Production branch for the repo linked to the site.
|
|
131
135
|
* @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.
|
|
132
136
|
* @param {string} providerRootDirectory - Path to site code in the linked repo.
|
|
133
|
-
* @param {string}
|
|
137
|
+
* @param {string} buildSpecification - Build specification for the site deployments.
|
|
138
|
+
* @param {string} runtimeSpecification - Runtime specification for the SSR executions.
|
|
139
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
134
140
|
* @throws {AppwriteException}
|
|
135
141
|
* @returns {Promise<Models.Site>}
|
|
136
142
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
137
143
|
*/
|
|
138
|
-
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,
|
|
144
|
+
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>;
|
|
139
145
|
create(
|
|
140
|
-
paramsOrFirst: { 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,
|
|
141
|
-
...rest: [(string)?, (Framework)?, (BuildRuntime)?, (boolean)?, (boolean)?, (number)?, (string)?, (string)?, (string)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
146
|
+
paramsOrFirst: { 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 } | string,
|
|
147
|
+
...rest: [(string)?, (Framework)?, (BuildRuntime)?, (boolean)?, (boolean)?, (number)?, (string)?, (string)?, (string)?, (string)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?, (string)?, (number)?]
|
|
142
148
|
): Promise<Models.Site> {
|
|
143
|
-
let params: { 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,
|
|
149
|
+
let params: { 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 };
|
|
144
150
|
|
|
145
151
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
146
|
-
params = (paramsOrFirst || {}) as { 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,
|
|
152
|
+
params = (paramsOrFirst || {}) as { 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 };
|
|
147
153
|
} else {
|
|
148
154
|
params = {
|
|
149
155
|
siteId: paramsOrFirst as string,
|
|
@@ -155,15 +161,18 @@ export class Sites {
|
|
|
155
161
|
timeout: rest[5] as number,
|
|
156
162
|
installCommand: rest[6] as string,
|
|
157
163
|
buildCommand: rest[7] as string,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
startCommand: rest[8] as string,
|
|
165
|
+
outputDirectory: rest[9] as string,
|
|
166
|
+
adapter: rest[10] as Adapter,
|
|
167
|
+
installationId: rest[11] as string,
|
|
168
|
+
fallbackFile: rest[12] as string,
|
|
169
|
+
providerRepositoryId: rest[13] as string,
|
|
170
|
+
providerBranch: rest[14] as string,
|
|
171
|
+
providerSilentMode: rest[15] as boolean,
|
|
172
|
+
providerRootDirectory: rest[16] as string,
|
|
173
|
+
buildSpecification: rest[17] as string,
|
|
174
|
+
runtimeSpecification: rest[18] as string,
|
|
175
|
+
deploymentRetention: rest[19] as number
|
|
167
176
|
};
|
|
168
177
|
}
|
|
169
178
|
|
|
@@ -176,6 +185,7 @@ export class Sites {
|
|
|
176
185
|
const timeout = params.timeout;
|
|
177
186
|
const installCommand = params.installCommand;
|
|
178
187
|
const buildCommand = params.buildCommand;
|
|
188
|
+
const startCommand = params.startCommand;
|
|
179
189
|
const outputDirectory = params.outputDirectory;
|
|
180
190
|
const adapter = params.adapter;
|
|
181
191
|
const installationId = params.installationId;
|
|
@@ -184,7 +194,9 @@ export class Sites {
|
|
|
184
194
|
const providerBranch = params.providerBranch;
|
|
185
195
|
const providerSilentMode = params.providerSilentMode;
|
|
186
196
|
const providerRootDirectory = params.providerRootDirectory;
|
|
187
|
-
const
|
|
197
|
+
const buildSpecification = params.buildSpecification;
|
|
198
|
+
const runtimeSpecification = params.runtimeSpecification;
|
|
199
|
+
const deploymentRetention = params.deploymentRetention;
|
|
188
200
|
|
|
189
201
|
if (typeof siteId === 'undefined') {
|
|
190
202
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
@@ -225,6 +237,9 @@ export class Sites {
|
|
|
225
237
|
if (typeof buildCommand !== 'undefined') {
|
|
226
238
|
payload['buildCommand'] = buildCommand;
|
|
227
239
|
}
|
|
240
|
+
if (typeof startCommand !== 'undefined') {
|
|
241
|
+
payload['startCommand'] = startCommand;
|
|
242
|
+
}
|
|
228
243
|
if (typeof outputDirectory !== 'undefined') {
|
|
229
244
|
payload['outputDirectory'] = outputDirectory;
|
|
230
245
|
}
|
|
@@ -252,8 +267,14 @@ export class Sites {
|
|
|
252
267
|
if (typeof providerRootDirectory !== 'undefined') {
|
|
253
268
|
payload['providerRootDirectory'] = providerRootDirectory;
|
|
254
269
|
}
|
|
255
|
-
if (typeof
|
|
256
|
-
payload['
|
|
270
|
+
if (typeof buildSpecification !== 'undefined') {
|
|
271
|
+
payload['buildSpecification'] = buildSpecification;
|
|
272
|
+
}
|
|
273
|
+
if (typeof runtimeSpecification !== 'undefined') {
|
|
274
|
+
payload['runtimeSpecification'] = runtimeSpecification;
|
|
275
|
+
}
|
|
276
|
+
if (typeof deploymentRetention !== 'undefined') {
|
|
277
|
+
payload['deploymentRetention'] = deploymentRetention;
|
|
257
278
|
}
|
|
258
279
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
259
280
|
|
|
@@ -552,6 +573,7 @@ export class Sites {
|
|
|
552
573
|
* @param {number} params.timeout - Maximum request time in seconds.
|
|
553
574
|
* @param {string} params.installCommand - Install Command.
|
|
554
575
|
* @param {string} params.buildCommand - Build Command.
|
|
576
|
+
* @param {string} params.startCommand - Custom start command. Leave empty to use default.
|
|
555
577
|
* @param {string} params.outputDirectory - Output Directory for site.
|
|
556
578
|
* @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
|
|
557
579
|
* @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
@@ -561,11 +583,13 @@ export class Sites {
|
|
|
561
583
|
* @param {string} params.providerBranch - Production branch for the repo linked to the site.
|
|
562
584
|
* @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.
|
|
563
585
|
* @param {string} params.providerRootDirectory - Path to site code in the linked repo.
|
|
564
|
-
* @param {string} params.
|
|
586
|
+
* @param {string} params.buildSpecification - Build specification for the site deployments.
|
|
587
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
|
|
588
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
565
589
|
* @throws {AppwriteException}
|
|
566
590
|
* @returns {Promise<Models.Site>}
|
|
567
591
|
*/
|
|
568
|
-
update(params: { 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,
|
|
592
|
+
update(params: { 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>;
|
|
569
593
|
/**
|
|
570
594
|
* Update site by its unique ID.
|
|
571
595
|
*
|
|
@@ -577,6 +601,7 @@ export class Sites {
|
|
|
577
601
|
* @param {number} timeout - Maximum request time in seconds.
|
|
578
602
|
* @param {string} installCommand - Install Command.
|
|
579
603
|
* @param {string} buildCommand - Build Command.
|
|
604
|
+
* @param {string} startCommand - Custom start command. Leave empty to use default.
|
|
580
605
|
* @param {string} outputDirectory - Output Directory for site.
|
|
581
606
|
* @param {BuildRuntime} buildRuntime - Runtime to use during build step.
|
|
582
607
|
* @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
|
|
@@ -586,20 +611,22 @@ export class Sites {
|
|
|
586
611
|
* @param {string} providerBranch - Production branch for the repo linked to the site.
|
|
587
612
|
* @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.
|
|
588
613
|
* @param {string} providerRootDirectory - Path to site code in the linked repo.
|
|
589
|
-
* @param {string}
|
|
614
|
+
* @param {string} buildSpecification - Build specification for the site deployments.
|
|
615
|
+
* @param {string} runtimeSpecification - Runtime specification for the SSR executions.
|
|
616
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
590
617
|
* @throws {AppwriteException}
|
|
591
618
|
* @returns {Promise<Models.Site>}
|
|
592
619
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
593
620
|
*/
|
|
594
|
-
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,
|
|
621
|
+
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>;
|
|
595
622
|
update(
|
|
596
|
-
paramsOrFirst: { 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,
|
|
597
|
-
...rest: [(string)?, (Framework)?, (boolean)?, (boolean)?, (number)?, (string)?, (string)?, (string)?, (BuildRuntime)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
623
|
+
paramsOrFirst: { 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 } | string,
|
|
624
|
+
...rest: [(string)?, (Framework)?, (boolean)?, (boolean)?, (number)?, (string)?, (string)?, (string)?, (string)?, (BuildRuntime)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?, (string)?, (number)?]
|
|
598
625
|
): Promise<Models.Site> {
|
|
599
|
-
let params: { 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,
|
|
626
|
+
let params: { 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 };
|
|
600
627
|
|
|
601
628
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
602
|
-
params = (paramsOrFirst || {}) as { 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,
|
|
629
|
+
params = (paramsOrFirst || {}) as { 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 };
|
|
603
630
|
} else {
|
|
604
631
|
params = {
|
|
605
632
|
siteId: paramsOrFirst as string,
|
|
@@ -610,16 +637,19 @@ export class Sites {
|
|
|
610
637
|
timeout: rest[4] as number,
|
|
611
638
|
installCommand: rest[5] as string,
|
|
612
639
|
buildCommand: rest[6] as string,
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
640
|
+
startCommand: rest[7] as string,
|
|
641
|
+
outputDirectory: rest[8] as string,
|
|
642
|
+
buildRuntime: rest[9] as BuildRuntime,
|
|
643
|
+
adapter: rest[10] as Adapter,
|
|
644
|
+
fallbackFile: rest[11] as string,
|
|
645
|
+
installationId: rest[12] as string,
|
|
646
|
+
providerRepositoryId: rest[13] as string,
|
|
647
|
+
providerBranch: rest[14] as string,
|
|
648
|
+
providerSilentMode: rest[15] as boolean,
|
|
649
|
+
providerRootDirectory: rest[16] as string,
|
|
650
|
+
buildSpecification: rest[17] as string,
|
|
651
|
+
runtimeSpecification: rest[18] as string,
|
|
652
|
+
deploymentRetention: rest[19] as number
|
|
623
653
|
};
|
|
624
654
|
}
|
|
625
655
|
|
|
@@ -631,6 +661,7 @@ export class Sites {
|
|
|
631
661
|
const timeout = params.timeout;
|
|
632
662
|
const installCommand = params.installCommand;
|
|
633
663
|
const buildCommand = params.buildCommand;
|
|
664
|
+
const startCommand = params.startCommand;
|
|
634
665
|
const outputDirectory = params.outputDirectory;
|
|
635
666
|
const buildRuntime = params.buildRuntime;
|
|
636
667
|
const adapter = params.adapter;
|
|
@@ -640,7 +671,9 @@ export class Sites {
|
|
|
640
671
|
const providerBranch = params.providerBranch;
|
|
641
672
|
const providerSilentMode = params.providerSilentMode;
|
|
642
673
|
const providerRootDirectory = params.providerRootDirectory;
|
|
643
|
-
const
|
|
674
|
+
const buildSpecification = params.buildSpecification;
|
|
675
|
+
const runtimeSpecification = params.runtimeSpecification;
|
|
676
|
+
const deploymentRetention = params.deploymentRetention;
|
|
644
677
|
|
|
645
678
|
if (typeof siteId === 'undefined') {
|
|
646
679
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
@@ -675,6 +708,9 @@ export class Sites {
|
|
|
675
708
|
if (typeof buildCommand !== 'undefined') {
|
|
676
709
|
payload['buildCommand'] = buildCommand;
|
|
677
710
|
}
|
|
711
|
+
if (typeof startCommand !== 'undefined') {
|
|
712
|
+
payload['startCommand'] = startCommand;
|
|
713
|
+
}
|
|
678
714
|
if (typeof outputDirectory !== 'undefined') {
|
|
679
715
|
payload['outputDirectory'] = outputDirectory;
|
|
680
716
|
}
|
|
@@ -702,8 +738,14 @@ export class Sites {
|
|
|
702
738
|
if (typeof providerRootDirectory !== 'undefined') {
|
|
703
739
|
payload['providerRootDirectory'] = providerRootDirectory;
|
|
704
740
|
}
|
|
705
|
-
if (typeof
|
|
706
|
-
payload['
|
|
741
|
+
if (typeof buildSpecification !== 'undefined') {
|
|
742
|
+
payload['buildSpecification'] = buildSpecification;
|
|
743
|
+
}
|
|
744
|
+
if (typeof runtimeSpecification !== 'undefined') {
|
|
745
|
+
payload['runtimeSpecification'] = runtimeSpecification;
|
|
746
|
+
}
|
|
747
|
+
if (typeof deploymentRetention !== 'undefined') {
|
|
748
|
+
payload['deploymentRetention'] = deploymentRetention;
|
|
707
749
|
}
|
|
708
750
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
709
751
|
|
|
@@ -15,6 +15,10 @@ export declare enum AppwriteMigrationResource {
|
|
|
15
15
|
Function = "function",
|
|
16
16
|
Deployment = "deployment",
|
|
17
17
|
Environmentvariable = "environment-variable",
|
|
18
|
+
Provider = "provider",
|
|
19
|
+
Topic = "topic",
|
|
20
|
+
Subscriber = "subscriber",
|
|
21
|
+
Message = "message",
|
|
18
22
|
Site = "site",
|
|
19
23
|
Sitedeployment = "site-deployment",
|
|
20
24
|
Sitevariable = "site-variable"
|
|
@@ -30,6 +30,9 @@ export declare enum BuildRuntime {
|
|
|
30
30
|
Pythonml311 = "python-ml-3.11",
|
|
31
31
|
Pythonml312 = "python-ml-3.12",
|
|
32
32
|
Pythonml313 = "python-ml-3.13",
|
|
33
|
+
Deno121 = "deno-1.21",
|
|
34
|
+
Deno124 = "deno-1.24",
|
|
35
|
+
Deno135 = "deno-1.35",
|
|
33
36
|
Deno140 = "deno-1.40",
|
|
34
37
|
Deno146 = "deno-1.46",
|
|
35
38
|
Deno20 = "deno-2.0",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum DomainPurchasePaymentStatus {
|
|
2
|
+
Pending = "pending",
|
|
3
|
+
PendingConfirmation = "pending_confirmation",
|
|
4
|
+
PendingPaymentProcessing = "pending_payment_processing",
|
|
5
|
+
Authorized = "authorized",
|
|
6
|
+
Captured = "captured",
|
|
7
|
+
Failed = "failed",
|
|
8
|
+
CaptureFailed = "capture_failed",
|
|
9
|
+
RenewalCaptureFailed = "renewal_capture_failed"
|
|
10
|
+
}
|
package/types/enums/runtime.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ export declare enum Runtime {
|
|
|
30
30
|
Pythonml311 = "python-ml-3.11",
|
|
31
31
|
Pythonml312 = "python-ml-3.12",
|
|
32
32
|
Pythonml313 = "python-ml-3.13",
|
|
33
|
+
Deno121 = "deno-1.21",
|
|
34
|
+
Deno124 = "deno-1.24",
|
|
35
|
+
Deno135 = "deno-1.35",
|
|
33
36
|
Deno140 = "deno-1.40",
|
|
34
37
|
Deno146 = "deno-1.46",
|
|
35
38
|
Deno20 = "deno-2.0",
|
|
@@ -30,6 +30,9 @@ export declare enum Runtimes {
|
|
|
30
30
|
Pythonml311 = "python-ml-3.11",
|
|
31
31
|
Pythonml312 = "python-ml-3.12",
|
|
32
32
|
Pythonml313 = "python-ml-3.13",
|
|
33
|
+
Deno121 = "deno-1.21",
|
|
34
|
+
Deno124 = "deno-1.24",
|
|
35
|
+
Deno135 = "deno-1.35",
|
|
33
36
|
Deno140 = "deno-1.40",
|
|
34
37
|
Deno146 = "deno-1.46",
|
|
35
38
|
Deno20 = "deno-2.0",
|
package/types/index.d.ts
CHANGED
|
@@ -112,4 +112,5 @@ export { ProxyRuleDeploymentResourceType } from './enums/proxy-rule-deployment-r
|
|
|
112
112
|
export { ProxyRuleStatus } from './enums/proxy-rule-status';
|
|
113
113
|
export { MessageStatus } from './enums/message-status';
|
|
114
114
|
export { BillingPlanGroup } from './enums/billing-plan-group';
|
|
115
|
+
export { DomainPurchasePaymentStatus } from './enums/domain-purchase-payment-status';
|
|
115
116
|
export { DomainTransferStatusStatus } from './enums/domain-transfer-status-status';
|
package/types/models.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { ProxyRuleDeploymentResourceType } from "./enums/proxy-rule-deployment-r
|
|
|
12
12
|
import { ProxyRuleStatus } from "./enums/proxy-rule-status";
|
|
13
13
|
import { MessageStatus } from "./enums/message-status";
|
|
14
14
|
import { BillingPlanGroup } from "./enums/billing-plan-group";
|
|
15
|
+
import { DomainPurchasePaymentStatus } from "./enums/domain-purchase-payment-status";
|
|
15
16
|
import { DomainTransferStatusStatus } from "./enums/domain-transfer-status-status";
|
|
16
17
|
/**
|
|
17
18
|
* Appwrite Models
|
|
@@ -3401,6 +3402,10 @@ export declare namespace Models {
|
|
|
3401
3402
|
* Site framework.
|
|
3402
3403
|
*/
|
|
3403
3404
|
framework: string;
|
|
3405
|
+
/**
|
|
3406
|
+
* How many days to keep the non-active deployments before they will be automatically deleted.
|
|
3407
|
+
*/
|
|
3408
|
+
deploymentRetention: number;
|
|
3404
3409
|
/**
|
|
3405
3410
|
* Site's active deployment ID.
|
|
3406
3411
|
*/
|
|
@@ -3445,6 +3450,10 @@ export declare namespace Models {
|
|
|
3445
3450
|
* The build command used to build the site.
|
|
3446
3451
|
*/
|
|
3447
3452
|
buildCommand: string;
|
|
3453
|
+
/**
|
|
3454
|
+
* Custom command to use when starting site runtime.
|
|
3455
|
+
*/
|
|
3456
|
+
startCommand: string;
|
|
3448
3457
|
/**
|
|
3449
3458
|
* The directory where the site build output is located.
|
|
3450
3459
|
*/
|
|
@@ -3470,9 +3479,13 @@ export declare namespace Models {
|
|
|
3470
3479
|
*/
|
|
3471
3480
|
providerSilentMode: boolean;
|
|
3472
3481
|
/**
|
|
3473
|
-
* Machine specification for builds
|
|
3482
|
+
* Machine specification for deployment builds.
|
|
3483
|
+
*/
|
|
3484
|
+
buildSpecification: string;
|
|
3485
|
+
/**
|
|
3486
|
+
* Machine specification for SSR executions.
|
|
3474
3487
|
*/
|
|
3475
|
-
|
|
3488
|
+
runtimeSpecification: string;
|
|
3476
3489
|
/**
|
|
3477
3490
|
* Site build runtime.
|
|
3478
3491
|
*/
|
|
@@ -3624,6 +3637,10 @@ export declare namespace Models {
|
|
|
3624
3637
|
* Function execution and build runtime.
|
|
3625
3638
|
*/
|
|
3626
3639
|
runtime: string;
|
|
3640
|
+
/**
|
|
3641
|
+
* How many days to keep the non-active deployments before they will be automatically deleted.
|
|
3642
|
+
*/
|
|
3643
|
+
deploymentRetention: number;
|
|
3627
3644
|
/**
|
|
3628
3645
|
* Function's active deployment ID.
|
|
3629
3646
|
*/
|
|
@@ -3697,9 +3714,13 @@ export declare namespace Models {
|
|
|
3697
3714
|
*/
|
|
3698
3715
|
providerSilentMode: boolean;
|
|
3699
3716
|
/**
|
|
3700
|
-
* Machine specification for builds
|
|
3717
|
+
* Machine specification for deployment builds.
|
|
3718
|
+
*/
|
|
3719
|
+
buildSpecification: string;
|
|
3720
|
+
/**
|
|
3721
|
+
* Machine specification for executions.
|
|
3701
3722
|
*/
|
|
3702
|
-
|
|
3723
|
+
runtimeSpecification: string;
|
|
3703
3724
|
};
|
|
3704
3725
|
/**
|
|
3705
3726
|
* Template Function
|
|
@@ -5961,6 +5982,22 @@ export declare namespace Models {
|
|
|
5961
5982
|
* Total aggregated number of image transformations.
|
|
5962
5983
|
*/
|
|
5963
5984
|
imageTransformationsTotal: number;
|
|
5985
|
+
/**
|
|
5986
|
+
* Aggregated number of function executions per period.
|
|
5987
|
+
*/
|
|
5988
|
+
functionsExecutions: Metric[];
|
|
5989
|
+
/**
|
|
5990
|
+
* Total aggregated number of function executions.
|
|
5991
|
+
*/
|
|
5992
|
+
functionsExecutionsTotal: number;
|
|
5993
|
+
/**
|
|
5994
|
+
* Aggregated number of site executions per period.
|
|
5995
|
+
*/
|
|
5996
|
+
sitesExecutions: Metric[];
|
|
5997
|
+
/**
|
|
5998
|
+
* Total aggregated number of site executions.
|
|
5999
|
+
*/
|
|
6000
|
+
sitesExecutionsTotal: number;
|
|
5964
6001
|
/**
|
|
5965
6002
|
* Aggregated stats for total network bandwidth.
|
|
5966
6003
|
*/
|
|
@@ -5985,6 +6022,30 @@ export declare namespace Models {
|
|
|
5985
6022
|
* Total aggregated number of Imagine credits.
|
|
5986
6023
|
*/
|
|
5987
6024
|
imagineCreditsTotal: number;
|
|
6025
|
+
/**
|
|
6026
|
+
* Current aggregated number of open Realtime connections.
|
|
6027
|
+
*/
|
|
6028
|
+
realtimeConnectionsTotal: number;
|
|
6029
|
+
/**
|
|
6030
|
+
* Total number of Realtime messages sent to clients.
|
|
6031
|
+
*/
|
|
6032
|
+
realtimeMessagesTotal: number;
|
|
6033
|
+
/**
|
|
6034
|
+
* Total consumed Realtime bandwidth (in bytes).
|
|
6035
|
+
*/
|
|
6036
|
+
realtimeBandwidthTotal: number;
|
|
6037
|
+
/**
|
|
6038
|
+
* Aggregated number of open Realtime connections per period.
|
|
6039
|
+
*/
|
|
6040
|
+
realtimeConnections: Metric[];
|
|
6041
|
+
/**
|
|
6042
|
+
* Aggregated number of Realtime messages sent to clients per period.
|
|
6043
|
+
*/
|
|
6044
|
+
realtimeMessages: Metric[];
|
|
6045
|
+
/**
|
|
6046
|
+
* Aggregated consumed Realtime bandwidth (in bytes) per period.
|
|
6047
|
+
*/
|
|
6048
|
+
realtimeBandwidth: Metric[];
|
|
5988
6049
|
};
|
|
5989
6050
|
/**
|
|
5990
6051
|
* Headers
|
|
@@ -6696,6 +6757,22 @@ export declare namespace Models {
|
|
|
6696
6757
|
* Number of sites to be migrated.
|
|
6697
6758
|
*/
|
|
6698
6759
|
site: number;
|
|
6760
|
+
/**
|
|
6761
|
+
* Number of providers to be migrated.
|
|
6762
|
+
*/
|
|
6763
|
+
provider: number;
|
|
6764
|
+
/**
|
|
6765
|
+
* Number of topics to be migrated.
|
|
6766
|
+
*/
|
|
6767
|
+
topic: number;
|
|
6768
|
+
/**
|
|
6769
|
+
* Number of subscribers to be migrated.
|
|
6770
|
+
*/
|
|
6771
|
+
subscriber: number;
|
|
6772
|
+
/**
|
|
6773
|
+
* Number of messages to be migrated.
|
|
6774
|
+
*/
|
|
6775
|
+
message: number;
|
|
6699
6776
|
/**
|
|
6700
6777
|
* Size of files to be migrated in mb.
|
|
6701
6778
|
*/
|
|
@@ -8426,7 +8503,11 @@ export declare namespace Models {
|
|
|
8426
8503
|
/**
|
|
8427
8504
|
* Payment status for domain purchase.
|
|
8428
8505
|
*/
|
|
8429
|
-
paymentStatus:
|
|
8506
|
+
paymentStatus: DomainPurchasePaymentStatus;
|
|
8507
|
+
/**
|
|
8508
|
+
* Client secret for payment confirmation. Present only when paymentStatus is pending_confirmation.
|
|
8509
|
+
*/
|
|
8510
|
+
clientSecret: string;
|
|
8430
8511
|
/**
|
|
8431
8512
|
* Nameservers setting. "Appwrite" or empty string.
|
|
8432
8513
|
*/
|
|
@@ -8459,6 +8540,10 @@ export declare namespace Models {
|
|
|
8459
8540
|
* Domain transfer status (e.g., "pending", "completed", "failed").
|
|
8460
8541
|
*/
|
|
8461
8542
|
transferStatus: string;
|
|
8543
|
+
/**
|
|
8544
|
+
* Retry attempts for the current domain payment flow. Development only.
|
|
8545
|
+
*/
|
|
8546
|
+
attempts: number;
|
|
8462
8547
|
};
|
|
8463
8548
|
/**
|
|
8464
8549
|
* DNSRecord
|
|
@@ -266,7 +266,7 @@ export declare class Account {
|
|
|
266
266
|
/**
|
|
267
267
|
* List all invoices tied to an account.
|
|
268
268
|
*
|
|
269
|
-
* @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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
269
|
+
* @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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
270
270
|
* @throws {AppwriteException}
|
|
271
271
|
* @returns {Promise<Models.InvoiceList>}
|
|
272
272
|
*/
|
|
@@ -276,7 +276,7 @@ export declare class Account {
|
|
|
276
276
|
/**
|
|
277
277
|
* List all invoices tied to an account.
|
|
278
278
|
*
|
|
279
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
279
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
280
280
|
* @throws {AppwriteException}
|
|
281
281
|
* @returns {Promise<Models.InvoiceList>}
|
|
282
282
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
@@ -123,6 +123,28 @@ export declare class Domains {
|
|
|
123
123
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
124
124
|
*/
|
|
125
125
|
createPurchase(domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number): Promise<Models.Domain>;
|
|
126
|
+
/**
|
|
127
|
+
* Confirm a domain purchase after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
|
|
128
|
+
*
|
|
129
|
+
* @param {string} params.domainId - Domain ID to confirm purchase for.
|
|
130
|
+
* @param {string} params.organizationId - Team ID that owns the domain.
|
|
131
|
+
* @throws {AppwriteException}
|
|
132
|
+
* @returns {Promise<Models.Domain>}
|
|
133
|
+
*/
|
|
134
|
+
confirmPurchase(params: {
|
|
135
|
+
domainId: string;
|
|
136
|
+
organizationId: string;
|
|
137
|
+
}): Promise<Models.Domain>;
|
|
138
|
+
/**
|
|
139
|
+
* Confirm a domain purchase after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
|
|
140
|
+
*
|
|
141
|
+
* @param {string} domainId - Domain ID to confirm purchase for.
|
|
142
|
+
* @param {string} organizationId - Team ID that owns the domain.
|
|
143
|
+
* @throws {AppwriteException}
|
|
144
|
+
* @returns {Promise<Models.Domain>}
|
|
145
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
146
|
+
*/
|
|
147
|
+
confirmPurchase(domainId: string, organizationId: string): Promise<Models.Domain>;
|
|
126
148
|
/**
|
|
127
149
|
* List domain suggestions.
|
|
128
150
|
*
|
|
@@ -185,6 +207,28 @@ export declare class Domains {
|
|
|
185
207
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
186
208
|
*/
|
|
187
209
|
createTransferIn(domain: string, organizationId: string, authCode: string, paymentMethodId: string): Promise<Models.Domain>;
|
|
210
|
+
/**
|
|
211
|
+
* Confirm a domain transfer in after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
|
|
212
|
+
*
|
|
213
|
+
* @param {string} params.domainId - Domain ID to confirm transfer for.
|
|
214
|
+
* @param {string} params.organizationId - Team ID that owns the domain.
|
|
215
|
+
* @throws {AppwriteException}
|
|
216
|
+
* @returns {Promise<Models.Domain>}
|
|
217
|
+
*/
|
|
218
|
+
confirmTransferIn(params: {
|
|
219
|
+
domainId: string;
|
|
220
|
+
organizationId: string;
|
|
221
|
+
}): Promise<Models.Domain>;
|
|
222
|
+
/**
|
|
223
|
+
* Confirm a domain transfer in after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
|
|
224
|
+
*
|
|
225
|
+
* @param {string} domainId - Domain ID to confirm transfer for.
|
|
226
|
+
* @param {string} organizationId - Team ID that owns the domain.
|
|
227
|
+
* @throws {AppwriteException}
|
|
228
|
+
* @returns {Promise<Models.Domain>}
|
|
229
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
230
|
+
*/
|
|
231
|
+
confirmTransferIn(domainId: string, organizationId: string): Promise<Models.Domain>;
|
|
188
232
|
/**
|
|
189
233
|
* Create a domain transfer out and return the authorization code.
|
|
190
234
|
*
|