@rivascva/dt-idl 1.1.35 → 1.1.36

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
@@ -687,6 +687,23 @@ interface paths$1 {
687
687
  patch?: never;
688
688
  trace?: never;
689
689
  };
690
+ "/portfolios/{portfolioId}": {
691
+ parameters: {
692
+ query?: never;
693
+ header?: never;
694
+ path?: never;
695
+ cookie?: never;
696
+ };
697
+ get?: never;
698
+ /** @description Updates an existing portfolio */
699
+ put: operations$1["updatePortfolio"];
700
+ post?: never;
701
+ delete?: never;
702
+ options?: never;
703
+ head?: never;
704
+ patch?: never;
705
+ trace?: never;
706
+ };
690
707
  "/portfolios/by-user/{userId}": {
691
708
  parameters: {
692
709
  query?: never;
@@ -781,6 +798,8 @@ interface components$1 {
781
798
  */
782
799
  cash: number;
783
800
  };
801
+ /** @description Payload to update an existing portfolio */
802
+ UpdatePortfolioPayload: components$1["schemas"]["AddPortfolioPayload"];
784
803
  /** @description A trading portfolio */
785
804
  Portfolio: components$1["schemas"]["AddPortfolioPayload"] & {
786
805
  /** @example 123456 */
@@ -1014,7 +1033,7 @@ interface operations$1 {
1014
1033
  };
1015
1034
  cookie?: never;
1016
1035
  };
1017
- /** @description The request body to updated a user */
1036
+ /** @description The request body to update a user */
1018
1037
  requestBody: {
1019
1038
  content: {
1020
1039
  "application/json": components$1["schemas"]["UpdateUserPayload"];
@@ -1088,6 +1107,37 @@ interface operations$1 {
1088
1107
  500: components$1["responses"]["InternalServerError"];
1089
1108
  };
1090
1109
  };
1110
+ updatePortfolio: {
1111
+ parameters: {
1112
+ query?: never;
1113
+ header?: never;
1114
+ path: {
1115
+ /** @description The portfolio id */
1116
+ portfolioId: string;
1117
+ };
1118
+ cookie?: never;
1119
+ };
1120
+ /** @description The request body to update a portfolio */
1121
+ requestBody: {
1122
+ content: {
1123
+ "application/json": components$1["schemas"]["UpdatePortfolioPayload"];
1124
+ };
1125
+ };
1126
+ responses: {
1127
+ /** @description Success */
1128
+ 200: {
1129
+ headers: {
1130
+ [name: string]: unknown;
1131
+ };
1132
+ content: {
1133
+ "application/json": components$1["schemas"]["Portfolio"];
1134
+ };
1135
+ };
1136
+ 400: components$1["responses"]["BadRequest"];
1137
+ 404: components$1["responses"]["NotFound"];
1138
+ 500: components$1["responses"]["InternalServerError"];
1139
+ };
1140
+ };
1091
1141
  getPortfoliosByUser: {
1092
1142
  parameters: {
1093
1143
  query?: never;
@@ -1374,7 +1424,7 @@ interface operations {
1374
1424
  };
1375
1425
  cookie?: never;
1376
1426
  };
1377
- /** @description The request body to updated a user */
1427
+ /** @description The request body to update a user */
1378
1428
  requestBody: {
1379
1429
  content: {
1380
1430
  "application/json": components["schemas"]["UpdateUserPayload"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivascva/dt-idl",
3
- "version": "1.1.35",
3
+ "version": "1.1.36",
4
4
  "description": "Dream Trade - Interface Definition Language",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -92,7 +92,7 @@ paths:
92
92
  type: string
93
93
  example: 123456
94
94
  requestBody:
95
- description: The request body to updated a user
95
+ description: The request body to update a user
96
96
  required: true
97
97
  content:
98
98
  application/json:
@@ -92,7 +92,7 @@ paths:
92
92
  type: string
93
93
  example: 123456
94
94
  requestBody:
95
- description: The request body to updated a user
95
+ description: The request body to update a user
96
96
  required: true
97
97
  content:
98
98
  application/json:
@@ -167,6 +167,41 @@ paths:
167
167
  500:
168
168
  $ref: '#/components/responses/InternalServerError'
169
169
 
170
+ /portfolios/{portfolioId}:
171
+ put:
172
+ description: Updates an existing portfolio
173
+ operationId: updatePortfolio
174
+ tags:
175
+ - Portfolios
176
+ parameters:
177
+ - in: path
178
+ name: portfolioId
179
+ description: The portfolio id
180
+ required: true
181
+ schema:
182
+ type: string
183
+ example: 123456
184
+ requestBody:
185
+ description: The request body to update a portfolio
186
+ required: true
187
+ content:
188
+ application/json:
189
+ schema:
190
+ $ref: '#/components/schemas/UpdatePortfolioPayload'
191
+ responses:
192
+ 200:
193
+ description: Success
194
+ content:
195
+ application/json:
196
+ schema:
197
+ $ref: '#/components/schemas/Portfolio'
198
+ 400:
199
+ $ref: '#/components/responses/BadRequest'
200
+ 404:
201
+ $ref: '#/components/responses/NotFound'
202
+ 500:
203
+ $ref: '#/components/responses/InternalServerError'
204
+
170
205
  /portfolios/by-user/{userId}:
171
206
  get:
172
207
  description: Gets the portfolios for the given user
@@ -313,6 +348,11 @@ components:
313
348
  - type
314
349
  - cash
315
350
 
351
+ UpdatePortfolioPayload:
352
+ description: Payload to update an existing portfolio
353
+ allOf:
354
+ - $ref: '#/components/schemas/AddPortfolioPayload'
355
+
316
356
  Portfolio:
317
357
  description: A trading portfolio
318
358
  allOf:
@@ -214,7 +214,7 @@ export interface operations {
214
214
  };
215
215
  cookie?: never;
216
216
  };
217
- /** @description The request body to updated a user */
217
+ /** @description The request body to update a user */
218
218
  requestBody: {
219
219
  content: {
220
220
  "application/json": components["schemas"]["UpdateUserPayload"];
@@ -74,6 +74,23 @@ export interface paths {
74
74
  patch?: never;
75
75
  trace?: never;
76
76
  };
77
+ "/portfolios/{portfolioId}": {
78
+ parameters: {
79
+ query?: never;
80
+ header?: never;
81
+ path?: never;
82
+ cookie?: never;
83
+ };
84
+ get?: never;
85
+ /** @description Updates an existing portfolio */
86
+ put: operations["updatePortfolio"];
87
+ post?: never;
88
+ delete?: never;
89
+ options?: never;
90
+ head?: never;
91
+ patch?: never;
92
+ trace?: never;
93
+ };
77
94
  "/portfolios/by-user/{userId}": {
78
95
  parameters: {
79
96
  query?: never;
@@ -169,6 +186,8 @@ export interface components {
169
186
  */
170
187
  cash: number;
171
188
  };
189
+ /** @description Payload to update an existing portfolio */
190
+ UpdatePortfolioPayload: components["schemas"]["AddPortfolioPayload"];
172
191
  /** @description A trading portfolio */
173
192
  Portfolio: components["schemas"]["AddPortfolioPayload"] & {
174
193
  /** @example 123456 */
@@ -403,7 +422,7 @@ export interface operations {
403
422
  };
404
423
  cookie?: never;
405
424
  };
406
- /** @description The request body to updated a user */
425
+ /** @description The request body to update a user */
407
426
  requestBody: {
408
427
  content: {
409
428
  "application/json": components["schemas"]["UpdateUserPayload"];
@@ -477,6 +496,37 @@ export interface operations {
477
496
  500: components["responses"]["InternalServerError"];
478
497
  };
479
498
  };
499
+ updatePortfolio: {
500
+ parameters: {
501
+ query?: never;
502
+ header?: never;
503
+ path: {
504
+ /** @description The portfolio id */
505
+ portfolioId: string;
506
+ };
507
+ cookie?: never;
508
+ };
509
+ /** @description The request body to update a portfolio */
510
+ requestBody: {
511
+ content: {
512
+ "application/json": components["schemas"]["UpdatePortfolioPayload"];
513
+ };
514
+ };
515
+ responses: {
516
+ /** @description Success */
517
+ 200: {
518
+ headers: {
519
+ [name: string]: unknown;
520
+ };
521
+ content: {
522
+ "application/json": components["schemas"]["Portfolio"];
523
+ };
524
+ };
525
+ 400: components["responses"]["BadRequest"];
526
+ 404: components["responses"]["NotFound"];
527
+ 500: components["responses"]["InternalServerError"];
528
+ };
529
+ };
480
530
  getPortfoliosByUser: {
481
531
  parameters: {
482
532
  query?: never;