@skmtc/core 0.0.492 → 0.0.494
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/context/GenerateContext.d.ts +9 -9
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +15 -12
- package/esm/dsl/ContentSettings.d.ts +6 -4
- package/esm/dsl/ContentSettings.d.ts.map +1 -1
- package/esm/dsl/ContentSettings.js +10 -2
- package/esm/dsl/GatewayBase.d.ts +5 -5
- package/esm/dsl/GatewayBase.d.ts.map +1 -1
- package/esm/dsl/Inserted.d.ts +5 -5
- package/esm/dsl/Inserted.d.ts.map +1 -1
- package/esm/dsl/model/ModelBase.d.ts +6 -6
- package/esm/dsl/model/ModelBase.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.d.ts +1 -1
- package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
- package/esm/dsl/model/ModelInsertable.d.ts +4 -3
- package/esm/dsl/model/ModelInsertable.d.ts.map +1 -1
- package/esm/dsl/model/toModelInsertable.d.ts +7 -5
- package/esm/dsl/model/toModelInsertable.d.ts.map +1 -1
- package/esm/dsl/model/toModelInsertable.js +6 -0
- package/esm/dsl/operation/OperationBase.d.ts +7 -7
- package/esm/dsl/operation/OperationBase.d.ts.map +1 -1
- package/esm/dsl/operation/OperationDriver.d.ts +1 -1
- package/esm/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/OperationInsertable.d.ts +8 -6
- package/esm/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationGateway.d.ts +4 -2
- package/esm/dsl/operation/toOperationGateway.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationGateway.js +6 -0
- package/esm/dsl/operation/toOperationInsertable.d.ts +8 -6
- package/esm/dsl/operation/toOperationInsertable.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationInsertable.js +6 -0
- package/esm/run/toSettings.js +4 -2
- package/esm/types/Settings.d.ts +212 -39
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +1 -1
- package/package.json +1 -1
- package/script/context/GenerateContext.d.ts +9 -9
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +15 -12
- package/script/dsl/ContentSettings.d.ts +6 -4
- package/script/dsl/ContentSettings.d.ts.map +1 -1
- package/script/dsl/ContentSettings.js +10 -2
- package/script/dsl/GatewayBase.d.ts +5 -5
- package/script/dsl/GatewayBase.d.ts.map +1 -1
- package/script/dsl/Inserted.d.ts +5 -5
- package/script/dsl/Inserted.d.ts.map +1 -1
- package/script/dsl/model/ModelBase.d.ts +6 -6
- package/script/dsl/model/ModelBase.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.d.ts +1 -1
- package/script/dsl/model/ModelDriver.d.ts.map +1 -1
- package/script/dsl/model/ModelInsertable.d.ts +4 -3
- package/script/dsl/model/ModelInsertable.d.ts.map +1 -1
- package/script/dsl/model/toModelInsertable.d.ts +7 -5
- package/script/dsl/model/toModelInsertable.d.ts.map +1 -1
- package/script/dsl/model/toModelInsertable.js +6 -0
- package/script/dsl/operation/OperationBase.d.ts +7 -7
- package/script/dsl/operation/OperationBase.d.ts.map +1 -1
- package/script/dsl/operation/OperationDriver.d.ts +1 -1
- package/script/dsl/operation/OperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/OperationInsertable.d.ts +8 -6
- package/script/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/script/dsl/operation/toOperationGateway.d.ts +4 -2
- package/script/dsl/operation/toOperationGateway.d.ts.map +1 -1
- package/script/dsl/operation/toOperationGateway.js +6 -0
- package/script/dsl/operation/toOperationInsertable.d.ts +8 -6
- package/script/dsl/operation/toOperationInsertable.d.ts.map +1 -1
- package/script/dsl/operation/toOperationInsertable.js +6 -0
- package/script/run/toSettings.js +4 -2
- package/script/types/Settings.d.ts +212 -39
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +1 -1
|
@@ -3,7 +3,7 @@ import { Definition } from '../dsl/Definition.js';
|
|
|
3
3
|
import type { OasDocument } from '../oas/document/Document.js';
|
|
4
4
|
import type { OasSchema } from '../oas/schema/Schema.js';
|
|
5
5
|
import type { OasRef } from '../oas/ref/Ref.js';
|
|
6
|
-
import type { ClientGeneratorSettings, ClientSettings } from '../types/Settings.js';
|
|
6
|
+
import type { ClientGeneratorSettings, ClientSettings, EnrichedSetting } from '../types/Settings.js';
|
|
7
7
|
import type { Method } from '../types/Method.js';
|
|
8
8
|
import type { OperationInsertable, OperationGateway } from '../dsl/operation/OperationInsertable.js';
|
|
9
9
|
import type { OasOperation } from '../oas/operation/Operation.js';
|
|
@@ -83,7 +83,7 @@ export type InsertModelArgs<V extends GeneratedValue, T extends GenerationType,
|
|
|
83
83
|
generation?: T;
|
|
84
84
|
destinationPath?: string;
|
|
85
85
|
};
|
|
86
|
-
export type InsertReturn<V extends GeneratedValue, T extends GenerationType> = Inserted<V, T>;
|
|
86
|
+
export type InsertReturn<V extends GeneratedValue, T extends GenerationType, EnrichmentType> = Inserted<V, T, EnrichmentType>;
|
|
87
87
|
type ToOperationSettingsArgs<V, EnrichmentType> = {
|
|
88
88
|
operation: OasOperation;
|
|
89
89
|
insertable: OperationInsertable<V, EnrichmentType>;
|
|
@@ -158,7 +158,7 @@ export declare class GenerateContext {
|
|
|
158
158
|
* insertable's driver
|
|
159
159
|
* @mutates this.files
|
|
160
160
|
*/
|
|
161
|
-
insertOperation<V extends GeneratedValue, T extends GenerationType, EnrichmentType>({ insertable, operation, generation, destinationPath }: InsertOperationArgs<V, T, EnrichmentType>): Inserted<V, T>;
|
|
161
|
+
insertOperation<V extends GeneratedValue, T extends GenerationType, EnrichmentType>({ insertable, operation, generation, destinationPath }: InsertOperationArgs<V, T, EnrichmentType>): Inserted<V, T, EnrichmentType>;
|
|
162
162
|
/**
|
|
163
163
|
* Insert model into the output file with path `destinationPath`.
|
|
164
164
|
*
|
|
@@ -173,7 +173,7 @@ export declare class GenerateContext {
|
|
|
173
173
|
* insertable's driver
|
|
174
174
|
* @mutates this.files
|
|
175
175
|
*/
|
|
176
|
-
insertModel<V extends GeneratedValue, T extends GenerationType, EnrichmentType>({ insertable, refName, generation, destinationPath }: InsertModelArgs<V, T, EnrichmentType>): Inserted<V, T>;
|
|
176
|
+
insertModel<V extends GeneratedValue, T extends GenerationType, EnrichmentType>({ insertable, refName, generation, destinationPath }: InsertModelArgs<V, T, EnrichmentType>): Inserted<V, T, EnrichmentType>;
|
|
177
177
|
/**
|
|
178
178
|
* Generate and return content settings for operation insertable and
|
|
179
179
|
* operation.
|
|
@@ -184,7 +184,7 @@ export declare class GenerateContext {
|
|
|
184
184
|
* @param { operation, insertable }
|
|
185
185
|
* @returns
|
|
186
186
|
*/
|
|
187
|
-
toOperationContentSettings<V, EnrichmentType>({ operation, insertable }: ToOperationSettingsArgs<V, EnrichmentType>): ContentSettings
|
|
187
|
+
toOperationContentSettings<V, EnrichmentType>({ operation, insertable }: ToOperationSettingsArgs<V, EnrichmentType>): ContentSettings<EnrichmentType>;
|
|
188
188
|
/**
|
|
189
189
|
* Generate and return content settings for model insertable and refName.
|
|
190
190
|
*
|
|
@@ -194,7 +194,7 @@ export declare class GenerateContext {
|
|
|
194
194
|
* @param { refName, insertable }
|
|
195
195
|
* @returns Content settings for model
|
|
196
196
|
*/
|
|
197
|
-
toModelContentSettings<V, EnrichmentType>({ refName, insertable }: BuildModelSettingsArgs<V, EnrichmentType>): ContentSettings
|
|
197
|
+
toModelContentSettings<V, EnrichmentType>({ refName, insertable }: BuildModelSettingsArgs<V, EnrichmentType>): ContentSettings<EnrichmentType>;
|
|
198
198
|
/**
|
|
199
199
|
* Generate and return content settings for a gateway
|
|
200
200
|
*
|
|
@@ -203,14 +203,14 @@ export declare class GenerateContext {
|
|
|
203
203
|
* @param gateway
|
|
204
204
|
* @returns Content settings for model
|
|
205
205
|
*/
|
|
206
|
-
toGatewayContentSetting<EnrichmentType>(gateway: OperationGateway<EnrichmentType>): ContentSettings
|
|
206
|
+
toGatewayContentSetting<EnrichmentType>(gateway: OperationGateway<EnrichmentType>): ContentSettings<EnrichmentType>;
|
|
207
207
|
/**
|
|
208
208
|
* Look up operation settings for a given generatorId, path and method.
|
|
209
209
|
* @param { generatorId, path, method }
|
|
210
210
|
* @returns Base settings for operation
|
|
211
211
|
*/
|
|
212
|
-
|
|
213
|
-
toModelSelected({ generatorId, refName }: GetModelSettingsArgs):
|
|
212
|
+
toOperationSettings({ generatorId, path, method }: GetOperationSettingsArgs): EnrichedSetting;
|
|
213
|
+
toModelSelected({ generatorId, refName }: GetModelSettingsArgs): EnrichedSetting;
|
|
214
214
|
toGeneratorSettings(generatorId: string): ClientGeneratorSettings | undefined;
|
|
215
215
|
/**
|
|
216
216
|
* Perform one lookup of schema by `refName`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenerateContext.d.ts","sourceRoot":"","sources":["../../src/context/GenerateContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"GenerateContext.d.ts","sourceRoot":"","sources":["../../src/context/GenerateContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,KAAK,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AW,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,wBAAwB,GAAG,eAAe;IAW7F,eAAe,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,oBAAoB,GAAG,eAAe;IAWhF,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS;IAe7E;;;;;OAKG;IACH,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IAUpE;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;CAGvE"}
|
|
@@ -282,15 +282,16 @@ export class GenerateContext {
|
|
|
282
282
|
* @returns
|
|
283
283
|
*/
|
|
284
284
|
toOperationContentSettings({ operation, insertable }) {
|
|
285
|
-
const
|
|
285
|
+
const settings = this.toOperationSettings({
|
|
286
286
|
generatorId: insertable.id,
|
|
287
287
|
path: operation.path,
|
|
288
288
|
method: operation.method
|
|
289
289
|
});
|
|
290
290
|
return new ContentSettings({
|
|
291
|
-
selected: Boolean(
|
|
291
|
+
selected: Boolean(settings),
|
|
292
292
|
identifier: insertable.toIdentifier(operation),
|
|
293
|
-
exportPath: insertable.toExportPath(operation)
|
|
293
|
+
exportPath: insertable.toExportPath(operation),
|
|
294
|
+
enrichments: insertable.toEnrichments(settings.enrichments)
|
|
294
295
|
});
|
|
295
296
|
}
|
|
296
297
|
/**
|
|
@@ -310,7 +311,8 @@ export class GenerateContext {
|
|
|
310
311
|
return new ContentSettings({
|
|
311
312
|
identifier: insertable.toIdentifier(refName),
|
|
312
313
|
selected: Boolean(selected),
|
|
313
|
-
exportPath: insertable.toExportPath(refName)
|
|
314
|
+
exportPath: insertable.toExportPath(refName),
|
|
315
|
+
enrichments: insertable.toEnrichments(refName)
|
|
314
316
|
});
|
|
315
317
|
}
|
|
316
318
|
/**
|
|
@@ -325,7 +327,8 @@ export class GenerateContext {
|
|
|
325
327
|
return new ContentSettings({
|
|
326
328
|
identifier: gateway.toIdentifier(),
|
|
327
329
|
selected: true,
|
|
328
|
-
exportPath: gateway.toExportPath()
|
|
330
|
+
exportPath: gateway.toExportPath(),
|
|
331
|
+
enrichments: gateway.toEnrichments()
|
|
329
332
|
});
|
|
330
333
|
}
|
|
331
334
|
/**
|
|
@@ -333,19 +336,19 @@ export class GenerateContext {
|
|
|
333
336
|
* @param { generatorId, path, method }
|
|
334
337
|
* @returns Base settings for operation
|
|
335
338
|
*/
|
|
336
|
-
|
|
339
|
+
toOperationSettings({ generatorId, path, method }) {
|
|
337
340
|
const generatorSettings = this.toGeneratorSettings(generatorId);
|
|
338
341
|
const operationSettings = generatorSettings && 'operations' in generatorSettings
|
|
339
342
|
? generatorSettings.operations[path]?.[method]
|
|
340
343
|
: undefined;
|
|
341
|
-
return operationSettings;
|
|
344
|
+
return operationSettings ?? { selected: false, enrichments: undefined };
|
|
342
345
|
}
|
|
343
346
|
toModelSelected({ generatorId, refName }) {
|
|
344
347
|
const generatorSettings = this.toGeneratorSettings(generatorId);
|
|
345
348
|
const modelSettings = generatorSettings && 'models' in generatorSettings
|
|
346
349
|
? generatorSettings.models[refName]
|
|
347
350
|
: undefined;
|
|
348
|
-
return modelSettings;
|
|
351
|
+
return modelSettings ?? { selected: false, enrichments: undefined };
|
|
349
352
|
}
|
|
350
353
|
toGeneratorSettings(generatorId) {
|
|
351
354
|
return this.settings?.generators?.find(({ id }) => id === generatorId);
|
|
@@ -394,12 +397,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
394
397
|
if (!generator.isSupported(operation)) {
|
|
395
398
|
return this.captureCurrentResult('notSupported');
|
|
396
399
|
}
|
|
397
|
-
const
|
|
400
|
+
const settings = this.toOperationSettings({
|
|
398
401
|
generatorId: generator.id,
|
|
399
402
|
path,
|
|
400
403
|
method
|
|
401
404
|
});
|
|
402
|
-
if (!
|
|
405
|
+
if (!settings) {
|
|
403
406
|
return this.captureCurrentResult('notSelected');
|
|
404
407
|
}
|
|
405
408
|
gatewayInstance.transformOperation(operation);
|
|
@@ -426,12 +429,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
426
429
|
if (!generator.isSupported(operation)) {
|
|
427
430
|
return this.captureCurrentResult('notSupported');
|
|
428
431
|
}
|
|
429
|
-
const
|
|
432
|
+
const settings = this.toOperationSettings({
|
|
430
433
|
generatorId: generator.id,
|
|
431
434
|
path,
|
|
432
435
|
method
|
|
433
436
|
});
|
|
434
|
-
if (!
|
|
437
|
+
if (!settings) {
|
|
435
438
|
return this.captureCurrentResult('notSelected');
|
|
436
439
|
}
|
|
437
440
|
this.insertOperation({ insertable: generator, operation });
|
|
@@ -3,17 +3,19 @@ type EmptyArgs = {
|
|
|
3
3
|
exportPath: string;
|
|
4
4
|
identifier: Identifier;
|
|
5
5
|
};
|
|
6
|
-
type CreateArgs = {
|
|
6
|
+
type CreateArgs<EnrichmentType> = {
|
|
7
7
|
identifier: Identifier;
|
|
8
8
|
selected: boolean;
|
|
9
9
|
exportPath: string;
|
|
10
|
+
enrichments: EnrichmentType;
|
|
10
11
|
};
|
|
11
|
-
export declare class ContentSettings {
|
|
12
|
+
export declare class ContentSettings<EnrichmentType> {
|
|
12
13
|
identifier: Identifier;
|
|
13
14
|
selected: boolean;
|
|
14
15
|
exportPath: string;
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
enrichments: EnrichmentType;
|
|
17
|
+
constructor({ identifier, selected, exportPath, enrichments }: CreateArgs<EnrichmentType>);
|
|
18
|
+
static empty({ identifier, exportPath }: EmptyArgs): ContentSettings<undefined>;
|
|
17
19
|
}
|
|
18
20
|
export {};
|
|
19
21
|
//# sourceMappingURL=ContentSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSettings.d.ts","sourceRoot":"","sources":["../../src/dsl/ContentSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,KAAK,SAAS,GAAG;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"ContentSettings.d.ts","sourceRoot":"","sources":["../../src/dsl/ContentSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,KAAK,SAAS,GAAG;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,KAAK,UAAU,CAAC,cAAc,IAAI;IAChC,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,cAAc,CAAA;CAC5B,CAAA;AAED,qBAAa,eAAe,CAAC,cAAc;IACzC,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,cAAc,CAAA;gBACf,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,UAAU,CAAC,cAAc,CAAC;IAOzF,MAAM,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;CAQhF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export class ContentSettings {
|
|
2
|
-
constructor({ identifier, selected, exportPath }) {
|
|
2
|
+
constructor({ identifier, selected, exportPath, enrichments }) {
|
|
3
3
|
Object.defineProperty(this, "identifier", {
|
|
4
4
|
enumerable: true,
|
|
5
5
|
configurable: true,
|
|
@@ -18,15 +18,23 @@ export class ContentSettings {
|
|
|
18
18
|
writable: true,
|
|
19
19
|
value: void 0
|
|
20
20
|
});
|
|
21
|
+
Object.defineProperty(this, "enrichments", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true,
|
|
25
|
+
value: void 0
|
|
26
|
+
});
|
|
21
27
|
this.identifier = identifier;
|
|
22
28
|
this.selected = selected;
|
|
23
29
|
this.exportPath = exportPath;
|
|
30
|
+
this.enrichments = enrichments;
|
|
24
31
|
}
|
|
25
32
|
static empty({ identifier, exportPath }) {
|
|
26
33
|
return new ContentSettings({
|
|
27
34
|
selected: true,
|
|
28
35
|
identifier,
|
|
29
|
-
exportPath
|
|
36
|
+
exportPath,
|
|
37
|
+
enrichments: undefined
|
|
30
38
|
});
|
|
31
39
|
}
|
|
32
40
|
}
|
package/esm/dsl/GatewayBase.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { GenerateContext, RegisterArgs } from '../context/GenerateContext.js';
|
|
2
2
|
import type { ContentSettings } from './ContentSettings.js';
|
|
3
3
|
import { ValueBase } from './ValueBase.js';
|
|
4
|
-
export type OperationGatewayArgs = {
|
|
4
|
+
export type OperationGatewayArgs<EnrichmentType> = {
|
|
5
5
|
context: GenerateContext;
|
|
6
|
-
settings: ContentSettings
|
|
6
|
+
settings: ContentSettings<EnrichmentType>;
|
|
7
7
|
};
|
|
8
|
-
export declare class GatewayBase extends ValueBase {
|
|
9
|
-
settings: ContentSettings
|
|
10
|
-
constructor({ context, settings }: OperationGatewayArgs);
|
|
8
|
+
export declare class GatewayBase<EnrichmentType> extends ValueBase {
|
|
9
|
+
settings: ContentSettings<EnrichmentType>;
|
|
10
|
+
constructor({ context, settings }: OperationGatewayArgs<EnrichmentType>);
|
|
11
11
|
register(args: Omit<RegisterArgs, 'destinationPath'>): void;
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=GatewayBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GatewayBase.d.ts","sourceRoot":"","sources":["../../src/dsl/GatewayBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"GatewayBase.d.ts","sourceRoot":"","sources":["../../src/dsl/GatewayBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,MAAM,oBAAoB,CAAC,cAAc,IAAI;IACjD,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;CAC1C,CAAA;AAED,qBAAa,WAAW,CAAC,cAAc,CAAE,SAAQ,SAAS;IACxD,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;gBAE7B,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,oBAAoB,CAAC,cAAc,CAAC;IAM9D,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,iBAAiB,CAAC;CAM9D"}
|
package/esm/dsl/Inserted.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { GeneratedDefinition, GeneratedValue, GenerationType } from '../types/GeneratedValue.js';
|
|
2
2
|
import type { ContentSettings } from './ContentSettings.js';
|
|
3
3
|
import type { Identifier } from './Identifier.js';
|
|
4
|
-
type ConstructorArgs<V extends GeneratedValue, T extends GenerationType> = {
|
|
5
|
-
settings: ContentSettings
|
|
4
|
+
type ConstructorArgs<V extends GeneratedValue, T extends GenerationType, EnrichmentType> = {
|
|
5
|
+
settings: ContentSettings<EnrichmentType>;
|
|
6
6
|
definition: GeneratedDefinition<V, T>;
|
|
7
7
|
};
|
|
8
|
-
export declare class Inserted<V extends GeneratedValue, T extends GenerationType> {
|
|
9
|
-
settings: ContentSettings
|
|
8
|
+
export declare class Inserted<V extends GeneratedValue, T extends GenerationType, EnrichmentType> {
|
|
9
|
+
settings: ContentSettings<EnrichmentType>;
|
|
10
10
|
definition: GeneratedDefinition<V, T>;
|
|
11
|
-
constructor({ settings, definition }: ConstructorArgs<V, T>);
|
|
11
|
+
constructor({ settings, definition }: ConstructorArgs<V, T, EnrichmentType>);
|
|
12
12
|
toName(): string;
|
|
13
13
|
toIdentifier(): Identifier;
|
|
14
14
|
toExportPath(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inserted.d.ts","sourceRoot":"","sources":["../../src/dsl/Inserted.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,cAAc,EACf,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,IAAI;
|
|
1
|
+
{"version":3,"file":"Inserted.d.ts","sourceRoot":"","sources":["../../src/dsl/Inserted.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,cAAc,EACf,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,cAAc,IAAI;IACzF,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IACzC,UAAU,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CACtC,CAAA;AAED,qBAAa,QAAQ,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,cAAc;IACtF,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IACzC,UAAU,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;gBACzB,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,cAAc,CAAC;IAK3E,MAAM,IAAI,MAAM;IAIhB,YAAY,IAAI,UAAU;IAI1B,YAAY,IAAI,MAAM;IAItB,OAAO,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,SAAS;CAGjD"}
|
|
@@ -6,18 +6,18 @@ import type { ContentSettings } from '../ContentSettings.js';
|
|
|
6
6
|
import type { ModelInsertable } from './ModelInsertable.js';
|
|
7
7
|
import { ValueBase } from '../ValueBase.js';
|
|
8
8
|
import type { Inserted } from '../Inserted.js';
|
|
9
|
-
export type ModelBaseArgs = {
|
|
9
|
+
export type ModelBaseArgs<EnrichmentType> = {
|
|
10
10
|
context: GenerateContext;
|
|
11
|
-
settings: ContentSettings
|
|
11
|
+
settings: ContentSettings<EnrichmentType>;
|
|
12
12
|
generatorKey: GeneratorKey;
|
|
13
13
|
refName: RefName;
|
|
14
14
|
};
|
|
15
|
-
export declare class ModelBase extends ValueBase {
|
|
16
|
-
settings: ContentSettings
|
|
15
|
+
export declare class ModelBase<EnrichmentType> extends ValueBase {
|
|
16
|
+
settings: ContentSettings<EnrichmentType>;
|
|
17
17
|
refName: RefName;
|
|
18
18
|
generatorKey: GeneratorKey;
|
|
19
|
-
constructor({ context, settings, generatorKey, refName }: ModelBaseArgs);
|
|
20
|
-
insertModel<V extends GeneratedValue, EnrichmentType>(insertable: ModelInsertable<V, EnrichmentType>, refName: RefName): Inserted<V, 'force'>;
|
|
19
|
+
constructor({ context, settings, generatorKey, refName }: ModelBaseArgs<EnrichmentType>);
|
|
20
|
+
insertModel<V extends GeneratedValue, EnrichmentType>(insertable: ModelInsertable<V, EnrichmentType>, refName: RefName): Inserted<V, 'force', EnrichmentType>;
|
|
21
21
|
register(args: Omit<RegisterArgs, 'destinationPath'>): void;
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=ModelBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"ModelBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,aAAa,CAAC,cAAc,IAAI;IAC1C,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IACzC,YAAY,EAAE,YAAY,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,qBAAa,SAAS,CAAC,cAAc,CAAE,SAAQ,SAAS;IACtD,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IACzC,OAAO,EAAE,OAAO,CAAA;IAEP,YAAY,EAAE,YAAY,CAAA;gBACvB,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,aAAa,CAAC,cAAc,CAAC;IAQvF,WAAW,CAAC,CAAC,SAAS,cAAc,EAAE,cAAc,EAClD,UAAU,EAAE,eAAe,CAAC,CAAC,EAAE,cAAc,CAAC,EAC9C,OAAO,EAAE,OAAO,GACf,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC;IAS9B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,iBAAiB,CAAC,GAAG,IAAI;CAMrE"}
|
|
@@ -15,7 +15,7 @@ export declare class ModelDriver<V extends GeneratedValue, T extends GenerationT
|
|
|
15
15
|
context: GenerateContext;
|
|
16
16
|
insertable: ModelInsertable<V, EnrichmentType>;
|
|
17
17
|
refName: RefName;
|
|
18
|
-
settings: ContentSettings
|
|
18
|
+
settings: ContentSettings<EnrichmentType>;
|
|
19
19
|
destinationPath?: string;
|
|
20
20
|
definition: GeneratedDefinition<V, T>;
|
|
21
21
|
constructor({ context, insertable, refName, generation, destinationPath }: CreateModelArgs<V, T, EnrichmentType>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelDriver.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAI5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAGrD,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,cAAc,IAAI;IACzF,OAAO,EAAE,eAAe,CAAA;IACxB,UAAU,EAAE,eAAe,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;IAC9C,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,CAAC,CAAA;IACd,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAWD,qBAAa,WAAW,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,cAAc;IACzF,OAAO,EAAE,eAAe,CAAA;IACxB,UAAU,EAAE,eAAe,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;IAC9C,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"ModelDriver.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAI5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAGrD,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,cAAc,IAAI;IACzF,OAAO,EAAE,eAAe,CAAA;IACxB,UAAU,EAAE,eAAe,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;IAC9C,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,CAAC,CAAA;IACd,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAWD,qBAAa,WAAW,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,cAAc;IACzF,OAAO,EAAE,eAAe,CAAA;IACxB,UAAU,EAAE,eAAe,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;IAC9C,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IACzC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;gBACzB,EACV,OAAO,EACP,UAAU,EACV,OAAO,EACP,UAAU,EACV,eAAe,EAChB,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,cAAc,CAAC;IAWxC,OAAO,CAAC,KAAK;IAsBb,OAAO,CAAC,aAAa;IA+BrB,OAAO,CAAC,gBAAgB;CAqBzB"}
|
|
@@ -3,10 +3,10 @@ import type { ContentSettings } from '../ContentSettings.js';
|
|
|
3
3
|
import type { RefName } from '../../types/RefName.js';
|
|
4
4
|
import type { Identifier } from '../Identifier.js';
|
|
5
5
|
import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
6
|
-
type ModelInsertableConstructorArgs = {
|
|
6
|
+
type ModelInsertableConstructorArgs<EnrichmentType> = {
|
|
7
7
|
context: GenerateContext;
|
|
8
8
|
refName: RefName;
|
|
9
|
-
settings: ContentSettings
|
|
9
|
+
settings: ContentSettings<EnrichmentType>;
|
|
10
10
|
destinationPath: string;
|
|
11
11
|
};
|
|
12
12
|
export type WithTransformModel = {
|
|
@@ -15,13 +15,14 @@ export type WithTransformModel = {
|
|
|
15
15
|
export type ModelInsertable<V, EnrichmentType> = {
|
|
16
16
|
prototype: V;
|
|
17
17
|
} & {
|
|
18
|
-
new ({ context, refName, settings, destinationPath }: ModelInsertableConstructorArgs): V;
|
|
18
|
+
new ({ context, refName, settings, destinationPath }: ModelInsertableConstructorArgs<EnrichmentType>): V;
|
|
19
19
|
id: string;
|
|
20
20
|
type: 'model';
|
|
21
21
|
_class: 'ModelInsertable';
|
|
22
22
|
toIdentifier: (refName: RefName) => Identifier;
|
|
23
23
|
toExportPath: (refName: RefName) => string;
|
|
24
24
|
toEnrichmentRequest?: (refName: RefName) => EnrichmentRequest<EnrichmentType> | undefined;
|
|
25
|
+
toEnrichments: (refName: RefName) => EnrichmentType;
|
|
25
26
|
isSupported: () => boolean;
|
|
26
27
|
pinnable: boolean;
|
|
27
28
|
} & Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAEzE,KAA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,CAAC,OAAO,EAAE,OAAO,KAAK,cAAc,CAAA;IACnD,WAAW,EAAE,MAAM,OAAO,CAAA;IAE1B,QAAQ,EAAE,OAAO,CAAA;CAGlB,GAAG,QAAQ,CAAA"}
|
|
@@ -3,9 +3,9 @@ import type { RefName } from '../../types/RefName.js';
|
|
|
3
3
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
4
|
import type { Identifier } from '../Identifier.js';
|
|
5
5
|
import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
6
|
-
export type ModelInsertableArgs = {
|
|
6
|
+
export type ModelInsertableArgs<EnrichmentType> = {
|
|
7
7
|
context: GenerateContext;
|
|
8
|
-
settings: ContentSettings
|
|
8
|
+
settings: ContentSettings<EnrichmentType>;
|
|
9
9
|
refName: RefName;
|
|
10
10
|
};
|
|
11
11
|
export type ModelConfig<EnrichmentType> = {
|
|
@@ -13,13 +13,14 @@ export type ModelConfig<EnrichmentType> = {
|
|
|
13
13
|
toIdentifier: (refName: RefName) => Identifier;
|
|
14
14
|
toExportPath: (refName: RefName) => string;
|
|
15
15
|
toEnrichmentRequest?: (refName: RefName) => EnrichmentRequest<EnrichmentType> | undefined;
|
|
16
|
+
toEnrichments?: (value: unknown) => EnrichmentType;
|
|
16
17
|
};
|
|
17
18
|
export declare const toModelInsertable: <EnrichmentType>(config: ModelConfig<EnrichmentType>) => {
|
|
18
|
-
new (args: ModelInsertableArgs): {
|
|
19
|
-
settings: ContentSettings
|
|
19
|
+
new (args: ModelInsertableArgs<EnrichmentType>): {
|
|
20
|
+
settings: ContentSettings<EnrichmentType>;
|
|
20
21
|
refName: RefName;
|
|
21
22
|
generatorKey: import("../../types/GeneratorKeys.js").GeneratorKey;
|
|
22
|
-
insertModel<V extends import("../../mod.js").GeneratedValue, EnrichmentType_1>(insertable: import("./ModelInsertable.js").ModelInsertable<V, EnrichmentType_1>, refName: RefName): import("../Inserted.js").Inserted<V, "force">;
|
|
23
|
+
insertModel<V extends import("../../mod.js").GeneratedValue, EnrichmentType_1>(insertable: import("./ModelInsertable.js").ModelInsertable<V, EnrichmentType_1>, refName: RefName): import("../Inserted.js").Inserted<V, "force", EnrichmentType_1>;
|
|
23
24
|
register(args: Omit<import("../../context/GenerateContext.js").RegisterArgs, "destinationPath">): void;
|
|
24
25
|
context: GenerateContext;
|
|
25
26
|
skipped: boolean;
|
|
@@ -30,6 +31,7 @@ export declare const toModelInsertable: <EnrichmentType>(config: ModelConfig<Enr
|
|
|
30
31
|
toIdentifier: (refName: RefName) => Identifier;
|
|
31
32
|
toExportPath: (refName: RefName) => string;
|
|
32
33
|
toEnrichmentRequest: ((refName: RefName) => EnrichmentRequest<EnrichmentType> | undefined) | undefined;
|
|
34
|
+
toEnrichments: ((value: unknown) => EnrichmentType) | undefined;
|
|
33
35
|
isSupported: () => boolean;
|
|
34
36
|
pinnable: boolean;
|
|
35
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,MAAM,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"toModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,MAAM,MAAM,mBAAmB,CAAC,cAAc,IAAI;IAChD,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IACzC,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,WAAW,CAAC,cAAc,IAAI;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,UAAU,CAAA;IAC9C,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;IAC1C,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,iBAAiB,CAAC,cAAc,CAAC,GAAG,SAAS,CAAA;IACzF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,cAAc,CAAA;CACnD,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,cAAc,UAAU,WAAW,CAAC,cAAc,CAAC;eAc/D,mBAAmB,CAAC,cAAc,CAAC;;;;;;;;;;;;4BApB/B,OAAO,KAAK,UAAU;4BACtB,OAAO,KAAK,MAAM;oCACV,OAAO,KAAK,iBAAiB,gBAAgB,GAAG,SAAS;4BACjE,OAAO;;;CA6BhC,CAAA"}
|
|
@@ -54,6 +54,12 @@ export const toModelInsertable = (config) => {
|
|
|
54
54
|
writable: true,
|
|
55
55
|
value: config.toEnrichmentRequest?.bind(config)
|
|
56
56
|
}),
|
|
57
|
+
Object.defineProperty(_a, "toEnrichments", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
configurable: true,
|
|
60
|
+
writable: true,
|
|
61
|
+
value: config.toEnrichments?.bind(config)
|
|
62
|
+
}),
|
|
57
63
|
Object.defineProperty(_a, "isSupported", {
|
|
58
64
|
enumerable: true,
|
|
59
65
|
configurable: true,
|
|
@@ -11,9 +11,9 @@ import type { SchemaToValueFn, SchemaType, TypeSystemOutput } from '../../types/
|
|
|
11
11
|
import type { Inserted } from '../Inserted.js';
|
|
12
12
|
import type { ModelInsertable } from '../model/ModelInsertable.js';
|
|
13
13
|
import type { RefName } from '../../types/RefName.js';
|
|
14
|
-
export type OperationBaseArgs = {
|
|
14
|
+
export type OperationBaseArgs<EnrichmentType> = {
|
|
15
15
|
context: GenerateContext;
|
|
16
|
-
settings: ContentSettings
|
|
16
|
+
settings: ContentSettings<EnrichmentType>;
|
|
17
17
|
generatorKey: GeneratorKey;
|
|
18
18
|
operation: OasOperation;
|
|
19
19
|
};
|
|
@@ -22,13 +22,13 @@ type CreateAndRegisterDefinition<Schema extends SchemaType> = {
|
|
|
22
22
|
identifier: Identifier;
|
|
23
23
|
schemaToValueFn: SchemaToValueFn;
|
|
24
24
|
};
|
|
25
|
-
export declare class OperationBase extends ValueBase {
|
|
26
|
-
settings: ContentSettings
|
|
25
|
+
export declare class OperationBase<EnrichmentType> extends ValueBase {
|
|
26
|
+
settings: ContentSettings<EnrichmentType>;
|
|
27
27
|
operation: OasOperation;
|
|
28
28
|
generatorKey: GeneratorKey;
|
|
29
|
-
constructor({ context, generatorKey, settings, operation }: OperationBaseArgs);
|
|
30
|
-
insertOperation<V extends GeneratedValue, EnrichmentType>(insertable: OperationInsertable<V, EnrichmentType>, operation: OasOperation): Inserted<V, 'force'>;
|
|
31
|
-
insertModel<V extends GeneratedValue, EnrichmentType>(insertable: ModelInsertable<V, EnrichmentType>, refName: RefName): Inserted<V, 'force'>;
|
|
29
|
+
constructor({ context, generatorKey, settings, operation }: OperationBaseArgs<EnrichmentType>);
|
|
30
|
+
insertOperation<V extends GeneratedValue, EnrichmentType>(insertable: OperationInsertable<V, EnrichmentType>, operation: OasOperation): Inserted<V, 'force', EnrichmentType>;
|
|
31
|
+
insertModel<V extends GeneratedValue, EnrichmentType>(insertable: ModelInsertable<V, EnrichmentType>, refName: RefName): Inserted<V, 'force', EnrichmentType>;
|
|
32
32
|
createAndRegisterDefinition<Schema extends SchemaType>({ schema, identifier, schemaToValueFn }: CreateAndRegisterDefinition<Schema>): Definition<TypeSystemOutput<Schema['type']>>;
|
|
33
33
|
register(args: Omit<RegisterArgs, 'destinationPath'>): void;
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC9F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAErD,MAAM,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"OperationBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationBase.ts"],"names":[],"mappings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C,SAAS,EAAE,YAAY,CAAA;IACd,YAAY,EAAE,YAAY,CAAA;gBAEvB,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,CAAC,cAAc,CAAC;IAQ7F,eAAe,CAAC,CAAC,SAAS,cAAc,EAAE,cAAc,EACtD,UAAU,EAAE,mBAAmB,CAAC,CAAC,EAAE,cAAc,CAAC,EAClD,SAAS,EAAE,YAAY,GACtB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC;IASvC,WAAW,CAAC,CAAC,SAAS,cAAc,EAAE,cAAc,EAClD,UAAU,EAAE,eAAe,CAAC,CAAC,EAAE,cAAc,CAAC,EAC9C,OAAO,EAAE,OAAO,GACf,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC;IASvC,2BAA2B,CAAC,MAAM,SAAS,UAAU,EAAE,EACrD,MAAM,EACN,UAAU,EACV,eAAe,EAChB,EAAE,2BAA2B,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAS5E,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,iBAAiB,CAAC;CAM9D"}
|
|
@@ -15,7 +15,7 @@ export declare class OperationDriver<V extends GeneratedValue, T extends Generat
|
|
|
15
15
|
context: GenerateContext;
|
|
16
16
|
insertable: OperationInsertable<V, EnrichmentType>;
|
|
17
17
|
operation: OasOperation;
|
|
18
|
-
settings: ContentSettings
|
|
18
|
+
settings: ContentSettings<EnrichmentType>;
|
|
19
19
|
destinationPath?: string;
|
|
20
20
|
definition: GeneratedDefinition<V, T>;
|
|
21
21
|
constructor({ context, insertable, operation, generation, destinationPath }: CreateOperationArgs<V, T, EnrichmentType>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationDriver.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationDriver.ts"],"names":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CAAA;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,KAAK,mBAAmB,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,cAAc,IAAI;IAC7F,OAAO,EAAE,eAAe,CAAA;IACxB,UAAU,EAAE,mBAAmB,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;IAClD,SAAS,EAAE,YAAY,CAAA;IACvB,UAAU,CAAC,EAAE,CAAC,CAAA;IACd,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAYD,qBAAa,eAAe,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,cAAc;IAC7F,OAAO,EAAE,eAAe,CAAA;IACxB,UAAU,EAAE,mBAAmB,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;IAClD,SAAS,EAAE,YAAY,CAAA;IACvB,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IACzC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;gBAEzB,EACV,OAAO,EACP,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EAChB,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,cAAc,CAAC;IAc5C,OAAO,CAAC,KAAK;IAsBb,OAAO,CAAC,aAAa;IA8BrB,OAAO,CAAC,gBAAgB;CAqBzB"}
|
|
@@ -3,39 +3,41 @@ import type { ContentSettings } from '../ContentSettings.js';
|
|
|
3
3
|
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
4
4
|
import type { Identifier } from '../Identifier.js';
|
|
5
5
|
import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
6
|
-
type OperationInsertableConstructorArgs = {
|
|
6
|
+
type OperationInsertableConstructorArgs<EnrichmentType> = {
|
|
7
7
|
context: GenerateContext;
|
|
8
|
-
settings: ContentSettings
|
|
8
|
+
settings: ContentSettings<EnrichmentType>;
|
|
9
9
|
operation: OasOperation;
|
|
10
10
|
};
|
|
11
11
|
export type WithTransformOperation = {
|
|
12
12
|
transformOperation: (operation: OasOperation) => void;
|
|
13
13
|
};
|
|
14
|
-
export type OperationOperationGatewayArgs = {
|
|
14
|
+
export type OperationOperationGatewayArgs<EnrichmentType> = {
|
|
15
15
|
context: GenerateContext;
|
|
16
|
-
settings: ContentSettings
|
|
16
|
+
settings: ContentSettings<EnrichmentType>;
|
|
17
17
|
};
|
|
18
18
|
export type OperationGateway<EnrichmentType> = {
|
|
19
|
-
new ({ context, settings }: OperationOperationGatewayArgs): WithTransformOperation;
|
|
19
|
+
new ({ context, settings }: OperationOperationGatewayArgs<EnrichmentType>): WithTransformOperation;
|
|
20
20
|
id: string;
|
|
21
21
|
type: 'operation';
|
|
22
22
|
_class: 'OperationGateway';
|
|
23
23
|
toIdentifier: () => Identifier;
|
|
24
24
|
toExportPath: () => string;
|
|
25
25
|
toEnrichmentRequest?: (operation: OasOperation) => EnrichmentRequest<EnrichmentType> | undefined;
|
|
26
|
+
toEnrichments: () => EnrichmentType;
|
|
26
27
|
isSupported: (operation: OasOperation) => boolean;
|
|
27
28
|
pinnable: boolean;
|
|
28
29
|
};
|
|
29
30
|
export type OperationInsertable<V, EnrichmentType> = {
|
|
30
31
|
prototype: V;
|
|
31
32
|
} & {
|
|
32
|
-
new ({ context, settings, operation }: OperationInsertableConstructorArgs): V;
|
|
33
|
+
new ({ context, settings, operation }: OperationInsertableConstructorArgs<EnrichmentType>): V;
|
|
33
34
|
id: string;
|
|
34
35
|
type: 'operation';
|
|
35
36
|
_class: 'OperationInsertable';
|
|
36
37
|
toIdentifier: (operation: OasOperation) => Identifier;
|
|
37
38
|
toExportPath: (operation: OasOperation) => string;
|
|
38
39
|
toEnrichmentRequest?: (operation: OasOperation) => EnrichmentRequest<EnrichmentType> | undefined;
|
|
40
|
+
toEnrichments: (value: unknown) => EnrichmentType;
|
|
39
41
|
isSupported: (operation: OasOperation) => boolean;
|
|
40
42
|
pinnable: boolean;
|
|
41
43
|
} & Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAEzE,KAAK,kCAAkC,
|
|
1
|
+
{"version":3,"file":"OperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAEzE,KAAK,kCAAkC,CAAC,cAAc,IAAI;IACxD,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IACzC,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,kBAAkB,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,IAAI,CAAA;CACtD,CAAA;AAED,MAAM,MAAM,6BA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,cAAc,CAAA;IACjD,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAEjD,QAAQ,EAAE,OAAO,CAAA;CAGlB,GAAG,QAAQ,CAAA"}
|
|
@@ -8,10 +8,11 @@ export type ToOperationGatewayArgs<EnrichmentType> = {
|
|
|
8
8
|
toExportPath: () => string;
|
|
9
9
|
isSupported?: (operation: OasOperation) => boolean;
|
|
10
10
|
toEnrichmentRequest?: (operation: OasOperation) => EnrichmentRequest<EnrichmentType> | undefined;
|
|
11
|
+
toEnrichments?: (operation: OasOperation) => EnrichmentType | undefined;
|
|
11
12
|
};
|
|
12
13
|
export declare const toOperationGateway: <EnrichmentType>(config: ToOperationGatewayArgs<EnrichmentType>) => {
|
|
13
|
-
new ({ context, settings }: OperationGatewayArgs): {
|
|
14
|
-
settings: import("../ContentSettings.js").ContentSettings
|
|
14
|
+
new ({ context, settings }: OperationGatewayArgs<EnrichmentType>): {
|
|
15
|
+
settings: import("../ContentSettings.js").ContentSettings<EnrichmentType>;
|
|
15
16
|
register(args: Omit<import("../../mod.js").RegisterArgs, "destinationPath">): void;
|
|
16
17
|
context: import("../../mod.js").GenerateContext;
|
|
17
18
|
skipped: boolean;
|
|
@@ -23,6 +24,7 @@ export declare const toOperationGateway: <EnrichmentType>(config: ToOperationGat
|
|
|
23
24
|
toIdentifier: () => Identifier;
|
|
24
25
|
toExportPath: () => string;
|
|
25
26
|
toEnrichmentRequest: ((operation: OasOperation) => EnrichmentRequest<EnrichmentType> | undefined) | undefined;
|
|
27
|
+
toEnrichments: ((operation: OasOperation) => EnrichmentType | undefined) | undefined;
|
|
26
28
|
isSupported: (operation: OasOperation) => boolean;
|
|
27
29
|
pinnable: boolean;
|
|
28
30
|
};
|