@rivascva/dt-idl 1.1.34 → 1.1.35
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.d.ts +94 -4
- package/package.json +1 -1
- package/services/dt-trade-service.yaml +89 -26
- package/ts/services/dt-trade-service.ts +94 -4
package/dist/index.d.ts
CHANGED
|
@@ -670,6 +670,40 @@ interface paths$1 {
|
|
|
670
670
|
patch?: never;
|
|
671
671
|
trace?: never;
|
|
672
672
|
};
|
|
673
|
+
"/portfolios": {
|
|
674
|
+
parameters: {
|
|
675
|
+
query?: never;
|
|
676
|
+
header?: never;
|
|
677
|
+
path?: never;
|
|
678
|
+
cookie?: never;
|
|
679
|
+
};
|
|
680
|
+
get?: never;
|
|
681
|
+
put?: never;
|
|
682
|
+
/** @description Adds a new portfolio */
|
|
683
|
+
post: operations$1["addPortfolio"];
|
|
684
|
+
delete?: never;
|
|
685
|
+
options?: never;
|
|
686
|
+
head?: never;
|
|
687
|
+
patch?: never;
|
|
688
|
+
trace?: never;
|
|
689
|
+
};
|
|
690
|
+
"/portfolios/by-user/{userId}": {
|
|
691
|
+
parameters: {
|
|
692
|
+
query?: never;
|
|
693
|
+
header?: never;
|
|
694
|
+
path?: never;
|
|
695
|
+
cookie?: never;
|
|
696
|
+
};
|
|
697
|
+
/** @description Gets the portfolios for the given user */
|
|
698
|
+
get: operations$1["getPortfoliosByUser"];
|
|
699
|
+
put?: never;
|
|
700
|
+
post?: never;
|
|
701
|
+
delete?: never;
|
|
702
|
+
options?: never;
|
|
703
|
+
head?: never;
|
|
704
|
+
patch?: never;
|
|
705
|
+
trace?: never;
|
|
706
|
+
};
|
|
673
707
|
"/orders": {
|
|
674
708
|
parameters: {
|
|
675
709
|
query?: never;
|
|
@@ -735,10 +769,8 @@ interface components$1 {
|
|
|
735
769
|
*/
|
|
736
770
|
dateUpdated: number;
|
|
737
771
|
};
|
|
738
|
-
/** @description
|
|
739
|
-
|
|
740
|
-
/** @example 123456 */
|
|
741
|
-
id: string;
|
|
772
|
+
/** @description Payload to add a new portfolio */
|
|
773
|
+
AddPortfolioPayload: {
|
|
742
774
|
/** @example 123456 */
|
|
743
775
|
userId: string;
|
|
744
776
|
/** @example PERSONAL */
|
|
@@ -748,6 +780,11 @@ interface components$1 {
|
|
|
748
780
|
* @example 10500.25
|
|
749
781
|
*/
|
|
750
782
|
cash: number;
|
|
783
|
+
};
|
|
784
|
+
/** @description A trading portfolio */
|
|
785
|
+
Portfolio: components$1["schemas"]["AddPortfolioPayload"] & {
|
|
786
|
+
/** @example 123456 */
|
|
787
|
+
id: string;
|
|
751
788
|
holdings: components$1["schemas"]["Holding"][];
|
|
752
789
|
orders: components$1["schemas"]["Order"][];
|
|
753
790
|
/**
|
|
@@ -1023,6 +1060,59 @@ interface operations$1 {
|
|
|
1023
1060
|
500: components$1["responses"]["InternalServerError"];
|
|
1024
1061
|
};
|
|
1025
1062
|
};
|
|
1063
|
+
addPortfolio: {
|
|
1064
|
+
parameters: {
|
|
1065
|
+
query?: never;
|
|
1066
|
+
header?: never;
|
|
1067
|
+
path?: never;
|
|
1068
|
+
cookie?: never;
|
|
1069
|
+
};
|
|
1070
|
+
/** @description The request body to add a portfolio */
|
|
1071
|
+
requestBody: {
|
|
1072
|
+
content: {
|
|
1073
|
+
"application/json": components$1["schemas"]["AddPortfolioPayload"];
|
|
1074
|
+
};
|
|
1075
|
+
};
|
|
1076
|
+
responses: {
|
|
1077
|
+
/** @description Added */
|
|
1078
|
+
201: {
|
|
1079
|
+
headers: {
|
|
1080
|
+
[name: string]: unknown;
|
|
1081
|
+
};
|
|
1082
|
+
content: {
|
|
1083
|
+
"application/json": components$1["schemas"]["Portfolio"];
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
400: components$1["responses"]["BadRequest"];
|
|
1087
|
+
404: components$1["responses"]["NotFound"];
|
|
1088
|
+
500: components$1["responses"]["InternalServerError"];
|
|
1089
|
+
};
|
|
1090
|
+
};
|
|
1091
|
+
getPortfoliosByUser: {
|
|
1092
|
+
parameters: {
|
|
1093
|
+
query?: never;
|
|
1094
|
+
header?: never;
|
|
1095
|
+
path: {
|
|
1096
|
+
/** @description The user id */
|
|
1097
|
+
userId: string;
|
|
1098
|
+
};
|
|
1099
|
+
cookie?: never;
|
|
1100
|
+
};
|
|
1101
|
+
requestBody?: never;
|
|
1102
|
+
responses: {
|
|
1103
|
+
/** @description Success */
|
|
1104
|
+
200: {
|
|
1105
|
+
headers: {
|
|
1106
|
+
[name: string]: unknown;
|
|
1107
|
+
};
|
|
1108
|
+
content: {
|
|
1109
|
+
"application/json": components$1["schemas"]["Portfolio"][];
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1112
|
+
404: components$1["responses"]["NotFound"];
|
|
1113
|
+
500: components$1["responses"]["InternalServerError"];
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1026
1116
|
addOrder: {
|
|
1027
1117
|
parameters: {
|
|
1028
1118
|
query?: never;
|
package/package.json
CHANGED
|
@@ -140,6 +140,61 @@ paths:
|
|
|
140
140
|
500:
|
|
141
141
|
$ref: '#/components/responses/InternalServerError'
|
|
142
142
|
|
|
143
|
+
/portfolios:
|
|
144
|
+
post:
|
|
145
|
+
description: Adds a new portfolio
|
|
146
|
+
operationId: addPortfolio
|
|
147
|
+
tags:
|
|
148
|
+
- Portfolios
|
|
149
|
+
requestBody:
|
|
150
|
+
description: The request body to add a portfolio
|
|
151
|
+
required: true
|
|
152
|
+
content:
|
|
153
|
+
application/json:
|
|
154
|
+
schema:
|
|
155
|
+
$ref: '#/components/schemas/AddPortfolioPayload'
|
|
156
|
+
responses:
|
|
157
|
+
201:
|
|
158
|
+
description: Added
|
|
159
|
+
content:
|
|
160
|
+
application/json:
|
|
161
|
+
schema:
|
|
162
|
+
$ref: '#/components/schemas/Portfolio'
|
|
163
|
+
400:
|
|
164
|
+
$ref: '#/components/responses/BadRequest'
|
|
165
|
+
404:
|
|
166
|
+
$ref: '#/components/responses/NotFound'
|
|
167
|
+
500:
|
|
168
|
+
$ref: '#/components/responses/InternalServerError'
|
|
169
|
+
|
|
170
|
+
/portfolios/by-user/{userId}:
|
|
171
|
+
get:
|
|
172
|
+
description: Gets the portfolios for the given user
|
|
173
|
+
operationId: getPortfoliosByUser
|
|
174
|
+
tags:
|
|
175
|
+
- Portfolios
|
|
176
|
+
parameters:
|
|
177
|
+
- in: path
|
|
178
|
+
name: userId
|
|
179
|
+
description: The user id
|
|
180
|
+
required: true
|
|
181
|
+
schema:
|
|
182
|
+
type: string
|
|
183
|
+
example: 123456
|
|
184
|
+
responses:
|
|
185
|
+
200:
|
|
186
|
+
description: Success
|
|
187
|
+
content:
|
|
188
|
+
application/json:
|
|
189
|
+
schema:
|
|
190
|
+
type: array
|
|
191
|
+
items:
|
|
192
|
+
$ref: '#/components/schemas/Portfolio'
|
|
193
|
+
404:
|
|
194
|
+
$ref: '#/components/responses/NotFound'
|
|
195
|
+
500:
|
|
196
|
+
$ref: '#/components/responses/InternalServerError'
|
|
197
|
+
|
|
143
198
|
/orders:
|
|
144
199
|
post:
|
|
145
200
|
description: Adds a new order
|
|
@@ -240,12 +295,9 @@ components:
|
|
|
240
295
|
- dateCreated
|
|
241
296
|
- dateUpdated
|
|
242
297
|
|
|
243
|
-
|
|
244
|
-
description:
|
|
298
|
+
AddPortfolioPayload:
|
|
299
|
+
description: Payload to add a new portfolio
|
|
245
300
|
properties:
|
|
246
|
-
id:
|
|
247
|
-
type: string
|
|
248
|
-
example: 123456
|
|
249
301
|
userId:
|
|
250
302
|
type: string
|
|
251
303
|
example: 123456
|
|
@@ -256,31 +308,42 @@ components:
|
|
|
256
308
|
type: number
|
|
257
309
|
format: double
|
|
258
310
|
example: 10500.25
|
|
259
|
-
holdings:
|
|
260
|
-
type: array
|
|
261
|
-
items:
|
|
262
|
-
$ref: '#/components/schemas/Holding'
|
|
263
|
-
orders:
|
|
264
|
-
type: array
|
|
265
|
-
items:
|
|
266
|
-
$ref: '#/components/schemas/Order'
|
|
267
|
-
dateCreated:
|
|
268
|
-
type: integer
|
|
269
|
-
format: int64
|
|
270
|
-
example: 1713398544000
|
|
271
|
-
dateUpdated:
|
|
272
|
-
type: integer
|
|
273
|
-
format: int64
|
|
274
|
-
example: 1713398544000
|
|
275
311
|
required:
|
|
276
|
-
- id
|
|
277
312
|
- userId
|
|
278
313
|
- type
|
|
279
314
|
- cash
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
315
|
+
|
|
316
|
+
Portfolio:
|
|
317
|
+
description: A trading portfolio
|
|
318
|
+
allOf:
|
|
319
|
+
- $ref: '#/components/schemas/AddPortfolioPayload'
|
|
320
|
+
- type: object
|
|
321
|
+
properties:
|
|
322
|
+
id:
|
|
323
|
+
type: string
|
|
324
|
+
example: 123456
|
|
325
|
+
holdings:
|
|
326
|
+
type: array
|
|
327
|
+
items:
|
|
328
|
+
$ref: '#/components/schemas/Holding'
|
|
329
|
+
orders:
|
|
330
|
+
type: array
|
|
331
|
+
items:
|
|
332
|
+
$ref: '#/components/schemas/Order'
|
|
333
|
+
dateCreated:
|
|
334
|
+
type: integer
|
|
335
|
+
format: int64
|
|
336
|
+
example: 1713398544000
|
|
337
|
+
dateUpdated:
|
|
338
|
+
type: integer
|
|
339
|
+
format: int64
|
|
340
|
+
example: 1713398544000
|
|
341
|
+
required:
|
|
342
|
+
- id
|
|
343
|
+
- holdings
|
|
344
|
+
- orders
|
|
345
|
+
- dateCreated
|
|
346
|
+
- dateUpdated
|
|
284
347
|
|
|
285
348
|
Holding:
|
|
286
349
|
description: A stock holding
|
|
@@ -57,6 +57,40 @@ export interface paths {
|
|
|
57
57
|
patch?: never;
|
|
58
58
|
trace?: never;
|
|
59
59
|
};
|
|
60
|
+
"/portfolios": {
|
|
61
|
+
parameters: {
|
|
62
|
+
query?: never;
|
|
63
|
+
header?: never;
|
|
64
|
+
path?: never;
|
|
65
|
+
cookie?: never;
|
|
66
|
+
};
|
|
67
|
+
get?: never;
|
|
68
|
+
put?: never;
|
|
69
|
+
/** @description Adds a new portfolio */
|
|
70
|
+
post: operations["addPortfolio"];
|
|
71
|
+
delete?: never;
|
|
72
|
+
options?: never;
|
|
73
|
+
head?: never;
|
|
74
|
+
patch?: never;
|
|
75
|
+
trace?: never;
|
|
76
|
+
};
|
|
77
|
+
"/portfolios/by-user/{userId}": {
|
|
78
|
+
parameters: {
|
|
79
|
+
query?: never;
|
|
80
|
+
header?: never;
|
|
81
|
+
path?: never;
|
|
82
|
+
cookie?: never;
|
|
83
|
+
};
|
|
84
|
+
/** @description Gets the portfolios for the given user */
|
|
85
|
+
get: operations["getPortfoliosByUser"];
|
|
86
|
+
put?: never;
|
|
87
|
+
post?: never;
|
|
88
|
+
delete?: never;
|
|
89
|
+
options?: never;
|
|
90
|
+
head?: never;
|
|
91
|
+
patch?: never;
|
|
92
|
+
trace?: never;
|
|
93
|
+
};
|
|
60
94
|
"/orders": {
|
|
61
95
|
parameters: {
|
|
62
96
|
query?: never;
|
|
@@ -123,10 +157,8 @@ export interface components {
|
|
|
123
157
|
*/
|
|
124
158
|
dateUpdated: number;
|
|
125
159
|
};
|
|
126
|
-
/** @description
|
|
127
|
-
|
|
128
|
-
/** @example 123456 */
|
|
129
|
-
id: string;
|
|
160
|
+
/** @description Payload to add a new portfolio */
|
|
161
|
+
AddPortfolioPayload: {
|
|
130
162
|
/** @example 123456 */
|
|
131
163
|
userId: string;
|
|
132
164
|
/** @example PERSONAL */
|
|
@@ -136,6 +168,11 @@ export interface components {
|
|
|
136
168
|
* @example 10500.25
|
|
137
169
|
*/
|
|
138
170
|
cash: number;
|
|
171
|
+
};
|
|
172
|
+
/** @description A trading portfolio */
|
|
173
|
+
Portfolio: components["schemas"]["AddPortfolioPayload"] & {
|
|
174
|
+
/** @example 123456 */
|
|
175
|
+
id: string;
|
|
139
176
|
holdings: components["schemas"]["Holding"][];
|
|
140
177
|
orders: components["schemas"]["Order"][];
|
|
141
178
|
/**
|
|
@@ -412,6 +449,59 @@ export interface operations {
|
|
|
412
449
|
500: components["responses"]["InternalServerError"];
|
|
413
450
|
};
|
|
414
451
|
};
|
|
452
|
+
addPortfolio: {
|
|
453
|
+
parameters: {
|
|
454
|
+
query?: never;
|
|
455
|
+
header?: never;
|
|
456
|
+
path?: never;
|
|
457
|
+
cookie?: never;
|
|
458
|
+
};
|
|
459
|
+
/** @description The request body to add a portfolio */
|
|
460
|
+
requestBody: {
|
|
461
|
+
content: {
|
|
462
|
+
"application/json": components["schemas"]["AddPortfolioPayload"];
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
responses: {
|
|
466
|
+
/** @description Added */
|
|
467
|
+
201: {
|
|
468
|
+
headers: {
|
|
469
|
+
[name: string]: unknown;
|
|
470
|
+
};
|
|
471
|
+
content: {
|
|
472
|
+
"application/json": components["schemas"]["Portfolio"];
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
400: components["responses"]["BadRequest"];
|
|
476
|
+
404: components["responses"]["NotFound"];
|
|
477
|
+
500: components["responses"]["InternalServerError"];
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
getPortfoliosByUser: {
|
|
481
|
+
parameters: {
|
|
482
|
+
query?: never;
|
|
483
|
+
header?: never;
|
|
484
|
+
path: {
|
|
485
|
+
/** @description The user id */
|
|
486
|
+
userId: string;
|
|
487
|
+
};
|
|
488
|
+
cookie?: never;
|
|
489
|
+
};
|
|
490
|
+
requestBody?: never;
|
|
491
|
+
responses: {
|
|
492
|
+
/** @description Success */
|
|
493
|
+
200: {
|
|
494
|
+
headers: {
|
|
495
|
+
[name: string]: unknown;
|
|
496
|
+
};
|
|
497
|
+
content: {
|
|
498
|
+
"application/json": components["schemas"]["Portfolio"][];
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
404: components["responses"]["NotFound"];
|
|
502
|
+
500: components["responses"]["InternalServerError"];
|
|
503
|
+
};
|
|
504
|
+
};
|
|
415
505
|
addOrder: {
|
|
416
506
|
parameters: {
|
|
417
507
|
query?: never;
|