@skmtc/core 0.0.785 → 0.0.786
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/esm/dsl/Identifier.d.ts +152 -0
- package/esm/dsl/Identifier.d.ts.map +1 -1
- package/esm/dsl/Identifier.js +152 -0
- package/esm/dsl/Import.d.ts +221 -0
- package/esm/dsl/Import.d.ts.map +1 -1
- package/esm/dsl/Import.js +202 -0
- package/esm/dsl/operation/OperationBase.d.ts +181 -1
- package/esm/dsl/operation/OperationBase.d.ts.map +1 -1
- package/esm/dsl/operation/OperationBase.js +181 -1
- package/esm/oas/document/Document.d.ts +155 -1
- package/esm/oas/document/Document.d.ts.map +1 -1
- package/esm/oas/document/Document.js +141 -2
- package/esm/oas/object/Object.d.ts +255 -10
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +229 -10
- package/esm/types/GeneratorKeys.d.ts +336 -0
- package/esm/types/GeneratorKeys.d.ts.map +1 -1
- package/esm/types/GeneratorKeys.js +243 -0
- package/esm/types/GeneratorType.d.ts +119 -0
- package/esm/types/GeneratorType.d.ts.map +1 -1
- package/esm/types/Method.d.ts +109 -0
- package/esm/types/Method.d.ts.map +1 -1
- package/esm/types/Method.js +84 -0
- package/package.json +1 -1
- package/script/dsl/Identifier.d.ts +152 -0
- package/script/dsl/Identifier.d.ts.map +1 -1
- package/script/dsl/Identifier.js +152 -0
- package/script/dsl/Import.d.ts +221 -0
- package/script/dsl/Import.d.ts.map +1 -1
- package/script/dsl/Import.js +202 -0
- package/script/dsl/operation/OperationBase.d.ts +181 -1
- package/script/dsl/operation/OperationBase.d.ts.map +1 -1
- package/script/dsl/operation/OperationBase.js +181 -1
- package/script/oas/document/Document.d.ts +155 -1
- package/script/oas/document/Document.d.ts.map +1 -1
- package/script/oas/document/Document.js +141 -2
- package/script/oas/object/Object.d.ts +255 -10
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +229 -10
- package/script/types/GeneratorKeys.d.ts +336 -0
- package/script/types/GeneratorKeys.d.ts.map +1 -1
- package/script/types/GeneratorKeys.js +243 -0
- package/script/types/GeneratorType.d.ts +119 -0
- package/script/types/GeneratorType.d.ts.map +1 -1
- package/script/types/Method.d.ts +109 -0
- package/script/types/Method.d.ts.map +1 -1
- package/script/types/Method.js +84 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Object.d.ts","sourceRoot":"","sources":["../../../src/oas/object/Object.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,MAAM,MAAM,eAAe,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,IAAI;IAClE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,GAAG,SAAS,CAAA;IACnF,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC/B,OAAO,CAAC,EAAE,QAAQ,SAAS,IAAI,GAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IACvC,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAA;IACzE,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,aAAa,CAAC,EAA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;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;IAkBvC,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,SAAS;IAIpB,WAAW,IAAI,SAAS;IAIxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAAC,oBAAoB;CA8B3E"}
|
package/esm/oas/object/Object.js
CHANGED
|
@@ -1,11 +1,109 @@
|
|
|
1
1
|
import "../../_dnt.polyfills.js";
|
|
2
2
|
import { match, P } from 'ts-pattern';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Represents an object schema in the OpenAPI Specification.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* `OasObject` handles both:
|
|
7
|
+
* - **Objects**: Types with fixed, named properties (like TypeScript interfaces)
|
|
8
|
+
* - **Records**: Types with dynamic keys and consistent value types (like TypeScript Record<string, T>)
|
|
9
|
+
*
|
|
10
|
+
* This class provides comprehensive support for object validation constraints,
|
|
11
|
+
* property management, and JSON Schema conversion. It supports nullable types
|
|
12
|
+
* through generic type parameters and handles complex property relationships.
|
|
13
|
+
*
|
|
14
|
+
* ## Key Features
|
|
15
|
+
*
|
|
16
|
+
* - **Property Management**: Add/remove properties with automatic required field handling
|
|
17
|
+
* - **Type Safety**: Generic nullable type support with proper TypeScript inference
|
|
18
|
+
* - **Validation**: Min/max properties, additional properties, and enum constraints
|
|
19
|
+
* - **JSON Schema**: Convert to standard JSON Schema format for validation
|
|
20
|
+
* - **Immutability**: All mutations return new instances (functional style)
|
|
21
|
+
*
|
|
22
|
+
* @template Nullable - Whether the object value itself can be null
|
|
23
|
+
*
|
|
24
|
+
* @example Basic object schema
|
|
25
|
+
* ```typescript
|
|
26
|
+
* import { OasObject } from '@skmtc/core';
|
|
27
|
+
*
|
|
28
|
+
* const userObject = new OasObject({
|
|
29
|
+
* title: 'User',
|
|
30
|
+
* description: 'A user in the system',
|
|
31
|
+
* properties: {
|
|
32
|
+
* id: new OasString({ title: 'User ID' }),
|
|
33
|
+
* name: new OasString({ title: 'Full Name' }),
|
|
34
|
+
* email: new OasString({ format: 'email' })
|
|
35
|
+
* },
|
|
36
|
+
* required: ['id', 'name'],
|
|
37
|
+
* additionalProperties: false
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @example Dynamic property management
|
|
42
|
+
* ```typescript
|
|
43
|
+
* // Start with empty object
|
|
44
|
+
* let schema = OasObject.empty();
|
|
45
|
+
*
|
|
46
|
+
* // Add properties dynamically
|
|
47
|
+
* schema = schema.addProperty({
|
|
48
|
+
* name: 'id',
|
|
49
|
+
* schema: new OasString(),
|
|
50
|
+
* required: true
|
|
51
|
+
* });
|
|
52
|
+
*
|
|
53
|
+
* schema = schema.addProperty({
|
|
54
|
+
* name: 'metadata',
|
|
55
|
+
* schema: new OasObject({ additionalProperties: true }),
|
|
56
|
+
* required: false
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* // Remove a property
|
|
60
|
+
* schema = schema.removeProperty('metadata');
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @example Record-style object (additional properties)
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const recordObject = new OasObject({
|
|
66
|
+
* title: 'StringMap',
|
|
67
|
+
* description: 'A map of string keys to string values',
|
|
68
|
+
* additionalProperties: new OasString(), // Any string key -> string value
|
|
69
|
+
* minProperties: 1 // At least one property required
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* // This allows: { [key: string]: string }
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @example Nullable object support
|
|
76
|
+
* ```typescript
|
|
77
|
+
* const nullableUser = new OasObject<true>({
|
|
78
|
+
* nullable: true,
|
|
79
|
+
* properties: {
|
|
80
|
+
* name: new OasString()
|
|
81
|
+
* },
|
|
82
|
+
* default: null // Can have null default when nullable
|
|
83
|
+
* });
|
|
84
|
+
*
|
|
85
|
+
* // This represents: { name: string } | null
|
|
86
|
+
* ```
|
|
7
87
|
*/
|
|
8
88
|
export class OasObject {
|
|
89
|
+
/**
|
|
90
|
+
* Creates a new OasObject instance.
|
|
91
|
+
*
|
|
92
|
+
* @param fields - Object configuration fields
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```typescript
|
|
96
|
+
* const userSchema = new OasObject({
|
|
97
|
+
* title: 'User',
|
|
98
|
+
* properties: {
|
|
99
|
+
* id: new OasString({ title: 'ID' }),
|
|
100
|
+
* name: new OasString({ title: 'Name' })
|
|
101
|
+
* },
|
|
102
|
+
* required: ['id'],
|
|
103
|
+
* additionalProperties: false
|
|
104
|
+
* });
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
9
107
|
constructor(fields = {}) {
|
|
10
108
|
/**
|
|
11
109
|
* Object is part the 'schema' set which is used
|
|
@@ -158,7 +256,32 @@ export class OasObject {
|
|
|
158
256
|
this.deprecated = fields.deprecated;
|
|
159
257
|
this.enums = fields.enums;
|
|
160
258
|
}
|
|
161
|
-
/**
|
|
259
|
+
/**
|
|
260
|
+
* Creates a new empty OasObject with no properties.
|
|
261
|
+
*
|
|
262
|
+
* This factory method creates a non-nullable object with empty properties
|
|
263
|
+
* and required arrays, useful as a starting point for dynamic object building.
|
|
264
|
+
*
|
|
265
|
+
* @returns A new empty OasObject instance
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* ```typescript
|
|
269
|
+
* // Start with empty object and build up
|
|
270
|
+
* let schema = OasObject.empty();
|
|
271
|
+
*
|
|
272
|
+
* schema = schema.addProperty({
|
|
273
|
+
* name: 'id',
|
|
274
|
+
* schema: new OasString(),
|
|
275
|
+
* required: true
|
|
276
|
+
* });
|
|
277
|
+
*
|
|
278
|
+
* schema = schema.addProperty({
|
|
279
|
+
* name: 'name',
|
|
280
|
+
* schema: new OasString(),
|
|
281
|
+
* required: true
|
|
282
|
+
* });
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
162
285
|
static empty() {
|
|
163
286
|
return new OasObject({
|
|
164
287
|
nullable: false,
|
|
@@ -169,11 +292,47 @@ export class OasObject {
|
|
|
169
292
|
/**
|
|
170
293
|
* Adds a new property to the object.
|
|
171
294
|
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* @
|
|
295
|
+
* This method returns a new OasObject instance with the added property,
|
|
296
|
+
* following an immutable pattern. If the property is marked as required,
|
|
297
|
+
* it will be added to the required array.
|
|
298
|
+
*
|
|
299
|
+
* @param args - Property addition arguments
|
|
300
|
+
* @param args.name - The name of the property to add
|
|
301
|
+
* @param args.schema - The schema definition for the property
|
|
302
|
+
* @param args.required - Whether the property should be required (default: false)
|
|
303
|
+
* @returns A new OasObject with the added property
|
|
304
|
+
*
|
|
305
|
+
* @example Adding a simple property
|
|
306
|
+
* ```typescript
|
|
307
|
+
* const original = OasObject.empty();
|
|
308
|
+
* const withName = original.addProperty({
|
|
309
|
+
* name: 'username',
|
|
310
|
+
* schema: new OasString({ minLength: 3 }),
|
|
311
|
+
* required: true
|
|
312
|
+
* });
|
|
313
|
+
*
|
|
314
|
+
* console.log(withName.required); // ['username']
|
|
315
|
+
* ```
|
|
316
|
+
*
|
|
317
|
+
* @example Chaining property additions
|
|
318
|
+
* ```typescript
|
|
319
|
+
* const userSchema = OasObject.empty()
|
|
320
|
+
* .addProperty({
|
|
321
|
+
* name: 'id',
|
|
322
|
+
* schema: new OasInteger(),
|
|
323
|
+
* required: true
|
|
324
|
+
* })
|
|
325
|
+
* .addProperty({
|
|
326
|
+
* name: 'email',
|
|
327
|
+
* schema: new OasString({ format: 'email' }),
|
|
328
|
+
* required: true
|
|
329
|
+
* })
|
|
330
|
+
* .addProperty({
|
|
331
|
+
* name: 'age',
|
|
332
|
+
* schema: new OasInteger({ minimum: 0 }),
|
|
333
|
+
* required: false
|
|
334
|
+
* });
|
|
335
|
+
* ```
|
|
177
336
|
*/
|
|
178
337
|
addProperty({ name, schema, required }) {
|
|
179
338
|
if (!schema) {
|
|
@@ -195,8 +354,31 @@ export class OasObject {
|
|
|
195
354
|
/**
|
|
196
355
|
* Removes a property from the object.
|
|
197
356
|
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
357
|
+
* This method returns a new OasObject instance with the specified property
|
|
358
|
+
* removed. If the property was required, it will also be removed from the
|
|
359
|
+
* required array. If the property doesn't exist, returns the same instance.
|
|
360
|
+
*
|
|
361
|
+
* @param name - The name of the property to remove
|
|
362
|
+
* @returns A new OasObject with the property removed, or the same instance if property doesn't exist
|
|
363
|
+
*
|
|
364
|
+
* @example
|
|
365
|
+
* ```typescript
|
|
366
|
+
* const userSchema = new OasObject({
|
|
367
|
+
* properties: {
|
|
368
|
+
* id: new OasString(),
|
|
369
|
+
* name: new OasString(),
|
|
370
|
+
* email: new OasString(),
|
|
371
|
+
* temporaryField: new OasString()
|
|
372
|
+
* },
|
|
373
|
+
* required: ['id', 'name', 'temporaryField']
|
|
374
|
+
* });
|
|
375
|
+
*
|
|
376
|
+
* // Remove temporary field
|
|
377
|
+
* const cleanedSchema = userSchema.removeProperty('temporaryField');
|
|
378
|
+
*
|
|
379
|
+
* console.log(cleanedSchema.required); // ['id', 'name']
|
|
380
|
+
* console.log('temporaryField' in cleanedSchema.properties); // false
|
|
381
|
+
* ```
|
|
200
382
|
*/
|
|
201
383
|
removeProperty(name) {
|
|
202
384
|
if (!this.properties?.[name]) {
|
|
@@ -222,6 +404,43 @@ export class OasObject {
|
|
|
222
404
|
resolveOnce() {
|
|
223
405
|
return this;
|
|
224
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* Converts the OasObject to a standard JSON Schema object.
|
|
409
|
+
*
|
|
410
|
+
* This method serializes the object to the JSON Schema format used in
|
|
411
|
+
* OpenAPI specifications. It handles property conversion, additional
|
|
412
|
+
* properties rules, and validation constraints.
|
|
413
|
+
*
|
|
414
|
+
* @param options - Conversion options for handling references and context
|
|
415
|
+
* @returns A JSON Schema representation of the object
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* ```typescript
|
|
419
|
+
* const userObject = new OasObject({
|
|
420
|
+
* title: 'User',
|
|
421
|
+
* properties: {
|
|
422
|
+
* id: new OasString(),
|
|
423
|
+
* name: new OasString()
|
|
424
|
+
* },
|
|
425
|
+
* required: ['id'],
|
|
426
|
+
* additionalProperties: false
|
|
427
|
+
* });
|
|
428
|
+
*
|
|
429
|
+
* const jsonSchema = userObject.toJsonSchema({ refContext: new Map() });
|
|
430
|
+
*
|
|
431
|
+
* console.log(jsonSchema);
|
|
432
|
+
* // {
|
|
433
|
+
* // type: 'object',
|
|
434
|
+
* // title: 'User',
|
|
435
|
+
* // properties: {
|
|
436
|
+
* // id: { type: 'string' },
|
|
437
|
+
* // name: { type: 'string' }
|
|
438
|
+
* // },
|
|
439
|
+
* // required: ['id'],
|
|
440
|
+
* // additionalProperties: false
|
|
441
|
+
* // }
|
|
442
|
+
* ```
|
|
443
|
+
*/
|
|
225
444
|
toJsonSchema(options) {
|
|
226
445
|
return {
|
|
227
446
|
type: 'object',
|
|
@@ -3,48 +3,384 @@ import type { OasOperation } from '../oas/operation/Operation.js';
|
|
|
3
3
|
import type { Brand } from './Brand.js';
|
|
4
4
|
import type { RefName } from './RefName.js';
|
|
5
5
|
import { type Method } from './Method.js';
|
|
6
|
+
/**
|
|
7
|
+
* Template literal type for operation generator keys before branding.
|
|
8
|
+
* Format: `generatorId|path|method` (e.g., 'api-client|/users|get')
|
|
9
|
+
*/
|
|
6
10
|
export type NakedOperationGeneratorKey = `${string}|${string}|${Method}`;
|
|
11
|
+
/**
|
|
12
|
+
* Template literal type for model generator keys before branding.
|
|
13
|
+
* Format: `generatorId|refName` (e.g., 'typescript-models|User')
|
|
14
|
+
*/
|
|
7
15
|
export type NakedModelGeneratorKey = `${string}|${string}`;
|
|
16
|
+
/**
|
|
17
|
+
* Branded type for operation generator keys.
|
|
18
|
+
*
|
|
19
|
+
* Operation generator keys uniquely identify generators that process
|
|
20
|
+
* OpenAPI operations (HTTP methods on API paths). The key encodes
|
|
21
|
+
* the generator ID, API path, and HTTP method.
|
|
22
|
+
*/
|
|
8
23
|
export type OperationGeneratorKey = Brand<NakedOperationGeneratorKey, 'OperationGeneratorKey'>;
|
|
24
|
+
/**
|
|
25
|
+
* Branded type for model generator keys.
|
|
26
|
+
*
|
|
27
|
+
* Model generator keys uniquely identify generators that process
|
|
28
|
+
* OpenAPI schema models. The key encodes the generator ID and
|
|
29
|
+
* the schema reference name.
|
|
30
|
+
*/
|
|
9
31
|
export type ModelGeneratorKey = Brand<NakedModelGeneratorKey, 'ModelGeneratorKey'>;
|
|
32
|
+
/**
|
|
33
|
+
* Branded type for generator-only keys.
|
|
34
|
+
*
|
|
35
|
+
* Generator-only keys identify generators that don't process specific
|
|
36
|
+
* operations or models, but generate global artifacts like configuration
|
|
37
|
+
* files, base classes, or utility modules.
|
|
38
|
+
*/
|
|
10
39
|
export type GeneratorOnlyKey = Brand<string, 'GeneratorOnlyKey'>;
|
|
40
|
+
/**
|
|
41
|
+
* Union type of all possible generator key types.
|
|
42
|
+
*
|
|
43
|
+
* Generator keys serve as unique identifiers for different types of
|
|
44
|
+
* code generators in the SKMTC system. They enable tracking, caching,
|
|
45
|
+
* and dependency management between generated artifacts.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* // Operation generator key
|
|
50
|
+
* const opKey: GeneratorKey = toOperationGeneratorKey({
|
|
51
|
+
* generatorId: 'api-client',
|
|
52
|
+
* path: '/users/{id}',
|
|
53
|
+
* method: 'get'
|
|
54
|
+
* });
|
|
55
|
+
*
|
|
56
|
+
* // Model generator key
|
|
57
|
+
* const modelKey: GeneratorKey = toModelGeneratorKey({
|
|
58
|
+
* generatorId: 'typescript-types',
|
|
59
|
+
* refName: 'User'
|
|
60
|
+
* });
|
|
61
|
+
*
|
|
62
|
+
* // Generator-only key
|
|
63
|
+
* const globalKey: GeneratorKey = toGeneratorOnlyKey({
|
|
64
|
+
* generatorId: 'api-config'
|
|
65
|
+
* });
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
11
68
|
export type GeneratorKey = OperationGeneratorKey | ModelGeneratorKey | GeneratorOnlyKey;
|
|
69
|
+
/**
|
|
70
|
+
* Arguments for {@link toOperationGeneratorKey}.
|
|
71
|
+
*
|
|
72
|
+
* Can specify operation details directly or provide an OasOperation
|
|
73
|
+
* object from which the path and method will be extracted.
|
|
74
|
+
*/
|
|
12
75
|
type ToOperationGeneratorKeyArgs = {
|
|
76
|
+
/** Unique identifier for the generator */
|
|
13
77
|
generatorId: string;
|
|
78
|
+
/** API path (e.g., '/users/{id}') */
|
|
14
79
|
path: string;
|
|
80
|
+
/** HTTP method */
|
|
15
81
|
method: Method;
|
|
16
82
|
} | {
|
|
83
|
+
/** Unique identifier for the generator */
|
|
17
84
|
generatorId: string;
|
|
85
|
+
/** OpenAPI operation object containing path and method */
|
|
18
86
|
operation: OasOperation;
|
|
19
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* Creates an operation generator key from generator ID and operation details.
|
|
90
|
+
*
|
|
91
|
+
* Operation generator keys uniquely identify generators processing specific
|
|
92
|
+
* API operations. The key format is: `generatorId|path|method`
|
|
93
|
+
*
|
|
94
|
+
* @param args - Operation generator key arguments
|
|
95
|
+
* @returns A branded OperationGeneratorKey
|
|
96
|
+
*
|
|
97
|
+
* @example With explicit path and method
|
|
98
|
+
* ```typescript
|
|
99
|
+
* const key = toOperationGeneratorKey({
|
|
100
|
+
* generatorId: 'api-client',
|
|
101
|
+
* path: '/users/{id}',
|
|
102
|
+
* method: 'get'
|
|
103
|
+
* });
|
|
104
|
+
* // Result: 'api-client|/users/{id}|get' (branded)
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* @example With OasOperation object
|
|
108
|
+
* ```typescript
|
|
109
|
+
* const operation = new OasOperation({
|
|
110
|
+
* path: '/posts',
|
|
111
|
+
* method: 'post',
|
|
112
|
+
* // ... other operation details
|
|
113
|
+
* });
|
|
114
|
+
*
|
|
115
|
+
* const key = toOperationGeneratorKey({
|
|
116
|
+
* generatorId: 'rest-client',
|
|
117
|
+
* operation
|
|
118
|
+
* });
|
|
119
|
+
* // Result: 'rest-client|/posts|post' (branded)
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
20
122
|
export declare const toOperationGeneratorKey: ({ generatorId, ...rest }: ToOperationGeneratorKeyArgs) => OperationGeneratorKey;
|
|
123
|
+
/**
|
|
124
|
+
* Arguments for {@link toModelGeneratorKey}.
|
|
125
|
+
*/
|
|
21
126
|
type ToModelGeneratorKeyArgs = {
|
|
127
|
+
/** Unique identifier for the generator */
|
|
22
128
|
generatorId: string;
|
|
129
|
+
/** Reference name of the schema model */
|
|
23
130
|
refName: RefName;
|
|
24
131
|
};
|
|
132
|
+
/**
|
|
133
|
+
* Creates a model generator key from generator ID and schema reference name.
|
|
134
|
+
*
|
|
135
|
+
* Model generator keys uniquely identify generators processing specific
|
|
136
|
+
* OpenAPI schema models. The key format is: `generatorId|refName`
|
|
137
|
+
*
|
|
138
|
+
* @param args - Model generator key arguments
|
|
139
|
+
* @returns A branded ModelGeneratorKey
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```typescript
|
|
143
|
+
* const key = toModelGeneratorKey({
|
|
144
|
+
* generatorId: 'typescript-interfaces',
|
|
145
|
+
* refName: 'User'
|
|
146
|
+
* });
|
|
147
|
+
* // Result: 'typescript-interfaces|User' (branded)
|
|
148
|
+
*
|
|
149
|
+
* const validationKey = toModelGeneratorKey({
|
|
150
|
+
* generatorId: 'zod-schemas',
|
|
151
|
+
* refName: 'CreateUserRequest'
|
|
152
|
+
* });
|
|
153
|
+
* // Result: 'zod-schemas|CreateUserRequest' (branded)
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
25
156
|
export declare const toModelGeneratorKey: ({ generatorId, refName }: ToModelGeneratorKeyArgs) => ModelGeneratorKey;
|
|
157
|
+
/**
|
|
158
|
+
* Arguments for {@link toGeneratorOnlyKey}.
|
|
159
|
+
*/
|
|
26
160
|
type ToGeneratorOnlyKeyArgs = {
|
|
161
|
+
/** Unique identifier for the generator */
|
|
27
162
|
generatorId: string;
|
|
28
163
|
};
|
|
164
|
+
/**
|
|
165
|
+
* Creates a generator-only key for global/utility generators.
|
|
166
|
+
*
|
|
167
|
+
* Generator-only keys identify generators that produce artifacts not tied
|
|
168
|
+
* to specific operations or models, such as configuration files, base classes,
|
|
169
|
+
* utilities, or documentation.
|
|
170
|
+
*
|
|
171
|
+
* @param args - Generator-only key arguments
|
|
172
|
+
* @returns A branded GeneratorOnlyKey
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```typescript
|
|
176
|
+
* const configKey = toGeneratorOnlyKey({
|
|
177
|
+
* generatorId: 'api-config'
|
|
178
|
+
* });
|
|
179
|
+
* // Result: 'api-config' (branded)
|
|
180
|
+
*
|
|
181
|
+
* const utilsKey = toGeneratorOnlyKey({
|
|
182
|
+
* generatorId: 'common-utilities'
|
|
183
|
+
* });
|
|
184
|
+
* // Result: 'common-utilities' (branded)
|
|
185
|
+
* ```
|
|
186
|
+
*/
|
|
29
187
|
export declare const toGeneratorOnlyKey: ({ generatorId }: ToGeneratorOnlyKeyArgs) => GeneratorOnlyKey;
|
|
188
|
+
/**
|
|
189
|
+
* Type guard to check if a value is a valid GeneratorKey.
|
|
190
|
+
*
|
|
191
|
+
* This function validates that the argument is one of the three
|
|
192
|
+
* generator key types: operation, model, or generator-only.
|
|
193
|
+
*
|
|
194
|
+
* @param arg - Value to check
|
|
195
|
+
* @returns True if the value is a valid GeneratorKey
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```typescript
|
|
199
|
+
* const key = 'api-client|/users|get';
|
|
200
|
+
*
|
|
201
|
+
* if (isGeneratorKey(key)) {
|
|
202
|
+
* // key is now typed as GeneratorKey
|
|
203
|
+
* const generatorId = toGeneratorId(key);
|
|
204
|
+
* console.log(generatorId); // 'api-client'
|
|
205
|
+
* }
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
30
208
|
export declare const isGeneratorKey: (arg: unknown) => arg is GeneratorKey;
|
|
209
|
+
/**
|
|
210
|
+
* Type guard to check if a value is a valid OperationGeneratorKey.
|
|
211
|
+
*
|
|
212
|
+
* Validates that the argument is a string with the correct format:
|
|
213
|
+
* `generatorId|path|method` where each part is non-empty and method
|
|
214
|
+
* is a valid HTTP method.
|
|
215
|
+
*
|
|
216
|
+
* @param arg - Value to check
|
|
217
|
+
* @returns True if the value is a valid OperationGeneratorKey
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```typescript
|
|
221
|
+
* const key = 'api-client|/users/{id}|get';
|
|
222
|
+
*
|
|
223
|
+
* if (isOperationGeneratorKey(key)) {
|
|
224
|
+
* // key is now typed as OperationGeneratorKey
|
|
225
|
+
* const obj = fromGeneratorKey(key);
|
|
226
|
+
* console.log(obj.type); // 'operation'
|
|
227
|
+
* console.log(obj.generatorId); // 'api-client'
|
|
228
|
+
* console.log(obj.path); // '/users/{id}'
|
|
229
|
+
* console.log(obj.method); // 'get'
|
|
230
|
+
* }
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
31
233
|
export declare const isOperationGeneratorKey: (arg: unknown) => arg is OperationGeneratorKey;
|
|
234
|
+
/**
|
|
235
|
+
* Type guard to check if a value is a valid ModelGeneratorKey.
|
|
236
|
+
*
|
|
237
|
+
* Validates that the argument is a string with the correct format:
|
|
238
|
+
* `generatorId|refName` where both parts are non-empty strings.
|
|
239
|
+
*
|
|
240
|
+
* @param arg - Value to check
|
|
241
|
+
* @returns True if the value is a valid ModelGeneratorKey
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* ```typescript
|
|
245
|
+
* const key = 'zod-schemas|User';
|
|
246
|
+
*
|
|
247
|
+
* if (isModelGeneratorKey(key)) {
|
|
248
|
+
* // key is now typed as ModelGeneratorKey
|
|
249
|
+
* const obj = fromGeneratorKey(key);
|
|
250
|
+
* console.log(obj.type); // 'model'
|
|
251
|
+
* console.log(obj.generatorId); // 'zod-schemas'
|
|
252
|
+
* console.log(obj.refName); // 'User'
|
|
253
|
+
* }
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
32
256
|
export declare const isModelGeneratorKey: (arg: unknown) => arg is ModelGeneratorKey;
|
|
257
|
+
/**
|
|
258
|
+
* Type guard to check if a value is a valid GeneratorOnlyKey.
|
|
259
|
+
*
|
|
260
|
+
* Validates that the argument is a non-empty string. Generator-only keys
|
|
261
|
+
* are simple strings containing just the generator ID.
|
|
262
|
+
*
|
|
263
|
+
* @param arg - Value to check
|
|
264
|
+
* @returns True if the value is a valid GeneratorOnlyKey
|
|
265
|
+
*
|
|
266
|
+
* @example
|
|
267
|
+
* ```typescript
|
|
268
|
+
* const key = 'api-config';
|
|
269
|
+
*
|
|
270
|
+
* if (isGeneratorOnlyKey(key)) {
|
|
271
|
+
* // key is now typed as GeneratorOnlyKey
|
|
272
|
+
* const obj = fromGeneratorKey(key);
|
|
273
|
+
* console.log(obj.type); // 'generator-only'
|
|
274
|
+
* console.log(obj.generatorId); // 'api-config'
|
|
275
|
+
* }
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
33
278
|
export declare const isGeneratorOnlyKey: (arg: unknown) => arg is GeneratorOnlyKey;
|
|
279
|
+
/**
|
|
280
|
+
* Extracts the generator ID from any type of GeneratorKey.
|
|
281
|
+
*
|
|
282
|
+
* This utility function parses the generator key to extract just the
|
|
283
|
+
* generator identifier, regardless of the key type. For operation and
|
|
284
|
+
* model keys, it extracts the first part before the pipe. For generator-only
|
|
285
|
+
* keys, it returns the entire key since it's just the generator ID.
|
|
286
|
+
*
|
|
287
|
+
* @param generatorKey - Any type of generator key
|
|
288
|
+
* @returns The generator ID string
|
|
289
|
+
*
|
|
290
|
+
* @example
|
|
291
|
+
* ```typescript
|
|
292
|
+
* const opKey = toOperationGeneratorKey({
|
|
293
|
+
* generatorId: 'api-client',
|
|
294
|
+
* path: '/users',
|
|
295
|
+
* method: 'get'
|
|
296
|
+
* });
|
|
297
|
+
* console.log(toGeneratorId(opKey)); // 'api-client'
|
|
298
|
+
*
|
|
299
|
+
* const modelKey = toModelGeneratorKey({
|
|
300
|
+
* generatorId: 'typescript-types',
|
|
301
|
+
* refName: 'User'
|
|
302
|
+
* });
|
|
303
|
+
* console.log(toGeneratorId(modelKey)); // 'typescript-types'
|
|
304
|
+
*
|
|
305
|
+
* const globalKey = toGeneratorOnlyKey({
|
|
306
|
+
* generatorId: 'utilities'
|
|
307
|
+
* });
|
|
308
|
+
* console.log(toGeneratorId(globalKey)); // 'utilities'
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
34
311
|
export declare const toGeneratorId: (generatorKey: GeneratorKey) => string;
|
|
312
|
+
/**
|
|
313
|
+
* Object representation of a parsed GeneratorKey.
|
|
314
|
+
*
|
|
315
|
+
* This discriminated union type represents the parsed components of any
|
|
316
|
+
* generator key, making it easier to work with key data in a structured way.
|
|
317
|
+
* The `type` field discriminates between the three key types.
|
|
318
|
+
*/
|
|
35
319
|
export type GeneratorKeyObject = {
|
|
320
|
+
/** Discriminator for operation generator keys */
|
|
36
321
|
type: 'operation';
|
|
322
|
+
/** Generator identifier */
|
|
37
323
|
generatorId: string;
|
|
324
|
+
/** API path */
|
|
38
325
|
path: string;
|
|
326
|
+
/** HTTP method */
|
|
39
327
|
method: Method;
|
|
40
328
|
} | {
|
|
329
|
+
/** Discriminator for model generator keys */
|
|
41
330
|
type: 'model';
|
|
331
|
+
/** Generator identifier */
|
|
42
332
|
generatorId: string;
|
|
333
|
+
/** Schema reference name */
|
|
43
334
|
refName: string;
|
|
44
335
|
} | {
|
|
336
|
+
/** Discriminator for generator-only keys */
|
|
45
337
|
type: 'generator-only';
|
|
338
|
+
/** Generator identifier */
|
|
46
339
|
generatorId: string;
|
|
47
340
|
};
|
|
341
|
+
/**
|
|
342
|
+
* Parses a GeneratorKey into its structured object representation.
|
|
343
|
+
*
|
|
344
|
+
* This function decomposes any generator key into a structured object
|
|
345
|
+
* with discriminated union types, making it easier to work with the
|
|
346
|
+
* key components in a type-safe manner.
|
|
347
|
+
*
|
|
348
|
+
* @param generatorKey - Any type of generator key to parse
|
|
349
|
+
* @returns Parsed generator key object with discriminated type
|
|
350
|
+
*
|
|
351
|
+
* @example Operation key parsing
|
|
352
|
+
* ```typescript
|
|
353
|
+
* const opKey = 'api-client|/users/{id}|get' as OperationGeneratorKey;
|
|
354
|
+
* const parsed = fromGeneratorKey(opKey);
|
|
355
|
+
*
|
|
356
|
+
* if (parsed.type === 'operation') {
|
|
357
|
+
* console.log(parsed.generatorId); // 'api-client'
|
|
358
|
+
* console.log(parsed.path); // '/users/{id}'
|
|
359
|
+
* console.log(parsed.method); // 'get'
|
|
360
|
+
* }
|
|
361
|
+
* ```
|
|
362
|
+
*
|
|
363
|
+
* @example Model key parsing
|
|
364
|
+
* ```typescript
|
|
365
|
+
* const modelKey = 'zod-schemas|User' as ModelGeneratorKey;
|
|
366
|
+
* const parsed = fromGeneratorKey(modelKey);
|
|
367
|
+
*
|
|
368
|
+
* if (parsed.type === 'model') {
|
|
369
|
+
* console.log(parsed.generatorId); // 'zod-schemas'
|
|
370
|
+
* console.log(parsed.refName); // 'User'
|
|
371
|
+
* }
|
|
372
|
+
* ```
|
|
373
|
+
*
|
|
374
|
+
* @example Generator-only key parsing
|
|
375
|
+
* ```typescript
|
|
376
|
+
* const globalKey = 'utilities' as GeneratorOnlyKey;
|
|
377
|
+
* const parsed = fromGeneratorKey(globalKey);
|
|
378
|
+
*
|
|
379
|
+
* if (parsed.type === 'generator-only') {
|
|
380
|
+
* console.log(parsed.generatorId); // 'utilities'
|
|
381
|
+
* }
|
|
382
|
+
* ```
|
|
383
|
+
*/
|
|
48
384
|
export declare const fromGeneratorKey: (generatorKey: GeneratorKey) => GeneratorKeyObject;
|
|
49
385
|
export {};
|
|
50
386
|
//# sourceMappingURL=GeneratorKeys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratorKeys.d.ts","sourceRoot":"","sources":["../../src/types/GeneratorKeys.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,KAAK,MAAM,EAAY,MAAM,aAAa,CAAA;AAEnD,MAAM,MAAM,0BAA0B,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;AAExE,MAAM,MAAM,sBAAsB,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAA;AAE1D,MAAM,MAAM,qBAAqB,GAAG,KAAK,CACvC,0BAA0B,EAC1B,uBAAuB,CACxB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,CACnC,sBAAsB,EACtB,mBAAmB,CACpB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;AAEhE,MAAM,MAAM,YAAY,GACpB,qBAAqB,GACrB,iBAAiB,GACjB,gBAAgB,CAAA;AAEpB,KAAK,2BAA2B,GAC5B;IACE,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf,GACD;IACE,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAEL,eAAO,MAAM,uBAAuB,GAAI,0BAGrC,2BAA2B,KAAG,qBAMhC,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,WAAW,EAAE,MAAM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