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
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @param {fs.ReadStream} readStream
|
|
17
|
-
* @returns {ReadableStream}
|
|
18
|
-
*/
|
|
19
|
-
function convertReadStreamToReadableStream(readStream) {
|
|
1
|
+
import fs = require('fs');
|
|
2
|
+
import pathLib = require('path');
|
|
3
|
+
import tar = require('tar');
|
|
4
|
+
import ignore = require('ignore');
|
|
5
|
+
import { promisify } from 'util';
|
|
6
|
+
import Client from '../client';
|
|
7
|
+
import { getAllFiles, showConsoleLink } from '../utils';
|
|
8
|
+
import { Command } from 'commander';
|
|
9
|
+
import { sdkForProject, sdkForConsole } from '../sdks';
|
|
10
|
+
import { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } from '../parser';
|
|
11
|
+
import { localConfig, globalConfig } from '../config';
|
|
12
|
+
import { File } from 'undici';
|
|
13
|
+
import { ReadableStream } from 'stream/web';
|
|
14
|
+
|
|
15
|
+
function convertReadStreamToReadableStream(readStream: fs.ReadStream): ReadableStream {
|
|
20
16
|
return new ReadableStream({
|
|
21
17
|
start(controller) {
|
|
22
|
-
readStream.on("data", (chunk) => {
|
|
18
|
+
readStream.on("data", (chunk: Buffer) => {
|
|
23
19
|
controller.enqueue(chunk);
|
|
24
20
|
});
|
|
25
21
|
readStream.on("end", () => {
|
|
26
22
|
controller.close();
|
|
27
23
|
});
|
|
28
|
-
readStream.on("error", (err) => {
|
|
24
|
+
readStream.on("error", (err: Error) => {
|
|
29
25
|
controller.error(err);
|
|
30
26
|
});
|
|
31
27
|
},
|
|
@@ -35,24 +31,20 @@ function convertReadStreamToReadableStream(readStream) {
|
|
|
35
31
|
});
|
|
36
32
|
}
|
|
37
33
|
|
|
38
|
-
const migrations = new Command("migrations").description(commandDescriptions['migrations'] ?? '').configureHelp({
|
|
34
|
+
export const migrations = new Command("migrations").description(commandDescriptions['migrations'] ?? '').configureHelp({
|
|
39
35
|
helpWidth: process.stdout.columns || 80
|
|
40
36
|
})
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* @param {MigrationsListRequestParams} params
|
|
54
|
-
*/
|
|
55
|
-
const migrationsList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
38
|
+
interface MigrationsListRequestParams {
|
|
39
|
+
queries?: string[];
|
|
40
|
+
search?: string;
|
|
41
|
+
total?: boolean;
|
|
42
|
+
overrideForCli?: boolean;
|
|
43
|
+
parseOutput?: boolean;
|
|
44
|
+
sdk?: Client;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const migrationsList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsListRequestParams): Promise<any> => {
|
|
56
48
|
let client = !sdk ? await sdkForProject() :
|
|
57
49
|
sdk;
|
|
58
50
|
let apiPath = '/migrations';
|
|
@@ -79,21 +71,17 @@ const migrationsList = async ({queries,search,total,parseOutput = true, override
|
|
|
79
71
|
return response;
|
|
80
72
|
|
|
81
73
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* @param {MigrationsCreateAppwriteMigrationRequestParams} params
|
|
95
|
-
*/
|
|
96
|
-
const migrationsCreateAppwriteMigration = async ({resources,endpoint,projectId,apiKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
74
|
+
interface MigrationsCreateAppwriteMigrationRequestParams {
|
|
75
|
+
resources: string[];
|
|
76
|
+
endpoint: string;
|
|
77
|
+
projectId: string;
|
|
78
|
+
apiKey: string;
|
|
79
|
+
overrideForCli?: boolean;
|
|
80
|
+
parseOutput?: boolean;
|
|
81
|
+
sdk?: Client;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const migrationsCreateAppwriteMigration = async ({resources,endpoint,projectId,apiKey,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsCreateAppwriteMigrationRequestParams): Promise<any> => {
|
|
97
85
|
let client = !sdk ? await sdkForProject() :
|
|
98
86
|
sdk;
|
|
99
87
|
let apiPath = '/migrations/appwrite';
|
|
@@ -125,21 +113,17 @@ const migrationsCreateAppwriteMigration = async ({resources,endpoint,projectId,a
|
|
|
125
113
|
return response;
|
|
126
114
|
|
|
127
115
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* @param {MigrationsGetAppwriteReportRequestParams} params
|
|
141
|
-
*/
|
|
142
|
-
const migrationsGetAppwriteReport = async ({resources,endpoint,projectID,key,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
116
|
+
interface MigrationsGetAppwriteReportRequestParams {
|
|
117
|
+
resources: string[];
|
|
118
|
+
endpoint: string;
|
|
119
|
+
projectID: string;
|
|
120
|
+
key: string;
|
|
121
|
+
overrideForCli?: boolean;
|
|
122
|
+
parseOutput?: boolean;
|
|
123
|
+
sdk?: Client;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export const migrationsGetAppwriteReport = async ({resources,endpoint,projectID,key,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsGetAppwriteReportRequestParams): Promise<any> => {
|
|
143
127
|
let client = !sdk ? await sdkForProject() :
|
|
144
128
|
sdk;
|
|
145
129
|
let apiPath = '/migrations/appwrite/report';
|
|
@@ -169,26 +153,22 @@ const migrationsGetAppwriteReport = async ({resources,endpoint,projectID,key,par
|
|
|
169
153
|
return response;
|
|
170
154
|
|
|
171
155
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* @param {MigrationsCreateCSVExportRequestParams} params
|
|
190
|
-
*/
|
|
191
|
-
const migrationsCreateCSVExport = async ({resourceId,filename,columns,queries,delimiter,enclosure,escape,header,notify,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
156
|
+
interface MigrationsCreateCSVExportRequestParams {
|
|
157
|
+
resourceId: string;
|
|
158
|
+
filename: string;
|
|
159
|
+
columns?: string[];
|
|
160
|
+
queries?: string[];
|
|
161
|
+
delimiter?: string;
|
|
162
|
+
enclosure?: string;
|
|
163
|
+
escape?: string;
|
|
164
|
+
header?: boolean;
|
|
165
|
+
notify?: boolean;
|
|
166
|
+
overrideForCli?: boolean;
|
|
167
|
+
parseOutput?: boolean;
|
|
168
|
+
sdk?: Client;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export const migrationsCreateCSVExport = async ({resourceId,filename,columns,queries,delimiter,enclosure,escape,header,notify,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsCreateCSVExportRequestParams): Promise<any> => {
|
|
192
172
|
let client = !sdk ? await sdkForProject() :
|
|
193
173
|
sdk;
|
|
194
174
|
let apiPath = '/migrations/csv/exports';
|
|
@@ -236,21 +216,17 @@ const migrationsCreateCSVExport = async ({resourceId,filename,columns,queries,de
|
|
|
236
216
|
return response;
|
|
237
217
|
|
|
238
218
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* @param {MigrationsCreateCSVImportRequestParams} params
|
|
252
|
-
*/
|
|
253
|
-
const migrationsCreateCSVImport = async ({bucketId,fileId,resourceId,internalFile,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
219
|
+
interface MigrationsCreateCSVImportRequestParams {
|
|
220
|
+
bucketId: string;
|
|
221
|
+
fileId: string;
|
|
222
|
+
resourceId: string;
|
|
223
|
+
internalFile?: boolean;
|
|
224
|
+
overrideForCli?: boolean;
|
|
225
|
+
parseOutput?: boolean;
|
|
226
|
+
sdk?: Client;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export const migrationsCreateCSVImport = async ({bucketId,fileId,resourceId,internalFile,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsCreateCSVImportRequestParams): Promise<any> => {
|
|
254
230
|
let client = !sdk ? await sdkForProject() :
|
|
255
231
|
sdk;
|
|
256
232
|
let apiPath = '/migrations/csv/imports';
|
|
@@ -281,19 +257,15 @@ const migrationsCreateCSVImport = async ({bucketId,fileId,resourceId,internalFil
|
|
|
281
257
|
return response;
|
|
282
258
|
|
|
283
259
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* @param {MigrationsCreateFirebaseMigrationRequestParams} params
|
|
295
|
-
*/
|
|
296
|
-
const migrationsCreateFirebaseMigration = async ({resources,serviceAccount,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
260
|
+
interface MigrationsCreateFirebaseMigrationRequestParams {
|
|
261
|
+
resources: string[];
|
|
262
|
+
serviceAccount: string;
|
|
263
|
+
overrideForCli?: boolean;
|
|
264
|
+
parseOutput?: boolean;
|
|
265
|
+
sdk?: Client;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export const migrationsCreateFirebaseMigration = async ({resources,serviceAccount,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsCreateFirebaseMigrationRequestParams): Promise<any> => {
|
|
297
269
|
let client = !sdk ? await sdkForProject() :
|
|
298
270
|
sdk;
|
|
299
271
|
let apiPath = '/migrations/firebase';
|
|
@@ -319,19 +291,15 @@ const migrationsCreateFirebaseMigration = async ({resources,serviceAccount,parse
|
|
|
319
291
|
return response;
|
|
320
292
|
|
|
321
293
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* @param {MigrationsGetFirebaseReportRequestParams} params
|
|
333
|
-
*/
|
|
334
|
-
const migrationsGetFirebaseReport = async ({resources,serviceAccount,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
294
|
+
interface MigrationsGetFirebaseReportRequestParams {
|
|
295
|
+
resources: string[];
|
|
296
|
+
serviceAccount: string;
|
|
297
|
+
overrideForCli?: boolean;
|
|
298
|
+
parseOutput?: boolean;
|
|
299
|
+
sdk?: Client;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export const migrationsGetFirebaseReport = async ({resources,serviceAccount,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsGetFirebaseReportRequestParams): Promise<any> => {
|
|
335
303
|
let client = !sdk ? await sdkForProject() :
|
|
336
304
|
sdk;
|
|
337
305
|
let apiPath = '/migrations/firebase/report';
|
|
@@ -355,25 +323,21 @@ const migrationsGetFirebaseReport = async ({resources,serviceAccount,parseOutput
|
|
|
355
323
|
return response;
|
|
356
324
|
|
|
357
325
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* @param {MigrationsCreateNHostMigrationRequestParams} params
|
|
375
|
-
*/
|
|
376
|
-
const migrationsCreateNHostMigration = async ({resources,subdomain,region,adminSecret,database,username,password,port,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
326
|
+
interface MigrationsCreateNHostMigrationRequestParams {
|
|
327
|
+
resources: string[];
|
|
328
|
+
subdomain: string;
|
|
329
|
+
region: string;
|
|
330
|
+
adminSecret: string;
|
|
331
|
+
database: string;
|
|
332
|
+
username: string;
|
|
333
|
+
password: string;
|
|
334
|
+
port?: number;
|
|
335
|
+
overrideForCli?: boolean;
|
|
336
|
+
parseOutput?: boolean;
|
|
337
|
+
sdk?: Client;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export const migrationsCreateNHostMigration = async ({resources,subdomain,region,adminSecret,database,username,password,port,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsCreateNHostMigrationRequestParams): Promise<any> => {
|
|
377
341
|
let client = !sdk ? await sdkForProject() :
|
|
378
342
|
sdk;
|
|
379
343
|
let apiPath = '/migrations/nhost';
|
|
@@ -417,25 +381,21 @@ const migrationsCreateNHostMigration = async ({resources,subdomain,region,adminS
|
|
|
417
381
|
return response;
|
|
418
382
|
|
|
419
383
|
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* @param {MigrationsGetNHostReportRequestParams} params
|
|
437
|
-
*/
|
|
438
|
-
const migrationsGetNHostReport = async ({resources,subdomain,region,adminSecret,database,username,password,port,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
384
|
+
interface MigrationsGetNHostReportRequestParams {
|
|
385
|
+
resources: string[];
|
|
386
|
+
subdomain: string;
|
|
387
|
+
region: string;
|
|
388
|
+
adminSecret: string;
|
|
389
|
+
database: string;
|
|
390
|
+
username: string;
|
|
391
|
+
password: string;
|
|
392
|
+
port?: number;
|
|
393
|
+
overrideForCli?: boolean;
|
|
394
|
+
parseOutput?: boolean;
|
|
395
|
+
sdk?: Client;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export const migrationsGetNHostReport = async ({resources,subdomain,region,adminSecret,database,username,password,port,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsGetNHostReportRequestParams): Promise<any> => {
|
|
439
399
|
let client = !sdk ? await sdkForProject() :
|
|
440
400
|
sdk;
|
|
441
401
|
let apiPath = '/migrations/nhost/report';
|
|
@@ -477,24 +437,20 @@ const migrationsGetNHostReport = async ({resources,subdomain,region,adminSecret,
|
|
|
477
437
|
return response;
|
|
478
438
|
|
|
479
439
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
* @param {MigrationsCreateSupabaseMigrationRequestParams} params
|
|
496
|
-
*/
|
|
497
|
-
const migrationsCreateSupabaseMigration = async ({resources,endpoint,apiKey,databaseHost,username,password,port,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
440
|
+
interface MigrationsCreateSupabaseMigrationRequestParams {
|
|
441
|
+
resources: string[];
|
|
442
|
+
endpoint: string;
|
|
443
|
+
apiKey: string;
|
|
444
|
+
databaseHost: string;
|
|
445
|
+
username: string;
|
|
446
|
+
password: string;
|
|
447
|
+
port?: number;
|
|
448
|
+
overrideForCli?: boolean;
|
|
449
|
+
parseOutput?: boolean;
|
|
450
|
+
sdk?: Client;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export const migrationsCreateSupabaseMigration = async ({resources,endpoint,apiKey,databaseHost,username,password,port,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsCreateSupabaseMigrationRequestParams): Promise<any> => {
|
|
498
454
|
let client = !sdk ? await sdkForProject() :
|
|
499
455
|
sdk;
|
|
500
456
|
let apiPath = '/migrations/supabase';
|
|
@@ -535,24 +491,20 @@ const migrationsCreateSupabaseMigration = async ({resources,endpoint,apiKey,data
|
|
|
535
491
|
return response;
|
|
536
492
|
|
|
537
493
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* @param {MigrationsGetSupabaseReportRequestParams} params
|
|
554
|
-
*/
|
|
555
|
-
const migrationsGetSupabaseReport = async ({resources,endpoint,apiKey,databaseHost,username,password,port,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
494
|
+
interface MigrationsGetSupabaseReportRequestParams {
|
|
495
|
+
resources: string[];
|
|
496
|
+
endpoint: string;
|
|
497
|
+
apiKey: string;
|
|
498
|
+
databaseHost: string;
|
|
499
|
+
username: string;
|
|
500
|
+
password: string;
|
|
501
|
+
port?: number;
|
|
502
|
+
overrideForCli?: boolean;
|
|
503
|
+
parseOutput?: boolean;
|
|
504
|
+
sdk?: Client;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
export const migrationsGetSupabaseReport = async ({resources,endpoint,apiKey,databaseHost,username,password,port,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsGetSupabaseReportRequestParams): Promise<any> => {
|
|
556
508
|
let client = !sdk ? await sdkForProject() :
|
|
557
509
|
sdk;
|
|
558
510
|
let apiPath = '/migrations/supabase/report';
|
|
@@ -591,18 +543,14 @@ const migrationsGetSupabaseReport = async ({resources,endpoint,apiKey,databaseHo
|
|
|
591
543
|
return response;
|
|
592
544
|
|
|
593
545
|
}
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* @param {MigrationsGetRequestParams} params
|
|
604
|
-
*/
|
|
605
|
-
const migrationsGet = async ({migrationId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
546
|
+
interface MigrationsGetRequestParams {
|
|
547
|
+
migrationId: string;
|
|
548
|
+
overrideForCli?: boolean;
|
|
549
|
+
parseOutput?: boolean;
|
|
550
|
+
sdk?: Client;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export const migrationsGet = async ({migrationId,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsGetRequestParams): Promise<any> => {
|
|
606
554
|
let client = !sdk ? await sdkForProject() :
|
|
607
555
|
sdk;
|
|
608
556
|
let apiPath = '/migrations/{migrationId}'.replace('{migrationId}', migrationId);
|
|
@@ -620,18 +568,14 @@ const migrationsGet = async ({migrationId,parseOutput = true, overrideForCli = f
|
|
|
620
568
|
return response;
|
|
621
569
|
|
|
622
570
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
/**
|
|
632
|
-
* @param {MigrationsRetryRequestParams} params
|
|
633
|
-
*/
|
|
634
|
-
const migrationsRetry = async ({migrationId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
571
|
+
interface MigrationsRetryRequestParams {
|
|
572
|
+
migrationId: string;
|
|
573
|
+
overrideForCli?: boolean;
|
|
574
|
+
parseOutput?: boolean;
|
|
575
|
+
sdk?: Client;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
export const migrationsRetry = async ({migrationId,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsRetryRequestParams): Promise<any> => {
|
|
635
579
|
let client = !sdk ? await sdkForProject() :
|
|
636
580
|
sdk;
|
|
637
581
|
let apiPath = '/migrations/{migrationId}'.replace('{migrationId}', migrationId);
|
|
@@ -650,18 +594,14 @@ const migrationsRetry = async ({migrationId,parseOutput = true, overrideForCli =
|
|
|
650
594
|
return response;
|
|
651
595
|
|
|
652
596
|
}
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* @param {MigrationsDeleteRequestParams} params
|
|
663
|
-
*/
|
|
664
|
-
const migrationsDelete = async ({migrationId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
597
|
+
interface MigrationsDeleteRequestParams {
|
|
598
|
+
migrationId: string;
|
|
599
|
+
overrideForCli?: boolean;
|
|
600
|
+
parseOutput?: boolean;
|
|
601
|
+
sdk?: Client;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export const migrationsDelete = async ({migrationId,parseOutput = true, overrideForCli = false, sdk = undefined}: MigrationsDeleteRequestParams): Promise<any> => {
|
|
665
605
|
let client = !sdk ? await sdkForProject() :
|
|
666
606
|
sdk;
|
|
667
607
|
let apiPath = '/migrations/{migrationId}'.replace('{migrationId}', migrationId);
|
|
@@ -685,7 +625,7 @@ migrations
|
|
|
685
625
|
.description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`)
|
|
686
626
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors`)
|
|
687
627
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
688
|
-
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
628
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
689
629
|
.action(actionRunner(migrationsList))
|
|
690
630
|
|
|
691
631
|
migrations
|
|
@@ -716,8 +656,8 @@ migrations
|
|
|
716
656
|
.option(`--delimiter <delimiter>`, `The character that separates each column value. Default is comma.`)
|
|
717
657
|
.option(`--enclosure <enclosure>`, `The character that encloses each column value. Default is double quotes.`)
|
|
718
658
|
.option(`--escape <escape>`, `The escape character for the enclosure character. Default is double quotes.`)
|
|
719
|
-
.option(`--header [value]`, `Whether to include the header row with column names. Default is true.`, (value) => value === undefined ? true : parseBool(value))
|
|
720
|
-
.option(`--notify [value]`, `Set to true to receive an email when the export is complete. Default is true.`, (value) => value === undefined ? true : parseBool(value))
|
|
659
|
+
.option(`--header [value]`, `Whether to include the header row with column names. Default is true.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
660
|
+
.option(`--notify [value]`, `Set to true to receive an email when the export is complete. Default is true.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
721
661
|
.action(actionRunner(migrationsCreateCSVExport))
|
|
722
662
|
|
|
723
663
|
migrations
|
|
@@ -726,7 +666,7 @@ migrations
|
|
|
726
666
|
.requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`)
|
|
727
667
|
.requiredOption(`--file-id <file-id>`, `File ID.`)
|
|
728
668
|
.requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.`)
|
|
729
|
-
.option(`--internal-file [value]`, `Is the file stored in an internal bucket?`, (value) => value === undefined ? true : parseBool(value))
|
|
669
|
+
.option(`--internal-file [value]`, `Is the file stored in an internal bucket?`, (value: string | undefined) => value === undefined ? true : parseBool(value))
|
|
730
670
|
.action(actionRunner(migrationsCreateCSVImport))
|
|
731
671
|
|
|
732
672
|
migrations
|
|
@@ -811,20 +751,4 @@ migrations
|
|
|
811
751
|
.requiredOption(`--migration-id <migration-id>`, `Migration ID.`)
|
|
812
752
|
.action(actionRunner(migrationsDelete))
|
|
813
753
|
|
|
814
|
-
|
|
815
|
-
migrations,
|
|
816
|
-
migrationsList,
|
|
817
|
-
migrationsCreateAppwriteMigration,
|
|
818
|
-
migrationsGetAppwriteReport,
|
|
819
|
-
migrationsCreateCSVExport,
|
|
820
|
-
migrationsCreateCSVImport,
|
|
821
|
-
migrationsCreateFirebaseMigration,
|
|
822
|
-
migrationsGetFirebaseReport,
|
|
823
|
-
migrationsCreateNHostMigration,
|
|
824
|
-
migrationsGetNHostReport,
|
|
825
|
-
migrationsCreateSupabaseMigration,
|
|
826
|
-
migrationsGetSupabaseReport,
|
|
827
|
-
migrationsGet,
|
|
828
|
-
migrationsRetry,
|
|
829
|
-
migrationsDelete
|
|
830
|
-
};
|
|
754
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { sdkForProject } from '../sdks';
|
|
2
|
+
import { parse } from '../parser';
|
|
3
|
+
import { showConsoleLink } from '../utils';
|
|
4
|
+
import Client from '../client';
|
|
5
|
+
|
|
6
|
+
interface OrganizationsListRequestParams {
|
|
7
|
+
queries?: string[];
|
|
8
|
+
search?: string;
|
|
9
|
+
parseOutput?: boolean;
|
|
10
|
+
sdk?: Client;
|
|
11
|
+
console?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const organizationsList = async ({
|
|
15
|
+
queries,
|
|
16
|
+
search,
|
|
17
|
+
parseOutput = true,
|
|
18
|
+
sdk = undefined,
|
|
19
|
+
console: showConsole
|
|
20
|
+
}: OrganizationsListRequestParams): Promise<any> => {
|
|
21
|
+
let client = !sdk ? await sdkForProject() : sdk;
|
|
22
|
+
let apiPath = '/organizations';
|
|
23
|
+
let payload: Record<string, any> = {};
|
|
24
|
+
|
|
25
|
+
if (typeof queries !== 'undefined') {
|
|
26
|
+
payload['queries'] = queries;
|
|
27
|
+
}
|
|
28
|
+
if (typeof search !== 'undefined') {
|
|
29
|
+
payload['search'] = search;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
let response = await client.call('get', apiPath, {
|
|
33
|
+
'content-type': 'application/json',
|
|
34
|
+
}, payload);
|
|
35
|
+
|
|
36
|
+
if (parseOutput) {
|
|
37
|
+
if(showConsole) {
|
|
38
|
+
showConsoleLink('organizations', 'list');
|
|
39
|
+
} else {
|
|
40
|
+
parse(response)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return response;
|
|
45
|
+
}
|
|
46
|
+
|