@rivascva/dt-idl 1.1.35 → 1.1.37

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"];
@@ -1084,6 +1103,36 @@ interface operations$1 {
1084
1103
  };
1085
1104
  };
1086
1105
  400: components$1["responses"]["BadRequest"];
1106
+ 500: components$1["responses"]["InternalServerError"];
1107
+ };
1108
+ };
1109
+ updatePortfolio: {
1110
+ parameters: {
1111
+ query?: never;
1112
+ header?: never;
1113
+ path: {
1114
+ /** @description The portfolio id */
1115
+ portfolioId: string;
1116
+ };
1117
+ cookie?: never;
1118
+ };
1119
+ /** @description The request body to update a portfolio */
1120
+ requestBody: {
1121
+ content: {
1122
+ "application/json": components$1["schemas"]["UpdatePortfolioPayload"];
1123
+ };
1124
+ };
1125
+ responses: {
1126
+ /** @description Success */
1127
+ 200: {
1128
+ headers: {
1129
+ [name: string]: unknown;
1130
+ };
1131
+ content: {
1132
+ "application/json": components$1["schemas"]["Portfolio"];
1133
+ };
1134
+ };
1135
+ 400: components$1["responses"]["BadRequest"];
1087
1136
  404: components$1["responses"]["NotFound"];
1088
1137
  500: components$1["responses"]["InternalServerError"];
1089
1138
  };
@@ -1374,7 +1423,7 @@ interface operations {
1374
1423
  };
1375
1424
  cookie?: never;
1376
1425
  };
1377
- /** @description The request body to updated a user */
1426
+ /** @description The request body to update a user */
1378
1427
  requestBody: {
1379
1428
  content: {
1380
1429
  "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.37",
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:
@@ -162,6 +162,39 @@ paths:
162
162
  $ref: '#/components/schemas/Portfolio'
163
163
  400:
164
164
  $ref: '#/components/responses/BadRequest'
165
+ 500:
166
+ $ref: '#/components/responses/InternalServerError'
167
+
168
+ /portfolios/{portfolioId}:
169
+ put:
170
+ description: Updates an existing portfolio
171
+ operationId: updatePortfolio
172
+ tags:
173
+ - Portfolios
174
+ parameters:
175
+ - in: path
176
+ name: portfolioId
177
+ description: The portfolio id
178
+ required: true
179
+ schema:
180
+ type: string
181
+ example: 123456
182
+ requestBody:
183
+ description: The request body to update a portfolio
184
+ required: true
185
+ content:
186
+ application/json:
187
+ schema:
188
+ $ref: '#/components/schemas/UpdatePortfolioPayload'
189
+ responses:
190
+ 200:
191
+ description: Success
192
+ content:
193
+ application/json:
194
+ schema:
195
+ $ref: '#/components/schemas/Portfolio'
196
+ 400:
197
+ $ref: '#/components/responses/BadRequest'
165
198
  404:
166
199
  $ref: '#/components/responses/NotFound'
167
200
  500:
@@ -313,6 +346,11 @@ components:
313
346
  - type
314
347
  - cash
315
348
 
349
+ UpdatePortfolioPayload:
350
+ description: Payload to update an existing portfolio
351
+ allOf:
352
+ - $ref: '#/components/schemas/AddPortfolioPayload'
353
+
316
354
  Portfolio:
317
355
  description: A trading portfolio
318
356
  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"];
@@ -473,6 +492,36 @@ export interface operations {
473
492
  };
474
493
  };
475
494
  400: components["responses"]["BadRequest"];
495
+ 500: components["responses"]["InternalServerError"];
496
+ };
497
+ };
498
+ updatePortfolio: {
499
+ parameters: {
500
+ query?: never;
501
+ header?: never;
502
+ path: {
503
+ /** @description The portfolio id */
504
+ portfolioId: string;
505
+ };
506
+ cookie?: never;
507
+ };
508
+ /** @description The request body to update a portfolio */
509
+ requestBody: {
510
+ content: {
511
+ "application/json": components["schemas"]["UpdatePortfolioPayload"];
512
+ };
513
+ };
514
+ responses: {
515
+ /** @description Success */
516
+ 200: {
517
+ headers: {
518
+ [name: string]: unknown;
519
+ };
520
+ content: {
521
+ "application/json": components["schemas"]["Portfolio"];
522
+ };
523
+ };
524
+ 400: components["responses"]["BadRequest"];
476
525
  404: components["responses"]["NotFound"];
477
526
  500: components["responses"]["InternalServerError"];
478
527
  };