@conduit-client/model 3.7.0 → 3.8.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.
Files changed (57) hide show
  1. package/dist/types/v1/index.d.ts +2 -1
  2. package/dist/types/v1/parser/__tests__/test-utils.d.ts +433 -0
  3. package/dist/types/v1/{amf → parser/amf}/AMFAPI.d.ts +3 -5
  4. package/dist/types/v1/{amf → parser/amf}/amf-api-service.d.ts +1 -8
  5. package/dist/types/v1/{amf → parser/amf}/amf-utils.d.ts +1 -1
  6. package/dist/types/v1/{amf → parser/amf}/endpoints/amf-endpoint.d.ts +2 -2
  7. package/dist/types/v1/{amf → parser/amf}/endpoints/amf-operation.d.ts +314 -314
  8. package/dist/types/v1/{amf → parser/amf}/index.d.ts +0 -1
  9. package/dist/types/v1/{amf → parser/amf}/types/AMFAllOfType.d.ts +2 -2
  10. package/dist/types/v1/{amf → parser/amf}/types/AMFAnyType.d.ts +1 -1
  11. package/dist/types/v1/{amf → parser/amf}/types/AMFArrayType.d.ts +1 -1
  12. package/dist/types/v1/{amf → parser/amf}/types/AMFBaseType.d.ts +2 -2
  13. package/dist/types/v1/{amf → parser/amf}/types/AMFDiscriminatedObjectType.d.ts +2 -2
  14. package/dist/types/v1/{amf → parser/amf}/types/AMFEnumType.d.ts +3 -3
  15. package/dist/types/v1/{amf → parser/amf}/types/AMFNilType.d.ts +1 -1
  16. package/dist/types/v1/{amf → parser/amf}/types/AMFNotType.d.ts +3 -3
  17. package/dist/types/v1/{amf → parser/amf}/types/AMFObjectType.d.ts +1 -1
  18. package/dist/types/v1/{amf → parser/amf}/types/AMFOneOfType.d.ts +1 -1
  19. package/dist/types/v1/{amf → parser/amf}/types/AMFRefType.d.ts +1 -1
  20. package/dist/types/v1/{amf → parser/amf}/types/AMFScalarTypes.d.ts +3 -3
  21. package/dist/types/v1/parser/amf/types/__tests__/AMFOneOfType.spec.d.ts +1 -0
  22. package/dist/types/v1/parser/amf/types/__tests__/AMFScalarType.spec.d.ts +1 -0
  23. package/dist/types/v1/{amf → parser/amf}/types/factory.d.ts +2 -2
  24. package/dist/types/v1/{amf → parser/amf}/types/index.d.ts +1 -2
  25. package/dist/types/v1/parser/parser-utils.d.ts +10 -0
  26. package/dist/types/v1/parser/zod-schemas.d.ts +445 -0
  27. package/dist/v1/index.js +1847 -1819
  28. package/dist/v1/index.js.map +1 -1
  29. package/package.json +3 -3
  30. package/dist/types/v1/amf/__tests__/test-utils.d.ts +0 -211
  31. package/dist/types/v1/amf/types/annotations-schemas.d.ts +0 -172
  32. /package/dist/types/v1/{amf/types → parser}/__tests__/annotations-schemas.spec.d.ts +0 -0
  33. /package/dist/types/v1/{amf/__tests__/AMFAPI.spec.d.ts → parser/__tests__/parser-api.spec.d.ts} +0 -0
  34. /package/dist/types/v1/{amf/__tests__/amf-api-service.spec.d.ts → parser/__tests__/parser-utils.spec.d.ts} +0 -0
  35. /package/dist/types/v1/{amf/__tests__/amf-extensions-services.spec.d.ts → parser/__tests__/type-factory.spec.d.ts} +0 -0
  36. /package/dist/types/v1/{amf/__tests__/amf-extensions.spec.d.ts → parser/amf/__tests__/AMFAPI.spec.d.ts} +0 -0
  37. /package/dist/types/v1/{amf/__tests__/amf-utils.spec.d.ts → parser/amf/__tests__/amf-api-service.spec.d.ts} +0 -0
  38. /package/dist/types/v1/{amf/__tests__/parser.spec.d.ts → parser/amf/__tests__/amf-extensions-services.spec.d.ts} +0 -0
  39. /package/dist/types/v1/{amf/__tests__/validation.spec.d.ts → parser/amf/__tests__/amf-extensions.spec.d.ts} +0 -0
  40. /package/dist/types/v1/{amf/__tests__/version.spec.d.ts → parser/amf/__tests__/amf-utils.spec.d.ts} +0 -0
  41. /package/dist/types/v1/{amf/endpoints/__tests__/amf-endpoint.spec.d.ts → parser/amf/__tests__/parser.spec.d.ts} +0 -0
  42. /package/dist/types/v1/{amf/endpoints/__tests__/amf-operation.spec.d.ts → parser/amf/__tests__/validation.spec.d.ts} +0 -0
  43. /package/dist/types/v1/{amf/types/__tests__/AMFAnyType.spec.d.ts → parser/amf/__tests__/version.spec.d.ts} +0 -0
  44. /package/dist/types/v1/{amf → parser/amf}/amf-extensions.d.ts +0 -0
  45. /package/dist/types/v1/{amf/types/__tests__/AMFArrayType.spec.d.ts → parser/amf/endpoints/__tests__/amf-endpoint.spec.d.ts} +0 -0
  46. /package/dist/types/v1/{amf/types/__tests__/AMFBaseType.spec.d.ts → parser/amf/endpoints/__tests__/amf-operation.spec.d.ts} +0 -0
  47. /package/dist/types/v1/{amf → parser/amf}/parser.d.ts +0 -0
  48. /package/dist/types/v1/{amf/types/__tests__/AMFDiscriminatedObjectType.spec.d.ts → parser/amf/types/__tests__/AMFAnyType.spec.d.ts} +0 -0
  49. /package/dist/types/v1/{amf/types/__tests__/AMFEnumType.spec.d.ts → parser/amf/types/__tests__/AMFArrayType.spec.d.ts} +0 -0
  50. /package/dist/types/v1/{amf/types/__tests__/AMFNilType.spec.d.ts → parser/amf/types/__tests__/AMFBaseType.spec.d.ts} +0 -0
  51. /package/dist/types/v1/{amf/types/__tests__/AMFNotType.spec.d.ts → parser/amf/types/__tests__/AMFDiscriminatedObjectType.spec.d.ts} +0 -0
  52. /package/dist/types/v1/{amf/types/__tests__/AMFObjectType.spec.d.ts → parser/amf/types/__tests__/AMFEnumType.spec.d.ts} +0 -0
  53. /package/dist/types/v1/{amf/types/__tests__/AMFOneOfType.spec.d.ts → parser/amf/types/__tests__/AMFNilType.spec.d.ts} +0 -0
  54. /package/dist/types/v1/{amf/types/__tests__/AMFScalarType.spec.d.ts → parser/amf/types/__tests__/AMFNotType.spec.d.ts} +0 -0
  55. /package/dist/types/v1/{amf/types/__tests__/factory.spec.d.ts → parser/amf/types/__tests__/AMFObjectType.spec.d.ts} +0 -0
  56. /package/dist/types/v1/{amf → parser/amf}/validation.d.ts +0 -0
  57. /package/dist/types/v1/{amf → parser/amf}/version.d.ts +0 -0
@@ -1,3 +1,4 @@
1
1
  export * from './api';
2
2
  export * from './types';
3
- export * from './amf';
3
+ export * from './parser/amf';
4
+ export * from './parser/parser-utils';
@@ -0,0 +1,433 @@
1
+ import amf from 'amf-client-js';
2
+ import { AMFAPI } from '../amf/AMFAPI';
3
+ import { AMFType } from '../amf/types';
4
+ import { LoggerService } from '@conduit-client/utils';
5
+ import { Mock } from 'vitest';
6
+ import { TypeRegistry } from '../..';
7
+ export type ParserKind = 'amf';
8
+ type ClassOfConstructor<T> = T extends new () => infer R ? R : never;
9
+ /**
10
+ * Extracts the shape value types from a TestOAS structure.
11
+ * These are the amf.AnyShape instances available as properties on the TestOAS object.
12
+ */
13
+ export type TestOASShapeValue<T extends TestOAS<ParserKind, Record<string, new () => amf.AnyShape>, Record<string, string>>> = T extends {
14
+ document: amf.Document;
15
+ } ? Exclude<T[keyof T], amf.Document | amf.EndPoint> : never;
16
+ type TestAmfOAS<T extends Record<string, new () => amf.AnyShape>, E extends Record<string, string>> = {
17
+ document: amf.Document;
18
+ } & {
19
+ [P in keyof T]: ClassOfConstructor<T[P]>;
20
+ } & {
21
+ [P in keyof E]: amf.EndPoint;
22
+ };
23
+ export type TestOAS<K extends ParserKind, T extends Record<string, new () => amf.AnyShape>, E extends Record<string, string>> = K extends 'amf' ? TestAmfOAS<T, E> : never;
24
+ declare const specFileConfigs: {
25
+ readonly amfApi: {
26
+ readonly file: "amf-api.yaml";
27
+ readonly shapes: {
28
+ readonly Object_Simple: typeof amf.NodeShape;
29
+ readonly Object_Flat: typeof amf.NodeShape;
30
+ };
31
+ readonly endpoints: {};
32
+ };
33
+ readonly amfEndpoints: {
34
+ readonly file: "amf-endpoints.yaml";
35
+ readonly shapes: {};
36
+ readonly endpoints: {
37
+ readonly entityById: "/entity/{id}";
38
+ readonly entity: "/entity";
39
+ readonly auraEntityById: "/aura-entity/{id}";
40
+ readonly auraEntity: "/aura-entity";
41
+ readonly entityMissing: "/entity/missing";
42
+ readonly entityPost: "/entity-post";
43
+ };
44
+ };
45
+ readonly any: {
46
+ readonly file: "any.yaml";
47
+ readonly shapes: {
48
+ readonly Any: typeof amf.AnyShape;
49
+ };
50
+ readonly endpoints: {};
51
+ };
52
+ readonly arrays: {
53
+ readonly file: "arrays.yaml";
54
+ readonly shapes: {
55
+ readonly Array_Scalar: typeof amf.ArrayShape;
56
+ readonly Array_NestedObjectArray: typeof amf.ArrayShape;
57
+ readonly Object_Flat: typeof amf.NodeShape;
58
+ readonly Array_NoItems: typeof amf.ArrayShape;
59
+ };
60
+ readonly endpoints: {};
61
+ };
62
+ readonly datetimes: {
63
+ readonly file: "datetimes.yaml";
64
+ readonly shapes: {
65
+ readonly birthday: typeof amf.ScalarShape;
66
+ readonly created: typeof amf.ScalarShape;
67
+ };
68
+ readonly endpoints: {};
69
+ };
70
+ readonly discriminators: {
71
+ readonly file: "discriminators.yaml";
72
+ readonly shapes: {
73
+ readonly Object_Discriminated: typeof amf.NodeShape;
74
+ readonly Object_Discriminated_Type1: typeof amf.NodeShape;
75
+ readonly Object_Discriminated_Type2: typeof amf.NodeShape;
76
+ readonly Object_Discriminated_Incorrect_Mapping: typeof amf.NodeShape;
77
+ readonly Pet: typeof amf.NodeShape;
78
+ readonly Dog: typeof amf.AnyShape;
79
+ readonly Cat: typeof amf.AnyShape;
80
+ readonly Puppy: typeof amf.AnyShape;
81
+ readonly NewbornPuppy: typeof amf.AnyShape;
82
+ readonly MultipleDiscriminatorInheritance: typeof amf.AnyShape;
83
+ readonly InlineDiscriminator: typeof amf.AnyShape;
84
+ readonly InlineInheritedDiscriminator: typeof amf.AnyShape;
85
+ };
86
+ readonly endpoints: {};
87
+ };
88
+ readonly objects: {
89
+ readonly file: "objects.yaml";
90
+ readonly shapes: {
91
+ readonly Object_Simple: typeof amf.NodeShape;
92
+ readonly Object_Simple2: typeof amf.NodeShape;
93
+ readonly Object_Flat: typeof amf.NodeShape;
94
+ readonly Object_Nested: typeof amf.NodeShape;
95
+ readonly Object_With_Optional_Properties: typeof amf.NodeShape;
96
+ readonly Object_With_Explicit_Allowed_Additional_Properties: typeof amf.NodeShape;
97
+ readonly Object_No_Additional_Properties: typeof amf.NodeShape;
98
+ readonly Object_With_Inline_Additional_Properties_Schema: typeof amf.NodeShape;
99
+ readonly Object_With_Reference_Additional_Properties_Schema: typeof amf.NodeShape;
100
+ readonly StringType: typeof amf.ScalarShape;
101
+ readonly Object_Ref: typeof amf.NodeShape;
102
+ };
103
+ readonly endpoints: {};
104
+ };
105
+ readonly not: {
106
+ readonly file: "not.yaml";
107
+ readonly shapes: {
108
+ readonly Object: typeof amf.NodeShape;
109
+ readonly NotObject: typeof amf.AnyShape;
110
+ };
111
+ readonly endpoints: {};
112
+ };
113
+ readonly scalars: {
114
+ readonly file: "scalars.yaml";
115
+ readonly shapes: {
116
+ readonly Boolean: typeof amf.ScalarShape;
117
+ readonly Integer: typeof amf.ScalarShape;
118
+ readonly Int32: typeof amf.ScalarShape;
119
+ readonly Int64: typeof amf.ScalarShape;
120
+ readonly Number: typeof amf.ScalarShape;
121
+ readonly Float: typeof amf.ScalarShape;
122
+ readonly Double: typeof amf.ScalarShape;
123
+ readonly String: typeof amf.ScalarShape;
124
+ readonly Password: typeof amf.ScalarShape;
125
+ readonly AnyString: typeof amf.ScalarShape;
126
+ readonly Byte: typeof amf.ScalarShape;
127
+ readonly Binary: typeof amf.ScalarShape;
128
+ readonly Nullable_String: typeof amf.UnionShape;
129
+ readonly String_Inherited: typeof amf.ScalarShape;
130
+ };
131
+ readonly endpoints: {};
132
+ };
133
+ readonly invalidScalars: {
134
+ readonly file: "scalars-invalid.yaml";
135
+ readonly shapes: {
136
+ readonly IncorrectlyAnnotated: typeof amf.ScalarShape;
137
+ };
138
+ readonly endpoints: {};
139
+ };
140
+ readonly amfYamlExtensions: {
141
+ readonly file: "amf-extensions.yaml";
142
+ readonly shapes: {};
143
+ readonly endpoints: {
144
+ readonly entityById: "/entity/{id}";
145
+ readonly entityDetailsById: "/entity/{id}/details";
146
+ readonly entity: "/entity";
147
+ };
148
+ };
149
+ readonly amfAllOf: {
150
+ readonly file: "amf-allof.yaml";
151
+ readonly shapes: {
152
+ readonly Pet: typeof amf.NodeShape;
153
+ readonly Cat: typeof amf.AnyShape;
154
+ readonly Dog: typeof amf.AnyShape;
155
+ readonly AlternateDog: typeof amf.AnyShape;
156
+ readonly DiscriminatedPet: typeof amf.NodeShape;
157
+ readonly DiscriminatedCat: typeof amf.AnyShape;
158
+ readonly DiscriminatedDog: typeof amf.AnyShape;
159
+ readonly SelfReferencing: typeof amf.AnyShape;
160
+ };
161
+ readonly endpoints: {};
162
+ };
163
+ readonly amfOneOf: {
164
+ readonly file: "amf-oneof.yaml";
165
+ readonly shapes: {
166
+ readonly Pet: typeof amf.AnyShape;
167
+ readonly Cat: typeof amf.NodeShape;
168
+ readonly Dog: typeof amf.NodeShape;
169
+ };
170
+ readonly endpoints: {};
171
+ };
172
+ readonly amfAnyOf: {
173
+ readonly file: "amf-anyof.yaml";
174
+ readonly shapes: {
175
+ readonly Pet: typeof amf.AnyShape;
176
+ readonly Cat: typeof amf.NodeShape;
177
+ readonly Dog: typeof amf.NodeShape;
178
+ };
179
+ readonly endpoints: {};
180
+ };
181
+ readonly amfOperationInvalidErrorStrategy: {
182
+ readonly file: "amf-extensions-error-strategy-invalid.yaml";
183
+ readonly shapes: {};
184
+ readonly endpoints: {
185
+ readonly invalidErrorStrategy: "/invalidErrorStrategy";
186
+ };
187
+ };
188
+ readonly amfOperationInvalidOperationType: {
189
+ readonly file: "amf-extensions-operation-type-invalid.yaml";
190
+ readonly shapes: {};
191
+ readonly endpoints: {
192
+ readonly invalidOperationType: "/invalidOperationType";
193
+ };
194
+ };
195
+ readonly amfOperationExposeRefresh: {
196
+ readonly file: "amf-extensions-operation-expose-refresh.yaml";
197
+ readonly shapes: {};
198
+ readonly endpoints: {
199
+ readonly exposeRefreshDefault: "/exposeRefreshDefault";
200
+ readonly exposeRefreshTrue: "/exposeRefreshTrue";
201
+ readonly exposeRefreshFalse: "/exposeRefreshFalse";
202
+ };
203
+ };
204
+ readonly amfOperationExposeRefreshMutationInvalid: {
205
+ readonly file: "amf-extensions-operation-invalid-mutation-refresh.yaml";
206
+ readonly shapes: {};
207
+ readonly endpoints: {
208
+ readonly exposeRefreshDefault: "/exposeRefreshDefault";
209
+ readonly exposeRefreshTrue: "/exposeRefreshTrue";
210
+ readonly exposeRefreshFalse: "/exposeRefreshFalse";
211
+ };
212
+ };
213
+ readonly amfOperationExposeRefreshLegacyInvalid: {
214
+ readonly file: "amf-extensions-operation-invalid-legacy-refresh.yaml";
215
+ readonly shapes: {};
216
+ readonly endpoints: {
217
+ readonly exposeRefreshDefault: "/exposeRefreshDefault";
218
+ readonly exposeRefreshTrue: "/exposeRefreshTrue";
219
+ readonly exposeRefreshFalse: "/exposeRefreshFalse";
220
+ };
221
+ };
222
+ readonly amfOperationExposeRefreshLegacyMixed: {
223
+ readonly file: "amf-extensions-operation-expose-refresh-legacy-mixed.yaml";
224
+ readonly shapes: {};
225
+ readonly endpoints: {
226
+ readonly exposeRefreshTrueMixed: "/exposeRefreshTrueMixed";
227
+ };
228
+ };
229
+ readonly amfBindings: {
230
+ readonly file: "bindings.yaml";
231
+ readonly shapes: {};
232
+ readonly endpoints: {
233
+ readonly defaultOperationTypeGet: "/defaults/operation-type-get-no-bindings";
234
+ readonly defaultOperationTypePost: "/defaults/operation-type-post-no-bindings";
235
+ readonly defaultIdentifierDefaultsToOpId: "/defaults/identifier-from-operation-id";
236
+ readonly defaultBindingMutation: "/defaults/binding-imperative-for-mutation";
237
+ readonly defaultBindingQuery: "/defaults/binding-wire-for-query";
238
+ readonly defaultBindingForGetWithMutationOperationType: "/defaults/binding-wire-for-get-with-mutation-operation-type";
239
+ readonly successQuery: "/success/query-wire-imperative";
240
+ readonly successMutation: "/success/mutation-imperative";
241
+ readonly successMultipleBindings: "/success/multiple-bindings-with-unique-identifiers";
242
+ readonly successMultipleOperationsUniqueBindingIdentifier: "/success/multiple-operations-with-unique-identifier";
243
+ readonly failInvalidBindingType: "/fail/invalid-binding-type";
244
+ readonly failMutationWire: "/fail/mutation-wire";
245
+ readonly failMutationImperativeInvoker: "/fail/mutation-imperative-legacy";
246
+ readonly failNoIdentifierMulti: "/fail/no-identifier-multiple-bindings";
247
+ readonly failDuplicateIdentifier: "/fail/duplicate-identifier";
248
+ readonly failGetMethodWithMutationOperationTypeAndWireBinding: "/fail/get-method-with-mutation-operation-type-and-wire-binding";
249
+ readonly failGetMethodWithMutationOperationTypeAndImperativeInvokerBinding: "/fail/get-method-with-mutation-operation-type-and-imperative-legacy-binding";
250
+ readonly failMultipleOperationsShareBindingIdentifier: "/fail/multiple-operations-share-binding-identifier";
251
+ };
252
+ };
253
+ readonly amfGraphQLBindings: {
254
+ readonly file: "amf-extensions-bindings-graphql.yaml";
255
+ readonly shapes: {};
256
+ readonly endpoints: {
257
+ readonly graphqlMutationBindingSuccess: "/graphql/success/mutation-binding";
258
+ readonly nonGraphqlWithMutationBinding: "/graphql/fail/non-graphql-mutation-binding";
259
+ };
260
+ };
261
+ readonly bindingsValidation: {
262
+ readonly file: "bindings-validation.yaml";
263
+ readonly shapes: {};
264
+ readonly endpoints: {};
265
+ };
266
+ readonly enums: {
267
+ readonly file: "enums.yaml";
268
+ readonly shapes: {
269
+ readonly String_Enumerated: typeof amf.ScalarShape;
270
+ readonly String_Property_Enum: typeof amf.NodeShape;
271
+ readonly CustomDates: typeof amf.AnyShape;
272
+ readonly CustomCursorType: typeof amf.AnyShape;
273
+ };
274
+ readonly endpoints: {};
275
+ };
276
+ readonly additionalProperties: {
277
+ readonly file: "additional-properties.yaml";
278
+ readonly shapes: {
279
+ readonly Object_Simple: typeof amf.NodeShape;
280
+ readonly AdditionalPropertiesScalar: typeof amf.NodeShape;
281
+ readonly AdditionalPropertiesObject: typeof amf.NodeShape;
282
+ };
283
+ readonly endpoints: {};
284
+ };
285
+ readonly oneofs: {
286
+ readonly file: "oneof.yaml";
287
+ readonly shapes: {
288
+ readonly Object_Simple: typeof amf.NodeShape;
289
+ readonly Object_Simple2: typeof amf.NodeShape;
290
+ readonly OneOf: typeof amf.AnyShape;
291
+ readonly OneOf_Complex: typeof amf.AnyShape;
292
+ readonly OneOf_Inline_Inheritance: typeof amf.AnyShape;
293
+ readonly OneOf_Inline_Helper: typeof amf.NodeShape;
294
+ readonly OneOf_Inline_Properties: typeof amf.AnyShape;
295
+ readonly OneOf_With_Optional_Properties: typeof amf.AnyShape;
296
+ readonly CatOrDog: typeof amf.AnyShape;
297
+ readonly Cat: typeof amf.NodeShape;
298
+ readonly Dog: typeof amf.NodeShape;
299
+ };
300
+ readonly endpoints: {};
301
+ };
302
+ readonly errors: {
303
+ readonly file: "error.yaml";
304
+ readonly shapes: {
305
+ readonly CustomNonScalarOneOf: typeof amf.AnyShape;
306
+ readonly CustomObjectEnumType: typeof amf.NodeShape;
307
+ readonly CustomArrayEnumType: typeof amf.ArrayShape;
308
+ readonly MissingPropertyType: typeof amf.NodeShape;
309
+ };
310
+ readonly endpoints: {};
311
+ };
312
+ readonly base: {
313
+ readonly file: "base.yaml";
314
+ readonly shapes: {
315
+ readonly Anonymous: typeof amf.AnyShape;
316
+ readonly Identifiable: typeof amf.AnyShape;
317
+ readonly AnnotatedError: typeof amf.AnyShape;
318
+ };
319
+ readonly endpoints: {};
320
+ };
321
+ readonly typeValidation: {
322
+ readonly file: "type-validation.yaml";
323
+ readonly shapes: {};
324
+ readonly endpoints: {};
325
+ };
326
+ readonly endpointValidation: {
327
+ readonly file: "endpoint-validation.yaml";
328
+ readonly shapes: {};
329
+ readonly endpoints: {};
330
+ };
331
+ };
332
+ declare const defaultsConfigs: {
333
+ readonly apiOasUrl: {
334
+ readonly file: string;
335
+ readonly shapes: {};
336
+ readonly endpoints: {};
337
+ };
338
+ readonly errorRamlUrl: {
339
+ readonly file: string;
340
+ readonly shapes: {};
341
+ readonly endpoints: {};
342
+ };
343
+ readonly errorRamlUrl2: {
344
+ readonly file: string;
345
+ readonly shapes: {};
346
+ readonly endpoints: {};
347
+ };
348
+ };
349
+ declare const invalidationConfigs: {
350
+ readonly validOasUrl: {
351
+ readonly file: "amf-extensions-invalidation.yaml";
352
+ readonly shapes: {};
353
+ readonly endpoints: {};
354
+ };
355
+ readonly keyNameInvalidOasUrl: {
356
+ readonly file: "amf-extensions-invalidation-key-name-invalid.yaml";
357
+ readonly shapes: {};
358
+ readonly endpoints: {};
359
+ };
360
+ readonly keyValueInvalidOasUrl: {
361
+ readonly file: "amf-extensions-invalidation-key-value-invalid.yaml";
362
+ readonly shapes: {};
363
+ readonly endpoints: {};
364
+ };
365
+ readonly keyValuePrefixInvalidOasUrl: {
366
+ readonly file: "amf-extensions-invalidation-key-value-prefix-invalid.yaml";
367
+ readonly shapes: {};
368
+ readonly endpoints: {};
369
+ };
370
+ readonly invalidationInvalidOperationType: {
371
+ readonly file: "amf-extensions-invalidation-operation-type-invalid.yaml";
372
+ readonly shapes: {};
373
+ readonly endpoints: {};
374
+ };
375
+ readonly typeInvalidOasUrl: {
376
+ readonly file: "amf-extensions-invalidation-type-invalid.yaml";
377
+ readonly shapes: {};
378
+ readonly endpoints: {};
379
+ };
380
+ readonly typeInvalidFormatOasUrl: {
381
+ readonly file: "amf-extensions-invalidation-type-format-invalid.yaml";
382
+ readonly shapes: {};
383
+ readonly endpoints: {};
384
+ };
385
+ readonly typeUnidentifiableOasUrl: {
386
+ readonly file: "amf-extensions-invalidation-unidentifiable-type.yaml";
387
+ readonly shapes: {};
388
+ readonly endpoints: {};
389
+ };
390
+ readonly typeUnidentifiableInlineOasUrl: {
391
+ readonly file: "amf-extensions-invalidation-unidentifiable-type-inline.yaml";
392
+ readonly shapes: {};
393
+ readonly endpoints: {};
394
+ };
395
+ };
396
+ type SpecFileConfigs = typeof specFileConfigs;
397
+ type DefaultsConfigs = typeof defaultsConfigs;
398
+ type InvalidationConfigs = typeof invalidationConfigs;
399
+ type ConfigToResult<K extends ParserKind, C> = C extends {
400
+ shapes: infer T;
401
+ endpoints: infer E;
402
+ } ? T extends Record<string, new () => amf.AnyShape> ? E extends Record<string, string> ? TestOAS<K, T, E> : never : never : never;
403
+ export type SpecFiles<K extends ParserKind> = {
404
+ [P in keyof SpecFileConfigs]: ConfigToResult<K, SpecFileConfigs[P]>;
405
+ } & {
406
+ defaults: {
407
+ [P in keyof DefaultsConfigs]: ConfigToResult<K, DefaultsConfigs[P]>;
408
+ };
409
+ invalidation: {
410
+ [P in keyof InvalidationConfigs]: ConfigToResult<K, InvalidationConfigs[P]>;
411
+ };
412
+ };
413
+ export declare function readSpecFiles<K extends ParserKind>(kind: K): Promise<SpecFiles<K>>;
414
+ export declare function createAmfAPI(oas: TestOAS<'amf', {}, {}>, logger: LoggerService): AMFAPI;
415
+ export declare function createAmfTypeFactory(shape: amf.Shape, typeRegistry: TypeRegistry<AMFType>, logger: LoggerService, resolve?: boolean): AMFType;
416
+ /**
417
+ * Helper to assert that a message was logged containing all specified patterns.
418
+ * This makes tests resilient to changes in log order.
419
+ */
420
+ export declare function expectLogged(calls: Mock['mock']['calls'], ...patterns: string[]): void;
421
+ /**
422
+ * Count how many times a pattern appears in log calls.
423
+ */
424
+ export declare function countLogOccurrences(calls: Mock['mock']['calls'], pattern: string): number;
425
+ /**
426
+ * Assert a pattern appears exactly once in log calls.
427
+ */
428
+ export declare function expectLoggedOnce(calls: Mock['mock']['calls'], pattern: string): void;
429
+ /**
430
+ * Assert that after pattern A appears, pattern B appears next.
431
+ */
432
+ export declare function expectLogSequence(calls: Mock['mock']['calls'], patternA: string, patternB: string): void;
433
+ export {};
@@ -1,12 +1,10 @@
1
1
  import { type FileParserLogger, type NamedLoggerService } from '@conduit-client/utils';
2
- import { type ResolvedServiceOverrides } from '../api/service-overrides';
2
+ import { type ResolvedServiceOverrides } from '../../api/service-overrides';
3
3
  import type { AMFType } from './types';
4
- import type { API, EndPoint, Server } from '../api';
5
- import type { ReadOnlyTypeRegistry, TypeRegistry } from '../types';
4
+ import type { API, EndPoint, Server } from '../../api';
5
+ import type { ReadOnlyTypeRegistry, TypeRegistry } from '../../types';
6
6
  import type * as amf from 'amf-client-js';
7
7
  import type { NamedFeatureFlagsService } from '@conduit-client/service-feature-flags/v1';
8
- export declare const V1_VERSION = "1.0.0";
9
- export declare const ANONYMOUS_TYPE_NAME = "<anonymous>";
10
8
  export declare class AMFAPI implements API {
11
9
  readonly document: amf.Document;
12
10
  private services;
@@ -1,4 +1,4 @@
1
- import type { API, APIService } from '../api';
1
+ import type { APIService } from '../../api';
2
2
  import type { NamedLoggerService } from '@conduit-client/utils';
3
3
  import type { NamedFeatureFlagsService } from '@conduit-client/service-feature-flags/v1';
4
4
  /**
@@ -6,10 +6,3 @@ import type { NamedFeatureFlagsService } from '@conduit-client/service-feature-f
6
6
  * @returns a new APIService
7
7
  */
8
8
  export declare function amfAPIService(services: NamedLoggerService & NamedFeatureFlagsService): APIService;
9
- /**
10
- * Wraps an already-created API in an APIService.
11
- *
12
- * @param api an API
13
- * @returns
14
- */
15
- export declare function asAPIService(api: API): APIService;
@@ -1,5 +1,5 @@
1
1
  import amf from 'amf-client-js';
2
- import type { ScalarType } from '../types';
2
+ import type { ScalarType } from '../../types';
3
3
  export declare const STRING_DATA_TYPE = "http://www.w3.org/2001/XMLSchema#string";
4
4
  export declare const BOOLEAN_DATA_TYPE = "http://www.w3.org/2001/XMLSchema#boolean";
5
5
  export declare const INTEGER_DATA_TYPE = "http://www.w3.org/2001/XMLSchema#integer";
@@ -1,6 +1,6 @@
1
- import type { AuraController, AuraEndPoint, BaseEndPoint, HttpEndPoint, Parameter, Operation, Server, API } from '../../api';
1
+ import type { AuraController, AuraEndPoint, BaseEndPoint, HttpEndPoint, Parameter, Operation, Server, API } from '../../../api';
2
2
  import type { AMFType, AMFTypeFactory } from '../types';
3
- import type { TypeRegistry } from '../../types';
3
+ import type { TypeRegistry } from '../../../types';
4
4
  import type { FileParserLogger, LoggerService } from '@conduit-client/utils';
5
5
  import type amf from 'amf-client-js';
6
6
  export type AmfEndPoint = AmfAuraEndpoint | AmfHttpEndPoint;