@rivascva/dt-idl 1.1.31 → 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.cjs.js +4 -0
- package/dist/index.d.ts +450 -106
- package/dist/index.esm.js +3 -1
- package/package.json +1 -1
- package/redocly.yaml +4 -0
- package/services/dt-app-service.yaml +210 -0
- package/services/dt-trade-service.yaml +99 -42
- package/ts/clients/clients.ts +4 -0
- package/ts/clients/errors.ts +4 -1
- package/ts/services/dt-app-service.ts +238 -0
- package/ts/services/dt-trade-service.ts +115 -16
- package/ts/types/types.ts +8 -2
package/dist/index.esm.js
CHANGED
|
@@ -487,8 +487,10 @@ function mergeHeaders(...allHeaders) {
|
|
|
487
487
|
|
|
488
488
|
const createMarketServiceClient = (options) => createClient(options);
|
|
489
489
|
const createTradeServiceClient = (options) => createClient(options);
|
|
490
|
+
const createAppServiceClient = (options) => createClient(options);
|
|
490
491
|
|
|
491
492
|
const isMarketServiceError = (error) => typeof error === 'object';
|
|
492
493
|
const isTradeServiceError = (error) => typeof error === 'object';
|
|
494
|
+
const isAppServiceError = (error) => typeof error === 'object';
|
|
493
495
|
|
|
494
|
-
export { createMarketServiceClient, createTradeServiceClient, isMarketServiceError, isTradeServiceError };
|
|
496
|
+
export { createAppServiceClient, createMarketServiceClient, createTradeServiceClient, isAppServiceError, isMarketServiceError, isTradeServiceError };
|
package/package.json
CHANGED
package/redocly.yaml
CHANGED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
openapi: 3.0.0
|
|
2
|
+
|
|
3
|
+
info:
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
title: Dream Trade App Service
|
|
6
|
+
description: Support the client applications.
|
|
7
|
+
|
|
8
|
+
servers:
|
|
9
|
+
- url: http://localhost:8084/v1
|
|
10
|
+
|
|
11
|
+
paths:
|
|
12
|
+
/users:
|
|
13
|
+
get:
|
|
14
|
+
description: Gets all users
|
|
15
|
+
operationId: getUsers
|
|
16
|
+
tags:
|
|
17
|
+
- Users
|
|
18
|
+
responses:
|
|
19
|
+
200:
|
|
20
|
+
description: Success
|
|
21
|
+
content:
|
|
22
|
+
application/json:
|
|
23
|
+
schema:
|
|
24
|
+
type: array
|
|
25
|
+
items:
|
|
26
|
+
$ref: '#/components/schemas/User'
|
|
27
|
+
404:
|
|
28
|
+
$ref: '#/components/responses/NotFound'
|
|
29
|
+
500:
|
|
30
|
+
$ref: '#/components/responses/InternalServerError'
|
|
31
|
+
post:
|
|
32
|
+
description: Adds a new user
|
|
33
|
+
operationId: addUser
|
|
34
|
+
tags:
|
|
35
|
+
- Users
|
|
36
|
+
requestBody:
|
|
37
|
+
description: The request body to add a user
|
|
38
|
+
required: true
|
|
39
|
+
content:
|
|
40
|
+
application/json:
|
|
41
|
+
schema:
|
|
42
|
+
$ref: '#/components/schemas/AddUserPayload'
|
|
43
|
+
responses:
|
|
44
|
+
201:
|
|
45
|
+
description: Added
|
|
46
|
+
content:
|
|
47
|
+
application/json:
|
|
48
|
+
schema:
|
|
49
|
+
$ref: '#/components/schemas/User'
|
|
50
|
+
400:
|
|
51
|
+
$ref: '#/components/responses/BadRequest'
|
|
52
|
+
500:
|
|
53
|
+
$ref: '#/components/responses/InternalServerError'
|
|
54
|
+
|
|
55
|
+
/users/{userId}:
|
|
56
|
+
get:
|
|
57
|
+
description: Gets a user
|
|
58
|
+
operationId: getUser
|
|
59
|
+
tags:
|
|
60
|
+
- Users
|
|
61
|
+
parameters:
|
|
62
|
+
- in: path
|
|
63
|
+
name: userId
|
|
64
|
+
description: The user id
|
|
65
|
+
required: true
|
|
66
|
+
schema:
|
|
67
|
+
type: string
|
|
68
|
+
example: 123456
|
|
69
|
+
responses:
|
|
70
|
+
200:
|
|
71
|
+
description: Success
|
|
72
|
+
content:
|
|
73
|
+
application/json:
|
|
74
|
+
schema:
|
|
75
|
+
type: object
|
|
76
|
+
$ref: '#/components/schemas/User'
|
|
77
|
+
404:
|
|
78
|
+
$ref: '#/components/responses/NotFound'
|
|
79
|
+
500:
|
|
80
|
+
$ref: '#/components/responses/InternalServerError'
|
|
81
|
+
put:
|
|
82
|
+
description: Updates an existing user
|
|
83
|
+
operationId: updateUser
|
|
84
|
+
tags:
|
|
85
|
+
- Users
|
|
86
|
+
parameters:
|
|
87
|
+
- in: path
|
|
88
|
+
name: userId
|
|
89
|
+
description: The user id
|
|
90
|
+
required: true
|
|
91
|
+
schema:
|
|
92
|
+
type: string
|
|
93
|
+
example: 123456
|
|
94
|
+
requestBody:
|
|
95
|
+
description: The request body to updated a user
|
|
96
|
+
required: true
|
|
97
|
+
content:
|
|
98
|
+
application/json:
|
|
99
|
+
schema:
|
|
100
|
+
$ref: '#/components/schemas/UpdateUserPayload'
|
|
101
|
+
responses:
|
|
102
|
+
200:
|
|
103
|
+
description: Success
|
|
104
|
+
content:
|
|
105
|
+
application/json:
|
|
106
|
+
schema:
|
|
107
|
+
$ref: '#/components/schemas/User'
|
|
108
|
+
400:
|
|
109
|
+
$ref: '#/components/responses/BadRequest'
|
|
110
|
+
404:
|
|
111
|
+
$ref: '#/components/responses/NotFound'
|
|
112
|
+
500:
|
|
113
|
+
$ref: '#/components/responses/InternalServerError'
|
|
114
|
+
|
|
115
|
+
components:
|
|
116
|
+
schemas:
|
|
117
|
+
AddUserPayload:
|
|
118
|
+
description: Payload to add a new user
|
|
119
|
+
properties:
|
|
120
|
+
email:
|
|
121
|
+
type: string
|
|
122
|
+
example: sam.smith@example.com
|
|
123
|
+
name:
|
|
124
|
+
type: string
|
|
125
|
+
example: Sam Smith
|
|
126
|
+
country:
|
|
127
|
+
type: string
|
|
128
|
+
example: USA
|
|
129
|
+
imageUrl:
|
|
130
|
+
type: string
|
|
131
|
+
example: https://www.assets.com/image.png
|
|
132
|
+
required:
|
|
133
|
+
- email
|
|
134
|
+
- name
|
|
135
|
+
- country
|
|
136
|
+
|
|
137
|
+
UpdateUserPayload:
|
|
138
|
+
description: Payload to update an existing user
|
|
139
|
+
allOf:
|
|
140
|
+
- $ref: '#/components/schemas/AddUserPayload'
|
|
141
|
+
|
|
142
|
+
User:
|
|
143
|
+
description: A user
|
|
144
|
+
allOf:
|
|
145
|
+
- $ref: '#/components/schemas/AddUserPayload'
|
|
146
|
+
- type: object
|
|
147
|
+
properties:
|
|
148
|
+
id:
|
|
149
|
+
type: string
|
|
150
|
+
example: 123456
|
|
151
|
+
dateCreated:
|
|
152
|
+
type: integer
|
|
153
|
+
format: int64
|
|
154
|
+
example: 1713398544000
|
|
155
|
+
dateUpdated:
|
|
156
|
+
type: integer
|
|
157
|
+
format: int64
|
|
158
|
+
example: 1713398544000
|
|
159
|
+
required:
|
|
160
|
+
- id
|
|
161
|
+
- dateCreated
|
|
162
|
+
- dateUpdated
|
|
163
|
+
|
|
164
|
+
Error:
|
|
165
|
+
description: A generic error
|
|
166
|
+
properties:
|
|
167
|
+
status:
|
|
168
|
+
type: integer
|
|
169
|
+
format: int64
|
|
170
|
+
example: 500
|
|
171
|
+
code:
|
|
172
|
+
$ref: '#/components/schemas/ErrorCode'
|
|
173
|
+
example: ERROR
|
|
174
|
+
message:
|
|
175
|
+
type: string
|
|
176
|
+
example: Error
|
|
177
|
+
required:
|
|
178
|
+
- status
|
|
179
|
+
- code
|
|
180
|
+
- message
|
|
181
|
+
|
|
182
|
+
ErrorCode:
|
|
183
|
+
type: string
|
|
184
|
+
enum:
|
|
185
|
+
- ERROR
|
|
186
|
+
|
|
187
|
+
responses:
|
|
188
|
+
NoContent:
|
|
189
|
+
description: No content
|
|
190
|
+
|
|
191
|
+
NotFound:
|
|
192
|
+
description: The resource was not found
|
|
193
|
+
content:
|
|
194
|
+
application/json:
|
|
195
|
+
schema:
|
|
196
|
+
$ref: '#/components/schemas/Error'
|
|
197
|
+
|
|
198
|
+
BadRequest:
|
|
199
|
+
description: Invalid request payload
|
|
200
|
+
content:
|
|
201
|
+
application/json:
|
|
202
|
+
schema:
|
|
203
|
+
$ref: '#/components/schemas/Error'
|
|
204
|
+
|
|
205
|
+
InternalServerError:
|
|
206
|
+
description: There was an internal server error
|
|
207
|
+
content:
|
|
208
|
+
application/json:
|
|
209
|
+
schema:
|
|
210
|
+
$ref: '#/components/schemas/Error'
|
|
@@ -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
|
|
@@ -166,18 +221,21 @@ paths:
|
|
|
166
221
|
$ref: '#/components/responses/NotFound'
|
|
167
222
|
500:
|
|
168
223
|
$ref: '#/components/responses/InternalServerError'
|
|
224
|
+
|
|
225
|
+
/orders/{orderId}:
|
|
169
226
|
delete:
|
|
170
227
|
description: Deletes an existing order
|
|
171
228
|
operationId: deleteOrder
|
|
172
229
|
tags:
|
|
173
230
|
- Orders
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
231
|
+
parameters:
|
|
232
|
+
- in: path
|
|
233
|
+
name: orderId
|
|
234
|
+
description: The order id
|
|
235
|
+
required: true
|
|
236
|
+
schema:
|
|
237
|
+
type: string
|
|
238
|
+
example: 123456
|
|
181
239
|
responses:
|
|
182
240
|
204:
|
|
183
241
|
$ref: '#/components/responses/NoContent'
|
|
@@ -237,12 +295,9 @@ components:
|
|
|
237
295
|
- dateCreated
|
|
238
296
|
- dateUpdated
|
|
239
297
|
|
|
240
|
-
|
|
241
|
-
description:
|
|
298
|
+
AddPortfolioPayload:
|
|
299
|
+
description: Payload to add a new portfolio
|
|
242
300
|
properties:
|
|
243
|
-
id:
|
|
244
|
-
type: string
|
|
245
|
-
example: 123456
|
|
246
301
|
userId:
|
|
247
302
|
type: string
|
|
248
303
|
example: 123456
|
|
@@ -253,31 +308,42 @@ components:
|
|
|
253
308
|
type: number
|
|
254
309
|
format: double
|
|
255
310
|
example: 10500.25
|
|
256
|
-
holdings:
|
|
257
|
-
type: array
|
|
258
|
-
items:
|
|
259
|
-
$ref: '#/components/schemas/Holding'
|
|
260
|
-
orders:
|
|
261
|
-
type: array
|
|
262
|
-
items:
|
|
263
|
-
$ref: '#/components/schemas/Order'
|
|
264
|
-
dateCreated:
|
|
265
|
-
type: integer
|
|
266
|
-
format: int64
|
|
267
|
-
example: 1713398544000
|
|
268
|
-
dateUpdated:
|
|
269
|
-
type: integer
|
|
270
|
-
format: int64
|
|
271
|
-
example: 1713398544000
|
|
272
311
|
required:
|
|
273
|
-
- id
|
|
274
312
|
- userId
|
|
275
313
|
- type
|
|
276
314
|
- cash
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
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
|
|
281
347
|
|
|
282
348
|
Holding:
|
|
283
349
|
description: A stock holding
|
|
@@ -339,15 +405,6 @@ components:
|
|
|
339
405
|
- targetPrice
|
|
340
406
|
- shares
|
|
341
407
|
|
|
342
|
-
DeleteOrderPayload:
|
|
343
|
-
description: Payload to delete an existing order
|
|
344
|
-
properties:
|
|
345
|
-
id:
|
|
346
|
-
type: string
|
|
347
|
-
example: 123456
|
|
348
|
-
required:
|
|
349
|
-
- id
|
|
350
|
-
|
|
351
408
|
Order:
|
|
352
409
|
description: An order
|
|
353
410
|
allOf:
|
package/ts/clients/clients.ts
CHANGED
|
@@ -2,9 +2,13 @@ import createClient, { ClientOptions } from 'openapi-fetch';
|
|
|
2
2
|
|
|
3
3
|
import { paths as MarketServicePaths } from '@ts/services/dt-market-service';
|
|
4
4
|
import { paths as TradeServicePaths } from '@ts/services/dt-trade-service';
|
|
5
|
+
import { paths as AppServicePaths } from '@ts/services/dt-app-service';
|
|
5
6
|
|
|
6
7
|
export const createMarketServiceClient = (options: ClientOptions) =>
|
|
7
8
|
createClient<MarketServicePaths>(options);
|
|
8
9
|
|
|
9
10
|
export const createTradeServiceClient = (options: ClientOptions) =>
|
|
10
11
|
createClient<TradeServicePaths>(options);
|
|
12
|
+
|
|
13
|
+
export const createAppServiceClient = (options: ClientOptions) =>
|
|
14
|
+
createClient<AppServicePaths>(options);
|
package/ts/clients/errors.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { MarketServiceError, TradeServiceError } from '@ts/types';
|
|
1
|
+
import { MarketServiceError, TradeServiceError, AppServiceError } from '@ts/types';
|
|
2
2
|
|
|
3
3
|
export const isMarketServiceError = (error: unknown): error is MarketServiceError =>
|
|
4
4
|
typeof error === 'object';
|
|
5
5
|
|
|
6
6
|
export const isTradeServiceError = (error: unknown): error is TradeServiceError =>
|
|
7
7
|
typeof error === 'object';
|
|
8
|
+
|
|
9
|
+
export const isAppServiceError = (error: unknown): error is AppServiceError =>
|
|
10
|
+
typeof error === 'object';
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface paths {
|
|
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;
|
|
24
|
+
};
|
|
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;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export type webhooks = Record<string, never>;
|
|
45
|
+
export interface components {
|
|
46
|
+
schemas: {
|
|
47
|
+
/** @description Payload to add a new user */
|
|
48
|
+
AddUserPayload: {
|
|
49
|
+
/** @example sam.smith@example.com */
|
|
50
|
+
email: string;
|
|
51
|
+
/** @example Sam Smith */
|
|
52
|
+
name: string;
|
|
53
|
+
/** @example USA */
|
|
54
|
+
country: string;
|
|
55
|
+
/** @example https://www.assets.com/image.png */
|
|
56
|
+
imageUrl?: string;
|
|
57
|
+
};
|
|
58
|
+
/** @description Payload to update an existing user */
|
|
59
|
+
UpdateUserPayload: components["schemas"]["AddUserPayload"];
|
|
60
|
+
/** @description A user */
|
|
61
|
+
User: components["schemas"]["AddUserPayload"] & {
|
|
62
|
+
/** @example 123456 */
|
|
63
|
+
id: string;
|
|
64
|
+
/**
|
|
65
|
+
* Format: int64
|
|
66
|
+
* @example 1713398544000
|
|
67
|
+
*/
|
|
68
|
+
dateCreated: number;
|
|
69
|
+
/**
|
|
70
|
+
* Format: int64
|
|
71
|
+
* @example 1713398544000
|
|
72
|
+
*/
|
|
73
|
+
dateUpdated: number;
|
|
74
|
+
};
|
|
75
|
+
/** @description A generic error */
|
|
76
|
+
Error: {
|
|
77
|
+
/**
|
|
78
|
+
* Format: int64
|
|
79
|
+
* @example 500
|
|
80
|
+
*/
|
|
81
|
+
status: number;
|
|
82
|
+
/** @example ERROR */
|
|
83
|
+
code: components["schemas"]["ErrorCode"];
|
|
84
|
+
/** @example Error */
|
|
85
|
+
message: string;
|
|
86
|
+
};
|
|
87
|
+
/** @enum {string} */
|
|
88
|
+
ErrorCode: "ERROR";
|
|
89
|
+
};
|
|
90
|
+
responses: {
|
|
91
|
+
/** @description No content */
|
|
92
|
+
NoContent: {
|
|
93
|
+
headers: {
|
|
94
|
+
[name: string]: unknown;
|
|
95
|
+
};
|
|
96
|
+
content?: never;
|
|
97
|
+
};
|
|
98
|
+
/** @description The resource was not found */
|
|
99
|
+
NotFound: {
|
|
100
|
+
headers: {
|
|
101
|
+
[name: string]: unknown;
|
|
102
|
+
};
|
|
103
|
+
content: {
|
|
104
|
+
"application/json": components["schemas"]["Error"];
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
/** @description Invalid request payload */
|
|
108
|
+
BadRequest: {
|
|
109
|
+
headers: {
|
|
110
|
+
[name: string]: unknown;
|
|
111
|
+
};
|
|
112
|
+
content: {
|
|
113
|
+
"application/json": components["schemas"]["Error"];
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
/** @description There was an internal server error */
|
|
117
|
+
InternalServerError: {
|
|
118
|
+
headers: {
|
|
119
|
+
[name: string]: unknown;
|
|
120
|
+
};
|
|
121
|
+
content: {
|
|
122
|
+
"application/json": components["schemas"]["Error"];
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
parameters: never;
|
|
127
|
+
requestBodies: never;
|
|
128
|
+
headers: never;
|
|
129
|
+
pathItems: never;
|
|
130
|
+
}
|
|
131
|
+
export type $defs = Record<string, never>;
|
|
132
|
+
export interface operations {
|
|
133
|
+
getUsers: {
|
|
134
|
+
parameters: {
|
|
135
|
+
query?: never;
|
|
136
|
+
header?: never;
|
|
137
|
+
path?: never;
|
|
138
|
+
cookie?: never;
|
|
139
|
+
};
|
|
140
|
+
requestBody?: never;
|
|
141
|
+
responses: {
|
|
142
|
+
/** @description Success */
|
|
143
|
+
200: {
|
|
144
|
+
headers: {
|
|
145
|
+
[name: string]: unknown;
|
|
146
|
+
};
|
|
147
|
+
content: {
|
|
148
|
+
"application/json": components["schemas"]["User"][];
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
404: components["responses"]["NotFound"];
|
|
152
|
+
500: components["responses"]["InternalServerError"];
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
addUser: {
|
|
156
|
+
parameters: {
|
|
157
|
+
query?: never;
|
|
158
|
+
header?: never;
|
|
159
|
+
path?: never;
|
|
160
|
+
cookie?: never;
|
|
161
|
+
};
|
|
162
|
+
/** @description The request body to add a user */
|
|
163
|
+
requestBody: {
|
|
164
|
+
content: {
|
|
165
|
+
"application/json": components["schemas"]["AddUserPayload"];
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
responses: {
|
|
169
|
+
/** @description Added */
|
|
170
|
+
201: {
|
|
171
|
+
headers: {
|
|
172
|
+
[name: string]: unknown;
|
|
173
|
+
};
|
|
174
|
+
content: {
|
|
175
|
+
"application/json": components["schemas"]["User"];
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
400: components["responses"]["BadRequest"];
|
|
179
|
+
500: components["responses"]["InternalServerError"];
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
getUser: {
|
|
183
|
+
parameters: {
|
|
184
|
+
query?: never;
|
|
185
|
+
header?: never;
|
|
186
|
+
path: {
|
|
187
|
+
/** @description The user id */
|
|
188
|
+
userId: string;
|
|
189
|
+
};
|
|
190
|
+
cookie?: never;
|
|
191
|
+
};
|
|
192
|
+
requestBody?: never;
|
|
193
|
+
responses: {
|
|
194
|
+
/** @description Success */
|
|
195
|
+
200: {
|
|
196
|
+
headers: {
|
|
197
|
+
[name: string]: unknown;
|
|
198
|
+
};
|
|
199
|
+
content: {
|
|
200
|
+
"application/json": components["schemas"]["User"];
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
404: components["responses"]["NotFound"];
|
|
204
|
+
500: components["responses"]["InternalServerError"];
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
updateUser: {
|
|
208
|
+
parameters: {
|
|
209
|
+
query?: never;
|
|
210
|
+
header?: never;
|
|
211
|
+
path: {
|
|
212
|
+
/** @description The user id */
|
|
213
|
+
userId: string;
|
|
214
|
+
};
|
|
215
|
+
cookie?: never;
|
|
216
|
+
};
|
|
217
|
+
/** @description The request body to updated a user */
|
|
218
|
+
requestBody: {
|
|
219
|
+
content: {
|
|
220
|
+
"application/json": components["schemas"]["UpdateUserPayload"];
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
responses: {
|
|
224
|
+
/** @description Success */
|
|
225
|
+
200: {
|
|
226
|
+
headers: {
|
|
227
|
+
[name: string]: unknown;
|
|
228
|
+
};
|
|
229
|
+
content: {
|
|
230
|
+
"application/json": components["schemas"]["User"];
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
400: components["responses"]["BadRequest"];
|
|
234
|
+
404: components["responses"]["NotFound"];
|
|
235
|
+
500: components["responses"]["InternalServerError"];
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
}
|