@rivascva/dt-idl 1.1.123 → 1.1.125
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 +31 -24
- package/package.json +1 -1
- package/services/dt-user-service.yaml +32 -26
- package/ts/services/dt-user-service.ts +28 -21
- package/ts/types/types.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1079,7 +1079,7 @@ interface operations$2 {
|
|
|
1079
1079
|
* Do not make direct changes to the file.
|
|
1080
1080
|
*/
|
|
1081
1081
|
interface paths$1 {
|
|
1082
|
-
"/auth/login": {
|
|
1082
|
+
"/auth/login/firebase": {
|
|
1083
1083
|
parameters: {
|
|
1084
1084
|
query?: never;
|
|
1085
1085
|
header?: never;
|
|
@@ -1088,15 +1088,15 @@ interface paths$1 {
|
|
|
1088
1088
|
};
|
|
1089
1089
|
get?: never;
|
|
1090
1090
|
put?: never;
|
|
1091
|
-
/** @description Logs in a user */
|
|
1092
|
-
post: operations$1["
|
|
1091
|
+
/** @description Logs in a user with Firebase */
|
|
1092
|
+
post: operations$1["loginWithFirebase"];
|
|
1093
1093
|
delete?: never;
|
|
1094
1094
|
options?: never;
|
|
1095
1095
|
head?: never;
|
|
1096
1096
|
patch?: never;
|
|
1097
1097
|
trace?: never;
|
|
1098
1098
|
};
|
|
1099
|
-
"/auth/
|
|
1099
|
+
"/auth/signup/firebase": {
|
|
1100
1100
|
parameters: {
|
|
1101
1101
|
query?: never;
|
|
1102
1102
|
header?: never;
|
|
@@ -1105,8 +1105,8 @@ interface paths$1 {
|
|
|
1105
1105
|
};
|
|
1106
1106
|
get?: never;
|
|
1107
1107
|
put?: never;
|
|
1108
|
-
/** @description
|
|
1109
|
-
post: operations$1["
|
|
1108
|
+
/** @description Signs up a user with Firebase */
|
|
1109
|
+
post: operations$1["signupWithFirebase"];
|
|
1110
1110
|
delete?: never;
|
|
1111
1111
|
options?: never;
|
|
1112
1112
|
head?: never;
|
|
@@ -1186,18 +1186,15 @@ interface paths$1 {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
interface components$1 {
|
|
1188
1188
|
schemas: {
|
|
1189
|
-
/** @description Payload to log in a user */
|
|
1190
|
-
LoginPayload: {
|
|
1191
|
-
/** @example sam.smith@example.com */
|
|
1192
|
-
email: string;
|
|
1193
|
-
/** @example Password123! */
|
|
1194
|
-
password: string;
|
|
1195
|
-
};
|
|
1196
1189
|
/** @description Payload to log in a user with Firebase */
|
|
1197
1190
|
LoginWithFirebasePayload: {
|
|
1198
1191
|
/** @example ABCD.1234.abcd */
|
|
1199
1192
|
idToken: string;
|
|
1200
|
-
|
|
1193
|
+
};
|
|
1194
|
+
/** @description Payload to sign up a user with Firebase */
|
|
1195
|
+
SignupWithFirebasePayload: components$1["schemas"]["AddUserPayload"] & {
|
|
1196
|
+
/** @example ABCD.1234.abcd */
|
|
1197
|
+
idToken: string;
|
|
1201
1198
|
};
|
|
1202
1199
|
/** @description Payload to log out a user */
|
|
1203
1200
|
LogoutPayload: {
|
|
@@ -1250,7 +1247,7 @@ interface components$1 {
|
|
|
1250
1247
|
message: string;
|
|
1251
1248
|
};
|
|
1252
1249
|
/** @enum {string} */
|
|
1253
|
-
ErrorCode: "ERROR";
|
|
1250
|
+
ErrorCode: "ERROR" | "EMAIL_ALREADY_EXISTS";
|
|
1254
1251
|
};
|
|
1255
1252
|
responses: {
|
|
1256
1253
|
/** @description Login success */
|
|
@@ -1313,6 +1310,15 @@ interface components$1 {
|
|
|
1313
1310
|
"application/json": components$1["schemas"]["Error"];
|
|
1314
1311
|
};
|
|
1315
1312
|
};
|
|
1313
|
+
/** @description There was a conflict with the state of the target source */
|
|
1314
|
+
Conflict: {
|
|
1315
|
+
headers: {
|
|
1316
|
+
[name: string]: unknown;
|
|
1317
|
+
};
|
|
1318
|
+
content: {
|
|
1319
|
+
"application/json": components$1["schemas"]["Error"];
|
|
1320
|
+
};
|
|
1321
|
+
};
|
|
1316
1322
|
/** @description Invalid request payload */
|
|
1317
1323
|
BadRequest: {
|
|
1318
1324
|
headers: {
|
|
@@ -1338,17 +1344,17 @@ interface components$1 {
|
|
|
1338
1344
|
pathItems: never;
|
|
1339
1345
|
}
|
|
1340
1346
|
interface operations$1 {
|
|
1341
|
-
|
|
1347
|
+
loginWithFirebase: {
|
|
1342
1348
|
parameters: {
|
|
1343
1349
|
query?: never;
|
|
1344
1350
|
header?: never;
|
|
1345
1351
|
path?: never;
|
|
1346
1352
|
cookie?: never;
|
|
1347
1353
|
};
|
|
1348
|
-
/** @description The request body to log in a user */
|
|
1354
|
+
/** @description The request body to log in a user with Firebase */
|
|
1349
1355
|
requestBody: {
|
|
1350
1356
|
content: {
|
|
1351
|
-
"application/json": components$1["schemas"]["
|
|
1357
|
+
"application/json": components$1["schemas"]["LoginWithFirebasePayload"];
|
|
1352
1358
|
};
|
|
1353
1359
|
};
|
|
1354
1360
|
responses: {
|
|
@@ -1357,22 +1363,23 @@ interface operations$1 {
|
|
|
1357
1363
|
500: components$1["responses"]["InternalServerError"];
|
|
1358
1364
|
};
|
|
1359
1365
|
};
|
|
1360
|
-
|
|
1366
|
+
signupWithFirebase: {
|
|
1361
1367
|
parameters: {
|
|
1362
1368
|
query?: never;
|
|
1363
1369
|
header?: never;
|
|
1364
1370
|
path?: never;
|
|
1365
1371
|
cookie?: never;
|
|
1366
1372
|
};
|
|
1367
|
-
/** @description The request body to
|
|
1373
|
+
/** @description The request body to sign up a user with Firebase */
|
|
1368
1374
|
requestBody: {
|
|
1369
1375
|
content: {
|
|
1370
|
-
"application/json": components$1["schemas"]["
|
|
1376
|
+
"application/json": components$1["schemas"]["SignupWithFirebasePayload"];
|
|
1371
1377
|
};
|
|
1372
1378
|
};
|
|
1373
1379
|
responses: {
|
|
1374
1380
|
200: components$1["responses"]["LoginSuccess"];
|
|
1375
1381
|
400: components$1["responses"]["BadRequest"];
|
|
1382
|
+
409: components$1["responses"]["Conflict"];
|
|
1376
1383
|
500: components$1["responses"]["InternalServerError"];
|
|
1377
1384
|
};
|
|
1378
1385
|
};
|
|
@@ -1688,7 +1695,7 @@ declare const isTradeServiceError: (error: unknown) => error is {
|
|
|
1688
1695
|
};
|
|
1689
1696
|
declare const isUserServiceError: (error: unknown) => error is {
|
|
1690
1697
|
status: number;
|
|
1691
|
-
code: "ERROR";
|
|
1698
|
+
code: "ERROR" | "EMAIL_ALREADY_EXISTS";
|
|
1692
1699
|
message: string;
|
|
1693
1700
|
};
|
|
1694
1701
|
declare const isAssetServiceError: (error: unknown) => error is {
|
|
@@ -1724,8 +1731,8 @@ type Order = TradeServiceSchemas['Order'];
|
|
|
1724
1731
|
type OrderType = TradeServiceSchemas['OrderType'];
|
|
1725
1732
|
type Holding = TradeServiceSchemas['Holding'];
|
|
1726
1733
|
type TradeServiceError = TradeServiceSchemas['Error'];
|
|
1727
|
-
type LoginPayload = UserServiceSchemas['LoginPayload'];
|
|
1728
1734
|
type LoginWithFirebasePayload = UserServiceSchemas['LoginWithFirebasePayload'];
|
|
1735
|
+
type SignupWithFirebasePayload = UserServiceSchemas['SignupWithFirebasePayload'];
|
|
1729
1736
|
type RefreshAccessTokenPayload = UserServiceSchemas['RefreshAccessTokenPayload'];
|
|
1730
1737
|
type LogoutPayload = UserServiceSchemas['LogoutPayload'];
|
|
1731
1738
|
type User = UserServiceSchemas['User'];
|
|
@@ -1738,4 +1745,4 @@ type UploadImageResponse = AssetServiceSchemas['UploadImageResponse'];
|
|
|
1738
1745
|
type DeleteImagePayload = AssetServiceSchemas['DeleteImagePayload'];
|
|
1739
1746
|
type AssetServiceError = AssetServiceSchemas['Error'];
|
|
1740
1747
|
|
|
1741
|
-
export { type AddOrderPayload, type AddUserPayload, type AssetServiceError, type DeleteImagePayload, type FullQuote, type GetIndexesQueryParams, type GetSearchStocksQueryParams, type GetStockHistoryQueryParams, type GetStocksByExchangeQueryParams, type GetStocksBySymbolsQueryParams, type Holding, type ImageType, type Index, type
|
|
1748
|
+
export { type AddOrderPayload, type AddUserPayload, type AssetServiceError, type DeleteImagePayload, type FullQuote, type GetIndexesQueryParams, type GetSearchStocksQueryParams, type GetStockHistoryQueryParams, type GetStocksByExchangeQueryParams, type GetStocksBySymbolsQueryParams, type Holding, type ImageType, type Index, type LoginWithFirebasePayload, type LogoutPayload, type MarketServiceError, type NewsArticle, type Order, type OrderType, type Portfolio, type PortfolioType, type RefreshAccessTokenPayload, type SignupWithFirebasePayload, type SimpleQuote, type SortField, type SortOrder, type StockHistoryEntry, type StockHistoryTimeframe, type StockNewsArticle, type TradeServiceError, type UpdatePortfolioPayload, type UpdateUserPayload, type UploadImagePayload, type UploadImageResponse, type User, type UserServiceError, createAssetServiceClient, createMarketServiceClient, createTradeServiceClient, createUserServiceClient, isAssetServiceError, isMarketServiceError, isTradeServiceError, isUserServiceError };
|
package/package.json
CHANGED
|
@@ -8,19 +8,19 @@ servers:
|
|
|
8
8
|
- url: http://localhost:8084/v1
|
|
9
9
|
|
|
10
10
|
paths:
|
|
11
|
-
/auth/login:
|
|
11
|
+
/auth/login/firebase:
|
|
12
12
|
post:
|
|
13
|
-
description: Logs in a user
|
|
14
|
-
operationId:
|
|
13
|
+
description: Logs in a user with Firebase
|
|
14
|
+
operationId: loginWithFirebase
|
|
15
15
|
tags:
|
|
16
16
|
- Auth
|
|
17
17
|
requestBody:
|
|
18
|
-
description: The request body to log in a user
|
|
18
|
+
description: The request body to log in a user with Firebase
|
|
19
19
|
required: true
|
|
20
20
|
content:
|
|
21
21
|
application/json:
|
|
22
22
|
schema:
|
|
23
|
-
$ref: '#/components/schemas/
|
|
23
|
+
$ref: '#/components/schemas/LoginWithFirebasePayload'
|
|
24
24
|
responses:
|
|
25
25
|
200:
|
|
26
26
|
$ref: '#/components/responses/LoginSuccess'
|
|
@@ -29,24 +29,26 @@ paths:
|
|
|
29
29
|
500:
|
|
30
30
|
$ref: '#/components/responses/InternalServerError'
|
|
31
31
|
|
|
32
|
-
/auth/
|
|
32
|
+
/auth/signup/firebase:
|
|
33
33
|
post:
|
|
34
|
-
description:
|
|
35
|
-
operationId:
|
|
34
|
+
description: Signs up a user with Firebase
|
|
35
|
+
operationId: signupWithFirebase
|
|
36
36
|
tags:
|
|
37
37
|
- Auth
|
|
38
38
|
requestBody:
|
|
39
|
-
description: The request body to
|
|
39
|
+
description: The request body to sign up a user with Firebase
|
|
40
40
|
required: true
|
|
41
41
|
content:
|
|
42
42
|
application/json:
|
|
43
43
|
schema:
|
|
44
|
-
$ref: '#/components/schemas/
|
|
44
|
+
$ref: '#/components/schemas/SignupWithFirebasePayload'
|
|
45
45
|
responses:
|
|
46
46
|
200:
|
|
47
47
|
$ref: '#/components/responses/LoginSuccess'
|
|
48
48
|
400:
|
|
49
49
|
$ref: '#/components/responses/BadRequest'
|
|
50
|
+
409:
|
|
51
|
+
$ref: '#/components/responses/Conflict'
|
|
50
52
|
500:
|
|
51
53
|
$ref: '#/components/responses/InternalServerError'
|
|
52
54
|
|
|
@@ -201,31 +203,27 @@ paths:
|
|
|
201
203
|
|
|
202
204
|
components:
|
|
203
205
|
schemas:
|
|
204
|
-
LoginPayload:
|
|
205
|
-
description: Payload to log in a user
|
|
206
|
-
properties:
|
|
207
|
-
email:
|
|
208
|
-
type: string
|
|
209
|
-
example: sam.smith@example.com
|
|
210
|
-
password:
|
|
211
|
-
type: string
|
|
212
|
-
example: Password123!
|
|
213
|
-
required:
|
|
214
|
-
- email
|
|
215
|
-
- password
|
|
216
|
-
|
|
217
206
|
LoginWithFirebasePayload:
|
|
218
207
|
description: Payload to log in a user with Firebase
|
|
219
208
|
properties:
|
|
220
209
|
idToken:
|
|
221
210
|
type: string
|
|
222
211
|
example: ABCD.1234.abcd
|
|
223
|
-
newUserDetails:
|
|
224
|
-
allOf:
|
|
225
|
-
- $ref: '#/components/schemas/AddUserPayload'
|
|
226
212
|
required:
|
|
227
213
|
- idToken
|
|
228
214
|
|
|
215
|
+
SignupWithFirebasePayload:
|
|
216
|
+
description: Payload to sign up a user with Firebase
|
|
217
|
+
allOf:
|
|
218
|
+
- $ref: '#/components/schemas/AddUserPayload'
|
|
219
|
+
- type: object
|
|
220
|
+
properties:
|
|
221
|
+
idToken:
|
|
222
|
+
type: string
|
|
223
|
+
example: ABCD.1234.abcd
|
|
224
|
+
required:
|
|
225
|
+
- idToken
|
|
226
|
+
|
|
229
227
|
LogoutPayload:
|
|
230
228
|
description: Payload to log out a user
|
|
231
229
|
properties:
|
|
@@ -313,6 +311,7 @@ components:
|
|
|
313
311
|
type: string
|
|
314
312
|
enum:
|
|
315
313
|
- ERROR
|
|
314
|
+
- EMAIL_ALREADY_EXISTS
|
|
316
315
|
|
|
317
316
|
responses:
|
|
318
317
|
LoginSuccess:
|
|
@@ -367,6 +366,13 @@ components:
|
|
|
367
366
|
schema:
|
|
368
367
|
$ref: '#/components/schemas/Error'
|
|
369
368
|
|
|
369
|
+
Conflict:
|
|
370
|
+
description: There was a conflict with the state of the target source
|
|
371
|
+
content:
|
|
372
|
+
application/json:
|
|
373
|
+
schema:
|
|
374
|
+
$ref: '#/components/schemas/Error'
|
|
375
|
+
|
|
370
376
|
BadRequest:
|
|
371
377
|
description: Invalid request payload
|
|
372
378
|
content:
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export interface paths {
|
|
7
|
-
"/auth/login": {
|
|
7
|
+
"/auth/login/firebase": {
|
|
8
8
|
parameters: {
|
|
9
9
|
query?: never;
|
|
10
10
|
header?: never;
|
|
@@ -13,15 +13,15 @@ export interface paths {
|
|
|
13
13
|
};
|
|
14
14
|
get?: never;
|
|
15
15
|
put?: never;
|
|
16
|
-
/** @description Logs in a user */
|
|
17
|
-
post: operations["
|
|
16
|
+
/** @description Logs in a user with Firebase */
|
|
17
|
+
post: operations["loginWithFirebase"];
|
|
18
18
|
delete?: never;
|
|
19
19
|
options?: never;
|
|
20
20
|
head?: never;
|
|
21
21
|
patch?: never;
|
|
22
22
|
trace?: never;
|
|
23
23
|
};
|
|
24
|
-
"/auth/
|
|
24
|
+
"/auth/signup/firebase": {
|
|
25
25
|
parameters: {
|
|
26
26
|
query?: never;
|
|
27
27
|
header?: never;
|
|
@@ -30,8 +30,8 @@ export interface paths {
|
|
|
30
30
|
};
|
|
31
31
|
get?: never;
|
|
32
32
|
put?: never;
|
|
33
|
-
/** @description
|
|
34
|
-
post: operations["
|
|
33
|
+
/** @description Signs up a user with Firebase */
|
|
34
|
+
post: operations["signupWithFirebase"];
|
|
35
35
|
delete?: never;
|
|
36
36
|
options?: never;
|
|
37
37
|
head?: never;
|
|
@@ -112,18 +112,15 @@ export interface paths {
|
|
|
112
112
|
export type webhooks = Record<string, never>;
|
|
113
113
|
export interface components {
|
|
114
114
|
schemas: {
|
|
115
|
-
/** @description Payload to log in a user */
|
|
116
|
-
LoginPayload: {
|
|
117
|
-
/** @example sam.smith@example.com */
|
|
118
|
-
email: string;
|
|
119
|
-
/** @example Password123! */
|
|
120
|
-
password: string;
|
|
121
|
-
};
|
|
122
115
|
/** @description Payload to log in a user with Firebase */
|
|
123
116
|
LoginWithFirebasePayload: {
|
|
124
117
|
/** @example ABCD.1234.abcd */
|
|
125
118
|
idToken: string;
|
|
126
|
-
|
|
119
|
+
};
|
|
120
|
+
/** @description Payload to sign up a user with Firebase */
|
|
121
|
+
SignupWithFirebasePayload: components["schemas"]["AddUserPayload"] & {
|
|
122
|
+
/** @example ABCD.1234.abcd */
|
|
123
|
+
idToken: string;
|
|
127
124
|
};
|
|
128
125
|
/** @description Payload to log out a user */
|
|
129
126
|
LogoutPayload: {
|
|
@@ -176,7 +173,7 @@ export interface components {
|
|
|
176
173
|
message: string;
|
|
177
174
|
};
|
|
178
175
|
/** @enum {string} */
|
|
179
|
-
ErrorCode: "ERROR";
|
|
176
|
+
ErrorCode: "ERROR" | "EMAIL_ALREADY_EXISTS";
|
|
180
177
|
};
|
|
181
178
|
responses: {
|
|
182
179
|
/** @description Login success */
|
|
@@ -239,6 +236,15 @@ export interface components {
|
|
|
239
236
|
"application/json": components["schemas"]["Error"];
|
|
240
237
|
};
|
|
241
238
|
};
|
|
239
|
+
/** @description There was a conflict with the state of the target source */
|
|
240
|
+
Conflict: {
|
|
241
|
+
headers: {
|
|
242
|
+
[name: string]: unknown;
|
|
243
|
+
};
|
|
244
|
+
content: {
|
|
245
|
+
"application/json": components["schemas"]["Error"];
|
|
246
|
+
};
|
|
247
|
+
};
|
|
242
248
|
/** @description Invalid request payload */
|
|
243
249
|
BadRequest: {
|
|
244
250
|
headers: {
|
|
@@ -265,17 +271,17 @@ export interface components {
|
|
|
265
271
|
}
|
|
266
272
|
export type $defs = Record<string, never>;
|
|
267
273
|
export interface operations {
|
|
268
|
-
|
|
274
|
+
loginWithFirebase: {
|
|
269
275
|
parameters: {
|
|
270
276
|
query?: never;
|
|
271
277
|
header?: never;
|
|
272
278
|
path?: never;
|
|
273
279
|
cookie?: never;
|
|
274
280
|
};
|
|
275
|
-
/** @description The request body to log in a user */
|
|
281
|
+
/** @description The request body to log in a user with Firebase */
|
|
276
282
|
requestBody: {
|
|
277
283
|
content: {
|
|
278
|
-
"application/json": components["schemas"]["
|
|
284
|
+
"application/json": components["schemas"]["LoginWithFirebasePayload"];
|
|
279
285
|
};
|
|
280
286
|
};
|
|
281
287
|
responses: {
|
|
@@ -284,22 +290,23 @@ export interface operations {
|
|
|
284
290
|
500: components["responses"]["InternalServerError"];
|
|
285
291
|
};
|
|
286
292
|
};
|
|
287
|
-
|
|
293
|
+
signupWithFirebase: {
|
|
288
294
|
parameters: {
|
|
289
295
|
query?: never;
|
|
290
296
|
header?: never;
|
|
291
297
|
path?: never;
|
|
292
298
|
cookie?: never;
|
|
293
299
|
};
|
|
294
|
-
/** @description The request body to
|
|
300
|
+
/** @description The request body to sign up a user with Firebase */
|
|
295
301
|
requestBody: {
|
|
296
302
|
content: {
|
|
297
|
-
"application/json": components["schemas"]["
|
|
303
|
+
"application/json": components["schemas"]["SignupWithFirebasePayload"];
|
|
298
304
|
};
|
|
299
305
|
};
|
|
300
306
|
responses: {
|
|
301
307
|
200: components["responses"]["LoginSuccess"];
|
|
302
308
|
400: components["responses"]["BadRequest"];
|
|
309
|
+
409: components["responses"]["Conflict"];
|
|
303
310
|
500: components["responses"]["InternalServerError"];
|
|
304
311
|
};
|
|
305
312
|
};
|
package/ts/types/types.ts
CHANGED
|
@@ -39,8 +39,8 @@ export type Holding = TradeServiceSchemas['Holding'];
|
|
|
39
39
|
export type TradeServiceError = TradeServiceSchemas['Error'];
|
|
40
40
|
|
|
41
41
|
// User Service Types
|
|
42
|
-
export type LoginPayload = UserServiceSchemas['LoginPayload'];
|
|
43
42
|
export type LoginWithFirebasePayload = UserServiceSchemas['LoginWithFirebasePayload'];
|
|
43
|
+
export type SignupWithFirebasePayload = UserServiceSchemas['SignupWithFirebasePayload'];
|
|
44
44
|
export type RefreshAccessTokenPayload = UserServiceSchemas['RefreshAccessTokenPayload'];
|
|
45
45
|
export type LogoutPayload = UserServiceSchemas['LogoutPayload'];
|
|
46
46
|
export type User = UserServiceSchemas['User'];
|