@mgrzmil-org/api-types 0.0.1 → 0.0.3
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/openapi.json +153 -25
- package/package.json +5 -1
- package/src/api.ts +61 -15
package/openapi.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"content": {
|
|
24
24
|
"application/json": {
|
|
25
25
|
"schema": {
|
|
26
|
-
"$ref": "#/components/schemas/
|
|
26
|
+
"$ref": "#/components/schemas/APIResponse_Dict_str__List_str___"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"content": {
|
|
57
57
|
"application/json": {
|
|
58
58
|
"schema": {
|
|
59
|
-
"$ref": "#/components/schemas/
|
|
59
|
+
"$ref": "#/components/schemas/APIResponse_List_str__"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"content": {
|
|
89
89
|
"application/json": {
|
|
90
90
|
"schema": {
|
|
91
|
-
"$ref": "#/components/schemas/
|
|
91
|
+
"$ref": "#/components/schemas/APIResponse_str_"
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"content": {
|
|
122
122
|
"application/json": {
|
|
123
123
|
"schema": {
|
|
124
|
-
"$ref": "#/components/schemas/
|
|
124
|
+
"$ref": "#/components/schemas/APIResponse_List_str__"
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
}
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"content": {
|
|
165
165
|
"application/json": {
|
|
166
166
|
"schema": {
|
|
167
|
-
"$ref": "#/components/schemas/
|
|
167
|
+
"$ref": "#/components/schemas/APIResponse_str_"
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
"content": {
|
|
217
217
|
"application/json": {
|
|
218
218
|
"schema": {
|
|
219
|
-
"$ref": "#/components/schemas/
|
|
219
|
+
"$ref": "#/components/schemas/APIResponse_List_str__"
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
}
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
"content": {
|
|
269
269
|
"application/json": {
|
|
270
270
|
"schema": {
|
|
271
|
-
"$ref": "#/components/schemas/
|
|
271
|
+
"$ref": "#/components/schemas/APIResponse_str_"
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
}
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
"content": {
|
|
342
342
|
"application/json": {
|
|
343
343
|
"schema": {
|
|
344
|
-
"$ref": "#/components/schemas/
|
|
344
|
+
"$ref": "#/components/schemas/APIResponse_PerformanceMessage_"
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
}
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
"content": {
|
|
364
364
|
"application/json": {
|
|
365
365
|
"schema": {
|
|
366
|
-
"$ref": "#/components/schemas/
|
|
366
|
+
"$ref": "#/components/schemas/APIResponse_str_"
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
}
|
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
"content": {
|
|
397
397
|
"application/json": {
|
|
398
398
|
"schema": {
|
|
399
|
-
"$ref": "#/components/schemas/
|
|
399
|
+
"$ref": "#/components/schemas/APIResponse_DescriptionMessage_"
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
}
|
|
@@ -448,7 +448,7 @@
|
|
|
448
448
|
"content": {
|
|
449
449
|
"application/json": {
|
|
450
450
|
"schema": {
|
|
451
|
-
"$ref": "#/components/schemas/
|
|
451
|
+
"$ref": "#/components/schemas/APIResponse_DescriptionMessage_"
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
454
|
}
|
|
@@ -469,36 +469,131 @@
|
|
|
469
469
|
},
|
|
470
470
|
"components": {
|
|
471
471
|
"schemas": {
|
|
472
|
-
"
|
|
472
|
+
"APIResponse_DescriptionMessage_": {
|
|
473
473
|
"properties": {
|
|
474
474
|
"status": {
|
|
475
475
|
"$ref": "#/components/schemas/Status"
|
|
476
476
|
},
|
|
477
477
|
"message": {
|
|
478
|
-
"
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
478
|
+
"$ref": "#/components/schemas/DescriptionMessage"
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
"type": "object",
|
|
482
|
+
"required": [
|
|
483
|
+
"status",
|
|
484
|
+
"message"
|
|
485
|
+
],
|
|
486
|
+
"title": "APIResponse[DescriptionMessage]"
|
|
487
|
+
},
|
|
488
|
+
"APIResponse_Dict_str__List_str___": {
|
|
489
|
+
"properties": {
|
|
490
|
+
"status": {
|
|
491
|
+
"$ref": "#/components/schemas/Status"
|
|
492
|
+
},
|
|
493
|
+
"message": {
|
|
494
|
+
"additionalProperties": {
|
|
495
|
+
"items": {
|
|
496
|
+
"type": "string"
|
|
482
497
|
},
|
|
498
|
+
"type": "array"
|
|
499
|
+
},
|
|
500
|
+
"type": "object",
|
|
501
|
+
"title": "Message"
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
"type": "object",
|
|
505
|
+
"required": [
|
|
506
|
+
"status",
|
|
507
|
+
"message"
|
|
508
|
+
],
|
|
509
|
+
"title": "APIResponse[Dict[str, List[str]]]"
|
|
510
|
+
},
|
|
511
|
+
"APIResponse_List_str__": {
|
|
512
|
+
"properties": {
|
|
513
|
+
"status": {
|
|
514
|
+
"$ref": "#/components/schemas/Status"
|
|
515
|
+
},
|
|
516
|
+
"message": {
|
|
517
|
+
"items": {
|
|
518
|
+
"type": "string"
|
|
519
|
+
},
|
|
520
|
+
"type": "array",
|
|
521
|
+
"title": "Message"
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
"type": "object",
|
|
525
|
+
"required": [
|
|
526
|
+
"status",
|
|
527
|
+
"message"
|
|
528
|
+
],
|
|
529
|
+
"title": "APIResponse[List[str]]"
|
|
530
|
+
},
|
|
531
|
+
"APIResponse_PerformanceMessage_": {
|
|
532
|
+
"properties": {
|
|
533
|
+
"status": {
|
|
534
|
+
"$ref": "#/components/schemas/Status"
|
|
535
|
+
},
|
|
536
|
+
"message": {
|
|
537
|
+
"$ref": "#/components/schemas/PerformanceMessage"
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
"type": "object",
|
|
541
|
+
"required": [
|
|
542
|
+
"status",
|
|
543
|
+
"message"
|
|
544
|
+
],
|
|
545
|
+
"title": "APIResponse[PerformanceMessage]"
|
|
546
|
+
},
|
|
547
|
+
"APIResponse_str_": {
|
|
548
|
+
"properties": {
|
|
549
|
+
"status": {
|
|
550
|
+
"$ref": "#/components/schemas/Status"
|
|
551
|
+
},
|
|
552
|
+
"message": {
|
|
553
|
+
"type": "string",
|
|
554
|
+
"title": "Message"
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
"type": "object",
|
|
558
|
+
"required": [
|
|
559
|
+
"status",
|
|
560
|
+
"message"
|
|
561
|
+
],
|
|
562
|
+
"title": "APIResponse[str]"
|
|
563
|
+
},
|
|
564
|
+
"DescriptionMessage": {
|
|
565
|
+
"properties": {
|
|
566
|
+
"breed": {
|
|
567
|
+
"type": "string",
|
|
568
|
+
"title": "Breed"
|
|
569
|
+
},
|
|
570
|
+
"variant": {
|
|
571
|
+
"anyOf": [
|
|
483
572
|
{
|
|
484
|
-
"
|
|
485
|
-
"type": "string"
|
|
486
|
-
},
|
|
487
|
-
"type": "array"
|
|
573
|
+
"type": "string"
|
|
488
574
|
},
|
|
489
575
|
{
|
|
490
|
-
"type": "
|
|
576
|
+
"type": "null"
|
|
491
577
|
}
|
|
492
578
|
],
|
|
493
|
-
"title": "
|
|
579
|
+
"title": "Variant"
|
|
580
|
+
},
|
|
581
|
+
"description_en": {
|
|
582
|
+
"type": "string",
|
|
583
|
+
"title": "Description En"
|
|
584
|
+
},
|
|
585
|
+
"description_pl": {
|
|
586
|
+
"type": "string",
|
|
587
|
+
"title": "Description Pl"
|
|
494
588
|
}
|
|
495
589
|
},
|
|
496
590
|
"type": "object",
|
|
497
591
|
"required": [
|
|
498
|
-
"
|
|
499
|
-
"
|
|
592
|
+
"breed",
|
|
593
|
+
"description_en",
|
|
594
|
+
"description_pl"
|
|
500
595
|
],
|
|
501
|
-
"title": "
|
|
596
|
+
"title": "DescriptionMessage"
|
|
502
597
|
},
|
|
503
598
|
"HTTPValidationError": {
|
|
504
599
|
"properties": {
|
|
@@ -513,6 +608,39 @@
|
|
|
513
608
|
"type": "object",
|
|
514
609
|
"title": "HTTPValidationError"
|
|
515
610
|
},
|
|
611
|
+
"PerformanceMessage": {
|
|
612
|
+
"properties": {
|
|
613
|
+
"cpu_usage": {
|
|
614
|
+
"type": "string",
|
|
615
|
+
"title": "Cpu Usage"
|
|
616
|
+
},
|
|
617
|
+
"memory_usage": {
|
|
618
|
+
"type": "string",
|
|
619
|
+
"title": "Memory Usage"
|
|
620
|
+
},
|
|
621
|
+
"disk_usage": {
|
|
622
|
+
"type": "string",
|
|
623
|
+
"title": "Disk Usage"
|
|
624
|
+
},
|
|
625
|
+
"thread_count": {
|
|
626
|
+
"type": "integer",
|
|
627
|
+
"title": "Thread Count"
|
|
628
|
+
},
|
|
629
|
+
"uptime_seconds": {
|
|
630
|
+
"type": "number",
|
|
631
|
+
"title": "Uptime Seconds"
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
"type": "object",
|
|
635
|
+
"required": [
|
|
636
|
+
"cpu_usage",
|
|
637
|
+
"memory_usage",
|
|
638
|
+
"disk_usage",
|
|
639
|
+
"thread_count",
|
|
640
|
+
"uptime_seconds"
|
|
641
|
+
],
|
|
642
|
+
"title": "PerformanceMessage"
|
|
643
|
+
},
|
|
516
644
|
"Status": {
|
|
517
645
|
"type": "string",
|
|
518
646
|
"enum": [
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgrzmil-org/api-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Generated TypeScript types + OpenAPI spec for dog-api",
|
|
5
5
|
"files": [
|
|
6
6
|
"src/api.ts",
|
|
7
7
|
"openapi.json"
|
|
8
8
|
],
|
|
9
9
|
"types": "src/api.ts",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"generate": "npx --yes openapi-typescript openapi.json -o src/api.ts",
|
|
12
|
+
"yalc:push": "npm run generate && npx --yes yalc push"
|
|
13
|
+
},
|
|
10
14
|
"repository": {
|
|
11
15
|
"type": "git",
|
|
12
16
|
"url": "https://github.com/g-marcin/dog-api"
|
package/src/api.ts
CHANGED
|
@@ -248,19 +248,65 @@ export interface paths {
|
|
|
248
248
|
export type webhooks = Record<string, never>;
|
|
249
249
|
export interface components {
|
|
250
250
|
schemas: {
|
|
251
|
-
/** APIResponse */
|
|
252
|
-
|
|
251
|
+
/** APIResponse[DescriptionMessage] */
|
|
252
|
+
APIResponse_DescriptionMessage_: {
|
|
253
|
+
status: components["schemas"]["Status"];
|
|
254
|
+
message: components["schemas"]["DescriptionMessage"];
|
|
255
|
+
};
|
|
256
|
+
/** APIResponse[Dict[str, List[str]]] */
|
|
257
|
+
APIResponse_Dict_str__List_str___: {
|
|
253
258
|
status: components["schemas"]["Status"];
|
|
254
259
|
/** Message */
|
|
255
260
|
message: {
|
|
256
|
-
[key: string]:
|
|
257
|
-
}
|
|
261
|
+
[key: string]: string[];
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
/** APIResponse[List[str]] */
|
|
265
|
+
APIResponse_List_str__: {
|
|
266
|
+
status: components["schemas"]["Status"];
|
|
267
|
+
/** Message */
|
|
268
|
+
message: string[];
|
|
269
|
+
};
|
|
270
|
+
/** APIResponse[PerformanceMessage] */
|
|
271
|
+
APIResponse_PerformanceMessage_: {
|
|
272
|
+
status: components["schemas"]["Status"];
|
|
273
|
+
message: components["schemas"]["PerformanceMessage"];
|
|
274
|
+
};
|
|
275
|
+
/** APIResponse[str] */
|
|
276
|
+
APIResponse_str_: {
|
|
277
|
+
status: components["schemas"]["Status"];
|
|
278
|
+
/** Message */
|
|
279
|
+
message: string;
|
|
280
|
+
};
|
|
281
|
+
/** DescriptionMessage */
|
|
282
|
+
DescriptionMessage: {
|
|
283
|
+
/** Breed */
|
|
284
|
+
breed: string;
|
|
285
|
+
/** Variant */
|
|
286
|
+
variant?: string | null;
|
|
287
|
+
/** Description En */
|
|
288
|
+
description_en: string;
|
|
289
|
+
/** Description Pl */
|
|
290
|
+
description_pl: string;
|
|
258
291
|
};
|
|
259
292
|
/** HTTPValidationError */
|
|
260
293
|
HTTPValidationError: {
|
|
261
294
|
/** Detail */
|
|
262
295
|
detail?: components["schemas"]["ValidationError"][];
|
|
263
296
|
};
|
|
297
|
+
/** PerformanceMessage */
|
|
298
|
+
PerformanceMessage: {
|
|
299
|
+
/** Cpu Usage */
|
|
300
|
+
cpu_usage: string;
|
|
301
|
+
/** Memory Usage */
|
|
302
|
+
memory_usage: string;
|
|
303
|
+
/** Disk Usage */
|
|
304
|
+
disk_usage: string;
|
|
305
|
+
/** Thread Count */
|
|
306
|
+
thread_count: number;
|
|
307
|
+
/** Uptime Seconds */
|
|
308
|
+
uptime_seconds: number;
|
|
309
|
+
};
|
|
264
310
|
/**
|
|
265
311
|
* Status
|
|
266
312
|
* @enum {string}
|
|
@@ -299,7 +345,7 @@ export interface operations {
|
|
|
299
345
|
[name: string]: unknown;
|
|
300
346
|
};
|
|
301
347
|
content: {
|
|
302
|
-
"application/json": components["schemas"]["
|
|
348
|
+
"application/json": components["schemas"]["APIResponse_Dict_str__List_str___"];
|
|
303
349
|
};
|
|
304
350
|
};
|
|
305
351
|
};
|
|
@@ -321,7 +367,7 @@ export interface operations {
|
|
|
321
367
|
[name: string]: unknown;
|
|
322
368
|
};
|
|
323
369
|
content: {
|
|
324
|
-
"application/json": components["schemas"]["
|
|
370
|
+
"application/json": components["schemas"]["APIResponse_List_str__"];
|
|
325
371
|
};
|
|
326
372
|
};
|
|
327
373
|
/** @description Validation Error */
|
|
@@ -350,7 +396,7 @@ export interface operations {
|
|
|
350
396
|
[name: string]: unknown;
|
|
351
397
|
};
|
|
352
398
|
content: {
|
|
353
|
-
"application/json": components["schemas"]["
|
|
399
|
+
"application/json": components["schemas"]["APIResponse_str_"];
|
|
354
400
|
};
|
|
355
401
|
};
|
|
356
402
|
};
|
|
@@ -372,7 +418,7 @@ export interface operations {
|
|
|
372
418
|
[name: string]: unknown;
|
|
373
419
|
};
|
|
374
420
|
content: {
|
|
375
|
-
"application/json": components["schemas"]["
|
|
421
|
+
"application/json": components["schemas"]["APIResponse_List_str__"];
|
|
376
422
|
};
|
|
377
423
|
};
|
|
378
424
|
/** @description Validation Error */
|
|
@@ -403,7 +449,7 @@ export interface operations {
|
|
|
403
449
|
[name: string]: unknown;
|
|
404
450
|
};
|
|
405
451
|
content: {
|
|
406
|
-
"application/json": components["schemas"]["
|
|
452
|
+
"application/json": components["schemas"]["APIResponse_str_"];
|
|
407
453
|
};
|
|
408
454
|
};
|
|
409
455
|
/** @description Validation Error */
|
|
@@ -435,7 +481,7 @@ export interface operations {
|
|
|
435
481
|
[name: string]: unknown;
|
|
436
482
|
};
|
|
437
483
|
content: {
|
|
438
|
-
"application/json": components["schemas"]["
|
|
484
|
+
"application/json": components["schemas"]["APIResponse_List_str__"];
|
|
439
485
|
};
|
|
440
486
|
};
|
|
441
487
|
/** @description Validation Error */
|
|
@@ -467,7 +513,7 @@ export interface operations {
|
|
|
467
513
|
[name: string]: unknown;
|
|
468
514
|
};
|
|
469
515
|
content: {
|
|
470
|
-
"application/json": components["schemas"]["
|
|
516
|
+
"application/json": components["schemas"]["APIResponse_str_"];
|
|
471
517
|
};
|
|
472
518
|
};
|
|
473
519
|
/** @description Validation Error */
|
|
@@ -527,7 +573,7 @@ export interface operations {
|
|
|
527
573
|
[name: string]: unknown;
|
|
528
574
|
};
|
|
529
575
|
content: {
|
|
530
|
-
"application/json": components["schemas"]["
|
|
576
|
+
"application/json": components["schemas"]["APIResponse_PerformanceMessage_"];
|
|
531
577
|
};
|
|
532
578
|
};
|
|
533
579
|
};
|
|
@@ -547,7 +593,7 @@ export interface operations {
|
|
|
547
593
|
[name: string]: unknown;
|
|
548
594
|
};
|
|
549
595
|
content: {
|
|
550
|
-
"application/json": components["schemas"]["
|
|
596
|
+
"application/json": components["schemas"]["APIResponse_str_"];
|
|
551
597
|
};
|
|
552
598
|
};
|
|
553
599
|
};
|
|
@@ -569,7 +615,7 @@ export interface operations {
|
|
|
569
615
|
[name: string]: unknown;
|
|
570
616
|
};
|
|
571
617
|
content: {
|
|
572
|
-
"application/json": components["schemas"]["
|
|
618
|
+
"application/json": components["schemas"]["APIResponse_DescriptionMessage_"];
|
|
573
619
|
};
|
|
574
620
|
};
|
|
575
621
|
/** @description Validation Error */
|
|
@@ -601,7 +647,7 @@ export interface operations {
|
|
|
601
647
|
[name: string]: unknown;
|
|
602
648
|
};
|
|
603
649
|
content: {
|
|
604
|
-
"application/json": components["schemas"]["
|
|
650
|
+
"application/json": components["schemas"]["APIResponse_DescriptionMessage_"];
|
|
605
651
|
};
|
|
606
652
|
};
|
|
607
653
|
/** @description Validation Error */
|