@things-factory/ops-master 10.1.141 → 10.1.142
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/dist-client/bootstrap.js +21 -3
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/index.d.ts +1 -0
- package/dist-client/index.js +1 -0
- package/dist-client/index.js.map +1 -1
- package/dist-client/master-change-policy-axes.d.ts +0 -6
- package/dist-client/master-change-policy-axes.js +0 -6
- package/dist-client/master-change-policy-axes.js.map +1 -1
- package/dist-client/master-change-policy-panel.js +3 -1
- package/dist-client/master-change-policy-panel.js.map +1 -1
- package/dist-client/master-change-providers.d.ts +4 -0
- package/dist-client/master-change-providers.js +91 -0
- package/dist-client/master-change-providers.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/asset/index.d.ts +2 -2
- package/dist-server/service/equipment/index.d.ts +2 -2
- package/dist-server/service/index.d.ts +3 -2
- package/dist-server/service/index.js +3 -0
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/location/index.d.ts +1 -1
- package/dist-server/service/master-change-approval/builtin-axes.d.ts +4 -0
- package/dist-server/service/master-change-approval/builtin-axes.js +96 -0
- package/dist-server/service/master-change-approval/builtin-axes.js.map +1 -0
- package/dist-server/service/master-change-approval/index.d.ts +13 -0
- package/dist-server/service/master-change-approval/index.js +36 -0
- package/dist-server/service/master-change-approval/index.js.map +1 -0
- package/dist-server/service/master-change-approval/master-change-axis.d.ts +54 -0
- package/dist-server/service/master-change-approval/master-change-axis.js +17 -0
- package/dist-server/service/master-change-approval/master-change-axis.js.map +1 -0
- package/dist-server/service/master-change-approval/master-change-flow.d.ts +65 -0
- package/dist-server/service/master-change-approval/master-change-flow.js +125 -0
- package/dist-server/service/master-change-approval/master-change-flow.js.map +1 -0
- package/dist-server/service/master-change-approval/master-change-resolver.d.ts +18 -0
- package/dist-server/service/master-change-approval/master-change-resolver.js +58 -0
- package/dist-server/service/master-change-approval/master-change-resolver.js.map +1 -0
- package/dist-server/service/material/index.d.ts +2 -2
- package/dist-server/service/material/material-revision.d.ts +1 -1
- package/dist-server/service/operation/index.d.ts +1 -1
- package/dist-server/service/personnel/index.d.ts +2 -2
- package/dist-server/service/recipe/index.d.ts +2 -2
- package/dist-server/service/recipe/recipe-revision.d.ts +1 -1
- package/dist-server/service/test-spec/index.d.ts +2 -2
- package/dist-server/service/test-spec/test-spec-revision.d.ts +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/translations/en.json +16 -1
- package/translations/ja.json +16 -1
- package/translations/ko.json +16 -1
- package/translations/ms.json +16 -1
- package/translations/zh.json +16 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"master-change-flow.js","sourceRoot":"","sources":["../../../server/service/master-change-approval/master-change-flow.ts"],"names":[],"mappings":";;AAiCA,oDA2CC;AAMD,0DA8CC;AAQD,4DAQC;AAhJD,iDAAsD;AACtD,uDAOiC;AAEjC,kEAA4D;AAC5D,6DAA8E;AAE9E,MAAM,cAAc,GAAG;IACrB;QACE,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,UAAU;QACf,WAAW,EAAE,qCAAqC;QAClD,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,CAAC,CAAC,CAAC;QACf,IAAI,EAAE,EAAE;KACT;CACF,CAAA;AAED;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,IAAsB;IACzD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,QAAQ;QACnB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,OAAO,EAAE,OAAO;QAChB,QAAQ,EAAE,cAAc;QACxB,QAAQ,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E,EAAE,kBAAkB,EAAE,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAA;AAClG,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,wBAAwB,CAAC,OAAY,EAAE,QAAgB,EAAE,QAAgB;IAC7F,MAAM,IAAI,GAAG,IAAA,qCAAgB,EAAC,QAAQ,CAAC,CAAA;IACvC,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAA;IAE3B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,mBAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAA;IACrG,MAAM,KAAK,GAAG,CAAE,QAAQ,EAAE,YAAsB,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,yBAAc,CAAC,CAAC,MAAM,CAAA;IAErF,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAA;AACtD,CAAC","sourcesContent":["import { speaksRefusals } from '@things-factory/shell'\nimport {\n Activity,\n ActivityInstanceStatus,\n activityNamed,\n approvalLineStanding,\n isApprovalStep,\n issue\n} from '@things-factory/worklist'\n\nimport { masterChangePolicy } from '../master-change-policy'\nimport { masterChangeAxis, type MasterChangeAxis } from './master-change-axis'\n\nconst REVISION_MODEL = [\n {\n name: 'revision',\n tag: 'revision',\n description: 'Frozen revision identity and digest',\n hidden: true,\n mandatory: true,\n inout: 'in',\n type: 'object',\n options: {},\n unit: null,\n quantifier: [1],\n spec: {}\n }\n]\n\n/**\n * The activity template for an axis, with the callback that publishes the signed revision when the\n * approval ends. The approver reviews in `ops-master-revision-review`.\n */\nexport function masterChangeActivity(axis: MasterChangeAxis) {\n return {\n name: axis.activity,\n label: axis.label,\n description: axis.description,\n guide: axis.guide,\n release: '1.0.0',\n provider: 'hatiolab.com',\n category: axis.category,\n activityType: 'user',\n priority: 1,\n readiness: axis.readiness,\n startingType: 'post',\n multiple: 'single',\n viewType: 'custom-element',\n viewSource: 'ops-master-revision-review',\n decisionKeys: [\n { role: 'headline', inputPath: 'headline', name: 'specification' },\n { role: 'reason', inputPath: 'reason', name: 'reason for change' },\n { role: 'currentState', inputPath: 'before', name: axis.before },\n { role: 'consequence', inputPath: 'after', name: axis.after },\n { role: 'reversibility', inputPath: 'reversibility', name: 'how a signed revision is corrected' },\n { role: 'consequence', inputPath: 'effectiveFrom', name: 'effective from' }\n ],\n model: REVISION_MODEL,\n standardTime: 24 * 60 * 60,\n callback: speaksRefusals(async (instance: any, _addendum: any, context: ResolverContext) => {\n if (instance.state !== ActivityInstanceStatus.Ended) return\n\n const carried = instance.input?.revision\n if (typeof carried?.revisionId !== 'string' || typeof carried?.hash !== 'string') {\n throw new axis.Refusal('INVALID_SUBMISSION')\n }\n\n const { tx, domain, user } = context.state\n await axis.assertApprovalInput(tx, domain.id, instance.input)\n await axis.publish(tx, domain.id, carried.revisionId, {\n activityInstanceId: instance.id,\n approverId: user.id,\n submissionHash: carried.hash\n })\n })\n }\n}\n\n/**\n * Submits a draft for approval: the axis must be regulated here and its approval line must stand, then\n * the draft is frozen, the work item issued with what the approver sees, and the two bound.\n */\nexport async function submitMasterChangeDraft(\n axisName: string,\n revisionId: string,\n editGeneration: number,\n context: ResolverContext\n): Promise<{ revisionId: string; activityInstanceId: string; contentHash?: string }> {\n const axis = masterChangeAxis(axisName)\n if (!axis) throw new Error(`submitMasterChangeDraft: no approval flow is registered for the axis \"${axisName}\"`)\n\n const { tx, domain, user } = context.state\n\n const policy = await masterChangePolicy(tx, domain.id, axis.axis as any)\n if (!policy.approvalRequired) {\n throw new axis.Refusal('APPROVAL_NOT_REQUIRED', 'Publish this draft under the declared non-regulated policy.')\n }\n\n const activity = await activityNamed(axis.activity, context)\n if ((await approvalLineStanding(activity, context)).refusal) throw new axis.Refusal('APPROVAL_LINE_REQUIRED')\n\n const draft = await axis.freeze(tx, domain.id, user.id, revisionId, editGeneration)\n const snapshot = await axis.approvalInput(tx, domain.id, draft.id)\n\n const instance = await issue(\n {\n name: `${axis.issuedAs} ${snapshot.headline}`,\n description: draft.reason,\n activityId: activity.id,\n approvalLine: activity.approvalLine,\n input: {\n headline: snapshot.headline,\n reason: snapshot.reason,\n before: snapshot.before,\n after: snapshot.after,\n effectiveFrom: snapshot.effectiveFrom,\n revision: snapshot.revision,\n reversibility: { reversible: false, kind: 'compensable', caveat: axis.caveat }\n },\n threadsMin: 1,\n threadsMax: 1,\n requireApproval: true\n } as any,\n context\n )\n\n await axis.bind(tx, domain.id, draft.id, instance.id)\n return { revisionId: draft.id, activityInstanceId: instance.id, contentHash: draft.contentHash }\n}\n\n/**\n * Whether an axis can be made regulated: its activity must have someone who approves. Counted with\n * `isApprovalStep`, because a reference-only line approves nothing and would read as ready by length.\n * An axis with no registered flow gets no report and is not blocked here — `declareMasterChangePolicy`\n * refuses axes without revisions on its own.\n */\nexport async function inspectMasterChangeRoute(manager: any, domainId: string, axisName: string) {\n const axis = masterChangeAxis(axisName)\n if (!axis) return undefined\n\n const activity = await manager.findOneBy(Activity, { domain: { id: domainId }, name: axis.activity })\n const steps = ((activity?.approvalLine as any[]) || []).filter(isApprovalStep).length\n\n return { ready: steps > 0, activity: axis.activity }\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Submits a frozen master revision for approval, one door per axis whose revisions live here. */
|
|
2
|
+
export declare class MasterChangeApprovalResolver {
|
|
3
|
+
submitTestSpecificationDraft(revisionId: string, editGeneration: number, context: ResolverContext): Promise<{
|
|
4
|
+
revisionId: string;
|
|
5
|
+
activityInstanceId: string;
|
|
6
|
+
contentHash?: string;
|
|
7
|
+
}>;
|
|
8
|
+
submitRecipeDraft(revisionId: string, editGeneration: number, context: ResolverContext): Promise<{
|
|
9
|
+
revisionId: string;
|
|
10
|
+
activityInstanceId: string;
|
|
11
|
+
contentHash?: string;
|
|
12
|
+
}>;
|
|
13
|
+
submitMaterialDefinitionDraft(revisionId: string, editGeneration: number, context: ResolverContext): Promise<{
|
|
14
|
+
revisionId: string;
|
|
15
|
+
activityInstanceId: string;
|
|
16
|
+
contentHash?: string;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MasterChangeApprovalResolver = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const shell_1 = require("@things-factory/shell");
|
|
7
|
+
const master_change_flow_1 = require("./master-change-flow");
|
|
8
|
+
/** Submits a frozen master revision for approval, one door per axis whose revisions live here. */
|
|
9
|
+
let MasterChangeApprovalResolver = class MasterChangeApprovalResolver {
|
|
10
|
+
async submitTestSpecificationDraft(revisionId, editGeneration, context) {
|
|
11
|
+
return (0, master_change_flow_1.submitMasterChangeDraft)('testSpecification', revisionId, editGeneration, context);
|
|
12
|
+
}
|
|
13
|
+
async submitRecipeDraft(revisionId, editGeneration, context) {
|
|
14
|
+
return (0, master_change_flow_1.submitMasterChangeDraft)('recipeDefinition', revisionId, editGeneration, context);
|
|
15
|
+
}
|
|
16
|
+
async submitMaterialDefinitionDraft(revisionId, editGeneration, context) {
|
|
17
|
+
return (0, master_change_flow_1.submitMasterChangeDraft)('materialDefinition', revisionId, editGeneration, context);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.MasterChangeApprovalResolver = MasterChangeApprovalResolver;
|
|
21
|
+
tslib_1.__decorate([
|
|
22
|
+
(0, type_graphql_1.Directive)('@privilege(category: "ops-master", privilege: "mutation", domainOwnerGranted: true)'),
|
|
23
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
24
|
+
(0, type_graphql_1.Mutation)(() => shell_1.ScalarObject, { description: 'Submit a test specification draft for approval' }),
|
|
25
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('revisionId')),
|
|
26
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('editGeneration', () => type_graphql_1.Int)),
|
|
27
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
28
|
+
tslib_1.__metadata("design:type", Function),
|
|
29
|
+
tslib_1.__metadata("design:paramtypes", [String, Number, Object]),
|
|
30
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
31
|
+
], MasterChangeApprovalResolver.prototype, "submitTestSpecificationDraft", null);
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
(0, type_graphql_1.Directive)('@privilege(category: "ops-master", privilege: "mutation", domainOwnerGranted: true)'),
|
|
34
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
35
|
+
(0, type_graphql_1.Mutation)(() => shell_1.ScalarObject, { description: 'Submit a recipe draft for approval' }),
|
|
36
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('revisionId')),
|
|
37
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('editGeneration', () => type_graphql_1.Int)),
|
|
38
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
39
|
+
tslib_1.__metadata("design:type", Function),
|
|
40
|
+
tslib_1.__metadata("design:paramtypes", [String, Number, Object]),
|
|
41
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
42
|
+
], MasterChangeApprovalResolver.prototype, "submitRecipeDraft", null);
|
|
43
|
+
tslib_1.__decorate([
|
|
44
|
+
(0, type_graphql_1.Directive)('@privilege(category: "ops-master", privilege: "mutation", domainOwnerGranted: true)'),
|
|
45
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
46
|
+
(0, type_graphql_1.Mutation)(() => shell_1.ScalarObject, { description: 'Submit a material definition draft for approval' }),
|
|
47
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('revisionId')),
|
|
48
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('editGeneration', () => type_graphql_1.Int)),
|
|
49
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
50
|
+
tslib_1.__metadata("design:type", Function),
|
|
51
|
+
tslib_1.__metadata("design:paramtypes", [String, Number, Object]),
|
|
52
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
53
|
+
], MasterChangeApprovalResolver.prototype, "submitMaterialDefinitionDraft", null);
|
|
54
|
+
exports.MasterChangeApprovalResolver = MasterChangeApprovalResolver = tslib_1.__decorate([
|
|
55
|
+
(0, type_graphql_1.Resolver)(),
|
|
56
|
+
(0, type_graphql_1.UseMiddleware)(shell_1.SpeakRefusals)
|
|
57
|
+
], MasterChangeApprovalResolver);
|
|
58
|
+
//# sourceMappingURL=master-change-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"master-change-resolver.js","sourceRoot":"","sources":["../../../server/service/master-change-approval/master-change-resolver.ts"],"names":[],"mappings":";;;;AAAA,+CAA0F;AAE1F,iDAAmE;AAEnE,6DAA8D;AAE9D,kGAAkG;AAG3F,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAIjC,AAAN,KAAK,CAAC,4BAA4B,CACb,UAAkB,EACH,cAAsB,EACjD,OAAwB;QAE/B,OAAO,IAAA,4CAAuB,EAAC,mBAAmB,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,CAAC,CAAA;IAC1F,CAAC;IAKK,AAAN,KAAK,CAAC,iBAAiB,CACF,UAAkB,EACH,cAAsB,EACjD,OAAwB;QAE/B,OAAO,IAAA,4CAAuB,EAAC,kBAAkB,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,CAAC,CAAA;IACzF,CAAC;IAKK,AAAN,KAAK,CAAC,6BAA6B,CACd,UAAkB,EACH,cAAsB,EACjD,OAAwB;QAE/B,OAAO,IAAA,4CAAuB,EAAC,oBAAoB,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,CAAC,CAAA;IAC3F,CAAC;CACF,CAAA;AAjCY,oEAA4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, Mutation, Resolver, UseMiddleware } from 'type-graphql'\n\nimport { ScalarObject, SpeakRefusals } from '@things-factory/shell'\n\nimport { submitMasterChangeDraft } from './master-change-flow'\n\n/** Submits a frozen master revision for approval, one door per axis whose revisions live here. */\n@Resolver()\n@UseMiddleware(SpeakRefusals)\nexport class MasterChangeApprovalResolver {\n @Directive('@privilege(category: \"ops-master\", privilege: \"mutation\", domainOwnerGranted: true)')\n @Directive('@transaction')\n @Mutation(() => ScalarObject, { description: 'Submit a test specification draft for approval' })\n async submitTestSpecificationDraft(\n @Arg('revisionId') revisionId: string,\n @Arg('editGeneration', () => Int) editGeneration: number,\n @Ctx() context: ResolverContext\n ) {\n return submitMasterChangeDraft('testSpecification', revisionId, editGeneration, context)\n }\n\n @Directive('@privilege(category: \"ops-master\", privilege: \"mutation\", domainOwnerGranted: true)')\n @Directive('@transaction')\n @Mutation(() => ScalarObject, { description: 'Submit a recipe draft for approval' })\n async submitRecipeDraft(\n @Arg('revisionId') revisionId: string,\n @Arg('editGeneration', () => Int) editGeneration: number,\n @Ctx() context: ResolverContext\n ) {\n return submitMasterChangeDraft('recipeDefinition', revisionId, editGeneration, context)\n }\n\n @Directive('@privilege(category: \"ops-master\", privilege: \"mutation\", domainOwnerGranted: true)')\n @Directive('@transaction')\n @Mutation(() => ScalarObject, { description: 'Submit a material definition draft for approval' })\n async submitMaterialDefinitionDraft(\n @Arg('revisionId') revisionId: string,\n @Arg('editGeneration', () => Int) editGeneration: number,\n @Ctx() context: ResolverContext\n ) {\n return submitMasterChangeDraft('materialDefinition', revisionId, editGeneration, context)\n }\n}\n"]}
|
|
@@ -3,5 +3,5 @@ import { MaterialDefinition } from './material-definition';
|
|
|
3
3
|
import { MaterialQuery } from './material-query';
|
|
4
4
|
import { MaterialClassResolver, MaterialDefinitionResolver } from './material-master-resolver';
|
|
5
5
|
import { MaterialDefinitionRevisionResolver } from './material-revision-resolver';
|
|
6
|
-
export declare const entities: (typeof
|
|
7
|
-
export declare const resolvers: (typeof
|
|
6
|
+
export declare const entities: (typeof MaterialDefinition | typeof import("./material-revision").MaterialDefinitionPlan | typeof import("./material-revision").MaterialDefinitionRevision | typeof import("./material-revision").MaterialDefinitionSegment | typeof MaterialClass | typeof import("./material-revision").MaterialDefinitionBasis)[];
|
|
7
|
+
export declare const resolvers: (typeof MaterialQuery | typeof MaterialDefinitionRevisionResolver | typeof MaterialClassResolver | typeof MaterialDefinitionResolver)[];
|
|
@@ -83,4 +83,4 @@ export declare class MaterialDefinitionBasis {
|
|
|
83
83
|
businessTime: Date;
|
|
84
84
|
resolvedAt: Date;
|
|
85
85
|
}
|
|
86
|
-
export declare const MATERIAL_REVISION_ENTITIES: (typeof
|
|
86
|
+
export declare const MATERIAL_REVISION_ENTITIES: (typeof MaterialDefinitionPlan | typeof MaterialDefinitionRevision | typeof MaterialDefinitionSegment | typeof MaterialDefinitionBasis)[];
|
|
@@ -3,4 +3,4 @@ import { OperationQuery } from './operation-query';
|
|
|
3
3
|
import { OperationDefinitionResolver } from './operation-master-resolver';
|
|
4
4
|
import { OperationReadinessResolver } from './operation-readiness-resolver';
|
|
5
5
|
export declare const entities: (typeof OperationDefinition)[];
|
|
6
|
-
export declare const resolvers: (typeof
|
|
6
|
+
export declare const resolvers: (typeof OperationReadinessResolver | typeof OperationQuery | typeof OperationDefinitionResolver)[];
|
|
@@ -2,5 +2,5 @@ import { Person } from './person';
|
|
|
2
2
|
import { PersonnelClass } from './personnel-class';
|
|
3
3
|
import { PersonnelQuery } from './personnel-query';
|
|
4
4
|
import { PersonnelClassResolver, PersonResolver } from './personnel-master-resolver';
|
|
5
|
-
export declare const entities: (typeof
|
|
6
|
-
export declare const resolvers: (typeof
|
|
5
|
+
export declare const entities: (typeof PersonnelClass | typeof Person)[];
|
|
6
|
+
export declare const resolvers: (typeof PersonnelQuery | typeof PersonnelClassResolver | typeof PersonResolver)[];
|
|
@@ -3,8 +3,8 @@ import { RouteDefinition } from './route-definition';
|
|
|
3
3
|
import { RecipeDefinitionResolver, RouteDefinitionResolver } from './recipe-master-resolver';
|
|
4
4
|
import { RecipeQuery } from './recipe-query';
|
|
5
5
|
import { RecipeRevisionResolver } from './recipe-revision-resolver';
|
|
6
|
-
export declare const entities: (typeof
|
|
7
|
-
export declare const resolvers: (typeof
|
|
6
|
+
export declare const entities: (typeof import("./recipe-revision").RecipePlan | typeof import("./recipe-revision").RecipeRevision | typeof RecipeDefinition | typeof import("./recipe-revision").RecipeSegment | typeof RouteDefinition | typeof import("./recipe-revision").RecipeBasis | typeof import("./recipe-revision-line").RecipeRevisionOutput)[];
|
|
7
|
+
export declare const resolvers: (typeof RecipeQuery | typeof RecipeRevisionResolver | typeof RecipeDefinitionResolver | typeof RouteDefinitionResolver)[];
|
|
8
8
|
export * from './recipe-definition';
|
|
9
9
|
export * from './route-definition';
|
|
10
10
|
export * from './recipe-master';
|
|
@@ -99,4 +99,4 @@ export declare class RecipeBasis {
|
|
|
99
99
|
businessTime: Date;
|
|
100
100
|
resolvedAt: Date;
|
|
101
101
|
}
|
|
102
|
-
export declare const RECIPE_REVISION_ENTITIES: (typeof
|
|
102
|
+
export declare const RECIPE_REVISION_ENTITIES: (typeof RecipePlan | typeof RecipeRevision | typeof RecipeSegment | typeof RecipeBasis | typeof RecipeRevisionOutput)[];
|
|
@@ -2,5 +2,5 @@ import { TestSpecification } from './test-specification';
|
|
|
2
2
|
import { TestSpecificationQuery } from './test-spec-query';
|
|
3
3
|
import { TestSpecificationResolver } from './test-spec-master-resolver';
|
|
4
4
|
import { TestSpecificationRevisionResolver } from './test-spec-revision-resolver';
|
|
5
|
-
export declare const entities: (typeof
|
|
6
|
-
export declare const resolvers: (typeof
|
|
5
|
+
export declare const entities: (typeof import("./test-spec-revision").TestSpecificationPlan | typeof import("./test-spec-revision").TestSpecificationRevision | typeof TestSpecification | typeof import("./test-spec-revision").TestSpecificationSegment | typeof import("./test-spec-revision").TestSpecificationBasis)[];
|
|
6
|
+
export declare const resolvers: (typeof TestSpecificationQuery | typeof TestSpecificationRevisionResolver | typeof TestSpecificationResolver)[];
|
|
@@ -83,4 +83,4 @@ export declare class TestSpecificationBasis {
|
|
|
83
83
|
businessTime: Date;
|
|
84
84
|
resolvedAt: Date;
|
|
85
85
|
}
|
|
86
|
-
export declare const TEST_SPEC_REVISION_ENTITIES: (typeof
|
|
86
|
+
export declare const TEST_SPEC_REVISION_ENTITIES: (typeof TestSpecificationPlan | typeof TestSpecificationRevision | typeof TestSpecificationSegment | typeof TestSpecificationBasis)[];
|