@constructive-sdk/cli 0.13.3 → 0.13.4
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/admin/cli/commands/{claimed-invite.d.ts → app-claimed-invite.d.ts} +1 -1
- package/admin/cli/commands/{claimed-invite.js → app-claimed-invite.js} +8 -8
- package/{esm/public/cli/commands/invite.d.ts → admin/cli/commands/app-invite.d.ts} +1 -1
- package/{public/cli/commands/invite.js → admin/cli/commands/app-invite.js} +8 -8
- package/admin/cli/commands/steps-achieved.js +4 -4
- package/admin/cli/commands/steps-required.js +4 -4
- package/admin/cli/commands/{submit-invite-code.d.ts → submit-app-invite-code.d.ts} +1 -1
- package/admin/cli/commands/{submit-invite-code.js → submit-app-invite-code.js} +3 -3
- package/admin/cli/commands.js +7 -7
- package/admin/cli/executor.d.ts +5 -5
- package/admin/orm/index.d.ts +7 -7
- package/admin/orm/index.js +4 -4
- package/admin/orm/input-types.d.ts +99 -99
- package/admin/orm/models/appClaimedInvite.d.ts +56 -0
- package/{public/orm/models/claimedInvite.js → admin/orm/models/appClaimedInvite.js} +26 -26
- package/admin/orm/models/appInvite.d.ts +56 -0
- package/{public/orm/models/invite.js → admin/orm/models/appInvite.js} +26 -26
- package/admin/orm/models/index.d.ts +2 -2
- package/admin/orm/models/index.js +5 -5
- package/admin/orm/mutation/index.d.ts +6 -6
- package/admin/orm/mutation/index.js +6 -6
- package/admin/orm/query/index.d.ts +4 -4
- package/admin/orm/query/index.js +4 -4
- package/auth/cli/commands.js +5 -5
- package/auth/cli/executor.d.ts +10 -10
- package/auth/orm/index.d.ts +10 -10
- package/auth/orm/input-types.d.ts +24 -72
- package/auth/orm/mutation/index.d.ts +17 -17
- package/auth/orm/mutation/index.js +24 -24
- package/esm/admin/cli/commands/{claimed-invite.d.ts → app-claimed-invite.d.ts} +1 -1
- package/esm/admin/cli/commands/{claimed-invite.js → app-claimed-invite.js} +8 -8
- package/esm/admin/cli/commands/{invite.d.ts → app-invite.d.ts} +1 -1
- package/esm/{public/cli/commands/invite.js → admin/cli/commands/app-invite.js} +8 -8
- package/esm/admin/cli/commands/steps-achieved.js +4 -4
- package/esm/admin/cli/commands/steps-required.js +4 -4
- package/esm/admin/cli/commands/submit-app-invite-code.d.ts +8 -0
- package/esm/admin/cli/commands/{submit-invite-code.js → submit-app-invite-code.js} +3 -3
- package/esm/admin/cli/commands.js +7 -7
- package/esm/admin/cli/executor.d.ts +5 -5
- package/esm/admin/orm/index.d.ts +7 -7
- package/esm/admin/orm/index.js +4 -4
- package/esm/admin/orm/input-types.d.ts +99 -99
- package/esm/admin/orm/models/appClaimedInvite.d.ts +56 -0
- package/esm/admin/orm/models/{claimedInvite.js → appClaimedInvite.js} +24 -24
- package/esm/admin/orm/models/appInvite.d.ts +56 -0
- package/esm/admin/orm/models/{invite.js → appInvite.js} +24 -24
- package/esm/admin/orm/models/index.d.ts +2 -2
- package/esm/admin/orm/models/index.js +2 -2
- package/esm/admin/orm/mutation/index.d.ts +6 -6
- package/esm/admin/orm/mutation/index.js +6 -6
- package/esm/admin/orm/query/index.d.ts +4 -4
- package/esm/admin/orm/query/index.js +4 -4
- package/esm/auth/cli/commands.js +5 -5
- package/esm/auth/cli/executor.d.ts +10 -10
- package/esm/auth/orm/index.d.ts +10 -10
- package/esm/auth/orm/input-types.d.ts +24 -72
- package/esm/auth/orm/mutation/index.d.ts +17 -17
- package/esm/auth/orm/mutation/index.js +24 -24
- package/esm/public/cli/commands/app-claimed-invite.d.ts +8 -0
- package/esm/public/cli/commands/{claimed-invite.js → app-claimed-invite.js} +8 -8
- package/{admin/cli/commands/invite.d.ts → esm/public/cli/commands/app-invite.d.ts} +1 -1
- package/esm/{admin/cli/commands/invite.js → public/cli/commands/app-invite.js} +8 -8
- package/esm/public/cli/commands/rate-limits-module.d.ts +8 -0
- package/esm/public/cli/commands/rate-limits-module.js +382 -0
- package/esm/public/cli/commands/steps-achieved.js +4 -4
- package/esm/public/cli/commands/steps-required.js +4 -4
- package/esm/public/cli/commands/submit-app-invite-code.d.ts +8 -0
- package/esm/public/cli/commands/{submit-invite-code.js → submit-app-invite-code.js} +3 -3
- package/esm/public/cli/commands.js +13 -11
- package/esm/public/cli/executor.d.ts +16 -15
- package/esm/public/orm/index.d.ts +19 -17
- package/esm/public/orm/index.js +6 -4
- package/esm/public/orm/input-types.d.ts +402 -230
- package/esm/public/orm/input-types.js +3 -3
- package/esm/public/orm/models/appClaimedInvite.d.ts +56 -0
- package/esm/public/orm/models/{claimedInvite.js → appClaimedInvite.js} +24 -24
- package/esm/public/orm/models/appInvite.d.ts +56 -0
- package/esm/public/orm/models/{invite.js → appInvite.js} +24 -24
- package/esm/public/orm/models/index.d.ts +3 -2
- package/esm/public/orm/models/index.js +3 -2
- package/esm/public/orm/models/rateLimitsModule.d.ts +56 -0
- package/esm/public/orm/models/rateLimitsModule.js +96 -0
- package/esm/public/orm/mutation/index.d.ts +22 -22
- package/esm/public/orm/mutation/index.js +30 -30
- package/esm/public/orm/query/index.d.ts +4 -4
- package/esm/public/orm/query/index.js +4 -4
- package/package.json +2 -2
- package/public/cli/commands/app-claimed-invite.d.ts +8 -0
- package/public/cli/commands/{claimed-invite.js → app-claimed-invite.js} +8 -8
- package/public/cli/commands/{invite.d.ts → app-invite.d.ts} +1 -1
- package/{admin/cli/commands/invite.js → public/cli/commands/app-invite.js} +8 -8
- package/public/cli/commands/rate-limits-module.d.ts +8 -0
- package/public/cli/commands/rate-limits-module.js +384 -0
- package/public/cli/commands/steps-achieved.js +4 -4
- package/public/cli/commands/steps-required.js +4 -4
- package/public/cli/commands/submit-app-invite-code.d.ts +8 -0
- package/public/cli/commands/{submit-invite-code.js → submit-app-invite-code.js} +3 -3
- package/public/cli/commands.js +13 -11
- package/public/cli/executor.d.ts +16 -15
- package/public/orm/index.d.ts +19 -17
- package/public/orm/index.js +6 -4
- package/public/orm/input-types.d.ts +402 -230
- package/public/orm/input-types.js +3 -3
- package/public/orm/models/appClaimedInvite.d.ts +56 -0
- package/{admin/orm/models/claimedInvite.js → public/orm/models/appClaimedInvite.js} +26 -26
- package/public/orm/models/appInvite.d.ts +56 -0
- package/{admin/orm/models/invite.js → public/orm/models/appInvite.js} +26 -26
- package/public/orm/models/index.d.ts +3 -2
- package/public/orm/models/index.js +8 -6
- package/public/orm/models/rateLimitsModule.d.ts +56 -0
- package/public/orm/models/rateLimitsModule.js +100 -0
- package/public/orm/mutation/index.d.ts +22 -22
- package/public/orm/mutation/index.js +30 -30
- package/public/orm/query/index.d.ts +4 -4
- package/public/orm/query/index.js +4 -4
- package/admin/orm/models/claimedInvite.d.ts +0 -56
- package/admin/orm/models/invite.d.ts +0 -56
- package/esm/admin/cli/commands/submit-invite-code.d.ts +0 -8
- package/esm/admin/orm/models/claimedInvite.d.ts +0 -56
- package/esm/admin/orm/models/invite.d.ts +0 -56
- package/esm/public/cli/commands/claimed-invite.d.ts +0 -8
- package/esm/public/cli/commands/submit-invite-code.d.ts +0 -8
- package/esm/public/orm/models/claimedInvite.d.ts +0 -56
- package/esm/public/orm/models/invite.d.ts +0 -56
- package/public/cli/commands/claimed-invite.d.ts +0 -8
- package/public/cli/commands/submit-invite-code.d.ts +0 -8
- package/public/orm/models/claimedInvite.d.ts +0 -56
- package/public/orm/models/invite.d.ts +0 -56
|
@@ -38,6 +38,30 @@ export function createMutationOperations(client) {
|
|
|
38
38
|
},
|
|
39
39
|
], connectionFieldsMap, 'CheckPasswordPayload'),
|
|
40
40
|
}),
|
|
41
|
+
verifyPassword: (args, options) => new QueryBuilder({
|
|
42
|
+
client,
|
|
43
|
+
operation: 'mutation',
|
|
44
|
+
operationName: 'VerifyPassword',
|
|
45
|
+
fieldName: 'verifyPassword',
|
|
46
|
+
...buildCustomDocument('mutation', 'VerifyPassword', 'verifyPassword', options.select, args, [
|
|
47
|
+
{
|
|
48
|
+
name: 'input',
|
|
49
|
+
type: 'VerifyPasswordInput!',
|
|
50
|
+
},
|
|
51
|
+
], connectionFieldsMap, 'VerifyPasswordPayload'),
|
|
52
|
+
}),
|
|
53
|
+
verifyTotp: (args, options) => new QueryBuilder({
|
|
54
|
+
client,
|
|
55
|
+
operation: 'mutation',
|
|
56
|
+
operationName: 'VerifyTotp',
|
|
57
|
+
fieldName: 'verifyTotp',
|
|
58
|
+
...buildCustomDocument('mutation', 'VerifyTotp', 'verifyTotp', options.select, args, [
|
|
59
|
+
{
|
|
60
|
+
name: 'input',
|
|
61
|
+
type: 'VerifyTotpInput!',
|
|
62
|
+
},
|
|
63
|
+
], connectionFieldsMap, 'VerifyTotpPayload'),
|
|
64
|
+
}),
|
|
41
65
|
confirmDeleteAccount: (args, options) => new QueryBuilder({
|
|
42
66
|
client,
|
|
43
67
|
operation: 'mutation',
|
|
@@ -170,30 +194,6 @@ export function createMutationOperations(client) {
|
|
|
170
194
|
},
|
|
171
195
|
], connectionFieldsMap, 'SendVerificationEmailPayload'),
|
|
172
196
|
}),
|
|
173
|
-
verifyPassword: (args, options) => new QueryBuilder({
|
|
174
|
-
client,
|
|
175
|
-
operation: 'mutation',
|
|
176
|
-
operationName: 'VerifyPassword',
|
|
177
|
-
fieldName: 'verifyPassword',
|
|
178
|
-
...buildCustomDocument('mutation', 'VerifyPassword', 'verifyPassword', options.select, args, [
|
|
179
|
-
{
|
|
180
|
-
name: 'input',
|
|
181
|
-
type: 'VerifyPasswordInput!',
|
|
182
|
-
},
|
|
183
|
-
], connectionFieldsMap, 'VerifyPasswordPayload'),
|
|
184
|
-
}),
|
|
185
|
-
verifyTotp: (args, options) => new QueryBuilder({
|
|
186
|
-
client,
|
|
187
|
-
operation: 'mutation',
|
|
188
|
-
operationName: 'VerifyTotp',
|
|
189
|
-
fieldName: 'verifyTotp',
|
|
190
|
-
...buildCustomDocument('mutation', 'VerifyTotp', 'verifyTotp', options.select, args, [
|
|
191
|
-
{
|
|
192
|
-
name: 'input',
|
|
193
|
-
type: 'VerifyTotpInput!',
|
|
194
|
-
},
|
|
195
|
-
], connectionFieldsMap, 'VerifyTotpPayload'),
|
|
196
|
-
}),
|
|
197
197
|
requestUploadUrl: (args, options) => new QueryBuilder({
|
|
198
198
|
client,
|
|
199
199
|
operation: 'mutation',
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for AppClaimedInvite
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
7
|
+
declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
|
|
8
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CLI commands for
|
|
2
|
+
* CLI commands for AppClaimedInvite
|
|
3
3
|
* @generated by @constructive-io/graphql-codegen
|
|
4
4
|
* DO NOT EDIT - changes will be overwritten
|
|
5
5
|
*/
|
|
@@ -14,7 +14,7 @@ const fieldSchema = {
|
|
|
14
14
|
createdAt: 'string',
|
|
15
15
|
updatedAt: 'string',
|
|
16
16
|
};
|
|
17
|
-
const usage = '\
|
|
17
|
+
const usage = '\napp-claimed-invite <command>\n\nCommands:\n list List appClaimedInvite records\n find-first Find first matching appClaimedInvite record\n get Get a appClaimedInvite by ID\n create Create a new appClaimedInvite\n update Update an existing appClaimedInvite\n delete Delete a appClaimedInvite\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n\n --help, -h Show this help message\n';
|
|
18
18
|
export default async (argv, prompter, _options) => {
|
|
19
19
|
if (argv.help || argv.h) {
|
|
20
20
|
console.log(usage);
|
|
@@ -65,7 +65,7 @@ async function handleList(argv, _prompter) {
|
|
|
65
65
|
};
|
|
66
66
|
const findManyArgs = parseFindManyArgs(argv, defaultSelect);
|
|
67
67
|
const client = getClient();
|
|
68
|
-
const result = await client.
|
|
68
|
+
const result = await client.appClaimedInvite.findMany(findManyArgs).execute();
|
|
69
69
|
console.log(JSON.stringify(result, null, 2));
|
|
70
70
|
}
|
|
71
71
|
catch (error) {
|
|
@@ -88,7 +88,7 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
88
88
|
};
|
|
89
89
|
const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
|
|
90
90
|
const client = getClient();
|
|
91
|
-
const result = await client.
|
|
91
|
+
const result = await client.appClaimedInvite.findFirst(findFirstArgs).execute();
|
|
92
92
|
console.log(JSON.stringify(result, null, 2));
|
|
93
93
|
}
|
|
94
94
|
catch (error) {
|
|
@@ -110,7 +110,7 @@ async function handleGet(argv, prompter) {
|
|
|
110
110
|
},
|
|
111
111
|
]);
|
|
112
112
|
const client = getClient();
|
|
113
|
-
const result = await client.
|
|
113
|
+
const result = await client.appClaimedInvite
|
|
114
114
|
.findOne({
|
|
115
115
|
id: answers.id,
|
|
116
116
|
select: {
|
|
@@ -161,7 +161,7 @@ async function handleCreate(argv, prompter) {
|
|
|
161
161
|
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
162
162
|
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
163
163
|
const client = getClient();
|
|
164
|
-
const result = await client.
|
|
164
|
+
const result = await client.appClaimedInvite
|
|
165
165
|
.create({
|
|
166
166
|
data: {
|
|
167
167
|
data: cleanedData.data,
|
|
@@ -222,7 +222,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
222
222
|
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
223
223
|
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
224
224
|
const client = getClient();
|
|
225
|
-
const result = await client.
|
|
225
|
+
const result = await client.appClaimedInvite
|
|
226
226
|
.update({
|
|
227
227
|
where: {
|
|
228
228
|
id: answers.id,
|
|
@@ -264,7 +264,7 @@ async function handleDelete(argv, prompter) {
|
|
|
264
264
|
]);
|
|
265
265
|
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
266
266
|
const client = getClient();
|
|
267
|
-
const result = await client.
|
|
267
|
+
const result = await client.appClaimedInvite
|
|
268
268
|
.delete({
|
|
269
269
|
where: {
|
|
270
270
|
id: answers.id,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CLI commands for
|
|
2
|
+
* CLI commands for AppInvite
|
|
3
3
|
* @generated by @constructive-io/graphql-codegen
|
|
4
4
|
* DO NOT EDIT - changes will be overwritten
|
|
5
5
|
*/
|
|
@@ -20,7 +20,7 @@ const fieldSchema = {
|
|
|
20
20
|
createdAt: 'string',
|
|
21
21
|
updatedAt: 'string',
|
|
22
22
|
};
|
|
23
|
-
const usage = '\
|
|
23
|
+
const usage = '\napp-invite <command>\n\nCommands:\n list List appInvite records\n find-first Find first matching appInvite record\n get Get a appInvite by ID\n create Create a new appInvite\n update Update an existing appInvite\n delete Delete a appInvite\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n\n --help, -h Show this help message\n';
|
|
24
24
|
export default async (argv, prompter, _options) => {
|
|
25
25
|
if (argv.help || argv.h) {
|
|
26
26
|
console.log(usage);
|
|
@@ -77,7 +77,7 @@ async function handleList(argv, _prompter) {
|
|
|
77
77
|
};
|
|
78
78
|
const findManyArgs = parseFindManyArgs(argv, defaultSelect);
|
|
79
79
|
const client = getClient();
|
|
80
|
-
const result = await client.
|
|
80
|
+
const result = await client.appInvite.findMany(findManyArgs).execute();
|
|
81
81
|
console.log(JSON.stringify(result, null, 2));
|
|
82
82
|
}
|
|
83
83
|
catch (error) {
|
|
@@ -106,7 +106,7 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
106
106
|
};
|
|
107
107
|
const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
|
|
108
108
|
const client = getClient();
|
|
109
|
-
const result = await client.
|
|
109
|
+
const result = await client.appInvite.findFirst(findFirstArgs).execute();
|
|
110
110
|
console.log(JSON.stringify(result, null, 2));
|
|
111
111
|
}
|
|
112
112
|
catch (error) {
|
|
@@ -128,7 +128,7 @@ async function handleGet(argv, prompter) {
|
|
|
128
128
|
},
|
|
129
129
|
]);
|
|
130
130
|
const client = getClient();
|
|
131
|
-
const result = await client.
|
|
131
|
+
const result = await client.appInvite
|
|
132
132
|
.findOne({
|
|
133
133
|
id: answers.id,
|
|
134
134
|
select: {
|
|
@@ -227,7 +227,7 @@ async function handleCreate(argv, prompter) {
|
|
|
227
227
|
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
228
228
|
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
229
229
|
const client = getClient();
|
|
230
|
-
const result = await client.
|
|
230
|
+
const result = await client.appInvite
|
|
231
231
|
.create({
|
|
232
232
|
data: {
|
|
233
233
|
email: cleanedData.email,
|
|
@@ -342,7 +342,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
342
342
|
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
343
343
|
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
344
344
|
const client = getClient();
|
|
345
|
-
const result = await client.
|
|
345
|
+
const result = await client.appInvite
|
|
346
346
|
.update({
|
|
347
347
|
where: {
|
|
348
348
|
id: answers.id,
|
|
@@ -396,7 +396,7 @@ async function handleDelete(argv, prompter) {
|
|
|
396
396
|
]);
|
|
397
397
|
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
398
398
|
const client = getClient();
|
|
399
|
-
const result = await client.
|
|
399
|
+
const result = await client.appInvite
|
|
400
400
|
.delete({
|
|
401
401
|
where: {
|
|
402
402
|
id: answers.id,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for RateLimitsModule
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
7
|
+
declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for RateLimitsModule
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { extractFirst } from 'inquirerer';
|
|
7
|
+
import { getClient } from '../executor';
|
|
8
|
+
import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils';
|
|
9
|
+
const fieldSchema = {
|
|
10
|
+
id: 'uuid',
|
|
11
|
+
databaseId: 'uuid',
|
|
12
|
+
schemaId: 'uuid',
|
|
13
|
+
rateLimitSettingsTableId: 'uuid',
|
|
14
|
+
ipRateLimitsTableId: 'uuid',
|
|
15
|
+
rateLimitsTableId: 'uuid',
|
|
16
|
+
rateLimitSettingsTable: 'string',
|
|
17
|
+
ipRateLimitsTable: 'string',
|
|
18
|
+
rateLimitsTable: 'string',
|
|
19
|
+
};
|
|
20
|
+
const usage = '\nrate-limits-module <command>\n\nCommands:\n list List rateLimitsModule records\n find-first Find first matching rateLimitsModule record\n get Get a rateLimitsModule by ID\n create Create a new rateLimitsModule\n update Update an existing rateLimitsModule\n delete Delete a rateLimitsModule\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n\n --help, -h Show this help message\n';
|
|
21
|
+
export default async (argv, prompter, _options) => {
|
|
22
|
+
if (argv.help || argv.h) {
|
|
23
|
+
console.log(usage);
|
|
24
|
+
process.exit(0);
|
|
25
|
+
}
|
|
26
|
+
const { first: subcommand, newArgv } = extractFirst(argv);
|
|
27
|
+
if (!subcommand) {
|
|
28
|
+
const answer = await prompter.prompt(argv, [
|
|
29
|
+
{
|
|
30
|
+
type: 'autocomplete',
|
|
31
|
+
name: 'subcommand',
|
|
32
|
+
message: 'What do you want to do?',
|
|
33
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
34
|
+
},
|
|
35
|
+
]);
|
|
36
|
+
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
37
|
+
}
|
|
38
|
+
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
39
|
+
};
|
|
40
|
+
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
41
|
+
switch (subcommand) {
|
|
42
|
+
case 'list':
|
|
43
|
+
return handleList(argv, prompter);
|
|
44
|
+
case 'find-first':
|
|
45
|
+
return handleFindFirst(argv, prompter);
|
|
46
|
+
case 'get':
|
|
47
|
+
return handleGet(argv, prompter);
|
|
48
|
+
case 'create':
|
|
49
|
+
return handleCreate(argv, prompter);
|
|
50
|
+
case 'update':
|
|
51
|
+
return handleUpdate(argv, prompter);
|
|
52
|
+
case 'delete':
|
|
53
|
+
return handleDelete(argv, prompter);
|
|
54
|
+
default:
|
|
55
|
+
console.log(usage);
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function handleList(argv, _prompter) {
|
|
60
|
+
try {
|
|
61
|
+
const defaultSelect = {
|
|
62
|
+
id: true,
|
|
63
|
+
databaseId: true,
|
|
64
|
+
schemaId: true,
|
|
65
|
+
rateLimitSettingsTableId: true,
|
|
66
|
+
ipRateLimitsTableId: true,
|
|
67
|
+
rateLimitsTableId: true,
|
|
68
|
+
rateLimitSettingsTable: true,
|
|
69
|
+
ipRateLimitsTable: true,
|
|
70
|
+
rateLimitsTable: true,
|
|
71
|
+
};
|
|
72
|
+
const findManyArgs = parseFindManyArgs(argv, defaultSelect);
|
|
73
|
+
const client = getClient();
|
|
74
|
+
const result = await client.rateLimitsModule.findMany(findManyArgs).execute();
|
|
75
|
+
console.log(JSON.stringify(result, null, 2));
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
console.error('Failed to list records.');
|
|
79
|
+
if (error instanceof Error) {
|
|
80
|
+
console.error(error.message);
|
|
81
|
+
}
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
async function handleFindFirst(argv, _prompter) {
|
|
86
|
+
try {
|
|
87
|
+
const defaultSelect = {
|
|
88
|
+
id: true,
|
|
89
|
+
databaseId: true,
|
|
90
|
+
schemaId: true,
|
|
91
|
+
rateLimitSettingsTableId: true,
|
|
92
|
+
ipRateLimitsTableId: true,
|
|
93
|
+
rateLimitsTableId: true,
|
|
94
|
+
rateLimitSettingsTable: true,
|
|
95
|
+
ipRateLimitsTable: true,
|
|
96
|
+
rateLimitsTable: true,
|
|
97
|
+
};
|
|
98
|
+
const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
|
|
99
|
+
const client = getClient();
|
|
100
|
+
const result = await client.rateLimitsModule.findFirst(findFirstArgs).execute();
|
|
101
|
+
console.log(JSON.stringify(result, null, 2));
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
console.error('Failed to find record.');
|
|
105
|
+
if (error instanceof Error) {
|
|
106
|
+
console.error(error.message);
|
|
107
|
+
}
|
|
108
|
+
process.exit(1);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async function handleGet(argv, prompter) {
|
|
112
|
+
try {
|
|
113
|
+
const answers = await prompter.prompt(argv, [
|
|
114
|
+
{
|
|
115
|
+
type: 'text',
|
|
116
|
+
name: 'id',
|
|
117
|
+
message: 'id',
|
|
118
|
+
required: true,
|
|
119
|
+
},
|
|
120
|
+
]);
|
|
121
|
+
const client = getClient();
|
|
122
|
+
const result = await client.rateLimitsModule
|
|
123
|
+
.findOne({
|
|
124
|
+
id: answers.id,
|
|
125
|
+
select: {
|
|
126
|
+
id: true,
|
|
127
|
+
databaseId: true,
|
|
128
|
+
schemaId: true,
|
|
129
|
+
rateLimitSettingsTableId: true,
|
|
130
|
+
ipRateLimitsTableId: true,
|
|
131
|
+
rateLimitsTableId: true,
|
|
132
|
+
rateLimitSettingsTable: true,
|
|
133
|
+
ipRateLimitsTable: true,
|
|
134
|
+
rateLimitsTable: true,
|
|
135
|
+
},
|
|
136
|
+
})
|
|
137
|
+
.execute();
|
|
138
|
+
console.log(JSON.stringify(result, null, 2));
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
console.error('Record not found.');
|
|
142
|
+
if (error instanceof Error) {
|
|
143
|
+
console.error(error.message);
|
|
144
|
+
}
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
async function handleCreate(argv, prompter) {
|
|
149
|
+
try {
|
|
150
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
151
|
+
{
|
|
152
|
+
type: 'text',
|
|
153
|
+
name: 'databaseId',
|
|
154
|
+
message: 'databaseId',
|
|
155
|
+
required: true,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
type: 'text',
|
|
159
|
+
name: 'schemaId',
|
|
160
|
+
message: 'schemaId',
|
|
161
|
+
required: false,
|
|
162
|
+
skipPrompt: true,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
type: 'text',
|
|
166
|
+
name: 'rateLimitSettingsTableId',
|
|
167
|
+
message: 'rateLimitSettingsTableId',
|
|
168
|
+
required: false,
|
|
169
|
+
skipPrompt: true,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
type: 'text',
|
|
173
|
+
name: 'ipRateLimitsTableId',
|
|
174
|
+
message: 'ipRateLimitsTableId',
|
|
175
|
+
required: false,
|
|
176
|
+
skipPrompt: true,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
type: 'text',
|
|
180
|
+
name: 'rateLimitsTableId',
|
|
181
|
+
message: 'rateLimitsTableId',
|
|
182
|
+
required: false,
|
|
183
|
+
skipPrompt: true,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
type: 'text',
|
|
187
|
+
name: 'rateLimitSettingsTable',
|
|
188
|
+
message: 'rateLimitSettingsTable',
|
|
189
|
+
required: false,
|
|
190
|
+
skipPrompt: true,
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
type: 'text',
|
|
194
|
+
name: 'ipRateLimitsTable',
|
|
195
|
+
message: 'ipRateLimitsTable',
|
|
196
|
+
required: false,
|
|
197
|
+
skipPrompt: true,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
type: 'text',
|
|
201
|
+
name: 'rateLimitsTable',
|
|
202
|
+
message: 'rateLimitsTable',
|
|
203
|
+
required: false,
|
|
204
|
+
skipPrompt: true,
|
|
205
|
+
},
|
|
206
|
+
]);
|
|
207
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
208
|
+
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
209
|
+
const client = getClient();
|
|
210
|
+
const result = await client.rateLimitsModule
|
|
211
|
+
.create({
|
|
212
|
+
data: {
|
|
213
|
+
databaseId: cleanedData.databaseId,
|
|
214
|
+
schemaId: cleanedData.schemaId,
|
|
215
|
+
rateLimitSettingsTableId: cleanedData.rateLimitSettingsTableId,
|
|
216
|
+
ipRateLimitsTableId: cleanedData.ipRateLimitsTableId,
|
|
217
|
+
rateLimitsTableId: cleanedData.rateLimitsTableId,
|
|
218
|
+
rateLimitSettingsTable: cleanedData.rateLimitSettingsTable,
|
|
219
|
+
ipRateLimitsTable: cleanedData.ipRateLimitsTable,
|
|
220
|
+
rateLimitsTable: cleanedData.rateLimitsTable,
|
|
221
|
+
},
|
|
222
|
+
select: {
|
|
223
|
+
id: true,
|
|
224
|
+
databaseId: true,
|
|
225
|
+
schemaId: true,
|
|
226
|
+
rateLimitSettingsTableId: true,
|
|
227
|
+
ipRateLimitsTableId: true,
|
|
228
|
+
rateLimitsTableId: true,
|
|
229
|
+
rateLimitSettingsTable: true,
|
|
230
|
+
ipRateLimitsTable: true,
|
|
231
|
+
rateLimitsTable: true,
|
|
232
|
+
},
|
|
233
|
+
})
|
|
234
|
+
.execute();
|
|
235
|
+
console.log(JSON.stringify(result, null, 2));
|
|
236
|
+
}
|
|
237
|
+
catch (error) {
|
|
238
|
+
console.error('Failed to create record.');
|
|
239
|
+
if (error instanceof Error) {
|
|
240
|
+
console.error(error.message);
|
|
241
|
+
}
|
|
242
|
+
process.exit(1);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
async function handleUpdate(argv, prompter) {
|
|
246
|
+
try {
|
|
247
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
248
|
+
{
|
|
249
|
+
type: 'text',
|
|
250
|
+
name: 'id',
|
|
251
|
+
message: 'id',
|
|
252
|
+
required: true,
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
type: 'text',
|
|
256
|
+
name: 'databaseId',
|
|
257
|
+
message: 'databaseId',
|
|
258
|
+
required: false,
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
type: 'text',
|
|
262
|
+
name: 'schemaId',
|
|
263
|
+
message: 'schemaId',
|
|
264
|
+
required: false,
|
|
265
|
+
skipPrompt: true,
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
type: 'text',
|
|
269
|
+
name: 'rateLimitSettingsTableId',
|
|
270
|
+
message: 'rateLimitSettingsTableId',
|
|
271
|
+
required: false,
|
|
272
|
+
skipPrompt: true,
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
type: 'text',
|
|
276
|
+
name: 'ipRateLimitsTableId',
|
|
277
|
+
message: 'ipRateLimitsTableId',
|
|
278
|
+
required: false,
|
|
279
|
+
skipPrompt: true,
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
type: 'text',
|
|
283
|
+
name: 'rateLimitsTableId',
|
|
284
|
+
message: 'rateLimitsTableId',
|
|
285
|
+
required: false,
|
|
286
|
+
skipPrompt: true,
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
type: 'text',
|
|
290
|
+
name: 'rateLimitSettingsTable',
|
|
291
|
+
message: 'rateLimitSettingsTable',
|
|
292
|
+
required: false,
|
|
293
|
+
skipPrompt: true,
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
type: 'text',
|
|
297
|
+
name: 'ipRateLimitsTable',
|
|
298
|
+
message: 'ipRateLimitsTable',
|
|
299
|
+
required: false,
|
|
300
|
+
skipPrompt: true,
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
type: 'text',
|
|
304
|
+
name: 'rateLimitsTable',
|
|
305
|
+
message: 'rateLimitsTable',
|
|
306
|
+
required: false,
|
|
307
|
+
skipPrompt: true,
|
|
308
|
+
},
|
|
309
|
+
]);
|
|
310
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
311
|
+
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
312
|
+
const client = getClient();
|
|
313
|
+
const result = await client.rateLimitsModule
|
|
314
|
+
.update({
|
|
315
|
+
where: {
|
|
316
|
+
id: answers.id,
|
|
317
|
+
},
|
|
318
|
+
data: {
|
|
319
|
+
databaseId: cleanedData.databaseId,
|
|
320
|
+
schemaId: cleanedData.schemaId,
|
|
321
|
+
rateLimitSettingsTableId: cleanedData.rateLimitSettingsTableId,
|
|
322
|
+
ipRateLimitsTableId: cleanedData.ipRateLimitsTableId,
|
|
323
|
+
rateLimitsTableId: cleanedData.rateLimitsTableId,
|
|
324
|
+
rateLimitSettingsTable: cleanedData.rateLimitSettingsTable,
|
|
325
|
+
ipRateLimitsTable: cleanedData.ipRateLimitsTable,
|
|
326
|
+
rateLimitsTable: cleanedData.rateLimitsTable,
|
|
327
|
+
},
|
|
328
|
+
select: {
|
|
329
|
+
id: true,
|
|
330
|
+
databaseId: true,
|
|
331
|
+
schemaId: true,
|
|
332
|
+
rateLimitSettingsTableId: true,
|
|
333
|
+
ipRateLimitsTableId: true,
|
|
334
|
+
rateLimitsTableId: true,
|
|
335
|
+
rateLimitSettingsTable: true,
|
|
336
|
+
ipRateLimitsTable: true,
|
|
337
|
+
rateLimitsTable: true,
|
|
338
|
+
},
|
|
339
|
+
})
|
|
340
|
+
.execute();
|
|
341
|
+
console.log(JSON.stringify(result, null, 2));
|
|
342
|
+
}
|
|
343
|
+
catch (error) {
|
|
344
|
+
console.error('Failed to update record.');
|
|
345
|
+
if (error instanceof Error) {
|
|
346
|
+
console.error(error.message);
|
|
347
|
+
}
|
|
348
|
+
process.exit(1);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
async function handleDelete(argv, prompter) {
|
|
352
|
+
try {
|
|
353
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
354
|
+
{
|
|
355
|
+
type: 'text',
|
|
356
|
+
name: 'id',
|
|
357
|
+
message: 'id',
|
|
358
|
+
required: true,
|
|
359
|
+
},
|
|
360
|
+
]);
|
|
361
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
362
|
+
const client = getClient();
|
|
363
|
+
const result = await client.rateLimitsModule
|
|
364
|
+
.delete({
|
|
365
|
+
where: {
|
|
366
|
+
id: answers.id,
|
|
367
|
+
},
|
|
368
|
+
select: {
|
|
369
|
+
id: true,
|
|
370
|
+
},
|
|
371
|
+
})
|
|
372
|
+
.execute();
|
|
373
|
+
console.log(JSON.stringify(result, null, 2));
|
|
374
|
+
}
|
|
375
|
+
catch (error) {
|
|
376
|
+
console.error('Failed to delete record.');
|
|
377
|
+
if (error instanceof Error) {
|
|
378
|
+
console.error(error.message);
|
|
379
|
+
}
|
|
380
|
+
process.exit(1);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
@@ -8,13 +8,13 @@ export default async (argv, prompter, _options) => {
|
|
|
8
8
|
const answers = await prompter.prompt(argv, [
|
|
9
9
|
{
|
|
10
10
|
type: 'text',
|
|
11
|
-
name: '
|
|
12
|
-
message: '
|
|
11
|
+
name: 'level',
|
|
12
|
+
message: 'level',
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
type: 'text',
|
|
16
|
-
name: '
|
|
17
|
-
message: '
|
|
16
|
+
name: 'roleId',
|
|
17
|
+
message: 'roleId',
|
|
18
18
|
},
|
|
19
19
|
]);
|
|
20
20
|
const client = getClient();
|
|
@@ -9,13 +9,13 @@ export default async (argv, prompter, _options) => {
|
|
|
9
9
|
const answers = await prompter.prompt(argv, [
|
|
10
10
|
{
|
|
11
11
|
type: 'text',
|
|
12
|
-
name: '
|
|
13
|
-
message: '
|
|
12
|
+
name: 'level',
|
|
13
|
+
message: 'level',
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
type: 'text',
|
|
17
|
-
name: '
|
|
18
|
-
message: '
|
|
17
|
+
name: 'roleId',
|
|
18
|
+
message: 'roleId',
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
type: 'text',
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command for mutation submitAppInviteCode
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
7
|
+
declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
|
|
8
|
+
export default _default;
|