@constructive-sdk/cli 0.17.1 → 0.17.3
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/app-invite.js +22 -0
- package/admin/cli/commands/app-limit-default.js +22 -0
- package/admin/cli/commands/{confirm-upload.d.ts → app-limit-event.d.ts} +1 -1
- package/admin/cli/commands/app-limit-event.js +212 -0
- package/admin/cli/commands/app-limit.js +66 -0
- package/admin/cli/commands/app-membership.js +0 -22
- package/admin/cli/commands/org-invite.js +22 -0
- package/{esm/admin/cli/commands/confirm-upload.d.ts → admin/cli/commands/org-limit-aggregate.d.ts} +1 -1
- package/admin/cli/commands/org-limit-aggregate.js +362 -0
- package/admin/cli/commands/org-limit-default.js +22 -0
- package/{auth/cli/commands/confirm-upload.d.ts → admin/cli/commands/org-limit-event.d.ts} +1 -1
- package/admin/cli/commands/org-limit-event.js +212 -0
- package/admin/cli/commands/org-limit.js +66 -0
- package/admin/cli/commands/org-membership-setting.js +44 -0
- package/admin/cli/commands.js +25 -21
- package/admin/cli/executor.d.ts +12 -14
- package/admin/orm/index.d.ts +24 -23
- package/admin/orm/index.js +24 -18
- package/admin/orm/input-types.d.ts +1297 -839
- package/admin/orm/models/appLimitEvent.d.ts +32 -0
- package/admin/orm/models/appLimitEvent.js +55 -0
- package/admin/orm/models/index.d.ts +12 -9
- package/admin/orm/models/index.js +25 -19
- package/admin/orm/models/orgLimitAggregate.d.ts +56 -0
- package/admin/orm/models/orgLimitAggregate.js +100 -0
- package/admin/orm/models/orgLimitEvent.d.ts +32 -0
- package/admin/orm/models/orgLimitEvent.js +55 -0
- package/admin/orm/mutation/index.d.ts +1 -15
- package/admin/orm/mutation/index.js +0 -12
- package/auth/cli/commands.js +1 -3
- package/auth/cli/executor.d.ts +0 -5
- package/auth/orm/index.d.ts +0 -5
- package/auth/orm/input-types.d.ts +0 -20
- package/auth/orm/mutation/index.d.ts +1 -15
- package/auth/orm/mutation/index.js +0 -12
- package/esm/admin/cli/commands/app-invite.js +22 -0
- package/esm/admin/cli/commands/app-limit-default.js +22 -0
- package/esm/{auth/cli/commands/confirm-upload.d.ts → admin/cli/commands/app-limit-event.d.ts} +1 -1
- package/esm/admin/cli/commands/app-limit-event.js +210 -0
- package/esm/admin/cli/commands/app-limit.js +66 -0
- package/esm/admin/cli/commands/app-membership.js +0 -22
- package/esm/admin/cli/commands/org-invite.js +22 -0
- package/esm/admin/cli/commands/org-limit-aggregate.d.ts +8 -0
- package/esm/admin/cli/commands/org-limit-aggregate.js +360 -0
- package/esm/admin/cli/commands/org-limit-default.js +22 -0
- package/esm/admin/cli/commands/org-limit-event.d.ts +8 -0
- package/esm/admin/cli/commands/org-limit-event.js +210 -0
- package/esm/admin/cli/commands/org-limit.js +66 -0
- package/esm/admin/cli/commands/org-membership-setting.js +44 -0
- package/esm/admin/cli/commands.js +25 -21
- package/esm/admin/cli/executor.d.ts +12 -14
- package/esm/admin/orm/index.d.ts +24 -23
- package/esm/admin/orm/index.js +24 -18
- package/esm/admin/orm/input-types.d.ts +1297 -839
- package/esm/admin/orm/models/appLimitEvent.d.ts +32 -0
- package/esm/admin/orm/models/appLimitEvent.js +51 -0
- package/esm/admin/orm/models/index.d.ts +12 -9
- package/esm/admin/orm/models/index.js +12 -9
- package/esm/admin/orm/models/orgLimitAggregate.d.ts +56 -0
- package/esm/admin/orm/models/orgLimitAggregate.js +96 -0
- package/esm/admin/orm/models/orgLimitEvent.d.ts +32 -0
- package/esm/admin/orm/models/orgLimitEvent.js +51 -0
- package/esm/admin/orm/mutation/index.d.ts +1 -15
- package/esm/admin/orm/mutation/index.js +0 -12
- package/esm/auth/cli/commands.js +1 -3
- package/esm/auth/cli/executor.d.ts +0 -5
- package/esm/auth/orm/index.d.ts +0 -5
- package/esm/auth/orm/input-types.d.ts +0 -20
- package/esm/auth/orm/mutation/index.d.ts +1 -15
- package/esm/auth/orm/mutation/index.js +0 -12
- package/esm/objects/cli/commands.js +1 -3
- package/esm/objects/cli/executor.d.ts +0 -5
- package/esm/objects/orm/index.d.ts +0 -5
- package/esm/objects/orm/input-types.d.ts +0 -20
- package/esm/objects/orm/mutation/index.d.ts +1 -15
- package/esm/objects/orm/mutation/index.js +0 -12
- package/esm/public/cli/commands/agent-message.d.ts +8 -0
- package/esm/public/cli/commands/agent-message.js +324 -0
- package/esm/public/cli/commands/agent-task.d.ts +8 -0
- package/esm/public/cli/commands/agent-task.js +368 -0
- package/esm/public/cli/commands/agent-thread.d.ts +8 -0
- package/esm/public/cli/commands/agent-thread.js +372 -0
- package/esm/public/cli/commands/app-invite.js +22 -0
- package/esm/public/cli/commands/app-limit-default.js +22 -0
- package/esm/public/cli/commands/app-limit-event.d.ts +8 -0
- package/esm/public/cli/commands/app-limit-event.js +210 -0
- package/esm/public/cli/commands/app-limit.js +66 -0
- package/esm/public/cli/commands/app-membership.js +0 -22
- package/esm/public/cli/commands/billing-module.d.ts +8 -0
- package/esm/public/cli/commands/billing-module.js +492 -0
- package/esm/public/cli/commands/limits-module.js +22 -0
- package/esm/public/cli/commands/node-type-registry.d.ts +8 -0
- package/esm/public/cli/commands/node-type-registry.js +343 -0
- package/esm/public/cli/commands/org-invite.js +22 -0
- package/esm/public/cli/commands/org-limit-aggregate.d.ts +8 -0
- package/esm/public/cli/commands/org-limit-aggregate.js +360 -0
- package/esm/public/cli/commands/org-limit-default.js +22 -0
- package/esm/public/cli/commands/org-limit-event.d.ts +8 -0
- package/esm/public/cli/commands/org-limit-event.js +210 -0
- package/esm/public/cli/commands/org-limit.js +66 -0
- package/esm/public/cli/commands/org-membership-setting.js +44 -0
- package/esm/public/cli/commands/plans-module.d.ts +8 -0
- package/esm/public/cli/commands/plans-module.js +426 -0
- package/esm/public/cli/commands/profiles-module.js +44 -0
- package/esm/public/cli/commands/storage-module.js +22 -44
- package/esm/public/cli/commands.js +45 -29
- package/esm/public/cli/executor.d.ts +38 -34
- package/esm/public/orm/index.d.ts +56 -43
- package/esm/public/orm/index.js +36 -18
- package/esm/public/orm/input-types.d.ts +2983 -1112
- package/esm/public/orm/input-types.js +9 -0
- package/esm/public/orm/models/agentMessage.d.ts +56 -0
- package/esm/public/orm/models/agentMessage.js +96 -0
- package/esm/public/orm/models/agentTask.d.ts +56 -0
- package/esm/public/orm/models/agentTask.js +96 -0
- package/esm/public/orm/models/agentThread.d.ts +56 -0
- package/esm/public/orm/models/agentThread.js +96 -0
- package/esm/public/orm/models/appLimitEvent.d.ts +32 -0
- package/esm/public/orm/models/appLimitEvent.js +51 -0
- package/esm/public/orm/models/billingModule.d.ts +56 -0
- package/esm/public/orm/models/billingModule.js +96 -0
- package/esm/public/orm/models/index.d.ts +18 -9
- package/esm/public/orm/models/index.js +18 -9
- package/esm/public/orm/models/nodeTypeRegistry.d.ts +56 -0
- package/esm/public/orm/models/nodeTypeRegistry.js +96 -0
- package/esm/public/orm/models/orgLimitAggregate.d.ts +56 -0
- package/esm/public/orm/models/orgLimitAggregate.js +96 -0
- package/esm/public/orm/models/orgLimitEvent.d.ts +32 -0
- package/esm/public/orm/models/orgLimitEvent.js +51 -0
- package/esm/public/orm/models/plansModule.d.ts +56 -0
- package/esm/public/orm/models/plansModule.js +96 -0
- package/esm/public/orm/mutation/index.d.ts +17 -31
- package/esm/public/orm/mutation/index.js +24 -36
- package/esm/public/orm/query/index.d.ts +28 -28
- package/esm/public/orm/query/index.js +48 -48
- package/objects/cli/commands.js +1 -3
- package/objects/cli/executor.d.ts +0 -5
- package/objects/orm/index.d.ts +0 -5
- package/objects/orm/input-types.d.ts +0 -20
- package/objects/orm/mutation/index.d.ts +1 -15
- package/objects/orm/mutation/index.js +0 -12
- package/package.json +4 -4
- package/public/cli/commands/agent-message.d.ts +8 -0
- package/public/cli/commands/agent-message.js +326 -0
- package/public/cli/commands/agent-task.d.ts +8 -0
- package/public/cli/commands/agent-task.js +370 -0
- package/public/cli/commands/agent-thread.d.ts +8 -0
- package/public/cli/commands/agent-thread.js +374 -0
- package/public/cli/commands/app-invite.js +22 -0
- package/public/cli/commands/app-limit-default.js +22 -0
- package/public/cli/commands/app-limit-event.d.ts +8 -0
- package/public/cli/commands/app-limit-event.js +212 -0
- package/public/cli/commands/app-limit.js +66 -0
- package/public/cli/commands/app-membership.js +0 -22
- package/public/cli/commands/billing-module.d.ts +8 -0
- package/public/cli/commands/billing-module.js +494 -0
- package/public/cli/commands/limits-module.js +22 -0
- package/public/cli/commands/node-type-registry.d.ts +8 -0
- package/public/cli/commands/node-type-registry.js +345 -0
- package/public/cli/commands/org-invite.js +22 -0
- package/public/cli/commands/org-limit-aggregate.d.ts +8 -0
- package/public/cli/commands/org-limit-aggregate.js +362 -0
- package/public/cli/commands/org-limit-default.js +22 -0
- package/public/cli/commands/org-limit-event.d.ts +8 -0
- package/public/cli/commands/org-limit-event.js +212 -0
- package/public/cli/commands/org-limit.js +66 -0
- package/public/cli/commands/org-membership-setting.js +44 -0
- package/public/cli/commands/plans-module.d.ts +8 -0
- package/public/cli/commands/plans-module.js +428 -0
- package/public/cli/commands/profiles-module.js +44 -0
- package/public/cli/commands/storage-module.js +22 -44
- package/public/cli/commands.js +45 -29
- package/public/cli/executor.d.ts +38 -34
- package/public/orm/index.d.ts +56 -43
- package/public/orm/index.js +36 -18
- package/public/orm/input-types.d.ts +2983 -1112
- package/public/orm/input-types.js +9 -0
- package/public/orm/models/agentMessage.d.ts +56 -0
- package/public/orm/models/agentMessage.js +100 -0
- package/public/orm/models/agentTask.d.ts +56 -0
- package/public/orm/models/agentTask.js +100 -0
- package/public/orm/models/agentThread.d.ts +56 -0
- package/public/orm/models/agentThread.js +100 -0
- package/public/orm/models/appLimitEvent.d.ts +32 -0
- package/public/orm/models/appLimitEvent.js +55 -0
- package/public/orm/models/billingModule.d.ts +56 -0
- package/public/orm/models/billingModule.js +100 -0
- package/public/orm/models/index.d.ts +18 -9
- package/public/orm/models/index.js +39 -21
- package/public/orm/models/nodeTypeRegistry.d.ts +56 -0
- package/public/orm/models/nodeTypeRegistry.js +100 -0
- package/public/orm/models/orgLimitAggregate.d.ts +56 -0
- package/public/orm/models/orgLimitAggregate.js +100 -0
- package/public/orm/models/orgLimitEvent.d.ts +32 -0
- package/public/orm/models/orgLimitEvent.js +55 -0
- package/public/orm/models/plansModule.d.ts +56 -0
- package/public/orm/models/plansModule.js +100 -0
- package/public/orm/mutation/index.d.ts +17 -31
- package/public/orm/mutation/index.js +24 -36
- package/public/orm/query/index.d.ts +28 -28
- package/public/orm/query/index.js +48 -48
- package/admin/cli/commands/confirm-upload.js +0 -36
- package/auth/cli/commands/confirm-upload.js +0 -36
- package/esm/admin/cli/commands/confirm-upload.js +0 -34
- package/esm/auth/cli/commands/confirm-upload.js +0 -34
- package/esm/objects/cli/commands/confirm-upload.d.ts +0 -8
- package/esm/objects/cli/commands/confirm-upload.js +0 -34
- package/esm/public/cli/commands/confirm-upload.d.ts +0 -8
- package/esm/public/cli/commands/confirm-upload.js +0 -34
- package/objects/cli/commands/confirm-upload.d.ts +0 -8
- package/objects/cli/commands/confirm-upload.js +0 -36
- package/public/cli/commands/confirm-upload.d.ts +0 -8
- package/public/cli/commands/confirm-upload.js +0 -36
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* CLI commands for AppLimitEvent
|
|
5
|
+
* @generated by @constructive-io/graphql-codegen
|
|
6
|
+
* DO NOT EDIT - changes will be overwritten
|
|
7
|
+
*/
|
|
8
|
+
const inquirerer_1 = require("inquirerer");
|
|
9
|
+
const executor_1 = require("../executor");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
const fieldSchema = {
|
|
12
|
+
name: 'string',
|
|
13
|
+
actorId: 'uuid',
|
|
14
|
+
entityId: 'uuid',
|
|
15
|
+
eventType: 'string',
|
|
16
|
+
delta: 'int',
|
|
17
|
+
numBefore: 'int',
|
|
18
|
+
numAfter: 'int',
|
|
19
|
+
maxAtEvent: 'int',
|
|
20
|
+
reason: 'string',
|
|
21
|
+
};
|
|
22
|
+
const usage = '\napp-limit-event <command>\n\nCommands:\n list List appLimitEvent records\n find-first Find first matching appLimitEvent record\n create Create a new appLimitEvent\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';
|
|
23
|
+
exports.default = async (argv, prompter, _options) => {
|
|
24
|
+
if (argv.help || argv.h) {
|
|
25
|
+
console.log(usage);
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
|
|
29
|
+
if (!subcommand) {
|
|
30
|
+
const answer = await prompter.prompt(argv, [
|
|
31
|
+
{
|
|
32
|
+
type: 'autocomplete',
|
|
33
|
+
name: 'subcommand',
|
|
34
|
+
message: 'What do you want to do?',
|
|
35
|
+
options: ['list', 'find-first', 'create'],
|
|
36
|
+
},
|
|
37
|
+
]);
|
|
38
|
+
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
39
|
+
}
|
|
40
|
+
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
41
|
+
};
|
|
42
|
+
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
43
|
+
switch (subcommand) {
|
|
44
|
+
case 'list':
|
|
45
|
+
return handleList(argv, prompter);
|
|
46
|
+
case 'find-first':
|
|
47
|
+
return handleFindFirst(argv, prompter);
|
|
48
|
+
case 'create':
|
|
49
|
+
return handleCreate(argv, prompter);
|
|
50
|
+
default:
|
|
51
|
+
console.log(usage);
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async function handleList(argv, _prompter) {
|
|
56
|
+
try {
|
|
57
|
+
const defaultSelect = {
|
|
58
|
+
name: true,
|
|
59
|
+
actorId: true,
|
|
60
|
+
entityId: true,
|
|
61
|
+
eventType: true,
|
|
62
|
+
delta: true,
|
|
63
|
+
numBefore: true,
|
|
64
|
+
numAfter: true,
|
|
65
|
+
maxAtEvent: true,
|
|
66
|
+
reason: true,
|
|
67
|
+
};
|
|
68
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
69
|
+
const client = (0, executor_1.getClient)();
|
|
70
|
+
const result = await client.appLimitEvent.findMany(findManyArgs).execute();
|
|
71
|
+
console.log(JSON.stringify(result, null, 2));
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
console.error('Failed to list records.');
|
|
75
|
+
if (error instanceof Error) {
|
|
76
|
+
console.error(error.message);
|
|
77
|
+
}
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async function handleFindFirst(argv, _prompter) {
|
|
82
|
+
try {
|
|
83
|
+
const defaultSelect = {
|
|
84
|
+
name: true,
|
|
85
|
+
actorId: true,
|
|
86
|
+
entityId: true,
|
|
87
|
+
eventType: true,
|
|
88
|
+
delta: true,
|
|
89
|
+
numBefore: true,
|
|
90
|
+
numAfter: true,
|
|
91
|
+
maxAtEvent: true,
|
|
92
|
+
reason: true,
|
|
93
|
+
};
|
|
94
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
95
|
+
const client = (0, executor_1.getClient)();
|
|
96
|
+
const result = await client.appLimitEvent.findFirst(findFirstArgs).execute();
|
|
97
|
+
console.log(JSON.stringify(result, null, 2));
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
console.error('Failed to find record.');
|
|
101
|
+
if (error instanceof Error) {
|
|
102
|
+
console.error(error.message);
|
|
103
|
+
}
|
|
104
|
+
process.exit(1);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async function handleCreate(argv, prompter) {
|
|
108
|
+
try {
|
|
109
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
110
|
+
{
|
|
111
|
+
type: 'text',
|
|
112
|
+
name: 'name',
|
|
113
|
+
message: 'name',
|
|
114
|
+
required: false,
|
|
115
|
+
skipPrompt: true,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
type: 'text',
|
|
119
|
+
name: 'actorId',
|
|
120
|
+
message: 'actorId',
|
|
121
|
+
required: false,
|
|
122
|
+
skipPrompt: true,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'text',
|
|
126
|
+
name: 'entityId',
|
|
127
|
+
message: 'entityId',
|
|
128
|
+
required: false,
|
|
129
|
+
skipPrompt: true,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
type: 'text',
|
|
133
|
+
name: 'eventType',
|
|
134
|
+
message: 'eventType',
|
|
135
|
+
required: false,
|
|
136
|
+
skipPrompt: true,
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
type: 'text',
|
|
140
|
+
name: 'delta',
|
|
141
|
+
message: 'delta',
|
|
142
|
+
required: false,
|
|
143
|
+
skipPrompt: true,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'text',
|
|
147
|
+
name: 'numBefore',
|
|
148
|
+
message: 'numBefore',
|
|
149
|
+
required: false,
|
|
150
|
+
skipPrompt: true,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
type: 'text',
|
|
154
|
+
name: 'numAfter',
|
|
155
|
+
message: 'numAfter',
|
|
156
|
+
required: false,
|
|
157
|
+
skipPrompt: true,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
type: 'text',
|
|
161
|
+
name: 'maxAtEvent',
|
|
162
|
+
message: 'maxAtEvent',
|
|
163
|
+
required: false,
|
|
164
|
+
skipPrompt: true,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
type: 'text',
|
|
168
|
+
name: 'reason',
|
|
169
|
+
message: 'reason',
|
|
170
|
+
required: false,
|
|
171
|
+
skipPrompt: true,
|
|
172
|
+
},
|
|
173
|
+
]);
|
|
174
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
175
|
+
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
176
|
+
const client = (0, executor_1.getClient)();
|
|
177
|
+
const result = await client.appLimitEvent
|
|
178
|
+
.create({
|
|
179
|
+
data: {
|
|
180
|
+
name: cleanedData.name,
|
|
181
|
+
actorId: cleanedData.actorId,
|
|
182
|
+
entityId: cleanedData.entityId,
|
|
183
|
+
eventType: cleanedData.eventType,
|
|
184
|
+
delta: cleanedData.delta,
|
|
185
|
+
numBefore: cleanedData.numBefore,
|
|
186
|
+
numAfter: cleanedData.numAfter,
|
|
187
|
+
maxAtEvent: cleanedData.maxAtEvent,
|
|
188
|
+
reason: cleanedData.reason,
|
|
189
|
+
},
|
|
190
|
+
select: {
|
|
191
|
+
name: true,
|
|
192
|
+
actorId: true,
|
|
193
|
+
entityId: true,
|
|
194
|
+
eventType: true,
|
|
195
|
+
delta: true,
|
|
196
|
+
numBefore: true,
|
|
197
|
+
numAfter: true,
|
|
198
|
+
maxAtEvent: true,
|
|
199
|
+
reason: true,
|
|
200
|
+
},
|
|
201
|
+
})
|
|
202
|
+
.execute();
|
|
203
|
+
console.log(JSON.stringify(result, null, 2));
|
|
204
|
+
}
|
|
205
|
+
catch (error) {
|
|
206
|
+
console.error('Failed to create record.');
|
|
207
|
+
if (error instanceof Error) {
|
|
208
|
+
console.error(error.message);
|
|
209
|
+
}
|
|
210
|
+
process.exit(1);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -14,6 +14,9 @@ const fieldSchema = {
|
|
|
14
14
|
actorId: 'uuid',
|
|
15
15
|
num: 'int',
|
|
16
16
|
max: 'int',
|
|
17
|
+
softMax: 'int',
|
|
18
|
+
windowStart: 'string',
|
|
19
|
+
windowDuration: 'string',
|
|
17
20
|
};
|
|
18
21
|
const usage = '\napp-limit <command>\n\nCommands:\n list List appLimit records\n find-first Find first matching appLimit record\n get Get a appLimit by ID\n create Create a new appLimit\n update Update an existing appLimit\n delete Delete a appLimit\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';
|
|
19
22
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -62,6 +65,9 @@ async function handleList(argv, _prompter) {
|
|
|
62
65
|
actorId: true,
|
|
63
66
|
num: true,
|
|
64
67
|
max: true,
|
|
68
|
+
softMax: true,
|
|
69
|
+
windowStart: true,
|
|
70
|
+
windowDuration: true,
|
|
65
71
|
};
|
|
66
72
|
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
67
73
|
const client = (0, executor_1.getClient)();
|
|
@@ -84,6 +90,9 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
84
90
|
actorId: true,
|
|
85
91
|
num: true,
|
|
86
92
|
max: true,
|
|
93
|
+
softMax: true,
|
|
94
|
+
windowStart: true,
|
|
95
|
+
windowDuration: true,
|
|
87
96
|
};
|
|
88
97
|
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
89
98
|
const client = (0, executor_1.getClient)();
|
|
@@ -118,6 +127,9 @@ async function handleGet(argv, prompter) {
|
|
|
118
127
|
actorId: true,
|
|
119
128
|
num: true,
|
|
120
129
|
max: true,
|
|
130
|
+
softMax: true,
|
|
131
|
+
windowStart: true,
|
|
132
|
+
windowDuration: true,
|
|
121
133
|
},
|
|
122
134
|
})
|
|
123
135
|
.execute();
|
|
@@ -161,6 +173,27 @@ async function handleCreate(argv, prompter) {
|
|
|
161
173
|
required: false,
|
|
162
174
|
skipPrompt: true,
|
|
163
175
|
},
|
|
176
|
+
{
|
|
177
|
+
type: 'text',
|
|
178
|
+
name: 'softMax',
|
|
179
|
+
message: 'softMax',
|
|
180
|
+
required: false,
|
|
181
|
+
skipPrompt: true,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
type: 'text',
|
|
185
|
+
name: 'windowStart',
|
|
186
|
+
message: 'windowStart',
|
|
187
|
+
required: false,
|
|
188
|
+
skipPrompt: true,
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
type: 'text',
|
|
192
|
+
name: 'windowDuration',
|
|
193
|
+
message: 'windowDuration',
|
|
194
|
+
required: false,
|
|
195
|
+
skipPrompt: true,
|
|
196
|
+
},
|
|
164
197
|
]);
|
|
165
198
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
166
199
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -172,6 +205,9 @@ async function handleCreate(argv, prompter) {
|
|
|
172
205
|
actorId: cleanedData.actorId,
|
|
173
206
|
num: cleanedData.num,
|
|
174
207
|
max: cleanedData.max,
|
|
208
|
+
softMax: cleanedData.softMax,
|
|
209
|
+
windowStart: cleanedData.windowStart,
|
|
210
|
+
windowDuration: cleanedData.windowDuration,
|
|
175
211
|
},
|
|
176
212
|
select: {
|
|
177
213
|
id: true,
|
|
@@ -179,6 +215,9 @@ async function handleCreate(argv, prompter) {
|
|
|
179
215
|
actorId: true,
|
|
180
216
|
num: true,
|
|
181
217
|
max: true,
|
|
218
|
+
softMax: true,
|
|
219
|
+
windowStart: true,
|
|
220
|
+
windowDuration: true,
|
|
182
221
|
},
|
|
183
222
|
})
|
|
184
223
|
.execute();
|
|
@@ -228,6 +267,27 @@ async function handleUpdate(argv, prompter) {
|
|
|
228
267
|
required: false,
|
|
229
268
|
skipPrompt: true,
|
|
230
269
|
},
|
|
270
|
+
{
|
|
271
|
+
type: 'text',
|
|
272
|
+
name: 'softMax',
|
|
273
|
+
message: 'softMax',
|
|
274
|
+
required: false,
|
|
275
|
+
skipPrompt: true,
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
type: 'text',
|
|
279
|
+
name: 'windowStart',
|
|
280
|
+
message: 'windowStart',
|
|
281
|
+
required: false,
|
|
282
|
+
skipPrompt: true,
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
type: 'text',
|
|
286
|
+
name: 'windowDuration',
|
|
287
|
+
message: 'windowDuration',
|
|
288
|
+
required: false,
|
|
289
|
+
skipPrompt: true,
|
|
290
|
+
},
|
|
231
291
|
]);
|
|
232
292
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
233
293
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -242,6 +302,9 @@ async function handleUpdate(argv, prompter) {
|
|
|
242
302
|
actorId: cleanedData.actorId,
|
|
243
303
|
num: cleanedData.num,
|
|
244
304
|
max: cleanedData.max,
|
|
305
|
+
softMax: cleanedData.softMax,
|
|
306
|
+
windowStart: cleanedData.windowStart,
|
|
307
|
+
windowDuration: cleanedData.windowDuration,
|
|
245
308
|
},
|
|
246
309
|
select: {
|
|
247
310
|
id: true,
|
|
@@ -249,6 +312,9 @@ async function handleUpdate(argv, prompter) {
|
|
|
249
312
|
actorId: true,
|
|
250
313
|
num: true,
|
|
251
314
|
max: true,
|
|
315
|
+
softMax: true,
|
|
316
|
+
windowStart: true,
|
|
317
|
+
windowDuration: true,
|
|
252
318
|
},
|
|
253
319
|
})
|
|
254
320
|
.execute();
|
|
@@ -19,7 +19,6 @@ const fieldSchema = {
|
|
|
19
19
|
isDisabled: 'boolean',
|
|
20
20
|
isVerified: 'boolean',
|
|
21
21
|
isActive: 'boolean',
|
|
22
|
-
isExternal: 'boolean',
|
|
23
22
|
isOwner: 'boolean',
|
|
24
23
|
isAdmin: 'boolean',
|
|
25
24
|
permissions: 'string',
|
|
@@ -79,7 +78,6 @@ async function handleList(argv, _prompter) {
|
|
|
79
78
|
isDisabled: true,
|
|
80
79
|
isVerified: true,
|
|
81
80
|
isActive: true,
|
|
82
|
-
isExternal: true,
|
|
83
81
|
isOwner: true,
|
|
84
82
|
isAdmin: true,
|
|
85
83
|
permissions: true,
|
|
@@ -113,7 +111,6 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
113
111
|
isDisabled: true,
|
|
114
112
|
isVerified: true,
|
|
115
113
|
isActive: true,
|
|
116
|
-
isExternal: true,
|
|
117
114
|
isOwner: true,
|
|
118
115
|
isAdmin: true,
|
|
119
116
|
permissions: true,
|
|
@@ -159,7 +156,6 @@ async function handleGet(argv, prompter) {
|
|
|
159
156
|
isDisabled: true,
|
|
160
157
|
isVerified: true,
|
|
161
158
|
isActive: true,
|
|
162
|
-
isExternal: true,
|
|
163
159
|
isOwner: true,
|
|
164
160
|
isAdmin: true,
|
|
165
161
|
permissions: true,
|
|
@@ -231,13 +227,6 @@ async function handleCreate(argv, prompter) {
|
|
|
231
227
|
required: false,
|
|
232
228
|
skipPrompt: true,
|
|
233
229
|
},
|
|
234
|
-
{
|
|
235
|
-
type: 'boolean',
|
|
236
|
-
name: 'isExternal',
|
|
237
|
-
message: 'isExternal',
|
|
238
|
-
required: false,
|
|
239
|
-
skipPrompt: true,
|
|
240
|
-
},
|
|
241
230
|
{
|
|
242
231
|
type: 'boolean',
|
|
243
232
|
name: 'isOwner',
|
|
@@ -293,7 +282,6 @@ async function handleCreate(argv, prompter) {
|
|
|
293
282
|
isDisabled: cleanedData.isDisabled,
|
|
294
283
|
isVerified: cleanedData.isVerified,
|
|
295
284
|
isActive: cleanedData.isActive,
|
|
296
|
-
isExternal: cleanedData.isExternal,
|
|
297
285
|
isOwner: cleanedData.isOwner,
|
|
298
286
|
isAdmin: cleanedData.isAdmin,
|
|
299
287
|
permissions: cleanedData.permissions,
|
|
@@ -312,7 +300,6 @@ async function handleCreate(argv, prompter) {
|
|
|
312
300
|
isDisabled: true,
|
|
313
301
|
isVerified: true,
|
|
314
302
|
isActive: true,
|
|
315
|
-
isExternal: true,
|
|
316
303
|
isOwner: true,
|
|
317
304
|
isAdmin: true,
|
|
318
305
|
permissions: true,
|
|
@@ -390,13 +377,6 @@ async function handleUpdate(argv, prompter) {
|
|
|
390
377
|
required: false,
|
|
391
378
|
skipPrompt: true,
|
|
392
379
|
},
|
|
393
|
-
{
|
|
394
|
-
type: 'boolean',
|
|
395
|
-
name: 'isExternal',
|
|
396
|
-
message: 'isExternal',
|
|
397
|
-
required: false,
|
|
398
|
-
skipPrompt: true,
|
|
399
|
-
},
|
|
400
380
|
{
|
|
401
381
|
type: 'boolean',
|
|
402
382
|
name: 'isOwner',
|
|
@@ -455,7 +435,6 @@ async function handleUpdate(argv, prompter) {
|
|
|
455
435
|
isDisabled: cleanedData.isDisabled,
|
|
456
436
|
isVerified: cleanedData.isVerified,
|
|
457
437
|
isActive: cleanedData.isActive,
|
|
458
|
-
isExternal: cleanedData.isExternal,
|
|
459
438
|
isOwner: cleanedData.isOwner,
|
|
460
439
|
isAdmin: cleanedData.isAdmin,
|
|
461
440
|
permissions: cleanedData.permissions,
|
|
@@ -474,7 +453,6 @@ async function handleUpdate(argv, prompter) {
|
|
|
474
453
|
isDisabled: true,
|
|
475
454
|
isVerified: true,
|
|
476
455
|
isActive: true,
|
|
477
|
-
isExternal: true,
|
|
478
456
|
isOwner: true,
|
|
479
457
|
isAdmin: true,
|
|
480
458
|
permissions: true,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for BillingModule
|
|
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;
|