appwrite-cli 12.0.1 → 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 +4 -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} +408 -662
- 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} +118 -174
- 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 -57
- package/lib/type-generation/languages/{dart.js → dart.ts} +91 -89
- package/lib/type-generation/languages/{java.js → java.ts} +58 -56
- 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 -53
- package/lib/type-generation/languages/{swift.js → swift.ts} +59 -57
- 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 -19
- package/lib/type-generation/languages/javascript.js +0 -111
- package/lib/type-generation/languages/kotlin.js +0 -94
- package/lib/type-generation/languages/language.js +0 -125
- package/lib/type-generation/languages/typescript.js +0 -116
- package/lib/validations.js +0 -17
|
@@ -0,0 +1,1590 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.projectsGetWebhook = exports.projectsCreateWebhook = exports.projectsListWebhooks = exports.projectsDeleteSMSTemplate = exports.projectsUpdateSMSTemplate = exports.projectsGetSMSTemplate = exports.projectsDeleteEmailTemplate = exports.projectsUpdateEmailTemplate = exports.projectsGetEmailTemplate = exports.projectsUpdateTeam = exports.projectsCreateSMTPTest = exports.projectsUpdateSMTP = exports.projectsUpdateServiceStatusAll = exports.projectsUpdateServiceStatus = exports.projectsDeletePlatform = exports.projectsUpdatePlatform = exports.projectsGetPlatform = exports.projectsCreatePlatform = exports.projectsListPlatforms = exports.projectsUpdateOAuth2 = exports.projectsDeleteKey = exports.projectsUpdateKey = exports.projectsGetKey = exports.projectsCreateKey = exports.projectsListKeys = exports.projectsCreateJWT = exports.projectsDeleteDevKey = exports.projectsUpdateDevKey = exports.projectsGetDevKey = exports.projectsCreateDevKey = exports.projectsListDevKeys = exports.projectsUpdateAuthStatus = exports.projectsUpdateSessionInvalidation = exports.projectsUpdateSessionAlerts = exports.projectsUpdatePersonalDataCheck = exports.projectsUpdateAuthPasswordHistory = exports.projectsUpdateAuthPasswordDictionary = exports.projectsUpdateMockNumbers = exports.projectsUpdateMembershipsPrivacy = exports.projectsUpdateAuthSessionsLimit = exports.projectsUpdateAuthLimit = exports.projectsUpdateAuthDuration = exports.projectsUpdateAPIStatusAll = exports.projectsUpdateAPIStatus = exports.projectsDelete = exports.projectsUpdate = exports.projectsGet = exports.projectsCreate = exports.projectsList = exports.projects = void 0;
|
|
4
|
+
exports.projectsUpdateWebhookSignature = exports.projectsDeleteWebhook = exports.projectsUpdateWebhook = void 0;
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
const commander_1 = require("commander");
|
|
7
|
+
const sdks_1 = require("../sdks");
|
|
8
|
+
const parser_1 = require("../parser");
|
|
9
|
+
const web_1 = require("stream/web");
|
|
10
|
+
function convertReadStreamToReadableStream(readStream) {
|
|
11
|
+
return new web_1.ReadableStream({
|
|
12
|
+
start(controller) {
|
|
13
|
+
readStream.on("data", (chunk) => {
|
|
14
|
+
controller.enqueue(chunk);
|
|
15
|
+
});
|
|
16
|
+
readStream.on("end", () => {
|
|
17
|
+
controller.close();
|
|
18
|
+
});
|
|
19
|
+
readStream.on("error", (err) => {
|
|
20
|
+
controller.error(err);
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
cancel() {
|
|
24
|
+
readStream.destroy();
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
exports.projects = new commander_1.Command("projects").description(parser_1.commandDescriptions['projects'] ?? '').configureHelp({
|
|
29
|
+
helpWidth: process.stdout.columns || 80
|
|
30
|
+
});
|
|
31
|
+
const projectsList = async ({ queries, search, total, parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
|
|
32
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
33
|
+
sdk;
|
|
34
|
+
let apiPath = '/projects';
|
|
35
|
+
let payload = {};
|
|
36
|
+
if (typeof queries !== 'undefined') {
|
|
37
|
+
payload['queries'] = queries;
|
|
38
|
+
}
|
|
39
|
+
if (typeof search !== 'undefined') {
|
|
40
|
+
payload['search'] = search;
|
|
41
|
+
}
|
|
42
|
+
if (typeof total !== 'undefined') {
|
|
43
|
+
payload['total'] = total;
|
|
44
|
+
}
|
|
45
|
+
let response = undefined;
|
|
46
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
47
|
+
if (parseOutput) {
|
|
48
|
+
if (showConsole) {
|
|
49
|
+
(0, utils_1.showConsoleLink)('projects', 'list');
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
(0, parser_1.parse)(response);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return response;
|
|
56
|
+
};
|
|
57
|
+
exports.projectsList = projectsList;
|
|
58
|
+
const projectsCreate = async ({ projectId, name, teamId, region, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
59
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
60
|
+
sdk;
|
|
61
|
+
let apiPath = '/projects';
|
|
62
|
+
let payload = {};
|
|
63
|
+
if (typeof projectId !== 'undefined') {
|
|
64
|
+
payload['projectId'] = projectId;
|
|
65
|
+
}
|
|
66
|
+
if (typeof name !== 'undefined') {
|
|
67
|
+
payload['name'] = name;
|
|
68
|
+
}
|
|
69
|
+
if (typeof teamId !== 'undefined') {
|
|
70
|
+
payload['teamId'] = teamId;
|
|
71
|
+
}
|
|
72
|
+
if (typeof region !== 'undefined') {
|
|
73
|
+
payload['region'] = region;
|
|
74
|
+
}
|
|
75
|
+
if (typeof description !== 'undefined') {
|
|
76
|
+
payload['description'] = description;
|
|
77
|
+
}
|
|
78
|
+
if (typeof logo !== 'undefined') {
|
|
79
|
+
payload['logo'] = logo;
|
|
80
|
+
}
|
|
81
|
+
if (typeof url !== 'undefined') {
|
|
82
|
+
payload['url'] = url;
|
|
83
|
+
}
|
|
84
|
+
if (typeof legalName !== 'undefined') {
|
|
85
|
+
payload['legalName'] = legalName;
|
|
86
|
+
}
|
|
87
|
+
if (typeof legalCountry !== 'undefined') {
|
|
88
|
+
payload['legalCountry'] = legalCountry;
|
|
89
|
+
}
|
|
90
|
+
if (typeof legalState !== 'undefined') {
|
|
91
|
+
payload['legalState'] = legalState;
|
|
92
|
+
}
|
|
93
|
+
if (typeof legalCity !== 'undefined') {
|
|
94
|
+
payload['legalCity'] = legalCity;
|
|
95
|
+
}
|
|
96
|
+
if (typeof legalAddress !== 'undefined') {
|
|
97
|
+
payload['legalAddress'] = legalAddress;
|
|
98
|
+
}
|
|
99
|
+
if (typeof legalTaxId !== 'undefined') {
|
|
100
|
+
payload['legalTaxId'] = legalTaxId;
|
|
101
|
+
}
|
|
102
|
+
let response = undefined;
|
|
103
|
+
response = await client.call('post', apiPath, {
|
|
104
|
+
'content-type': 'application/json',
|
|
105
|
+
}, payload);
|
|
106
|
+
if (parseOutput) {
|
|
107
|
+
(0, parser_1.parse)(response);
|
|
108
|
+
}
|
|
109
|
+
return response;
|
|
110
|
+
};
|
|
111
|
+
exports.projectsCreate = projectsCreate;
|
|
112
|
+
const projectsGet = async ({ projectId, parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
|
|
113
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
114
|
+
sdk;
|
|
115
|
+
let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
116
|
+
let payload = {};
|
|
117
|
+
let response = undefined;
|
|
118
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
119
|
+
if (parseOutput) {
|
|
120
|
+
if (showConsole) {
|
|
121
|
+
(0, utils_1.showConsoleLink)('projects', 'get', projectId);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
(0, parser_1.parse)(response);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return response;
|
|
128
|
+
};
|
|
129
|
+
exports.projectsGet = projectsGet;
|
|
130
|
+
const projectsUpdate = async ({ projectId, name, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
131
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
132
|
+
sdk;
|
|
133
|
+
let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
134
|
+
let payload = {};
|
|
135
|
+
if (typeof name !== 'undefined') {
|
|
136
|
+
payload['name'] = name;
|
|
137
|
+
}
|
|
138
|
+
if (typeof description !== 'undefined') {
|
|
139
|
+
payload['description'] = description;
|
|
140
|
+
}
|
|
141
|
+
if (typeof logo !== 'undefined') {
|
|
142
|
+
payload['logo'] = logo;
|
|
143
|
+
}
|
|
144
|
+
if (typeof url !== 'undefined') {
|
|
145
|
+
payload['url'] = url;
|
|
146
|
+
}
|
|
147
|
+
if (typeof legalName !== 'undefined') {
|
|
148
|
+
payload['legalName'] = legalName;
|
|
149
|
+
}
|
|
150
|
+
if (typeof legalCountry !== 'undefined') {
|
|
151
|
+
payload['legalCountry'] = legalCountry;
|
|
152
|
+
}
|
|
153
|
+
if (typeof legalState !== 'undefined') {
|
|
154
|
+
payload['legalState'] = legalState;
|
|
155
|
+
}
|
|
156
|
+
if (typeof legalCity !== 'undefined') {
|
|
157
|
+
payload['legalCity'] = legalCity;
|
|
158
|
+
}
|
|
159
|
+
if (typeof legalAddress !== 'undefined') {
|
|
160
|
+
payload['legalAddress'] = legalAddress;
|
|
161
|
+
}
|
|
162
|
+
if (typeof legalTaxId !== 'undefined') {
|
|
163
|
+
payload['legalTaxId'] = legalTaxId;
|
|
164
|
+
}
|
|
165
|
+
let response = undefined;
|
|
166
|
+
response = await client.call('patch', apiPath, {
|
|
167
|
+
'content-type': 'application/json',
|
|
168
|
+
}, payload);
|
|
169
|
+
if (parseOutput) {
|
|
170
|
+
(0, parser_1.parse)(response);
|
|
171
|
+
}
|
|
172
|
+
return response;
|
|
173
|
+
};
|
|
174
|
+
exports.projectsUpdate = projectsUpdate;
|
|
175
|
+
const projectsDelete = async ({ projectId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
176
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
177
|
+
sdk;
|
|
178
|
+
let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
|
|
179
|
+
let payload = {};
|
|
180
|
+
let response = undefined;
|
|
181
|
+
response = await client.call('delete', apiPath, {
|
|
182
|
+
'content-type': 'application/json',
|
|
183
|
+
}, payload);
|
|
184
|
+
if (parseOutput) {
|
|
185
|
+
(0, parser_1.parse)(response);
|
|
186
|
+
}
|
|
187
|
+
return response;
|
|
188
|
+
};
|
|
189
|
+
exports.projectsDelete = projectsDelete;
|
|
190
|
+
const projectsUpdateAPIStatus = async ({ projectId, api, status, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
191
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
192
|
+
sdk;
|
|
193
|
+
let apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
|
|
194
|
+
let payload = {};
|
|
195
|
+
if (typeof api !== 'undefined') {
|
|
196
|
+
payload['api'] = api;
|
|
197
|
+
}
|
|
198
|
+
if (typeof status !== 'undefined') {
|
|
199
|
+
payload['status'] = status;
|
|
200
|
+
}
|
|
201
|
+
let response = undefined;
|
|
202
|
+
response = await client.call('patch', apiPath, {
|
|
203
|
+
'content-type': 'application/json',
|
|
204
|
+
}, payload);
|
|
205
|
+
if (parseOutput) {
|
|
206
|
+
(0, parser_1.parse)(response);
|
|
207
|
+
}
|
|
208
|
+
return response;
|
|
209
|
+
};
|
|
210
|
+
exports.projectsUpdateAPIStatus = projectsUpdateAPIStatus;
|
|
211
|
+
const projectsUpdateAPIStatusAll = async ({ projectId, status, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
212
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
213
|
+
sdk;
|
|
214
|
+
let apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
|
|
215
|
+
let payload = {};
|
|
216
|
+
if (typeof status !== 'undefined') {
|
|
217
|
+
payload['status'] = status;
|
|
218
|
+
}
|
|
219
|
+
let response = undefined;
|
|
220
|
+
response = await client.call('patch', apiPath, {
|
|
221
|
+
'content-type': 'application/json',
|
|
222
|
+
}, payload);
|
|
223
|
+
if (parseOutput) {
|
|
224
|
+
(0, parser_1.parse)(response);
|
|
225
|
+
}
|
|
226
|
+
return response;
|
|
227
|
+
};
|
|
228
|
+
exports.projectsUpdateAPIStatusAll = projectsUpdateAPIStatusAll;
|
|
229
|
+
const projectsUpdateAuthDuration = async ({ projectId, duration, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
230
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
231
|
+
sdk;
|
|
232
|
+
let apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
|
|
233
|
+
let payload = {};
|
|
234
|
+
if (typeof duration !== 'undefined') {
|
|
235
|
+
payload['duration'] = duration;
|
|
236
|
+
}
|
|
237
|
+
let response = undefined;
|
|
238
|
+
response = await client.call('patch', apiPath, {
|
|
239
|
+
'content-type': 'application/json',
|
|
240
|
+
}, payload);
|
|
241
|
+
if (parseOutput) {
|
|
242
|
+
(0, parser_1.parse)(response);
|
|
243
|
+
}
|
|
244
|
+
return response;
|
|
245
|
+
};
|
|
246
|
+
exports.projectsUpdateAuthDuration = projectsUpdateAuthDuration;
|
|
247
|
+
const projectsUpdateAuthLimit = async ({ projectId, limit, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
248
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
249
|
+
sdk;
|
|
250
|
+
let apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
|
|
251
|
+
let payload = {};
|
|
252
|
+
if (typeof limit !== 'undefined') {
|
|
253
|
+
payload['limit'] = limit;
|
|
254
|
+
}
|
|
255
|
+
let response = undefined;
|
|
256
|
+
response = await client.call('patch', apiPath, {
|
|
257
|
+
'content-type': 'application/json',
|
|
258
|
+
}, payload);
|
|
259
|
+
if (parseOutput) {
|
|
260
|
+
(0, parser_1.parse)(response);
|
|
261
|
+
}
|
|
262
|
+
return response;
|
|
263
|
+
};
|
|
264
|
+
exports.projectsUpdateAuthLimit = projectsUpdateAuthLimit;
|
|
265
|
+
const projectsUpdateAuthSessionsLimit = async ({ projectId, limit, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
266
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
267
|
+
sdk;
|
|
268
|
+
let apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
|
|
269
|
+
let payload = {};
|
|
270
|
+
if (typeof limit !== 'undefined') {
|
|
271
|
+
payload['limit'] = limit;
|
|
272
|
+
}
|
|
273
|
+
let response = undefined;
|
|
274
|
+
response = await client.call('patch', apiPath, {
|
|
275
|
+
'content-type': 'application/json',
|
|
276
|
+
}, payload);
|
|
277
|
+
if (parseOutput) {
|
|
278
|
+
(0, parser_1.parse)(response);
|
|
279
|
+
}
|
|
280
|
+
return response;
|
|
281
|
+
};
|
|
282
|
+
exports.projectsUpdateAuthSessionsLimit = projectsUpdateAuthSessionsLimit;
|
|
283
|
+
const projectsUpdateMembershipsPrivacy = async ({ projectId, userName, userEmail, mfa, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
284
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
285
|
+
sdk;
|
|
286
|
+
let apiPath = '/projects/{projectId}/auth/memberships-privacy'.replace('{projectId}', projectId);
|
|
287
|
+
let payload = {};
|
|
288
|
+
if (typeof userName !== 'undefined') {
|
|
289
|
+
payload['userName'] = userName;
|
|
290
|
+
}
|
|
291
|
+
if (typeof userEmail !== 'undefined') {
|
|
292
|
+
payload['userEmail'] = userEmail;
|
|
293
|
+
}
|
|
294
|
+
if (typeof mfa !== 'undefined') {
|
|
295
|
+
payload['mfa'] = mfa;
|
|
296
|
+
}
|
|
297
|
+
let response = undefined;
|
|
298
|
+
response = await client.call('patch', apiPath, {
|
|
299
|
+
'content-type': 'application/json',
|
|
300
|
+
}, payload);
|
|
301
|
+
if (parseOutput) {
|
|
302
|
+
(0, parser_1.parse)(response);
|
|
303
|
+
}
|
|
304
|
+
return response;
|
|
305
|
+
};
|
|
306
|
+
exports.projectsUpdateMembershipsPrivacy = projectsUpdateMembershipsPrivacy;
|
|
307
|
+
const projectsUpdateMockNumbers = async ({ projectId, numbers, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
308
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
309
|
+
sdk;
|
|
310
|
+
let apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
|
|
311
|
+
let payload = {};
|
|
312
|
+
numbers = numbers === true ? [] : numbers;
|
|
313
|
+
if (typeof numbers !== 'undefined') {
|
|
314
|
+
payload['numbers'] = numbers;
|
|
315
|
+
}
|
|
316
|
+
let response = undefined;
|
|
317
|
+
response = await client.call('patch', apiPath, {
|
|
318
|
+
'content-type': 'application/json',
|
|
319
|
+
}, payload);
|
|
320
|
+
if (parseOutput) {
|
|
321
|
+
(0, parser_1.parse)(response);
|
|
322
|
+
}
|
|
323
|
+
return response;
|
|
324
|
+
};
|
|
325
|
+
exports.projectsUpdateMockNumbers = projectsUpdateMockNumbers;
|
|
326
|
+
const projectsUpdateAuthPasswordDictionary = async ({ projectId, enabled, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
327
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
328
|
+
sdk;
|
|
329
|
+
let apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
|
|
330
|
+
let payload = {};
|
|
331
|
+
if (typeof enabled !== 'undefined') {
|
|
332
|
+
payload['enabled'] = enabled;
|
|
333
|
+
}
|
|
334
|
+
let response = undefined;
|
|
335
|
+
response = await client.call('patch', apiPath, {
|
|
336
|
+
'content-type': 'application/json',
|
|
337
|
+
}, payload);
|
|
338
|
+
if (parseOutput) {
|
|
339
|
+
(0, parser_1.parse)(response);
|
|
340
|
+
}
|
|
341
|
+
return response;
|
|
342
|
+
};
|
|
343
|
+
exports.projectsUpdateAuthPasswordDictionary = projectsUpdateAuthPasswordDictionary;
|
|
344
|
+
const projectsUpdateAuthPasswordHistory = async ({ projectId, limit, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
345
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
346
|
+
sdk;
|
|
347
|
+
let apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
|
|
348
|
+
let payload = {};
|
|
349
|
+
if (typeof limit !== 'undefined') {
|
|
350
|
+
payload['limit'] = limit;
|
|
351
|
+
}
|
|
352
|
+
let response = undefined;
|
|
353
|
+
response = await client.call('patch', apiPath, {
|
|
354
|
+
'content-type': 'application/json',
|
|
355
|
+
}, payload);
|
|
356
|
+
if (parseOutput) {
|
|
357
|
+
(0, parser_1.parse)(response);
|
|
358
|
+
}
|
|
359
|
+
return response;
|
|
360
|
+
};
|
|
361
|
+
exports.projectsUpdateAuthPasswordHistory = projectsUpdateAuthPasswordHistory;
|
|
362
|
+
const projectsUpdatePersonalDataCheck = async ({ projectId, enabled, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
363
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
364
|
+
sdk;
|
|
365
|
+
let apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
|
|
366
|
+
let payload = {};
|
|
367
|
+
if (typeof enabled !== 'undefined') {
|
|
368
|
+
payload['enabled'] = enabled;
|
|
369
|
+
}
|
|
370
|
+
let response = undefined;
|
|
371
|
+
response = await client.call('patch', apiPath, {
|
|
372
|
+
'content-type': 'application/json',
|
|
373
|
+
}, payload);
|
|
374
|
+
if (parseOutput) {
|
|
375
|
+
(0, parser_1.parse)(response);
|
|
376
|
+
}
|
|
377
|
+
return response;
|
|
378
|
+
};
|
|
379
|
+
exports.projectsUpdatePersonalDataCheck = projectsUpdatePersonalDataCheck;
|
|
380
|
+
const projectsUpdateSessionAlerts = async ({ projectId, alerts, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
381
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
382
|
+
sdk;
|
|
383
|
+
let apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
|
|
384
|
+
let payload = {};
|
|
385
|
+
if (typeof alerts !== 'undefined') {
|
|
386
|
+
payload['alerts'] = alerts;
|
|
387
|
+
}
|
|
388
|
+
let response = undefined;
|
|
389
|
+
response = await client.call('patch', apiPath, {
|
|
390
|
+
'content-type': 'application/json',
|
|
391
|
+
}, payload);
|
|
392
|
+
if (parseOutput) {
|
|
393
|
+
(0, parser_1.parse)(response);
|
|
394
|
+
}
|
|
395
|
+
return response;
|
|
396
|
+
};
|
|
397
|
+
exports.projectsUpdateSessionAlerts = projectsUpdateSessionAlerts;
|
|
398
|
+
const projectsUpdateSessionInvalidation = async ({ projectId, enabled, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
399
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
400
|
+
sdk;
|
|
401
|
+
let apiPath = '/projects/{projectId}/auth/session-invalidation'.replace('{projectId}', projectId);
|
|
402
|
+
let payload = {};
|
|
403
|
+
if (typeof enabled !== 'undefined') {
|
|
404
|
+
payload['enabled'] = enabled;
|
|
405
|
+
}
|
|
406
|
+
let response = undefined;
|
|
407
|
+
response = await client.call('patch', apiPath, {
|
|
408
|
+
'content-type': 'application/json',
|
|
409
|
+
}, payload);
|
|
410
|
+
if (parseOutput) {
|
|
411
|
+
(0, parser_1.parse)(response);
|
|
412
|
+
}
|
|
413
|
+
return response;
|
|
414
|
+
};
|
|
415
|
+
exports.projectsUpdateSessionInvalidation = projectsUpdateSessionInvalidation;
|
|
416
|
+
const projectsUpdateAuthStatus = async ({ projectId, method, status, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
417
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
418
|
+
sdk;
|
|
419
|
+
let apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
|
|
420
|
+
let payload = {};
|
|
421
|
+
if (typeof status !== 'undefined') {
|
|
422
|
+
payload['status'] = status;
|
|
423
|
+
}
|
|
424
|
+
let response = undefined;
|
|
425
|
+
response = await client.call('patch', apiPath, {
|
|
426
|
+
'content-type': 'application/json',
|
|
427
|
+
}, payload);
|
|
428
|
+
if (parseOutput) {
|
|
429
|
+
(0, parser_1.parse)(response);
|
|
430
|
+
}
|
|
431
|
+
return response;
|
|
432
|
+
};
|
|
433
|
+
exports.projectsUpdateAuthStatus = projectsUpdateAuthStatus;
|
|
434
|
+
const projectsListDevKeys = async ({ projectId, queries, parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
|
|
435
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
436
|
+
sdk;
|
|
437
|
+
let apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
|
|
438
|
+
let payload = {};
|
|
439
|
+
if (typeof queries !== 'undefined') {
|
|
440
|
+
payload['queries'] = queries;
|
|
441
|
+
}
|
|
442
|
+
let response = undefined;
|
|
443
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
444
|
+
if (parseOutput) {
|
|
445
|
+
if (showConsole) {
|
|
446
|
+
(0, utils_1.showConsoleLink)('projects', 'listDevKeys', projectId);
|
|
447
|
+
}
|
|
448
|
+
else {
|
|
449
|
+
(0, parser_1.parse)(response);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return response;
|
|
453
|
+
};
|
|
454
|
+
exports.projectsListDevKeys = projectsListDevKeys;
|
|
455
|
+
const projectsCreateDevKey = async ({ projectId, name, expire, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
456
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
457
|
+
sdk;
|
|
458
|
+
let apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
|
|
459
|
+
let payload = {};
|
|
460
|
+
if (typeof name !== 'undefined') {
|
|
461
|
+
payload['name'] = name;
|
|
462
|
+
}
|
|
463
|
+
if (typeof expire !== 'undefined') {
|
|
464
|
+
payload['expire'] = expire;
|
|
465
|
+
}
|
|
466
|
+
let response = undefined;
|
|
467
|
+
response = await client.call('post', apiPath, {
|
|
468
|
+
'content-type': 'application/json',
|
|
469
|
+
}, payload);
|
|
470
|
+
if (parseOutput) {
|
|
471
|
+
(0, parser_1.parse)(response);
|
|
472
|
+
}
|
|
473
|
+
return response;
|
|
474
|
+
};
|
|
475
|
+
exports.projectsCreateDevKey = projectsCreateDevKey;
|
|
476
|
+
const projectsGetDevKey = async ({ projectId, keyId, parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
|
|
477
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
478
|
+
sdk;
|
|
479
|
+
let apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
480
|
+
let payload = {};
|
|
481
|
+
let response = undefined;
|
|
482
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
483
|
+
if (parseOutput) {
|
|
484
|
+
if (showConsole) {
|
|
485
|
+
(0, utils_1.showConsoleLink)('projects', 'getDevKey', projectId, keyId);
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
(0, parser_1.parse)(response);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
return response;
|
|
492
|
+
};
|
|
493
|
+
exports.projectsGetDevKey = projectsGetDevKey;
|
|
494
|
+
const projectsUpdateDevKey = async ({ projectId, keyId, name, expire, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
495
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
496
|
+
sdk;
|
|
497
|
+
let apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
498
|
+
let payload = {};
|
|
499
|
+
if (typeof name !== 'undefined') {
|
|
500
|
+
payload['name'] = name;
|
|
501
|
+
}
|
|
502
|
+
if (typeof expire !== 'undefined') {
|
|
503
|
+
payload['expire'] = expire;
|
|
504
|
+
}
|
|
505
|
+
let response = undefined;
|
|
506
|
+
response = await client.call('put', apiPath, {
|
|
507
|
+
'content-type': 'application/json',
|
|
508
|
+
}, payload);
|
|
509
|
+
if (parseOutput) {
|
|
510
|
+
(0, parser_1.parse)(response);
|
|
511
|
+
}
|
|
512
|
+
return response;
|
|
513
|
+
};
|
|
514
|
+
exports.projectsUpdateDevKey = projectsUpdateDevKey;
|
|
515
|
+
const projectsDeleteDevKey = async ({ projectId, keyId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
516
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
517
|
+
sdk;
|
|
518
|
+
let apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
519
|
+
let payload = {};
|
|
520
|
+
let response = undefined;
|
|
521
|
+
response = await client.call('delete', apiPath, {
|
|
522
|
+
'content-type': 'application/json',
|
|
523
|
+
}, payload);
|
|
524
|
+
if (parseOutput) {
|
|
525
|
+
(0, parser_1.parse)(response);
|
|
526
|
+
}
|
|
527
|
+
return response;
|
|
528
|
+
};
|
|
529
|
+
exports.projectsDeleteDevKey = projectsDeleteDevKey;
|
|
530
|
+
const projectsCreateJWT = async ({ projectId, scopes, duration, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
531
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
532
|
+
sdk;
|
|
533
|
+
let apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
|
|
534
|
+
let payload = {};
|
|
535
|
+
scopes = scopes === true ? [] : scopes;
|
|
536
|
+
if (typeof scopes !== 'undefined') {
|
|
537
|
+
payload['scopes'] = scopes;
|
|
538
|
+
}
|
|
539
|
+
if (typeof duration !== 'undefined') {
|
|
540
|
+
payload['duration'] = duration;
|
|
541
|
+
}
|
|
542
|
+
let response = undefined;
|
|
543
|
+
response = await client.call('post', apiPath, {
|
|
544
|
+
'content-type': 'application/json',
|
|
545
|
+
}, payload);
|
|
546
|
+
if (parseOutput) {
|
|
547
|
+
(0, parser_1.parse)(response);
|
|
548
|
+
}
|
|
549
|
+
return response;
|
|
550
|
+
};
|
|
551
|
+
exports.projectsCreateJWT = projectsCreateJWT;
|
|
552
|
+
const projectsListKeys = async ({ projectId, total, parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
|
|
553
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
554
|
+
sdk;
|
|
555
|
+
let apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
556
|
+
let payload = {};
|
|
557
|
+
if (typeof total !== 'undefined') {
|
|
558
|
+
payload['total'] = total;
|
|
559
|
+
}
|
|
560
|
+
let response = undefined;
|
|
561
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
562
|
+
if (parseOutput) {
|
|
563
|
+
if (showConsole) {
|
|
564
|
+
(0, utils_1.showConsoleLink)('projects', 'listKeys', projectId);
|
|
565
|
+
}
|
|
566
|
+
else {
|
|
567
|
+
(0, parser_1.parse)(response);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
return response;
|
|
571
|
+
};
|
|
572
|
+
exports.projectsListKeys = projectsListKeys;
|
|
573
|
+
const projectsCreateKey = async ({ projectId, name, scopes, expire, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
574
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
575
|
+
sdk;
|
|
576
|
+
let apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
|
|
577
|
+
let payload = {};
|
|
578
|
+
if (typeof name !== 'undefined') {
|
|
579
|
+
payload['name'] = name;
|
|
580
|
+
}
|
|
581
|
+
scopes = scopes === true ? [] : scopes;
|
|
582
|
+
if (typeof scopes !== 'undefined') {
|
|
583
|
+
payload['scopes'] = scopes;
|
|
584
|
+
}
|
|
585
|
+
if (typeof expire !== 'undefined') {
|
|
586
|
+
payload['expire'] = expire;
|
|
587
|
+
}
|
|
588
|
+
let response = undefined;
|
|
589
|
+
response = await client.call('post', apiPath, {
|
|
590
|
+
'content-type': 'application/json',
|
|
591
|
+
}, payload);
|
|
592
|
+
if (parseOutput) {
|
|
593
|
+
(0, parser_1.parse)(response);
|
|
594
|
+
}
|
|
595
|
+
return response;
|
|
596
|
+
};
|
|
597
|
+
exports.projectsCreateKey = projectsCreateKey;
|
|
598
|
+
const projectsGetKey = async ({ projectId, keyId, parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
|
|
599
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
600
|
+
sdk;
|
|
601
|
+
let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
602
|
+
let payload = {};
|
|
603
|
+
let response = undefined;
|
|
604
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
605
|
+
if (parseOutput) {
|
|
606
|
+
if (showConsole) {
|
|
607
|
+
(0, utils_1.showConsoleLink)('projects', 'getKey', projectId, keyId);
|
|
608
|
+
}
|
|
609
|
+
else {
|
|
610
|
+
(0, parser_1.parse)(response);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
return response;
|
|
614
|
+
};
|
|
615
|
+
exports.projectsGetKey = projectsGetKey;
|
|
616
|
+
const projectsUpdateKey = async ({ projectId, keyId, name, scopes, expire, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
617
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
618
|
+
sdk;
|
|
619
|
+
let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
620
|
+
let payload = {};
|
|
621
|
+
if (typeof name !== 'undefined') {
|
|
622
|
+
payload['name'] = name;
|
|
623
|
+
}
|
|
624
|
+
scopes = scopes === true ? [] : scopes;
|
|
625
|
+
if (typeof scopes !== 'undefined') {
|
|
626
|
+
payload['scopes'] = scopes;
|
|
627
|
+
}
|
|
628
|
+
if (typeof expire !== 'undefined') {
|
|
629
|
+
payload['expire'] = expire;
|
|
630
|
+
}
|
|
631
|
+
let response = undefined;
|
|
632
|
+
response = await client.call('put', apiPath, {
|
|
633
|
+
'content-type': 'application/json',
|
|
634
|
+
}, payload);
|
|
635
|
+
if (parseOutput) {
|
|
636
|
+
(0, parser_1.parse)(response);
|
|
637
|
+
}
|
|
638
|
+
return response;
|
|
639
|
+
};
|
|
640
|
+
exports.projectsUpdateKey = projectsUpdateKey;
|
|
641
|
+
const projectsDeleteKey = async ({ projectId, keyId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
642
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
643
|
+
sdk;
|
|
644
|
+
let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
|
|
645
|
+
let payload = {};
|
|
646
|
+
let response = undefined;
|
|
647
|
+
response = await client.call('delete', apiPath, {
|
|
648
|
+
'content-type': 'application/json',
|
|
649
|
+
}, payload);
|
|
650
|
+
if (parseOutput) {
|
|
651
|
+
(0, parser_1.parse)(response);
|
|
652
|
+
}
|
|
653
|
+
return response;
|
|
654
|
+
};
|
|
655
|
+
exports.projectsDeleteKey = projectsDeleteKey;
|
|
656
|
+
const projectsUpdateOAuth2 = async ({ projectId, provider, appId, secret, enabled, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
657
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
658
|
+
sdk;
|
|
659
|
+
let apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
|
|
660
|
+
let payload = {};
|
|
661
|
+
if (typeof provider !== 'undefined') {
|
|
662
|
+
payload['provider'] = provider;
|
|
663
|
+
}
|
|
664
|
+
if (typeof appId !== 'undefined') {
|
|
665
|
+
payload['appId'] = appId;
|
|
666
|
+
}
|
|
667
|
+
if (typeof secret !== 'undefined') {
|
|
668
|
+
payload['secret'] = secret;
|
|
669
|
+
}
|
|
670
|
+
if (typeof enabled !== 'undefined') {
|
|
671
|
+
payload['enabled'] = enabled;
|
|
672
|
+
}
|
|
673
|
+
let response = undefined;
|
|
674
|
+
response = await client.call('patch', apiPath, {
|
|
675
|
+
'content-type': 'application/json',
|
|
676
|
+
}, payload);
|
|
677
|
+
if (parseOutput) {
|
|
678
|
+
(0, parser_1.parse)(response);
|
|
679
|
+
}
|
|
680
|
+
return response;
|
|
681
|
+
};
|
|
682
|
+
exports.projectsUpdateOAuth2 = projectsUpdateOAuth2;
|
|
683
|
+
const projectsListPlatforms = async ({ projectId, total, parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
|
|
684
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
685
|
+
sdk;
|
|
686
|
+
let apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
|
|
687
|
+
let payload = {};
|
|
688
|
+
if (typeof total !== 'undefined') {
|
|
689
|
+
payload['total'] = total;
|
|
690
|
+
}
|
|
691
|
+
let response = undefined;
|
|
692
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
693
|
+
if (parseOutput) {
|
|
694
|
+
if (showConsole) {
|
|
695
|
+
(0, utils_1.showConsoleLink)('projects', 'listPlatforms', projectId);
|
|
696
|
+
}
|
|
697
|
+
else {
|
|
698
|
+
(0, parser_1.parse)(response);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return response;
|
|
702
|
+
};
|
|
703
|
+
exports.projectsListPlatforms = projectsListPlatforms;
|
|
704
|
+
const projectsCreatePlatform = async ({ projectId, type, name, key, store, hostname, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
705
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
706
|
+
sdk;
|
|
707
|
+
let apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
|
|
708
|
+
let payload = {};
|
|
709
|
+
if (typeof type !== 'undefined') {
|
|
710
|
+
payload['type'] = type;
|
|
711
|
+
}
|
|
712
|
+
if (typeof name !== 'undefined') {
|
|
713
|
+
payload['name'] = name;
|
|
714
|
+
}
|
|
715
|
+
if (typeof key !== 'undefined') {
|
|
716
|
+
payload['key'] = key;
|
|
717
|
+
}
|
|
718
|
+
if (typeof store !== 'undefined') {
|
|
719
|
+
payload['store'] = store;
|
|
720
|
+
}
|
|
721
|
+
if (typeof hostname !== 'undefined') {
|
|
722
|
+
payload['hostname'] = hostname;
|
|
723
|
+
}
|
|
724
|
+
let response = undefined;
|
|
725
|
+
response = await client.call('post', apiPath, {
|
|
726
|
+
'content-type': 'application/json',
|
|
727
|
+
}, payload);
|
|
728
|
+
if (parseOutput) {
|
|
729
|
+
(0, parser_1.parse)(response);
|
|
730
|
+
}
|
|
731
|
+
return response;
|
|
732
|
+
};
|
|
733
|
+
exports.projectsCreatePlatform = projectsCreatePlatform;
|
|
734
|
+
const projectsGetPlatform = async ({ projectId, platformId, parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
|
|
735
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
736
|
+
sdk;
|
|
737
|
+
let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
738
|
+
let payload = {};
|
|
739
|
+
let response = undefined;
|
|
740
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
741
|
+
if (parseOutput) {
|
|
742
|
+
if (showConsole) {
|
|
743
|
+
(0, utils_1.showConsoleLink)('projects', 'getPlatform', projectId, platformId);
|
|
744
|
+
}
|
|
745
|
+
else {
|
|
746
|
+
(0, parser_1.parse)(response);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
return response;
|
|
750
|
+
};
|
|
751
|
+
exports.projectsGetPlatform = projectsGetPlatform;
|
|
752
|
+
const projectsUpdatePlatform = async ({ projectId, platformId, name, key, store, hostname, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
753
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
754
|
+
sdk;
|
|
755
|
+
let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
756
|
+
let payload = {};
|
|
757
|
+
if (typeof name !== 'undefined') {
|
|
758
|
+
payload['name'] = name;
|
|
759
|
+
}
|
|
760
|
+
if (typeof key !== 'undefined') {
|
|
761
|
+
payload['key'] = key;
|
|
762
|
+
}
|
|
763
|
+
if (typeof store !== 'undefined') {
|
|
764
|
+
payload['store'] = store;
|
|
765
|
+
}
|
|
766
|
+
if (typeof hostname !== 'undefined') {
|
|
767
|
+
payload['hostname'] = hostname;
|
|
768
|
+
}
|
|
769
|
+
let response = undefined;
|
|
770
|
+
response = await client.call('put', apiPath, {
|
|
771
|
+
'content-type': 'application/json',
|
|
772
|
+
}, payload);
|
|
773
|
+
if (parseOutput) {
|
|
774
|
+
(0, parser_1.parse)(response);
|
|
775
|
+
}
|
|
776
|
+
return response;
|
|
777
|
+
};
|
|
778
|
+
exports.projectsUpdatePlatform = projectsUpdatePlatform;
|
|
779
|
+
const projectsDeletePlatform = async ({ projectId, platformId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
780
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
781
|
+
sdk;
|
|
782
|
+
let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
|
|
783
|
+
let payload = {};
|
|
784
|
+
let response = undefined;
|
|
785
|
+
response = await client.call('delete', apiPath, {
|
|
786
|
+
'content-type': 'application/json',
|
|
787
|
+
}, payload);
|
|
788
|
+
if (parseOutput) {
|
|
789
|
+
(0, parser_1.parse)(response);
|
|
790
|
+
}
|
|
791
|
+
return response;
|
|
792
|
+
};
|
|
793
|
+
exports.projectsDeletePlatform = projectsDeletePlatform;
|
|
794
|
+
const projectsUpdateServiceStatus = async ({ projectId, service, status, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
795
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
796
|
+
sdk;
|
|
797
|
+
let apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
|
|
798
|
+
let payload = {};
|
|
799
|
+
if (typeof service !== 'undefined') {
|
|
800
|
+
payload['service'] = service;
|
|
801
|
+
}
|
|
802
|
+
if (typeof status !== 'undefined') {
|
|
803
|
+
payload['status'] = status;
|
|
804
|
+
}
|
|
805
|
+
let response = undefined;
|
|
806
|
+
response = await client.call('patch', apiPath, {
|
|
807
|
+
'content-type': 'application/json',
|
|
808
|
+
}, payload);
|
|
809
|
+
if (parseOutput) {
|
|
810
|
+
(0, parser_1.parse)(response);
|
|
811
|
+
}
|
|
812
|
+
return response;
|
|
813
|
+
};
|
|
814
|
+
exports.projectsUpdateServiceStatus = projectsUpdateServiceStatus;
|
|
815
|
+
const projectsUpdateServiceStatusAll = async ({ projectId, status, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
816
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
817
|
+
sdk;
|
|
818
|
+
let apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
|
|
819
|
+
let payload = {};
|
|
820
|
+
if (typeof status !== 'undefined') {
|
|
821
|
+
payload['status'] = status;
|
|
822
|
+
}
|
|
823
|
+
let response = undefined;
|
|
824
|
+
response = await client.call('patch', apiPath, {
|
|
825
|
+
'content-type': 'application/json',
|
|
826
|
+
}, payload);
|
|
827
|
+
if (parseOutput) {
|
|
828
|
+
(0, parser_1.parse)(response);
|
|
829
|
+
}
|
|
830
|
+
return response;
|
|
831
|
+
};
|
|
832
|
+
exports.projectsUpdateServiceStatusAll = projectsUpdateServiceStatusAll;
|
|
833
|
+
const projectsUpdateSMTP = async ({ projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
834
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
835
|
+
sdk;
|
|
836
|
+
let apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
|
|
837
|
+
let payload = {};
|
|
838
|
+
if (typeof enabled !== 'undefined') {
|
|
839
|
+
payload['enabled'] = enabled;
|
|
840
|
+
}
|
|
841
|
+
if (typeof senderName !== 'undefined') {
|
|
842
|
+
payload['senderName'] = senderName;
|
|
843
|
+
}
|
|
844
|
+
if (typeof senderEmail !== 'undefined') {
|
|
845
|
+
payload['senderEmail'] = senderEmail;
|
|
846
|
+
}
|
|
847
|
+
if (typeof replyTo !== 'undefined') {
|
|
848
|
+
payload['replyTo'] = replyTo;
|
|
849
|
+
}
|
|
850
|
+
if (typeof host !== 'undefined') {
|
|
851
|
+
payload['host'] = host;
|
|
852
|
+
}
|
|
853
|
+
if (typeof port !== 'undefined') {
|
|
854
|
+
payload['port'] = port;
|
|
855
|
+
}
|
|
856
|
+
if (typeof username !== 'undefined') {
|
|
857
|
+
payload['username'] = username;
|
|
858
|
+
}
|
|
859
|
+
if (typeof password !== 'undefined') {
|
|
860
|
+
payload['password'] = password;
|
|
861
|
+
}
|
|
862
|
+
if (typeof secure !== 'undefined') {
|
|
863
|
+
payload['secure'] = secure;
|
|
864
|
+
}
|
|
865
|
+
let response = undefined;
|
|
866
|
+
response = await client.call('patch', apiPath, {
|
|
867
|
+
'content-type': 'application/json',
|
|
868
|
+
}, payload);
|
|
869
|
+
if (parseOutput) {
|
|
870
|
+
(0, parser_1.parse)(response);
|
|
871
|
+
}
|
|
872
|
+
return response;
|
|
873
|
+
};
|
|
874
|
+
exports.projectsUpdateSMTP = projectsUpdateSMTP;
|
|
875
|
+
const projectsCreateSMTPTest = async ({ projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
876
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
877
|
+
sdk;
|
|
878
|
+
let apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
|
|
879
|
+
let payload = {};
|
|
880
|
+
emails = emails === true ? [] : emails;
|
|
881
|
+
if (typeof emails !== 'undefined') {
|
|
882
|
+
payload['emails'] = emails;
|
|
883
|
+
}
|
|
884
|
+
if (typeof senderName !== 'undefined') {
|
|
885
|
+
payload['senderName'] = senderName;
|
|
886
|
+
}
|
|
887
|
+
if (typeof senderEmail !== 'undefined') {
|
|
888
|
+
payload['senderEmail'] = senderEmail;
|
|
889
|
+
}
|
|
890
|
+
if (typeof replyTo !== 'undefined') {
|
|
891
|
+
payload['replyTo'] = replyTo;
|
|
892
|
+
}
|
|
893
|
+
if (typeof host !== 'undefined') {
|
|
894
|
+
payload['host'] = host;
|
|
895
|
+
}
|
|
896
|
+
if (typeof port !== 'undefined') {
|
|
897
|
+
payload['port'] = port;
|
|
898
|
+
}
|
|
899
|
+
if (typeof username !== 'undefined') {
|
|
900
|
+
payload['username'] = username;
|
|
901
|
+
}
|
|
902
|
+
if (typeof password !== 'undefined') {
|
|
903
|
+
payload['password'] = password;
|
|
904
|
+
}
|
|
905
|
+
if (typeof secure !== 'undefined') {
|
|
906
|
+
payload['secure'] = secure;
|
|
907
|
+
}
|
|
908
|
+
let response = undefined;
|
|
909
|
+
response = await client.call('post', apiPath, {
|
|
910
|
+
'content-type': 'application/json',
|
|
911
|
+
}, payload);
|
|
912
|
+
if (parseOutput) {
|
|
913
|
+
(0, parser_1.parse)(response);
|
|
914
|
+
}
|
|
915
|
+
return response;
|
|
916
|
+
};
|
|
917
|
+
exports.projectsCreateSMTPTest = projectsCreateSMTPTest;
|
|
918
|
+
const projectsUpdateTeam = async ({ projectId, teamId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
919
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
920
|
+
sdk;
|
|
921
|
+
let apiPath = '/projects/{projectId}/team'.replace('{projectId}', projectId);
|
|
922
|
+
let payload = {};
|
|
923
|
+
if (typeof teamId !== 'undefined') {
|
|
924
|
+
payload['teamId'] = teamId;
|
|
925
|
+
}
|
|
926
|
+
let response = undefined;
|
|
927
|
+
response = await client.call('patch', apiPath, {
|
|
928
|
+
'content-type': 'application/json',
|
|
929
|
+
}, payload);
|
|
930
|
+
if (parseOutput) {
|
|
931
|
+
(0, parser_1.parse)(response);
|
|
932
|
+
}
|
|
933
|
+
return response;
|
|
934
|
+
};
|
|
935
|
+
exports.projectsUpdateTeam = projectsUpdateTeam;
|
|
936
|
+
const projectsGetEmailTemplate = async ({ projectId, type, locale, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
937
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
938
|
+
sdk;
|
|
939
|
+
let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
940
|
+
let payload = {};
|
|
941
|
+
let response = undefined;
|
|
942
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
943
|
+
if (parseOutput) {
|
|
944
|
+
(0, parser_1.parse)(response);
|
|
945
|
+
}
|
|
946
|
+
return response;
|
|
947
|
+
};
|
|
948
|
+
exports.projectsGetEmailTemplate = projectsGetEmailTemplate;
|
|
949
|
+
const projectsUpdateEmailTemplate = async ({ projectId, type, locale, subject, message, senderName, senderEmail, replyTo, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
950
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
951
|
+
sdk;
|
|
952
|
+
let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
953
|
+
let payload = {};
|
|
954
|
+
if (typeof subject !== 'undefined') {
|
|
955
|
+
payload['subject'] = subject;
|
|
956
|
+
}
|
|
957
|
+
if (typeof message !== 'undefined') {
|
|
958
|
+
payload['message'] = message;
|
|
959
|
+
}
|
|
960
|
+
if (typeof senderName !== 'undefined') {
|
|
961
|
+
payload['senderName'] = senderName;
|
|
962
|
+
}
|
|
963
|
+
if (typeof senderEmail !== 'undefined') {
|
|
964
|
+
payload['senderEmail'] = senderEmail;
|
|
965
|
+
}
|
|
966
|
+
if (typeof replyTo !== 'undefined') {
|
|
967
|
+
payload['replyTo'] = replyTo;
|
|
968
|
+
}
|
|
969
|
+
let response = undefined;
|
|
970
|
+
response = await client.call('patch', apiPath, {
|
|
971
|
+
'content-type': 'application/json',
|
|
972
|
+
}, payload);
|
|
973
|
+
if (parseOutput) {
|
|
974
|
+
(0, parser_1.parse)(response);
|
|
975
|
+
}
|
|
976
|
+
return response;
|
|
977
|
+
};
|
|
978
|
+
exports.projectsUpdateEmailTemplate = projectsUpdateEmailTemplate;
|
|
979
|
+
const projectsDeleteEmailTemplate = async ({ projectId, type, locale, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
980
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
981
|
+
sdk;
|
|
982
|
+
let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
983
|
+
let payload = {};
|
|
984
|
+
let response = undefined;
|
|
985
|
+
response = await client.call('delete', apiPath, {
|
|
986
|
+
'content-type': 'application/json',
|
|
987
|
+
}, payload);
|
|
988
|
+
if (parseOutput) {
|
|
989
|
+
(0, parser_1.parse)(response);
|
|
990
|
+
}
|
|
991
|
+
return response;
|
|
992
|
+
};
|
|
993
|
+
exports.projectsDeleteEmailTemplate = projectsDeleteEmailTemplate;
|
|
994
|
+
const projectsGetSMSTemplate = async ({ projectId, type, locale, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
995
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
996
|
+
sdk;
|
|
997
|
+
let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
998
|
+
let payload = {};
|
|
999
|
+
let response = undefined;
|
|
1000
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
1001
|
+
if (parseOutput) {
|
|
1002
|
+
(0, parser_1.parse)(response);
|
|
1003
|
+
}
|
|
1004
|
+
return response;
|
|
1005
|
+
};
|
|
1006
|
+
exports.projectsGetSMSTemplate = projectsGetSMSTemplate;
|
|
1007
|
+
const projectsUpdateSMSTemplate = async ({ projectId, type, locale, message, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
1008
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
1009
|
+
sdk;
|
|
1010
|
+
let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1011
|
+
let payload = {};
|
|
1012
|
+
if (typeof message !== 'undefined') {
|
|
1013
|
+
payload['message'] = message;
|
|
1014
|
+
}
|
|
1015
|
+
let response = undefined;
|
|
1016
|
+
response = await client.call('patch', apiPath, {
|
|
1017
|
+
'content-type': 'application/json',
|
|
1018
|
+
}, payload);
|
|
1019
|
+
if (parseOutput) {
|
|
1020
|
+
(0, parser_1.parse)(response);
|
|
1021
|
+
}
|
|
1022
|
+
return response;
|
|
1023
|
+
};
|
|
1024
|
+
exports.projectsUpdateSMSTemplate = projectsUpdateSMSTemplate;
|
|
1025
|
+
const projectsDeleteSMSTemplate = async ({ projectId, type, locale, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
1026
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
1027
|
+
sdk;
|
|
1028
|
+
let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
|
|
1029
|
+
let payload = {};
|
|
1030
|
+
let response = undefined;
|
|
1031
|
+
response = await client.call('delete', apiPath, {
|
|
1032
|
+
'content-type': 'application/json',
|
|
1033
|
+
}, payload);
|
|
1034
|
+
if (parseOutput) {
|
|
1035
|
+
(0, parser_1.parse)(response);
|
|
1036
|
+
}
|
|
1037
|
+
return response;
|
|
1038
|
+
};
|
|
1039
|
+
exports.projectsDeleteSMSTemplate = projectsDeleteSMSTemplate;
|
|
1040
|
+
const projectsListWebhooks = async ({ projectId, total, parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
|
|
1041
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
1042
|
+
sdk;
|
|
1043
|
+
let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
|
|
1044
|
+
let payload = {};
|
|
1045
|
+
if (typeof total !== 'undefined') {
|
|
1046
|
+
payload['total'] = total;
|
|
1047
|
+
}
|
|
1048
|
+
let response = undefined;
|
|
1049
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
1050
|
+
if (parseOutput) {
|
|
1051
|
+
if (showConsole) {
|
|
1052
|
+
(0, utils_1.showConsoleLink)('projects', 'listWebhooks', projectId);
|
|
1053
|
+
}
|
|
1054
|
+
else {
|
|
1055
|
+
(0, parser_1.parse)(response);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
return response;
|
|
1059
|
+
};
|
|
1060
|
+
exports.projectsListWebhooks = projectsListWebhooks;
|
|
1061
|
+
const projectsCreateWebhook = async ({ projectId, name, events, url, security, enabled, httpUser, httpPass, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
1062
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
1063
|
+
sdk;
|
|
1064
|
+
let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
|
|
1065
|
+
let payload = {};
|
|
1066
|
+
if (typeof name !== 'undefined') {
|
|
1067
|
+
payload['name'] = name;
|
|
1068
|
+
}
|
|
1069
|
+
if (typeof enabled !== 'undefined') {
|
|
1070
|
+
payload['enabled'] = enabled;
|
|
1071
|
+
}
|
|
1072
|
+
events = events === true ? [] : events;
|
|
1073
|
+
if (typeof events !== 'undefined') {
|
|
1074
|
+
payload['events'] = events;
|
|
1075
|
+
}
|
|
1076
|
+
if (typeof url !== 'undefined') {
|
|
1077
|
+
payload['url'] = url;
|
|
1078
|
+
}
|
|
1079
|
+
if (typeof security !== 'undefined') {
|
|
1080
|
+
payload['security'] = security;
|
|
1081
|
+
}
|
|
1082
|
+
if (typeof httpUser !== 'undefined') {
|
|
1083
|
+
payload['httpUser'] = httpUser;
|
|
1084
|
+
}
|
|
1085
|
+
if (typeof httpPass !== 'undefined') {
|
|
1086
|
+
payload['httpPass'] = httpPass;
|
|
1087
|
+
}
|
|
1088
|
+
let response = undefined;
|
|
1089
|
+
response = await client.call('post', apiPath, {
|
|
1090
|
+
'content-type': 'application/json',
|
|
1091
|
+
}, payload);
|
|
1092
|
+
if (parseOutput) {
|
|
1093
|
+
(0, parser_1.parse)(response);
|
|
1094
|
+
}
|
|
1095
|
+
return response;
|
|
1096
|
+
};
|
|
1097
|
+
exports.projectsCreateWebhook = projectsCreateWebhook;
|
|
1098
|
+
const projectsGetWebhook = async ({ projectId, webhookId, parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole }) => {
|
|
1099
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
1100
|
+
sdk;
|
|
1101
|
+
let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1102
|
+
let payload = {};
|
|
1103
|
+
let response = undefined;
|
|
1104
|
+
response = await client.call('get', apiPath, {}, payload);
|
|
1105
|
+
if (parseOutput) {
|
|
1106
|
+
if (showConsole) {
|
|
1107
|
+
(0, utils_1.showConsoleLink)('projects', 'getWebhook', projectId, webhookId);
|
|
1108
|
+
}
|
|
1109
|
+
else {
|
|
1110
|
+
(0, parser_1.parse)(response);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
return response;
|
|
1114
|
+
};
|
|
1115
|
+
exports.projectsGetWebhook = projectsGetWebhook;
|
|
1116
|
+
const projectsUpdateWebhook = async ({ projectId, webhookId, name, events, url, security, enabled, httpUser, httpPass, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
1117
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
1118
|
+
sdk;
|
|
1119
|
+
let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1120
|
+
let payload = {};
|
|
1121
|
+
if (typeof name !== 'undefined') {
|
|
1122
|
+
payload['name'] = name;
|
|
1123
|
+
}
|
|
1124
|
+
if (typeof enabled !== 'undefined') {
|
|
1125
|
+
payload['enabled'] = enabled;
|
|
1126
|
+
}
|
|
1127
|
+
events = events === true ? [] : events;
|
|
1128
|
+
if (typeof events !== 'undefined') {
|
|
1129
|
+
payload['events'] = events;
|
|
1130
|
+
}
|
|
1131
|
+
if (typeof url !== 'undefined') {
|
|
1132
|
+
payload['url'] = url;
|
|
1133
|
+
}
|
|
1134
|
+
if (typeof security !== 'undefined') {
|
|
1135
|
+
payload['security'] = security;
|
|
1136
|
+
}
|
|
1137
|
+
if (typeof httpUser !== 'undefined') {
|
|
1138
|
+
payload['httpUser'] = httpUser;
|
|
1139
|
+
}
|
|
1140
|
+
if (typeof httpPass !== 'undefined') {
|
|
1141
|
+
payload['httpPass'] = httpPass;
|
|
1142
|
+
}
|
|
1143
|
+
let response = undefined;
|
|
1144
|
+
response = await client.call('put', apiPath, {
|
|
1145
|
+
'content-type': 'application/json',
|
|
1146
|
+
}, payload);
|
|
1147
|
+
if (parseOutput) {
|
|
1148
|
+
(0, parser_1.parse)(response);
|
|
1149
|
+
}
|
|
1150
|
+
return response;
|
|
1151
|
+
};
|
|
1152
|
+
exports.projectsUpdateWebhook = projectsUpdateWebhook;
|
|
1153
|
+
const projectsDeleteWebhook = async ({ projectId, webhookId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
1154
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
1155
|
+
sdk;
|
|
1156
|
+
let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1157
|
+
let payload = {};
|
|
1158
|
+
let response = undefined;
|
|
1159
|
+
response = await client.call('delete', apiPath, {
|
|
1160
|
+
'content-type': 'application/json',
|
|
1161
|
+
}, payload);
|
|
1162
|
+
if (parseOutput) {
|
|
1163
|
+
(0, parser_1.parse)(response);
|
|
1164
|
+
}
|
|
1165
|
+
return response;
|
|
1166
|
+
};
|
|
1167
|
+
exports.projectsDeleteWebhook = projectsDeleteWebhook;
|
|
1168
|
+
const projectsUpdateWebhookSignature = async ({ projectId, webhookId, parseOutput = true, overrideForCli = false, sdk = undefined }) => {
|
|
1169
|
+
let client = !sdk ? await (0, sdks_1.sdkForConsole)() :
|
|
1170
|
+
sdk;
|
|
1171
|
+
let apiPath = '/projects/{projectId}/webhooks/{webhookId}/signature'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
|
|
1172
|
+
let payload = {};
|
|
1173
|
+
let response = undefined;
|
|
1174
|
+
response = await client.call('patch', apiPath, {
|
|
1175
|
+
'content-type': 'application/json',
|
|
1176
|
+
}, payload);
|
|
1177
|
+
if (parseOutput) {
|
|
1178
|
+
(0, parser_1.parse)(response);
|
|
1179
|
+
}
|
|
1180
|
+
return response;
|
|
1181
|
+
};
|
|
1182
|
+
exports.projectsUpdateWebhookSignature = projectsUpdateWebhookSignature;
|
|
1183
|
+
exports.projects
|
|
1184
|
+
.command(`list`)
|
|
1185
|
+
.description(`Get a list of all projects. You can use the query params to filter your results. `)
|
|
1186
|
+
.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, teamId`)
|
|
1187
|
+
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
1188
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1189
|
+
.option(`--console`, `Get the resource console url`)
|
|
1190
|
+
.action((0, parser_1.actionRunner)(exports.projectsList));
|
|
1191
|
+
exports.projects
|
|
1192
|
+
.command(`create`)
|
|
1193
|
+
.description(`Create a new project. You can create a maximum of 100 projects per account. `)
|
|
1194
|
+
.requiredOption(`--project-id <project-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.`)
|
|
1195
|
+
.requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
|
|
1196
|
+
.requiredOption(`--team-id <team-id>`, `Team unique ID.`)
|
|
1197
|
+
.option(`--region <region>`, `Project Region.`)
|
|
1198
|
+
.option(`--description <description>`, `Project description. Max length: 256 chars.`)
|
|
1199
|
+
.option(`--logo <logo>`, `Project logo.`)
|
|
1200
|
+
.option(`--url <url>`, `Project URL.`)
|
|
1201
|
+
.option(`--legal-name <legal-name>`, `Project legal Name. Max length: 256 chars.`)
|
|
1202
|
+
.option(`--legal-country <legal-country>`, `Project legal Country. Max length: 256 chars.`)
|
|
1203
|
+
.option(`--legal-state <legal-state>`, `Project legal State. Max length: 256 chars.`)
|
|
1204
|
+
.option(`--legal-city <legal-city>`, `Project legal City. Max length: 256 chars.`)
|
|
1205
|
+
.option(`--legal-address <legal-address>`, `Project legal Address. Max length: 256 chars.`)
|
|
1206
|
+
.option(`--legal-tax-id <legal-tax-id>`, `Project legal Tax ID. Max length: 256 chars.`)
|
|
1207
|
+
.action((0, parser_1.actionRunner)(exports.projectsCreate));
|
|
1208
|
+
exports.projects
|
|
1209
|
+
.command(`get`)
|
|
1210
|
+
.description(`Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. `)
|
|
1211
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1212
|
+
.option(`--console`, `Get the resource console url`)
|
|
1213
|
+
.action((0, parser_1.actionRunner)(exports.projectsGet));
|
|
1214
|
+
exports.projects
|
|
1215
|
+
.command(`update`)
|
|
1216
|
+
.description(`Update a project by its unique ID.`)
|
|
1217
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1218
|
+
.requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
|
|
1219
|
+
.option(`--description <description>`, `Project description. Max length: 256 chars.`)
|
|
1220
|
+
.option(`--logo <logo>`, `Project logo.`)
|
|
1221
|
+
.option(`--url <url>`, `Project URL.`)
|
|
1222
|
+
.option(`--legal-name <legal-name>`, `Project legal name. Max length: 256 chars.`)
|
|
1223
|
+
.option(`--legal-country <legal-country>`, `Project legal country. Max length: 256 chars.`)
|
|
1224
|
+
.option(`--legal-state <legal-state>`, `Project legal state. Max length: 256 chars.`)
|
|
1225
|
+
.option(`--legal-city <legal-city>`, `Project legal city. Max length: 256 chars.`)
|
|
1226
|
+
.option(`--legal-address <legal-address>`, `Project legal address. Max length: 256 chars.`)
|
|
1227
|
+
.option(`--legal-tax-id <legal-tax-id>`, `Project legal tax ID. Max length: 256 chars.`)
|
|
1228
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdate));
|
|
1229
|
+
exports.projects
|
|
1230
|
+
.command(`delete`)
|
|
1231
|
+
.description(`Delete a project by its unique ID.`)
|
|
1232
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1233
|
+
.action((0, parser_1.actionRunner)(exports.projectsDelete));
|
|
1234
|
+
exports.projects
|
|
1235
|
+
.command(`update-api-status`)
|
|
1236
|
+
.description(`Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`)
|
|
1237
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1238
|
+
.requiredOption(`--api <api>`, `API name.`)
|
|
1239
|
+
.requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1240
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateAPIStatus));
|
|
1241
|
+
exports.projects
|
|
1242
|
+
.command(`update-api-status-all`)
|
|
1243
|
+
.description(`Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.`)
|
|
1244
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1245
|
+
.requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1246
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateAPIStatusAll));
|
|
1247
|
+
exports.projects
|
|
1248
|
+
.command(`update-auth-duration`)
|
|
1249
|
+
.description(`Update how long sessions created within a project should stay active for.`)
|
|
1250
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1251
|
+
.requiredOption(`--duration <duration>`, `Project session length in seconds. Max length: 31536000 seconds.`, parser_1.parseInteger)
|
|
1252
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateAuthDuration));
|
|
1253
|
+
exports.projects
|
|
1254
|
+
.command(`update-auth-limit`)
|
|
1255
|
+
.description(`Update the maximum number of users allowed in this project. Set to 0 for unlimited users. `)
|
|
1256
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1257
|
+
.requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Use 0 for unlimited.`, parser_1.parseInteger)
|
|
1258
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateAuthLimit));
|
|
1259
|
+
exports.projects
|
|
1260
|
+
.command(`update-auth-sessions-limit`)
|
|
1261
|
+
.description(`Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.`)
|
|
1262
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1263
|
+
.requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10`, parser_1.parseInteger)
|
|
1264
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateAuthSessionsLimit));
|
|
1265
|
+
exports.projects
|
|
1266
|
+
.command(`update-memberships-privacy`)
|
|
1267
|
+
.description(`Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. `)
|
|
1268
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1269
|
+
.requiredOption(`--user-name [value]`, `Set to true to show userName to members of a team.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1270
|
+
.requiredOption(`--user-email [value]`, `Set to true to show email to members of a team.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1271
|
+
.requiredOption(`--mfa [value]`, `Set to true to show mfa to members of a team.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1272
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateMembershipsPrivacy));
|
|
1273
|
+
exports.projects
|
|
1274
|
+
.command(`update-mock-numbers`)
|
|
1275
|
+
.description(`Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. `)
|
|
1276
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1277
|
+
.requiredOption(`--numbers [numbers...]`, `An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.`)
|
|
1278
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateMockNumbers));
|
|
1279
|
+
exports.projects
|
|
1280
|
+
.command(`update-auth-password-dictionary`)
|
|
1281
|
+
.description(`Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. `)
|
|
1282
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1283
|
+
.requiredOption(`--enabled [value]`, `Set whether or not to enable checking user's password against most commonly used passwords. Default is false.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1284
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateAuthPasswordDictionary));
|
|
1285
|
+
exports.projects
|
|
1286
|
+
.command(`update-auth-password-history`)
|
|
1287
|
+
.description(`Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.`)
|
|
1288
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1289
|
+
.requiredOption(`--limit <limit>`, `Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0`, parser_1.parseInteger)
|
|
1290
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateAuthPasswordHistory));
|
|
1291
|
+
exports.projects
|
|
1292
|
+
.command(`update-personal-data-check`)
|
|
1293
|
+
.description(`Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. `)
|
|
1294
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1295
|
+
.requiredOption(`--enabled [value]`, `Set whether or not to check a password for similarity with personal data. Default is false.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1296
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdatePersonalDataCheck));
|
|
1297
|
+
exports.projects
|
|
1298
|
+
.command(`update-session-alerts`)
|
|
1299
|
+
.description(`Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.`)
|
|
1300
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1301
|
+
.requiredOption(`--alerts [value]`, `Set to true to enable session emails.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1302
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateSessionAlerts));
|
|
1303
|
+
exports.projects
|
|
1304
|
+
.command(`update-session-invalidation`)
|
|
1305
|
+
.description(`Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.`)
|
|
1306
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1307
|
+
.requiredOption(`--enabled [value]`, `Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1308
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateSessionInvalidation));
|
|
1309
|
+
exports.projects
|
|
1310
|
+
.command(`update-auth-status`)
|
|
1311
|
+
.description(`Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. `)
|
|
1312
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1313
|
+
.requiredOption(`--method <method>`, `Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone`)
|
|
1314
|
+
.requiredOption(`--status [value]`, `Set the status of this auth method.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1315
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateAuthStatus));
|
|
1316
|
+
exports.projects
|
|
1317
|
+
.command(`list-dev-keys`)
|
|
1318
|
+
.description(`List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'`)
|
|
1319
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1320
|
+
.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: accessedAt, expire`)
|
|
1321
|
+
.option(`--console`, `Get the resource console url`)
|
|
1322
|
+
.action((0, parser_1.actionRunner)(exports.projectsListDevKeys));
|
|
1323
|
+
exports.projects
|
|
1324
|
+
.command(`create-dev-key`)
|
|
1325
|
+
.description(`Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.`)
|
|
1326
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1327
|
+
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
1328
|
+
.requiredOption(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.`)
|
|
1329
|
+
.action((0, parser_1.actionRunner)(exports.projectsCreateDevKey));
|
|
1330
|
+
exports.projects
|
|
1331
|
+
.command(`get-dev-key`)
|
|
1332
|
+
.description(`Get a project\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.`)
|
|
1333
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1334
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
1335
|
+
.option(`--console`, `Get the resource console url`)
|
|
1336
|
+
.action((0, parser_1.actionRunner)(exports.projectsGetDevKey));
|
|
1337
|
+
exports.projects
|
|
1338
|
+
.command(`update-dev-key`)
|
|
1339
|
+
.description(`Update a project\'s dev key by its unique ID. Use this endpoint to update a project\'s dev key name or expiration time.'`)
|
|
1340
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1341
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
1342
|
+
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
1343
|
+
.requiredOption(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.`)
|
|
1344
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateDevKey));
|
|
1345
|
+
exports.projects
|
|
1346
|
+
.command(`delete-dev-key`)
|
|
1347
|
+
.description(`Delete a project\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.`)
|
|
1348
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1349
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
1350
|
+
.action((0, parser_1.actionRunner)(exports.projectsDeleteDevKey));
|
|
1351
|
+
exports.projects
|
|
1352
|
+
.command(`create-jwt`)
|
|
1353
|
+
.description(`Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. `)
|
|
1354
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1355
|
+
.requiredOption(`--scopes [scopes...]`, `List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.`)
|
|
1356
|
+
.option(`--duration <duration>`, `Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`, parser_1.parseInteger)
|
|
1357
|
+
.action((0, parser_1.actionRunner)(exports.projectsCreateJWT));
|
|
1358
|
+
exports.projects
|
|
1359
|
+
.command(`list-keys`)
|
|
1360
|
+
.description(`Get a list of all API keys from the current project. `)
|
|
1361
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1362
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1363
|
+
.option(`--console`, `Get the resource console url`)
|
|
1364
|
+
.action((0, parser_1.actionRunner)(exports.projectsListKeys));
|
|
1365
|
+
exports.projects
|
|
1366
|
+
.command(`create-key`)
|
|
1367
|
+
.description(`Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.`)
|
|
1368
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1369
|
+
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
1370
|
+
.option(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
|
|
1371
|
+
.option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`)
|
|
1372
|
+
.action((0, parser_1.actionRunner)(exports.projectsCreateKey));
|
|
1373
|
+
exports.projects
|
|
1374
|
+
.command(`get-key`)
|
|
1375
|
+
.description(`Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.`)
|
|
1376
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1377
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
1378
|
+
.option(`--console`, `Get the resource console url`)
|
|
1379
|
+
.action((0, parser_1.actionRunner)(exports.projectsGetKey));
|
|
1380
|
+
exports.projects
|
|
1381
|
+
.command(`update-key`)
|
|
1382
|
+
.description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. `)
|
|
1383
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1384
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
1385
|
+
.requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
|
|
1386
|
+
.option(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 events are allowed.`)
|
|
1387
|
+
.option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`)
|
|
1388
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateKey));
|
|
1389
|
+
exports.projects
|
|
1390
|
+
.command(`delete-key`)
|
|
1391
|
+
.description(`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. `)
|
|
1392
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1393
|
+
.requiredOption(`--key-id <key-id>`, `Key unique ID.`)
|
|
1394
|
+
.action((0, parser_1.actionRunner)(exports.projectsDeleteKey));
|
|
1395
|
+
exports.projects
|
|
1396
|
+
.command(`update-o-auth-2`)
|
|
1397
|
+
.description(`Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers. `)
|
|
1398
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1399
|
+
.requiredOption(`--provider <provider>`, `Provider Name`)
|
|
1400
|
+
.option(`--app-id <app-id>`, `Provider app ID. Max length: 256 chars.`)
|
|
1401
|
+
.option(`--secret <secret>`, `Provider secret key. Max length: 512 chars.`)
|
|
1402
|
+
.option(`--enabled [value]`, `Provider status. Set to 'false' to disable new session creation.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1403
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateOAuth2));
|
|
1404
|
+
exports.projects
|
|
1405
|
+
.command(`list-platforms`)
|
|
1406
|
+
.description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. `)
|
|
1407
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1408
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1409
|
+
.option(`--console`, `Get the resource console url`)
|
|
1410
|
+
.action((0, parser_1.actionRunner)(exports.projectsListPlatforms));
|
|
1411
|
+
exports.projects
|
|
1412
|
+
.command(`create-platform`)
|
|
1413
|
+
.description(`Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.`)
|
|
1414
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1415
|
+
.requiredOption(`--type <type>`, `Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.`)
|
|
1416
|
+
.requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
|
|
1417
|
+
.option(`--key <key>`, `Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.`)
|
|
1418
|
+
.option(`--store <store>`, `App store or Google Play store ID. Max length: 256 chars.`)
|
|
1419
|
+
.option(`--hostname <hostname>`, `Platform client hostname. Max length: 256 chars.`)
|
|
1420
|
+
.action((0, parser_1.actionRunner)(exports.projectsCreatePlatform));
|
|
1421
|
+
exports.projects
|
|
1422
|
+
.command(`get-platform`)
|
|
1423
|
+
.description(`Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. `)
|
|
1424
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1425
|
+
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
1426
|
+
.option(`--console`, `Get the resource console url`)
|
|
1427
|
+
.action((0, parser_1.actionRunner)(exports.projectsGetPlatform));
|
|
1428
|
+
exports.projects
|
|
1429
|
+
.command(`update-platform`)
|
|
1430
|
+
.description(`Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. `)
|
|
1431
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1432
|
+
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
1433
|
+
.requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
|
|
1434
|
+
.option(`--key <key>`, `Package name for android or bundle ID for iOS. Max length: 256 chars.`)
|
|
1435
|
+
.option(`--store <store>`, `App store or Google Play store ID. Max length: 256 chars.`)
|
|
1436
|
+
.option(`--hostname <hostname>`, `Platform client URL. Max length: 256 chars.`)
|
|
1437
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdatePlatform));
|
|
1438
|
+
exports.projects
|
|
1439
|
+
.command(`delete-platform`)
|
|
1440
|
+
.description(`Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. `)
|
|
1441
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1442
|
+
.requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
|
|
1443
|
+
.action((0, parser_1.actionRunner)(exports.projectsDeletePlatform));
|
|
1444
|
+
exports.projects
|
|
1445
|
+
.command(`update-service-status`)
|
|
1446
|
+
.description(`Update the status of a specific service. Use this endpoint to enable or disable a service in your project. `)
|
|
1447
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1448
|
+
.requiredOption(`--service <service>`, `Service name.`)
|
|
1449
|
+
.requiredOption(`--status [value]`, `Service status.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1450
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateServiceStatus));
|
|
1451
|
+
exports.projects
|
|
1452
|
+
.command(`update-service-status-all`)
|
|
1453
|
+
.description(`Update the status of all services. Use this endpoint to enable or disable all optional services at once. `)
|
|
1454
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1455
|
+
.requiredOption(`--status [value]`, `Service status.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1456
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateServiceStatusAll));
|
|
1457
|
+
exports.projects
|
|
1458
|
+
.command(`update-smtp`)
|
|
1459
|
+
.description(`Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. `)
|
|
1460
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1461
|
+
.requiredOption(`--enabled [value]`, `Enable custom SMTP service`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1462
|
+
.option(`--sender-name <sender-name>`, `Name of the email sender`)
|
|
1463
|
+
.option(`--sender-email <sender-email>`, `Email of the sender`)
|
|
1464
|
+
.option(`--reply-to <reply-to>`, `Reply to email`)
|
|
1465
|
+
.option(`--host <host>`, `SMTP server host name`)
|
|
1466
|
+
.option(`--port <port>`, `SMTP server port`, parser_1.parseInteger)
|
|
1467
|
+
.option(`--username <username>`, `SMTP server username`)
|
|
1468
|
+
.option(`--password <password>`, `SMTP server password`)
|
|
1469
|
+
.option(`--secure <secure>`, `Does SMTP server use secure connection`)
|
|
1470
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateSMTP));
|
|
1471
|
+
exports.projects
|
|
1472
|
+
.command(`create-smtp-test`)
|
|
1473
|
+
.description(`Send a test email to verify SMTP configuration. `)
|
|
1474
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1475
|
+
.requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`)
|
|
1476
|
+
.requiredOption(`--sender-name <sender-name>`, `Name of the email sender`)
|
|
1477
|
+
.requiredOption(`--sender-email <sender-email>`, `Email of the sender`)
|
|
1478
|
+
.requiredOption(`--host <host>`, `SMTP server host name`)
|
|
1479
|
+
.option(`--reply-to <reply-to>`, `Reply to email`)
|
|
1480
|
+
.option(`--port <port>`, `SMTP server port`, parser_1.parseInteger)
|
|
1481
|
+
.option(`--username <username>`, `SMTP server username`)
|
|
1482
|
+
.option(`--password <password>`, `SMTP server password`)
|
|
1483
|
+
.option(`--secure <secure>`, `Does SMTP server use secure connection`)
|
|
1484
|
+
.action((0, parser_1.actionRunner)(exports.projectsCreateSMTPTest));
|
|
1485
|
+
exports.projects
|
|
1486
|
+
.command(`update-team`)
|
|
1487
|
+
.description(`Update the team ID of a project allowing for it to be transferred to another team.`)
|
|
1488
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1489
|
+
.requiredOption(`--team-id <team-id>`, `Team ID of the team to transfer project to.`)
|
|
1490
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateTeam));
|
|
1491
|
+
exports.projects
|
|
1492
|
+
.command(`get-email-template`)
|
|
1493
|
+
.description(`Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. `)
|
|
1494
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1495
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
1496
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1497
|
+
.action((0, parser_1.actionRunner)(exports.projectsGetEmailTemplate));
|
|
1498
|
+
exports.projects
|
|
1499
|
+
.command(`update-email-template`)
|
|
1500
|
+
.description(`Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.`)
|
|
1501
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1502
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
1503
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1504
|
+
.requiredOption(`--subject <subject>`, `Email Subject`)
|
|
1505
|
+
.requiredOption(`--message <message>`, `Template message`)
|
|
1506
|
+
.option(`--sender-name <sender-name>`, `Name of the email sender`)
|
|
1507
|
+
.option(`--sender-email <sender-email>`, `Email of the sender`)
|
|
1508
|
+
.option(`--reply-to <reply-to>`, `Reply to email`)
|
|
1509
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateEmailTemplate));
|
|
1510
|
+
exports.projects
|
|
1511
|
+
.command(`delete-email-template`)
|
|
1512
|
+
.description(`Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. `)
|
|
1513
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1514
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
1515
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1516
|
+
.action((0, parser_1.actionRunner)(exports.projectsDeleteEmailTemplate));
|
|
1517
|
+
exports.projects
|
|
1518
|
+
.command(`get-sms-template`)
|
|
1519
|
+
.description(`Get a custom SMS template for the specified locale and type returning it's contents.`)
|
|
1520
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1521
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
1522
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1523
|
+
.action((0, parser_1.actionRunner)(exports.projectsGetSMSTemplate));
|
|
1524
|
+
exports.projects
|
|
1525
|
+
.command(`update-sms-template`)
|
|
1526
|
+
.description(`Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `)
|
|
1527
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1528
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
1529
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1530
|
+
.requiredOption(`--message <message>`, `Template message`)
|
|
1531
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateSMSTemplate));
|
|
1532
|
+
exports.projects
|
|
1533
|
+
.command(`delete-sms-template`)
|
|
1534
|
+
.description(`Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `)
|
|
1535
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1536
|
+
.requiredOption(`--type <type>`, `Template type`)
|
|
1537
|
+
.requiredOption(`--locale <locale>`, `Template locale`)
|
|
1538
|
+
.action((0, parser_1.actionRunner)(exports.projectsDeleteSMSTemplate));
|
|
1539
|
+
exports.projects
|
|
1540
|
+
.command(`list-webhooks`)
|
|
1541
|
+
.description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `)
|
|
1542
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1543
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1544
|
+
.option(`--console`, `Get the resource console url`)
|
|
1545
|
+
.action((0, parser_1.actionRunner)(exports.projectsListWebhooks));
|
|
1546
|
+
exports.projects
|
|
1547
|
+
.command(`create-webhook`)
|
|
1548
|
+
.description(`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. `)
|
|
1549
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1550
|
+
.requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
|
|
1551
|
+
.requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
|
|
1552
|
+
.requiredOption(`--url <url>`, `Webhook URL.`)
|
|
1553
|
+
.requiredOption(`--security [value]`, `Certificate verification, false for disabled or true for enabled.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1554
|
+
.option(`--enabled [value]`, `Enable or disable a webhook.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1555
|
+
.option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`)
|
|
1556
|
+
.option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`)
|
|
1557
|
+
.action((0, parser_1.actionRunner)(exports.projectsCreateWebhook));
|
|
1558
|
+
exports.projects
|
|
1559
|
+
.command(`get-webhook`)
|
|
1560
|
+
.description(`Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. `)
|
|
1561
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1562
|
+
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1563
|
+
.option(`--console`, `Get the resource console url`)
|
|
1564
|
+
.action((0, parser_1.actionRunner)(exports.projectsGetWebhook));
|
|
1565
|
+
exports.projects
|
|
1566
|
+
.command(`update-webhook`)
|
|
1567
|
+
.description(`Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. `)
|
|
1568
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1569
|
+
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1570
|
+
.requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
|
|
1571
|
+
.requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
|
|
1572
|
+
.requiredOption(`--url <url>`, `Webhook URL.`)
|
|
1573
|
+
.requiredOption(`--security [value]`, `Certificate verification, false for disabled or true for enabled.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1574
|
+
.option(`--enabled [value]`, `Enable or disable a webhook.`, (value) => value === undefined ? true : (0, parser_1.parseBool)(value))
|
|
1575
|
+
.option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`)
|
|
1576
|
+
.option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`)
|
|
1577
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateWebhook));
|
|
1578
|
+
exports.projects
|
|
1579
|
+
.command(`delete-webhook`)
|
|
1580
|
+
.description(`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `)
|
|
1581
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1582
|
+
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1583
|
+
.action((0, parser_1.actionRunner)(exports.projectsDeleteWebhook));
|
|
1584
|
+
exports.projects
|
|
1585
|
+
.command(`update-webhook-signature`)
|
|
1586
|
+
.description(`Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. `)
|
|
1587
|
+
.requiredOption(`--project-id <project-id>`, `Project unique ID.`)
|
|
1588
|
+
.requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
|
|
1589
|
+
.action((0, parser_1.actionRunner)(exports.projectsUpdateWebhookSignature));
|
|
1590
|
+
//# sourceMappingURL=projects.js.map
|