@workos/oagen 0.1.1 → 0.3.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/dist/cli/index.d.mts +2 -0
- package/dist/cli/index.mjs +6233 -0
- package/dist/cli/index.mjs.map +1 -0
- package/dist/compat/{index.d.ts → index.d.mts} +43 -114
- package/dist/compat/index.d.mts.map +1 -0
- package/dist/compat/index.mjs +4562 -0
- package/dist/compat/index.mjs.map +1 -0
- package/dist/diff-Cn6S74vV.mjs +2432 -0
- package/dist/diff-Cn6S74vV.mjs.map +1 -0
- package/dist/differ-B6472Yef.mjs +1100 -0
- package/dist/differ-B6472Yef.mjs.map +1 -0
- package/dist/index.d.mts +324 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1553 -0
- package/dist/index.mjs.map +1 -0
- package/dist/scripts/smoke/baseline.d.mts +1 -0
- package/dist/scripts/smoke/baseline.mjs +1951 -0
- package/dist/scripts/smoke/baseline.mjs.map +1 -0
- package/dist/scripts/smoke/sdk-test.d.mts +1 -0
- package/dist/scripts/smoke/sdk-test.mjs +111 -0
- package/dist/scripts/smoke/sdk-test.mjs.map +1 -0
- package/dist/smoke.d.mts +331 -0
- package/dist/smoke.d.mts.map +1 -0
- package/dist/smoke.mjs +2119 -0
- package/dist/smoke.mjs.map +1 -0
- package/dist/tree-sitter-DFRXfWg9.mjs +394 -0
- package/dist/tree-sitter-DFRXfWg9.mjs.map +1 -0
- package/dist/types-O25qZxMl.d.mts +397 -0
- package/dist/types-O25qZxMl.d.mts.map +1 -0
- package/dist/verify/index.d.mts +82 -0
- package/dist/verify/index.d.mts.map +1 -0
- package/dist/verify/index.mjs +327 -0
- package/dist/verify/index.mjs.map +1 -0
- package/package.json +19 -16
- package/dist/chunk-2JXFTDTO.js +0 -1669
- package/dist/chunk-CIX5NOBF.js +0 -263
- package/dist/chunk-IJ5E5AE7.js +0 -1040
- package/dist/cli/index.js +0 -5322
- package/dist/compat/index.js +0 -4491
- package/dist/index.d.ts +0 -277
- package/dist/index.js +0 -1565
- package/dist/scripts/smoke/baseline.js +0 -1813
- package/dist/scripts/smoke/sdk-test.js +0 -93
- package/dist/smoke.js +0 -2025
- package/dist/types-B5t9O9Wm.d.ts +0 -367
- package/dist/verify/index.d.ts +0 -76
- package/dist/verify/index.js +0 -336
package/dist/types-B5t9O9Wm.d.ts
DELETED
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
/** Authentication scheme extracted from OpenAPI securitySchemes */
|
|
2
|
-
type AuthScheme = {
|
|
3
|
-
kind: 'bearer';
|
|
4
|
-
} | {
|
|
5
|
-
kind: 'apiKey';
|
|
6
|
-
in: 'header' | 'query' | 'cookie';
|
|
7
|
-
name: string;
|
|
8
|
-
} | {
|
|
9
|
-
kind: 'oauth2';
|
|
10
|
-
flows: Record<string, unknown>;
|
|
11
|
-
};
|
|
12
|
-
/** Root IR node representing the full API surface */
|
|
13
|
-
/** A server entry from the OpenAPI servers array */
|
|
14
|
-
interface ServerEntry {
|
|
15
|
-
url: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
}
|
|
18
|
-
/** Root IR node representing the full API surface */
|
|
19
|
-
interface ApiSpec {
|
|
20
|
-
name: string;
|
|
21
|
-
version: string;
|
|
22
|
-
description?: string;
|
|
23
|
-
baseUrl: string;
|
|
24
|
-
servers?: ServerEntry[];
|
|
25
|
-
services: Service[];
|
|
26
|
-
models: Model[];
|
|
27
|
-
enums: Enum[];
|
|
28
|
-
auth?: AuthScheme[];
|
|
29
|
-
}
|
|
30
|
-
/** A service groups related operations (maps to an SDK resource class) */
|
|
31
|
-
interface Service {
|
|
32
|
-
name: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
operations: Operation[];
|
|
35
|
-
}
|
|
36
|
-
/** A single API operation (maps to an SDK method) */
|
|
37
|
-
interface Operation {
|
|
38
|
-
name: string;
|
|
39
|
-
description?: string;
|
|
40
|
-
httpMethod: HttpMethod;
|
|
41
|
-
path: string;
|
|
42
|
-
pathParams: Parameter[];
|
|
43
|
-
queryParams: Parameter[];
|
|
44
|
-
headerParams: Parameter[];
|
|
45
|
-
cookieParams?: Parameter[];
|
|
46
|
-
requestBody?: TypeRef;
|
|
47
|
-
requestBodyEncoding?: 'json' | 'form-data' | 'form-urlencoded' | 'binary' | 'text';
|
|
48
|
-
response: TypeRef;
|
|
49
|
-
successResponses?: SuccessResponse[];
|
|
50
|
-
errors: ErrorResponse[];
|
|
51
|
-
pagination?: PaginationMeta;
|
|
52
|
-
injectIdempotencyKey: boolean;
|
|
53
|
-
deprecated?: boolean;
|
|
54
|
-
async?: boolean;
|
|
55
|
-
}
|
|
56
|
-
/** Structured pagination metadata for auto-paging iterator generation */
|
|
57
|
-
interface PaginationMeta {
|
|
58
|
-
strategy: 'cursor' | 'offset' | 'link-header';
|
|
59
|
-
param: string;
|
|
60
|
-
limitParam?: string;
|
|
61
|
-
dataPath?: string;
|
|
62
|
-
itemType: TypeRef;
|
|
63
|
-
}
|
|
64
|
-
type HttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'head' | 'options' | 'trace';
|
|
65
|
-
interface Parameter {
|
|
66
|
-
name: string;
|
|
67
|
-
type: TypeRef;
|
|
68
|
-
required: boolean;
|
|
69
|
-
description?: string;
|
|
70
|
-
deprecated?: boolean;
|
|
71
|
-
default?: unknown;
|
|
72
|
-
example?: unknown;
|
|
73
|
-
}
|
|
74
|
-
/** Type reference — the core type system of the IR */
|
|
75
|
-
type TypeRef = PrimitiveType | ArrayType | ModelRef | EnumRef | UnionType | NullableType | LiteralType | MapType;
|
|
76
|
-
interface PrimitiveType {
|
|
77
|
-
kind: 'primitive';
|
|
78
|
-
type: 'string' | 'integer' | 'number' | 'boolean' | 'unknown';
|
|
79
|
-
format?: string;
|
|
80
|
-
}
|
|
81
|
-
interface ArrayType {
|
|
82
|
-
kind: 'array';
|
|
83
|
-
items: TypeRef;
|
|
84
|
-
}
|
|
85
|
-
interface ModelRef {
|
|
86
|
-
kind: 'model';
|
|
87
|
-
name: string;
|
|
88
|
-
}
|
|
89
|
-
interface EnumRef {
|
|
90
|
-
kind: 'enum';
|
|
91
|
-
name: string;
|
|
92
|
-
values?: (string | number)[];
|
|
93
|
-
}
|
|
94
|
-
interface LiteralType {
|
|
95
|
-
kind: 'literal';
|
|
96
|
-
value: string | number | boolean | null;
|
|
97
|
-
}
|
|
98
|
-
interface UnionType {
|
|
99
|
-
kind: 'union';
|
|
100
|
-
variants: TypeRef[];
|
|
101
|
-
discriminator?: {
|
|
102
|
-
property: string;
|
|
103
|
-
mapping: Record<string, string>;
|
|
104
|
-
};
|
|
105
|
-
/** Which OAS composition keyword produced this union. Emitters can use this to
|
|
106
|
-
* distinguish inheritance (allOf) from exclusive union (oneOf) from open union (anyOf). */
|
|
107
|
-
compositionKind?: 'allOf' | 'oneOf' | 'anyOf';
|
|
108
|
-
}
|
|
109
|
-
interface NullableType {
|
|
110
|
-
kind: 'nullable';
|
|
111
|
-
inner: TypeRef;
|
|
112
|
-
}
|
|
113
|
-
interface MapType {
|
|
114
|
-
kind: 'map';
|
|
115
|
-
valueType: TypeRef;
|
|
116
|
-
keyType?: TypeRef;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* A generic type parameter on a model.
|
|
120
|
-
* Example: `DirectoryUser<TCustomAttributes = Record<string, unknown>>`
|
|
121
|
-
* → `{ name: 'TCustomAttributes', default: { kind: 'map', valueType: { kind: 'primitive', type: 'unknown' } } }`
|
|
122
|
-
*/
|
|
123
|
-
interface TypeParam {
|
|
124
|
-
name: string;
|
|
125
|
-
/** Default type when the param is not specified. */
|
|
126
|
-
default?: TypeRef;
|
|
127
|
-
}
|
|
128
|
-
/** Model definition (maps to an SDK model/data class) */
|
|
129
|
-
interface Model {
|
|
130
|
-
name: string;
|
|
131
|
-
description?: string;
|
|
132
|
-
fields: Field[];
|
|
133
|
-
/** Generic type parameters. Empty/undefined for non-generic models. */
|
|
134
|
-
typeParams?: TypeParam[];
|
|
135
|
-
}
|
|
136
|
-
interface Field {
|
|
137
|
-
name: string;
|
|
138
|
-
type: TypeRef;
|
|
139
|
-
required: boolean;
|
|
140
|
-
description?: string;
|
|
141
|
-
readOnly?: boolean;
|
|
142
|
-
writeOnly?: boolean;
|
|
143
|
-
deprecated?: boolean;
|
|
144
|
-
default?: unknown;
|
|
145
|
-
}
|
|
146
|
-
/** Enum definition */
|
|
147
|
-
interface Enum {
|
|
148
|
-
name: string;
|
|
149
|
-
values: EnumValue[];
|
|
150
|
-
}
|
|
151
|
-
interface EnumValue {
|
|
152
|
-
name: string;
|
|
153
|
-
value: string | number;
|
|
154
|
-
description?: string;
|
|
155
|
-
deprecated?: boolean;
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Exhaustive check helper for TypeRef switches.
|
|
159
|
-
* If a new kind is added to TypeRef, any switch that doesn't handle it
|
|
160
|
-
* will fail to compile because `never` won't accept the unhandled variant.
|
|
161
|
-
*
|
|
162
|
-
* Usage:
|
|
163
|
-
* switch (ref.kind) {
|
|
164
|
-
* case 'primitive': ...
|
|
165
|
-
* case 'array': ...
|
|
166
|
-
* // If you forget 'literal', TypeScript errors here:
|
|
167
|
-
* default: assertNever(ref);
|
|
168
|
-
* }
|
|
169
|
-
*/
|
|
170
|
-
declare function assertNever(x: never): never;
|
|
171
|
-
/**
|
|
172
|
-
* Generic depth-first walker for TypeRef trees.
|
|
173
|
-
* Handles recursion into array/nullable/union/map children and provides
|
|
174
|
-
* an exhaustive `assertNever` check so callers don't need to repeat the
|
|
175
|
-
* switch boilerplate. Supply callbacks only for the leaf kinds you care about.
|
|
176
|
-
*/
|
|
177
|
-
declare function walkTypeRef(ref: TypeRef, visitor: {
|
|
178
|
-
model?: (ref: ModelRef) => void;
|
|
179
|
-
enum?: (ref: EnumRef) => void;
|
|
180
|
-
primitive?: (ref: PrimitiveType) => void;
|
|
181
|
-
literal?: (ref: LiteralType) => void;
|
|
182
|
-
}): void;
|
|
183
|
-
/**
|
|
184
|
-
* Generic depth-first mapper for TypeRef trees.
|
|
185
|
-
* Like walkTypeRef but returns a transformed value instead of void.
|
|
186
|
-
* Handles recursion into array/nullable/union/map children, passing
|
|
187
|
-
* already-mapped child values to the parent callback.
|
|
188
|
-
*/
|
|
189
|
-
declare function mapTypeRef<T>(ref: TypeRef, mapper: {
|
|
190
|
-
primitive: (ref: PrimitiveType) => T;
|
|
191
|
-
array: (ref: ArrayType, mappedItems: T) => T;
|
|
192
|
-
model: (ref: ModelRef) => T;
|
|
193
|
-
enum: (ref: EnumRef) => T;
|
|
194
|
-
union: (ref: UnionType, mappedVariants: T[]) => T;
|
|
195
|
-
nullable: (ref: NullableType, mappedInner: T) => T;
|
|
196
|
-
literal: (ref: LiteralType) => T;
|
|
197
|
-
map: (ref: MapType, mappedValue: T, mappedKey?: T) => T;
|
|
198
|
-
}): T;
|
|
199
|
-
interface ErrorResponse {
|
|
200
|
-
statusCode: number;
|
|
201
|
-
type?: TypeRef;
|
|
202
|
-
}
|
|
203
|
-
/** A successful response entry from a 2xx status code */
|
|
204
|
-
interface SuccessResponse {
|
|
205
|
-
statusCode: number;
|
|
206
|
-
type: TypeRef;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
interface ApiSurface {
|
|
210
|
-
language: string;
|
|
211
|
-
extractedFrom: string;
|
|
212
|
-
extractedAt: string;
|
|
213
|
-
classes: Record<string, ApiClass>;
|
|
214
|
-
interfaces: Record<string, ApiInterface>;
|
|
215
|
-
typeAliases: Record<string, ApiTypeAlias>;
|
|
216
|
-
enums: Record<string, ApiEnum>;
|
|
217
|
-
exports: Record<string, string[]>;
|
|
218
|
-
}
|
|
219
|
-
interface ApiClass {
|
|
220
|
-
name: string;
|
|
221
|
-
sourceFile?: string;
|
|
222
|
-
methods: Record<string, ApiMethod[]>;
|
|
223
|
-
properties: Record<string, ApiProperty>;
|
|
224
|
-
constructorParams: ApiParam[];
|
|
225
|
-
}
|
|
226
|
-
interface ApiMethod {
|
|
227
|
-
name: string;
|
|
228
|
-
params: ApiParam[];
|
|
229
|
-
returnType: string;
|
|
230
|
-
async: boolean;
|
|
231
|
-
}
|
|
232
|
-
interface ApiParam {
|
|
233
|
-
name: string;
|
|
234
|
-
type: string;
|
|
235
|
-
optional: boolean;
|
|
236
|
-
}
|
|
237
|
-
interface ApiProperty {
|
|
238
|
-
name: string;
|
|
239
|
-
type: string;
|
|
240
|
-
readonly: boolean;
|
|
241
|
-
}
|
|
242
|
-
interface ApiInterface {
|
|
243
|
-
name: string;
|
|
244
|
-
sourceFile?: string;
|
|
245
|
-
fields: Record<string, ApiField>;
|
|
246
|
-
extends: string[];
|
|
247
|
-
}
|
|
248
|
-
interface ApiField {
|
|
249
|
-
name: string;
|
|
250
|
-
type: string;
|
|
251
|
-
optional: boolean;
|
|
252
|
-
}
|
|
253
|
-
interface ApiTypeAlias {
|
|
254
|
-
name: string;
|
|
255
|
-
sourceFile?: string;
|
|
256
|
-
value: string;
|
|
257
|
-
}
|
|
258
|
-
interface ApiEnum {
|
|
259
|
-
name: string;
|
|
260
|
-
sourceFile?: string;
|
|
261
|
-
members: Record<string, string | number>;
|
|
262
|
-
}
|
|
263
|
-
interface LanguageHints {
|
|
264
|
-
/** Strip nullable wrapper, return inner type. null if not nullable.
|
|
265
|
-
* Node: "string | null" → "string"
|
|
266
|
-
* Go: "*Organization" → "Organization"
|
|
267
|
-
* Python: "Optional[str]" → "str" */
|
|
268
|
-
stripNullable(type: string): string | null;
|
|
269
|
-
/** True if a and b differ only by nullability. */
|
|
270
|
-
isNullableOnlyDifference(a: string, b: string): boolean;
|
|
271
|
-
/** True if a and b are union types with same members in different order. */
|
|
272
|
-
isUnionReorder(a: string, b: string): boolean;
|
|
273
|
-
/** True if type is a generic type parameter the extractor can't resolve. */
|
|
274
|
-
isGenericTypeParam(type: string): boolean;
|
|
275
|
-
/** True if type is an extraction artifact (extractor couldn't resolve).
|
|
276
|
-
* Node: "any"; Python: "Any"; Go: "interface{}" */
|
|
277
|
-
isExtractionArtifact(type: string): boolean;
|
|
278
|
-
/** Whether a missing type alias should be tolerated when the candidate
|
|
279
|
-
* has the same name as an interface or class (TS allows this). */
|
|
280
|
-
tolerateCategoryMismatch: boolean;
|
|
281
|
-
/** Extract innermost meaningful type name from a return type string.
|
|
282
|
-
* Node: "Promise<AutoPaginatable<Organization>>" → "Organization" */
|
|
283
|
-
extractReturnTypeName(returnType: string): string | null;
|
|
284
|
-
/** Extract meaningful type name from a param type string. null for primitives. */
|
|
285
|
-
extractParamTypeName(paramType: string): string | null;
|
|
286
|
-
/** True if sdkResourceProperty maps to className.
|
|
287
|
-
* Node: camelCase ("organizations" → "Organizations")
|
|
288
|
-
* Ruby: snake_case ("organizations" → "Organizations") */
|
|
289
|
-
propertyMatchesClass(propertyName: string, className: string): boolean;
|
|
290
|
-
/** Additional names derived from a model name by this language's emitter.
|
|
291
|
-
* Node: ["FooResponse", "SerializedFoo"]
|
|
292
|
-
* Go: ["FooResponse"] */
|
|
293
|
-
derivedModelNames(modelName: string): string[];
|
|
294
|
-
/** True if two type strings are semantically equivalent even when
|
|
295
|
-
* structurally different — e.g., a named enum vs an inline union
|
|
296
|
-
* of its string literal values. The candidate surface is provided
|
|
297
|
-
* so the hint can look up enum definitions.
|
|
298
|
-
* Returns true to suppress the mismatch, false to report it. */
|
|
299
|
-
isTypeEquivalent?(baselineType: string, candidateType: string, candidateSurface: ApiSurface): boolean;
|
|
300
|
-
/** True if two method signatures should be considered equivalent despite
|
|
301
|
-
* structural differences. Called as a fallback when strict positional
|
|
302
|
-
* matching fails — e.g., when the baseline unpacks body fields into
|
|
303
|
-
* individual params while the candidate uses a dict/array payload.
|
|
304
|
-
* Returns true to suppress the mismatch. */
|
|
305
|
-
isSignatureEquivalent?(baseline: ApiMethod, candidate: ApiMethod, candidateSurface: ApiSurface): boolean;
|
|
306
|
-
/** Base class names that indicate a data model (→ ApiInterface).
|
|
307
|
-
* Python: ["BaseModel"]; PHP: ["BaseResource"].
|
|
308
|
-
* Extractors should provide these for their SDK. */
|
|
309
|
-
modelBaseClasses?: string[];
|
|
310
|
-
/** Base class names that indicate an exception class.
|
|
311
|
-
* Python: ["Exception", "BaseException"]; PHP: ["Exception"]. */
|
|
312
|
-
exceptionBaseClasses?: string[];
|
|
313
|
-
/** Type names for list/paginated resource wrappers (for return type unwrapping).
|
|
314
|
-
* The first type argument is extracted as the inner item type.
|
|
315
|
-
* e.g., ["ListResource"] causes `ListResource[Org, ...]` → `Org`. */
|
|
316
|
-
listResourcePatterns?: string[];
|
|
317
|
-
}
|
|
318
|
-
interface Extractor {
|
|
319
|
-
language: string;
|
|
320
|
-
extract(sdkPath: string): Promise<ApiSurface>;
|
|
321
|
-
hints: LanguageHints;
|
|
322
|
-
}
|
|
323
|
-
interface MethodOverlay {
|
|
324
|
-
className: string;
|
|
325
|
-
methodName: string;
|
|
326
|
-
params: ApiParam[];
|
|
327
|
-
returnType: string;
|
|
328
|
-
}
|
|
329
|
-
interface OverlayLookup {
|
|
330
|
-
/** HTTP method + path → existing method info */
|
|
331
|
-
methodByOperation: Map<string, MethodOverlay>;
|
|
332
|
-
/** Reverse map: "ClassName.methodName" → HTTP key for patchOverlay */
|
|
333
|
-
httpKeyByMethod: Map<string, string>;
|
|
334
|
-
/** IR interface name → existing interface name */
|
|
335
|
-
interfaceByName: Map<string, string>;
|
|
336
|
-
/** IR type alias name → existing type alias name */
|
|
337
|
-
typeAliasByName: Map<string, string>;
|
|
338
|
-
/** Barrel file path → symbols that must be exported */
|
|
339
|
-
requiredExports: Map<string, Set<string>>;
|
|
340
|
-
/** IR model name → SDK interface name (auto-inferred from field structure) */
|
|
341
|
-
modelNameByIR: Map<string, string>;
|
|
342
|
-
/** IR symbol name → relative file path in the live SDK */
|
|
343
|
-
fileBySymbol: Map<string, string>;
|
|
344
|
-
}
|
|
345
|
-
type ViolationCategory = 'public-api' | 'signature' | 'export-structure' | 'behavioral' | 'staleness';
|
|
346
|
-
type ViolationSeverity = 'breaking' | 'warning';
|
|
347
|
-
interface Violation {
|
|
348
|
-
category: ViolationCategory;
|
|
349
|
-
severity: ViolationSeverity;
|
|
350
|
-
symbolPath: string;
|
|
351
|
-
baseline: string;
|
|
352
|
-
candidate: string;
|
|
353
|
-
message: string;
|
|
354
|
-
}
|
|
355
|
-
interface Addition {
|
|
356
|
-
symbolPath: string;
|
|
357
|
-
symbolType: 'class' | 'method' | 'interface' | 'type-alias' | 'enum' | 'property';
|
|
358
|
-
}
|
|
359
|
-
interface DiffResult {
|
|
360
|
-
preservationScore: number;
|
|
361
|
-
totalBaselineSymbols: number;
|
|
362
|
-
preservedSymbols: number;
|
|
363
|
-
violations: Violation[];
|
|
364
|
-
additions: Addition[];
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
export { type ApiSpec as A, type ApiProperty as B, type ApiTypeAlias as C, type DiffResult as D, type Enum as E, type Field as F, type MethodOverlay as G, type HttpMethod as H, type ViolationCategory as I, type ViolationSeverity as J, type LiteralType as L, type Model as M, type NullableType as N, type OverlayLookup as O, type PaginationMeta as P, type Service as S, type TypeParam as T, type UnionType as U, type Violation as V, type ApiSurface as a, type Operation as b, type Extractor as c, type ArrayType as d, type AuthScheme as e, type EnumRef as f, type EnumValue as g, type ErrorResponse as h, type MapType as i, type ModelRef as j, type Parameter as k, type PrimitiveType as l, type ServerEntry as m, type SuccessResponse as n, type TypeRef as o, assertNever as p, mapTypeRef as q, type LanguageHints as r, type Addition as s, type ApiClass as t, type ApiEnum as u, type ApiField as v, walkTypeRef as w, type ApiInterface as x, type ApiMethod as y, type ApiParam as z };
|
package/dist/verify/index.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { D as DiffResult, V as Violation, a as ApiSurface, A as ApiSpec } from '../types-B5t9O9Wm.js';
|
|
2
|
-
|
|
3
|
-
interface VerifyDiagnostics {
|
|
4
|
-
compatCheck?: {
|
|
5
|
-
totalBaselineSymbols: number;
|
|
6
|
-
preservedSymbols: number;
|
|
7
|
-
preservationScore: number;
|
|
8
|
-
violationsByCategory: Record<string, number>;
|
|
9
|
-
violationsBySeverity: Record<string, number>;
|
|
10
|
-
additions: number;
|
|
11
|
-
scopedToSpec: boolean;
|
|
12
|
-
scopedSymbolCount?: number;
|
|
13
|
-
};
|
|
14
|
-
stalenessCheck?: {
|
|
15
|
-
staleSymbolCount: number;
|
|
16
|
-
staleSymbols: string[];
|
|
17
|
-
};
|
|
18
|
-
smokeCheck?: {
|
|
19
|
-
passed: boolean;
|
|
20
|
-
findingsCount?: number;
|
|
21
|
-
compileErrors?: boolean;
|
|
22
|
-
};
|
|
23
|
-
retryLoop?: {
|
|
24
|
-
attempts: number;
|
|
25
|
-
converged: boolean;
|
|
26
|
-
finalScore: number;
|
|
27
|
-
patchedPerIteration: number[];
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
interface CompatCheckResult {
|
|
31
|
-
passed: boolean;
|
|
32
|
-
diff: DiffResult;
|
|
33
|
-
scopedToSpec: boolean;
|
|
34
|
-
scopedSymbolCount?: number;
|
|
35
|
-
}
|
|
36
|
-
interface OverlayRetryResult {
|
|
37
|
-
status: 'passed' | 'max-retries' | 'no-patchable' | 'stalled';
|
|
38
|
-
attempts: number;
|
|
39
|
-
patchedPerIteration: number[];
|
|
40
|
-
compatResult: CompatCheckResult;
|
|
41
|
-
}
|
|
42
|
-
interface SmokeCheckResult {
|
|
43
|
-
passed: boolean;
|
|
44
|
-
findingsCount?: number;
|
|
45
|
-
compileErrors?: boolean;
|
|
46
|
-
baselinePath: string;
|
|
47
|
-
generatedBaseline: boolean;
|
|
48
|
-
}
|
|
49
|
-
interface StalenessCheckResult {
|
|
50
|
-
violations: Violation[];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
declare function runCompatCheck(baseline: ApiSurface, outputDir: string, lang: string, spec?: ApiSpec): Promise<CompatCheckResult>;
|
|
54
|
-
|
|
55
|
-
declare function runOverlayRetryLoop(opts: {
|
|
56
|
-
baseline: ApiSurface;
|
|
57
|
-
parsedSpec: ApiSpec;
|
|
58
|
-
outputDir: string;
|
|
59
|
-
lang: string;
|
|
60
|
-
maxRetries: number;
|
|
61
|
-
namespace?: string;
|
|
62
|
-
onRetry?: (attemptNumber: number, maxRetries: number, patchableCount: number) => void;
|
|
63
|
-
}): Promise<OverlayRetryResult>;
|
|
64
|
-
|
|
65
|
-
declare function runStalenessCheck(baseline: ApiSurface, oldSpec: ApiSpec, newSpec: ApiSpec, lang: string): StalenessCheckResult;
|
|
66
|
-
|
|
67
|
-
declare function runSmokeCheck(opts: {
|
|
68
|
-
spec?: string;
|
|
69
|
-
lang: string;
|
|
70
|
-
output: string;
|
|
71
|
-
rawResults?: string;
|
|
72
|
-
smokeConfig?: string;
|
|
73
|
-
smokeRunner?: string;
|
|
74
|
-
}): SmokeCheckResult;
|
|
75
|
-
|
|
76
|
-
export { type VerifyDiagnostics, runCompatCheck, runOverlayRetryLoop, runSmokeCheck, runStalenessCheck };
|