@rivascva/dt-idl 1.1.8 → 1.1.10

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.
@@ -3,307 +3,400 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
 
6
-
7
6
  export interface paths {
8
- "/users": {
9
- /** @description Gets all users */
10
- get: operations["getUsers"];
11
- /** @description Adds a new user */
12
- post: operations["addUser"];
13
- };
14
- "/users/{userId}": {
15
- /** @description Gets a user */
16
- get: operations["getUser"];
17
- /** @description Updates an existing user */
18
- put: operations["updateUser"];
19
- };
20
- "/users/{userId}/portfolios": {
21
- /** @description Gets all portfolios of a user */
22
- get: operations["getUserPortfolios"];
23
- };
24
- "/orders": {
25
- /** @description Add a new order */
26
- post: operations["addOrder"];
27
- };
28
- }
29
-
30
- export type webhooks = Record<string, never>;
31
-
32
- export interface components {
33
- schemas: {
34
- /** @description A user payload */
35
- UserPayload: {
36
- /** @example sam.smith@example.com */
37
- email: string;
38
- /** @example Sam Smith */
39
- name: string;
40
- };
41
- /** @description A user */
42
- User: components["schemas"]["UserPayload"] & {
43
- /** @example 123456 */
44
- id: string;
45
- /**
46
- * Format: int64
47
- * @example 1713398544000
48
- */
49
- dateCreated: number;
50
- /**
51
- * Format: int64
52
- * @example 1713398544000
53
- */
54
- dateUpdated: number;
55
- };
56
- /** @description A trading portfolio */
57
- Portfolio: {
58
- /** @example 123456 */
59
- id: string;
60
- /** @example 123456 */
61
- userId: string;
62
- /** @example PERSONAL */
63
- type: components["schemas"]["PortfolioType"];
64
- /**
65
- * Format: double
66
- * @example 10500.25
67
- */
68
- cash: number;
69
- holdings: components["schemas"]["Holding"][];
70
- /**
71
- * Format: int64
72
- * @example 1713398544000
73
- */
74
- dateCreated: number;
75
- /**
76
- * Format: int64
77
- * @example 1713398544000
78
- */
79
- dateUpdated: number;
80
- };
81
- /** @description An active stock holding */
82
- Holding: {
83
- /** @example 123456 */
84
- id: string;
85
- /** @example AAPL */
86
- symbol: string;
87
- /**
88
- * Format: double
89
- * @example 182.25
90
- */
91
- averagePrice: number;
92
- /**
93
- * Format: int64
94
- * @example 10
95
- */
96
- quantity: number;
97
- /**
98
- * Format: int64
99
- * @example 1713398544000
100
- */
101
- dateCreated: number;
102
- /**
103
- * Format: int64
104
- * @example 1713398544000
105
- */
106
- dateUpdated: number;
107
- };
108
- /** @description A trade order payload */
109
- OrderPayload: {
110
- /** @example 123456 */
111
- portfolioId: string;
112
- /** @example BUY */
113
- type: components["schemas"]["OrderType"];
114
- /** @example AAPL */
115
- symbol: string;
116
- /**
117
- * Format: double
118
- * @example 182.25
119
- */
120
- targetPrice: number;
121
- /**
122
- * Format: int64
123
- * @example 10
124
- */
125
- quantity: number;
7
+ "/users": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /** @description Gets all users */
15
+ get: operations["getUsers"];
16
+ put?: never;
17
+ /** @description Adds a new user */
18
+ post: operations["addUser"];
19
+ delete?: never;
20
+ options?: never;
21
+ head?: never;
22
+ patch?: never;
23
+ trace?: never;
126
24
  };
127
- /** @description A trade order */
128
- Order: components["schemas"]["OrderPayload"] & {
129
- /** @example 123456 */
130
- id: string;
131
- /**
132
- * Format: double
133
- * @example 182.25
134
- */
135
- actualPrice: number;
136
- /**
137
- * Format: int64
138
- * @example 1713398544000
139
- */
140
- dateCreated: number;
25
+ "/users/{userId}": {
26
+ parameters: {
27
+ query?: never;
28
+ header?: never;
29
+ path?: never;
30
+ cookie?: never;
31
+ };
32
+ /** @description Gets a user */
33
+ get: operations["getUser"];
34
+ /** @description Updates an existing user */
35
+ put: operations["updateUser"];
36
+ post?: never;
37
+ delete?: never;
38
+ options?: never;
39
+ head?: never;
40
+ patch?: never;
41
+ trace?: never;
141
42
  };
142
- /** @description A generic error */
143
- Error: {
144
- /**
145
- * Format: int64
146
- * @example 500
147
- */
148
- status: number;
149
- /** @example ERROR */
150
- code: components["schemas"]["ErrorCode"];
151
- /** @example Error */
152
- message: string;
43
+ "/users/{userId}/portfolios": {
44
+ parameters: {
45
+ query?: never;
46
+ header?: never;
47
+ path?: never;
48
+ cookie?: never;
49
+ };
50
+ /** @description Gets all portfolios of a user */
51
+ get: operations["getUserPortfolios"];
52
+ put?: never;
53
+ post?: never;
54
+ delete?: never;
55
+ options?: never;
56
+ head?: never;
57
+ patch?: never;
58
+ trace?: never;
153
59
  };
154
- /** @enum {string} */
155
- ErrorCode: "ERROR" | "NOT_ENOUGH_CASH" | "NOT_ENOUGH_SHARES" | "REQS_NOT_MET";
156
- /** @enum {string} */
157
- PortfolioType: "PERSONAL" | "COMPETITIVE";
158
- /** @enum {string} */
159
- OrderType: "BUY_MARKET" | "BUY_LIMIT" | "BUY_STOP" | "SELL_MARKET" | "SELL_LIMIT" | "SELL_STOP";
160
- };
161
- responses: {
162
- /** @description The resource was not found */
163
- NotFound: {
164
- content: {
165
- "application/json": components["schemas"]["Error"];
166
- };
60
+ "/orders": {
61
+ parameters: {
62
+ query?: never;
63
+ header?: never;
64
+ path?: never;
65
+ cookie?: never;
66
+ };
67
+ get?: never;
68
+ put?: never;
69
+ /** @description Add a new order */
70
+ post: operations["addOrder"];
71
+ delete?: never;
72
+ options?: never;
73
+ head?: never;
74
+ patch?: never;
75
+ trace?: never;
167
76
  };
168
- /** @description Invalid request payload */
169
- BadRequest: {
170
- content: {
171
- "application/json": components["schemas"]["Error"];
172
- };
77
+ }
78
+ export type webhooks = Record<string, never>;
79
+ export interface components {
80
+ schemas: {
81
+ /** @description A user payload */
82
+ UserPayload: {
83
+ /** @example sam.smith@example.com */
84
+ email: string;
85
+ /** @example Sam Smith */
86
+ name: string;
87
+ };
88
+ /** @description A user */
89
+ User: components["schemas"]["UserPayload"] & {
90
+ /** @example 123456 */
91
+ id: string;
92
+ /**
93
+ * Format: int64
94
+ * @example 1713398544000
95
+ */
96
+ dateCreated: number;
97
+ /**
98
+ * Format: int64
99
+ * @example 1713398544000
100
+ */
101
+ dateUpdated: number;
102
+ };
103
+ /** @description A trading portfolio */
104
+ Portfolio: {
105
+ /** @example 123456 */
106
+ id: string;
107
+ /** @example 123456 */
108
+ userId: string;
109
+ /** @example PERSONAL */
110
+ type: components["schemas"]["PortfolioType"];
111
+ /**
112
+ * Format: double
113
+ * @example 10500.25
114
+ */
115
+ cash: number;
116
+ holdings: components["schemas"]["Holding"][];
117
+ /**
118
+ * Format: int64
119
+ * @example 1713398544000
120
+ */
121
+ dateCreated: number;
122
+ /**
123
+ * Format: int64
124
+ * @example 1713398544000
125
+ */
126
+ dateUpdated: number;
127
+ };
128
+ /** @description An active stock holding */
129
+ Holding: {
130
+ /** @example 123456 */
131
+ id: string;
132
+ /** @example AAPL */
133
+ symbol: string;
134
+ /**
135
+ * Format: double
136
+ * @example 182.25
137
+ */
138
+ averagePrice: number;
139
+ /**
140
+ * Format: int64
141
+ * @example 10
142
+ */
143
+ quantity: number;
144
+ /**
145
+ * Format: int64
146
+ * @example 1713398544000
147
+ */
148
+ dateCreated: number;
149
+ /**
150
+ * Format: int64
151
+ * @example 1713398544000
152
+ */
153
+ dateUpdated: number;
154
+ };
155
+ /** @description A trade order payload */
156
+ OrderPayload: {
157
+ /** @example 123456 */
158
+ portfolioId: string;
159
+ /** @example BUY */
160
+ type: components["schemas"]["OrderType"];
161
+ /** @example AAPL */
162
+ symbol: string;
163
+ /**
164
+ * Format: double
165
+ * @example 182.25
166
+ */
167
+ targetPrice: number;
168
+ /**
169
+ * Format: int64
170
+ * @example 10
171
+ */
172
+ quantity: number;
173
+ };
174
+ /** @description A trade order */
175
+ Order: components["schemas"]["OrderPayload"] & {
176
+ /** @example 123456 */
177
+ id: string;
178
+ /**
179
+ * Format: double
180
+ * @example 182.25
181
+ */
182
+ actualPrice: number;
183
+ /**
184
+ * Format: int64
185
+ * @example 1713398544000
186
+ */
187
+ dateCreated: number;
188
+ };
189
+ /** @description A generic error */
190
+ Error: {
191
+ /**
192
+ * Format: int64
193
+ * @example 500
194
+ */
195
+ status: number;
196
+ /** @example ERROR */
197
+ code: components["schemas"]["ErrorCode"];
198
+ /** @example Error */
199
+ message: string;
200
+ };
201
+ /** @enum {string} */
202
+ ErrorCode: "ERROR" | "NOT_ENOUGH_CASH" | "NOT_ENOUGH_SHARES" | "REQS_NOT_MET";
203
+ /** @enum {string} */
204
+ PortfolioType: "PERSONAL" | "COMPETITIVE";
205
+ /** @enum {string} */
206
+ OrderType: "BUY_MARKET" | "BUY_LIMIT" | "BUY_STOP" | "SELL_MARKET" | "SELL_LIMIT" | "SELL_STOP";
173
207
  };
174
- /** @description There was an internal server error */
175
- InternalServerError: {
176
- content: {
177
- "application/json": components["schemas"]["Error"];
178
- };
208
+ responses: {
209
+ /** @description The resource was not found */
210
+ NotFound: {
211
+ headers: {
212
+ [name: string]: unknown;
213
+ };
214
+ content: {
215
+ "application/json": components["schemas"]["Error"];
216
+ };
217
+ };
218
+ /** @description Invalid request payload */
219
+ BadRequest: {
220
+ headers: {
221
+ [name: string]: unknown;
222
+ };
223
+ content: {
224
+ "application/json": components["schemas"]["Error"];
225
+ };
226
+ };
227
+ /** @description There was an internal server error */
228
+ InternalServerError: {
229
+ headers: {
230
+ [name: string]: unknown;
231
+ };
232
+ content: {
233
+ "application/json": components["schemas"]["Error"];
234
+ };
235
+ };
179
236
  };
180
- };
181
- parameters: never;
182
- requestBodies: never;
183
- headers: never;
184
- pathItems: never;
237
+ parameters: never;
238
+ requestBodies: never;
239
+ headers: never;
240
+ pathItems: never;
185
241
  }
186
-
187
242
  export type $defs = Record<string, never>;
188
-
189
- export type external = Record<string, never>;
190
-
191
243
  export interface operations {
192
-
193
- /** @description Gets all users */
194
- getUsers: {
195
- responses: {
196
- /** @description Success */
197
- 200: {
198
- content: {
199
- "application/json": components["schemas"]["User"][];
244
+ getUsers: {
245
+ parameters: {
246
+ query?: never;
247
+ header?: never;
248
+ path?: never;
249
+ cookie?: never;
200
250
  };
201
- };
202
- 404: components["responses"]["NotFound"];
203
- 500: components["responses"]["InternalServerError"];
204
- };
205
- };
206
- /** @description Adds a new user */
207
- addUser: {
208
- /** @description The request body to add a user */
209
- requestBody: {
210
- content: {
211
- "application/json": components["schemas"]["UserPayload"];
212
- };
213
- };
214
- responses: {
215
- /** @description Added */
216
- 201: {
217
- content: {
218
- "application/json": components["schemas"]["User"];
251
+ requestBody?: never;
252
+ responses: {
253
+ /** @description Success */
254
+ 200: {
255
+ headers: {
256
+ [name: string]: unknown;
257
+ };
258
+ content: {
259
+ "application/json": components["schemas"]["User"][];
260
+ };
261
+ };
262
+ 404: components["responses"]["NotFound"];
263
+ 500: components["responses"]["InternalServerError"];
219
264
  };
220
- };
221
- 400: components["responses"]["BadRequest"];
222
- 500: components["responses"]["InternalServerError"];
223
- };
224
- };
225
- /** @description Gets a user */
226
- getUser: {
227
- parameters: {
228
- path: {
229
- /** @description The user id */
230
- userId: string;
231
- };
232
265
  };
233
- responses: {
234
- /** @description Success */
235
- 200: {
236
- content: {
237
- "application/json": components["schemas"]["User"];
266
+ addUser: {
267
+ parameters: {
268
+ query?: never;
269
+ header?: never;
270
+ path?: never;
271
+ cookie?: never;
238
272
  };
239
- };
240
- 404: components["responses"]["NotFound"];
241
- 500: components["responses"]["InternalServerError"];
242
- };
243
- };
244
- /** @description Updates an existing user */
245
- updateUser: {
246
- parameters: {
247
- path: {
248
- /** @description The user id */
249
- userId: string;
250
- };
251
- };
252
- /** @description The request body to updated a user */
253
- requestBody: {
254
- content: {
255
- "application/json": components["schemas"]["UserPayload"];
256
- };
257
- };
258
- responses: {
259
- /** @description Success */
260
- 200: {
261
- content: {
262
- "application/json": components["schemas"]["User"];
273
+ /** @description The request body to add a user */
274
+ requestBody: {
275
+ content: {
276
+ "application/json": components["schemas"]["UserPayload"];
277
+ };
278
+ };
279
+ responses: {
280
+ /** @description Added */
281
+ 201: {
282
+ headers: {
283
+ [name: string]: unknown;
284
+ };
285
+ content: {
286
+ "application/json": components["schemas"]["User"];
287
+ };
288
+ };
289
+ 400: components["responses"]["BadRequest"];
290
+ 500: components["responses"]["InternalServerError"];
263
291
  };
264
- };
265
- 400: components["responses"]["BadRequest"];
266
- 404: components["responses"]["NotFound"];
267
- 500: components["responses"]["InternalServerError"];
268
292
  };
269
- };
270
- /** @description Gets all portfolios of a user */
271
- getUserPortfolios: {
272
- parameters: {
273
- path: {
274
- /** @description The user id */
275
- userId: string;
276
- };
293
+ getUser: {
294
+ parameters: {
295
+ query?: never;
296
+ header?: never;
297
+ path: {
298
+ /** @description The user id */
299
+ userId: string;
300
+ };
301
+ cookie?: never;
302
+ };
303
+ requestBody?: never;
304
+ responses: {
305
+ /** @description Success */
306
+ 200: {
307
+ headers: {
308
+ [name: string]: unknown;
309
+ };
310
+ content: {
311
+ "application/json": components["schemas"]["User"];
312
+ };
313
+ };
314
+ 404: components["responses"]["NotFound"];
315
+ 500: components["responses"]["InternalServerError"];
316
+ };
277
317
  };
278
- responses: {
279
- /** @description Success */
280
- 200: {
281
- content: {
282
- "application/json": components["schemas"]["Portfolio"][];
318
+ updateUser: {
319
+ parameters: {
320
+ query?: never;
321
+ header?: never;
322
+ path: {
323
+ /** @description The user id */
324
+ userId: string;
325
+ };
326
+ cookie?: never;
327
+ };
328
+ /** @description The request body to updated a user */
329
+ requestBody: {
330
+ content: {
331
+ "application/json": components["schemas"]["UserPayload"];
332
+ };
333
+ };
334
+ responses: {
335
+ /** @description Success */
336
+ 200: {
337
+ headers: {
338
+ [name: string]: unknown;
339
+ };
340
+ content: {
341
+ "application/json": components["schemas"]["User"];
342
+ };
343
+ };
344
+ 400: components["responses"]["BadRequest"];
345
+ 404: components["responses"]["NotFound"];
346
+ 500: components["responses"]["InternalServerError"];
283
347
  };
284
- };
285
- 404: components["responses"]["NotFound"];
286
- 500: components["responses"]["InternalServerError"];
287
348
  };
288
- };
289
- /** @description Add a new order */
290
- addOrder: {
291
- /** @description The request body to add an order */
292
- requestBody: {
293
- content: {
294
- "application/json": components["schemas"]["OrderPayload"];
295
- };
349
+ getUserPortfolios: {
350
+ parameters: {
351
+ query?: never;
352
+ header?: never;
353
+ path: {
354
+ /** @description The user id */
355
+ userId: string;
356
+ };
357
+ cookie?: never;
358
+ };
359
+ requestBody?: never;
360
+ responses: {
361
+ /** @description Success */
362
+ 200: {
363
+ headers: {
364
+ [name: string]: unknown;
365
+ };
366
+ content: {
367
+ "application/json": components["schemas"]["Portfolio"][];
368
+ };
369
+ };
370
+ 404: components["responses"]["NotFound"];
371
+ 500: components["responses"]["InternalServerError"];
372
+ };
296
373
  };
297
- responses: {
298
- /** @description Added */
299
- 201: {
300
- content: {
301
- "application/json": components["schemas"]["Order"];
374
+ addOrder: {
375
+ parameters: {
376
+ query?: never;
377
+ header?: never;
378
+ path?: never;
379
+ cookie?: never;
380
+ };
381
+ /** @description The request body to add an order */
382
+ requestBody: {
383
+ content: {
384
+ "application/json": components["schemas"]["OrderPayload"];
385
+ };
386
+ };
387
+ responses: {
388
+ /** @description Added */
389
+ 201: {
390
+ headers: {
391
+ [name: string]: unknown;
392
+ };
393
+ content: {
394
+ "application/json": components["schemas"]["Order"];
395
+ };
396
+ };
397
+ 400: components["responses"]["BadRequest"];
398
+ 404: components["responses"]["NotFound"];
399
+ 500: components["responses"]["InternalServerError"];
302
400
  };
303
- };
304
- 400: components["responses"]["BadRequest"];
305
- 404: components["responses"]["NotFound"];
306
- 500: components["responses"]["InternalServerError"];
307
401
  };
308
- };
309
402
  }