@constructive-sdk/cli 0.22.3 → 0.22.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/{app-achievement.d.ts → app-limit-warning.d.ts} +1 -1
- package/{public/cli/commands/app-step.js → admin/cli/commands/app-limit-warning.js} +58 -54
- package/{esm/admin/cli/commands/app-achievement.d.ts → admin/cli/commands/org-limit-warning.d.ts} +1 -1
- package/admin/cli/commands/{app-level.js → org-limit-warning.js} +66 -62
- package/admin/cli/commands.js +7 -15
- package/admin/cli/executor.d.ts +3 -15
- package/admin/orm/index.d.ts +6 -20
- package/admin/orm/index.js +6 -10
- package/admin/orm/input-types.d.ts +488 -768
- package/admin/orm/models/appLimitWarning.d.ts +54 -0
- package/{public/orm/models/secretsModule.js → admin/orm/models/appLimitWarning.js} +27 -27
- package/admin/orm/models/index.d.ts +3 -5
- package/admin/orm/models/index.js +7 -11
- package/admin/orm/models/orgLimitWarning.d.ts +54 -0
- package/admin/orm/models/{appAchievement.js → orgLimitWarning.js} +27 -27
- package/admin/orm/query/index.d.ts +1 -28
- package/admin/orm/query/index.js +0 -44
- package/{admin/cli/commands/app-step.d.ts → esm/admin/cli/commands/app-limit-warning.d.ts} +1 -1
- package/esm/{public/cli/commands/app-step.js → admin/cli/commands/app-limit-warning.js} +58 -54
- package/esm/admin/cli/commands/org-limit-warning.d.ts +8 -0
- package/esm/{public/cli/commands/app-level.js → admin/cli/commands/org-limit-warning.js} +66 -62
- package/esm/admin/cli/commands.js +7 -15
- package/esm/admin/cli/executor.d.ts +3 -15
- package/esm/admin/orm/index.d.ts +6 -20
- package/esm/admin/orm/index.js +6 -10
- package/esm/admin/orm/input-types.d.ts +488 -768
- package/esm/admin/orm/models/appLimitWarning.d.ts +54 -0
- package/esm/{public/orm/models/appAchievement.js → admin/orm/models/appLimitWarning.js} +25 -25
- package/esm/admin/orm/models/index.d.ts +3 -5
- package/esm/admin/orm/models/index.js +3 -5
- package/esm/admin/orm/models/orgLimitWarning.d.ts +54 -0
- package/esm/admin/orm/models/{appAchievement.js → orgLimitWarning.js} +25 -25
- package/esm/admin/orm/query/index.d.ts +1 -28
- package/esm/admin/orm/query/index.js +0 -44
- package/esm/public/cli/commands/app-limit-warning.d.ts +8 -0
- package/esm/{admin/cli/commands/app-step.js → public/cli/commands/app-limit-warning.js} +58 -54
- package/esm/public/cli/commands/construct-blueprint.js +1 -1
- package/esm/public/cli/commands/create-user-database.js +1 -1
- package/esm/public/cli/commands/embedding-chunk.js +66 -0
- package/esm/public/cli/commands/entity-type-provision.js +22 -0
- package/esm/{admin/cli/commands/app-level.d.ts → public/cli/commands/events-module.d.ts} +1 -1
- package/esm/public/cli/commands/{levels-module.js → events-module.js} +438 -152
- package/esm/public/cli/commands/limits-module.js +88 -0
- package/esm/public/cli/commands/org-limit-warning.d.ts +8 -0
- package/esm/{admin/cli/commands/app-level.js → public/cli/commands/org-limit-warning.js} +66 -62
- package/esm/public/cli/commands/partition.js +24 -24
- package/{admin/cli/commands/app-level-requirement.d.ts → esm/public/cli/commands/rate-limit-meters-module.d.ts} +1 -1
- package/esm/public/cli/commands/rate-limit-meters-module.js +448 -0
- package/esm/public/cli/commands/realtime-module.js +24 -24
- package/esm/public/cli/commands/user-state-module.d.ts +8 -0
- package/esm/public/cli/commands/{secrets-module.js → user-state-module.js} +8 -8
- package/esm/public/cli/commands.js +11 -17
- package/esm/public/cli/executor.d.ts +5 -16
- package/esm/public/orm/index.d.ts +10 -22
- package/esm/public/orm/index.js +10 -12
- package/esm/public/orm/input-types.d.ts +1024 -919
- package/esm/public/orm/input-types.js +3 -5
- package/esm/public/orm/models/appLimitWarning.d.ts +54 -0
- package/esm/{admin/orm/models/appLevel.js → public/orm/models/appLimitWarning.js} +25 -25
- package/esm/public/orm/models/eventsModule.d.ts +54 -0
- package/esm/public/orm/models/{levelsModule.js → eventsModule.js} +25 -25
- package/esm/public/orm/models/index.d.ts +5 -6
- package/esm/public/orm/models/index.js +5 -6
- package/esm/public/orm/models/orgLimitWarning.d.ts +54 -0
- package/esm/{admin/orm/models/appStep.js → public/orm/models/orgLimitWarning.js} +25 -25
- package/esm/public/orm/models/rateLimitMetersModule.d.ts +54 -0
- package/esm/{admin/orm/models/appLevelRequirement.js → public/orm/models/rateLimitMetersModule.js} +25 -25
- package/esm/public/orm/models/userStateModule.d.ts +54 -0
- package/esm/public/orm/models/userStateModule.js +100 -0
- package/esm/public/orm/mutation/index.d.ts +2 -2
- package/esm/public/orm/query/index.d.ts +1 -28
- package/esm/public/orm/query/index.js +0 -44
- package/package.json +4 -4
- package/public/cli/commands/app-limit-warning.d.ts +8 -0
- package/{admin/cli/commands/app-step.js → public/cli/commands/app-limit-warning.js} +58 -54
- package/public/cli/commands/construct-blueprint.js +1 -1
- package/public/cli/commands/create-user-database.js +1 -1
- package/public/cli/commands/embedding-chunk.js +66 -0
- package/public/cli/commands/entity-type-provision.js +22 -0
- package/{admin/cli/commands/app-level.d.ts → public/cli/commands/events-module.d.ts} +1 -1
- package/public/cli/commands/{levels-module.js → events-module.js} +438 -152
- package/public/cli/commands/limits-module.js +88 -0
- package/public/cli/commands/org-limit-warning.d.ts +8 -0
- package/public/cli/commands/{app-level.js → org-limit-warning.js} +66 -62
- package/public/cli/commands/partition.js +24 -24
- package/public/cli/commands/rate-limit-meters-module.d.ts +8 -0
- package/public/cli/commands/rate-limit-meters-module.js +450 -0
- package/public/cli/commands/realtime-module.js +24 -24
- package/public/cli/commands/user-state-module.d.ts +8 -0
- package/public/cli/commands/{secrets-module.js → user-state-module.js} +8 -8
- package/public/cli/commands.js +11 -17
- package/public/cli/executor.d.ts +5 -16
- package/public/orm/index.d.ts +10 -22
- package/public/orm/index.js +10 -12
- package/public/orm/input-types.d.ts +1024 -919
- package/public/orm/input-types.js +3 -5
- package/public/orm/models/appLimitWarning.d.ts +54 -0
- package/{admin/orm/models/appStep.js → public/orm/models/appLimitWarning.js} +27 -27
- package/public/orm/models/eventsModule.d.ts +54 -0
- package/public/orm/models/{levelsModule.js → eventsModule.js} +27 -27
- package/public/orm/models/index.d.ts +5 -6
- package/public/orm/models/index.js +13 -15
- package/public/orm/models/orgLimitWarning.d.ts +54 -0
- package/{admin/orm/models/appLevel.js → public/orm/models/orgLimitWarning.js} +27 -27
- package/public/orm/models/rateLimitMetersModule.d.ts +54 -0
- package/public/orm/models/{appAchievement.js → rateLimitMetersModule.js} +27 -27
- package/public/orm/models/userStateModule.d.ts +54 -0
- package/public/orm/models/userStateModule.js +104 -0
- package/public/orm/mutation/index.d.ts +2 -2
- package/public/orm/query/index.d.ts +1 -28
- package/public/orm/query/index.js +0 -44
- package/admin/cli/commands/app-achievement.js +0 -286
- package/admin/cli/commands/app-level-requirement.js +0 -328
- package/admin/cli/commands/steps-achieved.d.ts +0 -8
- package/admin/cli/commands/steps-achieved.js +0 -35
- package/admin/cli/commands/steps-required.d.ts +0 -8
- package/admin/cli/commands/steps-required.js +0 -54
- package/admin/orm/models/appAchievement.d.ts +0 -54
- package/admin/orm/models/appLevel.d.ts +0 -54
- package/admin/orm/models/appLevelRequirement.d.ts +0 -54
- package/admin/orm/models/appLevelRequirement.js +0 -104
- package/admin/orm/models/appStep.d.ts +0 -54
- package/esm/admin/cli/commands/app-achievement.js +0 -284
- package/esm/admin/cli/commands/app-level-requirement.d.ts +0 -8
- package/esm/admin/cli/commands/app-level-requirement.js +0 -326
- package/esm/admin/cli/commands/app-step.d.ts +0 -8
- package/esm/admin/cli/commands/steps-achieved.d.ts +0 -8
- package/esm/admin/cli/commands/steps-achieved.js +0 -33
- package/esm/admin/cli/commands/steps-required.d.ts +0 -8
- package/esm/admin/cli/commands/steps-required.js +0 -52
- package/esm/admin/orm/models/appAchievement.d.ts +0 -54
- package/esm/admin/orm/models/appLevel.d.ts +0 -54
- package/esm/admin/orm/models/appLevelRequirement.d.ts +0 -54
- package/esm/admin/orm/models/appStep.d.ts +0 -54
- package/esm/public/cli/commands/app-achievement.d.ts +0 -8
- package/esm/public/cli/commands/app-achievement.js +0 -284
- package/esm/public/cli/commands/app-level-requirement.d.ts +0 -8
- package/esm/public/cli/commands/app-level-requirement.js +0 -326
- package/esm/public/cli/commands/app-level.d.ts +0 -8
- package/esm/public/cli/commands/app-step.d.ts +0 -8
- package/esm/public/cli/commands/levels-module.d.ts +0 -8
- package/esm/public/cli/commands/secrets-module.d.ts +0 -8
- package/esm/public/cli/commands/steps-achieved.d.ts +0 -8
- package/esm/public/cli/commands/steps-achieved.js +0 -33
- package/esm/public/cli/commands/steps-required.d.ts +0 -8
- package/esm/public/cli/commands/steps-required.js +0 -52
- package/esm/public/orm/models/appAchievement.d.ts +0 -54
- package/esm/public/orm/models/appLevel.d.ts +0 -54
- package/esm/public/orm/models/appLevel.js +0 -100
- package/esm/public/orm/models/appLevelRequirement.d.ts +0 -54
- package/esm/public/orm/models/appLevelRequirement.js +0 -100
- package/esm/public/orm/models/appStep.d.ts +0 -54
- package/esm/public/orm/models/appStep.js +0 -100
- package/esm/public/orm/models/levelsModule.d.ts +0 -54
- package/esm/public/orm/models/secretsModule.d.ts +0 -54
- package/esm/public/orm/models/secretsModule.js +0 -100
- package/public/cli/commands/app-achievement.d.ts +0 -8
- package/public/cli/commands/app-achievement.js +0 -286
- package/public/cli/commands/app-level-requirement.d.ts +0 -8
- package/public/cli/commands/app-level-requirement.js +0 -328
- package/public/cli/commands/app-level.d.ts +0 -8
- package/public/cli/commands/app-step.d.ts +0 -8
- package/public/cli/commands/levels-module.d.ts +0 -8
- package/public/cli/commands/secrets-module.d.ts +0 -8
- package/public/cli/commands/steps-achieved.d.ts +0 -8
- package/public/cli/commands/steps-achieved.js +0 -35
- package/public/cli/commands/steps-required.d.ts +0 -8
- package/public/cli/commands/steps-required.js +0 -54
- package/public/orm/models/appAchievement.d.ts +0 -54
- package/public/orm/models/appLevel.d.ts +0 -54
- package/public/orm/models/appLevel.js +0 -104
- package/public/orm/models/appLevelRequirement.d.ts +0 -54
- package/public/orm/models/appLevelRequirement.js +0 -104
- package/public/orm/models/appStep.d.ts +0 -54
- package/public/orm/models/appStep.js +0 -104
- package/public/orm/models/levelsModule.d.ts +0 -54
- package/public/orm/models/secretsModule.d.ts +0 -54
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* CLI commands for AppLevelRequirement
|
|
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
|
-
id: 'uuid',
|
|
13
|
-
name: 'string',
|
|
14
|
-
level: 'string',
|
|
15
|
-
description: 'string',
|
|
16
|
-
requiredCount: 'int',
|
|
17
|
-
priority: 'int',
|
|
18
|
-
createdAt: 'string',
|
|
19
|
-
updatedAt: 'string',
|
|
20
|
-
};
|
|
21
|
-
const usage = '\napp-level-requirement <command>\n\nCommands:\n list List appLevelRequirement records\n find-first Find first matching appLevelRequirement record\n get Get a appLevelRequirement by ID\n create Create a new appLevelRequirement\n update Update an existing appLevelRequirement\n delete Delete a appLevelRequirement\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 --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n';
|
|
22
|
-
exports.default = async (argv, prompter, _options) => {
|
|
23
|
-
if (argv.help || argv.h) {
|
|
24
|
-
console.log(usage);
|
|
25
|
-
process.exit(0);
|
|
26
|
-
}
|
|
27
|
-
const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
|
|
28
|
-
if (!subcommand) {
|
|
29
|
-
const answer = await prompter.prompt(argv, [
|
|
30
|
-
{
|
|
31
|
-
type: 'autocomplete',
|
|
32
|
-
name: 'subcommand',
|
|
33
|
-
message: 'What do you want to do?',
|
|
34
|
-
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
35
|
-
},
|
|
36
|
-
]);
|
|
37
|
-
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
38
|
-
}
|
|
39
|
-
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
40
|
-
};
|
|
41
|
-
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
42
|
-
switch (subcommand) {
|
|
43
|
-
case 'list':
|
|
44
|
-
return handleList(argv, prompter);
|
|
45
|
-
case 'find-first':
|
|
46
|
-
return handleFindFirst(argv, prompter);
|
|
47
|
-
case 'get':
|
|
48
|
-
return handleGet(argv, prompter);
|
|
49
|
-
case 'create':
|
|
50
|
-
return handleCreate(argv, prompter);
|
|
51
|
-
case 'update':
|
|
52
|
-
return handleUpdate(argv, prompter);
|
|
53
|
-
case 'delete':
|
|
54
|
-
return handleDelete(argv, prompter);
|
|
55
|
-
default:
|
|
56
|
-
console.log(usage);
|
|
57
|
-
process.exit(1);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
async function handleList(argv, _prompter) {
|
|
61
|
-
try {
|
|
62
|
-
const defaultSelect = {
|
|
63
|
-
id: true,
|
|
64
|
-
name: true,
|
|
65
|
-
level: true,
|
|
66
|
-
description: true,
|
|
67
|
-
requiredCount: true,
|
|
68
|
-
priority: true,
|
|
69
|
-
createdAt: true,
|
|
70
|
-
updatedAt: true,
|
|
71
|
-
};
|
|
72
|
-
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
73
|
-
const client = (0, executor_1.getClient)();
|
|
74
|
-
const result = await client.appLevelRequirement.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
|
-
name: true,
|
|
90
|
-
level: true,
|
|
91
|
-
description: true,
|
|
92
|
-
requiredCount: true,
|
|
93
|
-
priority: true,
|
|
94
|
-
createdAt: true,
|
|
95
|
-
updatedAt: true,
|
|
96
|
-
};
|
|
97
|
-
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
98
|
-
const client = (0, executor_1.getClient)();
|
|
99
|
-
const result = await client.appLevelRequirement.findFirst(findFirstArgs).execute();
|
|
100
|
-
console.log(JSON.stringify(result, null, 2));
|
|
101
|
-
}
|
|
102
|
-
catch (error) {
|
|
103
|
-
console.error('Failed to find record.');
|
|
104
|
-
if (error instanceof Error) {
|
|
105
|
-
console.error(error.message);
|
|
106
|
-
}
|
|
107
|
-
process.exit(1);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
async function handleGet(argv, prompter) {
|
|
111
|
-
try {
|
|
112
|
-
const answers = await prompter.prompt(argv, [
|
|
113
|
-
{
|
|
114
|
-
type: 'text',
|
|
115
|
-
name: 'id',
|
|
116
|
-
message: 'id',
|
|
117
|
-
required: true,
|
|
118
|
-
},
|
|
119
|
-
]);
|
|
120
|
-
const client = (0, executor_1.getClient)();
|
|
121
|
-
const result = await client.appLevelRequirement
|
|
122
|
-
.findOne({
|
|
123
|
-
id: answers.id,
|
|
124
|
-
select: {
|
|
125
|
-
id: true,
|
|
126
|
-
name: true,
|
|
127
|
-
level: true,
|
|
128
|
-
description: true,
|
|
129
|
-
requiredCount: true,
|
|
130
|
-
priority: true,
|
|
131
|
-
createdAt: true,
|
|
132
|
-
updatedAt: true,
|
|
133
|
-
},
|
|
134
|
-
})
|
|
135
|
-
.execute();
|
|
136
|
-
console.log(JSON.stringify(result, null, 2));
|
|
137
|
-
}
|
|
138
|
-
catch (error) {
|
|
139
|
-
console.error('Record not found.');
|
|
140
|
-
if (error instanceof Error) {
|
|
141
|
-
console.error(error.message);
|
|
142
|
-
}
|
|
143
|
-
process.exit(1);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
async function handleCreate(argv, prompter) {
|
|
147
|
-
try {
|
|
148
|
-
const rawAnswers = await prompter.prompt(argv, [
|
|
149
|
-
{
|
|
150
|
-
type: 'text',
|
|
151
|
-
name: 'name',
|
|
152
|
-
message: 'name',
|
|
153
|
-
required: true,
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
type: 'text',
|
|
157
|
-
name: 'level',
|
|
158
|
-
message: 'level',
|
|
159
|
-
required: true,
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
type: 'text',
|
|
163
|
-
name: 'description',
|
|
164
|
-
message: 'description',
|
|
165
|
-
required: false,
|
|
166
|
-
skipPrompt: true,
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
type: 'text',
|
|
170
|
-
name: 'requiredCount',
|
|
171
|
-
message: 'requiredCount',
|
|
172
|
-
required: false,
|
|
173
|
-
skipPrompt: true,
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
type: 'text',
|
|
177
|
-
name: 'priority',
|
|
178
|
-
message: 'priority',
|
|
179
|
-
required: false,
|
|
180
|
-
skipPrompt: true,
|
|
181
|
-
},
|
|
182
|
-
]);
|
|
183
|
-
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
184
|
-
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
185
|
-
const client = (0, executor_1.getClient)();
|
|
186
|
-
const result = await client.appLevelRequirement
|
|
187
|
-
.create({
|
|
188
|
-
data: {
|
|
189
|
-
name: cleanedData.name,
|
|
190
|
-
level: cleanedData.level,
|
|
191
|
-
description: cleanedData.description,
|
|
192
|
-
requiredCount: cleanedData.requiredCount,
|
|
193
|
-
priority: cleanedData.priority,
|
|
194
|
-
},
|
|
195
|
-
select: {
|
|
196
|
-
id: true,
|
|
197
|
-
name: true,
|
|
198
|
-
level: true,
|
|
199
|
-
description: true,
|
|
200
|
-
requiredCount: true,
|
|
201
|
-
priority: true,
|
|
202
|
-
createdAt: true,
|
|
203
|
-
updatedAt: true,
|
|
204
|
-
},
|
|
205
|
-
})
|
|
206
|
-
.execute();
|
|
207
|
-
console.log(JSON.stringify(result, null, 2));
|
|
208
|
-
}
|
|
209
|
-
catch (error) {
|
|
210
|
-
console.error('Failed to create record.');
|
|
211
|
-
if (error instanceof Error) {
|
|
212
|
-
console.error(error.message);
|
|
213
|
-
}
|
|
214
|
-
process.exit(1);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
async function handleUpdate(argv, prompter) {
|
|
218
|
-
try {
|
|
219
|
-
const rawAnswers = await prompter.prompt(argv, [
|
|
220
|
-
{
|
|
221
|
-
type: 'text',
|
|
222
|
-
name: 'id',
|
|
223
|
-
message: 'id',
|
|
224
|
-
required: true,
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
type: 'text',
|
|
228
|
-
name: 'name',
|
|
229
|
-
message: 'name',
|
|
230
|
-
required: false,
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
type: 'text',
|
|
234
|
-
name: 'level',
|
|
235
|
-
message: 'level',
|
|
236
|
-
required: false,
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
type: 'text',
|
|
240
|
-
name: 'description',
|
|
241
|
-
message: 'description',
|
|
242
|
-
required: false,
|
|
243
|
-
skipPrompt: true,
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
type: 'text',
|
|
247
|
-
name: 'requiredCount',
|
|
248
|
-
message: 'requiredCount',
|
|
249
|
-
required: false,
|
|
250
|
-
skipPrompt: true,
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
type: 'text',
|
|
254
|
-
name: 'priority',
|
|
255
|
-
message: 'priority',
|
|
256
|
-
required: false,
|
|
257
|
-
skipPrompt: true,
|
|
258
|
-
},
|
|
259
|
-
]);
|
|
260
|
-
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
261
|
-
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
262
|
-
const client = (0, executor_1.getClient)();
|
|
263
|
-
const result = await client.appLevelRequirement
|
|
264
|
-
.update({
|
|
265
|
-
where: {
|
|
266
|
-
id: answers.id,
|
|
267
|
-
},
|
|
268
|
-
data: {
|
|
269
|
-
name: cleanedData.name,
|
|
270
|
-
level: cleanedData.level,
|
|
271
|
-
description: cleanedData.description,
|
|
272
|
-
requiredCount: cleanedData.requiredCount,
|
|
273
|
-
priority: cleanedData.priority,
|
|
274
|
-
},
|
|
275
|
-
select: {
|
|
276
|
-
id: true,
|
|
277
|
-
name: true,
|
|
278
|
-
level: true,
|
|
279
|
-
description: true,
|
|
280
|
-
requiredCount: true,
|
|
281
|
-
priority: true,
|
|
282
|
-
createdAt: true,
|
|
283
|
-
updatedAt: true,
|
|
284
|
-
},
|
|
285
|
-
})
|
|
286
|
-
.execute();
|
|
287
|
-
console.log(JSON.stringify(result, null, 2));
|
|
288
|
-
}
|
|
289
|
-
catch (error) {
|
|
290
|
-
console.error('Failed to update record.');
|
|
291
|
-
if (error instanceof Error) {
|
|
292
|
-
console.error(error.message);
|
|
293
|
-
}
|
|
294
|
-
process.exit(1);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
async function handleDelete(argv, prompter) {
|
|
298
|
-
try {
|
|
299
|
-
const rawAnswers = await prompter.prompt(argv, [
|
|
300
|
-
{
|
|
301
|
-
type: 'text',
|
|
302
|
-
name: 'id',
|
|
303
|
-
message: 'id',
|
|
304
|
-
required: true,
|
|
305
|
-
},
|
|
306
|
-
]);
|
|
307
|
-
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
308
|
-
const client = (0, executor_1.getClient)();
|
|
309
|
-
const result = await client.appLevelRequirement
|
|
310
|
-
.delete({
|
|
311
|
-
where: {
|
|
312
|
-
id: answers.id,
|
|
313
|
-
},
|
|
314
|
-
select: {
|
|
315
|
-
id: true,
|
|
316
|
-
},
|
|
317
|
-
})
|
|
318
|
-
.execute();
|
|
319
|
-
console.log(JSON.stringify(result, null, 2));
|
|
320
|
-
}
|
|
321
|
-
catch (error) {
|
|
322
|
-
console.error('Failed to delete record.');
|
|
323
|
-
if (error instanceof Error) {
|
|
324
|
-
console.error(error.message);
|
|
325
|
-
}
|
|
326
|
-
process.exit(1);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI commands for AppLevel
|
|
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,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI commands for AppStep
|
|
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,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI commands for LevelsModule
|
|
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,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI commands for SecretsModule
|
|
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,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI command for query stepsAchieved
|
|
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,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const executor_1 = require("../executor");
|
|
4
|
-
exports.default = async (argv, prompter, _options) => {
|
|
5
|
-
try {
|
|
6
|
-
if (argv.help || argv.h) {
|
|
7
|
-
console.log('steps-achieved - stepsAchieved\n\nUsage: steps-achieved [OPTIONS]\n');
|
|
8
|
-
process.exit(0);
|
|
9
|
-
}
|
|
10
|
-
const answers = await prompter.prompt(argv, [
|
|
11
|
-
{
|
|
12
|
-
type: 'text',
|
|
13
|
-
name: 'level',
|
|
14
|
-
message: 'level',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
type: 'text',
|
|
18
|
-
name: 'roleId',
|
|
19
|
-
message: 'roleId',
|
|
20
|
-
},
|
|
21
|
-
]);
|
|
22
|
-
const client = (0, executor_1.getClient)();
|
|
23
|
-
const result = await client.query
|
|
24
|
-
.stepsAchieved(answers)
|
|
25
|
-
.execute();
|
|
26
|
-
console.log(JSON.stringify(result, null, 2));
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
console.error('Failed: stepsAchieved');
|
|
30
|
-
if (error instanceof Error) {
|
|
31
|
-
console.error(error.message);
|
|
32
|
-
}
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI command for query stepsRequired
|
|
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,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const executor_1 = require("../executor");
|
|
4
|
-
const utils_1 = require("../utils");
|
|
5
|
-
exports.default = async (argv, prompter, _options) => {
|
|
6
|
-
try {
|
|
7
|
-
if (argv.help || argv.h) {
|
|
8
|
-
console.log('steps-required - Reads and enables pagination through a set of `AppLevelRequirement`.\n\nUsage: steps-required [OPTIONS]\n');
|
|
9
|
-
process.exit(0);
|
|
10
|
-
}
|
|
11
|
-
const answers = await prompter.prompt(argv, [
|
|
12
|
-
{
|
|
13
|
-
type: 'text',
|
|
14
|
-
name: 'level',
|
|
15
|
-
message: 'level',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
type: 'text',
|
|
19
|
-
name: 'roleId',
|
|
20
|
-
message: 'roleId',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
type: 'text',
|
|
24
|
-
name: 'first',
|
|
25
|
-
message: 'Only read the first `n` values of the set.',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
type: 'text',
|
|
29
|
-
name: 'offset',
|
|
30
|
-
message: 'Skip the first `n` values from our `after` cursor, an alternative to cursor\nbased pagination. May not be used with `last`.',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
type: 'text',
|
|
34
|
-
name: 'after',
|
|
35
|
-
message: 'Read all values in the set after (below) this cursor.',
|
|
36
|
-
},
|
|
37
|
-
]);
|
|
38
|
-
const client = (0, executor_1.getClient)();
|
|
39
|
-
const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? '');
|
|
40
|
-
const result = await client.query
|
|
41
|
-
.stepsRequired(answers, {
|
|
42
|
-
select: selectFields,
|
|
43
|
-
})
|
|
44
|
-
.execute();
|
|
45
|
-
console.log(JSON.stringify(result, null, 2));
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
console.error('Failed: stepsRequired');
|
|
49
|
-
if (error instanceof Error) {
|
|
50
|
-
console.error(error.message);
|
|
51
|
-
}
|
|
52
|
-
process.exit(1);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AppAchievement model for ORM client
|
|
3
|
-
* @generated by @constructive-io/graphql-codegen
|
|
4
|
-
* DO NOT EDIT - changes will be overwritten
|
|
5
|
-
*/
|
|
6
|
-
import { OrmClient } from '../client';
|
|
7
|
-
import { QueryBuilder } from '../query-builder';
|
|
8
|
-
import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
-
import type { AppAchievementWithRelations, AppAchievementSelect, AppAchievementFilter, AppAchievementOrderBy, CreateAppAchievementInput, AppAchievementPatch } from '../input-types';
|
|
10
|
-
export declare class AppAchievementModel {
|
|
11
|
-
private client;
|
|
12
|
-
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppAchievementSelect>(args: FindManyArgs<S, AppAchievementFilter, AppAchievementOrderBy> & {
|
|
14
|
-
select: S;
|
|
15
|
-
} & StrictSelect<S, AppAchievementSelect>): QueryBuilder<{
|
|
16
|
-
appAchievements: ConnectionResult<InferSelectResult<AppAchievementWithRelations, S>>;
|
|
17
|
-
}>;
|
|
18
|
-
findFirst<S extends AppAchievementSelect>(args: FindFirstArgs<S, AppAchievementFilter, AppAchievementOrderBy> & {
|
|
19
|
-
select: S;
|
|
20
|
-
} & StrictSelect<S, AppAchievementSelect>): QueryBuilder<{
|
|
21
|
-
appAchievement: InferSelectResult<AppAchievementWithRelations, S> | null;
|
|
22
|
-
}>;
|
|
23
|
-
findOne<S extends AppAchievementSelect>(args: {
|
|
24
|
-
id: string;
|
|
25
|
-
select: S;
|
|
26
|
-
} & StrictSelect<S, AppAchievementSelect>): QueryBuilder<{
|
|
27
|
-
appAchievement: InferSelectResult<AppAchievementWithRelations, S> | null;
|
|
28
|
-
}>;
|
|
29
|
-
create<S extends AppAchievementSelect>(args: CreateArgs<S, CreateAppAchievementInput['appAchievement']> & {
|
|
30
|
-
select: S;
|
|
31
|
-
} & StrictSelect<S, AppAchievementSelect>): QueryBuilder<{
|
|
32
|
-
createAppAchievement: {
|
|
33
|
-
appAchievement: InferSelectResult<AppAchievementWithRelations, S>;
|
|
34
|
-
};
|
|
35
|
-
}>;
|
|
36
|
-
update<S extends AppAchievementSelect>(args: UpdateArgs<S, {
|
|
37
|
-
id: string;
|
|
38
|
-
}, AppAchievementPatch> & {
|
|
39
|
-
select: S;
|
|
40
|
-
} & StrictSelect<S, AppAchievementSelect>): QueryBuilder<{
|
|
41
|
-
updateAppAchievement: {
|
|
42
|
-
appAchievement: InferSelectResult<AppAchievementWithRelations, S>;
|
|
43
|
-
};
|
|
44
|
-
}>;
|
|
45
|
-
delete<S extends AppAchievementSelect>(args: DeleteArgs<{
|
|
46
|
-
id: string;
|
|
47
|
-
}, S> & {
|
|
48
|
-
select: S;
|
|
49
|
-
} & StrictSelect<S, AppAchievementSelect>): QueryBuilder<{
|
|
50
|
-
deleteAppAchievement: {
|
|
51
|
-
appAchievement: InferSelectResult<AppAchievementWithRelations, S>;
|
|
52
|
-
};
|
|
53
|
-
}>;
|
|
54
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AppLevel model for ORM client
|
|
3
|
-
* @generated by @constructive-io/graphql-codegen
|
|
4
|
-
* DO NOT EDIT - changes will be overwritten
|
|
5
|
-
*/
|
|
6
|
-
import { OrmClient } from '../client';
|
|
7
|
-
import { QueryBuilder } from '../query-builder';
|
|
8
|
-
import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
-
import type { AppLevelWithRelations, AppLevelSelect, AppLevelFilter, AppLevelOrderBy, CreateAppLevelInput, AppLevelPatch } from '../input-types';
|
|
10
|
-
export declare class AppLevelModel {
|
|
11
|
-
private client;
|
|
12
|
-
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppLevelSelect>(args: FindManyArgs<S, AppLevelFilter, AppLevelOrderBy> & {
|
|
14
|
-
select: S;
|
|
15
|
-
} & StrictSelect<S, AppLevelSelect>): QueryBuilder<{
|
|
16
|
-
appLevels: ConnectionResult<InferSelectResult<AppLevelWithRelations, S>>;
|
|
17
|
-
}>;
|
|
18
|
-
findFirst<S extends AppLevelSelect>(args: FindFirstArgs<S, AppLevelFilter, AppLevelOrderBy> & {
|
|
19
|
-
select: S;
|
|
20
|
-
} & StrictSelect<S, AppLevelSelect>): QueryBuilder<{
|
|
21
|
-
appLevel: InferSelectResult<AppLevelWithRelations, S> | null;
|
|
22
|
-
}>;
|
|
23
|
-
findOne<S extends AppLevelSelect>(args: {
|
|
24
|
-
id: string;
|
|
25
|
-
select: S;
|
|
26
|
-
} & StrictSelect<S, AppLevelSelect>): QueryBuilder<{
|
|
27
|
-
appLevel: InferSelectResult<AppLevelWithRelations, S> | null;
|
|
28
|
-
}>;
|
|
29
|
-
create<S extends AppLevelSelect>(args: CreateArgs<S, CreateAppLevelInput['appLevel']> & {
|
|
30
|
-
select: S;
|
|
31
|
-
} & StrictSelect<S, AppLevelSelect>): QueryBuilder<{
|
|
32
|
-
createAppLevel: {
|
|
33
|
-
appLevel: InferSelectResult<AppLevelWithRelations, S>;
|
|
34
|
-
};
|
|
35
|
-
}>;
|
|
36
|
-
update<S extends AppLevelSelect>(args: UpdateArgs<S, {
|
|
37
|
-
id: string;
|
|
38
|
-
}, AppLevelPatch> & {
|
|
39
|
-
select: S;
|
|
40
|
-
} & StrictSelect<S, AppLevelSelect>): QueryBuilder<{
|
|
41
|
-
updateAppLevel: {
|
|
42
|
-
appLevel: InferSelectResult<AppLevelWithRelations, S>;
|
|
43
|
-
};
|
|
44
|
-
}>;
|
|
45
|
-
delete<S extends AppLevelSelect>(args: DeleteArgs<{
|
|
46
|
-
id: string;
|
|
47
|
-
}, S> & {
|
|
48
|
-
select: S;
|
|
49
|
-
} & StrictSelect<S, AppLevelSelect>): QueryBuilder<{
|
|
50
|
-
deleteAppLevel: {
|
|
51
|
-
appLevel: InferSelectResult<AppLevelWithRelations, S>;
|
|
52
|
-
};
|
|
53
|
-
}>;
|
|
54
|
-
}
|