@dbos-inc/dbos-sdk 0.9.16-preview → 0.9.25
Sign up to get free protection for your applications and to get access to all the features.
- package/dbos-config.schema.json +3 -6
- package/dbos-test-config.yaml +2 -2
- package/dist/src/dbos-executor.d.ts +1 -2
- package/dist/src/dbos-executor.d.ts.map +1 -1
- package/dist/src/dbos-executor.js.map +1 -1
- package/dist/src/dbos-runtime/config.d.ts +2 -3
- package/dist/src/dbos-runtime/config.d.ts.map +1 -1
- package/dist/src/dbos-runtime/config.js +5 -3
- package/dist/src/dbos-runtime/config.js.map +1 -1
- package/dist/src/dbos-runtime/migrate.js +8 -8
- package/dist/src/dbos-runtime/migrate.js.map +1 -1
- package/dist/src/testing/testing_runtime.d.ts +2 -0
- package/dist/src/testing/testing_runtime.d.ts.map +1 -1
- package/dist/src/testing/testing_runtime.js +4 -1
- package/dist/src/testing/testing_runtime.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/examples/hello/dbos-config.yaml +2 -2
- package/package.json +1 -1
- package/dist/packages/communicator-bcrypt/index.d.ts +0 -8
- package/dist/packages/communicator-bcrypt/index.d.ts.map +0 -1
- package/dist/packages/communicator-bcrypt/index.js +0 -43
- package/dist/packages/communicator-bcrypt/index.js.map +0 -1
- package/dist/packages/communicator-datetime/index.d.ts +0 -7
- package/dist/packages/communicator-datetime/index.d.ts.map +0 -1
- package/dist/packages/communicator-datetime/index.js +0 -35
- package/dist/packages/communicator-datetime/index.js.map +0 -1
- package/dist/packages/communicator-random/index.d.ts +0 -6
- package/dist/packages/communicator-random/index.d.ts.map +0 -1
- package/dist/packages/communicator-random/index.js +0 -26
- package/dist/packages/communicator-random/index.js.map +0 -1
- package/dist/packages/dbos-cloud/applications/delete-app.d.ts +0 -2
- package/dist/packages/dbos-cloud/applications/delete-app.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/applications/delete-app.js +0 -42
- package/dist/packages/dbos-cloud/applications/delete-app.js.map +0 -1
- package/dist/packages/dbos-cloud/applications/deploy-app-code.d.ts +0 -2
- package/dist/packages/dbos-cloud/applications/deploy-app-code.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/applications/deploy-app-code.js +0 -160
- package/dist/packages/dbos-cloud/applications/deploy-app-code.js.map +0 -1
- package/dist/packages/dbos-cloud/applications/get-app-info.d.ts +0 -2
- package/dist/packages/dbos-cloud/applications/get-app-info.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/applications/get-app-info.js +0 -54
- package/dist/packages/dbos-cloud/applications/get-app-info.js.map +0 -1
- package/dist/packages/dbos-cloud/applications/get-app-logs.d.ts +0 -2
- package/dist/packages/dbos-cloud/applications/get-app-logs.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/applications/get-app-logs.js +0 -53
- package/dist/packages/dbos-cloud/applications/get-app-logs.js.map +0 -1
- package/dist/packages/dbos-cloud/applications/index.d.ts +0 -7
- package/dist/packages/dbos-cloud/applications/index.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/applications/index.js +0 -16
- package/dist/packages/dbos-cloud/applications/index.js.map +0 -1
- package/dist/packages/dbos-cloud/applications/list-apps.d.ts +0 -2
- package/dist/packages/dbos-cloud/applications/list-apps.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/applications/list-apps.js +0 -54
- package/dist/packages/dbos-cloud/applications/list-apps.js.map +0 -1
- package/dist/packages/dbos-cloud/applications/register-app.d.ts +0 -2
- package/dist/packages/dbos-cloud/applications/register-app.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/applications/register-app.js +0 -47
- package/dist/packages/dbos-cloud/applications/register-app.js.map +0 -1
- package/dist/packages/dbos-cloud/applications/types.d.ts +0 -9
- package/dist/packages/dbos-cloud/applications/types.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/applications/types.js +0 -3
- package/dist/packages/dbos-cloud/applications/types.js.map +0 -1
- package/dist/packages/dbos-cloud/applications/update-app.d.ts +0 -2
- package/dist/packages/dbos-cloud/applications/update-app.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/applications/update-app.js +0 -46
- package/dist/packages/dbos-cloud/applications/update-app.js.map +0 -1
- package/dist/packages/dbos-cloud/cli.d.ts +0 -3
- package/dist/packages/dbos-cloud/cli.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/cli.js +0 -138
- package/dist/packages/dbos-cloud/cli.js.map +0 -1
- package/dist/packages/dbos-cloud/cloudutils.d.ts +0 -27
- package/dist/packages/dbos-cloud/cloudutils.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/cloudutils.js +0 -121
- package/dist/packages/dbos-cloud/cloudutils.js.map +0 -1
- package/dist/packages/dbos-cloud/login.d.ts +0 -2
- package/dist/packages/dbos-cloud/login.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/login.js +0 -103
- package/dist/packages/dbos-cloud/login.js.map +0 -1
- package/dist/packages/dbos-cloud/register.d.ts +0 -2
- package/dist/packages/dbos-cloud/register.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/register.js +0 -69
- package/dist/packages/dbos-cloud/register.js.map +0 -1
- package/dist/packages/dbos-cloud/userdb.d.ts +0 -13
- package/dist/packages/dbos-cloud/userdb.d.ts.map +0 -1
- package/dist/packages/dbos-cloud/userdb.js +0 -153
- package/dist/packages/dbos-cloud/userdb.js.map +0 -1
- package/dist/packages/dbos-openapi/TypeParser.d.ts +0 -36
- package/dist/packages/dbos-openapi/TypeParser.d.ts.map +0 -1
- package/dist/packages/dbos-openapi/TypeParser.js +0 -162
- package/dist/packages/dbos-openapi/TypeParser.js.map +0 -1
- package/dist/packages/dbos-openapi/cli.d.ts +0 -3
- package/dist/packages/dbos-openapi/cli.d.ts.map +0 -1
- package/dist/packages/dbos-openapi/cli.js +0 -32
- package/dist/packages/dbos-openapi/cli.js.map +0 -1
- package/dist/packages/dbos-openapi/openApi.d.ts +0 -36
- package/dist/packages/dbos-openapi/openApi.d.ts.map +0 -1
- package/dist/packages/dbos-openapi/openApi.js +0 -566
- package/dist/packages/dbos-openapi/openApi.js.map +0 -1
- package/dist/packages/dbos-openapi/tests/makeProgram.d.ts +0 -3
- package/dist/packages/dbos-openapi/tests/makeProgram.d.ts.map +0 -1
- package/dist/packages/dbos-openapi/tests/makeProgram.js +0 -71
- package/dist/packages/dbos-openapi/tests/makeProgram.js.map +0 -1
- package/dist/packages/dbos-openapi/tests/openapi.test.d.ts +0 -2
- package/dist/packages/dbos-openapi/tests/openapi.test.d.ts.map +0 -1
- package/dist/packages/dbos-openapi/tests/openapi.test.js +0 -373
- package/dist/packages/dbos-openapi/tests/openapi.test.js.map +0 -1
- package/dist/packages/dbos-openapi/tsDiagUtil.d.ts +0 -16
- package/dist/packages/dbos-openapi/tsDiagUtil.d.ts.map +0 -1
- package/dist/packages/dbos-openapi/tsDiagUtil.js +0 -72
- package/dist/packages/dbos-openapi/tsDiagUtil.js.map +0 -1
@@ -1,566 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.generateOpenApi = exports.OpenApiGenerator = void 0;
|
7
|
-
const typescript_1 = __importDefault(require("typescript"));
|
8
|
-
const TypeParser_1 = require("./TypeParser");
|
9
|
-
const handlerTypes_1 = require("../../src/httpServer/handlerTypes");
|
10
|
-
const handlerTypes_2 = require("../../src/httpServer/handlerTypes");
|
11
|
-
const ts_json_schema_generator_1 = require("ts-json-schema-generator");
|
12
|
-
const tsDiagUtil_1 = require("./tsDiagUtil");
|
13
|
-
function isValid(value) { return value !== undefined; }
|
14
|
-
// ts-json-schema-generator does not support BigInt, so OpenApiGenerator needs a custom type, formatter and parser for it
|
15
|
-
class BigIntType extends ts_json_schema_generator_1.PrimitiveType {
|
16
|
-
getId() { return "integer"; }
|
17
|
-
}
|
18
|
-
class BigIntKeywordParser {
|
19
|
-
supportsNode(node) {
|
20
|
-
return node.kind === typescript_1.default.SyntaxKind.BigIntKeyword;
|
21
|
-
}
|
22
|
-
createType(_node, _context, _reference) {
|
23
|
-
return new BigIntType();
|
24
|
-
}
|
25
|
-
}
|
26
|
-
class BigIntTypeFormatter {
|
27
|
-
supportsType(type) {
|
28
|
-
return type instanceof BigIntType;
|
29
|
-
}
|
30
|
-
getDefinition(_type) {
|
31
|
-
// Note, JSON Schema integer type is not constrained to a specific size, so it is a valid type for BigInt
|
32
|
-
return { type: "integer", description: "bigint" };
|
33
|
-
}
|
34
|
-
getChildren(_type) {
|
35
|
-
return [];
|
36
|
-
}
|
37
|
-
}
|
38
|
-
// type guard functions for ts.Type/TypeNode
|
39
|
-
function isNodeWithTypeArguments(node) {
|
40
|
-
return "typeArguments" in node;
|
41
|
-
}
|
42
|
-
function isObjectType(node) {
|
43
|
-
return !!(node.flags & typescript_1.default.TypeFlags.Object);
|
44
|
-
}
|
45
|
-
function isTypeReference(node) {
|
46
|
-
return isObjectType(node) && !!(node.objectFlags & typescript_1.default.ObjectFlags.Reference);
|
47
|
-
}
|
48
|
-
// workflow UUID header parameter info which is added to every generated endpoint
|
49
|
-
const workflowUuidParamName = "dbosWorkflowUUID";
|
50
|
-
const workflowUuidRef = { $ref: `#/components/parameters/${workflowUuidParamName}` };
|
51
|
-
const workflowUuidParam = [workflowUuidParamName, {
|
52
|
-
name: 'dbos-workflowuuid',
|
53
|
-
in: 'header',
|
54
|
-
required: false,
|
55
|
-
description: "Caller specified [workflow idempotency key](https://docs.dbos.dev/tutorials/idempotency-tutorial#setting-idempotency-keys)",
|
56
|
-
schema: { type: 'string' },
|
57
|
-
}];
|
58
|
-
class OpenApiGenerator {
|
59
|
-
program;
|
60
|
-
#checker;
|
61
|
-
#schemaGenerator;
|
62
|
-
#schemaMap = new Map();
|
63
|
-
#securitySchemeMap = new Map();
|
64
|
-
#diags = new tsDiagUtil_1.DiagnosticsCollector();
|
65
|
-
get diags() { return this.#diags.diags; }
|
66
|
-
constructor(program) {
|
67
|
-
this.program = program;
|
68
|
-
this.#checker = program.getTypeChecker();
|
69
|
-
const config = {
|
70
|
-
discriminatorType: 'open-api',
|
71
|
-
encodeRefs: false
|
72
|
-
};
|
73
|
-
const parser = (0, ts_json_schema_generator_1.createParser)(program, config, aug => aug.addNodeParser(new BigIntKeywordParser()));
|
74
|
-
const formatter = (0, ts_json_schema_generator_1.createFormatter)(config, (fmt) => fmt.addTypeFormatter(new BigIntTypeFormatter()));
|
75
|
-
this.#schemaGenerator = new ts_json_schema_generator_1.SchemaGenerator(program, parser, formatter, {});
|
76
|
-
}
|
77
|
-
generate(classes, title, version) {
|
78
|
-
const paths = new Array();
|
79
|
-
classes.forEach((cls, index) => {
|
80
|
-
// if the class name is not specified, manufacture a name using the class index as the prefix
|
81
|
-
// JS class identifiers cannot start with a digit but OpenApi security scheme names can
|
82
|
-
const securitySchemeName = cls.name ? `${cls.name}Auth` : `${index}ClassAuth`;
|
83
|
-
const securitySchemeDecorator = this.getDBOSDecorator(cls, 'OpenApiSecurityScheme');
|
84
|
-
const securityScheme = this.parseSecurityScheme(securitySchemeDecorator?.args[0]);
|
85
|
-
const defaultRoles = this.parseStringLiteralArray(this.getDBOSDecorator(cls, 'DefaultRequiredRole')?.args[0]) ?? [];
|
86
|
-
if (securityScheme) {
|
87
|
-
this.#securitySchemeMap.set(securitySchemeName, securityScheme);
|
88
|
-
}
|
89
|
-
for (const method of cls.methods) {
|
90
|
-
const http = this.getHttpInfo(method);
|
91
|
-
if (!http)
|
92
|
-
continue;
|
93
|
-
const path = this.generatePath(method, http, defaultRoles, securityScheme ? securitySchemeName : undefined);
|
94
|
-
if (path)
|
95
|
-
paths.push(path);
|
96
|
-
}
|
97
|
-
});
|
98
|
-
const openApi = {
|
99
|
-
openapi: "3.0.3", // https://spec.openapis.org/oas/v3.0.3
|
100
|
-
info: { title, version },
|
101
|
-
paths: Object.fromEntries(paths),
|
102
|
-
components: {
|
103
|
-
parameters: Object.fromEntries([workflowUuidParam]),
|
104
|
-
schemas: Object.fromEntries(this.#schemaMap),
|
105
|
-
securitySchemes: Object.fromEntries(this.#securitySchemeMap)
|
106
|
-
}
|
107
|
-
};
|
108
|
-
return (0, tsDiagUtil_1.diagResult)(openApi, this.diags);
|
109
|
-
}
|
110
|
-
generatePath(method, { verb, path }, defaultRoles, securityScheme) {
|
111
|
-
const sourcedParams = method.parameters
|
112
|
-
// The first parameter of a handle method must be an DBOSContext, which is not exposed via the API
|
113
|
-
.slice(1)
|
114
|
-
.map(p => [p, this.getParamSource(p, verb)]);
|
115
|
-
const parameters = this.generateParameters(sourcedParams);
|
116
|
-
// add optional parameter for workflow UUID header
|
117
|
-
parameters.push(workflowUuidRef);
|
118
|
-
const requestBody = this.generateRequestBody(sourcedParams);
|
119
|
-
const response = this.generateResponse(method);
|
120
|
-
if (!response)
|
121
|
-
return;
|
122
|
-
// if there is a security scheme specified, create a security requirement for it
|
123
|
-
// unless the method has no required roles
|
124
|
-
const security = new Array();
|
125
|
-
if (securityScheme) {
|
126
|
-
const roles = this.parseStringLiteralArray(this.getDBOSDecorator(method, 'RequiredRole')?.args[0]) ?? defaultRoles;
|
127
|
-
if (roles.length > 0) {
|
128
|
-
security.push({ [securityScheme]: [] });
|
129
|
-
}
|
130
|
-
}
|
131
|
-
const operation = {
|
132
|
-
operationId: method.name,
|
133
|
-
responses: Object.fromEntries([response]),
|
134
|
-
parameters,
|
135
|
-
requestBody,
|
136
|
-
security: security.length > 0 ? security : undefined,
|
137
|
-
};
|
138
|
-
// validate all path parameters have matching parameters with URL ArgSource
|
139
|
-
const pathParams = path.split('/')
|
140
|
-
.filter(p => p.startsWith(':'))
|
141
|
-
.map(p => p.substring(1));
|
142
|
-
for (const pathParam of pathParams) {
|
143
|
-
const param = sourcedParams.find(([parameter, _]) => parameter.name === pathParam);
|
144
|
-
if (!param) {
|
145
|
-
this.#diags.raise(`Missing path parameter ${pathParam} for ${method.name}`, method.node);
|
146
|
-
return;
|
147
|
-
}
|
148
|
-
if (param[1] !== handlerTypes_1.ArgSources.URL) {
|
149
|
-
this.#diags.raise(`Path parameter ${pathParam} must be a URL parameter: ${method.name}`, param[0].node);
|
150
|
-
return;
|
151
|
-
}
|
152
|
-
}
|
153
|
-
// OpenAPI indicates path parameters with curly braces, but DBOS uses colons
|
154
|
-
const $path = path.split('/')
|
155
|
-
.map(p => p.startsWith(':') ? `{${p.substring(1)}}` : p)
|
156
|
-
.join('/');
|
157
|
-
switch (verb) {
|
158
|
-
case handlerTypes_2.APITypes.GET: return [$path, { get: operation }];
|
159
|
-
case handlerTypes_2.APITypes.POST: return [$path, { post: operation }];
|
160
|
-
}
|
161
|
-
}
|
162
|
-
getMethodReturnType(node) {
|
163
|
-
// if the method has a declared return type, try to use that
|
164
|
-
if (node.type) {
|
165
|
-
if (!isNodeWithTypeArguments(node.type)) {
|
166
|
-
this.#diags.warn(`Unexpected type node kind ${typescript_1.default.SyntaxKind[node.type.kind]}`, node.type);
|
167
|
-
}
|
168
|
-
else {
|
169
|
-
// return type must be a Promise<T>, so take the first type argument
|
170
|
-
const typeArg = node.type.typeArguments?.[0];
|
171
|
-
if (typeArg)
|
172
|
-
return this.#checker.getTypeFromTypeNode(typeArg);
|
173
|
-
const printer = typescript_1.default.createPrinter();
|
174
|
-
const text = printer.printNode(typescript_1.default.EmitHint.Unspecified, node.type, node.getSourceFile());
|
175
|
-
this.#diags.warn(`Unexpected return type without at least one type argument ${text}`, node.type);
|
176
|
-
}
|
177
|
-
}
|
178
|
-
// if the return type is inferred or the Promise type argument could not be determined,
|
179
|
-
// infer the return type via the type checker
|
180
|
-
const signature = this.#checker.getSignatureFromDeclaration(node);
|
181
|
-
const returnType = signature?.getReturnType();
|
182
|
-
if (!returnType || !isTypeReference(returnType))
|
183
|
-
return undefined;
|
184
|
-
// again, return type must be a Promise<T>, so take the first type argument
|
185
|
-
return returnType.typeArguments?.[0];
|
186
|
-
}
|
187
|
-
generateResponse(method) {
|
188
|
-
const returnType = this.getMethodReturnType(method.node);
|
189
|
-
if (!returnType) {
|
190
|
-
this.#diags.raise(`Could not determine return type of ${method.name}`, method.node);
|
191
|
-
return;
|
192
|
-
}
|
193
|
-
if (returnType.flags & typescript_1.default.TypeFlags.VoidLike) {
|
194
|
-
return ["204", { description: "No Content" }];
|
195
|
-
}
|
196
|
-
const typeNode = this.#checker.typeToTypeNode(returnType, undefined, undefined);
|
197
|
-
if (!typeNode) {
|
198
|
-
this.#diags.warn(`Could not determine return type node of ${method.name}`, method.node);
|
199
|
-
}
|
200
|
-
return ["200", {
|
201
|
-
description: "Ok",
|
202
|
-
content: {
|
203
|
-
"application/json": {
|
204
|
-
schema: this.generateSchema(typeNode)
|
205
|
-
}
|
206
|
-
}
|
207
|
-
}];
|
208
|
-
}
|
209
|
-
generateParameters(sourcedParams) {
|
210
|
-
if (sourcedParams.length === 0)
|
211
|
-
return [];
|
212
|
-
return sourcedParams
|
213
|
-
// QUERY and URL parameters are specified in the Operation.parameters field
|
214
|
-
.filter(([_, source]) => source === handlerTypes_1.ArgSources.QUERY || source === handlerTypes_1.ArgSources.URL)
|
215
|
-
.map(([parameter, argSource]) => this.generateParameter(parameter, argSource))
|
216
|
-
.filter(isValid);
|
217
|
-
}
|
218
|
-
generateParameter(parameter, argSource) {
|
219
|
-
if (argSource === handlerTypes_1.ArgSources.BODY) {
|
220
|
-
this.#diags.raise(`BODY parameters must be specified in the Operation.requestBody field: ${parameter.name}`, parameter.node);
|
221
|
-
return;
|
222
|
-
}
|
223
|
-
if (argSource === handlerTypes_1.ArgSources.URL && !parameter.required) {
|
224
|
-
this.#diags.raise(`URL parameters must be required: ${parameter.name}`, parameter.node);
|
225
|
-
return;
|
226
|
-
}
|
227
|
-
const schema = this.generateSchema(parameter.node);
|
228
|
-
const name = this.getParamName(parameter);
|
229
|
-
const location = this.getLocation(parameter, argSource);
|
230
|
-
if (!name || !location)
|
231
|
-
return;
|
232
|
-
return {
|
233
|
-
name,
|
234
|
-
in: location,
|
235
|
-
required: parameter.required,
|
236
|
-
schema
|
237
|
-
};
|
238
|
-
}
|
239
|
-
getLocation(parameter, argSource) {
|
240
|
-
switch (argSource) {
|
241
|
-
case handlerTypes_1.ArgSources.QUERY: return 'query';
|
242
|
-
case handlerTypes_1.ArgSources.URL: return 'path';
|
243
|
-
default:
|
244
|
-
this.#diags.raise(`Unsupported Parameter ArgSource: ${argSource}`, parameter.node);
|
245
|
-
return;
|
246
|
-
}
|
247
|
-
}
|
248
|
-
generateRequestBody(sourcedParams) {
|
249
|
-
// BODY parameters are specified in the Operation.requestBody field
|
250
|
-
const parameters = sourcedParams
|
251
|
-
.filter(([_, source]) => source === handlerTypes_1.ArgSources.BODY)
|
252
|
-
.map(([parameter, _]) => [this.getParamName(parameter), parameter]);
|
253
|
-
if (parameters.length === 0)
|
254
|
-
return undefined;
|
255
|
-
const properties = parameters.map(([name, parameter]) => [name, this.generateSchema(parameter.node)]);
|
256
|
-
const schema = {
|
257
|
-
type: 'object',
|
258
|
-
properties: Object.fromEntries(properties),
|
259
|
-
required: parameters.filter(([_, parameter]) => parameter.required).map(([name, _]) => name),
|
260
|
-
};
|
261
|
-
return {
|
262
|
-
required: true,
|
263
|
-
content: {
|
264
|
-
"application/json": { schema }
|
265
|
-
}
|
266
|
-
};
|
267
|
-
}
|
268
|
-
generateSchema(node) {
|
269
|
-
if (!node)
|
270
|
-
return { description: "Undefined Node" };
|
271
|
-
const schema = this.#schemaGenerator.createSchemaFromNodes([node]);
|
272
|
-
if (!schema.$ref)
|
273
|
-
return { description: "No $ref" };
|
274
|
-
const slashIndex = schema.$ref.lastIndexOf('/');
|
275
|
-
if (slashIndex === -1)
|
276
|
-
return { description: `Invalid $ref ${schema.$ref}` };
|
277
|
-
const name = schema.$ref.substring(slashIndex + 1);
|
278
|
-
const defs = new Map(Object.entries(schema.definitions ?? {}));
|
279
|
-
if (defs.size === 0)
|
280
|
-
return { description: "No definitions" };
|
281
|
-
const def = defs.get(name);
|
282
|
-
if (!def)
|
283
|
-
return { description: `No definition ${name}` };
|
284
|
-
if (typeof def === 'boolean')
|
285
|
-
return { description: `Definition ${name} is a boolean` };
|
286
|
-
if (defs.size > 1) {
|
287
|
-
defs.delete(name);
|
288
|
-
for (const [$name, $def] of defs) {
|
289
|
-
if (typeof $def === 'boolean')
|
290
|
-
continue;
|
291
|
-
const $schema = this.mapSchema($def);
|
292
|
-
if ($schema)
|
293
|
-
this.#schemaMap.set($name, $schema);
|
294
|
-
}
|
295
|
-
}
|
296
|
-
return this.mapSchema(def);
|
297
|
-
}
|
298
|
-
getDBOSDecorator(decorated, name) {
|
299
|
-
const filtered = decorated.decorators.filter(d => d.module === '@dbos-inc/dbos-sdk' && d.name === name);
|
300
|
-
if (filtered.length === 0)
|
301
|
-
return undefined;
|
302
|
-
if (filtered.length > 1) {
|
303
|
-
this.#diags.raise(`Multiple ${JSON.stringify(name)} decorators found on ${decorated.name ?? "<unknown>"}`, decorated.node);
|
304
|
-
}
|
305
|
-
return filtered[0];
|
306
|
-
}
|
307
|
-
getHttpInfo(method) {
|
308
|
-
const getApiDecorator = this.getDBOSDecorator(method, 'GetApi');
|
309
|
-
const postApiDecorator = this.getDBOSDecorator(method, 'PostApi');
|
310
|
-
if (getApiDecorator && postApiDecorator) {
|
311
|
-
this.#diags.raise(`Method ${method.name} has both GetApi and PostApi decorators`);
|
312
|
-
return;
|
313
|
-
}
|
314
|
-
if (!getApiDecorator && !postApiDecorator)
|
315
|
-
return undefined;
|
316
|
-
const verb = getApiDecorator ? handlerTypes_2.APITypes.GET : handlerTypes_2.APITypes.POST;
|
317
|
-
const arg = getApiDecorator ? getApiDecorator.args[0] : postApiDecorator?.args[0];
|
318
|
-
if (!arg) {
|
319
|
-
this.#diags.raise(`Missing path argument for ${verb}Api decorator`, method.node);
|
320
|
-
return;
|
321
|
-
}
|
322
|
-
if (!typescript_1.default.isStringLiteral(arg)) {
|
323
|
-
this.#diags.raise(`Unexpected path argument type: ${typescript_1.default.SyntaxKind[arg.kind]}`, method.node);
|
324
|
-
return;
|
325
|
-
}
|
326
|
-
return { verb, path: arg.text };
|
327
|
-
}
|
328
|
-
getParamSource(parameter, verb) {
|
329
|
-
const argSource = this.getDBOSDecorator(parameter, 'ArgSource');
|
330
|
-
if (!argSource)
|
331
|
-
return getDefaultArgSource(verb);
|
332
|
-
if (!typescript_1.default.isPropertyAccessExpression(argSource.args[0])) {
|
333
|
-
this.#diags.raise(`Unexpected ArgSource argument type: ${typescript_1.default.SyntaxKind[argSource.args[0].kind]}`, parameter.node);
|
334
|
-
return;
|
335
|
-
}
|
336
|
-
switch (argSource.args[0].name.text) {
|
337
|
-
case "BODY": return handlerTypes_1.ArgSources.BODY;
|
338
|
-
case "QUERY": return handlerTypes_1.ArgSources.QUERY;
|
339
|
-
case "URL": return handlerTypes_1.ArgSources.URL;
|
340
|
-
case "DEFAULT": return getDefaultArgSource(verb);
|
341
|
-
default:
|
342
|
-
this.#diags.raise(`Unexpected ArgSource argument: ${argSource.args[0].name.text}`, parameter.node);
|
343
|
-
return;
|
344
|
-
}
|
345
|
-
function getDefaultArgSource(verb) {
|
346
|
-
switch (verb) {
|
347
|
-
case handlerTypes_2.APITypes.GET: return handlerTypes_1.ArgSources.QUERY;
|
348
|
-
case handlerTypes_2.APITypes.POST: return handlerTypes_1.ArgSources.BODY;
|
349
|
-
}
|
350
|
-
}
|
351
|
-
}
|
352
|
-
getParamName(parameter) {
|
353
|
-
const argName = this.getDBOSDecorator(parameter, 'ArgName');
|
354
|
-
if (!argName)
|
355
|
-
return parameter.name;
|
356
|
-
const nameParam = argName.args[0];
|
357
|
-
if (nameParam && typescript_1.default.isStringLiteral(nameParam))
|
358
|
-
return nameParam.text;
|
359
|
-
this.#diags.raise(`Unexpected ArgName argument type: ${typescript_1.default.SyntaxKind[nameParam.kind]}`, parameter.node);
|
360
|
-
}
|
361
|
-
mapSchema(schema) {
|
362
|
-
if (Array.isArray(schema.type)) {
|
363
|
-
this.#diags.raise(`OpenApi 3.0.x doesn't support type arrays: ${JSON.stringify(schema.type)}`);
|
364
|
-
return;
|
365
|
-
}
|
366
|
-
if (schema.$ref) {
|
367
|
-
const $ref = schema.$ref.replace("#/definitions/", "#/components/schemas/");
|
368
|
-
return { $ref };
|
369
|
-
}
|
370
|
-
const [maximum, exclusiveMaximum] = getMaxes();
|
371
|
-
const [minimum, exclusiveMinimum] = getMins();
|
372
|
-
const base = {
|
373
|
-
title: schema.title,
|
374
|
-
multipleOf: schema.multipleOf,
|
375
|
-
maximum,
|
376
|
-
exclusiveMaximum,
|
377
|
-
minimum,
|
378
|
-
exclusiveMinimum,
|
379
|
-
maxLength: schema.maxLength,
|
380
|
-
minLength: schema.minLength,
|
381
|
-
pattern: schema.pattern,
|
382
|
-
maxItems: schema.maxItems,
|
383
|
-
minItems: schema.minItems,
|
384
|
-
uniqueItems: schema.uniqueItems,
|
385
|
-
maxProperties: schema.maxProperties,
|
386
|
-
minProperties: schema.minProperties,
|
387
|
-
required: schema.required,
|
388
|
-
enum: schema.enum,
|
389
|
-
description: schema.description,
|
390
|
-
format: schema.format,
|
391
|
-
default: schema.default,
|
392
|
-
// OpenApi 3.0.x doesn't support boolean schema types, so filter those out when mapping these fields
|
393
|
-
allOf: schema.allOf?.filter(isSchema).map(s => this.mapSchema(s)).filter(isValid),
|
394
|
-
oneOf: schema.oneOf?.filter(isSchema).map(s => this.mapSchema(s)).filter(isValid),
|
395
|
-
anyOf: schema.anyOf?.filter(isSchema).map(s => this.mapSchema(s)).filter(isValid),
|
396
|
-
not: schema.not
|
397
|
-
? isSchema(schema.not) ? this.mapSchema(schema.not) : undefined
|
398
|
-
: undefined,
|
399
|
-
properties: schema.properties
|
400
|
-
? Object.fromEntries(Object.entries(schema.properties)
|
401
|
-
.filter((entry) => isSchema(entry[1]))
|
402
|
-
.map(([name, prop]) => [name, this.mapSchema(prop)])
|
403
|
-
.filter((entry) => isValid(entry[1])))
|
404
|
-
: undefined,
|
405
|
-
additionalProperties: typeof schema.additionalProperties === 'object'
|
406
|
-
? this.mapSchema(schema.additionalProperties)
|
407
|
-
: schema.additionalProperties,
|
408
|
-
};
|
409
|
-
if (schema.type === 'array') {
|
410
|
-
if (schema.items === undefined) {
|
411
|
-
this.#diags.raise(`Array schema has no items`);
|
412
|
-
return;
|
413
|
-
}
|
414
|
-
if (Array.isArray(schema.items)) {
|
415
|
-
this.#diags.raise(`OpenApi 3.0.x doesn't support array items arrays: ${JSON.stringify(schema.items)}`);
|
416
|
-
return;
|
417
|
-
}
|
418
|
-
if (typeof schema.items === 'boolean') {
|
419
|
-
this.#diags.raise(`OpenApi 3.0.x doesn't support array items booleans: ${JSON.stringify(schema.items)}`);
|
420
|
-
return;
|
421
|
-
}
|
422
|
-
return {
|
423
|
-
type: schema.type,
|
424
|
-
items: this.mapSchema(schema.items),
|
425
|
-
...base,
|
426
|
-
};
|
427
|
-
}
|
428
|
-
return {
|
429
|
-
// OpenApi 3.0.x doesn't support null type value, so map null type to undefined and add nullable: true property
|
430
|
-
type: schema.type === 'null' ? undefined : schema.type,
|
431
|
-
...base,
|
432
|
-
nullable: schema.type === 'null' ? true : undefined,
|
433
|
-
};
|
434
|
-
function isSchema(schema) {
|
435
|
-
return typeof schema === "object";
|
436
|
-
}
|
437
|
-
// Convert JSON Schema Draft 7 (used by ts-json-schema-generator) max/min and exclusive max/min values to JSON Schema Draft 5 (used by OpenAPI).
|
438
|
-
// In Draft 5, exclusive max/min values are booleans
|
439
|
-
// In Draft 7, exclusive max/min values are numbers
|
440
|
-
function getMaxes() {
|
441
|
-
const { maximum: max, exclusiveMaximum: xMax } = schema;
|
442
|
-
if (max) {
|
443
|
-
if (xMax) {
|
444
|
-
return (xMax < max) ? [xMax, true] : [max, false];
|
445
|
-
}
|
446
|
-
else {
|
447
|
-
return [max, false];
|
448
|
-
}
|
449
|
-
}
|
450
|
-
else {
|
451
|
-
return xMax ? [xMax, true] : [undefined, undefined];
|
452
|
-
}
|
453
|
-
}
|
454
|
-
function getMins() {
|
455
|
-
const { minimum: min, exclusiveMinimum: xMin } = schema;
|
456
|
-
if (min) {
|
457
|
-
if (xMin) {
|
458
|
-
return (xMin > min) ? [xMin, true] : [min, false];
|
459
|
-
}
|
460
|
-
else {
|
461
|
-
return [min, false];
|
462
|
-
}
|
463
|
-
}
|
464
|
-
else {
|
465
|
-
return xMin ? [xMin, true] : [undefined, undefined];
|
466
|
-
}
|
467
|
-
}
|
468
|
-
}
|
469
|
-
parseStringLiteralArray(node) {
|
470
|
-
if (!node)
|
471
|
-
return undefined;
|
472
|
-
if (!typescript_1.default.isArrayLiteralExpression(node)) {
|
473
|
-
this.#diags.raise(`Expected Array Literal node, received: ${typescript_1.default.SyntaxKind[node.kind]}`, node);
|
474
|
-
return;
|
475
|
-
}
|
476
|
-
const values = new Array();
|
477
|
-
for (const exp of node.elements) {
|
478
|
-
if (typescript_1.default.isStringLiteral(exp)) {
|
479
|
-
values.push(exp.getText());
|
480
|
-
}
|
481
|
-
else {
|
482
|
-
this.#diags.raise(`Expected String Literal node, received: ${typescript_1.default.SyntaxKind[exp.kind]}`, exp);
|
483
|
-
}
|
484
|
-
}
|
485
|
-
return values;
|
486
|
-
}
|
487
|
-
parseSecurityScheme(arg) {
|
488
|
-
if (!arg)
|
489
|
-
return undefined;
|
490
|
-
if (!typescript_1.default.isObjectLiteralExpression(arg)) {
|
491
|
-
this.#diags.raise(`Expected Object Literal node, received: ${typescript_1.default.SyntaxKind[arg.kind]}`, arg);
|
492
|
-
return undefined;
|
493
|
-
}
|
494
|
-
const map = new Map();
|
495
|
-
for (const prop of arg.properties) {
|
496
|
-
if (!typescript_1.default.isPropertyAssignment(prop)) {
|
497
|
-
this.#diags.raise(`Expected Property Assignment node, received: ${typescript_1.default.SyntaxKind[prop.kind]}`, prop);
|
498
|
-
continue;
|
499
|
-
}
|
500
|
-
if (!typescript_1.default.isStringLiteral(prop.initializer)) {
|
501
|
-
this.#diags.raise(`Expected String Literal node, received: ${typescript_1.default.SyntaxKind[prop.initializer.kind]}`, prop.initializer);
|
502
|
-
continue;
|
503
|
-
}
|
504
|
-
map.set(prop.name.getText(), prop.initializer.text);
|
505
|
-
}
|
506
|
-
const type = map.get("type");
|
507
|
-
const description = map.get("description");
|
508
|
-
if (!type) {
|
509
|
-
this.#diags.raise(`missing type property`, arg);
|
510
|
-
return;
|
511
|
-
}
|
512
|
-
if (type === 'http') {
|
513
|
-
const scheme = map.get("scheme");
|
514
|
-
if (!scheme) {
|
515
|
-
this.#diags.raise(`missing scheme property`, arg);
|
516
|
-
return;
|
517
|
-
}
|
518
|
-
const bearerFormat = map.get("bearerFormat");
|
519
|
-
return { type, scheme, bearerFormat, description };
|
520
|
-
}
|
521
|
-
if (type === 'apiKey') {
|
522
|
-
const name = map.get("name");
|
523
|
-
if (!name) {
|
524
|
-
this.#diags.raise(`missing name property`, arg);
|
525
|
-
return;
|
526
|
-
}
|
527
|
-
const $in = map.get("id");
|
528
|
-
if (!$in) {
|
529
|
-
this.#diags.raise(`missing in property`, arg);
|
530
|
-
return;
|
531
|
-
}
|
532
|
-
return { type, name, in: $in, description };
|
533
|
-
}
|
534
|
-
if (type === "openIdConnect") {
|
535
|
-
const openIdConnectUrl = map.get("openIdConnectUrl");
|
536
|
-
if (!openIdConnectUrl) {
|
537
|
-
this.#diags.raise(`missing openIdConnectUrl property`, arg);
|
538
|
-
return;
|
539
|
-
}
|
540
|
-
return { type, openIdConnectUrl, description };
|
541
|
-
}
|
542
|
-
if (type === 'oauth2') {
|
543
|
-
this.#diags.raise(`OAuth2 Security Scheme not supported`, arg);
|
544
|
-
}
|
545
|
-
else {
|
546
|
-
this.#diags.raise(`unrecognized Security Scheme type ${type}`, arg);
|
547
|
-
}
|
548
|
-
return;
|
549
|
-
}
|
550
|
-
}
|
551
|
-
exports.OpenApiGenerator = OpenApiGenerator;
|
552
|
-
async function generateOpenApi(entrypoint) {
|
553
|
-
const program = typescript_1.default.createProgram([entrypoint], {});
|
554
|
-
const parser = new TypeParser_1.TypeParser(program);
|
555
|
-
const classes = parser.parse();
|
556
|
-
(0, tsDiagUtil_1.logDiagnostics)(parser.diags);
|
557
|
-
if (!classes || classes.length === 0)
|
558
|
-
return undefined;
|
559
|
-
const { name, version } = await (0, TypeParser_1.findPackageInfo)([entrypoint]);
|
560
|
-
const generator = new OpenApiGenerator(program);
|
561
|
-
const openapi = generator.generate(classes, name, version);
|
562
|
-
(0, tsDiagUtil_1.logDiagnostics)(generator.diags);
|
563
|
-
return openapi;
|
564
|
-
}
|
565
|
-
exports.generateOpenApi = generateOpenApi;
|
566
|
-
//# sourceMappingURL=openApi.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"openApi.js","sourceRoot":"","sources":["../../../packages/dbos-openapi/openApi.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,6CAOsB;AAEtB,oEAA+D;AAC/D,oEAA6D;AAE7D,uEAakC;AAGlC,6CAAgF;AAEhF,SAAS,OAAO,CAAI,KAAoB,IAAgB,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC;AAIrF,yHAAyH;AACzH,MAAM,UAAW,SAAQ,wCAAa;IACpC,KAAK,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;CACtC;AAED,MAAM,mBAAmB;IACvB,YAAY,CAAC,IAAa;QACxB,OAAO,IAAI,CAAC,IAAI,KAAK,oBAAE,CAAC,UAAU,CAAC,aAAa,CAAC;IACnD,CAAC;IACD,UAAU,CAAC,KAAc,EAAE,QAAiB,EAAE,UAAsC;QAClF,OAAO,IAAI,UAAU,EAAE,CAAC;IAC1B,CAAC;CACF;AAED,MAAM,mBAAmB;IAChB,YAAY,CAAC,IAAgB;QAClC,OAAO,IAAI,YAAY,UAAU,CAAC;IACpC,CAAC;IACM,aAAa,CAAC,KAAiB;QACpC,yGAAyG;QACzG,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;IACpD,CAAC;IACM,WAAW,CAAC,KAAiB;QAClC,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAED,4CAA4C;AAC5C,SAAS,uBAAuB,CAAC,IAAiB;IAChD,O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