appwrite-cli 12.0.0 → 13.0.0-rc.1
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 +8 -0
- package/README.md +2 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +145 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/client.d.ts +89 -0
- package/dist/lib/client.d.ts.map +1 -0
- package/dist/lib/client.js +227 -0
- package/dist/lib/client.js.map +1 -0
- package/dist/lib/commands/account.d.ts +379 -0
- package/dist/lib/commands/account.d.ts.map +1 -0
- package/dist/lib/commands/account.js +1228 -0
- package/dist/lib/commands/account.js.map +1 -0
- package/dist/lib/commands/console.d.ts +20 -0
- package/dist/lib/commands/console.d.ts.map +1 -0
- package/dist/lib/commands/console.js +78 -0
- package/dist/lib/commands/console.js.map +1 -0
- package/dist/lib/commands/databases.d.ts +732 -0
- package/dist/lib/commands/databases.d.ts.map +1 -0
- package/dist/lib/commands/databases.js +2196 -0
- package/dist/lib/commands/databases.js.map +1 -0
- package/dist/lib/commands/functions.d.ts +310 -0
- package/dist/lib/commands/functions.d.ts.map +1 -0
- package/dist/lib/commands/functions.js +1100 -0
- package/dist/lib/commands/functions.js.map +1 -0
- package/dist/lib/commands/generic.d.ts +17 -0
- package/dist/lib/commands/generic.d.ts.map +1 -0
- package/dist/lib/commands/generic.js +279 -0
- package/dist/lib/commands/generic.js.map +1 -0
- package/dist/lib/commands/graphql.d.ts +19 -0
- package/dist/lib/commands/graphql.d.ts.map +1 -0
- package/dist/lib/commands/graphql.js +77 -0
- package/dist/lib/commands/graphql.js.map +1 -0
- package/dist/lib/commands/health.d.ts +153 -0
- package/dist/lib/commands/health.d.ts.map +1 -0
- package/dist/lib/commands/health.js +464 -0
- package/dist/lib/commands/health.js.map +1 -0
- package/dist/lib/commands/init.d.ts +3 -0
- package/dist/lib/commands/init.d.ts.map +1 -0
- package/dist/lib/commands/init.js +518 -0
- package/dist/lib/commands/init.js.map +1 -0
- package/dist/lib/commands/locale.d.ts +53 -0
- package/dist/lib/commands/locale.d.ts.map +1 -0
- package/dist/lib/commands/locale.js +165 -0
- package/dist/lib/commands/locale.js.map +1 -0
- package/dist/lib/commands/messaging.d.ts +588 -0
- package/dist/lib/commands/messaging.d.ts.map +1 -0
- package/dist/lib/commands/messaging.js +2042 -0
- package/dist/lib/commands/messaging.js.map +1 -0
- package/dist/lib/commands/migrations.d.ts +150 -0
- package/dist/lib/commands/migrations.d.ts.map +1 -0
- package/dist/lib/commands/migrations.js +524 -0
- package/dist/lib/commands/migrations.js.map +1 -0
- package/dist/lib/commands/organizations.d.ts +11 -0
- package/dist/lib/commands/organizations.d.ts.map +1 -0
- package/dist/lib/commands/organizations.js +31 -0
- package/dist/lib/commands/organizations.js.map +1 -0
- package/dist/lib/commands/project.d.ts +53 -0
- package/dist/lib/commands/project.d.ts.map +1 -0
- package/dist/lib/commands/project.js +176 -0
- package/dist/lib/commands/project.js.map +1 -0
- package/dist/lib/commands/projects.d.ts +516 -0
- package/dist/lib/commands/projects.d.ts.map +1 -0
- package/dist/lib/commands/projects.js +1590 -0
- package/dist/lib/commands/projects.js.map +1 -0
- package/dist/lib/commands/proxy.d.ts +71 -0
- package/dist/lib/commands/proxy.d.ts.map +1 -0
- package/dist/lib/commands/proxy.js +240 -0
- package/dist/lib/commands/proxy.js.map +1 -0
- package/dist/lib/commands/pull.d.ts +8 -0
- package/dist/lib/commands/pull.d.ts.map +1 -0
- package/dist/lib/commands/pull.js +455 -0
- package/dist/lib/commands/pull.js.map +1 -0
- package/dist/lib/commands/push.d.ts +4 -0
- package/dist/lib/commands/push.d.ts.map +1 -0
- package/dist/lib/commands/push.js +2154 -0
- package/dist/lib/commands/push.js.map +1 -0
- package/dist/lib/commands/run.d.ts +3 -0
- package/dist/lib/commands/run.d.ts.map +1 -0
- package/dist/lib/commands/run.js +287 -0
- package/dist/lib/commands/run.js.map +1 -0
- package/dist/lib/commands/sites.d.ts +296 -0
- package/dist/lib/commands/sites.d.ts.map +1 -0
- package/dist/lib/commands/sites.js +1046 -0
- package/dist/lib/commands/sites.js.map +1 -0
- package/dist/lib/commands/storage.d.ts +170 -0
- package/dist/lib/commands/storage.d.ts.map +1 -0
- package/dist/lib/commands/storage.js +651 -0
- package/dist/lib/commands/storage.js.map +1 -0
- package/dist/lib/commands/tables-db.d.ts +728 -0
- package/dist/lib/commands/tables-db.d.ts.map +1 -0
- package/dist/lib/commands/tables-db.js +2198 -0
- package/dist/lib/commands/tables-db.js.map +1 -0
- package/dist/lib/commands/teams.d.ts +129 -0
- package/dist/lib/commands/teams.d.ts.map +1 -0
- package/dist/lib/commands/teams.js +403 -0
- package/dist/lib/commands/teams.js.map +1 -0
- package/dist/lib/commands/tokens.d.ts +48 -0
- package/dist/lib/commands/tokens.d.ts.map +1 -0
- package/dist/lib/commands/tokens.js +156 -0
- package/dist/lib/commands/tokens.js.map +1 -0
- package/dist/lib/commands/types.d.ts +3 -0
- package/dist/lib/commands/types.d.ts.map +1 -0
- package/dist/lib/commands/types.js +155 -0
- package/dist/lib/commands/types.js.map +1 -0
- package/dist/lib/commands/update.d.ts +3 -0
- package/dist/lib/commands/update.d.ts.map +1 -0
- package/dist/lib/commands/update.js +202 -0
- package/dist/lib/commands/update.js.map +1 -0
- package/dist/lib/commands/users.d.ts +382 -0
- package/dist/lib/commands/users.d.ts.map +1 -0
- package/dist/lib/commands/users.js +1195 -0
- package/dist/lib/commands/users.js.map +1 -0
- package/dist/lib/commands/vcs.d.ts +92 -0
- package/dist/lib/commands/vcs.d.ts.map +1 -0
- package/dist/lib/commands/vcs.js +276 -0
- package/dist/lib/commands/vcs.js.map +1 -0
- package/dist/lib/config.d.ts +118 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/{lib → dist/lib}/config.js +204 -325
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/emulation/docker.d.ts +15 -0
- package/dist/lib/emulation/docker.d.ts.map +1 -0
- package/dist/lib/emulation/docker.js +220 -0
- package/dist/lib/emulation/docker.js.map +1 -0
- package/dist/lib/emulation/utils.d.ts +29 -0
- package/dist/lib/emulation/utils.d.ts.map +1 -0
- package/dist/lib/emulation/utils.js +168 -0
- package/dist/lib/emulation/utils.js.map +1 -0
- package/dist/lib/exception.d.ts +8 -0
- package/dist/lib/exception.d.ts.map +1 -0
- package/dist/lib/exception.js +16 -0
- package/dist/lib/exception.js.map +1 -0
- package/dist/lib/id.d.ts +7 -0
- package/dist/lib/id.d.ts.map +1 -0
- package/dist/lib/id.js +32 -0
- package/dist/lib/id.js.map +1 -0
- package/dist/lib/paginate.d.ts +10 -0
- package/dist/lib/paginate.d.ts.map +1 -0
- package/{lib → dist/lib}/paginate.js +9 -15
- package/dist/lib/paginate.js.map +1 -0
- package/dist/lib/parser.d.ts +18 -0
- package/dist/lib/parser.d.ts.map +1 -0
- package/dist/lib/parser.js +237 -0
- package/dist/lib/parser.js.map +1 -0
- package/dist/lib/questions.d.ts +59 -0
- package/dist/lib/questions.d.ts.map +1 -0
- package/dist/lib/questions.js +995 -0
- package/dist/lib/questions.js.map +1 -0
- package/dist/lib/sdks.d.ts +4 -0
- package/dist/lib/sdks.d.ts.map +1 -0
- package/dist/lib/sdks.js +51 -0
- package/dist/lib/sdks.js.map +1 -0
- package/dist/lib/spinner.d.ts +28 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/{lib → dist/lib}/spinner.js +34 -45
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/type-generation/attribute.d.ts +17 -0
- package/dist/lib/type-generation/attribute.d.ts.map +1 -0
- package/dist/lib/type-generation/attribute.js +19 -0
- package/dist/lib/type-generation/attribute.js.map +1 -0
- package/dist/lib/type-generation/languages/csharp.d.ts +7 -0
- package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/csharp.js +180 -0
- package/dist/lib/type-generation/languages/csharp.js.map +1 -0
- package/dist/lib/type-generation/languages/dart.d.ts +8 -0
- package/dist/lib/type-generation/languages/dart.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/dart.js +197 -0
- package/dist/lib/type-generation/languages/dart.js.map +1 -0
- package/dist/lib/type-generation/languages/java.d.ts +7 -0
- package/dist/lib/type-generation/languages/java.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/java.js +140 -0
- package/dist/lib/type-generation/languages/java.js.map +1 -0
- package/dist/lib/type-generation/languages/javascript.d.ts +9 -0
- package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/javascript.js +108 -0
- package/dist/lib/type-generation/languages/javascript.js.map +1 -0
- package/dist/lib/type-generation/languages/kotlin.d.ts +7 -0
- package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/kotlin.js +95 -0
- package/dist/lib/type-generation/languages/kotlin.js.map +1 -0
- package/dist/lib/type-generation/languages/language.d.ts +43 -0
- package/dist/lib/type-generation/languages/language.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/language.js +82 -0
- package/dist/lib/type-generation/languages/language.js.map +1 -0
- package/dist/lib/type-generation/languages/php.d.ts +7 -0
- package/dist/lib/type-generation/languages/php.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/php.js +116 -0
- package/dist/lib/type-generation/languages/php.js.map +1 -0
- package/dist/lib/type-generation/languages/swift.d.ts +7 -0
- package/dist/lib/type-generation/languages/swift.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/swift.js +179 -0
- package/dist/lib/type-generation/languages/swift.js.map +1 -0
- package/dist/lib/type-generation/languages/typescript.d.ts +9 -0
- package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/typescript.js +112 -0
- package/dist/lib/type-generation/languages/typescript.js.map +1 -0
- package/dist/lib/types.d.ts +133 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +3 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils.d.ts +15 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/{lib → dist/lib}/utils.js +74 -120
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/validations.d.ts +2 -0
- package/dist/lib/validations.d.ts.map +1 -0
- package/dist/lib/validations.js +20 -0
- package/dist/lib/validations.js.map +1 -0
- package/docs/examples/databases/upsert-document.md +1 -2
- package/index.ts +152 -0
- package/install.ps1 +2 -5
- package/install.sh +1 -2
- package/lib/client.ts +259 -0
- package/lib/commands/{account.js → account.ts} +410 -664
- package/lib/commands/console.ts +112 -0
- package/lib/commands/{databases.js → databases.ts} +818 -1136
- package/lib/commands/{functions.js → functions.ts} +381 -526
- package/lib/commands/{generic.js → generic.ts} +47 -39
- package/lib/commands/graphql.ts +110 -0
- package/lib/commands/{health.js → health.ts} +168 -284
- package/lib/commands/{init.js → init.ts} +68 -66
- package/lib/commands/{locale.js → locale.ts} +75 -121
- package/lib/commands/{messaging.js → messaging.ts} +699 -937
- package/lib/commands/{migrations.js → migrations.ts} +182 -258
- package/lib/commands/organizations.ts +46 -0
- package/lib/commands/{project.js → project.ts} +75 -111
- package/lib/commands/{projects.js → projects.ts} +587 -843
- package/lib/commands/{proxy.js → proxy.ts} +94 -140
- package/lib/commands/{pull.js → pull.ts} +54 -44
- package/lib/commands/{push.js → push.ts} +235 -191
- package/lib/commands/{run.js → run.ts} +61 -55
- package/lib/commands/{sites.js → sites.ts} +364 -504
- package/lib/commands/{storage.js → storage.ts} +216 -292
- package/lib/commands/{tables-db.js → tables-db.ts} +817 -1126
- package/lib/commands/{teams.js → teams.ts} +162 -236
- package/lib/commands/{tokens.js → tokens.ts} +70 -99
- package/lib/commands/{types.js → types.ts} +37 -35
- package/lib/commands/{update.js → update.ts} +25 -27
- package/lib/commands/{users.js → users.ts} +426 -644
- package/lib/commands/{vcs.js → vcs.ts} +122 -173
- package/lib/config.ts +854 -0
- package/lib/emulation/{docker.js → docker.ts} +39 -38
- package/lib/emulation/utils.ts +193 -0
- package/lib/exception.ts +20 -0
- package/lib/{id.js → id.ts} +5 -5
- package/lib/paginate.ts +63 -0
- package/lib/parser.ts +238 -0
- package/lib/{questions.js → questions.ts} +148 -156
- package/lib/sdks.ts +55 -0
- package/lib/spinner.ts +118 -0
- package/lib/type-generation/attribute.ts +17 -0
- package/lib/type-generation/languages/{csharp.js → csharp.ts} +59 -48
- package/lib/type-generation/languages/{dart.js → dart.ts} +91 -80
- package/lib/type-generation/languages/{java.js → java.ts} +58 -47
- package/lib/type-generation/languages/javascript.ts +111 -0
- package/lib/type-generation/languages/kotlin.ts +96 -0
- package/lib/type-generation/languages/language.ts +119 -0
- package/lib/type-generation/languages/{php.js → php.ts} +55 -48
- package/lib/type-generation/languages/{swift.js → swift.ts} +59 -48
- package/lib/type-generation/languages/typescript.ts +116 -0
- package/lib/types.ts +150 -0
- package/lib/utils.ts +322 -0
- package/lib/validations.ts +17 -0
- package/package.json +21 -12
- package/scoop/appwrite.config.json +3 -3
- package/tsconfig.json +30 -0
- package/index.js +0 -147
- package/lib/client.js +0 -254
- package/lib/commands/console.js +0 -127
- package/lib/commands/graphql.js +0 -126
- package/lib/commands/organizations.js +0 -48
- package/lib/emulation/utils.js +0 -186
- package/lib/exception.js +0 -9
- package/lib/parser.js +0 -250
- package/lib/sdks.js +0 -60
- package/lib/type-generation/attribute.js +0 -16
- package/lib/type-generation/languages/javascript.js +0 -102
- package/lib/type-generation/languages/kotlin.js +0 -85
- package/lib/type-generation/languages/language.js +0 -125
- package/lib/type-generation/languages/typescript.js +0 -107
- package/lib/validations.js +0 -17
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @param {fs.ReadStream} readStream
|
|
17
|
-
* @returns {ReadableStream}
|
|
18
|
-
*/
|
|
19
|
-
function convertReadStreamToReadableStream(readStream) {
|
|
1
|
+
import fs = require('fs');
|
|
2
|
+
import pathLib = require('path');
|
|
3
|
+
import tar = require('tar');
|
|
4
|
+
import ignore = require('ignore');
|
|
5
|
+
import { promisify } from 'util';
|
|
6
|
+
import Client from '../client';
|
|
7
|
+
import { getAllFiles, showConsoleLink } from '../utils';
|
|
8
|
+
import { Command } from 'commander';
|
|
9
|
+
import { sdkForProject, sdkForConsole } from '../sdks';
|
|
10
|
+
import { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } from '../parser';
|
|
11
|
+
import { localConfig, globalConfig } from '../config';
|
|
12
|
+
import { File } from 'undici';
|
|
13
|
+
import { ReadableStream } from 'stream/web';
|
|
14
|
+
|
|
15
|
+
function convertReadStreamToReadableStream(readStream: fs.ReadStream): ReadableStream {
|
|
20
16
|
return new ReadableStream({
|
|
21
17
|
start(controller) {
|
|
22
|
-
readStream.on("data", (chunk) => {
|
|
18
|
+
readStream.on("data", (chunk: Buffer) => {
|
|
23
19
|
controller.enqueue(chunk);
|
|
24
20
|
});
|
|
25
21
|
readStream.on("end", () => {
|
|
26
22
|
controller.close();
|
|
27
23
|
});
|
|
28
|
-
readStream.on("error", (err) => {
|
|
24
|
+
readStream.on("error", (err: Error) => {
|
|
29
25
|
controller.error(err);
|
|
30
26
|
});
|
|
31
27
|
},
|
|
@@ -35,24 +31,21 @@ function convertReadStreamToReadableStream(readStream) {
|
|
|
35
31
|
});
|
|
36
32
|
}
|
|
37
33
|
|
|
38
|
-
const sites = new Command("sites").description(commandDescriptions['sites'] ?? '').configureHelp({
|
|
34
|
+
export const sites = new Command("sites").description(commandDescriptions['sites'] ?? '').configureHelp({
|
|
39
35
|
helpWidth: process.stdout.columns || 80
|
|
40
36
|
})
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
* @param {SitesListRequestParams} params
|
|
54
|
-
*/
|
|
55
|
-
const sitesList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
38
|
+
interface SitesListRequestParams {
|
|
39
|
+
queries?: string[];
|
|
40
|
+
search?: string;
|
|
41
|
+
total?: boolean;
|
|
42
|
+
overrideForCli?: boolean;
|
|
43
|
+
parseOutput?: boolean;
|
|
44
|
+
sdk?: Client;
|
|
45
|
+
console?: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const sitesList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: SitesListRequestParams): Promise<any> => {
|
|
56
49
|
let client = !sdk ? await sdkForProject() :
|
|
57
50
|
sdk;
|
|
58
51
|
let apiPath = '/sites';
|
|
@@ -73,7 +66,7 @@ const sitesList = async ({queries,search,total,parseOutput = true, overrideForCl
|
|
|
73
66
|
}, payload);
|
|
74
67
|
|
|
75
68
|
if (parseOutput) {
|
|
76
|
-
if(
|
|
69
|
+
if(showConsole) {
|
|
77
70
|
showConsoleLink('sites', 'list');
|
|
78
71
|
} else {
|
|
79
72
|
parse(response)
|
|
@@ -83,35 +76,31 @@ const sitesList = async ({queries,search,total,parseOutput = true, overrideForCl
|
|
|
83
76
|
return response;
|
|
84
77
|
|
|
85
78
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* @param {SitesCreateRequestParams} params
|
|
113
|
-
*/
|
|
114
|
-
const sitesCreate = async ({siteId,name,framework,buildRuntime,enabled,logging,timeout,installCommand,buildCommand,outputDirectory,adapter,installationId,fallbackFile,providerRepositoryId,providerBranch,providerSilentMode,providerRootDirectory,specification,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
79
|
+
interface SitesCreateRequestParams {
|
|
80
|
+
siteId: string;
|
|
81
|
+
name: string;
|
|
82
|
+
framework: Framework;
|
|
83
|
+
buildRuntime: BuildRuntime;
|
|
84
|
+
enabled?: boolean;
|
|
85
|
+
logging?: boolean;
|
|
86
|
+
timeout?: number;
|
|
87
|
+
installCommand?: string;
|
|
88
|
+
buildCommand?: string;
|
|
89
|
+
outputDirectory?: string;
|
|
90
|
+
adapter?: Adapter;
|
|
91
|
+
installationId?: string;
|
|
92
|
+
fallbackFile?: string;
|
|
93
|
+
providerRepositoryId?: string;
|
|
94
|
+
providerBranch?: string;
|
|
95
|
+
providerSilentMode?: boolean;
|
|
96
|
+
providerRootDirectory?: string;
|
|
97
|
+
specification?: string;
|
|
98
|
+
overrideForCli?: boolean;
|
|
99
|
+
parseOutput?: boolean;
|
|
100
|
+
sdk?: Client;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export const sitesCreate = async ({siteId,name,framework,buildRuntime,enabled,logging,timeout,installCommand,buildCommand,outputDirectory,adapter,installationId,fallbackFile,providerRepositoryId,providerBranch,providerSilentMode,providerRootDirectory,specification,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesCreateRequestParams): Promise<any> => {
|
|
115
104
|
let client = !sdk ? await sdkForProject() :
|
|
116
105
|
sdk;
|
|
117
106
|
let apiPath = '/sites';
|
|
@@ -184,17 +173,14 @@ const sitesCreate = async ({siteId,name,framework,buildRuntime,enabled,logging,t
|
|
|
184
173
|
return response;
|
|
185
174
|
|
|
186
175
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
* @param {SitesListFrameworksRequestParams} params
|
|
196
|
-
*/
|
|
197
|
-
const sitesListFrameworks = async ({parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
176
|
+
interface SitesListFrameworksRequestParams {
|
|
177
|
+
overrideForCli?: boolean;
|
|
178
|
+
parseOutput?: boolean;
|
|
179
|
+
sdk?: Client;
|
|
180
|
+
console?: boolean;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export const sitesListFrameworks = async ({parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: SitesListFrameworksRequestParams): Promise<any> => {
|
|
198
184
|
let client = !sdk ? await sdkForProject() :
|
|
199
185
|
sdk;
|
|
200
186
|
let apiPath = '/sites/frameworks';
|
|
@@ -206,7 +192,7 @@ const sitesListFrameworks = async ({parseOutput = true, overrideForCli = false,
|
|
|
206
192
|
}, payload);
|
|
207
193
|
|
|
208
194
|
if (parseOutput) {
|
|
209
|
-
if(
|
|
195
|
+
if(showConsole) {
|
|
210
196
|
showConsoleLink('sites', 'listFrameworks');
|
|
211
197
|
} else {
|
|
212
198
|
parse(response)
|
|
@@ -216,17 +202,14 @@ const sitesListFrameworks = async ({parseOutput = true, overrideForCli = false,
|
|
|
216
202
|
return response;
|
|
217
203
|
|
|
218
204
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
* @param {SitesListSpecificationsRequestParams} params
|
|
228
|
-
*/
|
|
229
|
-
const sitesListSpecifications = async ({parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
205
|
+
interface SitesListSpecificationsRequestParams {
|
|
206
|
+
overrideForCli?: boolean;
|
|
207
|
+
parseOutput?: boolean;
|
|
208
|
+
sdk?: Client;
|
|
209
|
+
console?: boolean;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export const sitesListSpecifications = async ({parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: SitesListSpecificationsRequestParams): Promise<any> => {
|
|
230
213
|
let client = !sdk ? await sdkForProject() :
|
|
231
214
|
sdk;
|
|
232
215
|
let apiPath = '/sites/specifications';
|
|
@@ -238,7 +221,7 @@ const sitesListSpecifications = async ({parseOutput = true, overrideForCli = fal
|
|
|
238
221
|
}, payload);
|
|
239
222
|
|
|
240
223
|
if (parseOutput) {
|
|
241
|
-
if(
|
|
224
|
+
if(showConsole) {
|
|
242
225
|
showConsoleLink('sites', 'listSpecifications');
|
|
243
226
|
} else {
|
|
244
227
|
parse(response)
|
|
@@ -248,21 +231,18 @@ const sitesListSpecifications = async ({parseOutput = true, overrideForCli = fal
|
|
|
248
231
|
return response;
|
|
249
232
|
|
|
250
233
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
* @param {SitesListTemplatesRequestParams} params
|
|
264
|
-
*/
|
|
265
|
-
const sitesListTemplates = async ({frameworks,useCases,limit,offset,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
234
|
+
interface SitesListTemplatesRequestParams {
|
|
235
|
+
frameworks?: string[];
|
|
236
|
+
useCases?: string[];
|
|
237
|
+
limit?: number;
|
|
238
|
+
offset?: number;
|
|
239
|
+
overrideForCli?: boolean;
|
|
240
|
+
parseOutput?: boolean;
|
|
241
|
+
sdk?: Client;
|
|
242
|
+
console?: boolean;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export const sitesListTemplates = async ({frameworks,useCases,limit,offset,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: SitesListTemplatesRequestParams): Promise<any> => {
|
|
266
246
|
let client = !sdk ? await sdkForProject() :
|
|
267
247
|
sdk;
|
|
268
248
|
let apiPath = '/sites/templates';
|
|
@@ -286,7 +266,7 @@ const sitesListTemplates = async ({frameworks,useCases,limit,offset,parseOutput
|
|
|
286
266
|
}, payload);
|
|
287
267
|
|
|
288
268
|
if (parseOutput) {
|
|
289
|
-
if(
|
|
269
|
+
if(showConsole) {
|
|
290
270
|
showConsoleLink('sites', 'listTemplates');
|
|
291
271
|
} else {
|
|
292
272
|
parse(response)
|
|
@@ -296,18 +276,15 @@ const sitesListTemplates = async ({frameworks,useCases,limit,offset,parseOutput
|
|
|
296
276
|
return response;
|
|
297
277
|
|
|
298
278
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
* @param {SitesGetTemplateRequestParams} params
|
|
309
|
-
*/
|
|
310
|
-
const sitesGetTemplate = async ({templateId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
279
|
+
interface SitesGetTemplateRequestParams {
|
|
280
|
+
templateId: string;
|
|
281
|
+
overrideForCli?: boolean;
|
|
282
|
+
parseOutput?: boolean;
|
|
283
|
+
sdk?: Client;
|
|
284
|
+
console?: boolean;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export const sitesGetTemplate = async ({templateId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: SitesGetTemplateRequestParams): Promise<any> => {
|
|
311
288
|
let client = !sdk ? await sdkForProject() :
|
|
312
289
|
sdk;
|
|
313
290
|
let apiPath = '/sites/templates/{templateId}'.replace('{templateId}', templateId);
|
|
@@ -319,7 +296,7 @@ const sitesGetTemplate = async ({templateId,parseOutput = true, overrideForCli =
|
|
|
319
296
|
}, payload);
|
|
320
297
|
|
|
321
298
|
if (parseOutput) {
|
|
322
|
-
if(
|
|
299
|
+
if(showConsole) {
|
|
323
300
|
showConsoleLink('sites', 'getTemplate', templateId);
|
|
324
301
|
} else {
|
|
325
302
|
parse(response)
|
|
@@ -329,18 +306,15 @@ const sitesGetTemplate = async ({templateId,parseOutput = true, overrideForCli =
|
|
|
329
306
|
return response;
|
|
330
307
|
|
|
331
308
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
* @param {SitesListUsageRequestParams} params
|
|
342
|
-
*/
|
|
343
|
-
const sitesListUsage = async ({range,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
309
|
+
interface SitesListUsageRequestParams {
|
|
310
|
+
range?: UsageRange;
|
|
311
|
+
overrideForCli?: boolean;
|
|
312
|
+
parseOutput?: boolean;
|
|
313
|
+
sdk?: Client;
|
|
314
|
+
console?: boolean;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export const sitesListUsage = async ({range,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: SitesListUsageRequestParams): Promise<any> => {
|
|
344
318
|
let client = !sdk ? await sdkForProject() :
|
|
345
319
|
sdk;
|
|
346
320
|
let apiPath = '/sites/usage';
|
|
@@ -355,7 +329,7 @@ const sitesListUsage = async ({range,parseOutput = true, overrideForCli = false,
|
|
|
355
329
|
}, payload);
|
|
356
330
|
|
|
357
331
|
if (parseOutput) {
|
|
358
|
-
if(
|
|
332
|
+
if(showConsole) {
|
|
359
333
|
showConsoleLink('sites', 'listUsage');
|
|
360
334
|
} else {
|
|
361
335
|
parse(response)
|
|
@@ -365,18 +339,15 @@ const sitesListUsage = async ({range,parseOutput = true, overrideForCli = false,
|
|
|
365
339
|
return response;
|
|
366
340
|
|
|
367
341
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
* @param {SitesGetRequestParams} params
|
|
378
|
-
*/
|
|
379
|
-
const sitesGet = async ({siteId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
342
|
+
interface SitesGetRequestParams {
|
|
343
|
+
siteId: string;
|
|
344
|
+
overrideForCli?: boolean;
|
|
345
|
+
parseOutput?: boolean;
|
|
346
|
+
sdk?: Client;
|
|
347
|
+
console?: boolean;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export const sitesGet = async ({siteId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: SitesGetRequestParams): Promise<any> => {
|
|
380
351
|
let client = !sdk ? await sdkForProject() :
|
|
381
352
|
sdk;
|
|
382
353
|
let apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
|
|
@@ -388,7 +359,7 @@ const sitesGet = async ({siteId,parseOutput = true, overrideForCli = false, sdk
|
|
|
388
359
|
}, payload);
|
|
389
360
|
|
|
390
361
|
if (parseOutput) {
|
|
391
|
-
if(
|
|
362
|
+
if(showConsole) {
|
|
392
363
|
showConsoleLink('sites', 'get', siteId);
|
|
393
364
|
} else {
|
|
394
365
|
parse(response)
|
|
@@ -398,35 +369,31 @@ const sitesGet = async ({siteId,parseOutput = true, overrideForCli = false, sdk
|
|
|
398
369
|
return response;
|
|
399
370
|
|
|
400
371
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* @param {SitesUpdateRequestParams} params
|
|
428
|
-
*/
|
|
429
|
-
const sitesUpdate = async ({siteId,name,framework,enabled,logging,timeout,installCommand,buildCommand,outputDirectory,buildRuntime,adapter,fallbackFile,installationId,providerRepositoryId,providerBranch,providerSilentMode,providerRootDirectory,specification,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
372
|
+
interface SitesUpdateRequestParams {
|
|
373
|
+
siteId: string;
|
|
374
|
+
name: string;
|
|
375
|
+
framework: Framework;
|
|
376
|
+
enabled?: boolean;
|
|
377
|
+
logging?: boolean;
|
|
378
|
+
timeout?: number;
|
|
379
|
+
installCommand?: string;
|
|
380
|
+
buildCommand?: string;
|
|
381
|
+
outputDirectory?: string;
|
|
382
|
+
buildRuntime?: BuildRuntime;
|
|
383
|
+
adapter?: Adapter;
|
|
384
|
+
fallbackFile?: string;
|
|
385
|
+
installationId?: string;
|
|
386
|
+
providerRepositoryId?: string;
|
|
387
|
+
providerBranch?: string;
|
|
388
|
+
providerSilentMode?: boolean;
|
|
389
|
+
providerRootDirectory?: string;
|
|
390
|
+
specification?: string;
|
|
391
|
+
overrideForCli?: boolean;
|
|
392
|
+
parseOutput?: boolean;
|
|
393
|
+
sdk?: Client;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export const sitesUpdate = async ({siteId,name,framework,enabled,logging,timeout,installCommand,buildCommand,outputDirectory,buildRuntime,adapter,fallbackFile,installationId,providerRepositoryId,providerBranch,providerSilentMode,providerRootDirectory,specification,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesUpdateRequestParams): Promise<any> => {
|
|
430
397
|
let client = !sdk ? await sdkForProject() :
|
|
431
398
|
sdk;
|
|
432
399
|
let apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
|
|
@@ -496,18 +463,14 @@ const sitesUpdate = async ({siteId,name,framework,enabled,logging,timeout,instal
|
|
|
496
463
|
return response;
|
|
497
464
|
|
|
498
465
|
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
/**
|
|
508
|
-
* @param {SitesDeleteRequestParams} params
|
|
509
|
-
*/
|
|
510
|
-
const sitesDelete = async ({siteId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
466
|
+
interface SitesDeleteRequestParams {
|
|
467
|
+
siteId: string;
|
|
468
|
+
overrideForCli?: boolean;
|
|
469
|
+
parseOutput?: boolean;
|
|
470
|
+
sdk?: Client;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export const sitesDelete = async ({siteId,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesDeleteRequestParams): Promise<any> => {
|
|
511
474
|
let client = !sdk ? await sdkForProject() :
|
|
512
475
|
sdk;
|
|
513
476
|
let apiPath = '/sites/{siteId}'.replace('{siteId}', siteId);
|
|
@@ -526,19 +489,15 @@ const sitesDelete = async ({siteId,parseOutput = true, overrideForCli = false, s
|
|
|
526
489
|
return response;
|
|
527
490
|
|
|
528
491
|
}
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* @param {SitesUpdateSiteDeploymentRequestParams} params
|
|
540
|
-
*/
|
|
541
|
-
const sitesUpdateSiteDeployment = async ({siteId,deploymentId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
492
|
+
interface SitesUpdateSiteDeploymentRequestParams {
|
|
493
|
+
siteId: string;
|
|
494
|
+
deploymentId: string;
|
|
495
|
+
overrideForCli?: boolean;
|
|
496
|
+
parseOutput?: boolean;
|
|
497
|
+
sdk?: Client;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export const sitesUpdateSiteDeployment = async ({siteId,deploymentId,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesUpdateSiteDeploymentRequestParams): Promise<any> => {
|
|
542
501
|
let client = !sdk ? await sdkForProject() :
|
|
543
502
|
sdk;
|
|
544
503
|
let apiPath = '/sites/{siteId}/deployment'.replace('{siteId}', siteId);
|
|
@@ -560,21 +519,18 @@ const sitesUpdateSiteDeployment = async ({siteId,deploymentId,parseOutput = true
|
|
|
560
519
|
return response;
|
|
561
520
|
|
|
562
521
|
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
* @param {SitesListDeploymentsRequestParams} params
|
|
576
|
-
*/
|
|
577
|
-
const sitesListDeployments = async ({siteId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
522
|
+
interface SitesListDeploymentsRequestParams {
|
|
523
|
+
siteId: string;
|
|
524
|
+
queries?: string[];
|
|
525
|
+
search?: string;
|
|
526
|
+
total?: boolean;
|
|
527
|
+
overrideForCli?: boolean;
|
|
528
|
+
parseOutput?: boolean;
|
|
529
|
+
sdk?: Client;
|
|
530
|
+
console?: boolean;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export const sitesListDeployments = async ({siteId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: SitesListDeploymentsRequestParams): Promise<any> => {
|
|
578
534
|
let client = !sdk ? await sdkForProject() :
|
|
579
535
|
sdk;
|
|
580
536
|
let apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);
|
|
@@ -595,7 +551,7 @@ const sitesListDeployments = async ({siteId,queries,search,total,parseOutput = t
|
|
|
595
551
|
}, payload);
|
|
596
552
|
|
|
597
553
|
if (parseOutput) {
|
|
598
|
-
if(
|
|
554
|
+
if(showConsole) {
|
|
599
555
|
showConsoleLink('sites', 'listDeployments', siteId);
|
|
600
556
|
} else {
|
|
601
557
|
parse(response)
|
|
@@ -605,24 +561,20 @@ const sitesListDeployments = async ({siteId,queries,search,total,parseOutput = t
|
|
|
605
561
|
return response;
|
|
606
562
|
|
|
607
563
|
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* @param {SitesCreateDeploymentRequestParams} params
|
|
624
|
-
*/
|
|
625
|
-
const sitesCreateDeployment = async ({siteId,code,activate,installCommand,buildCommand,outputDirectory,parseOutput = true, overrideForCli = false, sdk = undefined,onProgress = () => {}}) => {
|
|
564
|
+
interface SitesCreateDeploymentRequestParams {
|
|
565
|
+
siteId: string;
|
|
566
|
+
code: string;
|
|
567
|
+
activate: boolean;
|
|
568
|
+
installCommand?: string;
|
|
569
|
+
buildCommand?: string;
|
|
570
|
+
outputDirectory?: string;
|
|
571
|
+
overrideForCli?: boolean;
|
|
572
|
+
parseOutput?: boolean;
|
|
573
|
+
sdk?: Client;
|
|
574
|
+
onProgress?: (progress: number) => void;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export const sitesCreateDeployment = async ({siteId,code,activate,installCommand,buildCommand,outputDirectory,parseOutput = true, overrideForCli = false, sdk = undefined,onProgress = () => {}}: SitesCreateDeploymentRequestParams): Promise<any> => {
|
|
626
578
|
let client = !sdk ? await sdkForProject() :
|
|
627
579
|
sdk;
|
|
628
580
|
let apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);
|
|
@@ -773,19 +725,15 @@ const sitesCreateDeployment = async ({siteId,code,activate,installCommand,buildC
|
|
|
773
725
|
|
|
774
726
|
return response;
|
|
775
727
|
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
/**
|
|
786
|
-
* @param {SitesCreateDuplicateDeploymentRequestParams} params
|
|
787
|
-
*/
|
|
788
|
-
const sitesCreateDuplicateDeployment = async ({siteId,deploymentId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
728
|
+
interface SitesCreateDuplicateDeploymentRequestParams {
|
|
729
|
+
siteId: string;
|
|
730
|
+
deploymentId: string;
|
|
731
|
+
overrideForCli?: boolean;
|
|
732
|
+
parseOutput?: boolean;
|
|
733
|
+
sdk?: Client;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
export const sitesCreateDuplicateDeployment = async ({siteId,deploymentId,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesCreateDuplicateDeploymentRequestParams): Promise<any> => {
|
|
789
737
|
let client = !sdk ? await sdkForProject() :
|
|
790
738
|
sdk;
|
|
791
739
|
let apiPath = '/sites/{siteId}/deployments/duplicate'.replace('{siteId}', siteId);
|
|
@@ -807,24 +755,20 @@ const sitesCreateDuplicateDeployment = async ({siteId,deploymentId,parseOutput =
|
|
|
807
755
|
return response;
|
|
808
756
|
|
|
809
757
|
}
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* @param {SitesCreateTemplateDeploymentRequestParams} params
|
|
826
|
-
*/
|
|
827
|
-
const sitesCreateTemplateDeployment = async ({siteId,repository,owner,rootDirectory,type,reference,activate,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
758
|
+
interface SitesCreateTemplateDeploymentRequestParams {
|
|
759
|
+
siteId: string;
|
|
760
|
+
repository: string;
|
|
761
|
+
owner: string;
|
|
762
|
+
rootDirectory: string;
|
|
763
|
+
type: TemplateReferenceType;
|
|
764
|
+
reference: string;
|
|
765
|
+
activate?: boolean;
|
|
766
|
+
overrideForCli?: boolean;
|
|
767
|
+
parseOutput?: boolean;
|
|
768
|
+
sdk?: Client;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
export const sitesCreateTemplateDeployment = async ({siteId,repository,owner,rootDirectory,type,reference,activate,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesCreateTemplateDeploymentRequestParams): Promise<any> => {
|
|
828
772
|
let client = !sdk ? await sdkForProject() :
|
|
829
773
|
sdk;
|
|
830
774
|
let apiPath = '/sites/{siteId}/deployments/template'.replace('{siteId}', siteId);
|
|
@@ -861,21 +805,17 @@ const sitesCreateTemplateDeployment = async ({siteId,repository,owner,rootDirect
|
|
|
861
805
|
return response;
|
|
862
806
|
|
|
863
807
|
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
/**
|
|
876
|
-
* @param {SitesCreateVcsDeploymentRequestParams} params
|
|
877
|
-
*/
|
|
878
|
-
const sitesCreateVcsDeployment = async ({siteId,type,reference,activate,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
808
|
+
interface SitesCreateVcsDeploymentRequestParams {
|
|
809
|
+
siteId: string;
|
|
810
|
+
type: VCSReferenceType;
|
|
811
|
+
reference: string;
|
|
812
|
+
activate?: boolean;
|
|
813
|
+
overrideForCli?: boolean;
|
|
814
|
+
parseOutput?: boolean;
|
|
815
|
+
sdk?: Client;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
export const sitesCreateVcsDeployment = async ({siteId,type,reference,activate,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesCreateVcsDeploymentRequestParams): Promise<any> => {
|
|
879
819
|
let client = !sdk ? await sdkForProject() :
|
|
880
820
|
sdk;
|
|
881
821
|
let apiPath = '/sites/{siteId}/deployments/vcs'.replace('{siteId}', siteId);
|
|
@@ -903,19 +843,16 @@ const sitesCreateVcsDeployment = async ({siteId,type,reference,activate,parseOut
|
|
|
903
843
|
return response;
|
|
904
844
|
|
|
905
845
|
}
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
* @param {SitesGetDeploymentRequestParams} params
|
|
917
|
-
*/
|
|
918
|
-
const sitesGetDeployment = async ({siteId,deploymentId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
846
|
+
interface SitesGetDeploymentRequestParams {
|
|
847
|
+
siteId: string;
|
|
848
|
+
deploymentId: string;
|
|
849
|
+
overrideForCli?: boolean;
|
|
850
|
+
parseOutput?: boolean;
|
|
851
|
+
sdk?: Client;
|
|
852
|
+
console?: boolean;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
export const sitesGetDeployment = async ({siteId,deploymentId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: SitesGetDeploymentRequestParams): Promise<any> => {
|
|
919
856
|
let client = !sdk ? await sdkForProject() :
|
|
920
857
|
sdk;
|
|
921
858
|
let apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
@@ -927,7 +864,7 @@ const sitesGetDeployment = async ({siteId,deploymentId,parseOutput = true, overr
|
|
|
927
864
|
}, payload);
|
|
928
865
|
|
|
929
866
|
if (parseOutput) {
|
|
930
|
-
if(
|
|
867
|
+
if(showConsole) {
|
|
931
868
|
showConsoleLink('sites', 'getDeployment', siteId, deploymentId);
|
|
932
869
|
} else {
|
|
933
870
|
parse(response)
|
|
@@ -937,19 +874,15 @@ const sitesGetDeployment = async ({siteId,deploymentId,parseOutput = true, overr
|
|
|
937
874
|
return response;
|
|
938
875
|
|
|
939
876
|
}
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
/**
|
|
950
|
-
* @param {SitesDeleteDeploymentRequestParams} params
|
|
951
|
-
*/
|
|
952
|
-
const sitesDeleteDeployment = async ({siteId,deploymentId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
877
|
+
interface SitesDeleteDeploymentRequestParams {
|
|
878
|
+
siteId: string;
|
|
879
|
+
deploymentId: string;
|
|
880
|
+
overrideForCli?: boolean;
|
|
881
|
+
parseOutput?: boolean;
|
|
882
|
+
sdk?: Client;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
export const sitesDeleteDeployment = async ({siteId,deploymentId,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesDeleteDeploymentRequestParams): Promise<any> => {
|
|
953
886
|
let client = !sdk ? await sdkForProject() :
|
|
954
887
|
sdk;
|
|
955
888
|
let apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
@@ -968,21 +901,18 @@ const sitesDeleteDeployment = async ({siteId,deploymentId,parseOutput = true, ov
|
|
|
968
901
|
return response;
|
|
969
902
|
|
|
970
903
|
}
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
* @param {SitesGetDeploymentDownloadRequestParams} params
|
|
984
|
-
*/
|
|
985
|
-
const sitesGetDeploymentDownload = async ({siteId,deploymentId,type,parseOutput = true, overrideForCli = false, sdk = undefined, destination, console}) => {
|
|
904
|
+
interface SitesGetDeploymentDownloadRequestParams {
|
|
905
|
+
siteId: string;
|
|
906
|
+
deploymentId: string;
|
|
907
|
+
type?: DeploymentDownloadType;
|
|
908
|
+
overrideForCli?: boolean;
|
|
909
|
+
parseOutput?: boolean;
|
|
910
|
+
sdk?: Client;
|
|
911
|
+
destination?: string;
|
|
912
|
+
console?: boolean;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
export const sitesGetDeploymentDownload = async ({siteId,deploymentId,type,parseOutput = true, overrideForCli = false, sdk = undefined, destination, console: showConsole}: SitesGetDeploymentDownloadRequestParams): Promise<any> => {
|
|
986
916
|
let client = !sdk ? await sdkForProject() :
|
|
987
917
|
sdk;
|
|
988
918
|
let apiPath = '/sites/{siteId}/deployments/{deploymentId}/download'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
@@ -1008,7 +938,7 @@ const sitesGetDeploymentDownload = async ({siteId,deploymentId,type,parseOutput
|
|
|
1008
938
|
|
|
1009
939
|
fs.writeFileSync(destination, response);
|
|
1010
940
|
if (parseOutput) {
|
|
1011
|
-
if(
|
|
941
|
+
if(showConsole) {
|
|
1012
942
|
showConsoleLink('sites', 'getDeploymentDownload', siteId, deploymentId);
|
|
1013
943
|
} else {
|
|
1014
944
|
parse(response)
|
|
@@ -1018,19 +948,15 @@ const sitesGetDeploymentDownload = async ({siteId,deploymentId,type,parseOutput
|
|
|
1018
948
|
return response;
|
|
1019
949
|
|
|
1020
950
|
}
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
/**
|
|
1031
|
-
* @param {SitesUpdateDeploymentStatusRequestParams} params
|
|
1032
|
-
*/
|
|
1033
|
-
const sitesUpdateDeploymentStatus = async ({siteId,deploymentId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
951
|
+
interface SitesUpdateDeploymentStatusRequestParams {
|
|
952
|
+
siteId: string;
|
|
953
|
+
deploymentId: string;
|
|
954
|
+
overrideForCli?: boolean;
|
|
955
|
+
parseOutput?: boolean;
|
|
956
|
+
sdk?: Client;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
export const sitesUpdateDeploymentStatus = async ({siteId,deploymentId,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesUpdateDeploymentStatusRequestParams): Promise<any> => {
|
|
1034
960
|
let client = !sdk ? await sdkForProject() :
|
|
1035
961
|
sdk;
|
|
1036
962
|
let apiPath = '/sites/{siteId}/deployments/{deploymentId}/status'.replace('{siteId}', siteId).replace('{deploymentId}', deploymentId);
|
|
@@ -1049,20 +975,16 @@ const sitesUpdateDeploymentStatus = async ({siteId,deploymentId,parseOutput = tr
|
|
|
1049
975
|
return response;
|
|
1050
976
|
|
|
1051
977
|
}
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
/**
|
|
1063
|
-
* @param {SitesListLogsRequestParams} params
|
|
1064
|
-
*/
|
|
1065
|
-
const sitesListLogs = async ({siteId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
978
|
+
interface SitesListLogsRequestParams {
|
|
979
|
+
siteId: string;
|
|
980
|
+
queries?: string[];
|
|
981
|
+
total?: boolean;
|
|
982
|
+
overrideForCli?: boolean;
|
|
983
|
+
parseOutput?: boolean;
|
|
984
|
+
sdk?: Client;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
export const sitesListLogs = async ({siteId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesListLogsRequestParams): Promise<any> => {
|
|
1066
988
|
let client = !sdk ? await sdkForProject() :
|
|
1067
989
|
sdk;
|
|
1068
990
|
let apiPath = '/sites/{siteId}/logs'.replace('{siteId}', siteId);
|
|
@@ -1086,19 +1008,16 @@ const sitesListLogs = async ({siteId,queries,total,parseOutput = true, overrideF
|
|
|
1086
1008
|
return response;
|
|
1087
1009
|
|
|
1088
1010
|
}
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
* @param {SitesGetLogRequestParams} params
|
|
1100
|
-
*/
|
|
1101
|
-
const sitesGetLog = async ({siteId,logId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
1011
|
+
interface SitesGetLogRequestParams {
|
|
1012
|
+
siteId: string;
|
|
1013
|
+
logId: string;
|
|
1014
|
+
overrideForCli?: boolean;
|
|
1015
|
+
parseOutput?: boolean;
|
|
1016
|
+
sdk?: Client;
|
|
1017
|
+
console?: boolean;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
export const sitesGetLog = async ({siteId,logId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: SitesGetLogRequestParams): Promise<any> => {
|
|
1102
1021
|
let client = !sdk ? await sdkForProject() :
|
|
1103
1022
|
sdk;
|
|
1104
1023
|
let apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId);
|
|
@@ -1110,7 +1029,7 @@ const sitesGetLog = async ({siteId,logId,parseOutput = true, overrideForCli = fa
|
|
|
1110
1029
|
}, payload);
|
|
1111
1030
|
|
|
1112
1031
|
if (parseOutput) {
|
|
1113
|
-
if(
|
|
1032
|
+
if(showConsole) {
|
|
1114
1033
|
showConsoleLink('sites', 'getLog', siteId, logId);
|
|
1115
1034
|
} else {
|
|
1116
1035
|
parse(response)
|
|
@@ -1120,19 +1039,15 @@ const sitesGetLog = async ({siteId,logId,parseOutput = true, overrideForCli = fa
|
|
|
1120
1039
|
return response;
|
|
1121
1040
|
|
|
1122
1041
|
}
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
/**
|
|
1133
|
-
* @param {SitesDeleteLogRequestParams} params
|
|
1134
|
-
*/
|
|
1135
|
-
const sitesDeleteLog = async ({siteId,logId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1042
|
+
interface SitesDeleteLogRequestParams {
|
|
1043
|
+
siteId: string;
|
|
1044
|
+
logId: string;
|
|
1045
|
+
overrideForCli?: boolean;
|
|
1046
|
+
parseOutput?: boolean;
|
|
1047
|
+
sdk?: Client;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
export const sitesDeleteLog = async ({siteId,logId,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesDeleteLogRequestParams): Promise<any> => {
|
|
1136
1051
|
let client = !sdk ? await sdkForProject() :
|
|
1137
1052
|
sdk;
|
|
1138
1053
|
let apiPath = '/sites/{siteId}/logs/{logId}'.replace('{siteId}', siteId).replace('{logId}', logId);
|
|
@@ -1151,19 +1066,15 @@ const sitesDeleteLog = async ({siteId,logId,parseOutput = true, overrideForCli =
|
|
|
1151
1066
|
return response;
|
|
1152
1067
|
|
|
1153
1068
|
}
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
/**
|
|
1164
|
-
* @param {SitesGetUsageRequestParams} params
|
|
1165
|
-
*/
|
|
1166
|
-
const sitesGetUsage = async ({siteId,range,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1069
|
+
interface SitesGetUsageRequestParams {
|
|
1070
|
+
siteId: string;
|
|
1071
|
+
range?: UsageRange;
|
|
1072
|
+
overrideForCli?: boolean;
|
|
1073
|
+
parseOutput?: boolean;
|
|
1074
|
+
sdk?: Client;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
export const sitesGetUsage = async ({siteId,range,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesGetUsageRequestParams): Promise<any> => {
|
|
1167
1078
|
let client = !sdk ? await sdkForProject() :
|
|
1168
1079
|
sdk;
|
|
1169
1080
|
let apiPath = '/sites/{siteId}/usage'.replace('{siteId}', siteId);
|
|
@@ -1184,18 +1095,14 @@ const sitesGetUsage = async ({siteId,range,parseOutput = true, overrideForCli =
|
|
|
1184
1095
|
return response;
|
|
1185
1096
|
|
|
1186
1097
|
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
/**
|
|
1196
|
-
* @param {SitesListVariablesRequestParams} params
|
|
1197
|
-
*/
|
|
1198
|
-
const sitesListVariables = async ({siteId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1098
|
+
interface SitesListVariablesRequestParams {
|
|
1099
|
+
siteId: string;
|
|
1100
|
+
overrideForCli?: boolean;
|
|
1101
|
+
parseOutput?: boolean;
|
|
1102
|
+
sdk?: Client;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
export const sitesListVariables = async ({siteId,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesListVariablesRequestParams): Promise<any> => {
|
|
1199
1106
|
let client = !sdk ? await sdkForProject() :
|
|
1200
1107
|
sdk;
|
|
1201
1108
|
let apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId);
|
|
@@ -1213,21 +1120,17 @@ const sitesListVariables = async ({siteId,parseOutput = true, overrideForCli = f
|
|
|
1213
1120
|
return response;
|
|
1214
1121
|
|
|
1215
1122
|
}
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
/**
|
|
1228
|
-
* @param {SitesCreateVariableRequestParams} params
|
|
1229
|
-
*/
|
|
1230
|
-
const sitesCreateVariable = async ({siteId,key,value,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1123
|
+
interface SitesCreateVariableRequestParams {
|
|
1124
|
+
siteId: string;
|
|
1125
|
+
key: string;
|
|
1126
|
+
value: string;
|
|
1127
|
+
secret?: boolean;
|
|
1128
|
+
overrideForCli?: boolean;
|
|
1129
|
+
parseOutput?: boolean;
|
|
1130
|
+
sdk?: Client;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
export const sitesCreateVariable = async ({siteId,key,value,secret,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesCreateVariableRequestParams): Promise<any> => {
|
|
1231
1134
|
let client = !sdk ? await sdkForProject() :
|
|
1232
1135
|
sdk;
|
|
1233
1136
|
let apiPath = '/sites/{siteId}/variables'.replace('{siteId}', siteId);
|
|
@@ -1255,19 +1158,15 @@ const sitesCreateVariable = async ({siteId,key,value,secret,parseOutput = true,
|
|
|
1255
1158
|
return response;
|
|
1256
1159
|
|
|
1257
1160
|
}
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
/**
|
|
1268
|
-
* @param {SitesGetVariableRequestParams} params
|
|
1269
|
-
*/
|
|
1270
|
-
const sitesGetVariable = async ({siteId,variableId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1161
|
+
interface SitesGetVariableRequestParams {
|
|
1162
|
+
siteId: string;
|
|
1163
|
+
variableId: string;
|
|
1164
|
+
overrideForCli?: boolean;
|
|
1165
|
+
parseOutput?: boolean;
|
|
1166
|
+
sdk?: Client;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
export const sitesGetVariable = async ({siteId,variableId,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesGetVariableRequestParams): Promise<any> => {
|
|
1271
1170
|
let client = !sdk ? await sdkForProject() :
|
|
1272
1171
|
sdk;
|
|
1273
1172
|
let apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
|
|
@@ -1285,22 +1184,18 @@ const sitesGetVariable = async ({siteId,variableId,parseOutput = true, overrideF
|
|
|
1285
1184
|
return response;
|
|
1286
1185
|
|
|
1287
1186
|
}
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
/**
|
|
1301
|
-
* @param {SitesUpdateVariableRequestParams} params
|
|
1302
|
-
*/
|
|
1303
|
-
const sitesUpdateVariable = async ({siteId,variableId,key,value,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1187
|
+
interface SitesUpdateVariableRequestParams {
|
|
1188
|
+
siteId: string;
|
|
1189
|
+
variableId: string;
|
|
1190
|
+
key: string;
|
|
1191
|
+
value?: string;
|
|
1192
|
+
secret?: boolean;
|
|
1193
|
+
overrideForCli?: boolean;
|
|
1194
|
+
parseOutput?: boolean;
|
|
1195
|
+
sdk?: Client;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
export const sitesUpdateVariable = async ({siteId,variableId,key,value,secret,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesUpdateVariableRequestParams): Promise<any> => {
|
|
1304
1199
|
let client = !sdk ? await sdkForProject() :
|
|
1305
1200
|
sdk;
|
|
1306
1201
|
let apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
|
|
@@ -1328,19 +1223,15 @@ const sitesUpdateVariable = async ({siteId,variableId,key,value,secret,parseOutp
|
|
|
1328
1223
|
return response;
|
|
1329
1224
|
|
|
1330
1225
|
}
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
/**
|
|
1341
|
-
* @param {SitesDeleteVariableRequestParams} params
|
|
1342
|
-
*/
|
|
1343
|
-
const sitesDeleteVariable = async ({siteId,variableId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1226
|
+
interface SitesDeleteVariableRequestParams {
|
|
1227
|
+
siteId: string;
|
|
1228
|
+
variableId: string;
|
|
1229
|
+
overrideForCli?: boolean;
|
|
1230
|
+
parseOutput?: boolean;
|
|
1231
|
+
sdk?: Client;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
export const sitesDeleteVariable = async ({siteId,variableId,parseOutput = true, overrideForCli = false, sdk = undefined}: SitesDeleteVariableRequestParams): Promise<any> => {
|
|
1344
1235
|
let client = !sdk ? await sdkForProject() :
|
|
1345
1236
|
sdk;
|
|
1346
1237
|
let apiPath = '/sites/{siteId}/variables/{variableId}'.replace('{siteId}', siteId).replace('{variableId}', variableId);
|
|
@@ -1364,7 +1255,7 @@ sites
|
|
|
1364
1255
|
.description(`Get a list of all the project's sites. You can use the query params to filter your results.`)
|
|
1365
1256
|
.option(`--queries [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: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId`)
|
|
1366
1257
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
1367
|
-
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
1258
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1368
1259
|
.option(`--console`, `Get the resource console url`)
|
|
1369
1260
|
.action(actionRunner(sitesList))
|
|
1370
1261
|
|
|
@@ -1375,8 +1266,8 @@ sites
|
|
|
1375
1266
|
.requiredOption(`--name <name>`, `Site name. Max length: 128 chars.`)
|
|
1376
1267
|
.requiredOption(`--framework <framework>`, `Sites framework.`)
|
|
1377
1268
|
.requiredOption(`--build-runtime <build-runtime>`, `Runtime to use during build step.`)
|
|
1378
|
-
.option(`--enabled [value]`, `Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
|
|
1379
|
-
.option(`--logging [value]`, `When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`, (value) => value === undefined ? true : parseBool(value))
|
|
1269
|
+
.option(`--enabled [value]`, `Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1270
|
+
.option(`--logging [value]`, `When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1380
1271
|
.option(`--timeout <timeout>`, `Maximum request time in seconds.`, parseInteger)
|
|
1381
1272
|
.option(`--install-command <install-command>`, `Install Command.`)
|
|
1382
1273
|
.option(`--build-command <build-command>`, `Build Command.`)
|
|
@@ -1386,7 +1277,7 @@ sites
|
|
|
1386
1277
|
.option(`--fallback-file <fallback-file>`, `Fallback file for single page application sites.`)
|
|
1387
1278
|
.option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the site.`)
|
|
1388
1279
|
.option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the site.`)
|
|
1389
|
-
.option(`--provider-silent-mode [value]`, `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.`, (value) => value === undefined ? true : parseBool(value))
|
|
1280
|
+
.option(`--provider-silent-mode [value]`, `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.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1390
1281
|
.option(`--provider-root-directory <provider-root-directory>`, `Path to site code in the linked repo.`)
|
|
1391
1282
|
.option(`--specification <specification>`, `Framework specification for the site and builds.`)
|
|
1392
1283
|
.action(actionRunner(sitesCreate))
|
|
@@ -1440,8 +1331,8 @@ sites
|
|
|
1440
1331
|
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
1441
1332
|
.requiredOption(`--name <name>`, `Site name. Max length: 128 chars.`)
|
|
1442
1333
|
.requiredOption(`--framework <framework>`, `Sites framework.`)
|
|
1443
|
-
.option(`--enabled [value]`, `Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
|
|
1444
|
-
.option(`--logging [value]`, `When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`, (value) => value === undefined ? true : parseBool(value))
|
|
1334
|
+
.option(`--enabled [value]`, `Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1335
|
+
.option(`--logging [value]`, `When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1445
1336
|
.option(`--timeout <timeout>`, `Maximum request time in seconds.`, parseInteger)
|
|
1446
1337
|
.option(`--install-command <install-command>`, `Install Command.`)
|
|
1447
1338
|
.option(`--build-command <build-command>`, `Build Command.`)
|
|
@@ -1452,7 +1343,7 @@ sites
|
|
|
1452
1343
|
.option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`)
|
|
1453
1344
|
.option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the site.`)
|
|
1454
1345
|
.option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the site.`)
|
|
1455
|
-
.option(`--provider-silent-mode [value]`, `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.`, (value) => value === undefined ? true : parseBool(value))
|
|
1346
|
+
.option(`--provider-silent-mode [value]`, `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.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1456
1347
|
.option(`--provider-root-directory <provider-root-directory>`, `Path to site code in the linked repo.`)
|
|
1457
1348
|
.option(`--specification <specification>`, `Framework specification for the site and builds.`)
|
|
1458
1349
|
.action(actionRunner(sitesUpdate))
|
|
@@ -1476,7 +1367,7 @@ sites
|
|
|
1476
1367
|
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
1477
1368
|
.option(`--queries [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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type`)
|
|
1478
1369
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
1479
|
-
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
1370
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1480
1371
|
.option(`--console`, `Get the resource console url`)
|
|
1481
1372
|
.action(actionRunner(sitesListDeployments))
|
|
1482
1373
|
|
|
@@ -1485,7 +1376,7 @@ sites
|
|
|
1485
1376
|
.description(`Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.`)
|
|
1486
1377
|
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
1487
1378
|
.requiredOption(`--code <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.`)
|
|
1488
|
-
.requiredOption(`--activate [value]`, `Automatically activate the deployment when it is finished building.`, (value) => value === undefined ? true : parseBool(value))
|
|
1379
|
+
.requiredOption(`--activate [value]`, `Automatically activate the deployment when it is finished building.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1489
1380
|
.option(`--install-command <install-command>`, `Install Commands.`)
|
|
1490
1381
|
.option(`--build-command <build-command>`, `Build Commands.`)
|
|
1491
1382
|
.option(`--output-directory <output-directory>`, `Output Directory.`)
|
|
@@ -1507,7 +1398,7 @@ sites
|
|
|
1507
1398
|
.requiredOption(`--root-directory <root-directory>`, `Path to site code in the template repo.`)
|
|
1508
1399
|
.requiredOption(`--type <type>`, `Type for the reference provided. Can be commit, branch, or tag`)
|
|
1509
1400
|
.requiredOption(`--reference <reference>`, `Reference value, can be a commit hash, branch name, or release tag`)
|
|
1510
|
-
.option(`--activate [value]`, `Automatically activate the deployment when it is finished building.`, (value) => value === undefined ? true : parseBool(value))
|
|
1401
|
+
.option(`--activate [value]`, `Automatically activate the deployment when it is finished building.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1511
1402
|
.action(actionRunner(sitesCreateTemplateDeployment))
|
|
1512
1403
|
|
|
1513
1404
|
sites
|
|
@@ -1516,7 +1407,7 @@ sites
|
|
|
1516
1407
|
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
1517
1408
|
.requiredOption(`--type <type>`, `Type of reference passed. Allowed values are: branch, commit`)
|
|
1518
1409
|
.requiredOption(`--reference <reference>`, `VCS reference to create deployment from. Depending on type this can be: branch name, commit hash`)
|
|
1519
|
-
.option(`--activate [value]`, `Automatically activate the deployment when it is finished building.`, (value) => value === undefined ? true : parseBool(value))
|
|
1410
|
+
.option(`--activate [value]`, `Automatically activate the deployment when it is finished building.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1520
1411
|
.action(actionRunner(sitesCreateVcsDeployment))
|
|
1521
1412
|
|
|
1522
1413
|
sites
|
|
@@ -1556,7 +1447,7 @@ sites
|
|
|
1556
1447
|
.description(`Get a list of all site logs. You can use the query params to filter your results.`)
|
|
1557
1448
|
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
1558
1449
|
.option(`--queries [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: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId`)
|
|
1559
|
-
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
1450
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1560
1451
|
.action(actionRunner(sitesListLogs))
|
|
1561
1452
|
|
|
1562
1453
|
sites
|
|
@@ -1593,7 +1484,7 @@ sites
|
|
|
1593
1484
|
.requiredOption(`--site-id <site-id>`, `Site unique ID.`)
|
|
1594
1485
|
.requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`)
|
|
1595
1486
|
.requiredOption(`--value <value>`, `Variable value. Max length: 8192 chars.`)
|
|
1596
|
-
.option(`--secret [value]`, `Secret variables can be updated or deleted, but only sites can read them during build and runtime.`, (value) => value === undefined ? true : parseBool(value))
|
|
1487
|
+
.option(`--secret [value]`, `Secret variables can be updated or deleted, but only sites can read them during build and runtime.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1597
1488
|
.action(actionRunner(sitesCreateVariable))
|
|
1598
1489
|
|
|
1599
1490
|
sites
|
|
@@ -1610,7 +1501,7 @@ sites
|
|
|
1610
1501
|
.requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
|
|
1611
1502
|
.requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`)
|
|
1612
1503
|
.option(`--value <value>`, `Variable value. Max length: 8192 chars.`)
|
|
1613
|
-
.option(`--secret [value]`, `Secret variables can be updated or deleted, but only sites can read them during build and runtime.`, (value) => value === undefined ? true : parseBool(value))
|
|
1504
|
+
.option(`--secret [value]`, `Secret variables can be updated or deleted, but only sites can read them during build and runtime.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
1614
1505
|
.action(actionRunner(sitesUpdateVariable))
|
|
1615
1506
|
|
|
1616
1507
|
sites
|
|
@@ -1620,35 +1511,4 @@ sites
|
|
|
1620
1511
|
.requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
|
|
1621
1512
|
.action(actionRunner(sitesDeleteVariable))
|
|
1622
1513
|
|
|
1623
|
-
|
|
1624
|
-
sites,
|
|
1625
|
-
sitesList,
|
|
1626
|
-
sitesCreate,
|
|
1627
|
-
sitesListFrameworks,
|
|
1628
|
-
sitesListSpecifications,
|
|
1629
|
-
sitesListTemplates,
|
|
1630
|
-
sitesGetTemplate,
|
|
1631
|
-
sitesListUsage,
|
|
1632
|
-
sitesGet,
|
|
1633
|
-
sitesUpdate,
|
|
1634
|
-
sitesDelete,
|
|
1635
|
-
sitesUpdateSiteDeployment,
|
|
1636
|
-
sitesListDeployments,
|
|
1637
|
-
sitesCreateDeployment,
|
|
1638
|
-
sitesCreateDuplicateDeployment,
|
|
1639
|
-
sitesCreateTemplateDeployment,
|
|
1640
|
-
sitesCreateVcsDeployment,
|
|
1641
|
-
sitesGetDeployment,
|
|
1642
|
-
sitesDeleteDeployment,
|
|
1643
|
-
sitesGetDeploymentDownload,
|
|
1644
|
-
sitesUpdateDeploymentStatus,
|
|
1645
|
-
sitesListLogs,
|
|
1646
|
-
sitesGetLog,
|
|
1647
|
-
sitesDeleteLog,
|
|
1648
|
-
sitesGetUsage,
|
|
1649
|
-
sitesListVariables,
|
|
1650
|
-
sitesCreateVariable,
|
|
1651
|
-
sitesGetVariable,
|
|
1652
|
-
sitesUpdateVariable,
|
|
1653
|
-
sitesDeleteVariable
|
|
1654
|
-
};
|
|
1514
|
+
|