@rivascva/dt-idl 1.1.30 → 1.1.34
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/dist/index.cjs.js +4 -0
- package/dist/index.d.ts +357 -103
- package/dist/index.esm.js +3 -1
- package/package.json +1 -1
- package/redocly.yaml +4 -0
- package/services/dt-app-service.yaml +210 -0
- package/services/dt-trade-service.yaml +10 -17
- package/ts/clients/clients.ts +4 -0
- package/ts/clients/errors.ts +4 -1
- package/ts/services/dt-app-service.ts +238 -0
- package/ts/services/dt-trade-service.ts +22 -13
- package/ts/types/types.ts +8 -2
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ClientOptions } from 'openapi-fetch';
|
|
|
5
5
|
* This file was auto-generated by openapi-typescript.
|
|
6
6
|
* Do not make direct changes to the file.
|
|
7
7
|
*/
|
|
8
|
-
interface paths$
|
|
8
|
+
interface paths$2 {
|
|
9
9
|
"/stocks/{symbol}": {
|
|
10
10
|
parameters: {
|
|
11
11
|
query?: never;
|
|
@@ -14,7 +14,7 @@ interface paths$1 {
|
|
|
14
14
|
cookie?: never;
|
|
15
15
|
};
|
|
16
16
|
/** @description Gets the full quote for the given stock symbol */
|
|
17
|
-
get: operations$
|
|
17
|
+
get: operations$2["getStock"];
|
|
18
18
|
put?: never;
|
|
19
19
|
post?: never;
|
|
20
20
|
delete?: never;
|
|
@@ -31,7 +31,7 @@ interface paths$1 {
|
|
|
31
31
|
cookie?: never;
|
|
32
32
|
};
|
|
33
33
|
/** @description Gets the price history chart for the given stock symbol */
|
|
34
|
-
get: operations$
|
|
34
|
+
get: operations$2["getStockHistory"];
|
|
35
35
|
put?: never;
|
|
36
36
|
post?: never;
|
|
37
37
|
delete?: never;
|
|
@@ -48,7 +48,7 @@ interface paths$1 {
|
|
|
48
48
|
cookie?: never;
|
|
49
49
|
};
|
|
50
50
|
/** @description Gets the simple quotes for the given stock symbols */
|
|
51
|
-
get: operations$
|
|
51
|
+
get: operations$2["getStocksBySymbols"];
|
|
52
52
|
put?: never;
|
|
53
53
|
post?: never;
|
|
54
54
|
delete?: never;
|
|
@@ -65,7 +65,7 @@ interface paths$1 {
|
|
|
65
65
|
cookie?: never;
|
|
66
66
|
};
|
|
67
67
|
/** @description Gets the simple quotes for the given stock exchange */
|
|
68
|
-
get: operations$
|
|
68
|
+
get: operations$2["getStocksByExchange"];
|
|
69
69
|
put?: never;
|
|
70
70
|
post?: never;
|
|
71
71
|
delete?: never;
|
|
@@ -82,7 +82,7 @@ interface paths$1 {
|
|
|
82
82
|
cookie?: never;
|
|
83
83
|
};
|
|
84
84
|
/** @description Gets the simple quotes for the market gainers */
|
|
85
|
-
get: operations$
|
|
85
|
+
get: operations$2["getMarketGainersStocks"];
|
|
86
86
|
put?: never;
|
|
87
87
|
post?: never;
|
|
88
88
|
delete?: never;
|
|
@@ -99,7 +99,7 @@ interface paths$1 {
|
|
|
99
99
|
cookie?: never;
|
|
100
100
|
};
|
|
101
101
|
/** @description Gets the simple quotes for the market losers */
|
|
102
|
-
get: operations$
|
|
102
|
+
get: operations$2["getMarketLosersStocks"];
|
|
103
103
|
put?: never;
|
|
104
104
|
post?: never;
|
|
105
105
|
delete?: never;
|
|
@@ -116,7 +116,7 @@ interface paths$1 {
|
|
|
116
116
|
cookie?: never;
|
|
117
117
|
};
|
|
118
118
|
/** @description Gets the simple quotes for the market active */
|
|
119
|
-
get: operations$
|
|
119
|
+
get: operations$2["getMarketActiveStocks"];
|
|
120
120
|
put?: never;
|
|
121
121
|
post?: never;
|
|
122
122
|
delete?: never;
|
|
@@ -133,7 +133,7 @@ interface paths$1 {
|
|
|
133
133
|
cookie?: never;
|
|
134
134
|
};
|
|
135
135
|
/** @description Gets the simple quotes that fuzzy match the search query */
|
|
136
|
-
get: operations$
|
|
136
|
+
get: operations$2["getSearchStocks"];
|
|
137
137
|
put?: never;
|
|
138
138
|
post?: never;
|
|
139
139
|
delete?: never;
|
|
@@ -150,7 +150,7 @@ interface paths$1 {
|
|
|
150
150
|
cookie?: never;
|
|
151
151
|
};
|
|
152
152
|
/** @description Gets the latest news articles */
|
|
153
|
-
get: operations$
|
|
153
|
+
get: operations$2["getNews"];
|
|
154
154
|
put?: never;
|
|
155
155
|
post?: never;
|
|
156
156
|
delete?: never;
|
|
@@ -167,7 +167,7 @@ interface paths$1 {
|
|
|
167
167
|
cookie?: never;
|
|
168
168
|
};
|
|
169
169
|
/** @description Gets the latest stock news articles for the given stock symbols */
|
|
170
|
-
get: operations$
|
|
170
|
+
get: operations$2["getNewsBySymbols"];
|
|
171
171
|
put?: never;
|
|
172
172
|
post?: never;
|
|
173
173
|
delete?: never;
|
|
@@ -177,7 +177,7 @@ interface paths$1 {
|
|
|
177
177
|
trace?: never;
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
interface components$
|
|
180
|
+
interface components$2 {
|
|
181
181
|
schemas: {
|
|
182
182
|
/** @description A simple stock quote */
|
|
183
183
|
SimpleQuote: {
|
|
@@ -202,7 +202,7 @@ interface components$1 {
|
|
|
202
202
|
percentChange: number;
|
|
203
203
|
};
|
|
204
204
|
/** @description A full stock quote */
|
|
205
|
-
FullQuote: components$
|
|
205
|
+
FullQuote: components$2["schemas"]["SimpleQuote"] & {
|
|
206
206
|
/**
|
|
207
207
|
* Format: double
|
|
208
208
|
* @example 180.75
|
|
@@ -315,7 +315,7 @@ interface components$1 {
|
|
|
315
315
|
thumbnail: string;
|
|
316
316
|
};
|
|
317
317
|
/** @description A stock news article */
|
|
318
|
-
StockNewsArticle: components$
|
|
318
|
+
StockNewsArticle: components$2["schemas"]["NewsArticle"] & {
|
|
319
319
|
/** @example AAPL */
|
|
320
320
|
symbol: string;
|
|
321
321
|
};
|
|
@@ -327,7 +327,7 @@ interface components$1 {
|
|
|
327
327
|
*/
|
|
328
328
|
status: number;
|
|
329
329
|
/** @example ERROR */
|
|
330
|
-
code: components$
|
|
330
|
+
code: components$2["schemas"]["ErrorCode"];
|
|
331
331
|
/** @example Error */
|
|
332
332
|
message: string;
|
|
333
333
|
};
|
|
@@ -343,7 +343,7 @@ interface components$1 {
|
|
|
343
343
|
[name: string]: unknown;
|
|
344
344
|
};
|
|
345
345
|
content: {
|
|
346
|
-
"application/json": components$
|
|
346
|
+
"application/json": components$2["schemas"]["Error"];
|
|
347
347
|
};
|
|
348
348
|
};
|
|
349
349
|
/** @description There was an internal server error */
|
|
@@ -352,7 +352,7 @@ interface components$1 {
|
|
|
352
352
|
[name: string]: unknown;
|
|
353
353
|
};
|
|
354
354
|
content: {
|
|
355
|
-
"application/json": components$
|
|
355
|
+
"application/json": components$2["schemas"]["Error"];
|
|
356
356
|
};
|
|
357
357
|
};
|
|
358
358
|
};
|
|
@@ -361,7 +361,7 @@ interface components$1 {
|
|
|
361
361
|
headers: never;
|
|
362
362
|
pathItems: never;
|
|
363
363
|
}
|
|
364
|
-
interface operations$
|
|
364
|
+
interface operations$2 {
|
|
365
365
|
getStock: {
|
|
366
366
|
parameters: {
|
|
367
367
|
query?: never;
|
|
@@ -380,18 +380,18 @@ interface operations$1 {
|
|
|
380
380
|
[name: string]: unknown;
|
|
381
381
|
};
|
|
382
382
|
content: {
|
|
383
|
-
"application/json": components$
|
|
383
|
+
"application/json": components$2["schemas"]["FullQuote"];
|
|
384
384
|
};
|
|
385
385
|
};
|
|
386
|
-
404: components$
|
|
387
|
-
500: components$
|
|
386
|
+
404: components$2["responses"]["NotFound"];
|
|
387
|
+
500: components$2["responses"]["InternalServerError"];
|
|
388
388
|
};
|
|
389
389
|
};
|
|
390
390
|
getStockHistory: {
|
|
391
391
|
parameters: {
|
|
392
392
|
query: {
|
|
393
393
|
/** @description The stock history timeframe */
|
|
394
|
-
timeframe: components$
|
|
394
|
+
timeframe: components$2["schemas"]["StockHistoryTimeframe"];
|
|
395
395
|
/** @description The stock history from date */
|
|
396
396
|
from: string;
|
|
397
397
|
/** @description The stock history to date */
|
|
@@ -412,11 +412,11 @@ interface operations$1 {
|
|
|
412
412
|
[name: string]: unknown;
|
|
413
413
|
};
|
|
414
414
|
content: {
|
|
415
|
-
"application/json": components$
|
|
415
|
+
"application/json": components$2["schemas"]["StockHistoryEntry"][];
|
|
416
416
|
};
|
|
417
417
|
};
|
|
418
|
-
404: components$
|
|
419
|
-
500: components$
|
|
418
|
+
404: components$2["responses"]["NotFound"];
|
|
419
|
+
500: components$2["responses"]["InternalServerError"];
|
|
420
420
|
};
|
|
421
421
|
};
|
|
422
422
|
getStocksBySymbols: {
|
|
@@ -437,11 +437,11 @@ interface operations$1 {
|
|
|
437
437
|
[name: string]: unknown;
|
|
438
438
|
};
|
|
439
439
|
content: {
|
|
440
|
-
"application/json": components$
|
|
440
|
+
"application/json": components$2["schemas"]["SimpleQuote"][];
|
|
441
441
|
};
|
|
442
442
|
};
|
|
443
|
-
404: components$
|
|
444
|
-
500: components$
|
|
443
|
+
404: components$2["responses"]["NotFound"];
|
|
444
|
+
500: components$2["responses"]["InternalServerError"];
|
|
445
445
|
};
|
|
446
446
|
};
|
|
447
447
|
getStocksByExchange: {
|
|
@@ -462,11 +462,11 @@ interface operations$1 {
|
|
|
462
462
|
[name: string]: unknown;
|
|
463
463
|
};
|
|
464
464
|
content: {
|
|
465
|
-
"application/json": components$
|
|
465
|
+
"application/json": components$2["schemas"]["SimpleQuote"][];
|
|
466
466
|
};
|
|
467
467
|
};
|
|
468
|
-
404: components$
|
|
469
|
-
500: components$
|
|
468
|
+
404: components$2["responses"]["NotFound"];
|
|
469
|
+
500: components$2["responses"]["InternalServerError"];
|
|
470
470
|
};
|
|
471
471
|
};
|
|
472
472
|
getMarketGainersStocks: {
|
|
@@ -484,10 +484,10 @@ interface operations$1 {
|
|
|
484
484
|
[name: string]: unknown;
|
|
485
485
|
};
|
|
486
486
|
content: {
|
|
487
|
-
"application/json": components$
|
|
487
|
+
"application/json": components$2["schemas"]["SimpleQuote"][];
|
|
488
488
|
};
|
|
489
489
|
};
|
|
490
|
-
500: components$
|
|
490
|
+
500: components$2["responses"]["InternalServerError"];
|
|
491
491
|
};
|
|
492
492
|
};
|
|
493
493
|
getMarketLosersStocks: {
|
|
@@ -505,10 +505,10 @@ interface operations$1 {
|
|
|
505
505
|
[name: string]: unknown;
|
|
506
506
|
};
|
|
507
507
|
content: {
|
|
508
|
-
"application/json": components$
|
|
508
|
+
"application/json": components$2["schemas"]["SimpleQuote"][];
|
|
509
509
|
};
|
|
510
510
|
};
|
|
511
|
-
500: components$
|
|
511
|
+
500: components$2["responses"]["InternalServerError"];
|
|
512
512
|
};
|
|
513
513
|
};
|
|
514
514
|
getMarketActiveStocks: {
|
|
@@ -526,10 +526,10 @@ interface operations$1 {
|
|
|
526
526
|
[name: string]: unknown;
|
|
527
527
|
};
|
|
528
528
|
content: {
|
|
529
|
-
"application/json": components$
|
|
529
|
+
"application/json": components$2["schemas"]["SimpleQuote"][];
|
|
530
530
|
};
|
|
531
531
|
};
|
|
532
|
-
500: components$
|
|
532
|
+
500: components$2["responses"]["InternalServerError"];
|
|
533
533
|
};
|
|
534
534
|
};
|
|
535
535
|
getSearchStocks: {
|
|
@@ -552,10 +552,10 @@ interface operations$1 {
|
|
|
552
552
|
[name: string]: unknown;
|
|
553
553
|
};
|
|
554
554
|
content: {
|
|
555
|
-
"application/json": components$
|
|
555
|
+
"application/json": components$2["schemas"]["SimpleQuote"][];
|
|
556
556
|
};
|
|
557
557
|
};
|
|
558
|
-
500: components$
|
|
558
|
+
500: components$2["responses"]["InternalServerError"];
|
|
559
559
|
};
|
|
560
560
|
};
|
|
561
561
|
getNews: {
|
|
@@ -576,10 +576,10 @@ interface operations$1 {
|
|
|
576
576
|
[name: string]: unknown;
|
|
577
577
|
};
|
|
578
578
|
content: {
|
|
579
|
-
"application/json": components$
|
|
579
|
+
"application/json": components$2["schemas"]["NewsArticle"][];
|
|
580
580
|
};
|
|
581
581
|
};
|
|
582
|
-
500: components$
|
|
582
|
+
500: components$2["responses"]["InternalServerError"];
|
|
583
583
|
};
|
|
584
584
|
};
|
|
585
585
|
getNewsBySymbols: {
|
|
@@ -603,11 +603,11 @@ interface operations$1 {
|
|
|
603
603
|
[name: string]: unknown;
|
|
604
604
|
};
|
|
605
605
|
content: {
|
|
606
|
-
"application/json": components$
|
|
606
|
+
"application/json": components$2["schemas"]["StockNewsArticle"][];
|
|
607
607
|
};
|
|
608
608
|
};
|
|
609
|
-
404: components$
|
|
610
|
-
500: components$
|
|
609
|
+
404: components$2["responses"]["NotFound"];
|
|
610
|
+
500: components$2["responses"]["InternalServerError"];
|
|
611
611
|
};
|
|
612
612
|
};
|
|
613
613
|
}
|
|
@@ -616,7 +616,7 @@ interface operations$1 {
|
|
|
616
616
|
* This file was auto-generated by openapi-typescript.
|
|
617
617
|
* Do not make direct changes to the file.
|
|
618
618
|
*/
|
|
619
|
-
interface paths {
|
|
619
|
+
interface paths$1 {
|
|
620
620
|
"/users": {
|
|
621
621
|
parameters: {
|
|
622
622
|
query?: never;
|
|
@@ -625,10 +625,10 @@ interface paths {
|
|
|
625
625
|
cookie?: never;
|
|
626
626
|
};
|
|
627
627
|
/** @description Gets all users */
|
|
628
|
-
get: operations["getUsers"];
|
|
628
|
+
get: operations$1["getUsers"];
|
|
629
629
|
put?: never;
|
|
630
630
|
/** @description Adds a new user */
|
|
631
|
-
post: operations["addUser"];
|
|
631
|
+
post: operations$1["addUser"];
|
|
632
632
|
delete?: never;
|
|
633
633
|
options?: never;
|
|
634
634
|
head?: never;
|
|
@@ -643,9 +643,9 @@ interface paths {
|
|
|
643
643
|
cookie?: never;
|
|
644
644
|
};
|
|
645
645
|
/** @description Gets a user */
|
|
646
|
-
get: operations["getUser"];
|
|
646
|
+
get: operations$1["getUser"];
|
|
647
647
|
/** @description Updates an existing user */
|
|
648
|
-
put: operations["updateUser"];
|
|
648
|
+
put: operations$1["updateUser"];
|
|
649
649
|
post?: never;
|
|
650
650
|
delete?: never;
|
|
651
651
|
options?: never;
|
|
@@ -661,7 +661,7 @@ interface paths {
|
|
|
661
661
|
cookie?: never;
|
|
662
662
|
};
|
|
663
663
|
/** @description Gets all portfolios of a user */
|
|
664
|
-
get: operations["getUserPortfolios"];
|
|
664
|
+
get: operations$1["getUserPortfolios"];
|
|
665
665
|
put?: never;
|
|
666
666
|
post?: never;
|
|
667
667
|
delete?: never;
|
|
@@ -680,16 +680,32 @@ interface paths {
|
|
|
680
680
|
get?: never;
|
|
681
681
|
put?: never;
|
|
682
682
|
/** @description Adds a new order */
|
|
683
|
-
post: operations["addOrder"];
|
|
683
|
+
post: operations$1["addOrder"];
|
|
684
|
+
delete?: never;
|
|
685
|
+
options?: never;
|
|
686
|
+
head?: never;
|
|
687
|
+
patch?: never;
|
|
688
|
+
trace?: never;
|
|
689
|
+
};
|
|
690
|
+
"/orders/{orderId}": {
|
|
691
|
+
parameters: {
|
|
692
|
+
query?: never;
|
|
693
|
+
header?: never;
|
|
694
|
+
path?: never;
|
|
695
|
+
cookie?: never;
|
|
696
|
+
};
|
|
697
|
+
get?: never;
|
|
698
|
+
put?: never;
|
|
699
|
+
post?: never;
|
|
684
700
|
/** @description Deletes an existing order */
|
|
685
|
-
delete: operations["deleteOrder"];
|
|
701
|
+
delete: operations$1["deleteOrder"];
|
|
686
702
|
options?: never;
|
|
687
703
|
head?: never;
|
|
688
704
|
patch?: never;
|
|
689
705
|
trace?: never;
|
|
690
706
|
};
|
|
691
707
|
}
|
|
692
|
-
interface components {
|
|
708
|
+
interface components$1 {
|
|
693
709
|
schemas: {
|
|
694
710
|
/** @description Payload to add a new user */
|
|
695
711
|
AddUserPayload: {
|
|
@@ -700,12 +716,12 @@ interface components {
|
|
|
700
716
|
/** @example USA */
|
|
701
717
|
country: string;
|
|
702
718
|
/** @example https://www.assets.com/image.png */
|
|
703
|
-
imageUrl
|
|
719
|
+
imageUrl?: string;
|
|
704
720
|
};
|
|
705
721
|
/** @description Payload to update an existing user */
|
|
706
|
-
UpdateUserPayload: components["schemas"]["AddUserPayload"];
|
|
722
|
+
UpdateUserPayload: components$1["schemas"]["AddUserPayload"];
|
|
707
723
|
/** @description A user */
|
|
708
|
-
User: components["schemas"]["AddUserPayload"] & {
|
|
724
|
+
User: components$1["schemas"]["AddUserPayload"] & {
|
|
709
725
|
/** @example 123456 */
|
|
710
726
|
id: string;
|
|
711
727
|
/**
|
|
@@ -726,14 +742,14 @@ interface components {
|
|
|
726
742
|
/** @example 123456 */
|
|
727
743
|
userId: string;
|
|
728
744
|
/** @example PERSONAL */
|
|
729
|
-
type: components["schemas"]["PortfolioType"];
|
|
745
|
+
type: components$1["schemas"]["PortfolioType"];
|
|
730
746
|
/**
|
|
731
747
|
* Format: double
|
|
732
748
|
* @example 10500.25
|
|
733
749
|
*/
|
|
734
750
|
cash: number;
|
|
735
|
-
holdings: components["schemas"]["Holding"][];
|
|
736
|
-
orders: components["schemas"]["Order"][];
|
|
751
|
+
holdings: components$1["schemas"]["Holding"][];
|
|
752
|
+
orders: components$1["schemas"]["Order"][];
|
|
737
753
|
/**
|
|
738
754
|
* Format: int64
|
|
739
755
|
* @example 1713398544000
|
|
@@ -777,7 +793,7 @@ interface components {
|
|
|
777
793
|
/** @example 123456 */
|
|
778
794
|
portfolioId: string;
|
|
779
795
|
/** @example BUY */
|
|
780
|
-
type: components["schemas"]["OrderType"];
|
|
796
|
+
type: components$1["schemas"]["OrderType"];
|
|
781
797
|
/** @example AAPL */
|
|
782
798
|
symbol: string;
|
|
783
799
|
/**
|
|
@@ -791,13 +807,8 @@ interface components {
|
|
|
791
807
|
*/
|
|
792
808
|
shares: number;
|
|
793
809
|
};
|
|
794
|
-
/** @description Payload to delete an existing order */
|
|
795
|
-
DeleteOrderPayload: {
|
|
796
|
-
/** @example 123456 */
|
|
797
|
-
id: string;
|
|
798
|
-
};
|
|
799
810
|
/** @description An order */
|
|
800
|
-
Order: components["schemas"]["AddOrderPayload"] & {
|
|
811
|
+
Order: components$1["schemas"]["AddOrderPayload"] & {
|
|
801
812
|
/** @example 123456 */
|
|
802
813
|
id: string;
|
|
803
814
|
/**
|
|
@@ -829,7 +840,7 @@ interface components {
|
|
|
829
840
|
*/
|
|
830
841
|
status: number;
|
|
831
842
|
/** @example ERROR */
|
|
832
|
-
code: components["schemas"]["ErrorCode"];
|
|
843
|
+
code: components$1["schemas"]["ErrorCode"];
|
|
833
844
|
/** @example Error */
|
|
834
845
|
message: string;
|
|
835
846
|
};
|
|
@@ -854,7 +865,7 @@ interface components {
|
|
|
854
865
|
[name: string]: unknown;
|
|
855
866
|
};
|
|
856
867
|
content: {
|
|
857
|
-
"application/json": components["schemas"]["Error"];
|
|
868
|
+
"application/json": components$1["schemas"]["Error"];
|
|
858
869
|
};
|
|
859
870
|
};
|
|
860
871
|
/** @description Invalid request payload */
|
|
@@ -863,7 +874,7 @@ interface components {
|
|
|
863
874
|
[name: string]: unknown;
|
|
864
875
|
};
|
|
865
876
|
content: {
|
|
866
|
-
"application/json": components["schemas"]["Error"];
|
|
877
|
+
"application/json": components$1["schemas"]["Error"];
|
|
867
878
|
};
|
|
868
879
|
};
|
|
869
880
|
/** @description There was an internal server error */
|
|
@@ -872,7 +883,7 @@ interface components {
|
|
|
872
883
|
[name: string]: unknown;
|
|
873
884
|
};
|
|
874
885
|
content: {
|
|
875
|
-
"application/json": components["schemas"]["Error"];
|
|
886
|
+
"application/json": components$1["schemas"]["Error"];
|
|
876
887
|
};
|
|
877
888
|
};
|
|
878
889
|
};
|
|
@@ -881,7 +892,7 @@ interface components {
|
|
|
881
892
|
headers: never;
|
|
882
893
|
pathItems: never;
|
|
883
894
|
}
|
|
884
|
-
interface operations {
|
|
895
|
+
interface operations$1 {
|
|
885
896
|
getUsers: {
|
|
886
897
|
parameters: {
|
|
887
898
|
query?: never;
|
|
@@ -897,11 +908,11 @@ interface operations {
|
|
|
897
908
|
[name: string]: unknown;
|
|
898
909
|
};
|
|
899
910
|
content: {
|
|
900
|
-
"application/json": components["schemas"]["User"][];
|
|
911
|
+
"application/json": components$1["schemas"]["User"][];
|
|
901
912
|
};
|
|
902
913
|
};
|
|
903
|
-
404: components["responses"]["NotFound"];
|
|
904
|
-
500: components["responses"]["InternalServerError"];
|
|
914
|
+
404: components$1["responses"]["NotFound"];
|
|
915
|
+
500: components$1["responses"]["InternalServerError"];
|
|
905
916
|
};
|
|
906
917
|
};
|
|
907
918
|
addUser: {
|
|
@@ -914,7 +925,7 @@ interface operations {
|
|
|
914
925
|
/** @description The request body to add a user */
|
|
915
926
|
requestBody: {
|
|
916
927
|
content: {
|
|
917
|
-
"application/json": components["schemas"]["AddUserPayload"];
|
|
928
|
+
"application/json": components$1["schemas"]["AddUserPayload"];
|
|
918
929
|
};
|
|
919
930
|
};
|
|
920
931
|
responses: {
|
|
@@ -924,11 +935,11 @@ interface operations {
|
|
|
924
935
|
[name: string]: unknown;
|
|
925
936
|
};
|
|
926
937
|
content: {
|
|
927
|
-
"application/json": components["schemas"]["User"];
|
|
938
|
+
"application/json": components$1["schemas"]["User"];
|
|
928
939
|
};
|
|
929
940
|
};
|
|
930
|
-
400: components["responses"]["BadRequest"];
|
|
931
|
-
500: components["responses"]["InternalServerError"];
|
|
941
|
+
400: components$1["responses"]["BadRequest"];
|
|
942
|
+
500: components$1["responses"]["InternalServerError"];
|
|
932
943
|
};
|
|
933
944
|
};
|
|
934
945
|
getUser: {
|
|
@@ -949,11 +960,11 @@ interface operations {
|
|
|
949
960
|
[name: string]: unknown;
|
|
950
961
|
};
|
|
951
962
|
content: {
|
|
952
|
-
"application/json": components["schemas"]["User"];
|
|
963
|
+
"application/json": components$1["schemas"]["User"];
|
|
953
964
|
};
|
|
954
965
|
};
|
|
955
|
-
404: components["responses"]["NotFound"];
|
|
956
|
-
500: components["responses"]["InternalServerError"];
|
|
966
|
+
404: components$1["responses"]["NotFound"];
|
|
967
|
+
500: components$1["responses"]["InternalServerError"];
|
|
957
968
|
};
|
|
958
969
|
};
|
|
959
970
|
updateUser: {
|
|
@@ -969,7 +980,7 @@ interface operations {
|
|
|
969
980
|
/** @description The request body to updated a user */
|
|
970
981
|
requestBody: {
|
|
971
982
|
content: {
|
|
972
|
-
"application/json": components["schemas"]["UpdateUserPayload"];
|
|
983
|
+
"application/json": components$1["schemas"]["UpdateUserPayload"];
|
|
973
984
|
};
|
|
974
985
|
};
|
|
975
986
|
responses: {
|
|
@@ -979,12 +990,12 @@ interface operations {
|
|
|
979
990
|
[name: string]: unknown;
|
|
980
991
|
};
|
|
981
992
|
content: {
|
|
982
|
-
"application/json": components["schemas"]["User"];
|
|
993
|
+
"application/json": components$1["schemas"]["User"];
|
|
983
994
|
};
|
|
984
995
|
};
|
|
985
|
-
400: components["responses"]["BadRequest"];
|
|
986
|
-
404: components["responses"]["NotFound"];
|
|
987
|
-
500: components["responses"]["InternalServerError"];
|
|
996
|
+
400: components$1["responses"]["BadRequest"];
|
|
997
|
+
404: components$1["responses"]["NotFound"];
|
|
998
|
+
500: components$1["responses"]["InternalServerError"];
|
|
988
999
|
};
|
|
989
1000
|
};
|
|
990
1001
|
getUserPortfolios: {
|
|
@@ -1005,11 +1016,11 @@ interface operations {
|
|
|
1005
1016
|
[name: string]: unknown;
|
|
1006
1017
|
};
|
|
1007
1018
|
content: {
|
|
1008
|
-
"application/json": components["schemas"]["Portfolio"][];
|
|
1019
|
+
"application/json": components$1["schemas"]["Portfolio"][];
|
|
1009
1020
|
};
|
|
1010
1021
|
};
|
|
1011
|
-
404: components["responses"]["NotFound"];
|
|
1012
|
-
500: components["responses"]["InternalServerError"];
|
|
1022
|
+
404: components$1["responses"]["NotFound"];
|
|
1023
|
+
500: components$1["responses"]["InternalServerError"];
|
|
1013
1024
|
};
|
|
1014
1025
|
};
|
|
1015
1026
|
addOrder: {
|
|
@@ -1022,7 +1033,7 @@ interface operations {
|
|
|
1022
1033
|
/** @description The request body to add an order */
|
|
1023
1034
|
requestBody: {
|
|
1024
1035
|
content: {
|
|
1025
|
-
"application/json": components["schemas"]["AddOrderPayload"];
|
|
1036
|
+
"application/json": components$1["schemas"]["AddOrderPayload"];
|
|
1026
1037
|
};
|
|
1027
1038
|
};
|
|
1028
1039
|
responses: {
|
|
@@ -1032,29 +1043,263 @@ interface operations {
|
|
|
1032
1043
|
[name: string]: unknown;
|
|
1033
1044
|
};
|
|
1034
1045
|
content: {
|
|
1035
|
-
"application/json": components["schemas"]["Order"];
|
|
1046
|
+
"application/json": components$1["schemas"]["Order"];
|
|
1047
|
+
};
|
|
1048
|
+
};
|
|
1049
|
+
400: components$1["responses"]["BadRequest"];
|
|
1050
|
+
404: components$1["responses"]["NotFound"];
|
|
1051
|
+
500: components$1["responses"]["InternalServerError"];
|
|
1052
|
+
};
|
|
1053
|
+
};
|
|
1054
|
+
deleteOrder: {
|
|
1055
|
+
parameters: {
|
|
1056
|
+
query?: never;
|
|
1057
|
+
header?: never;
|
|
1058
|
+
path: {
|
|
1059
|
+
/** @description The order id */
|
|
1060
|
+
orderId: string;
|
|
1061
|
+
};
|
|
1062
|
+
cookie?: never;
|
|
1063
|
+
};
|
|
1064
|
+
requestBody?: never;
|
|
1065
|
+
responses: {
|
|
1066
|
+
204: components$1["responses"]["NoContent"];
|
|
1067
|
+
400: components$1["responses"]["BadRequest"];
|
|
1068
|
+
404: components$1["responses"]["NotFound"];
|
|
1069
|
+
500: components$1["responses"]["InternalServerError"];
|
|
1070
|
+
};
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* This file was auto-generated by openapi-typescript.
|
|
1076
|
+
* Do not make direct changes to the file.
|
|
1077
|
+
*/
|
|
1078
|
+
interface paths {
|
|
1079
|
+
"/users": {
|
|
1080
|
+
parameters: {
|
|
1081
|
+
query?: never;
|
|
1082
|
+
header?: never;
|
|
1083
|
+
path?: never;
|
|
1084
|
+
cookie?: never;
|
|
1085
|
+
};
|
|
1086
|
+
/** @description Gets all users */
|
|
1087
|
+
get: operations["getUsers"];
|
|
1088
|
+
put?: never;
|
|
1089
|
+
/** @description Adds a new user */
|
|
1090
|
+
post: operations["addUser"];
|
|
1091
|
+
delete?: never;
|
|
1092
|
+
options?: never;
|
|
1093
|
+
head?: never;
|
|
1094
|
+
patch?: never;
|
|
1095
|
+
trace?: never;
|
|
1096
|
+
};
|
|
1097
|
+
"/users/{userId}": {
|
|
1098
|
+
parameters: {
|
|
1099
|
+
query?: never;
|
|
1100
|
+
header?: never;
|
|
1101
|
+
path?: never;
|
|
1102
|
+
cookie?: never;
|
|
1103
|
+
};
|
|
1104
|
+
/** @description Gets a user */
|
|
1105
|
+
get: operations["getUser"];
|
|
1106
|
+
/** @description Updates an existing user */
|
|
1107
|
+
put: operations["updateUser"];
|
|
1108
|
+
post?: never;
|
|
1109
|
+
delete?: never;
|
|
1110
|
+
options?: never;
|
|
1111
|
+
head?: never;
|
|
1112
|
+
patch?: never;
|
|
1113
|
+
trace?: never;
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
interface components {
|
|
1117
|
+
schemas: {
|
|
1118
|
+
/** @description Payload to add a new user */
|
|
1119
|
+
AddUserPayload: {
|
|
1120
|
+
/** @example sam.smith@example.com */
|
|
1121
|
+
email: string;
|
|
1122
|
+
/** @example Sam Smith */
|
|
1123
|
+
name: string;
|
|
1124
|
+
/** @example USA */
|
|
1125
|
+
country: string;
|
|
1126
|
+
/** @example https://www.assets.com/image.png */
|
|
1127
|
+
imageUrl?: string;
|
|
1128
|
+
};
|
|
1129
|
+
/** @description Payload to update an existing user */
|
|
1130
|
+
UpdateUserPayload: components["schemas"]["AddUserPayload"];
|
|
1131
|
+
/** @description A user */
|
|
1132
|
+
User: components["schemas"]["AddUserPayload"] & {
|
|
1133
|
+
/** @example 123456 */
|
|
1134
|
+
id: string;
|
|
1135
|
+
/**
|
|
1136
|
+
* Format: int64
|
|
1137
|
+
* @example 1713398544000
|
|
1138
|
+
*/
|
|
1139
|
+
dateCreated: number;
|
|
1140
|
+
/**
|
|
1141
|
+
* Format: int64
|
|
1142
|
+
* @example 1713398544000
|
|
1143
|
+
*/
|
|
1144
|
+
dateUpdated: number;
|
|
1145
|
+
};
|
|
1146
|
+
/** @description A generic error */
|
|
1147
|
+
Error: {
|
|
1148
|
+
/**
|
|
1149
|
+
* Format: int64
|
|
1150
|
+
* @example 500
|
|
1151
|
+
*/
|
|
1152
|
+
status: number;
|
|
1153
|
+
/** @example ERROR */
|
|
1154
|
+
code: components["schemas"]["ErrorCode"];
|
|
1155
|
+
/** @example Error */
|
|
1156
|
+
message: string;
|
|
1157
|
+
};
|
|
1158
|
+
/** @enum {string} */
|
|
1159
|
+
ErrorCode: "ERROR";
|
|
1160
|
+
};
|
|
1161
|
+
responses: {
|
|
1162
|
+
/** @description No content */
|
|
1163
|
+
NoContent: {
|
|
1164
|
+
headers: {
|
|
1165
|
+
[name: string]: unknown;
|
|
1166
|
+
};
|
|
1167
|
+
content?: never;
|
|
1168
|
+
};
|
|
1169
|
+
/** @description The resource was not found */
|
|
1170
|
+
NotFound: {
|
|
1171
|
+
headers: {
|
|
1172
|
+
[name: string]: unknown;
|
|
1173
|
+
};
|
|
1174
|
+
content: {
|
|
1175
|
+
"application/json": components["schemas"]["Error"];
|
|
1176
|
+
};
|
|
1177
|
+
};
|
|
1178
|
+
/** @description Invalid request payload */
|
|
1179
|
+
BadRequest: {
|
|
1180
|
+
headers: {
|
|
1181
|
+
[name: string]: unknown;
|
|
1182
|
+
};
|
|
1183
|
+
content: {
|
|
1184
|
+
"application/json": components["schemas"]["Error"];
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
1187
|
+
/** @description There was an internal server error */
|
|
1188
|
+
InternalServerError: {
|
|
1189
|
+
headers: {
|
|
1190
|
+
[name: string]: unknown;
|
|
1191
|
+
};
|
|
1192
|
+
content: {
|
|
1193
|
+
"application/json": components["schemas"]["Error"];
|
|
1194
|
+
};
|
|
1195
|
+
};
|
|
1196
|
+
};
|
|
1197
|
+
parameters: never;
|
|
1198
|
+
requestBodies: never;
|
|
1199
|
+
headers: never;
|
|
1200
|
+
pathItems: never;
|
|
1201
|
+
}
|
|
1202
|
+
interface operations {
|
|
1203
|
+
getUsers: {
|
|
1204
|
+
parameters: {
|
|
1205
|
+
query?: never;
|
|
1206
|
+
header?: never;
|
|
1207
|
+
path?: never;
|
|
1208
|
+
cookie?: never;
|
|
1209
|
+
};
|
|
1210
|
+
requestBody?: never;
|
|
1211
|
+
responses: {
|
|
1212
|
+
/** @description Success */
|
|
1213
|
+
200: {
|
|
1214
|
+
headers: {
|
|
1215
|
+
[name: string]: unknown;
|
|
1216
|
+
};
|
|
1217
|
+
content: {
|
|
1218
|
+
"application/json": components["schemas"]["User"][];
|
|
1036
1219
|
};
|
|
1037
1220
|
};
|
|
1038
|
-
400: components["responses"]["BadRequest"];
|
|
1039
1221
|
404: components["responses"]["NotFound"];
|
|
1040
1222
|
500: components["responses"]["InternalServerError"];
|
|
1041
1223
|
};
|
|
1042
1224
|
};
|
|
1043
|
-
|
|
1225
|
+
addUser: {
|
|
1044
1226
|
parameters: {
|
|
1045
1227
|
query?: never;
|
|
1046
1228
|
header?: never;
|
|
1047
1229
|
path?: never;
|
|
1048
1230
|
cookie?: never;
|
|
1049
1231
|
};
|
|
1050
|
-
/** @description The request body to
|
|
1232
|
+
/** @description The request body to add a user */
|
|
1051
1233
|
requestBody: {
|
|
1052
1234
|
content: {
|
|
1053
|
-
"application/json": components["schemas"]["
|
|
1235
|
+
"application/json": components["schemas"]["AddUserPayload"];
|
|
1054
1236
|
};
|
|
1055
1237
|
};
|
|
1056
1238
|
responses: {
|
|
1057
|
-
|
|
1239
|
+
/** @description Added */
|
|
1240
|
+
201: {
|
|
1241
|
+
headers: {
|
|
1242
|
+
[name: string]: unknown;
|
|
1243
|
+
};
|
|
1244
|
+
content: {
|
|
1245
|
+
"application/json": components["schemas"]["User"];
|
|
1246
|
+
};
|
|
1247
|
+
};
|
|
1248
|
+
400: components["responses"]["BadRequest"];
|
|
1249
|
+
500: components["responses"]["InternalServerError"];
|
|
1250
|
+
};
|
|
1251
|
+
};
|
|
1252
|
+
getUser: {
|
|
1253
|
+
parameters: {
|
|
1254
|
+
query?: never;
|
|
1255
|
+
header?: never;
|
|
1256
|
+
path: {
|
|
1257
|
+
/** @description The user id */
|
|
1258
|
+
userId: string;
|
|
1259
|
+
};
|
|
1260
|
+
cookie?: never;
|
|
1261
|
+
};
|
|
1262
|
+
requestBody?: never;
|
|
1263
|
+
responses: {
|
|
1264
|
+
/** @description Success */
|
|
1265
|
+
200: {
|
|
1266
|
+
headers: {
|
|
1267
|
+
[name: string]: unknown;
|
|
1268
|
+
};
|
|
1269
|
+
content: {
|
|
1270
|
+
"application/json": components["schemas"]["User"];
|
|
1271
|
+
};
|
|
1272
|
+
};
|
|
1273
|
+
404: components["responses"]["NotFound"];
|
|
1274
|
+
500: components["responses"]["InternalServerError"];
|
|
1275
|
+
};
|
|
1276
|
+
};
|
|
1277
|
+
updateUser: {
|
|
1278
|
+
parameters: {
|
|
1279
|
+
query?: never;
|
|
1280
|
+
header?: never;
|
|
1281
|
+
path: {
|
|
1282
|
+
/** @description The user id */
|
|
1283
|
+
userId: string;
|
|
1284
|
+
};
|
|
1285
|
+
cookie?: never;
|
|
1286
|
+
};
|
|
1287
|
+
/** @description The request body to updated a user */
|
|
1288
|
+
requestBody: {
|
|
1289
|
+
content: {
|
|
1290
|
+
"application/json": components["schemas"]["UpdateUserPayload"];
|
|
1291
|
+
};
|
|
1292
|
+
};
|
|
1293
|
+
responses: {
|
|
1294
|
+
/** @description Success */
|
|
1295
|
+
200: {
|
|
1296
|
+
headers: {
|
|
1297
|
+
[name: string]: unknown;
|
|
1298
|
+
};
|
|
1299
|
+
content: {
|
|
1300
|
+
"application/json": components["schemas"]["User"];
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1058
1303
|
400: components["responses"]["BadRequest"];
|
|
1059
1304
|
404: components["responses"]["NotFound"];
|
|
1060
1305
|
500: components["responses"]["InternalServerError"];
|
|
@@ -1062,8 +1307,9 @@ interface operations {
|
|
|
1062
1307
|
};
|
|
1063
1308
|
}
|
|
1064
1309
|
|
|
1065
|
-
declare const createMarketServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths$
|
|
1066
|
-
declare const createTradeServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths, `${string}/${string}`>;
|
|
1310
|
+
declare const createMarketServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths$2, `${string}/${string}`>;
|
|
1311
|
+
declare const createTradeServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths$1, `${string}/${string}`>;
|
|
1312
|
+
declare const createAppServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths, `${string}/${string}`>;
|
|
1067
1313
|
|
|
1068
1314
|
declare const isMarketServiceError: (error: unknown) => error is {
|
|
1069
1315
|
status: number;
|
|
@@ -1075,9 +1321,15 @@ declare const isTradeServiceError: (error: unknown) => error is {
|
|
|
1075
1321
|
code: "ERROR" | "NOT_ENOUGH_CASH" | "NOT_ENOUGH_SHARES" | "UNDELETABLE";
|
|
1076
1322
|
message: string;
|
|
1077
1323
|
};
|
|
1324
|
+
declare const isAppServiceError: (error: unknown) => error is {
|
|
1325
|
+
status: number;
|
|
1326
|
+
code: "ERROR";
|
|
1327
|
+
message: string;
|
|
1328
|
+
};
|
|
1078
1329
|
|
|
1079
|
-
type MarketServiceSchemas = components$
|
|
1080
|
-
type TradeServiceSchemas = components['schemas'];
|
|
1330
|
+
type MarketServiceSchemas = components$2['schemas'];
|
|
1331
|
+
type TradeServiceSchemas = components$1['schemas'];
|
|
1332
|
+
type AppServiceSchemas = components['schemas'];
|
|
1081
1333
|
type SimpleQuote = MarketServiceSchemas['SimpleQuote'];
|
|
1082
1334
|
type FullQuote = MarketServiceSchemas['FullQuote'];
|
|
1083
1335
|
type NewsArticle = MarketServiceSchemas['NewsArticle'];
|
|
@@ -1085,14 +1337,16 @@ type StockNewsArticle = MarketServiceSchemas['StockNewsArticle'];
|
|
|
1085
1337
|
type MarketServiceError = MarketServiceSchemas['Error'];
|
|
1086
1338
|
type StockHistoryTimeframe = MarketServiceSchemas['StockHistoryTimeframe'];
|
|
1087
1339
|
type StockHistoryEntry = MarketServiceSchemas['StockHistoryEntry'];
|
|
1088
|
-
type User = TradeServiceSchemas['User'];
|
|
1089
1340
|
type Portfolio = TradeServiceSchemas['Portfolio'];
|
|
1090
1341
|
type PortfolioType = TradeServiceSchemas['PortfolioType'];
|
|
1091
1342
|
type AddOrderPayload = TradeServiceSchemas['AddOrderPayload'];
|
|
1092
|
-
type DeleteOrderPayload = TradeServiceSchemas['DeleteOrderPayload'];
|
|
1093
1343
|
type Order = TradeServiceSchemas['Order'];
|
|
1094
1344
|
type OrderType = TradeServiceSchemas['OrderType'];
|
|
1095
1345
|
type Holding = TradeServiceSchemas['Holding'];
|
|
1096
1346
|
type TradeServiceError = TradeServiceSchemas['Error'];
|
|
1347
|
+
type User = AppServiceSchemas['User'];
|
|
1348
|
+
type AddUserPayload = AppServiceSchemas['AddUserPayload'];
|
|
1349
|
+
type UpdateUserPayload = AppServiceSchemas['UpdateUserPayload'];
|
|
1350
|
+
type AppServiceError = AppServiceSchemas['Error'];
|
|
1097
1351
|
|
|
1098
|
-
export { type AddOrderPayload, type
|
|
1352
|
+
export { type AddOrderPayload, type AddUserPayload, type AppServiceError, type FullQuote, type Holding, type MarketServiceError, type NewsArticle, type Order, type OrderType, type Portfolio, type PortfolioType, type SimpleQuote, type StockHistoryEntry, type StockHistoryTimeframe, type StockNewsArticle, type TradeServiceError, type UpdateUserPayload, type User, createAppServiceClient, createMarketServiceClient, createTradeServiceClient, isAppServiceError, isMarketServiceError, isTradeServiceError };
|