@workos/oagen 0.30.1 → 0.31.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/README.md +4 -12
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +3003 -664
- package/dist/cli/index.mjs.map +1 -1
- package/dist/compat/index.d.mts +85 -36
- package/dist/compat/index.d.mts.map +1 -1
- package/dist/compat/index.mjs +33 -23
- package/dist/compat/index.mjs.map +1 -1
- package/dist/{diff-DMFiDAI6.mjs → diff-CAsypxXV.mjs} +109 -89
- package/dist/{diff-DMFiDAI6.mjs.map → diff-CAsypxXV.mjs.map} +1 -1
- package/dist/differ-B0DSuKUZ.d.mts +72 -0
- package/dist/differ-B0DSuKUZ.d.mts.map +1 -0
- package/dist/index.d.mts +129 -61
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2992 -563
- package/dist/index.mjs.map +1 -1
- package/dist/{overlay-BhXruu32.mjs → overlay-Dj3WWlNP.mjs} +45 -38
- package/dist/overlay-Dj3WWlNP.mjs.map +1 -0
- package/dist/scripts/smoke/baseline.d.mts +1 -1
- package/dist/scripts/smoke/baseline.mjs +2848 -537
- package/dist/scripts/smoke/baseline.mjs.map +1 -1
- package/dist/scripts/smoke/sdk-test.d.mts +1 -1
- package/dist/scripts/smoke/sdk-test.mjs +4 -2
- package/dist/scripts/smoke/sdk-test.mjs.map +1 -1
- package/dist/smoke.d.mts +259 -36
- package/dist/smoke.d.mts.map +1 -1
- package/dist/smoke.mjs +2848 -537
- package/dist/smoke.mjs.map +1 -1
- package/dist/{tree-sitter-C6HB4OrC.mjs → tree-sitter-C7Hk-NDu.mjs} +36 -7
- package/dist/tree-sitter-C7Hk-NDu.mjs.map +1 -0
- package/dist/{types-yrBidOg3.d.mts → types-I7W7CNl1.d.mts} +227 -9
- package/dist/types-I7W7CNl1.d.mts.map +1 -0
- package/dist/verify/index.d.mts +7 -8
- package/dist/verify/index.d.mts.map +1 -1
- package/dist/verify/index.mjs +24 -14
- package/dist/verify/index.mjs.map +1 -1
- package/docs/architecture/emitter-contract.md +1 -0
- package/docs/architecture/ir-types.md +175 -17
- package/docs/cli.md +13 -13
- package/package.json +3 -3
- package/skills/check-emitter-parity/SKILL.md +15 -1
- package/dist/differ-DHldxZMr.d.mts +0 -123
- package/dist/differ-DHldxZMr.d.mts.map +0 -1
- package/dist/overlay-BhXruu32.mjs.map +0 -1
- package/dist/tree-sitter-C6HB4OrC.mjs.map +0 -1
- package/dist/types-yrBidOg3.d.mts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {}
|
|
@@ -15,7 +15,8 @@ import { execFileSync } from "node:child_process";
|
|
|
15
15
|
* The --lang flag is required and selects which SDK runner to use
|
|
16
16
|
* (e.g. "node" → scripts/smoke/sdk-node.ts).
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
18
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
19
|
+
const __dirname = dirname(__filename);
|
|
19
20
|
const args = process.argv.slice(2);
|
|
20
21
|
const langIdx = args.indexOf("--lang");
|
|
21
22
|
const forwardedArgs = [...args];
|
|
@@ -52,7 +53,8 @@ const diffArgs = [
|
|
|
52
53
|
const sdkPathIdx = forwardedArgs.indexOf("--sdk-path");
|
|
53
54
|
const sdkPathValue = sdkPathIdx !== -1 && forwardedArgs[sdkPathIdx + 1] ? forwardedArgs[sdkPathIdx + 1] : void 0;
|
|
54
55
|
if (sdkPathValue) {
|
|
55
|
-
|
|
56
|
+
const tsconfigPath = resolve(sdkPathValue, "tsconfig.json");
|
|
57
|
+
if (existsSync(tsconfigPath)) {
|
|
56
58
|
console.log(`\n${"=".repeat(60)}`);
|
|
57
59
|
console.log(`Type-checking SDK at ${sdkPathValue}`);
|
|
58
60
|
console.log("=".repeat(60));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-test.mjs","names":[],"sources":["../../../scripts/smoke/sdk-test.ts"],"sourcesContent":["/**\n * Runs an SDK smoke test + diff against an existing raw baseline.\n *\n * Usage:\n * npm run smoke -- --lang node --sdk-path path/to/acme-node\n * npm run smoke -- --lang ruby --sdk-path path/to/acme-ruby\n * npm run smoke -- --lang node --sdk-path path/to/acme-node --raw-results custom-baseline.json\n *\n * Requires OPENAPI_SPEC_PATH env var (or --spec <path>) pointing to the OpenAPI spec.\n * The --lang flag is required and selects which SDK runner to use\n * (e.g. \"node\" → scripts/smoke/sdk-node.ts).\n */\n\nimport { existsSync, writeFileSync } from 'node:fs';\nimport { execFileSync } from 'node:child_process';\nimport { resolve, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\nconst args = process.argv.slice(2);\n\n// Extract --lang <name> (required)\nconst langIdx = args.indexOf('--lang');\nconst forwardedArgs = [...args];\n\nif (langIdx === -1 || !args[langIdx + 1]) {\n console.error('--lang is required (e.g. --lang node, --lang ruby)');\n process.exit(1);\n}\n\nconst lang = args[langIdx + 1];\nforwardedArgs.splice(langIdx, 2);\n\n// Extract --raw-results <path>\nconst rawResultsIdx = forwardedArgs.indexOf('--raw-results');\nlet rawResultsPath = 'smoke-results-raw.json';\n\nif (rawResultsIdx !== -1 && forwardedArgs[rawResultsIdx + 1]) {\n rawResultsPath = forwardedArgs[rawResultsIdx + 1];\n forwardedArgs.splice(rawResultsIdx, 2);\n}\n\n// Resolve the SDK runner script relative to this file's directory\nconst sdkScript = resolve(__dirname, `sdk-${lang}.ts`);\nif (!existsSync(sdkScript)) {\n console.error(`No smoke runner found for language \"${lang}\" (expected ${sdkScript})`);\n console.error(`Available runners:`);\n const { readdirSync } = await import('node:fs');\n for (const f of readdirSync(__dirname)) {\n const match = f.match(/^sdk-(.+)\\.ts$/);\n if (match && match[1] !== 'test') {\n console.error(` --lang ${match[1]}`);\n }\n }\n process.exit(1);\n}\n\nconst sdkResultsPath = `smoke-results-sdk-${lang}.json`;\n\nconst diffArgs = ['--raw', rawResultsPath, '--sdk', sdkResultsPath];\n\n// Pre-flight: tsc compile check on SDK if tsconfig.json exists\nconst sdkPathIdx = forwardedArgs.indexOf('--sdk-path');\nconst sdkPathValue = sdkPathIdx !== -1 && forwardedArgs[sdkPathIdx + 1] ? forwardedArgs[sdkPathIdx + 1] : undefined;\n\nif (sdkPathValue) {\n const tsconfigPath = resolve(sdkPathValue, 'tsconfig.json');\n if (existsSync(tsconfigPath)) {\n console.log(`\\n${'='.repeat(60)}`);\n console.log(`Type-checking SDK at ${sdkPathValue}`);\n console.log('='.repeat(60));\n\n try {\n execFileSync('npx', ['tsc', '--noEmit', '--project', sdkPathValue], {\n stdio: 'pipe',\n env: process.env,\n });\n console.log(' Type check passed');\n } catch (err) {\n const output = (err as { stdout?: Buffer; stderr?: Buffer }).stdout?.toString() ?? '';\n const findings = parseTscOutput(output);\n writeFileSync('smoke-compile-errors.json', JSON.stringify(findings, null, 2));\n console.error(` Type check failed (${findings.length} errors). See smoke-compile-errors.json`);\n process.exit(2);\n }\n }\n}\n\nconst steps: [string, string[]][] = [\n [sdkScript, forwardedArgs],\n [resolve(__dirname, 'diff.ts'), diffArgs],\n];\n\nfor (const [script, scriptArgs] of steps) {\n console.log(`\\n${'='.repeat(60)}`);\n console.log(`Running ${script}`);\n console.log('='.repeat(60));\n\n try {\n execFileSync('npx', ['tsx', script, ...scriptArgs], {\n stdio: 'inherit',\n env: process.env,\n });\n } catch {\n process.exit(1);\n }\n}\n\nfunction parseTscOutput(output: string): Array<{ file: string; line: number; code: string; message: string }> {\n const errors: Array<{ file: string; line: number; code: string; message: string }> = [];\n const re = /^(.+)\\((\\d+),\\d+\\): error (TS\\d+): (.+)$/gm;\n let match;\n while ((match = re.exec(output)) !== null) {\n errors.push({\n file: match[1],\n line: Number(match[2]),\n code: match[3],\n message: match[4],\n });\n }\n return errors;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sdk-test.mjs","names":[],"sources":["../../../scripts/smoke/sdk-test.ts"],"sourcesContent":["/**\n * Runs an SDK smoke test + diff against an existing raw baseline.\n *\n * Usage:\n * npm run smoke -- --lang node --sdk-path path/to/acme-node\n * npm run smoke -- --lang ruby --sdk-path path/to/acme-ruby\n * npm run smoke -- --lang node --sdk-path path/to/acme-node --raw-results custom-baseline.json\n *\n * Requires OPENAPI_SPEC_PATH env var (or --spec <path>) pointing to the OpenAPI spec.\n * The --lang flag is required and selects which SDK runner to use\n * (e.g. \"node\" → scripts/smoke/sdk-node.ts).\n */\n\nimport { existsSync, writeFileSync } from 'node:fs';\nimport { execFileSync } from 'node:child_process';\nimport { resolve, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\nconst args = process.argv.slice(2);\n\n// Extract --lang <name> (required)\nconst langIdx = args.indexOf('--lang');\nconst forwardedArgs = [...args];\n\nif (langIdx === -1 || !args[langIdx + 1]) {\n console.error('--lang is required (e.g. --lang node, --lang ruby)');\n process.exit(1);\n}\n\nconst lang = args[langIdx + 1];\nforwardedArgs.splice(langIdx, 2);\n\n// Extract --raw-results <path>\nconst rawResultsIdx = forwardedArgs.indexOf('--raw-results');\nlet rawResultsPath = 'smoke-results-raw.json';\n\nif (rawResultsIdx !== -1 && forwardedArgs[rawResultsIdx + 1]) {\n rawResultsPath = forwardedArgs[rawResultsIdx + 1];\n forwardedArgs.splice(rawResultsIdx, 2);\n}\n\n// Resolve the SDK runner script relative to this file's directory\nconst sdkScript = resolve(__dirname, `sdk-${lang}.ts`);\nif (!existsSync(sdkScript)) {\n console.error(`No smoke runner found for language \"${lang}\" (expected ${sdkScript})`);\n console.error(`Available runners:`);\n const { readdirSync } = await import('node:fs');\n for (const f of readdirSync(__dirname)) {\n const match = f.match(/^sdk-(.+)\\.ts$/);\n if (match && match[1] !== 'test') {\n console.error(` --lang ${match[1]}`);\n }\n }\n process.exit(1);\n}\n\nconst sdkResultsPath = `smoke-results-sdk-${lang}.json`;\n\nconst diffArgs = ['--raw', rawResultsPath, '--sdk', sdkResultsPath];\n\n// Pre-flight: tsc compile check on SDK if tsconfig.json exists\nconst sdkPathIdx = forwardedArgs.indexOf('--sdk-path');\nconst sdkPathValue = sdkPathIdx !== -1 && forwardedArgs[sdkPathIdx + 1] ? forwardedArgs[sdkPathIdx + 1] : undefined;\n\nif (sdkPathValue) {\n const tsconfigPath = resolve(sdkPathValue, 'tsconfig.json');\n if (existsSync(tsconfigPath)) {\n console.log(`\\n${'='.repeat(60)}`);\n console.log(`Type-checking SDK at ${sdkPathValue}`);\n console.log('='.repeat(60));\n\n try {\n execFileSync('npx', ['tsc', '--noEmit', '--project', sdkPathValue], {\n stdio: 'pipe',\n env: process.env,\n });\n console.log(' Type check passed');\n } catch (err) {\n const output = (err as { stdout?: Buffer; stderr?: Buffer }).stdout?.toString() ?? '';\n const findings = parseTscOutput(output);\n writeFileSync('smoke-compile-errors.json', JSON.stringify(findings, null, 2));\n console.error(` Type check failed (${findings.length} errors). See smoke-compile-errors.json`);\n process.exit(2);\n }\n }\n}\n\nconst steps: [string, string[]][] = [\n [sdkScript, forwardedArgs],\n [resolve(__dirname, 'diff.ts'), diffArgs],\n];\n\nfor (const [script, scriptArgs] of steps) {\n console.log(`\\n${'='.repeat(60)}`);\n console.log(`Running ${script}`);\n console.log('='.repeat(60));\n\n try {\n execFileSync('npx', ['tsx', script, ...scriptArgs], {\n stdio: 'inherit',\n env: process.env,\n });\n } catch {\n process.exit(1);\n }\n}\n\nfunction parseTscOutput(output: string): Array<{ file: string; line: number; code: string; message: string }> {\n const errors: Array<{ file: string; line: number; code: string; message: string }> = [];\n const re = /^(.+)\\((\\d+),\\d+\\): error (TS\\d+): (.+)$/gm;\n let match;\n while ((match = re.exec(output)) !== null) {\n errors.push({\n file: match[1],\n line: Number(match[2]),\n code: match[3],\n message: match[4],\n });\n }\n return errors;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,MAAM,aAAa,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ts
|
|
2
3
|
/**
|
|
3
4
|
* SDK Behavior IR — language-agnostic runtime policies for generated SDKs.
|
|
@@ -126,8 +127,21 @@ interface SdkBehavior {
|
|
|
126
127
|
}
|
|
127
128
|
//#endregion
|
|
128
129
|
//#region src/ir/types.d.ts
|
|
129
|
-
/**
|
|
130
|
+
/**
|
|
131
|
+
* Authentication scheme extracted from OpenAPI `components.securitySchemes`.
|
|
132
|
+
*
|
|
133
|
+
* `schemeName` is the key under `components.securitySchemes`, spelled exactly as
|
|
134
|
+
* in the document. The requirements under `ApiSpec.security` and
|
|
135
|
+
* `Operation.security` refer to the same key, so emitters join a requirement to
|
|
136
|
+
* its scheme on that field. `description` is present only when the document
|
|
137
|
+
* declares one.
|
|
138
|
+
*/
|
|
130
139
|
type AuthScheme = {
|
|
140
|
+
description?: string;
|
|
141
|
+
schemeName: string;
|
|
142
|
+
} & ({
|
|
143
|
+
kind: 'basic';
|
|
144
|
+
} | {
|
|
131
145
|
kind: 'bearer';
|
|
132
146
|
} | {
|
|
133
147
|
kind: 'apiKey';
|
|
@@ -136,7 +150,7 @@ type AuthScheme = {
|
|
|
136
150
|
} | {
|
|
137
151
|
kind: 'oauth2';
|
|
138
152
|
flows: Record<string, unknown>;
|
|
139
|
-
};
|
|
153
|
+
});
|
|
140
154
|
/** Root IR node representing the full API surface */
|
|
141
155
|
/** A server entry from the OpenAPI servers array */
|
|
142
156
|
interface ServerEntry {
|
|
@@ -154,6 +168,12 @@ interface ApiSpec {
|
|
|
154
168
|
models: Model[];
|
|
155
169
|
enums: Enum[];
|
|
156
170
|
auth?: AuthScheme[];
|
|
171
|
+
/**
|
|
172
|
+
* Document-level security requirements: the default every operation uses
|
|
173
|
+
* unless it declares its own `Operation.security`. Same shape and semantics
|
|
174
|
+
* as that field. `undefined` when the document declares none.
|
|
175
|
+
*/
|
|
176
|
+
security?: SecurityRequirementSet[];
|
|
157
177
|
/** Language-agnostic runtime policies (retry, errors, telemetry, etc.). */
|
|
158
178
|
sdk: SdkBehavior;
|
|
159
179
|
}
|
|
@@ -163,32 +183,80 @@ interface Service {
|
|
|
163
183
|
description?: string;
|
|
164
184
|
operations: Operation[];
|
|
165
185
|
}
|
|
166
|
-
/**
|
|
167
|
-
/** Per-operation security requirement: scheme name → scope list. */
|
|
186
|
+
/** One scheme a request must satisfy, with the scopes it needs. */
|
|
168
187
|
interface SecurityRequirement {
|
|
188
|
+
/** Key under `components.securitySchemes`; joins to `AuthScheme.schemeName`. */
|
|
169
189
|
schemeName: string;
|
|
170
190
|
scopes: string[];
|
|
171
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* One alternative from an OpenAPI security requirement list: a request must
|
|
194
|
+
* satisfy *every* scheme in the set together ("all of"). A list of sets is
|
|
195
|
+
* satisfied by *any one* of them ("either of"). An empty set is an alternative
|
|
196
|
+
* that needs no credentials at all, which is how a document makes
|
|
197
|
+
* authentication optional (`security: [{ userToken: [] }, {}]`).
|
|
198
|
+
*/
|
|
199
|
+
type SecurityRequirementSet = SecurityRequirement[];
|
|
200
|
+
/** A single API operation (maps to an SDK method) */
|
|
172
201
|
interface Operation {
|
|
173
202
|
name: string;
|
|
203
|
+
/**
|
|
204
|
+
* The document's `summary` alone. Present only when the OpenAPI operation
|
|
205
|
+
* declares one with non-whitespace content; an empty or whitespace-only
|
|
206
|
+
* summary is treated as absent. Read this to use the summary as a one-line
|
|
207
|
+
* label; `description` below still carries the combined form, so emitters
|
|
208
|
+
* that only print `description` are unchanged.
|
|
209
|
+
*/
|
|
210
|
+
summary?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Doc text for the operation. When the document declares both a `summary`
|
|
213
|
+
* and a `description` with content, this is `summary + "\n\n" + description`;
|
|
214
|
+
* when only one has content (or both are identical), this is that one. An
|
|
215
|
+
* empty or whitespace-only value is treated as absent, and text with content
|
|
216
|
+
* is kept verbatim. The parts are not separable from this field alone — use
|
|
217
|
+
* `summary` for that.
|
|
218
|
+
*/
|
|
174
219
|
description?: string;
|
|
175
220
|
httpMethod: HttpMethod;
|
|
176
221
|
path: string;
|
|
177
222
|
pathParams: Parameter[];
|
|
178
223
|
queryParams: Parameter[];
|
|
224
|
+
/**
|
|
225
|
+
* Query parameters the spec also declares as request-body properties on a
|
|
226
|
+
* body-carrying method (POST/PUT/PATCH). They travel in the body only, so
|
|
227
|
+
* they are excluded from `queryParams`; they are kept here so inline enums
|
|
228
|
+
* they declare stay reachable and the compat surface still sees them.
|
|
229
|
+
* Emitters never serialize these to the URL.
|
|
230
|
+
*/
|
|
231
|
+
bodyOwnedQueryParams?: Parameter[];
|
|
179
232
|
headerParams: Parameter[];
|
|
180
233
|
cookieParams?: Parameter[];
|
|
181
234
|
requestBody?: TypeRef;
|
|
182
235
|
requestBodyEncoding?: 'json' | 'form-data' | 'form-urlencoded' | 'binary' | 'text';
|
|
183
236
|
response: TypeRef;
|
|
237
|
+
/**
|
|
238
|
+
* Headers the primary success response declares (the one `response` is the
|
|
239
|
+
* body of). Present only when the spec declares at least one. Each entry of
|
|
240
|
+
* `successResponses` carries its own `headers`, but that list only exists
|
|
241
|
+
* when an operation has more than one 2xx, so the primary response's headers
|
|
242
|
+
* need a home of their own.
|
|
243
|
+
*/
|
|
244
|
+
responseHeaders?: ResponseHeader[];
|
|
184
245
|
successResponses?: SuccessResponse[];
|
|
185
246
|
errors: ErrorResponse[];
|
|
186
247
|
pagination?: PaginationMeta;
|
|
187
248
|
injectIdempotencyKey: boolean;
|
|
188
249
|
deprecated?: boolean;
|
|
189
250
|
async?: boolean;
|
|
190
|
-
/**
|
|
191
|
-
|
|
251
|
+
/**
|
|
252
|
+
* Per-operation security requirements, mirroring the OpenAPI document:
|
|
253
|
+
* - `undefined` — the operation declares nothing and inherits
|
|
254
|
+
* `ApiSpec.security` (which may itself be `undefined`).
|
|
255
|
+
* - `[]` — `security: []`: the operation needs no authentication.
|
|
256
|
+
* - otherwise one `SecurityRequirementSet` per requirement object; the
|
|
257
|
+
* request must satisfy any one set, and every scheme within it.
|
|
258
|
+
*/
|
|
259
|
+
security?: SecurityRequirementSet[];
|
|
192
260
|
/**
|
|
193
261
|
* Mutually-exclusive parameter groups parsed from `x-mutually-exclusive-parameter-groups`.
|
|
194
262
|
* Each group represents a logical choice the caller must (or may) make between
|
|
@@ -257,8 +325,84 @@ interface PaginationMeta {
|
|
|
257
325
|
limitParam?: string;
|
|
258
326
|
dataPath?: string;
|
|
259
327
|
itemType: TypeRef;
|
|
328
|
+
/**
|
|
329
|
+
* Every property the list envelope carries besides the data array, in
|
|
330
|
+
* document order: the pagination companion (`list_metadata`, `pagination`,
|
|
331
|
+
* `has_more`, …) and any discriminant such as `object: "list"`. Together
|
|
332
|
+
* with `dataPath` and `itemType` this is the envelope's full shape, so an
|
|
333
|
+
* emitter can type what the endpoint returns and read the page details it
|
|
334
|
+
* needs for the next request without parsing the document itself.
|
|
335
|
+
*
|
|
336
|
+
* An inline companion object is lifted to a model. Because the same envelope
|
|
337
|
+
* recurs on every list endpoint of an API, copies that agree structurally
|
|
338
|
+
* share one model named from the property alone (`list_metadata` →
|
|
339
|
+
* `ListMetadata`, or the component schema of that name when one exists); a
|
|
340
|
+
* copy whose shape differs keeps an operation-qualified name
|
|
341
|
+
* (`ListUsersListMetadata`) so it can never change another type's shape.
|
|
342
|
+
*
|
|
343
|
+
* Absent when the response is a bare array, or when pagination was inferred
|
|
344
|
+
* from query parameters alone and no envelope was detected.
|
|
345
|
+
*/
|
|
346
|
+
envelopeFields?: Field[];
|
|
260
347
|
}
|
|
261
348
|
type HttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'head' | 'options' | 'trace';
|
|
349
|
+
/**
|
|
350
|
+
* JSON Schema validation keywords declared directly on a schema, carried so an
|
|
351
|
+
* emitter can document a value's limits ("at most 100"), check a value before
|
|
352
|
+
* sending it, or keep a generated example within range. Every member is
|
|
353
|
+
* optional and present only when the document declares it; a schema with no
|
|
354
|
+
* validation keyword has no `constraints` at all.
|
|
355
|
+
*
|
|
356
|
+
* Numeric bounds use the OpenAPI 3.1 / JSON Schema 2020-12 shape, where
|
|
357
|
+
* `exclusiveMinimum` / `exclusiveMaximum` are the bound itself. OpenAPI 3.0
|
|
358
|
+
* spells them as booleans that make `minimum` / `maximum` exclusive; the
|
|
359
|
+
* parser normalizes that form, so `{ minimum: 0, exclusiveMinimum: true }`
|
|
360
|
+
* arrives as `{ exclusiveMinimum: 0 }` with no `minimum`, and a `false` is
|
|
361
|
+
* dropped. Emitters read one shape whichever version produced it.
|
|
362
|
+
*
|
|
363
|
+
* The keywords on the field, parameter or model schema itself are carried,
|
|
364
|
+
* conjoined with those of its inline `allOf` members (a single-member
|
|
365
|
+
* `allOf` is unwrapped by the parser, so its limit is the value's own; a
|
|
366
|
+
* `$ref` member contributes the keywords written beside the reference while
|
|
367
|
+
* the referenced model keeps its own). Limits nested inside array `items` or
|
|
368
|
+
* map values are not carried. A nullable wrapper — `oneOf`/`anyOf` with a
|
|
369
|
+
* single non-null, non-`$ref` branch — conjoins that branch's keywords with
|
|
370
|
+
* its own; limits on a general multi-variant union are not carried.
|
|
371
|
+
*/
|
|
372
|
+
interface Constraints {
|
|
373
|
+
/** Inclusive lower bound (`minimum`). */
|
|
374
|
+
minimum?: number;
|
|
375
|
+
/** Inclusive upper bound (`maximum`). */
|
|
376
|
+
maximum?: number;
|
|
377
|
+
/** Exclusive lower bound as a number; the OAS 3.0 boolean form is normalized to this. */
|
|
378
|
+
exclusiveMinimum?: number;
|
|
379
|
+
/** Exclusive upper bound as a number; the OAS 3.0 boolean form is normalized to this. */
|
|
380
|
+
exclusiveMaximum?: number;
|
|
381
|
+
/** The value must be an integer multiple of this (`multipleOf`). */
|
|
382
|
+
multipleOf?: number;
|
|
383
|
+
/** Minimum string length in characters (`minLength`). */
|
|
384
|
+
minLength?: number;
|
|
385
|
+
/** Maximum string length in characters (`maxLength`). */
|
|
386
|
+
maxLength?: number;
|
|
387
|
+
/** ECMA-262 regular expression the string must match (`pattern`), verbatim from the document. */
|
|
388
|
+
pattern?: string;
|
|
389
|
+
/** Minimum number of array items (`minItems`). */
|
|
390
|
+
minItems?: number;
|
|
391
|
+
/** Maximum number of array items (`maxItems`). */
|
|
392
|
+
maxItems?: number;
|
|
393
|
+
/** Present, and `true`, when array items must be unique; `uniqueItems: false` restates the default and is dropped. */
|
|
394
|
+
uniqueItems?: boolean;
|
|
395
|
+
/** Minimum number of items matching the schema's `contains` (`minContains`). */
|
|
396
|
+
minContains?: number;
|
|
397
|
+
/** Maximum number of items matching the schema's `contains` (`maxContains`). */
|
|
398
|
+
maxContains?: number;
|
|
399
|
+
/** Minimum number of object properties (`minProperties`). */
|
|
400
|
+
minProperties?: number;
|
|
401
|
+
/** Maximum number of object properties (`maxProperties`). */
|
|
402
|
+
maxProperties?: number;
|
|
403
|
+
/** Property name → properties that must also be present when it is (`dependentRequired`). */
|
|
404
|
+
dependentRequired?: Record<string, string[]>;
|
|
405
|
+
}
|
|
262
406
|
interface Parameter {
|
|
263
407
|
name: string;
|
|
264
408
|
type: TypeRef;
|
|
@@ -266,9 +410,32 @@ interface Parameter {
|
|
|
266
410
|
description?: string;
|
|
267
411
|
deprecated?: boolean;
|
|
268
412
|
default?: unknown;
|
|
413
|
+
/**
|
|
414
|
+
* A single illustrative value, resolved level by level: the parameter's own
|
|
415
|
+
* `example` (else the first entry of its `examples` map), then its inline
|
|
416
|
+
* schema's `example` (else the first of its `examples` list), then the same
|
|
417
|
+
* on the component schema its `$ref` points at. A level with neither falls
|
|
418
|
+
* through; an explicit `null` is kept. Absent when no level gives one.
|
|
419
|
+
*/
|
|
269
420
|
example?: unknown;
|
|
421
|
+
/**
|
|
422
|
+
* Every example value the document gives, in document order: the
|
|
423
|
+
* parameter's `examples` map of Example Objects (each entry's `value`, with
|
|
424
|
+
* `$ref`s resolved against `components.examples`), else the JSON Schema
|
|
425
|
+
* `examples` list on its inline schema, else the list on the component
|
|
426
|
+
* schema its `$ref` points at. Present only when at least one value exists.
|
|
427
|
+
*/
|
|
428
|
+
examples?: unknown[];
|
|
270
429
|
style?: 'form' | 'simple' | 'label' | 'matrix';
|
|
271
430
|
explode?: boolean;
|
|
431
|
+
/**
|
|
432
|
+
* Validation keywords from the parameter's schema. When that schema is a
|
|
433
|
+
* `$ref`, the target's keywords are merged underneath the parameter's own
|
|
434
|
+
* — the per-value fallback `default` and `example` use — so a parameter
|
|
435
|
+
* can be read on its own without chasing the fieldless alias model the
|
|
436
|
+
* target also becomes. Absent when neither declares any.
|
|
437
|
+
*/
|
|
438
|
+
constraints?: Constraints;
|
|
272
439
|
}
|
|
273
440
|
/** Type reference — the core type system of the IR */
|
|
274
441
|
type TypeRef = PrimitiveType | ArrayType | ModelRef | EnumRef | UnionType | NullableType | LiteralType | MapType;
|
|
@@ -341,6 +508,12 @@ interface Model {
|
|
|
341
508
|
property: string;
|
|
342
509
|
mapping: Record<string, string>;
|
|
343
510
|
};
|
|
511
|
+
/**
|
|
512
|
+
* Validation keywords declared on the model's own schema — for an object
|
|
513
|
+
* schema, `minProperties`, `maxProperties` and `dependentRequired`. Absent
|
|
514
|
+
* when the schema declares none.
|
|
515
|
+
*/
|
|
516
|
+
constraints?: Constraints;
|
|
344
517
|
}
|
|
345
518
|
interface Field {
|
|
346
519
|
name: string;
|
|
@@ -360,7 +533,27 @@ interface Field {
|
|
|
360
533
|
writeOnly?: boolean;
|
|
361
534
|
deprecated?: boolean;
|
|
362
535
|
default?: unknown;
|
|
536
|
+
/**
|
|
537
|
+
* A single illustrative value. The field schema's `example` when present,
|
|
538
|
+
* otherwise the first entry of its `examples`; when the schema is a `$ref`
|
|
539
|
+
* with neither, the same taken from the component it points at. An
|
|
540
|
+
* explicit `null` is kept. Absent when no level gives one.
|
|
541
|
+
*/
|
|
363
542
|
example?: unknown;
|
|
543
|
+
/**
|
|
544
|
+
* Every example value the schema gives, in document order, from the JSON
|
|
545
|
+
* Schema `examples` list (OAS 3.1 deprecates `example` in its favour) —
|
|
546
|
+
* on the field schema, else on the component its `$ref` points at.
|
|
547
|
+
* Present only when the list has at least one entry.
|
|
548
|
+
*/
|
|
549
|
+
examples?: unknown[];
|
|
550
|
+
/**
|
|
551
|
+
* Validation keywords declared on the field's schema, including any
|
|
552
|
+
* written beside a `$ref` (OpenAPI 3.1 allows siblings). Absent when the
|
|
553
|
+
* schema declares none; a bare `$ref` yields none, since the referenced
|
|
554
|
+
* model carries its own limits.
|
|
555
|
+
*/
|
|
556
|
+
constraints?: Constraints;
|
|
364
557
|
}
|
|
365
558
|
/** Enum definition */
|
|
366
559
|
interface Enum {
|
|
@@ -375,16 +568,41 @@ interface EnumValue {
|
|
|
375
568
|
description?: string;
|
|
376
569
|
deprecated?: boolean;
|
|
377
570
|
}
|
|
571
|
+
/**
|
|
572
|
+
* A header a response declares, typed like a parameter. `name` is kept exactly
|
|
573
|
+
* as written in the spec (e.g. `Content-Disposition`); emitters apply their
|
|
574
|
+
* own casing.
|
|
575
|
+
*/
|
|
576
|
+
interface ResponseHeader {
|
|
577
|
+
name: string;
|
|
578
|
+
type: TypeRef;
|
|
579
|
+
required: boolean;
|
|
580
|
+
description?: string;
|
|
581
|
+
deprecated?: boolean;
|
|
582
|
+
}
|
|
378
583
|
interface ErrorResponse {
|
|
379
584
|
statusCode: number;
|
|
380
585
|
type?: TypeRef;
|
|
586
|
+
/** Declared response headers. Present only when the spec declares at least one. */
|
|
587
|
+
headers?: ResponseHeader[];
|
|
381
588
|
}
|
|
382
589
|
/** A successful response entry from a 2xx status code */
|
|
383
590
|
interface SuccessResponse {
|
|
384
591
|
statusCode: number;
|
|
385
592
|
type: TypeRef;
|
|
593
|
+
/** Declared response headers. Present only when the spec declares at least one. */
|
|
594
|
+
headers?: ResponseHeader[];
|
|
386
595
|
}
|
|
387
596
|
//#endregion
|
|
597
|
+
//#region src/parser/schemas.d.ts
|
|
598
|
+
/**
|
|
599
|
+
* Signature of the `schemaNameTransform` hook. `name` is the cleaned
|
|
600
|
+
* PascalCase name; `originalName` is the `components.schemas` key exactly
|
|
601
|
+
* as spelled in the document, or `undefined` for names oagen synthesises.
|
|
602
|
+
* See `SchemaExtractionOptions.schemaNameTransform`.
|
|
603
|
+
*/
|
|
604
|
+
type SchemaNameTransform = (name: string, originalName?: string) => string;
|
|
605
|
+
//#endregion
|
|
388
606
|
//#region src/parser/parse.d.ts
|
|
389
607
|
/**
|
|
390
608
|
* A bundled OpenAPI document, post-`$ref` resolution but pre-IR extraction.
|
|
@@ -397,7 +615,13 @@ interface SuccessResponse {
|
|
|
397
615
|
type OpenApiDocument = Record<string, unknown>;
|
|
398
616
|
interface ParseOptions {
|
|
399
617
|
operationIdTransform?: (id: string) => string;
|
|
400
|
-
|
|
618
|
+
/**
|
|
619
|
+
* Custom transform for schema (model/enum) names. Receives the cleaned
|
|
620
|
+
* PascalCase name and, for component schemas, the original name as spelled
|
|
621
|
+
* in the document. Returning `originalName` opts out of normalization.
|
|
622
|
+
* See `SchemaExtractionOptions.schemaNameTransform`.
|
|
623
|
+
*/
|
|
624
|
+
schemaNameTransform?: SchemaNameTransform;
|
|
401
625
|
/**
|
|
402
626
|
* Domain-facing field-name overrides, keyed by IR model name then wire field
|
|
403
627
|
* name: `{ Connection: { connection_type: 'type' } }`. Sets `Field.domainName`
|
|
@@ -421,21 +645,21 @@ interface ParseOptions {
|
|
|
421
645
|
*/
|
|
422
646
|
transformSpec?: (spec: OpenApiDocument) => OpenApiDocument;
|
|
423
647
|
}
|
|
424
|
-
declare function parseSpec(specPath: string, options?: ParseOptions): Promise<ApiSpec>;
|
|
648
|
+
export declare function parseSpec(specPath: string, options?: ParseOptions): Promise<ApiSpec>;
|
|
425
649
|
//#endregion
|
|
426
650
|
//#region src/utils/naming.d.ts
|
|
427
|
-
declare function toCamelCase(s: string, acronyms?: Set<string>): string;
|
|
428
|
-
declare function toSnakeCase(s: string): string;
|
|
651
|
+
export declare function toCamelCase(s: string, acronyms?: Set<string>): string;
|
|
652
|
+
export declare function toSnakeCase(s: string): string;
|
|
429
653
|
//#endregion
|
|
430
654
|
//#region scripts/smoke/shared.d.ts
|
|
431
|
-
interface ExchangeProvenance {
|
|
655
|
+
export interface ExchangeProvenance {
|
|
432
656
|
resolutionTier: 'exact' | 'crud-prefix' | 'fuzzy' | 'manifest';
|
|
433
657
|
resolutionConfidence: number;
|
|
434
658
|
sdkMethodName: string;
|
|
435
659
|
captureIndex: number;
|
|
436
660
|
totalCaptures: number;
|
|
437
661
|
}
|
|
438
|
-
interface CapturedExchange {
|
|
662
|
+
export interface CapturedExchange {
|
|
439
663
|
operationId: string;
|
|
440
664
|
service: string;
|
|
441
665
|
operationName: string;
|
|
@@ -459,51 +683,51 @@ interface CapturedExchange {
|
|
|
459
683
|
/** How the SDK method was resolved and which capture was selected */
|
|
460
684
|
provenance?: ExchangeProvenance;
|
|
461
685
|
}
|
|
462
|
-
interface SmokeResults {
|
|
686
|
+
export interface SmokeResults {
|
|
463
687
|
source: 'raw' | 'spec-baseline' | `sdk-${string}`;
|
|
464
688
|
timestamp: string;
|
|
465
689
|
specVersion: string;
|
|
466
690
|
exchanges: CapturedExchange[];
|
|
467
691
|
}
|
|
468
|
-
interface PlannedOperation {
|
|
692
|
+
export interface PlannedOperation {
|
|
469
693
|
service: string;
|
|
470
694
|
operation: Operation;
|
|
471
695
|
}
|
|
472
|
-
interface PlannedGroup {
|
|
696
|
+
export interface PlannedGroup {
|
|
473
697
|
service: string;
|
|
474
698
|
operations: PlannedOperation[];
|
|
475
699
|
}
|
|
476
700
|
/** Operations that require complex preconditions and can't be auto-tested */
|
|
477
|
-
declare let SKIP_OPERATIONS: Set<string>;
|
|
701
|
+
export declare let SKIP_OPERATIONS: Set<string>;
|
|
478
702
|
/** Services to skip entirely */
|
|
479
|
-
declare let SKIP_SERVICES: Set<string>;
|
|
703
|
+
export declare let SKIP_SERVICES: Set<string>;
|
|
480
704
|
/**
|
|
481
705
|
* Map IR service names to SDK property names on the client object.
|
|
482
706
|
* Empty = use toCamelCase(serviceName) as fallback.
|
|
483
707
|
*/
|
|
484
|
-
declare let SERVICE_PROPERTY_MAP: Record<string, string>;
|
|
485
|
-
interface SmokeConfig {
|
|
708
|
+
export declare let SERVICE_PROPERTY_MAP: Record<string, string>;
|
|
709
|
+
export interface SmokeConfig {
|
|
486
710
|
skipOperations: string[];
|
|
487
711
|
skipServices: string[];
|
|
488
712
|
servicePriority: Record<string, number>;
|
|
489
713
|
servicePropertyMap: Record<string, string>;
|
|
490
714
|
}
|
|
491
715
|
/** Load smoke test configuration from a JSON file */
|
|
492
|
-
declare function loadSmokeConfig(configPath?: string): void;
|
|
716
|
+
export declare function loadSmokeConfig(configPath?: string): void;
|
|
493
717
|
/** Return the current smoke config values (for diff.ts to consume) */
|
|
494
|
-
declare function getSmokeConfig(): {
|
|
718
|
+
export declare function getSmokeConfig(): {
|
|
495
719
|
skipOperations: Set<string>;
|
|
496
720
|
skipServices: Set<string>;
|
|
497
721
|
servicePriority: Record<string, number>;
|
|
498
722
|
servicePropertyMap: Record<string, string>;
|
|
499
723
|
};
|
|
500
|
-
declare function planOperations(spec: ApiSpec): PlannedGroup[];
|
|
724
|
+
export declare function planOperations(spec: ApiSpec): PlannedGroup[];
|
|
501
725
|
/**
|
|
502
726
|
* A single wave of operations that can be planned and executed together.
|
|
503
727
|
* Wave 0 contains parameterless operations. Subsequent waves contain
|
|
504
728
|
* operations whose path params became resolvable after earlier waves ran.
|
|
505
729
|
*/
|
|
506
|
-
interface OperationWave {
|
|
730
|
+
export interface OperationWave {
|
|
507
731
|
/** Operations in this wave, with pre-resolved path params */
|
|
508
732
|
calls: Array<{
|
|
509
733
|
op: Operation;
|
|
@@ -522,17 +746,17 @@ interface OperationWave {
|
|
|
522
746
|
* @param ids - the IdRegistry (mutated by the caller between waves)
|
|
523
747
|
* @param resolveMethod - optional filter; return null to skip an operation
|
|
524
748
|
*/
|
|
525
|
-
declare function planWaves(groups: PlannedGroup[], ids: IdRegistry, resolveMethod?: (op: Operation, irService: string) => boolean): Generator<OperationWave, PlannedOperation[], void>;
|
|
526
|
-
declare function generateFixtureValue(typeRef: TypeRef, fieldName: string, spec: ApiSpec): unknown;
|
|
749
|
+
export declare function planWaves(groups: PlannedGroup[], ids: IdRegistry, resolveMethod?: (op: Operation, irService: string) => boolean): Generator<OperationWave, PlannedOperation[], void>;
|
|
750
|
+
export declare function generateFixtureValue(typeRef: TypeRef, fieldName: string, spec: ApiSpec): unknown;
|
|
527
751
|
/** Generate a snake_case request body payload from an operation's requestBody type */
|
|
528
|
-
declare function generatePayload(op: Operation, spec: ApiSpec): Record<string, unknown> | null;
|
|
752
|
+
export declare function generatePayload(op: Operation, spec: ApiSpec): Record<string, unknown> | null;
|
|
529
753
|
/** Generate a camelCase payload for SDK method calls */
|
|
530
|
-
declare function generateCamelPayload(op: Operation, spec: ApiSpec): Record<string, unknown> | null;
|
|
754
|
+
export declare function generateCamelPayload(op: Operation, spec: ApiSpec): Record<string, unknown> | null;
|
|
531
755
|
/** Generate query params for an operation (required params only, plus limit=1 for lists) */
|
|
532
|
-
declare function generateQueryParams(op: Operation, spec: ApiSpec): Record<string, string>;
|
|
756
|
+
export declare function generateQueryParams(op: Operation, spec: ApiSpec): Record<string, string>;
|
|
533
757
|
/** Generate camelCase query params for SDK method calls */
|
|
534
|
-
declare function generateCamelQueryParams(op: Operation, spec: ApiSpec): Record<string, unknown>;
|
|
535
|
-
declare class IdRegistry {
|
|
758
|
+
export declare function generateCamelQueryParams(op: Operation, spec: ApiSpec): Record<string, unknown>;
|
|
759
|
+
export declare class IdRegistry {
|
|
536
760
|
private ids;
|
|
537
761
|
set(service: string, field: string, value: string): void;
|
|
538
762
|
get(service: string, field: string): string | undefined;
|
|
@@ -567,16 +791,15 @@ declare class IdRegistry {
|
|
|
567
791
|
private extractNestedIds;
|
|
568
792
|
}
|
|
569
793
|
/** Get the set of status codes declared in the spec for an operation (success + errors) */
|
|
570
|
-
declare function getExpectedStatusCodes(op: Operation): number[];
|
|
794
|
+
export declare function getExpectedStatusCodes(op: Operation): number[];
|
|
571
795
|
/** Check if a status code is unexpected (not declared in the spec) */
|
|
572
|
-
declare function isUnexpectedStatus(status: number, op: Operation): boolean;
|
|
573
|
-
declare function resolvePath(op: Operation, pathParams: Record<string, string>): string;
|
|
574
|
-
declare function delay(ms: number): Promise<void>;
|
|
575
|
-
declare function parseCliArgs(): {
|
|
796
|
+
export declare function isUnexpectedStatus(status: number, op: Operation): boolean;
|
|
797
|
+
export declare function resolvePath(op: Operation, pathParams: Record<string, string>): string;
|
|
798
|
+
export declare function delay(ms: number): Promise<void>;
|
|
799
|
+
export declare function parseCliArgs(): {
|
|
576
800
|
spec: string;
|
|
577
801
|
sdkPath?: string;
|
|
578
802
|
smokeConfig?: string;
|
|
579
803
|
};
|
|
580
804
|
//#endregion
|
|
581
|
-
export { CapturedExchange, ExchangeProvenance, IdRegistry, OperationWave, PlannedGroup, PlannedOperation, SERVICE_PROPERTY_MAP, SKIP_OPERATIONS, SKIP_SERVICES, SmokeConfig, SmokeResults, delay, generateCamelPayload, generateCamelQueryParams, generateFixtureValue, generatePayload, generateQueryParams, getExpectedStatusCodes, getSmokeConfig, isUnexpectedStatus, loadSmokeConfig, parseCliArgs, parseSpec, planOperations, planWaves, resolvePath, toCamelCase, toSnakeCase };
|
|
582
805
|
//# sourceMappingURL=smoke.d.mts.map
|
package/dist/smoke.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smoke.d.mts","names":[],"sources":["../src/ir/sdk-behavior.ts","../src/ir/types.ts","../src/parser/parse.ts","../src/utils/naming.ts","../scripts/smoke/shared.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"smoke.d.mts","names":[],"sources":["../src/ir/sdk-behavior.ts","../src/ir/types.ts","../src/parser/schemas.ts","../src/parser/parse.ts","../src/utils/naming.ts","../scripts/smoke/shared.ts"],"mappings":";;;;;;;;;;;UAYiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA,SAAS;;;;;;;UAQM;;EAEf;;EAEA;;EAEA;;EAEA;;;UAMe;;;EAGf,eAAe;;EAEf;;EAEA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