@aws/nx-plugin 0.14.2 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-THIRD-PARTY +2 -2
- package/package.json +2 -2
- package/src/open-api/ts-client/__snapshots__/generator.additional-properties.spec.ts.snap +2236 -0
- package/src/open-api/ts-client/__snapshots__/generator.complex-types.spec.ts.snap +2307 -0
- package/src/open-api/ts-client/__snapshots__/generator.composite-types.spec.ts.snap +1495 -0
- package/src/open-api/ts-client/__snapshots__/generator.primitive-types.spec.ts.snap +1470 -0
- package/src/open-api/ts-client/__snapshots__/generator.request.spec.ts.snap +1138 -0
- package/src/open-api/ts-client/__snapshots__/generator.response.spec.ts.snap +732 -0
- package/src/open-api/ts-client/__snapshots__/generator.tags.spec.ts.snap +743 -0
- package/src/open-api/ts-client/files/client.gen.ts.template +52 -15
- package/src/open-api/ts-client/files/types.gen.ts.template +5 -0
- package/src/open-api/ts-hooks/__snapshots__/generator.spec.tsx.snap +1092 -0
- package/src/open-api/ts-hooks/files/options-proxy.gen.ts.template +210 -0
- package/src/open-api/ts-hooks/generator.d.ts +5 -0
- package/src/open-api/ts-hooks/generator.js +15 -2
- package/src/open-api/ts-hooks/generator.js.map +1 -1
- package/src/open-api/ts-hooks/generator.spec.tsx +1787 -0
- package/src/open-api/utils/codegen-data/types.d.ts +25 -0
- package/src/open-api/utils/codegen-data/types.js +26 -1
- package/src/open-api/utils/codegen-data/types.js.map +1 -1
- package/src/open-api/utils/codegen-data.js +187 -79
- package/src/open-api/utils/codegen-data.js.map +1 -1
- package/src/open-api/utils/normalise.js +11 -1
- package/src/open-api/utils/normalise.js.map +1 -1
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +21 -6
- package/src/py/fast-api/files/app/__name__/init.py.template +11 -2
- package/src/py/fast-api/files/app/__name__/main.py.template +8 -3
- package/src/py/fast-api/react/__snapshots__/generator.spec.ts.snap +120 -10
- package/src/py/fast-api/react/files/website/components/__apiNameClassName__Provider.tsx.template +40 -0
- package/src/py/fast-api/react/files/website/hooks/use__apiNameClassName__.tsx.template +13 -18
- package/src/py/fast-api/react/files/website/hooks/use__apiNameClassName__Client.tsx.template +13 -0
- package/src/py/fast-api/react/generator.js +35 -9
- package/src/py/fast-api/react/generator.js.map +1 -1
- package/src/py/project/generator.js +5 -0
- package/src/py/project/generator.js.map +1 -1
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +7 -9
- package/src/utils/files/http-api/common/constructs/src/core/http-api.ts.template +7 -9
- package/src/open-api/ts-client/__snapshots__/generator.spec.ts.snap +0 -7880
|
@@ -0,0 +1,2236 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`openApiTsClientGenerator - complex types > should handle response objects with a mixture of properties and additionalProperties 1`] = `
|
|
4
|
+
"export type GetDynamicPropertiesAny200Response = {
|
|
5
|
+
id: string;
|
|
6
|
+
timestamp?: Date;
|
|
7
|
+
[additionalProperties: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
export type GetDynamicPropertiesNested200Response = {
|
|
10
|
+
id: string;
|
|
11
|
+
version?: string;
|
|
12
|
+
[
|
|
13
|
+
additionalProperties: string
|
|
14
|
+
]: unknown /* GetDynamicPropertiesNested200ResponseValue */;
|
|
15
|
+
};
|
|
16
|
+
export type GetDynamicPropertiesNested200ResponseValue = {
|
|
17
|
+
name: string;
|
|
18
|
+
config?: { [key: string]: number };
|
|
19
|
+
};
|
|
20
|
+
export type GetDynamicPropertiesNumbers200Response = {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
[additionalProperties: string]: unknown /* number */;
|
|
24
|
+
};
|
|
25
|
+
export type GetDynamicPropertiesObjects200Response = {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
lastModifiedTimestamp?: Date;
|
|
29
|
+
[
|
|
30
|
+
additionalProperties: string
|
|
31
|
+
]: unknown /* GetDynamicPropertiesObjects200ResponseValue */;
|
|
32
|
+
};
|
|
33
|
+
export type GetDynamicPropertiesObjects200ResponseValue = {
|
|
34
|
+
title: string;
|
|
35
|
+
value: number;
|
|
36
|
+
active?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type GetDynamicPropertyValues200Response = {
|
|
39
|
+
[key: string]: GetDynamicPropertyValues200ResponseValue;
|
|
40
|
+
};
|
|
41
|
+
export type GetDynamicPropertyValues200ResponseValue = {
|
|
42
|
+
value: string;
|
|
43
|
+
metadata?: { [key: string]: unknown };
|
|
44
|
+
};
|
|
45
|
+
export type GetDynamicPropertiesAnyError = never;
|
|
46
|
+
export type GetDynamicPropertiesNestedError = never;
|
|
47
|
+
export type GetDynamicPropertiesNumbersError = never;
|
|
48
|
+
export type GetDynamicPropertiesObjectsError = never;
|
|
49
|
+
export type GetDynamicPropertyValuesError = never;
|
|
50
|
+
"
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
exports[`openApiTsClientGenerator - complex types > should handle response objects with a mixture of properties and additionalProperties 2`] = `
|
|
54
|
+
"import type {
|
|
55
|
+
GetDynamicPropertiesAny200Response,
|
|
56
|
+
GetDynamicPropertiesNested200Response,
|
|
57
|
+
GetDynamicPropertiesNested200ResponseValue,
|
|
58
|
+
GetDynamicPropertiesNumbers200Response,
|
|
59
|
+
GetDynamicPropertiesObjects200Response,
|
|
60
|
+
GetDynamicPropertiesObjects200ResponseValue,
|
|
61
|
+
GetDynamicPropertyValues200Response,
|
|
62
|
+
GetDynamicPropertyValues200ResponseValue,
|
|
63
|
+
} from './types.gen.js';
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Utility for serialisation and deserialisation of API types.
|
|
67
|
+
*/
|
|
68
|
+
export class $IO {
|
|
69
|
+
protected static $mapValues = (data: any, fn: (item: any) => any) =>
|
|
70
|
+
Object.fromEntries(Object.entries(data).map(([k, v]) => [k, fn(v)]));
|
|
71
|
+
|
|
72
|
+
public static GetDynamicPropertiesAny200Response = {
|
|
73
|
+
toJson: (model: GetDynamicPropertiesAny200Response): any => {
|
|
74
|
+
if (model === undefined || model === null) {
|
|
75
|
+
return model;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
...$IO.$mapValues(
|
|
79
|
+
Object.fromEntries(
|
|
80
|
+
Object.entries(model).filter(
|
|
81
|
+
([key]) => !['id', 'timestamp'].includes(key),
|
|
82
|
+
),
|
|
83
|
+
),
|
|
84
|
+
(additionalProperty) => additionalProperty,
|
|
85
|
+
),
|
|
86
|
+
...(model.id === undefined
|
|
87
|
+
? {}
|
|
88
|
+
: {
|
|
89
|
+
id: model.id,
|
|
90
|
+
}),
|
|
91
|
+
...(model.timestamp === undefined
|
|
92
|
+
? {}
|
|
93
|
+
: {
|
|
94
|
+
timestamp: model.timestamp.toISOString(),
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
fromJson: (json: any): GetDynamicPropertiesAny200Response => {
|
|
99
|
+
if (json === undefined || json === null) {
|
|
100
|
+
return json;
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
...$IO.$mapValues(
|
|
104
|
+
Object.fromEntries(
|
|
105
|
+
Object.entries(json).filter(
|
|
106
|
+
([key]) => !['id', 'timestamp'].includes(key),
|
|
107
|
+
),
|
|
108
|
+
),
|
|
109
|
+
(additionalProperty) => additionalProperty,
|
|
110
|
+
),
|
|
111
|
+
id: json['id'],
|
|
112
|
+
...(json['timestamp'] === undefined
|
|
113
|
+
? {}
|
|
114
|
+
: {
|
|
115
|
+
timestamp: new Date(json['timestamp']),
|
|
116
|
+
}),
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
public static GetDynamicPropertiesNested200Response = {
|
|
122
|
+
toJson: (model: GetDynamicPropertiesNested200Response): any => {
|
|
123
|
+
if (model === undefined || model === null) {
|
|
124
|
+
return model;
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
...$IO.$mapValues(
|
|
128
|
+
Object.fromEntries(
|
|
129
|
+
Object.entries(model).filter(
|
|
130
|
+
([key]) => !['id', 'version'].includes(key),
|
|
131
|
+
),
|
|
132
|
+
),
|
|
133
|
+
(additionalProperty) =>
|
|
134
|
+
$IO.GetDynamicPropertiesNested200ResponseValue.toJson(
|
|
135
|
+
additionalProperty,
|
|
136
|
+
),
|
|
137
|
+
),
|
|
138
|
+
...(model.id === undefined
|
|
139
|
+
? {}
|
|
140
|
+
: {
|
|
141
|
+
id: model.id,
|
|
142
|
+
}),
|
|
143
|
+
...(model.version === undefined
|
|
144
|
+
? {}
|
|
145
|
+
: {
|
|
146
|
+
version: model.version,
|
|
147
|
+
}),
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
fromJson: (json: any): GetDynamicPropertiesNested200Response => {
|
|
151
|
+
if (json === undefined || json === null) {
|
|
152
|
+
return json;
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
...$IO.$mapValues(
|
|
156
|
+
Object.fromEntries(
|
|
157
|
+
Object.entries(json).filter(
|
|
158
|
+
([key]) => !['id', 'version'].includes(key),
|
|
159
|
+
),
|
|
160
|
+
),
|
|
161
|
+
(additionalProperty) =>
|
|
162
|
+
$IO.GetDynamicPropertiesNested200ResponseValue.fromJson(
|
|
163
|
+
additionalProperty,
|
|
164
|
+
),
|
|
165
|
+
),
|
|
166
|
+
id: json['id'],
|
|
167
|
+
...(json['version'] === undefined
|
|
168
|
+
? {}
|
|
169
|
+
: {
|
|
170
|
+
version: json['version'],
|
|
171
|
+
}),
|
|
172
|
+
};
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
public static GetDynamicPropertiesNested200ResponseValue = {
|
|
177
|
+
toJson: (model: GetDynamicPropertiesNested200ResponseValue): any => {
|
|
178
|
+
if (model === undefined || model === null) {
|
|
179
|
+
return model;
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
...(model.name === undefined
|
|
183
|
+
? {}
|
|
184
|
+
: {
|
|
185
|
+
name: model.name,
|
|
186
|
+
}),
|
|
187
|
+
...(model.config === undefined
|
|
188
|
+
? {}
|
|
189
|
+
: {
|
|
190
|
+
config: model.config,
|
|
191
|
+
}),
|
|
192
|
+
};
|
|
193
|
+
},
|
|
194
|
+
fromJson: (json: any): GetDynamicPropertiesNested200ResponseValue => {
|
|
195
|
+
if (json === undefined || json === null) {
|
|
196
|
+
return json;
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
name: json['name'],
|
|
200
|
+
...(json['config'] === undefined
|
|
201
|
+
? {}
|
|
202
|
+
: {
|
|
203
|
+
config: json['config'],
|
|
204
|
+
}),
|
|
205
|
+
};
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
public static GetDynamicPropertiesNumbers200Response = {
|
|
210
|
+
toJson: (model: GetDynamicPropertiesNumbers200Response): any => {
|
|
211
|
+
if (model === undefined || model === null) {
|
|
212
|
+
return model;
|
|
213
|
+
}
|
|
214
|
+
return {
|
|
215
|
+
...$IO.$mapValues(
|
|
216
|
+
Object.fromEntries(
|
|
217
|
+
Object.entries(model).filter(
|
|
218
|
+
([key]) => !['id', 'name'].includes(key),
|
|
219
|
+
),
|
|
220
|
+
),
|
|
221
|
+
(additionalProperty) => additionalProperty,
|
|
222
|
+
),
|
|
223
|
+
...(model.id === undefined
|
|
224
|
+
? {}
|
|
225
|
+
: {
|
|
226
|
+
id: model.id,
|
|
227
|
+
}),
|
|
228
|
+
...(model.name === undefined
|
|
229
|
+
? {}
|
|
230
|
+
: {
|
|
231
|
+
name: model.name,
|
|
232
|
+
}),
|
|
233
|
+
};
|
|
234
|
+
},
|
|
235
|
+
fromJson: (json: any): GetDynamicPropertiesNumbers200Response => {
|
|
236
|
+
if (json === undefined || json === null) {
|
|
237
|
+
return json;
|
|
238
|
+
}
|
|
239
|
+
return {
|
|
240
|
+
...$IO.$mapValues(
|
|
241
|
+
Object.fromEntries(
|
|
242
|
+
Object.entries(json).filter(
|
|
243
|
+
([key]) => !['id', 'name'].includes(key),
|
|
244
|
+
),
|
|
245
|
+
),
|
|
246
|
+
(additionalProperty) => additionalProperty,
|
|
247
|
+
),
|
|
248
|
+
id: json['id'],
|
|
249
|
+
name: json['name'],
|
|
250
|
+
};
|
|
251
|
+
},
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
public static GetDynamicPropertiesObjects200Response = {
|
|
255
|
+
toJson: (model: GetDynamicPropertiesObjects200Response): any => {
|
|
256
|
+
if (model === undefined || model === null) {
|
|
257
|
+
return model;
|
|
258
|
+
}
|
|
259
|
+
return {
|
|
260
|
+
...$IO.$mapValues(
|
|
261
|
+
Object.fromEntries(
|
|
262
|
+
Object.entries(model).filter(
|
|
263
|
+
([key]) => !['id', 'name', 'lastModifiedTimestamp'].includes(key),
|
|
264
|
+
),
|
|
265
|
+
),
|
|
266
|
+
(additionalProperty) =>
|
|
267
|
+
$IO.GetDynamicPropertiesObjects200ResponseValue.toJson(
|
|
268
|
+
additionalProperty,
|
|
269
|
+
),
|
|
270
|
+
),
|
|
271
|
+
...(model.id === undefined
|
|
272
|
+
? {}
|
|
273
|
+
: {
|
|
274
|
+
id: model.id,
|
|
275
|
+
}),
|
|
276
|
+
...(model.name === undefined
|
|
277
|
+
? {}
|
|
278
|
+
: {
|
|
279
|
+
name: model.name,
|
|
280
|
+
}),
|
|
281
|
+
...(model.lastModifiedTimestamp === undefined
|
|
282
|
+
? {}
|
|
283
|
+
: {
|
|
284
|
+
last_modified_timestamp:
|
|
285
|
+
model.lastModifiedTimestamp.toISOString(),
|
|
286
|
+
}),
|
|
287
|
+
};
|
|
288
|
+
},
|
|
289
|
+
fromJson: (json: any): GetDynamicPropertiesObjects200Response => {
|
|
290
|
+
if (json === undefined || json === null) {
|
|
291
|
+
return json;
|
|
292
|
+
}
|
|
293
|
+
return {
|
|
294
|
+
...$IO.$mapValues(
|
|
295
|
+
Object.fromEntries(
|
|
296
|
+
Object.entries(json).filter(
|
|
297
|
+
([key]) =>
|
|
298
|
+
!['id', 'name', 'last_modified_timestamp'].includes(key),
|
|
299
|
+
),
|
|
300
|
+
),
|
|
301
|
+
(additionalProperty) =>
|
|
302
|
+
$IO.GetDynamicPropertiesObjects200ResponseValue.fromJson(
|
|
303
|
+
additionalProperty,
|
|
304
|
+
),
|
|
305
|
+
),
|
|
306
|
+
id: json['id'],
|
|
307
|
+
name: json['name'],
|
|
308
|
+
...(json['last_modified_timestamp'] === undefined
|
|
309
|
+
? {}
|
|
310
|
+
: {
|
|
311
|
+
lastModifiedTimestamp: new Date(json['last_modified_timestamp']),
|
|
312
|
+
}),
|
|
313
|
+
};
|
|
314
|
+
},
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
public static GetDynamicPropertiesObjects200ResponseValue = {
|
|
318
|
+
toJson: (model: GetDynamicPropertiesObjects200ResponseValue): any => {
|
|
319
|
+
if (model === undefined || model === null) {
|
|
320
|
+
return model;
|
|
321
|
+
}
|
|
322
|
+
return {
|
|
323
|
+
...(model.title === undefined
|
|
324
|
+
? {}
|
|
325
|
+
: {
|
|
326
|
+
title: model.title,
|
|
327
|
+
}),
|
|
328
|
+
...(model.value === undefined
|
|
329
|
+
? {}
|
|
330
|
+
: {
|
|
331
|
+
value: model.value,
|
|
332
|
+
}),
|
|
333
|
+
...(model.active === undefined
|
|
334
|
+
? {}
|
|
335
|
+
: {
|
|
336
|
+
active: model.active,
|
|
337
|
+
}),
|
|
338
|
+
};
|
|
339
|
+
},
|
|
340
|
+
fromJson: (json: any): GetDynamicPropertiesObjects200ResponseValue => {
|
|
341
|
+
if (json === undefined || json === null) {
|
|
342
|
+
return json;
|
|
343
|
+
}
|
|
344
|
+
return {
|
|
345
|
+
title: json['title'],
|
|
346
|
+
value: json['value'],
|
|
347
|
+
...(json['active'] === undefined
|
|
348
|
+
? {}
|
|
349
|
+
: {
|
|
350
|
+
active: json['active'],
|
|
351
|
+
}),
|
|
352
|
+
};
|
|
353
|
+
},
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
public static GetDynamicPropertyValues200Response = {
|
|
357
|
+
toJson: (model: GetDynamicPropertyValues200Response): any => {
|
|
358
|
+
if (model === undefined || model === null) {
|
|
359
|
+
return model;
|
|
360
|
+
}
|
|
361
|
+
return {
|
|
362
|
+
...$IO.$mapValues(
|
|
363
|
+
model,
|
|
364
|
+
$IO.GetDynamicPropertyValues200ResponseValue.toJson,
|
|
365
|
+
),
|
|
366
|
+
};
|
|
367
|
+
},
|
|
368
|
+
fromJson: (json: any): GetDynamicPropertyValues200Response => {
|
|
369
|
+
if (json === undefined || json === null) {
|
|
370
|
+
return json;
|
|
371
|
+
}
|
|
372
|
+
return {
|
|
373
|
+
...$IO.$mapValues(
|
|
374
|
+
json,
|
|
375
|
+
$IO.GetDynamicPropertyValues200ResponseValue.fromJson,
|
|
376
|
+
),
|
|
377
|
+
};
|
|
378
|
+
},
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
public static GetDynamicPropertyValues200ResponseValue = {
|
|
382
|
+
toJson: (model: GetDynamicPropertyValues200ResponseValue): any => {
|
|
383
|
+
if (model === undefined || model === null) {
|
|
384
|
+
return model;
|
|
385
|
+
}
|
|
386
|
+
return {
|
|
387
|
+
...(model.value === undefined
|
|
388
|
+
? {}
|
|
389
|
+
: {
|
|
390
|
+
value: model.value,
|
|
391
|
+
}),
|
|
392
|
+
...(model.metadata === undefined
|
|
393
|
+
? {}
|
|
394
|
+
: {
|
|
395
|
+
metadata: $IO.$mapValues(model.metadata, (item0) => item0),
|
|
396
|
+
}),
|
|
397
|
+
};
|
|
398
|
+
},
|
|
399
|
+
fromJson: (json: any): GetDynamicPropertyValues200ResponseValue => {
|
|
400
|
+
if (json === undefined || json === null) {
|
|
401
|
+
return json;
|
|
402
|
+
}
|
|
403
|
+
return {
|
|
404
|
+
value: json['value'],
|
|
405
|
+
...(json['metadata'] === undefined
|
|
406
|
+
? {}
|
|
407
|
+
: {
|
|
408
|
+
metadata: $IO.$mapValues(json['metadata'], (item0) => item0),
|
|
409
|
+
}),
|
|
410
|
+
};
|
|
411
|
+
},
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Client configuration for TestApi
|
|
417
|
+
*/
|
|
418
|
+
export interface TestApiConfig {
|
|
419
|
+
/**
|
|
420
|
+
* Base URL for the API
|
|
421
|
+
*/
|
|
422
|
+
url: string;
|
|
423
|
+
/**
|
|
424
|
+
* Custom instance of fetch. By default the global 'fetch' is used.
|
|
425
|
+
* You can override this to add custom middleware for use cases such as adding authentication headers.
|
|
426
|
+
*/
|
|
427
|
+
fetch?: typeof fetch;
|
|
428
|
+
/**
|
|
429
|
+
* Additional configuration
|
|
430
|
+
*/
|
|
431
|
+
options?: {
|
|
432
|
+
/**
|
|
433
|
+
* By default, the client will add a Content-Type header, set to the media type defined for
|
|
434
|
+
* the request in the OpenAPI specification.
|
|
435
|
+
* Set this to false to omit this header.
|
|
436
|
+
*/
|
|
437
|
+
omitContentTypeHeader?: boolean;
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* API Client for TestApi
|
|
443
|
+
*/
|
|
444
|
+
export class TestApi {
|
|
445
|
+
private $config: TestApiConfig;
|
|
446
|
+
|
|
447
|
+
constructor(config: TestApiConfig) {
|
|
448
|
+
this.$config = config;
|
|
449
|
+
|
|
450
|
+
this.getDynamicPropertiesAny = this.getDynamicPropertiesAny.bind(this);
|
|
451
|
+
this.getDynamicPropertiesNested =
|
|
452
|
+
this.getDynamicPropertiesNested.bind(this);
|
|
453
|
+
this.getDynamicPropertiesNumbers =
|
|
454
|
+
this.getDynamicPropertiesNumbers.bind(this);
|
|
455
|
+
this.getDynamicPropertiesObjects =
|
|
456
|
+
this.getDynamicPropertiesObjects.bind(this);
|
|
457
|
+
this.getDynamicPropertyValues = this.getDynamicPropertyValues.bind(this);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
private $url = (
|
|
461
|
+
path: string,
|
|
462
|
+
pathParameters: { [key: string]: any },
|
|
463
|
+
queryParameters: { [key: string]: any },
|
|
464
|
+
collectionFormats?: { [key: string]: 'multi' | 'csv' },
|
|
465
|
+
): string => {
|
|
466
|
+
const baseUrl = this.$config.url.endsWith('/')
|
|
467
|
+
? this.$config.url.slice(0, -1)
|
|
468
|
+
: this.$config.url;
|
|
469
|
+
const pathWithParameters = Object.entries(pathParameters).reduce(
|
|
470
|
+
(withParams, [key, value]) =>
|
|
471
|
+
withParams.replace(\`{\${key}}\`, encodeURIComponent(\`\${value}\`)),
|
|
472
|
+
path,
|
|
473
|
+
);
|
|
474
|
+
const queryString = Object.entries(queryParameters)
|
|
475
|
+
.map(([key, value]) => {
|
|
476
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
477
|
+
return value
|
|
478
|
+
.map(
|
|
479
|
+
(v) => \`\${encodeURIComponent(key)}=\${encodeURIComponent(\`\${v}\`)}\`,
|
|
480
|
+
)
|
|
481
|
+
.join('&');
|
|
482
|
+
}
|
|
483
|
+
return \`\${encodeURIComponent(key)}=\${encodeURIComponent(Array.isArray(value) ? value.map(String).join(',') : String(value))}\`;
|
|
484
|
+
})
|
|
485
|
+
.join('&');
|
|
486
|
+
return (
|
|
487
|
+
baseUrl + pathWithParameters + (queryString ? \`?\${queryString}\` : '')
|
|
488
|
+
);
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
private $headers = (
|
|
492
|
+
headerParameters: { [key: string]: any },
|
|
493
|
+
collectionFormats?: { [key: string]: 'multi' | 'csv' },
|
|
494
|
+
): [string, string][] => {
|
|
495
|
+
return Object.entries(headerParameters).flatMap(([key, value]) => {
|
|
496
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
497
|
+
return value.map((v) => [key, String(v)]) as [string, string][];
|
|
498
|
+
}
|
|
499
|
+
return [[key, String(value)]];
|
|
500
|
+
});
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
private $fetch: typeof fetch = (...args) =>
|
|
504
|
+
(this.$config.fetch ?? fetch)(...args);
|
|
505
|
+
|
|
506
|
+
public async getDynamicPropertiesAny(): Promise<GetDynamicPropertiesAny200Response> {
|
|
507
|
+
const pathParameters: { [key: string]: any } = {};
|
|
508
|
+
const queryParameters: { [key: string]: any } = {};
|
|
509
|
+
const headerParameters: { [key: string]: any } = {};
|
|
510
|
+
|
|
511
|
+
const body = undefined;
|
|
512
|
+
|
|
513
|
+
const response = await this.$fetch(
|
|
514
|
+
this.$url('/dynamic-properties-any', pathParameters, queryParameters),
|
|
515
|
+
{
|
|
516
|
+
headers: this.$headers(headerParameters),
|
|
517
|
+
method: 'GET',
|
|
518
|
+
body,
|
|
519
|
+
},
|
|
520
|
+
);
|
|
521
|
+
|
|
522
|
+
if (response.status === 200) {
|
|
523
|
+
return $IO.GetDynamicPropertiesAny200Response.fromJson(
|
|
524
|
+
await response.json(),
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
throw new Error(
|
|
528
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
public async getDynamicPropertiesNested(): Promise<GetDynamicPropertiesNested200Response> {
|
|
533
|
+
const pathParameters: { [key: string]: any } = {};
|
|
534
|
+
const queryParameters: { [key: string]: any } = {};
|
|
535
|
+
const headerParameters: { [key: string]: any } = {};
|
|
536
|
+
|
|
537
|
+
const body = undefined;
|
|
538
|
+
|
|
539
|
+
const response = await this.$fetch(
|
|
540
|
+
this.$url('/dynamic-properties-nested', pathParameters, queryParameters),
|
|
541
|
+
{
|
|
542
|
+
headers: this.$headers(headerParameters),
|
|
543
|
+
method: 'GET',
|
|
544
|
+
body,
|
|
545
|
+
},
|
|
546
|
+
);
|
|
547
|
+
|
|
548
|
+
if (response.status === 200) {
|
|
549
|
+
return $IO.GetDynamicPropertiesNested200Response.fromJson(
|
|
550
|
+
await response.json(),
|
|
551
|
+
);
|
|
552
|
+
}
|
|
553
|
+
throw new Error(
|
|
554
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
public async getDynamicPropertiesNumbers(): Promise<GetDynamicPropertiesNumbers200Response> {
|
|
559
|
+
const pathParameters: { [key: string]: any } = {};
|
|
560
|
+
const queryParameters: { [key: string]: any } = {};
|
|
561
|
+
const headerParameters: { [key: string]: any } = {};
|
|
562
|
+
|
|
563
|
+
const body = undefined;
|
|
564
|
+
|
|
565
|
+
const response = await this.$fetch(
|
|
566
|
+
this.$url('/dynamic-properties-numbers', pathParameters, queryParameters),
|
|
567
|
+
{
|
|
568
|
+
headers: this.$headers(headerParameters),
|
|
569
|
+
method: 'GET',
|
|
570
|
+
body,
|
|
571
|
+
},
|
|
572
|
+
);
|
|
573
|
+
|
|
574
|
+
if (response.status === 200) {
|
|
575
|
+
return $IO.GetDynamicPropertiesNumbers200Response.fromJson(
|
|
576
|
+
await response.json(),
|
|
577
|
+
);
|
|
578
|
+
}
|
|
579
|
+
throw new Error(
|
|
580
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
public async getDynamicPropertiesObjects(): Promise<GetDynamicPropertiesObjects200Response> {
|
|
585
|
+
const pathParameters: { [key: string]: any } = {};
|
|
586
|
+
const queryParameters: { [key: string]: any } = {};
|
|
587
|
+
const headerParameters: { [key: string]: any } = {};
|
|
588
|
+
|
|
589
|
+
const body = undefined;
|
|
590
|
+
|
|
591
|
+
const response = await this.$fetch(
|
|
592
|
+
this.$url('/dynamic-properties-objects', pathParameters, queryParameters),
|
|
593
|
+
{
|
|
594
|
+
headers: this.$headers(headerParameters),
|
|
595
|
+
method: 'GET',
|
|
596
|
+
body,
|
|
597
|
+
},
|
|
598
|
+
);
|
|
599
|
+
|
|
600
|
+
if (response.status === 200) {
|
|
601
|
+
return $IO.GetDynamicPropertiesObjects200Response.fromJson(
|
|
602
|
+
await response.json(),
|
|
603
|
+
);
|
|
604
|
+
}
|
|
605
|
+
throw new Error(
|
|
606
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
607
|
+
);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
public async getDynamicPropertyValues(): Promise<GetDynamicPropertyValues200Response> {
|
|
611
|
+
const pathParameters: { [key: string]: any } = {};
|
|
612
|
+
const queryParameters: { [key: string]: any } = {};
|
|
613
|
+
const headerParameters: { [key: string]: any } = {};
|
|
614
|
+
|
|
615
|
+
const body = undefined;
|
|
616
|
+
|
|
617
|
+
const response = await this.$fetch(
|
|
618
|
+
this.$url('/dynamic-property-values', pathParameters, queryParameters),
|
|
619
|
+
{
|
|
620
|
+
headers: this.$headers(headerParameters),
|
|
621
|
+
method: 'GET',
|
|
622
|
+
body,
|
|
623
|
+
},
|
|
624
|
+
);
|
|
625
|
+
|
|
626
|
+
if (response.status === 200) {
|
|
627
|
+
return $IO.GetDynamicPropertyValues200Response.fromJson(
|
|
628
|
+
await response.json(),
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
throw new Error(
|
|
632
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
"
|
|
637
|
+
`;
|
|
638
|
+
|
|
639
|
+
exports[`openApiTsClientGenerator - complex types > should handle response objects with patternProperties 1`] = `
|
|
640
|
+
"export type GetPatternPropertiesArrayArrays200Response = {
|
|
641
|
+
id: string;
|
|
642
|
+
matrix?: Array<Array<number>>;
|
|
643
|
+
[additionalAndPatternProperties: string]: unknown;
|
|
644
|
+
};
|
|
645
|
+
export type GetPatternPropertiesArrayObjectDicts200Response = {
|
|
646
|
+
id: string;
|
|
647
|
+
objectDicts?: Array<{
|
|
648
|
+
[
|
|
649
|
+
key: string
|
|
650
|
+
]: GetPatternPropertiesArrayObjectDicts200ResponseObjectDictsItemValue;
|
|
651
|
+
}>;
|
|
652
|
+
[additionalAndPatternProperties: string]: unknown;
|
|
653
|
+
};
|
|
654
|
+
export type GetPatternPropertiesArrayObjectDicts200ResponseObjectDictsItemValue =
|
|
655
|
+
{
|
|
656
|
+
name?: string;
|
|
657
|
+
value?: number;
|
|
658
|
+
};
|
|
659
|
+
export type GetPatternPropertiesArrayObjectDicts200ResponseValueItemValue = {
|
|
660
|
+
id?: string;
|
|
661
|
+
count?: number;
|
|
662
|
+
};
|
|
663
|
+
export type GetPatternPropertiesArrayObjectDicts200ResponseX0ItemValue = {
|
|
664
|
+
label?: string;
|
|
665
|
+
enabled?: boolean;
|
|
666
|
+
};
|
|
667
|
+
export type GetPatternPropertiesArrayObjects200Response = {
|
|
668
|
+
id: string;
|
|
669
|
+
items?: Array<GetPatternPropertiesArrayObjects200ResponseItemsItem>;
|
|
670
|
+
[additionalAndPatternProperties: string]: unknown;
|
|
671
|
+
};
|
|
672
|
+
export type GetPatternPropertiesArrayObjects200ResponseItemsItem = {
|
|
673
|
+
name?: string;
|
|
674
|
+
value?: number;
|
|
675
|
+
};
|
|
676
|
+
export type GetPatternPropertiesArrayObjects200ResponseValueItem = {
|
|
677
|
+
id?: string;
|
|
678
|
+
count?: number;
|
|
679
|
+
};
|
|
680
|
+
export type GetPatternPropertiesArrayObjects200ResponseX0Item = {
|
|
681
|
+
label?: string;
|
|
682
|
+
enabled?: boolean;
|
|
683
|
+
};
|
|
684
|
+
export type GetPatternPropertiesArrayPrimitives200Response = {
|
|
685
|
+
id: string;
|
|
686
|
+
stringArray?: Array<string>;
|
|
687
|
+
numberArray?: Array<number>;
|
|
688
|
+
[additionalAndPatternProperties: string]: unknown;
|
|
689
|
+
};
|
|
690
|
+
export type GetPatternPropertiesArrayStringDicts200Response = {
|
|
691
|
+
id: string;
|
|
692
|
+
dictionaries?: Array<{ [key: string]: string }>;
|
|
693
|
+
[additionalAndPatternProperties: string]: unknown;
|
|
694
|
+
};
|
|
695
|
+
export type GetPatternPropertiesMixed200Response = {
|
|
696
|
+
id: string;
|
|
697
|
+
name: string;
|
|
698
|
+
[additionalAndPatternProperties: string]: unknown;
|
|
699
|
+
};
|
|
700
|
+
export type GetPatternPropertiesMultiple200Response = {
|
|
701
|
+
id: string;
|
|
702
|
+
name: string;
|
|
703
|
+
[patternProperties: string]: unknown;
|
|
704
|
+
};
|
|
705
|
+
export type GetPatternPropertiesNested200Response = {
|
|
706
|
+
id: string;
|
|
707
|
+
config?: GetPatternPropertiesNested200ResponseConfig;
|
|
708
|
+
};
|
|
709
|
+
export type GetPatternPropertiesNested200ResponseConfig = {
|
|
710
|
+
[patternProperties: string]: unknown;
|
|
711
|
+
};
|
|
712
|
+
export type GetPatternPropertiesNested200ResponseConfigSetting0 = {
|
|
713
|
+
isEnabled?: boolean;
|
|
714
|
+
[patternProperties: string]: unknown;
|
|
715
|
+
};
|
|
716
|
+
export type GetPatternPropertiesNoProps200Response = {
|
|
717
|
+
[additionalAndPatternProperties: string]: unknown;
|
|
718
|
+
};
|
|
719
|
+
export type GetPatternPropertiesOnly200Response = {
|
|
720
|
+
[patternProperties: string]: unknown;
|
|
721
|
+
};
|
|
722
|
+
export type GetPatternPropertiesSingle200Response = {
|
|
723
|
+
id: string;
|
|
724
|
+
name: string;
|
|
725
|
+
[patternProperties: string]: unknown;
|
|
726
|
+
};
|
|
727
|
+
export type GetPatternPropertiesArrayArraysError = never;
|
|
728
|
+
export type GetPatternPropertiesArrayObjectDictsError = never;
|
|
729
|
+
export type GetPatternPropertiesArrayObjectsError = never;
|
|
730
|
+
export type GetPatternPropertiesArrayPrimitivesError = never;
|
|
731
|
+
export type GetPatternPropertiesArrayStringDictsError = never;
|
|
732
|
+
export type GetPatternPropertiesMixedError = never;
|
|
733
|
+
export type GetPatternPropertiesMultipleError = never;
|
|
734
|
+
export type GetPatternPropertiesNestedError = never;
|
|
735
|
+
export type GetPatternPropertiesNoPropsError = never;
|
|
736
|
+
export type GetPatternPropertiesOnlyError = never;
|
|
737
|
+
export type GetPatternPropertiesSingleError = never;
|
|
738
|
+
"
|
|
739
|
+
`;
|
|
740
|
+
|
|
741
|
+
exports[`openApiTsClientGenerator - complex types > should handle response objects with patternProperties 2`] = `
|
|
742
|
+
"import type {
|
|
743
|
+
GetPatternPropertiesArrayArrays200Response,
|
|
744
|
+
GetPatternPropertiesArrayObjectDicts200Response,
|
|
745
|
+
GetPatternPropertiesArrayObjectDicts200ResponseObjectDictsItemValue,
|
|
746
|
+
GetPatternPropertiesArrayObjectDicts200ResponseValueItemValue,
|
|
747
|
+
GetPatternPropertiesArrayObjectDicts200ResponseX0ItemValue,
|
|
748
|
+
GetPatternPropertiesArrayObjects200Response,
|
|
749
|
+
GetPatternPropertiesArrayObjects200ResponseItemsItem,
|
|
750
|
+
GetPatternPropertiesArrayObjects200ResponseValueItem,
|
|
751
|
+
GetPatternPropertiesArrayObjects200ResponseX0Item,
|
|
752
|
+
GetPatternPropertiesArrayPrimitives200Response,
|
|
753
|
+
GetPatternPropertiesArrayStringDicts200Response,
|
|
754
|
+
GetPatternPropertiesMixed200Response,
|
|
755
|
+
GetPatternPropertiesMultiple200Response,
|
|
756
|
+
GetPatternPropertiesNested200Response,
|
|
757
|
+
GetPatternPropertiesNested200ResponseConfig,
|
|
758
|
+
GetPatternPropertiesNested200ResponseConfigSetting0,
|
|
759
|
+
GetPatternPropertiesNoProps200Response,
|
|
760
|
+
GetPatternPropertiesOnly200Response,
|
|
761
|
+
GetPatternPropertiesSingle200Response,
|
|
762
|
+
} from './types.gen.js';
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Utility for serialisation and deserialisation of API types.
|
|
766
|
+
*/
|
|
767
|
+
export class $IO {
|
|
768
|
+
protected static $mapValues = (data: any, fn: (item: any) => any) =>
|
|
769
|
+
Object.fromEntries(Object.entries(data).map(([k, v]) => [k, fn(v)]));
|
|
770
|
+
|
|
771
|
+
public static GetPatternPropertiesArrayArrays200Response = {
|
|
772
|
+
toJson: (model: GetPatternPropertiesArrayArrays200Response): any => {
|
|
773
|
+
if (model === undefined || model === null) {
|
|
774
|
+
return model;
|
|
775
|
+
}
|
|
776
|
+
return {
|
|
777
|
+
...$IO.$mapValues(
|
|
778
|
+
Object.fromEntries(
|
|
779
|
+
Object.entries(model).filter(
|
|
780
|
+
([key]) => !['id', 'matrix'].includes(key) && /^x-/.test(key),
|
|
781
|
+
),
|
|
782
|
+
),
|
|
783
|
+
(patternProperty) => patternProperty,
|
|
784
|
+
),
|
|
785
|
+
...$IO.$mapValues(
|
|
786
|
+
Object.fromEntries(
|
|
787
|
+
Object.entries(model).filter(
|
|
788
|
+
([key]) => !['id', 'matrix'].includes(key) && !/^x-/.test(key),
|
|
789
|
+
),
|
|
790
|
+
),
|
|
791
|
+
(additionalProperty) => additionalProperty,
|
|
792
|
+
),
|
|
793
|
+
...(model.id === undefined
|
|
794
|
+
? {}
|
|
795
|
+
: {
|
|
796
|
+
id: model.id,
|
|
797
|
+
}),
|
|
798
|
+
...(model.matrix === undefined
|
|
799
|
+
? {}
|
|
800
|
+
: {
|
|
801
|
+
matrix: model.matrix,
|
|
802
|
+
}),
|
|
803
|
+
};
|
|
804
|
+
},
|
|
805
|
+
fromJson: (json: any): GetPatternPropertiesArrayArrays200Response => {
|
|
806
|
+
if (json === undefined || json === null) {
|
|
807
|
+
return json;
|
|
808
|
+
}
|
|
809
|
+
return {
|
|
810
|
+
...$IO.$mapValues(
|
|
811
|
+
Object.fromEntries(
|
|
812
|
+
Object.entries(json).filter(
|
|
813
|
+
([key]) => !['id', 'matrix'].includes(key) && /^x-/.test(key),
|
|
814
|
+
),
|
|
815
|
+
),
|
|
816
|
+
(patternProperty) => patternProperty,
|
|
817
|
+
),
|
|
818
|
+
...$IO.$mapValues(
|
|
819
|
+
Object.fromEntries(
|
|
820
|
+
Object.entries(json).filter(
|
|
821
|
+
([key]) => !['id', 'matrix'].includes(key) && !/^x-/.test(key),
|
|
822
|
+
),
|
|
823
|
+
),
|
|
824
|
+
(additionalProperty) => additionalProperty,
|
|
825
|
+
),
|
|
826
|
+
id: json['id'],
|
|
827
|
+
...(json['matrix'] === undefined
|
|
828
|
+
? {}
|
|
829
|
+
: {
|
|
830
|
+
matrix: json['matrix'],
|
|
831
|
+
}),
|
|
832
|
+
};
|
|
833
|
+
},
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
public static GetPatternPropertiesArrayObjectDicts200Response = {
|
|
837
|
+
toJson: (model: GetPatternPropertiesArrayObjectDicts200Response): any => {
|
|
838
|
+
if (model === undefined || model === null) {
|
|
839
|
+
return model;
|
|
840
|
+
}
|
|
841
|
+
return {
|
|
842
|
+
...$IO.$mapValues(
|
|
843
|
+
Object.fromEntries(
|
|
844
|
+
Object.entries(model).filter(
|
|
845
|
+
([key]) =>
|
|
846
|
+
!['id', 'objectDicts'].includes(key) && /^x-/.test(key),
|
|
847
|
+
),
|
|
848
|
+
),
|
|
849
|
+
(patternProperty) =>
|
|
850
|
+
patternProperty.map((item0: any) =>
|
|
851
|
+
$IO.$mapValues(
|
|
852
|
+
item0,
|
|
853
|
+
$IO.GetPatternPropertiesArrayObjectDicts200ResponseX0ItemValue
|
|
854
|
+
.toJson,
|
|
855
|
+
),
|
|
856
|
+
),
|
|
857
|
+
),
|
|
858
|
+
...$IO.$mapValues(
|
|
859
|
+
Object.fromEntries(
|
|
860
|
+
Object.entries(model).filter(
|
|
861
|
+
([key]) =>
|
|
862
|
+
!['id', 'objectDicts'].includes(key) && !/^x-/.test(key),
|
|
863
|
+
),
|
|
864
|
+
),
|
|
865
|
+
(additionalProperty) =>
|
|
866
|
+
additionalProperty.map((item0: any) =>
|
|
867
|
+
$IO.$mapValues(
|
|
868
|
+
item0,
|
|
869
|
+
$IO
|
|
870
|
+
.GetPatternPropertiesArrayObjectDicts200ResponseValueItemValue
|
|
871
|
+
.toJson,
|
|
872
|
+
),
|
|
873
|
+
),
|
|
874
|
+
),
|
|
875
|
+
...(model.id === undefined
|
|
876
|
+
? {}
|
|
877
|
+
: {
|
|
878
|
+
id: model.id,
|
|
879
|
+
}),
|
|
880
|
+
...(model.objectDicts === undefined
|
|
881
|
+
? {}
|
|
882
|
+
: {
|
|
883
|
+
objectDicts: model.objectDicts.map((item0) =>
|
|
884
|
+
$IO.$mapValues(
|
|
885
|
+
item0,
|
|
886
|
+
$IO
|
|
887
|
+
.GetPatternPropertiesArrayObjectDicts200ResponseObjectDictsItemValue
|
|
888
|
+
.toJson,
|
|
889
|
+
),
|
|
890
|
+
),
|
|
891
|
+
}),
|
|
892
|
+
};
|
|
893
|
+
},
|
|
894
|
+
fromJson: (json: any): GetPatternPropertiesArrayObjectDicts200Response => {
|
|
895
|
+
if (json === undefined || json === null) {
|
|
896
|
+
return json;
|
|
897
|
+
}
|
|
898
|
+
return {
|
|
899
|
+
...$IO.$mapValues(
|
|
900
|
+
Object.fromEntries(
|
|
901
|
+
Object.entries(json).filter(
|
|
902
|
+
([key]) =>
|
|
903
|
+
!['id', 'objectDicts'].includes(key) && /^x-/.test(key),
|
|
904
|
+
),
|
|
905
|
+
),
|
|
906
|
+
(patternProperty) =>
|
|
907
|
+
(patternProperty as Array<any>).map((item0: any) =>
|
|
908
|
+
$IO.$mapValues(
|
|
909
|
+
item0,
|
|
910
|
+
$IO.GetPatternPropertiesArrayObjectDicts200ResponseX0ItemValue
|
|
911
|
+
.fromJson,
|
|
912
|
+
),
|
|
913
|
+
),
|
|
914
|
+
),
|
|
915
|
+
...$IO.$mapValues(
|
|
916
|
+
Object.fromEntries(
|
|
917
|
+
Object.entries(json).filter(
|
|
918
|
+
([key]) =>
|
|
919
|
+
!['id', 'objectDicts'].includes(key) && !/^x-/.test(key),
|
|
920
|
+
),
|
|
921
|
+
),
|
|
922
|
+
(additionalProperty) =>
|
|
923
|
+
(additionalProperty as Array<any>).map((item0: any) =>
|
|
924
|
+
$IO.$mapValues(
|
|
925
|
+
item0,
|
|
926
|
+
$IO
|
|
927
|
+
.GetPatternPropertiesArrayObjectDicts200ResponseValueItemValue
|
|
928
|
+
.fromJson,
|
|
929
|
+
),
|
|
930
|
+
),
|
|
931
|
+
),
|
|
932
|
+
id: json['id'],
|
|
933
|
+
...(json['objectDicts'] === undefined
|
|
934
|
+
? {}
|
|
935
|
+
: {
|
|
936
|
+
objectDicts: (json['objectDicts'] as Array<any>).map((item0) =>
|
|
937
|
+
$IO.$mapValues(
|
|
938
|
+
item0,
|
|
939
|
+
$IO
|
|
940
|
+
.GetPatternPropertiesArrayObjectDicts200ResponseObjectDictsItemValue
|
|
941
|
+
.fromJson,
|
|
942
|
+
),
|
|
943
|
+
),
|
|
944
|
+
}),
|
|
945
|
+
};
|
|
946
|
+
},
|
|
947
|
+
};
|
|
948
|
+
|
|
949
|
+
public static GetPatternPropertiesArrayObjectDicts200ResponseObjectDictsItemValue =
|
|
950
|
+
{
|
|
951
|
+
toJson: (
|
|
952
|
+
model: GetPatternPropertiesArrayObjectDicts200ResponseObjectDictsItemValue,
|
|
953
|
+
): any => {
|
|
954
|
+
if (model === undefined || model === null) {
|
|
955
|
+
return model;
|
|
956
|
+
}
|
|
957
|
+
return {
|
|
958
|
+
...(model.name === undefined
|
|
959
|
+
? {}
|
|
960
|
+
: {
|
|
961
|
+
name: model.name,
|
|
962
|
+
}),
|
|
963
|
+
...(model.value === undefined
|
|
964
|
+
? {}
|
|
965
|
+
: {
|
|
966
|
+
value: model.value,
|
|
967
|
+
}),
|
|
968
|
+
};
|
|
969
|
+
},
|
|
970
|
+
fromJson: (
|
|
971
|
+
json: any,
|
|
972
|
+
): GetPatternPropertiesArrayObjectDicts200ResponseObjectDictsItemValue => {
|
|
973
|
+
if (json === undefined || json === null) {
|
|
974
|
+
return json;
|
|
975
|
+
}
|
|
976
|
+
return {
|
|
977
|
+
...(json['name'] === undefined
|
|
978
|
+
? {}
|
|
979
|
+
: {
|
|
980
|
+
name: json['name'],
|
|
981
|
+
}),
|
|
982
|
+
...(json['value'] === undefined
|
|
983
|
+
? {}
|
|
984
|
+
: {
|
|
985
|
+
value: json['value'],
|
|
986
|
+
}),
|
|
987
|
+
};
|
|
988
|
+
},
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
public static GetPatternPropertiesArrayObjectDicts200ResponseValueItemValue =
|
|
992
|
+
{
|
|
993
|
+
toJson: (
|
|
994
|
+
model: GetPatternPropertiesArrayObjectDicts200ResponseValueItemValue,
|
|
995
|
+
): any => {
|
|
996
|
+
if (model === undefined || model === null) {
|
|
997
|
+
return model;
|
|
998
|
+
}
|
|
999
|
+
return {
|
|
1000
|
+
...(model.id === undefined
|
|
1001
|
+
? {}
|
|
1002
|
+
: {
|
|
1003
|
+
id: model.id,
|
|
1004
|
+
}),
|
|
1005
|
+
...(model.count === undefined
|
|
1006
|
+
? {}
|
|
1007
|
+
: {
|
|
1008
|
+
count: model.count,
|
|
1009
|
+
}),
|
|
1010
|
+
};
|
|
1011
|
+
},
|
|
1012
|
+
fromJson: (
|
|
1013
|
+
json: any,
|
|
1014
|
+
): GetPatternPropertiesArrayObjectDicts200ResponseValueItemValue => {
|
|
1015
|
+
if (json === undefined || json === null) {
|
|
1016
|
+
return json;
|
|
1017
|
+
}
|
|
1018
|
+
return {
|
|
1019
|
+
...(json['id'] === undefined
|
|
1020
|
+
? {}
|
|
1021
|
+
: {
|
|
1022
|
+
id: json['id'],
|
|
1023
|
+
}),
|
|
1024
|
+
...(json['count'] === undefined
|
|
1025
|
+
? {}
|
|
1026
|
+
: {
|
|
1027
|
+
count: json['count'],
|
|
1028
|
+
}),
|
|
1029
|
+
};
|
|
1030
|
+
},
|
|
1031
|
+
};
|
|
1032
|
+
|
|
1033
|
+
public static GetPatternPropertiesArrayObjectDicts200ResponseX0ItemValue = {
|
|
1034
|
+
toJson: (
|
|
1035
|
+
model: GetPatternPropertiesArrayObjectDicts200ResponseX0ItemValue,
|
|
1036
|
+
): any => {
|
|
1037
|
+
if (model === undefined || model === null) {
|
|
1038
|
+
return model;
|
|
1039
|
+
}
|
|
1040
|
+
return {
|
|
1041
|
+
...(model.label === undefined
|
|
1042
|
+
? {}
|
|
1043
|
+
: {
|
|
1044
|
+
label: model.label,
|
|
1045
|
+
}),
|
|
1046
|
+
...(model.enabled === undefined
|
|
1047
|
+
? {}
|
|
1048
|
+
: {
|
|
1049
|
+
enabled: model.enabled,
|
|
1050
|
+
}),
|
|
1051
|
+
};
|
|
1052
|
+
},
|
|
1053
|
+
fromJson: (
|
|
1054
|
+
json: any,
|
|
1055
|
+
): GetPatternPropertiesArrayObjectDicts200ResponseX0ItemValue => {
|
|
1056
|
+
if (json === undefined || json === null) {
|
|
1057
|
+
return json;
|
|
1058
|
+
}
|
|
1059
|
+
return {
|
|
1060
|
+
...(json['label'] === undefined
|
|
1061
|
+
? {}
|
|
1062
|
+
: {
|
|
1063
|
+
label: json['label'],
|
|
1064
|
+
}),
|
|
1065
|
+
...(json['enabled'] === undefined
|
|
1066
|
+
? {}
|
|
1067
|
+
: {
|
|
1068
|
+
enabled: json['enabled'],
|
|
1069
|
+
}),
|
|
1070
|
+
};
|
|
1071
|
+
},
|
|
1072
|
+
};
|
|
1073
|
+
|
|
1074
|
+
public static GetPatternPropertiesArrayObjects200Response = {
|
|
1075
|
+
toJson: (model: GetPatternPropertiesArrayObjects200Response): any => {
|
|
1076
|
+
if (model === undefined || model === null) {
|
|
1077
|
+
return model;
|
|
1078
|
+
}
|
|
1079
|
+
return {
|
|
1080
|
+
...$IO.$mapValues(
|
|
1081
|
+
Object.fromEntries(
|
|
1082
|
+
Object.entries(model).filter(
|
|
1083
|
+
([key]) => !['id', 'items'].includes(key) && /^x-/.test(key),
|
|
1084
|
+
),
|
|
1085
|
+
),
|
|
1086
|
+
(patternProperty) =>
|
|
1087
|
+
patternProperty.map(
|
|
1088
|
+
$IO.GetPatternPropertiesArrayObjects200ResponseX0Item.toJson,
|
|
1089
|
+
),
|
|
1090
|
+
),
|
|
1091
|
+
...$IO.$mapValues(
|
|
1092
|
+
Object.fromEntries(
|
|
1093
|
+
Object.entries(model).filter(
|
|
1094
|
+
([key]) => !['id', 'items'].includes(key) && !/^x-/.test(key),
|
|
1095
|
+
),
|
|
1096
|
+
),
|
|
1097
|
+
(additionalProperty) =>
|
|
1098
|
+
additionalProperty.map(
|
|
1099
|
+
$IO.GetPatternPropertiesArrayObjects200ResponseValueItem.toJson,
|
|
1100
|
+
),
|
|
1101
|
+
),
|
|
1102
|
+
...(model.id === undefined
|
|
1103
|
+
? {}
|
|
1104
|
+
: {
|
|
1105
|
+
id: model.id,
|
|
1106
|
+
}),
|
|
1107
|
+
...(model.items === undefined
|
|
1108
|
+
? {}
|
|
1109
|
+
: {
|
|
1110
|
+
items: model.items.map(
|
|
1111
|
+
$IO.GetPatternPropertiesArrayObjects200ResponseItemsItem.toJson,
|
|
1112
|
+
),
|
|
1113
|
+
}),
|
|
1114
|
+
};
|
|
1115
|
+
},
|
|
1116
|
+
fromJson: (json: any): GetPatternPropertiesArrayObjects200Response => {
|
|
1117
|
+
if (json === undefined || json === null) {
|
|
1118
|
+
return json;
|
|
1119
|
+
}
|
|
1120
|
+
return {
|
|
1121
|
+
...$IO.$mapValues(
|
|
1122
|
+
Object.fromEntries(
|
|
1123
|
+
Object.entries(json).filter(
|
|
1124
|
+
([key]) => !['id', 'items'].includes(key) && /^x-/.test(key),
|
|
1125
|
+
),
|
|
1126
|
+
),
|
|
1127
|
+
(patternProperty) =>
|
|
1128
|
+
(patternProperty as Array<any>).map(
|
|
1129
|
+
$IO.GetPatternPropertiesArrayObjects200ResponseX0Item.fromJson,
|
|
1130
|
+
),
|
|
1131
|
+
),
|
|
1132
|
+
...$IO.$mapValues(
|
|
1133
|
+
Object.fromEntries(
|
|
1134
|
+
Object.entries(json).filter(
|
|
1135
|
+
([key]) => !['id', 'items'].includes(key) && !/^x-/.test(key),
|
|
1136
|
+
),
|
|
1137
|
+
),
|
|
1138
|
+
(additionalProperty) =>
|
|
1139
|
+
(additionalProperty as Array<any>).map(
|
|
1140
|
+
$IO.GetPatternPropertiesArrayObjects200ResponseValueItem.fromJson,
|
|
1141
|
+
),
|
|
1142
|
+
),
|
|
1143
|
+
id: json['id'],
|
|
1144
|
+
...(json['items'] === undefined
|
|
1145
|
+
? {}
|
|
1146
|
+
: {
|
|
1147
|
+
items: (json['items'] as Array<any>).map(
|
|
1148
|
+
$IO.GetPatternPropertiesArrayObjects200ResponseItemsItem
|
|
1149
|
+
.fromJson,
|
|
1150
|
+
),
|
|
1151
|
+
}),
|
|
1152
|
+
};
|
|
1153
|
+
},
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1156
|
+
public static GetPatternPropertiesArrayObjects200ResponseItemsItem = {
|
|
1157
|
+
toJson: (
|
|
1158
|
+
model: GetPatternPropertiesArrayObjects200ResponseItemsItem,
|
|
1159
|
+
): any => {
|
|
1160
|
+
if (model === undefined || model === null) {
|
|
1161
|
+
return model;
|
|
1162
|
+
}
|
|
1163
|
+
return {
|
|
1164
|
+
...(model.name === undefined
|
|
1165
|
+
? {}
|
|
1166
|
+
: {
|
|
1167
|
+
name: model.name,
|
|
1168
|
+
}),
|
|
1169
|
+
...(model.value === undefined
|
|
1170
|
+
? {}
|
|
1171
|
+
: {
|
|
1172
|
+
value: model.value,
|
|
1173
|
+
}),
|
|
1174
|
+
};
|
|
1175
|
+
},
|
|
1176
|
+
fromJson: (
|
|
1177
|
+
json: any,
|
|
1178
|
+
): GetPatternPropertiesArrayObjects200ResponseItemsItem => {
|
|
1179
|
+
if (json === undefined || json === null) {
|
|
1180
|
+
return json;
|
|
1181
|
+
}
|
|
1182
|
+
return {
|
|
1183
|
+
...(json['name'] === undefined
|
|
1184
|
+
? {}
|
|
1185
|
+
: {
|
|
1186
|
+
name: json['name'],
|
|
1187
|
+
}),
|
|
1188
|
+
...(json['value'] === undefined
|
|
1189
|
+
? {}
|
|
1190
|
+
: {
|
|
1191
|
+
value: json['value'],
|
|
1192
|
+
}),
|
|
1193
|
+
};
|
|
1194
|
+
},
|
|
1195
|
+
};
|
|
1196
|
+
|
|
1197
|
+
public static GetPatternPropertiesArrayObjects200ResponseValueItem = {
|
|
1198
|
+
toJson: (
|
|
1199
|
+
model: GetPatternPropertiesArrayObjects200ResponseValueItem,
|
|
1200
|
+
): any => {
|
|
1201
|
+
if (model === undefined || model === null) {
|
|
1202
|
+
return model;
|
|
1203
|
+
}
|
|
1204
|
+
return {
|
|
1205
|
+
...(model.id === undefined
|
|
1206
|
+
? {}
|
|
1207
|
+
: {
|
|
1208
|
+
id: model.id,
|
|
1209
|
+
}),
|
|
1210
|
+
...(model.count === undefined
|
|
1211
|
+
? {}
|
|
1212
|
+
: {
|
|
1213
|
+
count: model.count,
|
|
1214
|
+
}),
|
|
1215
|
+
};
|
|
1216
|
+
},
|
|
1217
|
+
fromJson: (
|
|
1218
|
+
json: any,
|
|
1219
|
+
): GetPatternPropertiesArrayObjects200ResponseValueItem => {
|
|
1220
|
+
if (json === undefined || json === null) {
|
|
1221
|
+
return json;
|
|
1222
|
+
}
|
|
1223
|
+
return {
|
|
1224
|
+
...(json['id'] === undefined
|
|
1225
|
+
? {}
|
|
1226
|
+
: {
|
|
1227
|
+
id: json['id'],
|
|
1228
|
+
}),
|
|
1229
|
+
...(json['count'] === undefined
|
|
1230
|
+
? {}
|
|
1231
|
+
: {
|
|
1232
|
+
count: json['count'],
|
|
1233
|
+
}),
|
|
1234
|
+
};
|
|
1235
|
+
},
|
|
1236
|
+
};
|
|
1237
|
+
|
|
1238
|
+
public static GetPatternPropertiesArrayObjects200ResponseX0Item = {
|
|
1239
|
+
toJson: (model: GetPatternPropertiesArrayObjects200ResponseX0Item): any => {
|
|
1240
|
+
if (model === undefined || model === null) {
|
|
1241
|
+
return model;
|
|
1242
|
+
}
|
|
1243
|
+
return {
|
|
1244
|
+
...(model.label === undefined
|
|
1245
|
+
? {}
|
|
1246
|
+
: {
|
|
1247
|
+
label: model.label,
|
|
1248
|
+
}),
|
|
1249
|
+
...(model.enabled === undefined
|
|
1250
|
+
? {}
|
|
1251
|
+
: {
|
|
1252
|
+
enabled: model.enabled,
|
|
1253
|
+
}),
|
|
1254
|
+
};
|
|
1255
|
+
},
|
|
1256
|
+
fromJson: (
|
|
1257
|
+
json: any,
|
|
1258
|
+
): GetPatternPropertiesArrayObjects200ResponseX0Item => {
|
|
1259
|
+
if (json === undefined || json === null) {
|
|
1260
|
+
return json;
|
|
1261
|
+
}
|
|
1262
|
+
return {
|
|
1263
|
+
...(json['label'] === undefined
|
|
1264
|
+
? {}
|
|
1265
|
+
: {
|
|
1266
|
+
label: json['label'],
|
|
1267
|
+
}),
|
|
1268
|
+
...(json['enabled'] === undefined
|
|
1269
|
+
? {}
|
|
1270
|
+
: {
|
|
1271
|
+
enabled: json['enabled'],
|
|
1272
|
+
}),
|
|
1273
|
+
};
|
|
1274
|
+
},
|
|
1275
|
+
};
|
|
1276
|
+
|
|
1277
|
+
public static GetPatternPropertiesArrayPrimitives200Response = {
|
|
1278
|
+
toJson: (model: GetPatternPropertiesArrayPrimitives200Response): any => {
|
|
1279
|
+
if (model === undefined || model === null) {
|
|
1280
|
+
return model;
|
|
1281
|
+
}
|
|
1282
|
+
return {
|
|
1283
|
+
...$IO.$mapValues(
|
|
1284
|
+
Object.fromEntries(
|
|
1285
|
+
Object.entries(model).filter(
|
|
1286
|
+
([key]) =>
|
|
1287
|
+
!['id', 'stringArray', 'numberArray'].includes(key) &&
|
|
1288
|
+
/^x-/.test(key),
|
|
1289
|
+
),
|
|
1290
|
+
),
|
|
1291
|
+
(patternProperty) => patternProperty,
|
|
1292
|
+
),
|
|
1293
|
+
...$IO.$mapValues(
|
|
1294
|
+
Object.fromEntries(
|
|
1295
|
+
Object.entries(model).filter(
|
|
1296
|
+
([key]) =>
|
|
1297
|
+
!['id', 'stringArray', 'numberArray'].includes(key) &&
|
|
1298
|
+
/^y-/.test(key),
|
|
1299
|
+
),
|
|
1300
|
+
),
|
|
1301
|
+
(patternProperty) => patternProperty,
|
|
1302
|
+
),
|
|
1303
|
+
...$IO.$mapValues(
|
|
1304
|
+
Object.fromEntries(
|
|
1305
|
+
Object.entries(model).filter(
|
|
1306
|
+
([key]) =>
|
|
1307
|
+
!['id', 'stringArray', 'numberArray'].includes(key) &&
|
|
1308
|
+
!(/^x-/.test(key) || /^y-/.test(key)),
|
|
1309
|
+
),
|
|
1310
|
+
),
|
|
1311
|
+
(additionalProperty) => additionalProperty,
|
|
1312
|
+
),
|
|
1313
|
+
...(model.id === undefined
|
|
1314
|
+
? {}
|
|
1315
|
+
: {
|
|
1316
|
+
id: model.id,
|
|
1317
|
+
}),
|
|
1318
|
+
...(model.stringArray === undefined
|
|
1319
|
+
? {}
|
|
1320
|
+
: {
|
|
1321
|
+
stringArray: model.stringArray,
|
|
1322
|
+
}),
|
|
1323
|
+
...(model.numberArray === undefined
|
|
1324
|
+
? {}
|
|
1325
|
+
: {
|
|
1326
|
+
numberArray: model.numberArray,
|
|
1327
|
+
}),
|
|
1328
|
+
};
|
|
1329
|
+
},
|
|
1330
|
+
fromJson: (json: any): GetPatternPropertiesArrayPrimitives200Response => {
|
|
1331
|
+
if (json === undefined || json === null) {
|
|
1332
|
+
return json;
|
|
1333
|
+
}
|
|
1334
|
+
return {
|
|
1335
|
+
...$IO.$mapValues(
|
|
1336
|
+
Object.fromEntries(
|
|
1337
|
+
Object.entries(json).filter(
|
|
1338
|
+
([key]) =>
|
|
1339
|
+
!['id', 'stringArray', 'numberArray'].includes(key) &&
|
|
1340
|
+
/^x-/.test(key),
|
|
1341
|
+
),
|
|
1342
|
+
),
|
|
1343
|
+
(patternProperty) => patternProperty,
|
|
1344
|
+
),
|
|
1345
|
+
...$IO.$mapValues(
|
|
1346
|
+
Object.fromEntries(
|
|
1347
|
+
Object.entries(json).filter(
|
|
1348
|
+
([key]) =>
|
|
1349
|
+
!['id', 'stringArray', 'numberArray'].includes(key) &&
|
|
1350
|
+
/^y-/.test(key),
|
|
1351
|
+
),
|
|
1352
|
+
),
|
|
1353
|
+
(patternProperty) => patternProperty,
|
|
1354
|
+
),
|
|
1355
|
+
...$IO.$mapValues(
|
|
1356
|
+
Object.fromEntries(
|
|
1357
|
+
Object.entries(json).filter(
|
|
1358
|
+
([key]) =>
|
|
1359
|
+
!['id', 'stringArray', 'numberArray'].includes(key) &&
|
|
1360
|
+
!(/^x-/.test(key) || /^y-/.test(key)),
|
|
1361
|
+
),
|
|
1362
|
+
),
|
|
1363
|
+
(additionalProperty) => additionalProperty,
|
|
1364
|
+
),
|
|
1365
|
+
id: json['id'],
|
|
1366
|
+
...(json['stringArray'] === undefined
|
|
1367
|
+
? {}
|
|
1368
|
+
: {
|
|
1369
|
+
stringArray: json['stringArray'],
|
|
1370
|
+
}),
|
|
1371
|
+
...(json['numberArray'] === undefined
|
|
1372
|
+
? {}
|
|
1373
|
+
: {
|
|
1374
|
+
numberArray: json['numberArray'],
|
|
1375
|
+
}),
|
|
1376
|
+
};
|
|
1377
|
+
},
|
|
1378
|
+
};
|
|
1379
|
+
|
|
1380
|
+
public static GetPatternPropertiesArrayStringDicts200Response = {
|
|
1381
|
+
toJson: (model: GetPatternPropertiesArrayStringDicts200Response): any => {
|
|
1382
|
+
if (model === undefined || model === null) {
|
|
1383
|
+
return model;
|
|
1384
|
+
}
|
|
1385
|
+
return {
|
|
1386
|
+
...$IO.$mapValues(
|
|
1387
|
+
Object.fromEntries(
|
|
1388
|
+
Object.entries(model).filter(
|
|
1389
|
+
([key]) =>
|
|
1390
|
+
!['id', 'dictionaries'].includes(key) && /^x-/.test(key),
|
|
1391
|
+
),
|
|
1392
|
+
),
|
|
1393
|
+
(patternProperty) => patternProperty,
|
|
1394
|
+
),
|
|
1395
|
+
...$IO.$mapValues(
|
|
1396
|
+
Object.fromEntries(
|
|
1397
|
+
Object.entries(model).filter(
|
|
1398
|
+
([key]) =>
|
|
1399
|
+
!['id', 'dictionaries'].includes(key) && !/^x-/.test(key),
|
|
1400
|
+
),
|
|
1401
|
+
),
|
|
1402
|
+
(additionalProperty) => additionalProperty,
|
|
1403
|
+
),
|
|
1404
|
+
...(model.id === undefined
|
|
1405
|
+
? {}
|
|
1406
|
+
: {
|
|
1407
|
+
id: model.id,
|
|
1408
|
+
}),
|
|
1409
|
+
...(model.dictionaries === undefined
|
|
1410
|
+
? {}
|
|
1411
|
+
: {
|
|
1412
|
+
dictionaries: model.dictionaries,
|
|
1413
|
+
}),
|
|
1414
|
+
};
|
|
1415
|
+
},
|
|
1416
|
+
fromJson: (json: any): GetPatternPropertiesArrayStringDicts200Response => {
|
|
1417
|
+
if (json === undefined || json === null) {
|
|
1418
|
+
return json;
|
|
1419
|
+
}
|
|
1420
|
+
return {
|
|
1421
|
+
...$IO.$mapValues(
|
|
1422
|
+
Object.fromEntries(
|
|
1423
|
+
Object.entries(json).filter(
|
|
1424
|
+
([key]) =>
|
|
1425
|
+
!['id', 'dictionaries'].includes(key) && /^x-/.test(key),
|
|
1426
|
+
),
|
|
1427
|
+
),
|
|
1428
|
+
(patternProperty) => patternProperty,
|
|
1429
|
+
),
|
|
1430
|
+
...$IO.$mapValues(
|
|
1431
|
+
Object.fromEntries(
|
|
1432
|
+
Object.entries(json).filter(
|
|
1433
|
+
([key]) =>
|
|
1434
|
+
!['id', 'dictionaries'].includes(key) && !/^x-/.test(key),
|
|
1435
|
+
),
|
|
1436
|
+
),
|
|
1437
|
+
(additionalProperty) => additionalProperty,
|
|
1438
|
+
),
|
|
1439
|
+
id: json['id'],
|
|
1440
|
+
...(json['dictionaries'] === undefined
|
|
1441
|
+
? {}
|
|
1442
|
+
: {
|
|
1443
|
+
dictionaries: json['dictionaries'],
|
|
1444
|
+
}),
|
|
1445
|
+
};
|
|
1446
|
+
},
|
|
1447
|
+
};
|
|
1448
|
+
|
|
1449
|
+
public static GetPatternPropertiesMixed200Response = {
|
|
1450
|
+
toJson: (model: GetPatternPropertiesMixed200Response): any => {
|
|
1451
|
+
if (model === undefined || model === null) {
|
|
1452
|
+
return model;
|
|
1453
|
+
}
|
|
1454
|
+
return {
|
|
1455
|
+
...$IO.$mapValues(
|
|
1456
|
+
Object.fromEntries(
|
|
1457
|
+
Object.entries(model).filter(
|
|
1458
|
+
([key]) => !['id', 'name'].includes(key) && /^x-/.test(key),
|
|
1459
|
+
),
|
|
1460
|
+
),
|
|
1461
|
+
(patternProperty) => patternProperty,
|
|
1462
|
+
),
|
|
1463
|
+
...$IO.$mapValues(
|
|
1464
|
+
Object.fromEntries(
|
|
1465
|
+
Object.entries(model).filter(
|
|
1466
|
+
([key]) => !['id', 'name'].includes(key) && !/^x-/.test(key),
|
|
1467
|
+
),
|
|
1468
|
+
),
|
|
1469
|
+
(additionalProperty) => additionalProperty,
|
|
1470
|
+
),
|
|
1471
|
+
...(model.id === undefined
|
|
1472
|
+
? {}
|
|
1473
|
+
: {
|
|
1474
|
+
id: model.id,
|
|
1475
|
+
}),
|
|
1476
|
+
...(model.name === undefined
|
|
1477
|
+
? {}
|
|
1478
|
+
: {
|
|
1479
|
+
name: model.name,
|
|
1480
|
+
}),
|
|
1481
|
+
};
|
|
1482
|
+
},
|
|
1483
|
+
fromJson: (json: any): GetPatternPropertiesMixed200Response => {
|
|
1484
|
+
if (json === undefined || json === null) {
|
|
1485
|
+
return json;
|
|
1486
|
+
}
|
|
1487
|
+
return {
|
|
1488
|
+
...$IO.$mapValues(
|
|
1489
|
+
Object.fromEntries(
|
|
1490
|
+
Object.entries(json).filter(
|
|
1491
|
+
([key]) => !['id', 'name'].includes(key) && /^x-/.test(key),
|
|
1492
|
+
),
|
|
1493
|
+
),
|
|
1494
|
+
(patternProperty) => patternProperty,
|
|
1495
|
+
),
|
|
1496
|
+
...$IO.$mapValues(
|
|
1497
|
+
Object.fromEntries(
|
|
1498
|
+
Object.entries(json).filter(
|
|
1499
|
+
([key]) => !['id', 'name'].includes(key) && !/^x-/.test(key),
|
|
1500
|
+
),
|
|
1501
|
+
),
|
|
1502
|
+
(additionalProperty) => additionalProperty,
|
|
1503
|
+
),
|
|
1504
|
+
id: json['id'],
|
|
1505
|
+
name: json['name'],
|
|
1506
|
+
};
|
|
1507
|
+
},
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
public static GetPatternPropertiesMultiple200Response = {
|
|
1511
|
+
toJson: (model: GetPatternPropertiesMultiple200Response): any => {
|
|
1512
|
+
if (model === undefined || model === null) {
|
|
1513
|
+
return model;
|
|
1514
|
+
}
|
|
1515
|
+
return {
|
|
1516
|
+
...$IO.$mapValues(
|
|
1517
|
+
Object.fromEntries(
|
|
1518
|
+
Object.entries(model).filter(
|
|
1519
|
+
([key]) => !['id', 'name'].includes(key) && /^x-/.test(key),
|
|
1520
|
+
),
|
|
1521
|
+
),
|
|
1522
|
+
(patternProperty) => patternProperty,
|
|
1523
|
+
),
|
|
1524
|
+
...$IO.$mapValues(
|
|
1525
|
+
Object.fromEntries(
|
|
1526
|
+
Object.entries(model).filter(
|
|
1527
|
+
([key]) => !['id', 'name'].includes(key) && /^y-/.test(key),
|
|
1528
|
+
),
|
|
1529
|
+
),
|
|
1530
|
+
(patternProperty) => patternProperty,
|
|
1531
|
+
),
|
|
1532
|
+
...(model.id === undefined
|
|
1533
|
+
? {}
|
|
1534
|
+
: {
|
|
1535
|
+
id: model.id,
|
|
1536
|
+
}),
|
|
1537
|
+
...(model.name === undefined
|
|
1538
|
+
? {}
|
|
1539
|
+
: {
|
|
1540
|
+
name: model.name,
|
|
1541
|
+
}),
|
|
1542
|
+
};
|
|
1543
|
+
},
|
|
1544
|
+
fromJson: (json: any): GetPatternPropertiesMultiple200Response => {
|
|
1545
|
+
if (json === undefined || json === null) {
|
|
1546
|
+
return json;
|
|
1547
|
+
}
|
|
1548
|
+
return {
|
|
1549
|
+
...$IO.$mapValues(
|
|
1550
|
+
Object.fromEntries(
|
|
1551
|
+
Object.entries(json).filter(
|
|
1552
|
+
([key]) => !['id', 'name'].includes(key) && /^x-/.test(key),
|
|
1553
|
+
),
|
|
1554
|
+
),
|
|
1555
|
+
(patternProperty) => patternProperty,
|
|
1556
|
+
),
|
|
1557
|
+
...$IO.$mapValues(
|
|
1558
|
+
Object.fromEntries(
|
|
1559
|
+
Object.entries(json).filter(
|
|
1560
|
+
([key]) => !['id', 'name'].includes(key) && /^y-/.test(key),
|
|
1561
|
+
),
|
|
1562
|
+
),
|
|
1563
|
+
(patternProperty) => patternProperty,
|
|
1564
|
+
),
|
|
1565
|
+
id: json['id'],
|
|
1566
|
+
name: json['name'],
|
|
1567
|
+
};
|
|
1568
|
+
},
|
|
1569
|
+
};
|
|
1570
|
+
|
|
1571
|
+
public static GetPatternPropertiesNested200Response = {
|
|
1572
|
+
toJson: (model: GetPatternPropertiesNested200Response): any => {
|
|
1573
|
+
if (model === undefined || model === null) {
|
|
1574
|
+
return model;
|
|
1575
|
+
}
|
|
1576
|
+
return {
|
|
1577
|
+
...(model.id === undefined
|
|
1578
|
+
? {}
|
|
1579
|
+
: {
|
|
1580
|
+
id: model.id,
|
|
1581
|
+
}),
|
|
1582
|
+
...(model.config === undefined
|
|
1583
|
+
? {}
|
|
1584
|
+
: {
|
|
1585
|
+
config: $IO.GetPatternPropertiesNested200ResponseConfig.toJson(
|
|
1586
|
+
model.config,
|
|
1587
|
+
),
|
|
1588
|
+
}),
|
|
1589
|
+
};
|
|
1590
|
+
},
|
|
1591
|
+
fromJson: (json: any): GetPatternPropertiesNested200Response => {
|
|
1592
|
+
if (json === undefined || json === null) {
|
|
1593
|
+
return json;
|
|
1594
|
+
}
|
|
1595
|
+
return {
|
|
1596
|
+
id: json['id'],
|
|
1597
|
+
...(json['config'] === undefined
|
|
1598
|
+
? {}
|
|
1599
|
+
: {
|
|
1600
|
+
config: $IO.GetPatternPropertiesNested200ResponseConfig.fromJson(
|
|
1601
|
+
json['config'],
|
|
1602
|
+
),
|
|
1603
|
+
}),
|
|
1604
|
+
};
|
|
1605
|
+
},
|
|
1606
|
+
};
|
|
1607
|
+
|
|
1608
|
+
public static GetPatternPropertiesNested200ResponseConfig = {
|
|
1609
|
+
toJson: (model: GetPatternPropertiesNested200ResponseConfig): any => {
|
|
1610
|
+
if (model === undefined || model === null) {
|
|
1611
|
+
return model;
|
|
1612
|
+
}
|
|
1613
|
+
return {
|
|
1614
|
+
...$IO.$mapValues(
|
|
1615
|
+
Object.fromEntries(
|
|
1616
|
+
Object.entries(model).filter(([key]) => /^setting-/.test(key)),
|
|
1617
|
+
),
|
|
1618
|
+
(patternProperty) =>
|
|
1619
|
+
$IO.GetPatternPropertiesNested200ResponseConfigSetting0.toJson(
|
|
1620
|
+
patternProperty,
|
|
1621
|
+
),
|
|
1622
|
+
),
|
|
1623
|
+
};
|
|
1624
|
+
},
|
|
1625
|
+
fromJson: (json: any): GetPatternPropertiesNested200ResponseConfig => {
|
|
1626
|
+
if (json === undefined || json === null) {
|
|
1627
|
+
return json;
|
|
1628
|
+
}
|
|
1629
|
+
return {
|
|
1630
|
+
...$IO.$mapValues(
|
|
1631
|
+
Object.fromEntries(
|
|
1632
|
+
Object.entries(json).filter(([key]) => /^setting-/.test(key)),
|
|
1633
|
+
),
|
|
1634
|
+
(patternProperty) =>
|
|
1635
|
+
$IO.GetPatternPropertiesNested200ResponseConfigSetting0.fromJson(
|
|
1636
|
+
patternProperty,
|
|
1637
|
+
),
|
|
1638
|
+
),
|
|
1639
|
+
};
|
|
1640
|
+
},
|
|
1641
|
+
};
|
|
1642
|
+
|
|
1643
|
+
public static GetPatternPropertiesNested200ResponseConfigSetting0 = {
|
|
1644
|
+
toJson: (
|
|
1645
|
+
model: GetPatternPropertiesNested200ResponseConfigSetting0,
|
|
1646
|
+
): any => {
|
|
1647
|
+
if (model === undefined || model === null) {
|
|
1648
|
+
return model;
|
|
1649
|
+
}
|
|
1650
|
+
return {
|
|
1651
|
+
...$IO.$mapValues(
|
|
1652
|
+
Object.fromEntries(
|
|
1653
|
+
Object.entries(model).filter(
|
|
1654
|
+
([key]) => !['isEnabled'].includes(key) && /^option-/.test(key),
|
|
1655
|
+
),
|
|
1656
|
+
),
|
|
1657
|
+
(patternProperty) => patternProperty,
|
|
1658
|
+
),
|
|
1659
|
+
...(model.isEnabled === undefined
|
|
1660
|
+
? {}
|
|
1661
|
+
: {
|
|
1662
|
+
is_enabled: model.isEnabled,
|
|
1663
|
+
}),
|
|
1664
|
+
};
|
|
1665
|
+
},
|
|
1666
|
+
fromJson: (
|
|
1667
|
+
json: any,
|
|
1668
|
+
): GetPatternPropertiesNested200ResponseConfigSetting0 => {
|
|
1669
|
+
if (json === undefined || json === null) {
|
|
1670
|
+
return json;
|
|
1671
|
+
}
|
|
1672
|
+
return {
|
|
1673
|
+
...$IO.$mapValues(
|
|
1674
|
+
Object.fromEntries(
|
|
1675
|
+
Object.entries(json).filter(
|
|
1676
|
+
([key]) => !['is_enabled'].includes(key) && /^option-/.test(key),
|
|
1677
|
+
),
|
|
1678
|
+
),
|
|
1679
|
+
(patternProperty) => patternProperty,
|
|
1680
|
+
),
|
|
1681
|
+
...(json['is_enabled'] === undefined
|
|
1682
|
+
? {}
|
|
1683
|
+
: {
|
|
1684
|
+
isEnabled: json['is_enabled'],
|
|
1685
|
+
}),
|
|
1686
|
+
};
|
|
1687
|
+
},
|
|
1688
|
+
};
|
|
1689
|
+
|
|
1690
|
+
public static GetPatternPropertiesNoProps200Response = {
|
|
1691
|
+
toJson: (model: GetPatternPropertiesNoProps200Response): any => {
|
|
1692
|
+
if (model === undefined || model === null) {
|
|
1693
|
+
return model;
|
|
1694
|
+
}
|
|
1695
|
+
return {
|
|
1696
|
+
...$IO.$mapValues(
|
|
1697
|
+
Object.fromEntries(
|
|
1698
|
+
Object.entries(model).filter(([key]) => /^x-/.test(key)),
|
|
1699
|
+
),
|
|
1700
|
+
(patternProperty) => patternProperty,
|
|
1701
|
+
),
|
|
1702
|
+
...$IO.$mapValues(
|
|
1703
|
+
Object.fromEntries(
|
|
1704
|
+
Object.entries(model).filter(([key]) => !/^x-/.test(key)),
|
|
1705
|
+
),
|
|
1706
|
+
(additionalProperty) => additionalProperty,
|
|
1707
|
+
),
|
|
1708
|
+
};
|
|
1709
|
+
},
|
|
1710
|
+
fromJson: (json: any): GetPatternPropertiesNoProps200Response => {
|
|
1711
|
+
if (json === undefined || json === null) {
|
|
1712
|
+
return json;
|
|
1713
|
+
}
|
|
1714
|
+
return {
|
|
1715
|
+
...$IO.$mapValues(
|
|
1716
|
+
Object.fromEntries(
|
|
1717
|
+
Object.entries(json).filter(([key]) => /^x-/.test(key)),
|
|
1718
|
+
),
|
|
1719
|
+
(patternProperty) => patternProperty,
|
|
1720
|
+
),
|
|
1721
|
+
...$IO.$mapValues(
|
|
1722
|
+
Object.fromEntries(
|
|
1723
|
+
Object.entries(json).filter(([key]) => !/^x-/.test(key)),
|
|
1724
|
+
),
|
|
1725
|
+
(additionalProperty) => additionalProperty,
|
|
1726
|
+
),
|
|
1727
|
+
};
|
|
1728
|
+
},
|
|
1729
|
+
};
|
|
1730
|
+
|
|
1731
|
+
public static GetPatternPropertiesOnly200Response = {
|
|
1732
|
+
toJson: (model: GetPatternPropertiesOnly200Response): any => {
|
|
1733
|
+
if (model === undefined || model === null) {
|
|
1734
|
+
return model;
|
|
1735
|
+
}
|
|
1736
|
+
return {
|
|
1737
|
+
...$IO.$mapValues(
|
|
1738
|
+
Object.fromEntries(
|
|
1739
|
+
Object.entries(model).filter(([key]) => /^x-/.test(key)),
|
|
1740
|
+
),
|
|
1741
|
+
(patternProperty) => patternProperty,
|
|
1742
|
+
),
|
|
1743
|
+
...$IO.$mapValues(
|
|
1744
|
+
Object.fromEntries(
|
|
1745
|
+
Object.entries(model).filter(([key]) => /^y-/.test(key)),
|
|
1746
|
+
),
|
|
1747
|
+
(patternProperty) => patternProperty,
|
|
1748
|
+
),
|
|
1749
|
+
};
|
|
1750
|
+
},
|
|
1751
|
+
fromJson: (json: any): GetPatternPropertiesOnly200Response => {
|
|
1752
|
+
if (json === undefined || json === null) {
|
|
1753
|
+
return json;
|
|
1754
|
+
}
|
|
1755
|
+
return {
|
|
1756
|
+
...$IO.$mapValues(
|
|
1757
|
+
Object.fromEntries(
|
|
1758
|
+
Object.entries(json).filter(([key]) => /^x-/.test(key)),
|
|
1759
|
+
),
|
|
1760
|
+
(patternProperty) => patternProperty,
|
|
1761
|
+
),
|
|
1762
|
+
...$IO.$mapValues(
|
|
1763
|
+
Object.fromEntries(
|
|
1764
|
+
Object.entries(json).filter(([key]) => /^y-/.test(key)),
|
|
1765
|
+
),
|
|
1766
|
+
(patternProperty) => patternProperty,
|
|
1767
|
+
),
|
|
1768
|
+
};
|
|
1769
|
+
},
|
|
1770
|
+
};
|
|
1771
|
+
|
|
1772
|
+
public static GetPatternPropertiesSingle200Response = {
|
|
1773
|
+
toJson: (model: GetPatternPropertiesSingle200Response): any => {
|
|
1774
|
+
if (model === undefined || model === null) {
|
|
1775
|
+
return model;
|
|
1776
|
+
}
|
|
1777
|
+
return {
|
|
1778
|
+
...$IO.$mapValues(
|
|
1779
|
+
Object.fromEntries(
|
|
1780
|
+
Object.entries(model).filter(
|
|
1781
|
+
([key]) => !['id', 'name'].includes(key) && /^x-/.test(key),
|
|
1782
|
+
),
|
|
1783
|
+
),
|
|
1784
|
+
(patternProperty) => patternProperty,
|
|
1785
|
+
),
|
|
1786
|
+
...(model.id === undefined
|
|
1787
|
+
? {}
|
|
1788
|
+
: {
|
|
1789
|
+
id: model.id,
|
|
1790
|
+
}),
|
|
1791
|
+
...(model.name === undefined
|
|
1792
|
+
? {}
|
|
1793
|
+
: {
|
|
1794
|
+
name: model.name,
|
|
1795
|
+
}),
|
|
1796
|
+
};
|
|
1797
|
+
},
|
|
1798
|
+
fromJson: (json: any): GetPatternPropertiesSingle200Response => {
|
|
1799
|
+
if (json === undefined || json === null) {
|
|
1800
|
+
return json;
|
|
1801
|
+
}
|
|
1802
|
+
return {
|
|
1803
|
+
...$IO.$mapValues(
|
|
1804
|
+
Object.fromEntries(
|
|
1805
|
+
Object.entries(json).filter(
|
|
1806
|
+
([key]) => !['id', 'name'].includes(key) && /^x-/.test(key),
|
|
1807
|
+
),
|
|
1808
|
+
),
|
|
1809
|
+
(patternProperty) => patternProperty,
|
|
1810
|
+
),
|
|
1811
|
+
id: json['id'],
|
|
1812
|
+
name: json['name'],
|
|
1813
|
+
};
|
|
1814
|
+
},
|
|
1815
|
+
};
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
/**
|
|
1819
|
+
* Client configuration for TestApi
|
|
1820
|
+
*/
|
|
1821
|
+
export interface TestApiConfig {
|
|
1822
|
+
/**
|
|
1823
|
+
* Base URL for the API
|
|
1824
|
+
*/
|
|
1825
|
+
url: string;
|
|
1826
|
+
/**
|
|
1827
|
+
* Custom instance of fetch. By default the global 'fetch' is used.
|
|
1828
|
+
* You can override this to add custom middleware for use cases such as adding authentication headers.
|
|
1829
|
+
*/
|
|
1830
|
+
fetch?: typeof fetch;
|
|
1831
|
+
/**
|
|
1832
|
+
* Additional configuration
|
|
1833
|
+
*/
|
|
1834
|
+
options?: {
|
|
1835
|
+
/**
|
|
1836
|
+
* By default, the client will add a Content-Type header, set to the media type defined for
|
|
1837
|
+
* the request in the OpenAPI specification.
|
|
1838
|
+
* Set this to false to omit this header.
|
|
1839
|
+
*/
|
|
1840
|
+
omitContentTypeHeader?: boolean;
|
|
1841
|
+
};
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
/**
|
|
1845
|
+
* API Client for TestApi
|
|
1846
|
+
*/
|
|
1847
|
+
export class TestApi {
|
|
1848
|
+
private $config: TestApiConfig;
|
|
1849
|
+
|
|
1850
|
+
constructor(config: TestApiConfig) {
|
|
1851
|
+
this.$config = config;
|
|
1852
|
+
|
|
1853
|
+
this.getPatternPropertiesArrayArrays =
|
|
1854
|
+
this.getPatternPropertiesArrayArrays.bind(this);
|
|
1855
|
+
this.getPatternPropertiesArrayObjectDicts =
|
|
1856
|
+
this.getPatternPropertiesArrayObjectDicts.bind(this);
|
|
1857
|
+
this.getPatternPropertiesArrayObjects =
|
|
1858
|
+
this.getPatternPropertiesArrayObjects.bind(this);
|
|
1859
|
+
this.getPatternPropertiesArrayPrimitives =
|
|
1860
|
+
this.getPatternPropertiesArrayPrimitives.bind(this);
|
|
1861
|
+
this.getPatternPropertiesArrayStringDicts =
|
|
1862
|
+
this.getPatternPropertiesArrayStringDicts.bind(this);
|
|
1863
|
+
this.getPatternPropertiesMixed = this.getPatternPropertiesMixed.bind(this);
|
|
1864
|
+
this.getPatternPropertiesMultiple =
|
|
1865
|
+
this.getPatternPropertiesMultiple.bind(this);
|
|
1866
|
+
this.getPatternPropertiesNested =
|
|
1867
|
+
this.getPatternPropertiesNested.bind(this);
|
|
1868
|
+
this.getPatternPropertiesNoProps =
|
|
1869
|
+
this.getPatternPropertiesNoProps.bind(this);
|
|
1870
|
+
this.getPatternPropertiesOnly = this.getPatternPropertiesOnly.bind(this);
|
|
1871
|
+
this.getPatternPropertiesSingle =
|
|
1872
|
+
this.getPatternPropertiesSingle.bind(this);
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
private $url = (
|
|
1876
|
+
path: string,
|
|
1877
|
+
pathParameters: { [key: string]: any },
|
|
1878
|
+
queryParameters: { [key: string]: any },
|
|
1879
|
+
collectionFormats?: { [key: string]: 'multi' | 'csv' },
|
|
1880
|
+
): string => {
|
|
1881
|
+
const baseUrl = this.$config.url.endsWith('/')
|
|
1882
|
+
? this.$config.url.slice(0, -1)
|
|
1883
|
+
: this.$config.url;
|
|
1884
|
+
const pathWithParameters = Object.entries(pathParameters).reduce(
|
|
1885
|
+
(withParams, [key, value]) =>
|
|
1886
|
+
withParams.replace(\`{\${key}}\`, encodeURIComponent(\`\${value}\`)),
|
|
1887
|
+
path,
|
|
1888
|
+
);
|
|
1889
|
+
const queryString = Object.entries(queryParameters)
|
|
1890
|
+
.map(([key, value]) => {
|
|
1891
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
1892
|
+
return value
|
|
1893
|
+
.map(
|
|
1894
|
+
(v) => \`\${encodeURIComponent(key)}=\${encodeURIComponent(\`\${v}\`)}\`,
|
|
1895
|
+
)
|
|
1896
|
+
.join('&');
|
|
1897
|
+
}
|
|
1898
|
+
return \`\${encodeURIComponent(key)}=\${encodeURIComponent(Array.isArray(value) ? value.map(String).join(',') : String(value))}\`;
|
|
1899
|
+
})
|
|
1900
|
+
.join('&');
|
|
1901
|
+
return (
|
|
1902
|
+
baseUrl + pathWithParameters + (queryString ? \`?\${queryString}\` : '')
|
|
1903
|
+
);
|
|
1904
|
+
};
|
|
1905
|
+
|
|
1906
|
+
private $headers = (
|
|
1907
|
+
headerParameters: { [key: string]: any },
|
|
1908
|
+
collectionFormats?: { [key: string]: 'multi' | 'csv' },
|
|
1909
|
+
): [string, string][] => {
|
|
1910
|
+
return Object.entries(headerParameters).flatMap(([key, value]) => {
|
|
1911
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
1912
|
+
return value.map((v) => [key, String(v)]) as [string, string][];
|
|
1913
|
+
}
|
|
1914
|
+
return [[key, String(value)]];
|
|
1915
|
+
});
|
|
1916
|
+
};
|
|
1917
|
+
|
|
1918
|
+
private $fetch: typeof fetch = (...args) =>
|
|
1919
|
+
(this.$config.fetch ?? fetch)(...args);
|
|
1920
|
+
|
|
1921
|
+
public async getPatternPropertiesArrayArrays(): Promise<GetPatternPropertiesArrayArrays200Response> {
|
|
1922
|
+
const pathParameters: { [key: string]: any } = {};
|
|
1923
|
+
const queryParameters: { [key: string]: any } = {};
|
|
1924
|
+
const headerParameters: { [key: string]: any } = {};
|
|
1925
|
+
|
|
1926
|
+
const body = undefined;
|
|
1927
|
+
|
|
1928
|
+
const response = await this.$fetch(
|
|
1929
|
+
this.$url(
|
|
1930
|
+
'/pattern-properties-array-arrays',
|
|
1931
|
+
pathParameters,
|
|
1932
|
+
queryParameters,
|
|
1933
|
+
),
|
|
1934
|
+
{
|
|
1935
|
+
headers: this.$headers(headerParameters),
|
|
1936
|
+
method: 'GET',
|
|
1937
|
+
body,
|
|
1938
|
+
},
|
|
1939
|
+
);
|
|
1940
|
+
|
|
1941
|
+
if (response.status === 200) {
|
|
1942
|
+
return $IO.GetPatternPropertiesArrayArrays200Response.fromJson(
|
|
1943
|
+
await response.json(),
|
|
1944
|
+
);
|
|
1945
|
+
}
|
|
1946
|
+
throw new Error(
|
|
1947
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
1948
|
+
);
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
public async getPatternPropertiesArrayObjectDicts(): Promise<GetPatternPropertiesArrayObjectDicts200Response> {
|
|
1952
|
+
const pathParameters: { [key: string]: any } = {};
|
|
1953
|
+
const queryParameters: { [key: string]: any } = {};
|
|
1954
|
+
const headerParameters: { [key: string]: any } = {};
|
|
1955
|
+
|
|
1956
|
+
const body = undefined;
|
|
1957
|
+
|
|
1958
|
+
const response = await this.$fetch(
|
|
1959
|
+
this.$url(
|
|
1960
|
+
'/pattern-properties-array-object-dicts',
|
|
1961
|
+
pathParameters,
|
|
1962
|
+
queryParameters,
|
|
1963
|
+
),
|
|
1964
|
+
{
|
|
1965
|
+
headers: this.$headers(headerParameters),
|
|
1966
|
+
method: 'GET',
|
|
1967
|
+
body,
|
|
1968
|
+
},
|
|
1969
|
+
);
|
|
1970
|
+
|
|
1971
|
+
if (response.status === 200) {
|
|
1972
|
+
return $IO.GetPatternPropertiesArrayObjectDicts200Response.fromJson(
|
|
1973
|
+
await response.json(),
|
|
1974
|
+
);
|
|
1975
|
+
}
|
|
1976
|
+
throw new Error(
|
|
1977
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
1978
|
+
);
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
public async getPatternPropertiesArrayObjects(): Promise<GetPatternPropertiesArrayObjects200Response> {
|
|
1982
|
+
const pathParameters: { [key: string]: any } = {};
|
|
1983
|
+
const queryParameters: { [key: string]: any } = {};
|
|
1984
|
+
const headerParameters: { [key: string]: any } = {};
|
|
1985
|
+
|
|
1986
|
+
const body = undefined;
|
|
1987
|
+
|
|
1988
|
+
const response = await this.$fetch(
|
|
1989
|
+
this.$url(
|
|
1990
|
+
'/pattern-properties-array-objects',
|
|
1991
|
+
pathParameters,
|
|
1992
|
+
queryParameters,
|
|
1993
|
+
),
|
|
1994
|
+
{
|
|
1995
|
+
headers: this.$headers(headerParameters),
|
|
1996
|
+
method: 'GET',
|
|
1997
|
+
body,
|
|
1998
|
+
},
|
|
1999
|
+
);
|
|
2000
|
+
|
|
2001
|
+
if (response.status === 200) {
|
|
2002
|
+
return $IO.GetPatternPropertiesArrayObjects200Response.fromJson(
|
|
2003
|
+
await response.json(),
|
|
2004
|
+
);
|
|
2005
|
+
}
|
|
2006
|
+
throw new Error(
|
|
2007
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
2008
|
+
);
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
public async getPatternPropertiesArrayPrimitives(): Promise<GetPatternPropertiesArrayPrimitives200Response> {
|
|
2012
|
+
const pathParameters: { [key: string]: any } = {};
|
|
2013
|
+
const queryParameters: { [key: string]: any } = {};
|
|
2014
|
+
const headerParameters: { [key: string]: any } = {};
|
|
2015
|
+
|
|
2016
|
+
const body = undefined;
|
|
2017
|
+
|
|
2018
|
+
const response = await this.$fetch(
|
|
2019
|
+
this.$url(
|
|
2020
|
+
'/pattern-properties-array-primitives',
|
|
2021
|
+
pathParameters,
|
|
2022
|
+
queryParameters,
|
|
2023
|
+
),
|
|
2024
|
+
{
|
|
2025
|
+
headers: this.$headers(headerParameters),
|
|
2026
|
+
method: 'GET',
|
|
2027
|
+
body,
|
|
2028
|
+
},
|
|
2029
|
+
);
|
|
2030
|
+
|
|
2031
|
+
if (response.status === 200) {
|
|
2032
|
+
return $IO.GetPatternPropertiesArrayPrimitives200Response.fromJson(
|
|
2033
|
+
await response.json(),
|
|
2034
|
+
);
|
|
2035
|
+
}
|
|
2036
|
+
throw new Error(
|
|
2037
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
2038
|
+
);
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
public async getPatternPropertiesArrayStringDicts(): Promise<GetPatternPropertiesArrayStringDicts200Response> {
|
|
2042
|
+
const pathParameters: { [key: string]: any } = {};
|
|
2043
|
+
const queryParameters: { [key: string]: any } = {};
|
|
2044
|
+
const headerParameters: { [key: string]: any } = {};
|
|
2045
|
+
|
|
2046
|
+
const body = undefined;
|
|
2047
|
+
|
|
2048
|
+
const response = await this.$fetch(
|
|
2049
|
+
this.$url(
|
|
2050
|
+
'/pattern-properties-array-string-dicts',
|
|
2051
|
+
pathParameters,
|
|
2052
|
+
queryParameters,
|
|
2053
|
+
),
|
|
2054
|
+
{
|
|
2055
|
+
headers: this.$headers(headerParameters),
|
|
2056
|
+
method: 'GET',
|
|
2057
|
+
body,
|
|
2058
|
+
},
|
|
2059
|
+
);
|
|
2060
|
+
|
|
2061
|
+
if (response.status === 200) {
|
|
2062
|
+
return $IO.GetPatternPropertiesArrayStringDicts200Response.fromJson(
|
|
2063
|
+
await response.json(),
|
|
2064
|
+
);
|
|
2065
|
+
}
|
|
2066
|
+
throw new Error(
|
|
2067
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
2068
|
+
);
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
public async getPatternPropertiesMixed(): Promise<GetPatternPropertiesMixed200Response> {
|
|
2072
|
+
const pathParameters: { [key: string]: any } = {};
|
|
2073
|
+
const queryParameters: { [key: string]: any } = {};
|
|
2074
|
+
const headerParameters: { [key: string]: any } = {};
|
|
2075
|
+
|
|
2076
|
+
const body = undefined;
|
|
2077
|
+
|
|
2078
|
+
const response = await this.$fetch(
|
|
2079
|
+
this.$url('/pattern-properties-mixed', pathParameters, queryParameters),
|
|
2080
|
+
{
|
|
2081
|
+
headers: this.$headers(headerParameters),
|
|
2082
|
+
method: 'GET',
|
|
2083
|
+
body,
|
|
2084
|
+
},
|
|
2085
|
+
);
|
|
2086
|
+
|
|
2087
|
+
if (response.status === 200) {
|
|
2088
|
+
return $IO.GetPatternPropertiesMixed200Response.fromJson(
|
|
2089
|
+
await response.json(),
|
|
2090
|
+
);
|
|
2091
|
+
}
|
|
2092
|
+
throw new Error(
|
|
2093
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
2094
|
+
);
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
public async getPatternPropertiesMultiple(): Promise<GetPatternPropertiesMultiple200Response> {
|
|
2098
|
+
const pathParameters: { [key: string]: any } = {};
|
|
2099
|
+
const queryParameters: { [key: string]: any } = {};
|
|
2100
|
+
const headerParameters: { [key: string]: any } = {};
|
|
2101
|
+
|
|
2102
|
+
const body = undefined;
|
|
2103
|
+
|
|
2104
|
+
const response = await this.$fetch(
|
|
2105
|
+
this.$url(
|
|
2106
|
+
'/pattern-properties-multiple',
|
|
2107
|
+
pathParameters,
|
|
2108
|
+
queryParameters,
|
|
2109
|
+
),
|
|
2110
|
+
{
|
|
2111
|
+
headers: this.$headers(headerParameters),
|
|
2112
|
+
method: 'GET',
|
|
2113
|
+
body,
|
|
2114
|
+
},
|
|
2115
|
+
);
|
|
2116
|
+
|
|
2117
|
+
if (response.status === 200) {
|
|
2118
|
+
return $IO.GetPatternPropertiesMultiple200Response.fromJson(
|
|
2119
|
+
await response.json(),
|
|
2120
|
+
);
|
|
2121
|
+
}
|
|
2122
|
+
throw new Error(
|
|
2123
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
2124
|
+
);
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
public async getPatternPropertiesNested(): Promise<GetPatternPropertiesNested200Response> {
|
|
2128
|
+
const pathParameters: { [key: string]: any } = {};
|
|
2129
|
+
const queryParameters: { [key: string]: any } = {};
|
|
2130
|
+
const headerParameters: { [key: string]: any } = {};
|
|
2131
|
+
|
|
2132
|
+
const body = undefined;
|
|
2133
|
+
|
|
2134
|
+
const response = await this.$fetch(
|
|
2135
|
+
this.$url('/pattern-properties-nested', pathParameters, queryParameters),
|
|
2136
|
+
{
|
|
2137
|
+
headers: this.$headers(headerParameters),
|
|
2138
|
+
method: 'GET',
|
|
2139
|
+
body,
|
|
2140
|
+
},
|
|
2141
|
+
);
|
|
2142
|
+
|
|
2143
|
+
if (response.status === 200) {
|
|
2144
|
+
return $IO.GetPatternPropertiesNested200Response.fromJson(
|
|
2145
|
+
await response.json(),
|
|
2146
|
+
);
|
|
2147
|
+
}
|
|
2148
|
+
throw new Error(
|
|
2149
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
2150
|
+
);
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
public async getPatternPropertiesNoProps(): Promise<GetPatternPropertiesNoProps200Response> {
|
|
2154
|
+
const pathParameters: { [key: string]: any } = {};
|
|
2155
|
+
const queryParameters: { [key: string]: any } = {};
|
|
2156
|
+
const headerParameters: { [key: string]: any } = {};
|
|
2157
|
+
|
|
2158
|
+
const body = undefined;
|
|
2159
|
+
|
|
2160
|
+
const response = await this.$fetch(
|
|
2161
|
+
this.$url(
|
|
2162
|
+
'/pattern-properties-no-props',
|
|
2163
|
+
pathParameters,
|
|
2164
|
+
queryParameters,
|
|
2165
|
+
),
|
|
2166
|
+
{
|
|
2167
|
+
headers: this.$headers(headerParameters),
|
|
2168
|
+
method: 'GET',
|
|
2169
|
+
body,
|
|
2170
|
+
},
|
|
2171
|
+
);
|
|
2172
|
+
|
|
2173
|
+
if (response.status === 200) {
|
|
2174
|
+
return $IO.GetPatternPropertiesNoProps200Response.fromJson(
|
|
2175
|
+
await response.json(),
|
|
2176
|
+
);
|
|
2177
|
+
}
|
|
2178
|
+
throw new Error(
|
|
2179
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
2180
|
+
);
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
public async getPatternPropertiesOnly(): Promise<GetPatternPropertiesOnly200Response> {
|
|
2184
|
+
const pathParameters: { [key: string]: any } = {};
|
|
2185
|
+
const queryParameters: { [key: string]: any } = {};
|
|
2186
|
+
const headerParameters: { [key: string]: any } = {};
|
|
2187
|
+
|
|
2188
|
+
const body = undefined;
|
|
2189
|
+
|
|
2190
|
+
const response = await this.$fetch(
|
|
2191
|
+
this.$url('/pattern-properties-only', pathParameters, queryParameters),
|
|
2192
|
+
{
|
|
2193
|
+
headers: this.$headers(headerParameters),
|
|
2194
|
+
method: 'GET',
|
|
2195
|
+
body,
|
|
2196
|
+
},
|
|
2197
|
+
);
|
|
2198
|
+
|
|
2199
|
+
if (response.status === 200) {
|
|
2200
|
+
return $IO.GetPatternPropertiesOnly200Response.fromJson(
|
|
2201
|
+
await response.json(),
|
|
2202
|
+
);
|
|
2203
|
+
}
|
|
2204
|
+
throw new Error(
|
|
2205
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
2206
|
+
);
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
public async getPatternPropertiesSingle(): Promise<GetPatternPropertiesSingle200Response> {
|
|
2210
|
+
const pathParameters: { [key: string]: any } = {};
|
|
2211
|
+
const queryParameters: { [key: string]: any } = {};
|
|
2212
|
+
const headerParameters: { [key: string]: any } = {};
|
|
2213
|
+
|
|
2214
|
+
const body = undefined;
|
|
2215
|
+
|
|
2216
|
+
const response = await this.$fetch(
|
|
2217
|
+
this.$url('/pattern-properties-single', pathParameters, queryParameters),
|
|
2218
|
+
{
|
|
2219
|
+
headers: this.$headers(headerParameters),
|
|
2220
|
+
method: 'GET',
|
|
2221
|
+
body,
|
|
2222
|
+
},
|
|
2223
|
+
);
|
|
2224
|
+
|
|
2225
|
+
if (response.status === 200) {
|
|
2226
|
+
return $IO.GetPatternPropertiesSingle200Response.fromJson(
|
|
2227
|
+
await response.json(),
|
|
2228
|
+
);
|
|
2229
|
+
}
|
|
2230
|
+
throw new Error(
|
|
2231
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
2232
|
+
);
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
"
|
|
2236
|
+
`;
|