@autobe/agent 0.10.5 → 0.11.0
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/lib/AutoBeAgent.js +13 -46
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +11 -6
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/context/AutoBeContext.d.ts +3 -2
- package/lib/factory/getAutoBeGenerated.d.ts +5 -0
- package/lib/factory/getAutoBeGenerated.js +307 -0
- package/lib/factory/getAutoBeGenerated.js.map +1 -0
- package/lib/index.mjs +1631 -1389
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +2 -7
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +1 -9
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeRole.d.ts +13 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzeRole.js +3 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzeRole.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -25
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +22 -420
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +561 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +41 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +14 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +468 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.d.ts +68 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js +3 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js.map +1 -0
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.d.ts +5 -0
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +27 -0
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +1 -0
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.d.ts +12 -0
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +78 -0
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +1 -0
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +6 -0
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +58 -0
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.js +0 -2
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +17 -137
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +92 -141
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js +9 -5
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +54 -25
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +4 -3
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/{orchestratePrismaSchema.d.ts → orchestratePrismaSchemas.d.ts} +2 -4
- package/lib/orchestrate/prisma/{orchestratePrismaSchema.js → orchestratePrismaSchemas.js} +269 -203
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +1 -1
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js +1 -1
- package/lib/orchestrate/prisma/transformPrismaHistories.js +1 -1
- package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.d.ts +2 -6
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +24 -32
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/orchestrate/realize/RealizePipe.d.ts +5 -0
- package/lib/orchestrate/realize/RealizePipe.js +14 -0
- package/lib/orchestrate/realize/RealizePipe.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealize.d.ts +0 -6
- package/lib/orchestrate/realize/orchestrateRealize.js +6 -43
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +3 -3
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +124 -59
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +188 -18
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +23 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js +3 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +2 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +5 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +1 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +2 -1
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js +50 -36
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -1
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +5 -0
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +123 -0
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +4 -1
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js +2 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTest.js +11 -5
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +3 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/structures/IAutoBeProps.d.ts +8 -8
- package/lib/utils/pipe.d.ts +5 -0
- package/lib/utils/pipe.js +14 -0
- package/lib/utils/pipe.js.map +1 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +22 -76
- package/src/constants/AutoBeSystemPromptConstant.ts +11 -6
- package/src/context/AutoBeContext.ts +3 -1
- package/src/factory/getAutoBeGenerated.ts +113 -0
- package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +5 -13
- package/src/orchestrate/analyze/AutoBeAnalyzeRole.ts +14 -0
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +30 -165
- package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +115 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +39 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +106 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.ts +74 -0
- package/src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts +31 -0
- package/src/orchestrate/analyze/transformAnalyzeWriteHistories.ts +94 -0
- package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +66 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +0 -2
- package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +2 -3
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +21 -0
- package/src/orchestrate/prisma/orchestratePrisma.ts +12 -5
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +4 -13
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +9 -4
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +265 -0
- package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +26 -37
- package/src/orchestrate/realize/RealizePipe.ts +39 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +3 -91
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +60 -25
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +192 -18
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +34 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +2 -0
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +58 -34
- package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +178 -0
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +5 -4
- package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +7 -2
- package/src/orchestrate/test/orchestrateTest.ts +14 -12
- package/src/orchestrate/test/orchestrateTestCorrect.ts +10 -9
- package/src/structures/IAutoBeProps.ts +10 -7
- package/src/utils/pipe.ts +39 -0
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.d.ts +0 -20
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +0 -735
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.d.ts +0 -15
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -44
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +0 -1
- package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +0 -219
- package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -62
- package/src/orchestrate/prisma/orchestratePrismaSchema.ts +0 -157
|
@@ -46,6 +46,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.orchestrateInterfaceOperations = orchestrateInterfaceOperations;
|
|
49
|
+
const __typia_transform__isUniqueItems = __importStar(require("typia/lib/internal/_isUniqueItems.js"));
|
|
49
50
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
50
51
|
const core_1 = require("@agentica/core");
|
|
51
52
|
const tstl_1 = require("tstl");
|
|
@@ -102,7 +103,7 @@ function divideAndConquer(ctx, endpoints, retry, progress) {
|
|
|
102
103
|
}
|
|
103
104
|
function process(ctx, endpoints) {
|
|
104
105
|
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
var _a;
|
|
106
|
+
var _a, _b, _c;
|
|
106
107
|
const pointer = {
|
|
107
108
|
value: null,
|
|
108
109
|
};
|
|
@@ -116,6 +117,7 @@ function process(ctx, endpoints) {
|
|
|
116
117
|
controllers: [
|
|
117
118
|
createApplication({
|
|
118
119
|
model: ctx.model,
|
|
120
|
+
roles: (_c = (_b = ctx.state().analyze) === null || _b === void 0 ? void 0 : _b.roles.map((it) => it.name)) !== null && _c !== void 0 ? _c : null,
|
|
119
121
|
build: (endpoints) => {
|
|
120
122
|
var _a;
|
|
121
123
|
(_a = pointer.value) !== null && _a !== void 0 ? _a : (pointer.value = []);
|
|
@@ -146,7 +148,7 @@ function createApplication(props) {
|
|
|
146
148
|
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
147
149
|
const application = collection[props.model];
|
|
148
150
|
application.functions[0].validate = (next) => {
|
|
149
|
-
const result = (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.
|
|
151
|
+
const result = (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorizationRoles || Array.isArray(input.authorizationRoles) && (__typia_transform__isUniqueItems._isUniqueItems(input.authorizationRoles) && input.authorizationRoles.every(elem => "string" === typeof elem))) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
150
152
|
if ("number" === input.type)
|
|
151
153
|
return _io4(input);
|
|
152
154
|
else if ("integer" === input.type)
|
|
@@ -215,14 +217,22 @@ function createApplication(props) {
|
|
|
215
217
|
path: _path + ".responseBody",
|
|
216
218
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
217
219
|
value: input.responseBody
|
|
218
|
-
}), null === input.
|
|
219
|
-
path: _path + ".
|
|
220
|
-
expected: "(
|
|
221
|
-
value: input.
|
|
222
|
-
})) &&
|
|
223
|
-
path: _path + ".
|
|
224
|
-
expected: "
|
|
225
|
-
value: input.
|
|
220
|
+
}), null === input.authorizationRoles || (Array.isArray(input.authorizationRoles) || _report(_exceptionable, {
|
|
221
|
+
path: _path + ".authorizationRoles",
|
|
222
|
+
expected: "((Array<string> & UniqueItems<true>) | null)",
|
|
223
|
+
value: input.authorizationRoles
|
|
224
|
+
})) && ((__typia_transform__isUniqueItems._isUniqueItems(input.authorizationRoles) || _report(_exceptionable, {
|
|
225
|
+
path: _path + ".authorizationRoles",
|
|
226
|
+
expected: "Array<> & UniqueItems<true>",
|
|
227
|
+
value: input.authorizationRoles
|
|
228
|
+
})) && input.authorizationRoles.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
|
|
229
|
+
path: _path + ".authorizationRoles[" + _index6 + "]",
|
|
230
|
+
expected: "string",
|
|
231
|
+
value: elem
|
|
232
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
233
|
+
path: _path + ".authorizationRoles",
|
|
234
|
+
expected: "((Array<string> & UniqueItems<true>) | null)",
|
|
235
|
+
value: input.authorizationRoles
|
|
226
236
|
}), "string" === typeof input.path || _report(_exceptionable, {
|
|
227
237
|
path: _path + ".path",
|
|
228
238
|
expected: "string",
|
|
@@ -363,22 +373,6 @@ function createApplication(props) {
|
|
|
363
373
|
path: _path + ".typeName",
|
|
364
374
|
expected: "string",
|
|
365
375
|
value: input.typeName
|
|
366
|
-
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.role) || _report(_exceptionable, {
|
|
367
|
-
path: _path + ".role",
|
|
368
|
-
expected: "Array<string>",
|
|
369
|
-
value: input.role
|
|
370
|
-
})) && input.role.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
|
|
371
|
-
path: _path + ".role[" + _index6 + "]",
|
|
372
|
-
expected: "string",
|
|
373
|
-
value: elem
|
|
374
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
375
|
-
path: _path + ".role",
|
|
376
|
-
expected: "Array<string>",
|
|
377
|
-
value: input.role
|
|
378
|
-
}), "Bearer" === input.type || _report(_exceptionable, {
|
|
379
|
-
path: _path + ".type",
|
|
380
|
-
expected: "\"Bearer\"",
|
|
381
|
-
value: input.type
|
|
382
376
|
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
383
377
|
if ("number" === input.type)
|
|
384
378
|
return _vo4(input, _path, true && _exceptionable);
|
|
@@ -424,12 +418,32 @@ function createApplication(props) {
|
|
|
424
418
|
return result;
|
|
425
419
|
const errors = [];
|
|
426
420
|
result.data.operations.forEach((op, i) => {
|
|
421
|
+
var _a;
|
|
427
422
|
if (op.method === "get" && op.requestBody !== null)
|
|
428
423
|
errors.push({
|
|
429
424
|
path: `operations[${i}].requestBody`,
|
|
430
425
|
expected: "GET method should not have request body. Change method, or re-design the operation.",
|
|
431
426
|
value: op.requestBody,
|
|
432
427
|
});
|
|
428
|
+
(_a = op.authorizationRoles) === null || _a === void 0 ? void 0 : _a.forEach((role, j) => {
|
|
429
|
+
var _a, _b, _c;
|
|
430
|
+
if (props.roles === null) {
|
|
431
|
+
op.authorizationRoles = null;
|
|
432
|
+
}
|
|
433
|
+
if (((_a = props.roles) === null || _a === void 0 ? void 0 : _a.find((it) => it === role)) === undefined)
|
|
434
|
+
errors.push({
|
|
435
|
+
path: `operations[${i}].authorizationRoles[${j}]`,
|
|
436
|
+
expected: `undefined | ${(_b = props.roles) === null || _b === void 0 ? void 0 : _b.join(" | ")}`,
|
|
437
|
+
description: [
|
|
438
|
+
`Role "${role}" is not defined in the roles list.`,
|
|
439
|
+
"",
|
|
440
|
+
"Please select one of them below, or do not define (undefined): ",
|
|
441
|
+
"",
|
|
442
|
+
...((_c = props.roles) !== null && _c !== void 0 ? _c : []).map((role) => `- ${role}`),
|
|
443
|
+
].join("\n"),
|
|
444
|
+
value: role,
|
|
445
|
+
});
|
|
446
|
+
});
|
|
433
447
|
});
|
|
434
448
|
if (errors.length !== 0)
|
|
435
449
|
return {
|
|
@@ -521,22 +535,20 @@ const claude = {
|
|
|
521
535
|
}
|
|
522
536
|
]
|
|
523
537
|
},
|
|
524
|
-
|
|
525
|
-
description: "
|
|
538
|
+
authorizationRoles: {
|
|
539
|
+
description: "List of roles that are allowed to access the API operation.\n\nIf the API operation is not restricted to any role, this field must be\n`null`.\n\nIf the API operation is restricted to some roles, this field must be an\narray of role names.",
|
|
526
540
|
oneOf: [
|
|
527
541
|
{
|
|
528
542
|
type: "null"
|
|
529
543
|
},
|
|
530
544
|
{
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
mapping: {
|
|
537
|
-
Bearer: "#/$defs/AutoBeOpenApi.IAuthorization"
|
|
545
|
+
type: "array",
|
|
546
|
+
items: {
|
|
547
|
+
type: "string"
|
|
548
|
+
},
|
|
549
|
+
uniqueItems: true
|
|
538
550
|
}
|
|
539
|
-
|
|
551
|
+
]
|
|
540
552
|
},
|
|
541
553
|
path: {
|
|
542
554
|
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
|
|
@@ -570,6 +582,7 @@ const claude = {
|
|
|
570
582
|
"parameters",
|
|
571
583
|
"requestBody",
|
|
572
584
|
"responseBody",
|
|
585
|
+
"authorizationRoles",
|
|
573
586
|
"path",
|
|
574
587
|
"method"
|
|
575
588
|
]
|
|
@@ -753,32 +766,11 @@ const claude = {
|
|
|
753
766
|
"description",
|
|
754
767
|
"typeName"
|
|
755
768
|
]
|
|
756
|
-
},
|
|
757
|
-
"AutoBeOpenApi.IAuthorization": {
|
|
758
|
-
description: "Authorization - Authentication and user type information\n\nThis field defines how the API authenticates the request and restricts\naccess to specific user types.\n\n\u2705 Only the `Authorization` HTTP header is used for authentication. The\nexpected format is:\n\nAuthorization: Bearer <access_token>\n\nThe token must be a bearer token (e.g., JWT or similar), and when parsed,\nit is guaranteed to include at least the authenticated actor's `id` field.\nNo other headers or cookie-based authentication methods are supported.",
|
|
759
|
-
type: "object",
|
|
760
|
-
properties: {
|
|
761
|
-
role: {
|
|
762
|
-
description: "Allowed user types for this API\n\nSpecifies which user types are permitted to access this API.\n\nThis is not a permission level or access control role. Instead, it\ndescribes **who** the user is \u2014 their type within the service's domain\nmodel. It must correspond 1:1 with how the user is represented in the\ndatabase.\n\nExamples:\n\n- \"buyer\": a customer who makes purchases\n- \"seller\": a vendor who offers products\n- \"moderator\": a content reviewer or manager\n\n\u26A0\uFE0F Important: Each `role` must **exactly match a table name defined in\nthe database schema**. This is not merely a convention or example \u2014 it is\na strict requirement.\n\nA valid role must meet the following criteria:\n\n- It must uniquely map to a user group at the database level, represented\n by a dedicated table.\n- It must not overlap semantically with other roles \u2014 for instance, both\n `admin` and `administrator` must not exist to describe the same type.\n\nTherefore, if a user type cannot be clearly and uniquely distinguished in\nthe database, It **cannot** be used as a valid `role` here.",
|
|
763
|
-
type: "array",
|
|
764
|
-
items: {
|
|
765
|
-
type: "string"
|
|
766
|
-
}
|
|
767
|
-
},
|
|
768
|
-
type: {
|
|
769
|
-
description: "Authentication method type\n\nCurrently only `\"bearer\"` is supported, which uses a Bearer token in the\nHTTP Authorization header.",
|
|
770
|
-
"const": "Bearer"
|
|
771
|
-
}
|
|
772
|
-
},
|
|
773
|
-
required: [
|
|
774
|
-
"role",
|
|
775
|
-
"type"
|
|
776
|
-
]
|
|
777
769
|
}
|
|
778
770
|
}
|
|
779
771
|
},
|
|
780
772
|
description: "Generate detailed API operations from path/method combinations.\n\nThis function creates complete API operations following REST principles and\nquality standards. Each generated operation includes specification, path,\nmethod, detailed multi-paragraph description, concise summary, parameters,\nand appropriate request/response bodies.\n\nThe function processes as many operations as possible in a single call,\nwith progress tracking to ensure iterative completion of all required\nendpoints.",
|
|
781
|
-
validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.
|
|
773
|
+
validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorizationRoles || Array.isArray(input.authorizationRoles) && (__typia_transform__isUniqueItems._isUniqueItems(input.authorizationRoles) && input.authorizationRoles.every(elem => "string" === typeof elem))) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
782
774
|
if ("number" === input.type)
|
|
783
775
|
return _io4(input);
|
|
784
776
|
else if ("integer" === input.type)
|
|
@@ -847,14 +839,22 @@ const claude = {
|
|
|
847
839
|
path: _path + ".responseBody",
|
|
848
840
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
849
841
|
value: input.responseBody
|
|
850
|
-
}), null === input.
|
|
851
|
-
path: _path + ".
|
|
852
|
-
expected: "(
|
|
853
|
-
value: input.
|
|
854
|
-
})) &&
|
|
855
|
-
path: _path + ".
|
|
856
|
-
expected: "
|
|
857
|
-
value: input.
|
|
842
|
+
}), null === input.authorizationRoles || (Array.isArray(input.authorizationRoles) || _report(_exceptionable, {
|
|
843
|
+
path: _path + ".authorizationRoles",
|
|
844
|
+
expected: "((Array<string> & UniqueItems<true>) | null)",
|
|
845
|
+
value: input.authorizationRoles
|
|
846
|
+
})) && ((__typia_transform__isUniqueItems._isUniqueItems(input.authorizationRoles) || _report(_exceptionable, {
|
|
847
|
+
path: _path + ".authorizationRoles",
|
|
848
|
+
expected: "Array<> & UniqueItems<true>",
|
|
849
|
+
value: input.authorizationRoles
|
|
850
|
+
})) && input.authorizationRoles.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
|
|
851
|
+
path: _path + ".authorizationRoles[" + _index6 + "]",
|
|
852
|
+
expected: "string",
|
|
853
|
+
value: elem
|
|
854
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
855
|
+
path: _path + ".authorizationRoles",
|
|
856
|
+
expected: "((Array<string> & UniqueItems<true>) | null)",
|
|
857
|
+
value: input.authorizationRoles
|
|
858
858
|
}), "string" === typeof input.path || _report(_exceptionable, {
|
|
859
859
|
path: _path + ".path",
|
|
860
860
|
expected: "string",
|
|
@@ -995,22 +995,6 @@ const claude = {
|
|
|
995
995
|
path: _path + ".typeName",
|
|
996
996
|
expected: "string",
|
|
997
997
|
value: input.typeName
|
|
998
|
-
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.role) || _report(_exceptionable, {
|
|
999
|
-
path: _path + ".role",
|
|
1000
|
-
expected: "Array<string>",
|
|
1001
|
-
value: input.role
|
|
1002
|
-
})) && input.role.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
|
|
1003
|
-
path: _path + ".role[" + _index6 + "]",
|
|
1004
|
-
expected: "string",
|
|
1005
|
-
value: elem
|
|
1006
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1007
|
-
path: _path + ".role",
|
|
1008
|
-
expected: "Array<string>",
|
|
1009
|
-
value: input.role
|
|
1010
|
-
}), "Bearer" === input.type || _report(_exceptionable, {
|
|
1011
|
-
path: _path + ".type",
|
|
1012
|
-
expected: "\"Bearer\"",
|
|
1013
|
-
value: input.type
|
|
1014
998
|
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1015
999
|
if ("number" === input.type)
|
|
1016
1000
|
return _vo4(input, _path, true && _exceptionable);
|
|
@@ -1128,22 +1112,20 @@ const collection = {
|
|
|
1128
1112
|
}
|
|
1129
1113
|
]
|
|
1130
1114
|
},
|
|
1131
|
-
|
|
1132
|
-
description: "
|
|
1115
|
+
authorizationRoles: {
|
|
1116
|
+
description: "List of roles that are allowed to access the API operation.\n\nIf the API operation is not restricted to any role, this field must be\n`null`.\n\nIf the API operation is restricted to some roles, this field must be an\narray of role names.",
|
|
1133
1117
|
anyOf: [
|
|
1134
1118
|
{
|
|
1135
1119
|
type: "null"
|
|
1136
1120
|
},
|
|
1137
1121
|
{
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
mapping: {
|
|
1144
|
-
Bearer: "#/$defs/AutoBeOpenApi.IAuthorization"
|
|
1122
|
+
type: "array",
|
|
1123
|
+
items: {
|
|
1124
|
+
type: "string"
|
|
1125
|
+
},
|
|
1126
|
+
description: "@uniqueItems"
|
|
1145
1127
|
}
|
|
1146
|
-
|
|
1128
|
+
]
|
|
1147
1129
|
},
|
|
1148
1130
|
path: {
|
|
1149
1131
|
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
|
|
@@ -1168,6 +1150,7 @@ const collection = {
|
|
|
1168
1150
|
"parameters",
|
|
1169
1151
|
"requestBody",
|
|
1170
1152
|
"responseBody",
|
|
1153
|
+
"authorizationRoles",
|
|
1171
1154
|
"path",
|
|
1172
1155
|
"method"
|
|
1173
1156
|
]
|
|
@@ -1356,35 +1339,11 @@ const collection = {
|
|
|
1356
1339
|
"description",
|
|
1357
1340
|
"typeName"
|
|
1358
1341
|
]
|
|
1359
|
-
},
|
|
1360
|
-
"AutoBeOpenApi.IAuthorization": {
|
|
1361
|
-
description: "Authorization - Authentication and user type information\n\nThis field defines how the API authenticates the request and restricts\naccess to specific user types.\n\n\u2705 Only the `Authorization` HTTP header is used for authentication. The\nexpected format is:\n\nAuthorization: Bearer <access_token>\n\nThe token must be a bearer token (e.g., JWT or similar), and when parsed,\nit is guaranteed to include at least the authenticated actor's `id` field.\nNo other headers or cookie-based authentication methods are supported.",
|
|
1362
|
-
type: "object",
|
|
1363
|
-
properties: {
|
|
1364
|
-
role: {
|
|
1365
|
-
description: "Allowed user types for this API\n\nSpecifies which user types are permitted to access this API.\n\nThis is not a permission level or access control role. Instead, it\ndescribes **who** the user is \u2014 their type within the service's domain\nmodel. It must correspond 1:1 with how the user is represented in the\ndatabase.\n\nExamples:\n\n- \"buyer\": a customer who makes purchases\n- \"seller\": a vendor who offers products\n- \"moderator\": a content reviewer or manager\n\n\u26A0\uFE0F Important: Each `role` must **exactly match a table name defined in\nthe database schema**. This is not merely a convention or example \u2014 it is\na strict requirement.\n\nA valid role must meet the following criteria:\n\n- It must uniquely map to a user group at the database level, represented\n by a dedicated table.\n- It must not overlap semantically with other roles \u2014 for instance, both\n `admin` and `administrator` must not exist to describe the same type.\n\nTherefore, if a user type cannot be clearly and uniquely distinguished in\nthe database, It **cannot** be used as a valid `role` here.",
|
|
1366
|
-
type: "array",
|
|
1367
|
-
items: {
|
|
1368
|
-
type: "string"
|
|
1369
|
-
}
|
|
1370
|
-
},
|
|
1371
|
-
type: {
|
|
1372
|
-
description: "Authentication method type\n\nCurrently only `\"bearer\"` is supported, which uses a Bearer token in the\nHTTP Authorization header.",
|
|
1373
|
-
type: "string",
|
|
1374
|
-
"enum": [
|
|
1375
|
-
"Bearer"
|
|
1376
|
-
]
|
|
1377
|
-
}
|
|
1378
|
-
},
|
|
1379
|
-
required: [
|
|
1380
|
-
"role",
|
|
1381
|
-
"type"
|
|
1382
|
-
]
|
|
1383
1342
|
}
|
|
1384
1343
|
}
|
|
1385
1344
|
},
|
|
1386
1345
|
description: "Generate detailed API operations from path/method combinations.\n\nThis function creates complete API operations following REST principles and\nquality standards. Each generated operation includes specification, path,\nmethod, detailed multi-paragraph description, concise summary, parameters,\nand appropriate request/response bodies.\n\nThe function processes as many operations as possible in a single call,\nwith progress tracking to ensure iterative completion of all required\nendpoints.",
|
|
1387
|
-
validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.
|
|
1346
|
+
validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorizationRoles || Array.isArray(input.authorizationRoles) && (__typia_transform__isUniqueItems._isUniqueItems(input.authorizationRoles) && input.authorizationRoles.every(elem => "string" === typeof elem))) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
1388
1347
|
if ("number" === input.type)
|
|
1389
1348
|
return _io4(input);
|
|
1390
1349
|
else if ("integer" === input.type)
|
|
@@ -1453,14 +1412,22 @@ const collection = {
|
|
|
1453
1412
|
path: _path + ".responseBody",
|
|
1454
1413
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1455
1414
|
value: input.responseBody
|
|
1456
|
-
}), null === input.
|
|
1457
|
-
path: _path + ".
|
|
1458
|
-
expected: "(
|
|
1459
|
-
value: input.
|
|
1460
|
-
})) &&
|
|
1461
|
-
path: _path + ".
|
|
1462
|
-
expected: "
|
|
1463
|
-
value: input.
|
|
1415
|
+
}), null === input.authorizationRoles || (Array.isArray(input.authorizationRoles) || _report(_exceptionable, {
|
|
1416
|
+
path: _path + ".authorizationRoles",
|
|
1417
|
+
expected: "((Array<string> & UniqueItems<true>) | null)",
|
|
1418
|
+
value: input.authorizationRoles
|
|
1419
|
+
})) && ((__typia_transform__isUniqueItems._isUniqueItems(input.authorizationRoles) || _report(_exceptionable, {
|
|
1420
|
+
path: _path + ".authorizationRoles",
|
|
1421
|
+
expected: "Array<> & UniqueItems<true>",
|
|
1422
|
+
value: input.authorizationRoles
|
|
1423
|
+
})) && input.authorizationRoles.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
|
|
1424
|
+
path: _path + ".authorizationRoles[" + _index6 + "]",
|
|
1425
|
+
expected: "string",
|
|
1426
|
+
value: elem
|
|
1427
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1428
|
+
path: _path + ".authorizationRoles",
|
|
1429
|
+
expected: "((Array<string> & UniqueItems<true>) | null)",
|
|
1430
|
+
value: input.authorizationRoles
|
|
1464
1431
|
}), "string" === typeof input.path || _report(_exceptionable, {
|
|
1465
1432
|
path: _path + ".path",
|
|
1466
1433
|
expected: "string",
|
|
@@ -1601,22 +1568,6 @@ const collection = {
|
|
|
1601
1568
|
path: _path + ".typeName",
|
|
1602
1569
|
expected: "string",
|
|
1603
1570
|
value: input.typeName
|
|
1604
|
-
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.role) || _report(_exceptionable, {
|
|
1605
|
-
path: _path + ".role",
|
|
1606
|
-
expected: "Array<string>",
|
|
1607
|
-
value: input.role
|
|
1608
|
-
})) && input.role.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
|
|
1609
|
-
path: _path + ".role[" + _index6 + "]",
|
|
1610
|
-
expected: "string",
|
|
1611
|
-
value: elem
|
|
1612
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1613
|
-
path: _path + ".role",
|
|
1614
|
-
expected: "Array<string>",
|
|
1615
|
-
value: input.role
|
|
1616
|
-
}), "Bearer" === input.type || _report(_exceptionable, {
|
|
1617
|
-
path: _path + ".type",
|
|
1618
|
-
expected: "\"Bearer\"",
|
|
1619
|
-
value: input.type
|
|
1620
1571
|
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1621
1572
|
if ("number" === input.type)
|
|
1622
1573
|
return _vo4(input, _path, true && _exceptionable);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceOperations.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceOperations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wEAkCC
|
|
1
|
+
{"version":3,"file":"orchestrateInterfaceOperations.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceOperations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wEAkCC;;;AAjDD,yCAAoE;AAGpE,+BAAkD;AAClD,kDAA0B;AAI1B,uEAAoE;AACpE,yDAAsD;AACtD,iEAA8D;AAC9D,uDAAoD;AACpD,2EAAwE;AACxE,+EAA4E;AAE5E,SAAsB,8BAA8B;yDAGlD,GAAyB,EACzB,SAAoC,EACpC,WAAmB,EAAE;QAErB,MAAM,MAAM,GAAgC,IAAA,yBAAW,EAAC;YACtD,KAAK,EAAE,SAAS;YAChB,QAAQ;SACT,CAAC,CAAC;QACH,IAAI,SAAS,GAAW,CAAC,CAAC;QAC1B,MAAM,UAAU,GAAiC,MAAM,OAAO,CAAC,GAAG,CAChE,MAAM,CAAC,GAAG,CAAC,CAAO,EAAE,EAAE,EAAE;;YACtB,MAAM,GAAG,GAA+B,MAAM,gBAAgB,CAC5D,GAAG,EACH,EAAE,EACF,CAAC,EACD,CAAC,KAAK,EAAE,EAAE;gBACR,SAAS,IAAI,KAAK,CAAC;YACrB,CAAC,CACF,CAAC;YACF,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,qBAAqB;gBAC3B,UAAU,EAAE,GAAG;gBACf,SAAS;gBACT,KAAK,EAAE,SAAS,CAAC,MAAM;gBACvB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;gBACpC,UAAU,EAAE,IA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
|
|
@@ -13,7 +13,7 @@ exports.orchestratePrisma = void 0;
|
|
|
13
13
|
const uuid_1 = require("uuid");
|
|
14
14
|
const orchestratePrismaComponent_1 = require("./orchestratePrismaComponent");
|
|
15
15
|
const orchestratePrismaCorrect_1 = require("./orchestratePrismaCorrect");
|
|
16
|
-
const
|
|
16
|
+
const orchestratePrismaSchemas_1 = require("./orchestratePrismaSchemas");
|
|
17
17
|
const orchestratePrisma = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
18
|
var _a, _b, _c, _d, _e, _f;
|
|
19
19
|
const start = new Date();
|
|
@@ -32,12 +32,16 @@ const orchestratePrisma = (ctx) => (props) => __awaiter(void 0, void 0, void 0,
|
|
|
32
32
|
}
|
|
33
33
|
else
|
|
34
34
|
ctx.dispatch(components);
|
|
35
|
-
//
|
|
36
|
-
const events = yield (0,
|
|
35
|
+
// CONSTRUCT AST DATA
|
|
36
|
+
const events = yield (0, orchestratePrismaSchemas_1.orchestratePrismaSchemas)(ctx, components.components);
|
|
37
|
+
// VALIDATE
|
|
37
38
|
const result = yield (0, orchestratePrismaCorrect_1.orchestratePrismaCorrect)(ctx, {
|
|
38
39
|
files: events.map((e) => e.file),
|
|
39
40
|
});
|
|
40
|
-
|
|
41
|
+
// COMPILE
|
|
42
|
+
const compiler = yield ctx.compiler();
|
|
43
|
+
const schemas = yield compiler.prisma.write(result.data, "postgres");
|
|
44
|
+
// PROPAGATE
|
|
41
45
|
const history = {
|
|
42
46
|
type: "prisma",
|
|
43
47
|
id: (0, uuid_1.v4)(),
|
|
@@ -47,7 +51,7 @@ const orchestratePrisma = (ctx) => (props) => __awaiter(void 0, void 0, void 0,
|
|
|
47
51
|
description: "",
|
|
48
52
|
result: result,
|
|
49
53
|
schemas,
|
|
50
|
-
compiled: yield
|
|
54
|
+
compiled: yield compiler.prisma.compile({
|
|
51
55
|
files: schemas,
|
|
52
56
|
}),
|
|
53
57
|
step: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestratePrisma.js","sourceRoot":"","sources":["../../../src/orchestrate/prisma/orchestratePrisma.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestratePrisma.js","sourceRoot":"","sources":["../../../src/orchestrate/prisma/orchestratePrisma.ts"],"names":[],"mappings":";;;;;;;;;;;;AAUA,+BAA0B;AAI1B,6EAA2E;AAC3E,yEAAsE;AACtE,yEAAsE;AAE/D,MAAM,iBAAiB,GAC5B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACgC,EAAE;;IAChE,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;IAC/B,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,aAAa;QACnB,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE;QAC/B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;KACrC,CAAC,CAAC;IAEH,aA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