@rivascva/dt-idl 1.1.1 → 1.1.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/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,11 @@ interface components$1 {
|
|
|
48
48
|
* @example 182.25
|
|
49
49
|
*/
|
|
50
50
|
price: number;
|
|
51
|
+
/**
|
|
52
|
+
* Format: double
|
|
53
|
+
* @example 5.75
|
|
54
|
+
*/
|
|
55
|
+
priceChange: number;
|
|
51
56
|
/**
|
|
52
57
|
* Format: double
|
|
53
58
|
* @example 1.25
|
|
@@ -681,11 +686,11 @@ declare const createTradeServiceClient: (options: ClientOptions) => {
|
|
|
681
686
|
eject(...middleware: openapi_fetch.Middleware[]): void;
|
|
682
687
|
};
|
|
683
688
|
|
|
684
|
-
type
|
|
685
|
-
type
|
|
689
|
+
type SimpleQuote = components$1['schemas']['SimpleQuote'];
|
|
690
|
+
type FullQuote = components$1['schemas']['FullQuote'];
|
|
686
691
|
type MarketServiceError = components$1['schemas']['Error'];
|
|
687
692
|
type User = components['schemas']['User'];
|
|
688
693
|
type Order = components['schemas']['Order'];
|
|
689
694
|
type TradeSErviceError = components['schemas']['Error'];
|
|
690
695
|
|
|
691
|
-
export { type
|
|
696
|
+
export { type FullQuote, type MarketServiceError, type Order, type SimpleQuote, type TradeSErviceError, type User, createMarketServiceClient, createTradeServiceClient };
|
package/package.json
CHANGED
|
@@ -30,11 +30,11 @@ paths:
|
|
|
30
30
|
application/json:
|
|
31
31
|
schema:
|
|
32
32
|
type: object
|
|
33
|
-
$ref:
|
|
33
|
+
$ref: '#/components/schemas/FullQuote'
|
|
34
34
|
404:
|
|
35
|
-
$ref:
|
|
35
|
+
$ref: '#/components/responses/NotFound'
|
|
36
36
|
500:
|
|
37
|
-
$ref:
|
|
37
|
+
$ref: '#/components/responses/InternalServerError'
|
|
38
38
|
|
|
39
39
|
/stocks/{symbol}/history:
|
|
40
40
|
get:
|
|
@@ -55,7 +55,7 @@ paths:
|
|
|
55
55
|
description: The stock history timeframe
|
|
56
56
|
required: true
|
|
57
57
|
schema:
|
|
58
|
-
$ref:
|
|
58
|
+
$ref: '#/components/schemas/HistoryTimeframe'
|
|
59
59
|
example: MIN5
|
|
60
60
|
- in: query
|
|
61
61
|
name: from
|
|
@@ -79,11 +79,11 @@ paths:
|
|
|
79
79
|
schema:
|
|
80
80
|
type: array
|
|
81
81
|
items:
|
|
82
|
-
$ref:
|
|
82
|
+
$ref: '#/components/schemas/HistoryChartEntry'
|
|
83
83
|
404:
|
|
84
|
-
$ref:
|
|
84
|
+
$ref: '#/components/responses/NotFound'
|
|
85
85
|
500:
|
|
86
|
-
$ref:
|
|
86
|
+
$ref: '#/components/responses/InternalServerError'
|
|
87
87
|
|
|
88
88
|
/stocks/by-symbols/{symbols}:
|
|
89
89
|
get:
|
|
@@ -107,11 +107,11 @@ paths:
|
|
|
107
107
|
schema:
|
|
108
108
|
type: array
|
|
109
109
|
items:
|
|
110
|
-
$ref:
|
|
110
|
+
$ref: '#/components/schemas/SimpleQuote'
|
|
111
111
|
404:
|
|
112
|
-
$ref:
|
|
112
|
+
$ref: '#/components/responses/NotFound'
|
|
113
113
|
500:
|
|
114
|
-
$ref:
|
|
114
|
+
$ref: '#/components/responses/InternalServerError'
|
|
115
115
|
|
|
116
116
|
/stocks/by-exchange/{exchange}:
|
|
117
117
|
get:
|
|
@@ -135,11 +135,11 @@ paths:
|
|
|
135
135
|
schema:
|
|
136
136
|
type: array
|
|
137
137
|
items:
|
|
138
|
-
$ref:
|
|
138
|
+
$ref: '#/components/schemas/SimpleQuote'
|
|
139
139
|
404:
|
|
140
|
-
$ref:
|
|
140
|
+
$ref: '#/components/responses/NotFound'
|
|
141
141
|
500:
|
|
142
|
-
$ref:
|
|
142
|
+
$ref: '#/components/responses/InternalServerError'
|
|
143
143
|
|
|
144
144
|
/stocks/search:
|
|
145
145
|
get:
|
|
@@ -172,11 +172,11 @@ paths:
|
|
|
172
172
|
schema:
|
|
173
173
|
type: array
|
|
174
174
|
items:
|
|
175
|
-
$ref:
|
|
175
|
+
$ref: '#/components/schemas/SimpleQuote'
|
|
176
176
|
404:
|
|
177
|
-
$ref:
|
|
177
|
+
$ref: '#/components/responses/NotFound'
|
|
178
178
|
500:
|
|
179
|
-
$ref:
|
|
179
|
+
$ref: '#/components/responses/InternalServerError'
|
|
180
180
|
|
|
181
181
|
/news:
|
|
182
182
|
get:
|
|
@@ -202,9 +202,9 @@ paths:
|
|
|
202
202
|
schema:
|
|
203
203
|
type: array
|
|
204
204
|
items:
|
|
205
|
-
$ref:
|
|
205
|
+
$ref: '#/components/schemas/NewsArticle'
|
|
206
206
|
500:
|
|
207
|
-
$ref:
|
|
207
|
+
$ref: '#/components/responses/InternalServerError'
|
|
208
208
|
|
|
209
209
|
/news/by-symbols/{symbols}:
|
|
210
210
|
get:
|
|
@@ -237,11 +237,11 @@ paths:
|
|
|
237
237
|
schema:
|
|
238
238
|
type: array
|
|
239
239
|
items:
|
|
240
|
-
$ref:
|
|
240
|
+
$ref: '#/components/schemas/StockNewsArticle'
|
|
241
241
|
404:
|
|
242
|
-
$ref:
|
|
242
|
+
$ref: '#/components/responses/NotFound'
|
|
243
243
|
500:
|
|
244
|
-
$ref:
|
|
244
|
+
$ref: '#/components/responses/InternalServerError'
|
|
245
245
|
|
|
246
246
|
components:
|
|
247
247
|
schemas:
|
|
@@ -258,6 +258,10 @@ components:
|
|
|
258
258
|
type: number
|
|
259
259
|
format: double
|
|
260
260
|
example: 182.25
|
|
261
|
+
priceChange:
|
|
262
|
+
type: number
|
|
263
|
+
format: double
|
|
264
|
+
example: 5.75
|
|
261
265
|
percentChange:
|
|
262
266
|
type: number
|
|
263
267
|
format: double
|
|
@@ -266,12 +270,13 @@ components:
|
|
|
266
270
|
- symbol
|
|
267
271
|
- name
|
|
268
272
|
- price
|
|
273
|
+
- priceChange
|
|
269
274
|
- percentChange
|
|
270
275
|
|
|
271
276
|
FullQuote:
|
|
272
277
|
description: A full stock quote
|
|
273
278
|
allOf:
|
|
274
|
-
- $ref:
|
|
279
|
+
- $ref: '#/components/schemas/SimpleQuote'
|
|
275
280
|
- properties:
|
|
276
281
|
previousClose:
|
|
277
282
|
type: number
|
|
@@ -416,7 +421,7 @@ components:
|
|
|
416
421
|
StockNewsArticle:
|
|
417
422
|
description: A stock news article
|
|
418
423
|
allOf:
|
|
419
|
-
- $ref:
|
|
424
|
+
- $ref: '#/components/schemas/NewsArticle'
|
|
420
425
|
- type: object
|
|
421
426
|
properties:
|
|
422
427
|
symbol:
|
|
@@ -433,7 +438,7 @@ components:
|
|
|
433
438
|
format: int64
|
|
434
439
|
example: 500
|
|
435
440
|
code:
|
|
436
|
-
$ref:
|
|
441
|
+
$ref: '#/components/schemas/ErrorCode'
|
|
437
442
|
example: ERROR
|
|
438
443
|
message:
|
|
439
444
|
type: string
|
|
@@ -464,11 +469,11 @@ components:
|
|
|
464
469
|
content:
|
|
465
470
|
application/json:
|
|
466
471
|
schema:
|
|
467
|
-
$ref:
|
|
472
|
+
$ref: '#/components/schemas/Error'
|
|
468
473
|
|
|
469
474
|
InternalServerError:
|
|
470
475
|
description: There was an internal server error
|
|
471
476
|
content:
|
|
472
477
|
application/json:
|
|
473
478
|
schema:
|
|
474
|
-
$ref:
|
|
479
|
+
$ref: '#/components/schemas/Error'
|
|
@@ -23,11 +23,11 @@ paths:
|
|
|
23
23
|
schema:
|
|
24
24
|
type: array
|
|
25
25
|
items:
|
|
26
|
-
$ref:
|
|
26
|
+
$ref: '#/components/schemas/User'
|
|
27
27
|
404:
|
|
28
|
-
$ref:
|
|
28
|
+
$ref: '#/components/responses/NotFound'
|
|
29
29
|
500:
|
|
30
|
-
$ref:
|
|
30
|
+
$ref: '#/components/responses/InternalServerError'
|
|
31
31
|
post:
|
|
32
32
|
description: Adds a new user
|
|
33
33
|
operationId: addUser
|
|
@@ -39,18 +39,18 @@ paths:
|
|
|
39
39
|
content:
|
|
40
40
|
application/json:
|
|
41
41
|
schema:
|
|
42
|
-
$ref:
|
|
42
|
+
$ref: '#/components/schemas/UserPayload'
|
|
43
43
|
responses:
|
|
44
44
|
201:
|
|
45
45
|
description: Added
|
|
46
46
|
content:
|
|
47
47
|
application/json:
|
|
48
48
|
schema:
|
|
49
|
-
$ref:
|
|
49
|
+
$ref: '#/components/schemas/User'
|
|
50
50
|
400:
|
|
51
|
-
$ref:
|
|
51
|
+
$ref: '#/components/responses/BadRequest'
|
|
52
52
|
500:
|
|
53
|
-
$ref:
|
|
53
|
+
$ref: '#/components/responses/InternalServerError'
|
|
54
54
|
|
|
55
55
|
/users/{userId}:
|
|
56
56
|
get:
|
|
@@ -73,11 +73,11 @@ paths:
|
|
|
73
73
|
application/json:
|
|
74
74
|
schema:
|
|
75
75
|
type: object
|
|
76
|
-
$ref:
|
|
76
|
+
$ref: '#/components/schemas/User'
|
|
77
77
|
404:
|
|
78
|
-
$ref:
|
|
78
|
+
$ref: '#/components/responses/NotFound'
|
|
79
79
|
500:
|
|
80
|
-
$ref:
|
|
80
|
+
$ref: '#/components/responses/InternalServerError'
|
|
81
81
|
put:
|
|
82
82
|
description: Updates an existing user
|
|
83
83
|
operationId: updateUser
|
|
@@ -97,20 +97,20 @@ paths:
|
|
|
97
97
|
content:
|
|
98
98
|
application/json:
|
|
99
99
|
schema:
|
|
100
|
-
$ref:
|
|
100
|
+
$ref: '#/components/schemas/UserPayload'
|
|
101
101
|
responses:
|
|
102
102
|
200:
|
|
103
103
|
description: Success
|
|
104
104
|
content:
|
|
105
105
|
application/json:
|
|
106
106
|
schema:
|
|
107
|
-
$ref:
|
|
107
|
+
$ref: '#/components/schemas/User'
|
|
108
108
|
400:
|
|
109
|
-
$ref:
|
|
109
|
+
$ref: '#/components/responses/BadRequest'
|
|
110
110
|
404:
|
|
111
|
-
$ref:
|
|
111
|
+
$ref: '#/components/responses/NotFound'
|
|
112
112
|
500:
|
|
113
|
-
$ref:
|
|
113
|
+
$ref: '#/components/responses/InternalServerError'
|
|
114
114
|
|
|
115
115
|
/users/{userId}/portfolios:
|
|
116
116
|
get:
|
|
@@ -134,12 +134,12 @@ paths:
|
|
|
134
134
|
schema:
|
|
135
135
|
type: array
|
|
136
136
|
items:
|
|
137
|
-
$ref:
|
|
137
|
+
$ref: '#/components/schemas/Portfolio'
|
|
138
138
|
404:
|
|
139
|
-
$ref:
|
|
139
|
+
$ref: '#/components/responses/NotFound'
|
|
140
140
|
500:
|
|
141
|
-
$ref:
|
|
142
|
-
|
|
141
|
+
$ref: '#/components/responses/InternalServerError'
|
|
142
|
+
|
|
143
143
|
/orders:
|
|
144
144
|
post:
|
|
145
145
|
description: Add a new order
|
|
@@ -152,20 +152,20 @@ paths:
|
|
|
152
152
|
content:
|
|
153
153
|
application/json:
|
|
154
154
|
schema:
|
|
155
|
-
$ref:
|
|
155
|
+
$ref: '#/components/schemas/OrderPayload'
|
|
156
156
|
responses:
|
|
157
157
|
201:
|
|
158
158
|
description: Added
|
|
159
159
|
content:
|
|
160
160
|
application/json:
|
|
161
161
|
schema:
|
|
162
|
-
$ref:
|
|
162
|
+
$ref: '#/components/schemas/Order'
|
|
163
163
|
400:
|
|
164
|
-
$ref:
|
|
164
|
+
$ref: '#/components/responses/BadRequest'
|
|
165
165
|
404:
|
|
166
|
-
$ref:
|
|
166
|
+
$ref: '#/components/responses/NotFound'
|
|
167
167
|
500:
|
|
168
|
-
$ref:
|
|
168
|
+
$ref: '#/components/responses/InternalServerError'
|
|
169
169
|
|
|
170
170
|
components:
|
|
171
171
|
schemas:
|
|
@@ -185,7 +185,7 @@ components:
|
|
|
185
185
|
User:
|
|
186
186
|
description: A user
|
|
187
187
|
allOf:
|
|
188
|
-
- $ref:
|
|
188
|
+
- $ref: '#/components/schemas/UserPayload'
|
|
189
189
|
- type: object
|
|
190
190
|
properties:
|
|
191
191
|
id:
|
|
@@ -203,7 +203,7 @@ components:
|
|
|
203
203
|
- id
|
|
204
204
|
- dateCreated
|
|
205
205
|
- dateUpdated
|
|
206
|
-
|
|
206
|
+
|
|
207
207
|
Portfolio:
|
|
208
208
|
description: A trading portfolio
|
|
209
209
|
properties:
|
|
@@ -214,7 +214,7 @@ components:
|
|
|
214
214
|
type: string
|
|
215
215
|
example: 123456
|
|
216
216
|
type:
|
|
217
|
-
$ref:
|
|
217
|
+
$ref: '#/components/schemas/PortfolioType'
|
|
218
218
|
example: PERSONAL
|
|
219
219
|
cash:
|
|
220
220
|
type: number
|
|
@@ -223,7 +223,7 @@ components:
|
|
|
223
223
|
holdings:
|
|
224
224
|
type: array
|
|
225
225
|
items:
|
|
226
|
-
$ref:
|
|
226
|
+
$ref: '#/components/schemas/Holding'
|
|
227
227
|
dateCreated:
|
|
228
228
|
type: integer
|
|
229
229
|
format: int64
|
|
@@ -240,7 +240,7 @@ components:
|
|
|
240
240
|
- holdings
|
|
241
241
|
- dateCreated
|
|
242
242
|
- dateUpdated
|
|
243
|
-
|
|
243
|
+
|
|
244
244
|
Holding:
|
|
245
245
|
description: An active stock holding
|
|
246
246
|
properties:
|
|
@@ -273,7 +273,7 @@ components:
|
|
|
273
273
|
- quantity
|
|
274
274
|
- dateCreated
|
|
275
275
|
- dateUpdated
|
|
276
|
-
|
|
276
|
+
|
|
277
277
|
OrderPayload:
|
|
278
278
|
description: A trade order payload
|
|
279
279
|
properties:
|
|
@@ -281,7 +281,7 @@ components:
|
|
|
281
281
|
type: string
|
|
282
282
|
example: 123456
|
|
283
283
|
type:
|
|
284
|
-
$ref:
|
|
284
|
+
$ref: '#/components/schemas/OrderType'
|
|
285
285
|
example: BUY
|
|
286
286
|
symbol:
|
|
287
287
|
type: string
|
|
@@ -300,11 +300,11 @@ components:
|
|
|
300
300
|
- symbol
|
|
301
301
|
- targetPrice
|
|
302
302
|
- quantity
|
|
303
|
-
|
|
303
|
+
|
|
304
304
|
Order:
|
|
305
305
|
description: A trade order
|
|
306
306
|
allOf:
|
|
307
|
-
- $ref:
|
|
307
|
+
- $ref: '#/components/schemas/OrderPayload'
|
|
308
308
|
- type: object
|
|
309
309
|
properties:
|
|
310
310
|
id:
|
|
@@ -331,7 +331,7 @@ components:
|
|
|
331
331
|
format: int64
|
|
332
332
|
example: 500
|
|
333
333
|
code:
|
|
334
|
-
$ref:
|
|
334
|
+
$ref: '#/components/schemas/ErrorCode'
|
|
335
335
|
example: ERROR
|
|
336
336
|
message:
|
|
337
337
|
type: string
|
|
@@ -354,7 +354,7 @@ components:
|
|
|
354
354
|
enum:
|
|
355
355
|
- PERSONAL
|
|
356
356
|
- COMPETITIVE
|
|
357
|
-
|
|
357
|
+
|
|
358
358
|
OrderType:
|
|
359
359
|
type: string
|
|
360
360
|
enum:
|
|
@@ -371,18 +371,18 @@ components:
|
|
|
371
371
|
content:
|
|
372
372
|
application/json:
|
|
373
373
|
schema:
|
|
374
|
-
$ref:
|
|
374
|
+
$ref: '#/components/schemas/Error'
|
|
375
375
|
|
|
376
376
|
BadRequest:
|
|
377
377
|
description: Invalid request payload
|
|
378
378
|
content:
|
|
379
379
|
application/json:
|
|
380
380
|
schema:
|
|
381
|
-
$ref:
|
|
381
|
+
$ref: '#/components/schemas/Error'
|
|
382
382
|
|
|
383
383
|
InternalServerError:
|
|
384
384
|
description: There was an internal server error
|
|
385
385
|
content:
|
|
386
386
|
application/json:
|
|
387
387
|
schema:
|
|
388
|
-
$ref:
|
|
388
|
+
$ref: '#/components/schemas/Error'
|
package/ts/types/types.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { components as MarketServiceComponents } from '@ts/services/dt-market-se
|
|
|
2
2
|
import { components as TradeServiceComponents } from '@ts/services/dt-trade-service';
|
|
3
3
|
|
|
4
4
|
// Market Service Types
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
5
|
+
export type SimpleQuote = MarketServiceComponents['schemas']['SimpleQuote'];
|
|
6
|
+
export type FullQuote = MarketServiceComponents['schemas']['FullQuote'];
|
|
7
7
|
export type MarketServiceError = MarketServiceComponents['schemas']['Error'];
|
|
8
8
|
|
|
9
9
|
// Trade Service Types
|