@things-factory/figure-service 10.1.7 → 10.1.9

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.
Files changed (34) hide show
  1. package/dist-server/service/figure/figure-gate.d.ts +18 -0
  2. package/dist-server/service/figure/figure-gate.js +52 -1
  3. package/dist-server/service/figure/figure-gate.js.map +1 -1
  4. package/dist-server/service/figure/figure-mutation.js +8 -0
  5. package/dist-server/service/figure/figure-mutation.js.map +1 -1
  6. package/dist-server/service/figure/figure-propose-type.d.ts +30 -0
  7. package/dist-server/service/figure/figure-propose-type.js +112 -1
  8. package/dist-server/service/figure/figure-propose-type.js.map +1 -1
  9. package/dist-server/service/figure/figure-propose.d.ts +25 -1
  10. package/dist-server/service/figure/figure-propose.js +102 -4
  11. package/dist-server/service/figure/figure-propose.js.map +1 -1
  12. package/dist-server/service/figure/figure-quality.d.ts +29 -0
  13. package/dist-server/service/figure/figure-quality.js +62 -0
  14. package/dist-server/service/figure/figure-quality.js.map +1 -0
  15. package/dist-server/service/figure/figure-tools.js +55 -9
  16. package/dist-server/service/figure/figure-tools.js.map +1 -1
  17. package/dist-server/service/figure/figure-type.d.ts +11 -0
  18. package/dist-server/service/figure/figure-type.js +43 -1
  19. package/dist-server/service/figure/figure-type.js.map +1 -1
  20. package/dist-server/tsconfig.tsbuildinfo +1 -1
  21. package/package.json +4 -4
  22. package/server/service/figure/figure-ai-flow.test.ts +95 -0
  23. package/server/service/figure/figure-gate.test.ts +32 -0
  24. package/server/service/figure/figure-gate.ts +71 -2
  25. package/server/service/figure/figure-llm-smoke.test.ts +91 -0
  26. package/server/service/figure/figure-mutation.ts +8 -0
  27. package/server/service/figure/figure-propose-type.ts +80 -0
  28. package/server/service/figure/figure-propose.test.ts +77 -0
  29. package/server/service/figure/figure-propose.ts +137 -4
  30. package/server/service/figure/figure-quality.test.ts +43 -0
  31. package/server/service/figure/figure-quality.ts +98 -0
  32. package/server/service/figure/figure-tools.test.ts +62 -1
  33. package/server/service/figure/figure-tools.ts +60 -8
  34. package/server/service/figure/figure-type.ts +31 -0
@@ -63,12 +63,23 @@ export declare class FigureSaveResult {
63
63
  * 것들이라 그 칸이 필요 없었다. 발행 판정은 막는 것과 알리는 것을 함께 내므로, 어느 쪽인지를 값이
64
64
  * 스스로 말해야 한다 — 코드를 보고 화면이 다시 분류하면 규칙이 두 벌이 된다.
65
65
  */
66
+ /** A measured, one-anchor repair candidate for a release-gate sizing split. */
67
+ export declare class FigureGateFix {
68
+ findingWay: string;
69
+ part: string;
70
+ axis: string;
71
+ from?: string;
72
+ to: string;
73
+ resolved: number;
74
+ safe: boolean;
75
+ }
66
76
  export declare class FigureGateFinding {
67
77
  code: string;
68
78
  message: string;
69
79
  why?: string;
70
80
  how?: string;
71
81
  at?: string;
82
+ fixes?: FigureGateFix[];
72
83
  blocking: boolean;
73
84
  }
74
85
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FigureInspection = exports.FigureGateFinding = exports.FigureSaveResult = exports.FigureFinding = exports.FigureList = exports.FigurePatch = exports.NewFigure = void 0;
3
+ exports.FigureInspection = exports.FigureGateFinding = exports.FigureGateFix = exports.FigureSaveResult = exports.FigureFinding = exports.FigureList = exports.FigurePatch = exports.NewFigure = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const type_graphql_1 = require("type-graphql");
6
6
  const figure_js_1 = require("./figure.js");
@@ -157,6 +157,41 @@ exports.FigureSaveResult = FigureSaveResult = tslib_1.__decorate([
157
157
  * 것들이라 그 칸이 필요 없었다. 발행 판정은 막는 것과 알리는 것을 함께 내므로, 어느 쪽인지를 값이
158
158
  * 스스로 말해야 한다 — 코드를 보고 화면이 다시 분류하면 규칙이 두 벌이 된다.
159
159
  */
160
+ /** A measured, one-anchor repair candidate for a release-gate sizing split. */
161
+ let FigureGateFix = class FigureGateFix {
162
+ };
163
+ exports.FigureGateFix = FigureGateFix;
164
+ tslib_1.__decorate([
165
+ (0, type_graphql_1.Field)({ description: 'Sizing test that this candidate improves, for example y or x-y.' }),
166
+ tslib_1.__metadata("design:type", String)
167
+ ], FigureGateFix.prototype, "findingWay", void 0);
168
+ tslib_1.__decorate([
169
+ (0, type_graphql_1.Field)({ description: 'Stable FigureSource part name to change.' }),
170
+ tslib_1.__metadata("design:type", String)
171
+ ], FigureGateFix.prototype, "part", void 0);
172
+ tslib_1.__decorate([
173
+ (0, type_graphql_1.Field)({ description: 'Axis whose anchor will change.' }),
174
+ tslib_1.__metadata("design:type", String)
175
+ ], FigureGateFix.prototype, "axis", void 0);
176
+ tslib_1.__decorate([
177
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Current explicit anchor, if one is present.' }),
178
+ tslib_1.__metadata("design:type", String)
179
+ ], FigureGateFix.prototype, "from", void 0);
180
+ tslib_1.__decorate([
181
+ (0, type_graphql_1.Field)({ description: 'Suggested explicit anchor: min, center, max, or span.' }),
182
+ tslib_1.__metadata("design:type", String)
183
+ ], FigureGateFix.prototype, "to", void 0);
184
+ tslib_1.__decorate([
185
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of blocking sizing-split checks removed by this one change.' }),
186
+ tslib_1.__metadata("design:type", Number)
187
+ ], FigureGateFix.prototype, "resolved", void 0);
188
+ tslib_1.__decorate([
189
+ (0, type_graphql_1.Field)({ description: 'True only when every blocking sizing check is clear after remeasurement.' }),
190
+ tslib_1.__metadata("design:type", Boolean)
191
+ ], FigureGateFix.prototype, "safe", void 0);
192
+ exports.FigureGateFix = FigureGateFix = tslib_1.__decorate([
193
+ (0, type_graphql_1.ObjectType)({ description: 'A reversible anchor change measured to reduce a sizing split.' })
194
+ ], FigureGateFix);
160
195
  let FigureGateFinding = class FigureGateFinding {
161
196
  };
162
197
  exports.FigureGateFinding = FigureGateFinding;
@@ -180,6 +215,13 @@ tslib_1.__decorate([
180
215
  (0, type_graphql_1.Field)({ nullable: true, description: 'Where it points: part names that came apart, or a path in the source.' }),
181
216
  tslib_1.__metadata("design:type", String)
182
217
  ], FigureGateFinding.prototype, "at", void 0);
218
+ tslib_1.__decorate([
219
+ (0, type_graphql_1.Field)(type => [FigureGateFix], {
220
+ nullable: true,
221
+ description: 'Measured repair candidates. They are previews until the author explicitly applies one.'
222
+ }),
223
+ tslib_1.__metadata("design:type", Array)
224
+ ], FigureGateFinding.prototype, "fixes", void 0);
183
225
  tslib_1.__decorate([
184
226
  (0, type_graphql_1.Field)({ description: 'True when this finding blocks the release.' }),
185
227
  tslib_1.__metadata("design:type", Boolean)
@@ -1 +1 @@
1
- {"version":3,"file":"figure-type.js","sourceRoot":"","sources":["../../../server/service/figure/figure-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAEhE,2CAAoC;AAEpC;;;;;GAKG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAS;CA2BrB,CAAA;AA3BY,8BAAS;AAEpB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,iEAAiE,EAAE,CAAC;;uCAC9E;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;;uCAC7C;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;;8CAC7D;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,2DAA2D,EAAE,CAAC;;2CACnF;AAGjB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,6CAA6C,EAAE,CAAC;;uCACzF;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;;yCAC7C;AAGd;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gEAAgE,E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import { Field, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { Figure } from './figure.js'\n\n/**\n * 새 Figure.\n *\n * `score`·`triangles`·`groups` 는 **받지 않는다.** 서버가 `source` 에서 계산한다 —\n * 받으면 거짓이 들어오고 목록이 실물과 다른 것을 보여 준다.\n */\n@InputType({ description: 'Input for creating a new figure.' })\nexport class NewFigure {\n @Field({ description: 'Component type name. Immutable once created, unique per domain.' })\n type: string\n\n @Field({ description: 'Display name shown to authors.' })\n name: string\n\n @Field({ nullable: true, description: 'A detailed description for the figure.' })\n description?: string\n\n @Field({ nullable: true, description: 'Classification code used to group figures in the palette.' })\n category?: string\n\n @Field(type => [String], { nullable: true, description: 'Free-form tags. A figure may carry several.' })\n tags?: string[]\n\n @Field({ description: 'The canonical FigureSource JSON.' })\n source: string\n\n @Field({ nullable: true, description: 'JSON definition of the master-data fields an instance carries.' })\n properties?: string\n\n @Field({ nullable: true, description: \"Lifecycle state — defaults to 'draft'.\" })\n state?: 'draft' | 'released'\n\n @Field({ nullable: true, description: 'A base64 encoded thumbnail image.' })\n thumbnail?: string\n}\n\n/**\n * 수정.\n *\n * `type` 이 없다. **저장되는 식별자라 고칠 수 없다** — 바꾸면 이미 배치된 보드가\n * 타입을 못 찾아 오류 없이 빈 화면이 된다. 고칠 수 있는 이름은 `name` 뿐이다.\n */\n@InputType({ description: 'Input for updating an existing figure. The `type` field is absent by design — it is a stored identifier.' })\nexport class FigurePatch {\n @Field({ nullable: true, description: 'The new display name.' })\n name?: string\n\n @Field({ nullable: true, description: 'The new description.' })\n description?: string\n\n @Field({ nullable: true, description: 'The new classification code.' })\n category?: string\n\n /*\n 빈 배열과 안 준 것을 가른다. `undefined` 는 「건드리지 않는다」, `[]` 는 「전부 지운다」다.\n 둘을 뭉개면 태그를 다 지우려는 저작자가 지울 방법을 잃는다.\n */\n @Field(type => [String], { nullable: true, description: 'The new tags. An empty list clears them; omitting the field leaves them.' })\n tags?: string[]\n\n @Field({ nullable: true, description: 'The new FigureSource JSON.' })\n source?: string\n\n @Field({ nullable: true, description: 'The new master-data field definition.' })\n properties?: string\n\n /*\n `state` 는 여기 없다 — **상태는 저장이 정하지 않는다.**\n\n 발행은 `releaseFigure` 가 한다. 저장으로 상태를 바꿀 수 있게 두면 발행된 판을 덮어쓰면서 같은\n 판 번호로 판본을 또 뜨게 되고(유니크 충돌), 무엇이 약속된 판인지도 흐려진다. board 도 같다.\n */\n\n @Field({ nullable: true, description: 'A base64 encoded thumbnail image.' })\n thumbnail?: string\n}\n\n@ObjectType({ description: 'A paginated list of figures.' })\nexport class FigureList {\n @Field(type => [Figure], { description: 'The figures on this page.' })\n items: Figure[]\n\n @Field(type => Int, { description: 'Total number of figures matching the query.' })\n total: number\n}\n\n/**\n * 검증 결과 한 줄.\n *\n * 정본 형식의 검증은 `@hatiolab/figure-model` 이 두 단계로 나눈다 — `errors` 는\n * 막고, `violations` 는 알린다. 그 경계를 서버가 다시 정하지 않는다.\n */\n@ObjectType({ description: 'One validation finding from figure-model.' })\nexport class FigureFinding {\n @Field({ description: 'Stable code from figure-model (ERROR_CODES / VIOLATION_CODES).' })\n code: string\n\n @Field({ description: 'Human-readable message.' })\n message: string\n\n @Field({ nullable: true, description: 'Path within the source that the finding points at.' })\n at?: string\n}\n\n/**\n * 저장 결과.\n *\n * `violations` 가 있어도 저장은 된다 — 막는 것과 알리는 것을 가른다. 화면이\n * 이것을 그대로 보여 줘야 한다. 조용히 버리면 저작자가 모른다.\n */\n@ObjectType({ description: 'Result of saving a figure, carrying non-blocking violations.' })\nexport class FigureSaveResult {\n @Field(type => Figure, { description: 'The saved figure.' })\n figure: Figure\n\n @Field(type => [FigureFinding], { description: 'Non-blocking findings. The save succeeded despite these.' })\n violations: FigureFinding[]\n}\n\n/**\n * 발행 판정 한 줄.\n *\n * `FigureFinding` 과 칸이 겹치지만 **`blocking` 이 하나 더 있다.** 저장 쪽 발견은 정의상 막지 않는\n * 것들이라 그 칸이 필요 없었다. 발행 판정은 막는 것과 알리는 것을 함께 내므로, 어느 쪽인지를 값이\n * 스스로 말해야 한다 — 코드를 보고 화면이 다시 분류하면 규칙이 두 벌이 된다.\n */\n@ObjectType({ description: 'One finding from the release gate.' })\nexport class FigureGateFinding {\n @Field({ description: 'Stable code — figure-model validation codes, or sizing-splits / sizing-loose.' })\n code: string\n\n @Field({ description: 'Human-readable message.' })\n message: string\n\n @Field({ nullable: true, description: 'Why this is a problem — what a person sees when it happens.' })\n why?: string\n\n @Field({ nullable: true, description: 'What to change, naming the part and the value.' })\n how?: string\n\n @Field({ nullable: true, description: 'Where it points: part names that came apart, or a path in the source.' })\n at?: string\n\n @Field({ description: 'True when this finding blocks the release.' })\n blocking: boolean\n}\n\n/**\n * 발행 판정.\n *\n * 화면이 **발행을 누르기 전에** 물어보는 자리다. 눌러 보고 거절당하는 것으로 알게 되면, 무엇을\n * 고쳐야 하는지 모른 채 단추만 두드리게 된다.\n */\n@ObjectType({ description: 'Whether a figure may be released, and why not.' })\nexport class FigureInspection {\n @Field({ description: 'True when at least one finding blocks the release.' })\n blocked: boolean\n\n @Field(type => [FigureGateFinding], { description: 'Findings, blocking and advisory together.' })\n findings: FigureGateFinding[]\n}\n"]}
1
+ {"version":3,"file":"figure-type.js","sourceRoot":"","sources":["../../../server/service/figure/figure-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAEhE,2CAAoC;AAEpC;;;;;GAKG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAS;CA2BrB,CAAA;AA3BY,8BAAS;AAEpB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,iEAAiE,EAAE,CAAC;;uCAC9E;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;;uCAC7C;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;;8CAC7D;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ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AU,EAAC,EAAE,WAAW,EAAE,gDAAgD,EAAE,CAAC;GACjE,gBAAgB,CAM5B","sourcesContent":["import { Field, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { Figure } from './figure.js'\n\n/**\n * 새 Figure.\n *\n * `score`·`triangles`·`groups` 는 **받지 않는다.** 서버가 `source` 에서 계산한다 —\n * 받으면 거짓이 들어오고 목록이 실물과 다른 것을 보여 준다.\n */\n@InputType({ description: 'Input for creating a new figure.' })\nexport class NewFigure {\n @Field({ description: 'Component type name. Immutable once created, unique per domain.' })\n type: string\n\n @Field({ description: 'Display name shown to authors.' })\n name: string\n\n @Field({ nullable: true, description: 'A detailed description for the figure.' })\n description?: string\n\n @Field({ nullable: true, description: 'Classification code used to group figures in the palette.' })\n category?: string\n\n @Field(type => [String], { nullable: true, description: 'Free-form tags. A figure may carry several.' })\n tags?: string[]\n\n @Field({ description: 'The canonical FigureSource JSON.' })\n source: string\n\n @Field({ nullable: true, description: 'JSON definition of the master-data fields an instance carries.' })\n properties?: string\n\n @Field({ nullable: true, description: \"Lifecycle state — defaults to 'draft'.\" })\n state?: 'draft' | 'released'\n\n @Field({ nullable: true, description: 'A base64 encoded thumbnail image.' })\n thumbnail?: string\n}\n\n/**\n * 수정.\n *\n * `type` 이 없다. **저장되는 식별자라 고칠 수 없다** — 바꾸면 이미 배치된 보드가\n * 타입을 못 찾아 오류 없이 빈 화면이 된다. 고칠 수 있는 이름은 `name` 뿐이다.\n */\n@InputType({ description: 'Input for updating an existing figure. The `type` field is absent by design — it is a stored identifier.' })\nexport class FigurePatch {\n @Field({ nullable: true, description: 'The new display name.' })\n name?: string\n\n @Field({ nullable: true, description: 'The new description.' })\n description?: string\n\n @Field({ nullable: true, description: 'The new classification code.' })\n category?: string\n\n /*\n 빈 배열과 안 준 것을 가른다. `undefined` 는 「건드리지 않는다」, `[]` 는 「전부 지운다」다.\n 둘을 뭉개면 태그를 다 지우려는 저작자가 지울 방법을 잃는다.\n */\n @Field(type => [String], { nullable: true, description: 'The new tags. An empty list clears them; omitting the field leaves them.' })\n tags?: string[]\n\n @Field({ nullable: true, description: 'The new FigureSource JSON.' })\n source?: string\n\n @Field({ nullable: true, description: 'The new master-data field definition.' })\n properties?: string\n\n /*\n `state` 는 여기 없다 — **상태는 저장이 정하지 않는다.**\n\n 발행은 `releaseFigure` 가 한다. 저장으로 상태를 바꿀 수 있게 두면 발행된 판을 덮어쓰면서 같은\n 판 번호로 판본을 또 뜨게 되고(유니크 충돌), 무엇이 약속된 판인지도 흐려진다. board 도 같다.\n */\n\n @Field({ nullable: true, description: 'A base64 encoded thumbnail image.' })\n thumbnail?: string\n}\n\n@ObjectType({ description: 'A paginated list of figures.' })\nexport class FigureList {\n @Field(type => [Figure], { description: 'The figures on this page.' })\n items: Figure[]\n\n @Field(type => Int, { description: 'Total number of figures matching the query.' })\n total: number\n}\n\n/**\n * 검증 결과 한 줄.\n *\n * 정본 형식의 검증은 `@hatiolab/figure-model` 이 두 단계로 나눈다 — `errors` 는\n * 막고, `violations` 는 알린다. 그 경계를 서버가 다시 정하지 않는다.\n */\n@ObjectType({ description: 'One validation finding from figure-model.' })\nexport class FigureFinding {\n @Field({ description: 'Stable code from figure-model (ERROR_CODES / VIOLATION_CODES).' })\n code: string\n\n @Field({ description: 'Human-readable message.' })\n message: string\n\n @Field({ nullable: true, description: 'Path within the source that the finding points at.' })\n at?: string\n}\n\n/**\n * 저장 결과.\n *\n * `violations` 가 있어도 저장은 된다 — 막는 것과 알리는 것을 가른다. 화면이\n * 이것을 그대로 보여 줘야 한다. 조용히 버리면 저작자가 모른다.\n */\n@ObjectType({ description: 'Result of saving a figure, carrying non-blocking violations.' })\nexport class FigureSaveResult {\n @Field(type => Figure, { description: 'The saved figure.' })\n figure: Figure\n\n @Field(type => [FigureFinding], { description: 'Non-blocking findings. The save succeeded despite these.' })\n violations: FigureFinding[]\n}\n\n/**\n * 발행 판정 한 줄.\n *\n * `FigureFinding` 과 칸이 겹치지만 **`blocking` 이 하나 더 있다.** 저장 쪽 발견은 정의상 막지 않는\n * 것들이라 그 칸이 필요 없었다. 발행 판정은 막는 것과 알리는 것을 함께 내므로, 어느 쪽인지를 값이\n * 스스로 말해야 한다 — 코드를 보고 화면이 다시 분류하면 규칙이 두 벌이 된다.\n */\n/** A measured, one-anchor repair candidate for a release-gate sizing split. */\n@ObjectType({ description: 'A reversible anchor change measured to reduce a sizing split.' })\nexport class FigureGateFix {\n @Field({ description: 'Sizing test that this candidate improves, for example y or x-y.' })\n findingWay: string\n\n @Field({ description: 'Stable FigureSource part name to change.' })\n part: string\n\n @Field({ description: 'Axis whose anchor will change.' })\n axis: string\n\n @Field({ nullable: true, description: 'Current explicit anchor, if one is present.' })\n from?: string\n\n @Field({ description: 'Suggested explicit anchor: min, center, max, or span.' })\n to: string\n\n @Field(type => Int, { description: 'Number of blocking sizing-split checks removed by this one change.' })\n resolved: number\n\n @Field({ description: 'True only when every blocking sizing check is clear after remeasurement.' })\n safe: boolean\n}\n\n@ObjectType({ description: 'One finding from the release gate.' })\nexport class FigureGateFinding {\n @Field({ description: 'Stable code — figure-model validation codes, or sizing-splits / sizing-loose.' })\n code: string\n\n @Field({ description: 'Human-readable message.' })\n message: string\n\n @Field({ nullable: true, description: 'Why this is a problem — what a person sees when it happens.' })\n why?: string\n\n @Field({ nullable: true, description: 'What to change, naming the part and the value.' })\n how?: string\n\n @Field({ nullable: true, description: 'Where it points: part names that came apart, or a path in the source.' })\n at?: string\n\n @Field(type => [FigureGateFix], {\n nullable: true,\n description: 'Measured repair candidates. They are previews until the author explicitly applies one.'\n })\n fixes?: FigureGateFix[]\n\n @Field({ description: 'True when this finding blocks the release.' })\n blocking: boolean\n}\n\n/**\n * 발행 판정.\n *\n * 화면이 **발행을 누르기 전에** 물어보는 자리다. 눌러 보고 거절당하는 것으로 알게 되면, 무엇을\n * 고쳐야 하는지 모른 채 단추만 두드리게 된다.\n */\n@ObjectType({ description: 'Whether a figure may be released, and why not.' })\nexport class FigureInspection {\n @Field({ description: 'True when at least one finding blocks the release.' })\n blocked: boolean\n\n @Field(type => [FigureGateFinding], { description: 'Findings, blocking and advisory together.' })\n findings: FigureGateFinding[]\n}\n"]}