@constructive-sdk/cli 0.22.2 → 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,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
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AppLevelRequirement 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 { AppLevelRequirementWithRelations, AppLevelRequirementSelect, AppLevelRequirementFilter, AppLevelRequirementOrderBy, CreateAppLevelRequirementInput, AppLevelRequirementPatch } from '../input-types';
|
|
10
|
-
export declare class AppLevelRequirementModel {
|
|
11
|
-
private client;
|
|
12
|
-
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppLevelRequirementSelect>(args: FindManyArgs<S, AppLevelRequirementFilter, AppLevelRequirementOrderBy> & {
|
|
14
|
-
select: S;
|
|
15
|
-
} & StrictSelect<S, AppLevelRequirementSelect>): QueryBuilder<{
|
|
16
|
-
appLevelRequirements: ConnectionResult<InferSelectResult<AppLevelRequirementWithRelations, S>>;
|
|
17
|
-
}>;
|
|
18
|
-
findFirst<S extends AppLevelRequirementSelect>(args: FindFirstArgs<S, AppLevelRequirementFilter, AppLevelRequirementOrderBy> & {
|
|
19
|
-
select: S;
|
|
20
|
-
} & StrictSelect<S, AppLevelRequirementSelect>): QueryBuilder<{
|
|
21
|
-
appLevelRequirement: InferSelectResult<AppLevelRequirementWithRelations, S> | null;
|
|
22
|
-
}>;
|
|
23
|
-
findOne<S extends AppLevelRequirementSelect>(args: {
|
|
24
|
-
id: string;
|
|
25
|
-
select: S;
|
|
26
|
-
} & StrictSelect<S, AppLevelRequirementSelect>): QueryBuilder<{
|
|
27
|
-
appLevelRequirement: InferSelectResult<AppLevelRequirementWithRelations, S> | null;
|
|
28
|
-
}>;
|
|
29
|
-
create<S extends AppLevelRequirementSelect>(args: CreateArgs<S, CreateAppLevelRequirementInput['appLevelRequirement']> & {
|
|
30
|
-
select: S;
|
|
31
|
-
} & StrictSelect<S, AppLevelRequirementSelect>): QueryBuilder<{
|
|
32
|
-
createAppLevelRequirement: {
|
|
33
|
-
appLevelRequirement: InferSelectResult<AppLevelRequirementWithRelations, S>;
|
|
34
|
-
};
|
|
35
|
-
}>;
|
|
36
|
-
update<S extends AppLevelRequirementSelect>(args: UpdateArgs<S, {
|
|
37
|
-
id: string;
|
|
38
|
-
}, AppLevelRequirementPatch> & {
|
|
39
|
-
select: S;
|
|
40
|
-
} & StrictSelect<S, AppLevelRequirementSelect>): QueryBuilder<{
|
|
41
|
-
updateAppLevelRequirement: {
|
|
42
|
-
appLevelRequirement: InferSelectResult<AppLevelRequirementWithRelations, S>;
|
|
43
|
-
};
|
|
44
|
-
}>;
|
|
45
|
-
delete<S extends AppLevelRequirementSelect>(args: DeleteArgs<{
|
|
46
|
-
id: string;
|
|
47
|
-
}, S> & {
|
|
48
|
-
select: S;
|
|
49
|
-
} & StrictSelect<S, AppLevelRequirementSelect>): QueryBuilder<{
|
|
50
|
-
deleteAppLevelRequirement: {
|
|
51
|
-
appLevelRequirement: InferSelectResult<AppLevelRequirementWithRelations, S>;
|
|
52
|
-
};
|
|
53
|
-
}>;
|
|
54
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppLevelRequirementModel = void 0;
|
|
4
|
-
const query_builder_1 = require("../query-builder");
|
|
5
|
-
const input_types_1 = require("../input-types");
|
|
6
|
-
class AppLevelRequirementModel {
|
|
7
|
-
client;
|
|
8
|
-
constructor(client) {
|
|
9
|
-
this.client = client;
|
|
10
|
-
}
|
|
11
|
-
findMany(args) {
|
|
12
|
-
const { document, variables } = (0, query_builder_1.buildFindManyDocument)('AppLevelRequirement', 'appLevelRequirements', args.select, {
|
|
13
|
-
where: args?.where,
|
|
14
|
-
orderBy: args?.orderBy,
|
|
15
|
-
first: args?.first,
|
|
16
|
-
last: args?.last,
|
|
17
|
-
after: args?.after,
|
|
18
|
-
before: args?.before,
|
|
19
|
-
offset: args?.offset,
|
|
20
|
-
}, 'AppLevelRequirementFilter', 'AppLevelRequirementOrderBy', input_types_1.connectionFieldsMap);
|
|
21
|
-
return new query_builder_1.QueryBuilder({
|
|
22
|
-
client: this.client,
|
|
23
|
-
operation: 'query',
|
|
24
|
-
operationName: 'AppLevelRequirement',
|
|
25
|
-
fieldName: 'appLevelRequirements',
|
|
26
|
-
document,
|
|
27
|
-
variables,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
findFirst(args) {
|
|
31
|
-
const { document, variables } = (0, query_builder_1.buildFindFirstDocument)('AppLevelRequirement', 'appLevelRequirements', args.select, {
|
|
32
|
-
where: args?.where,
|
|
33
|
-
orderBy: args?.orderBy,
|
|
34
|
-
}, 'AppLevelRequirementFilter', 'AppLevelRequirementOrderBy', input_types_1.connectionFieldsMap);
|
|
35
|
-
return new query_builder_1.QueryBuilder({
|
|
36
|
-
client: this.client,
|
|
37
|
-
operation: 'query',
|
|
38
|
-
operationName: 'AppLevelRequirement',
|
|
39
|
-
fieldName: 'appLevelRequirement',
|
|
40
|
-
document,
|
|
41
|
-
variables,
|
|
42
|
-
transform: (data) => ({
|
|
43
|
-
appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null,
|
|
44
|
-
}),
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
findOne(args) {
|
|
48
|
-
const { document, variables } = (0, query_builder_1.buildFindManyDocument)('AppLevelRequirement', 'appLevelRequirements', args.select, {
|
|
49
|
-
where: {
|
|
50
|
-
id: {
|
|
51
|
-
equalTo: args.id,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
first: 1,
|
|
55
|
-
}, 'AppLevelRequirementFilter', 'AppLevelRequirementOrderBy', input_types_1.connectionFieldsMap);
|
|
56
|
-
return new query_builder_1.QueryBuilder({
|
|
57
|
-
client: this.client,
|
|
58
|
-
operation: 'query',
|
|
59
|
-
operationName: 'AppLevelRequirement',
|
|
60
|
-
fieldName: 'appLevelRequirement',
|
|
61
|
-
document,
|
|
62
|
-
variables,
|
|
63
|
-
transform: (data) => ({
|
|
64
|
-
appLevelRequirement: data.appLevelRequirements?.nodes?.[0] ?? null,
|
|
65
|
-
}),
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
create(args) {
|
|
69
|
-
const { document, variables } = (0, query_builder_1.buildCreateDocument)('AppLevelRequirement', 'createAppLevelRequirement', 'appLevelRequirement', args.select, args.data, 'CreateAppLevelRequirementInput', input_types_1.connectionFieldsMap);
|
|
70
|
-
return new query_builder_1.QueryBuilder({
|
|
71
|
-
client: this.client,
|
|
72
|
-
operation: 'mutation',
|
|
73
|
-
operationName: 'AppLevelRequirement',
|
|
74
|
-
fieldName: 'createAppLevelRequirement',
|
|
75
|
-
document,
|
|
76
|
-
variables,
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
update(args) {
|
|
80
|
-
const { document, variables } = (0, query_builder_1.buildUpdateByPkDocument)('AppLevelRequirement', 'updateAppLevelRequirement', 'appLevelRequirement', args.select, args.where.id, args.data, 'UpdateAppLevelRequirementInput', 'id', 'appLevelRequirementPatch', input_types_1.connectionFieldsMap);
|
|
81
|
-
return new query_builder_1.QueryBuilder({
|
|
82
|
-
client: this.client,
|
|
83
|
-
operation: 'mutation',
|
|
84
|
-
operationName: 'AppLevelRequirement',
|
|
85
|
-
fieldName: 'updateAppLevelRequirement',
|
|
86
|
-
document,
|
|
87
|
-
variables,
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
delete(args) {
|
|
91
|
-
const { document, variables } = (0, query_builder_1.buildDeleteByPkDocument)('AppLevelRequirement', 'deleteAppLevelRequirement', 'appLevelRequirement', {
|
|
92
|
-
id: args.where.id,
|
|
93
|
-
}, 'DeleteAppLevelRequirementInput', args.select, input_types_1.connectionFieldsMap);
|
|
94
|
-
return new query_builder_1.QueryBuilder({
|
|
95
|
-
client: this.client,
|
|
96
|
-
operation: 'mutation',
|
|
97
|
-
operationName: 'AppLevelRequirement',
|
|
98
|
-
fieldName: 'deleteAppLevelRequirement',
|
|
99
|
-
document,
|
|
100
|
-
variables,
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
exports.AppLevelRequirementModel = AppLevelRequirementModel;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AppStep 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 { AppStepWithRelations, AppStepSelect, AppStepFilter, AppStepOrderBy, CreateAppStepInput, AppStepPatch } from '../input-types';
|
|
10
|
-
export declare class AppStepModel {
|
|
11
|
-
private client;
|
|
12
|
-
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppStepSelect>(args: FindManyArgs<S, AppStepFilter, AppStepOrderBy> & {
|
|
14
|
-
select: S;
|
|
15
|
-
} & StrictSelect<S, AppStepSelect>): QueryBuilder<{
|
|
16
|
-
appSteps: ConnectionResult<InferSelectResult<AppStepWithRelations, S>>;
|
|
17
|
-
}>;
|
|
18
|
-
findFirst<S extends AppStepSelect>(args: FindFirstArgs<S, AppStepFilter, AppStepOrderBy> & {
|
|
19
|
-
select: S;
|
|
20
|
-
} & StrictSelect<S, AppStepSelect>): QueryBuilder<{
|
|
21
|
-
appStep: InferSelectResult<AppStepWithRelations, S> | null;
|
|
22
|
-
}>;
|
|
23
|
-
findOne<S extends AppStepSelect>(args: {
|
|
24
|
-
id: string;
|
|
25
|
-
select: S;
|
|
26
|
-
} & StrictSelect<S, AppStepSelect>): QueryBuilder<{
|
|
27
|
-
appStep: InferSelectResult<AppStepWithRelations, S> | null;
|
|
28
|
-
}>;
|
|
29
|
-
create<S extends AppStepSelect>(args: CreateArgs<S, CreateAppStepInput['appStep']> & {
|
|
30
|
-
select: S;
|
|
31
|
-
} & StrictSelect<S, AppStepSelect>): QueryBuilder<{
|
|
32
|
-
createAppStep: {
|
|
33
|
-
appStep: InferSelectResult<AppStepWithRelations, S>;
|
|
34
|
-
};
|
|
35
|
-
}>;
|
|
36
|
-
update<S extends AppStepSelect>(args: UpdateArgs<S, {
|
|
37
|
-
id: string;
|
|
38
|
-
}, AppStepPatch> & {
|
|
39
|
-
select: S;
|
|
40
|
-
} & StrictSelect<S, AppStepSelect>): QueryBuilder<{
|
|
41
|
-
updateAppStep: {
|
|
42
|
-
appStep: InferSelectResult<AppStepWithRelations, S>;
|
|
43
|
-
};
|
|
44
|
-
}>;
|
|
45
|
-
delete<S extends AppStepSelect>(args: DeleteArgs<{
|
|
46
|
-
id: string;
|
|
47
|
-
}, S> & {
|
|
48
|
-
select: S;
|
|
49
|
-
} & StrictSelect<S, AppStepSelect>): QueryBuilder<{
|
|
50
|
-
deleteAppStep: {
|
|
51
|
-
appStep: InferSelectResult<AppStepWithRelations, S>;
|
|
52
|
-
};
|
|
53
|
-
}>;
|
|
54
|
-
}
|
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI commands for AppAchievement
|
|
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
|
-
actorId: 'uuid',
|
|
12
|
-
name: 'string',
|
|
13
|
-
count: 'int',
|
|
14
|
-
createdAt: 'string',
|
|
15
|
-
updatedAt: 'string',
|
|
16
|
-
};
|
|
17
|
-
const usage = '\napp-achievement <command>\n\nCommands:\n list List appAchievement records\n find-first Find first matching appAchievement record\n get Get a appAchievement by ID\n create Create a new appAchievement\n update Update an existing appAchievement\n delete Delete a appAchievement\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';
|
|
18
|
-
export default async (argv, prompter, _options) => {
|
|
19
|
-
if (argv.help || argv.h) {
|
|
20
|
-
console.log(usage);
|
|
21
|
-
process.exit(0);
|
|
22
|
-
}
|
|
23
|
-
const { first: subcommand, newArgv } = extractFirst(argv);
|
|
24
|
-
if (!subcommand) {
|
|
25
|
-
const answer = await prompter.prompt(argv, [
|
|
26
|
-
{
|
|
27
|
-
type: 'autocomplete',
|
|
28
|
-
name: 'subcommand',
|
|
29
|
-
message: 'What do you want to do?',
|
|
30
|
-
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
31
|
-
},
|
|
32
|
-
]);
|
|
33
|
-
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
34
|
-
}
|
|
35
|
-
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
36
|
-
};
|
|
37
|
-
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
38
|
-
switch (subcommand) {
|
|
39
|
-
case 'list':
|
|
40
|
-
return handleList(argv, prompter);
|
|
41
|
-
case 'find-first':
|
|
42
|
-
return handleFindFirst(argv, prompter);
|
|
43
|
-
case 'get':
|
|
44
|
-
return handleGet(argv, prompter);
|
|
45
|
-
case 'create':
|
|
46
|
-
return handleCreate(argv, prompter);
|
|
47
|
-
case 'update':
|
|
48
|
-
return handleUpdate(argv, prompter);
|
|
49
|
-
case 'delete':
|
|
50
|
-
return handleDelete(argv, prompter);
|
|
51
|
-
default:
|
|
52
|
-
console.log(usage);
|
|
53
|
-
process.exit(1);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
async function handleList(argv, _prompter) {
|
|
57
|
-
try {
|
|
58
|
-
const defaultSelect = {
|
|
59
|
-
id: true,
|
|
60
|
-
actorId: true,
|
|
61
|
-
name: true,
|
|
62
|
-
count: true,
|
|
63
|
-
createdAt: true,
|
|
64
|
-
updatedAt: true,
|
|
65
|
-
};
|
|
66
|
-
const findManyArgs = parseFindManyArgs(argv, defaultSelect);
|
|
67
|
-
const client = getClient();
|
|
68
|
-
const result = await client.appAchievement.findMany(findManyArgs).execute();
|
|
69
|
-
console.log(JSON.stringify(result, null, 2));
|
|
70
|
-
}
|
|
71
|
-
catch (error) {
|
|
72
|
-
console.error('Failed to list records.');
|
|
73
|
-
if (error instanceof Error) {
|
|
74
|
-
console.error(error.message);
|
|
75
|
-
}
|
|
76
|
-
process.exit(1);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
async function handleFindFirst(argv, _prompter) {
|
|
80
|
-
try {
|
|
81
|
-
const defaultSelect = {
|
|
82
|
-
id: true,
|
|
83
|
-
actorId: true,
|
|
84
|
-
name: true,
|
|
85
|
-
count: true,
|
|
86
|
-
createdAt: true,
|
|
87
|
-
updatedAt: true,
|
|
88
|
-
};
|
|
89
|
-
const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
|
|
90
|
-
const client = getClient();
|
|
91
|
-
const result = await client.appAchievement.findFirst(findFirstArgs).execute();
|
|
92
|
-
console.log(JSON.stringify(result, null, 2));
|
|
93
|
-
}
|
|
94
|
-
catch (error) {
|
|
95
|
-
console.error('Failed to find record.');
|
|
96
|
-
if (error instanceof Error) {
|
|
97
|
-
console.error(error.message);
|
|
98
|
-
}
|
|
99
|
-
process.exit(1);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
async function handleGet(argv, prompter) {
|
|
103
|
-
try {
|
|
104
|
-
const answers = await prompter.prompt(argv, [
|
|
105
|
-
{
|
|
106
|
-
type: 'text',
|
|
107
|
-
name: 'id',
|
|
108
|
-
message: 'id',
|
|
109
|
-
required: true,
|
|
110
|
-
},
|
|
111
|
-
]);
|
|
112
|
-
const client = getClient();
|
|
113
|
-
const result = await client.appAchievement
|
|
114
|
-
.findOne({
|
|
115
|
-
id: answers.id,
|
|
116
|
-
select: {
|
|
117
|
-
id: true,
|
|
118
|
-
actorId: true,
|
|
119
|
-
name: true,
|
|
120
|
-
count: true,
|
|
121
|
-
createdAt: true,
|
|
122
|
-
updatedAt: true,
|
|
123
|
-
},
|
|
124
|
-
})
|
|
125
|
-
.execute();
|
|
126
|
-
console.log(JSON.stringify(result, null, 2));
|
|
127
|
-
}
|
|
128
|
-
catch (error) {
|
|
129
|
-
console.error('Record not found.');
|
|
130
|
-
if (error instanceof Error) {
|
|
131
|
-
console.error(error.message);
|
|
132
|
-
}
|
|
133
|
-
process.exit(1);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
async function handleCreate(argv, prompter) {
|
|
137
|
-
try {
|
|
138
|
-
const rawAnswers = await prompter.prompt(argv, [
|
|
139
|
-
{
|
|
140
|
-
type: 'text',
|
|
141
|
-
name: 'actorId',
|
|
142
|
-
message: 'actorId',
|
|
143
|
-
required: false,
|
|
144
|
-
skipPrompt: true,
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
type: 'text',
|
|
148
|
-
name: 'name',
|
|
149
|
-
message: 'name',
|
|
150
|
-
required: true,
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
type: 'text',
|
|
154
|
-
name: 'count',
|
|
155
|
-
message: 'count',
|
|
156
|
-
required: false,
|
|
157
|
-
skipPrompt: true,
|
|
158
|
-
},
|
|
159
|
-
]);
|
|
160
|
-
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
161
|
-
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
162
|
-
const client = getClient();
|
|
163
|
-
const result = await client.appAchievement
|
|
164
|
-
.create({
|
|
165
|
-
data: {
|
|
166
|
-
actorId: cleanedData.actorId,
|
|
167
|
-
name: cleanedData.name,
|
|
168
|
-
count: cleanedData.count,
|
|
169
|
-
},
|
|
170
|
-
select: {
|
|
171
|
-
id: true,
|
|
172
|
-
actorId: true,
|
|
173
|
-
name: true,
|
|
174
|
-
count: true,
|
|
175
|
-
createdAt: true,
|
|
176
|
-
updatedAt: true,
|
|
177
|
-
},
|
|
178
|
-
})
|
|
179
|
-
.execute();
|
|
180
|
-
console.log(JSON.stringify(result, null, 2));
|
|
181
|
-
}
|
|
182
|
-
catch (error) {
|
|
183
|
-
console.error('Failed to create record.');
|
|
184
|
-
if (error instanceof Error) {
|
|
185
|
-
console.error(error.message);
|
|
186
|
-
}
|
|
187
|
-
process.exit(1);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
async function handleUpdate(argv, prompter) {
|
|
191
|
-
try {
|
|
192
|
-
const rawAnswers = await prompter.prompt(argv, [
|
|
193
|
-
{
|
|
194
|
-
type: 'text',
|
|
195
|
-
name: 'id',
|
|
196
|
-
message: 'id',
|
|
197
|
-
required: true,
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
type: 'text',
|
|
201
|
-
name: 'actorId',
|
|
202
|
-
message: 'actorId',
|
|
203
|
-
required: false,
|
|
204
|
-
skipPrompt: true,
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
type: 'text',
|
|
208
|
-
name: 'name',
|
|
209
|
-
message: 'name',
|
|
210
|
-
required: false,
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
type: 'text',
|
|
214
|
-
name: 'count',
|
|
215
|
-
message: 'count',
|
|
216
|
-
required: false,
|
|
217
|
-
skipPrompt: true,
|
|
218
|
-
},
|
|
219
|
-
]);
|
|
220
|
-
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
221
|
-
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
222
|
-
const client = getClient();
|
|
223
|
-
const result = await client.appAchievement
|
|
224
|
-
.update({
|
|
225
|
-
where: {
|
|
226
|
-
id: answers.id,
|
|
227
|
-
},
|
|
228
|
-
data: {
|
|
229
|
-
actorId: cleanedData.actorId,
|
|
230
|
-
name: cleanedData.name,
|
|
231
|
-
count: cleanedData.count,
|
|
232
|
-
},
|
|
233
|
-
select: {
|
|
234
|
-
id: true,
|
|
235
|
-
actorId: true,
|
|
236
|
-
name: true,
|
|
237
|
-
count: true,
|
|
238
|
-
createdAt: true,
|
|
239
|
-
updatedAt: true,
|
|
240
|
-
},
|
|
241
|
-
})
|
|
242
|
-
.execute();
|
|
243
|
-
console.log(JSON.stringify(result, null, 2));
|
|
244
|
-
}
|
|
245
|
-
catch (error) {
|
|
246
|
-
console.error('Failed to update record.');
|
|
247
|
-
if (error instanceof Error) {
|
|
248
|
-
console.error(error.message);
|
|
249
|
-
}
|
|
250
|
-
process.exit(1);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
async function handleDelete(argv, prompter) {
|
|
254
|
-
try {
|
|
255
|
-
const rawAnswers = await prompter.prompt(argv, [
|
|
256
|
-
{
|
|
257
|
-
type: 'text',
|
|
258
|
-
name: 'id',
|
|
259
|
-
message: 'id',
|
|
260
|
-
required: true,
|
|
261
|
-
},
|
|
262
|
-
]);
|
|
263
|
-
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
264
|
-
const client = getClient();
|
|
265
|
-
const result = await client.appAchievement
|
|
266
|
-
.delete({
|
|
267
|
-
where: {
|
|
268
|
-
id: answers.id,
|
|
269
|
-
},
|
|
270
|
-
select: {
|
|
271
|
-
id: true,
|
|
272
|
-
},
|
|
273
|
-
})
|
|
274
|
-
.execute();
|
|
275
|
-
console.log(JSON.stringify(result, null, 2));
|
|
276
|
-
}
|
|
277
|
-
catch (error) {
|
|
278
|
-
console.error('Failed to delete record.');
|
|
279
|
-
if (error instanceof Error) {
|
|
280
|
-
console.error(error.message);
|
|
281
|
-
}
|
|
282
|
-
process.exit(1);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI commands for AppLevelRequirement
|
|
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;
|