@rivascva/dt-idl 1.1.114 → 1.1.116
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 +15 -15
- package/go/middlewares/middlewares.go +1 -1
- package/package.json +1 -1
- package/services/dt-user-service.yaml +10 -19
- package/ts/services/dt-user-service.ts +10 -14
- package/ts/types/types.ts +4 -0
package/dist/index.d.ts
CHANGED
|
@@ -1096,7 +1096,7 @@ interface paths$1 {
|
|
|
1096
1096
|
patch?: never;
|
|
1097
1097
|
trace?: never;
|
|
1098
1098
|
};
|
|
1099
|
-
"/auth/login/
|
|
1099
|
+
"/auth/login/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 Logs in a user
|
|
1109
|
-
post: operations$1["
|
|
1108
|
+
/** @description Logs in a user with Firebase */
|
|
1109
|
+
post: operations$1["loginWithFirebase"];
|
|
1110
1110
|
delete?: never;
|
|
1111
1111
|
options?: never;
|
|
1112
1112
|
head?: never;
|
|
@@ -1193,12 +1193,10 @@ interface components$1 {
|
|
|
1193
1193
|
/** @example Password123! */
|
|
1194
1194
|
password: string;
|
|
1195
1195
|
};
|
|
1196
|
-
/** @description Payload to log in a user
|
|
1197
|
-
|
|
1198
|
-
/** @example
|
|
1199
|
-
|
|
1200
|
-
/** @example 123456 */
|
|
1201
|
-
authorizationCode: string;
|
|
1196
|
+
/** @description Payload to log in a user with Firebase */
|
|
1197
|
+
LoginWithFirebasePayload: {
|
|
1198
|
+
/** @example ABCD.1234.abcd */
|
|
1199
|
+
idToken: string;
|
|
1202
1200
|
};
|
|
1203
1201
|
/** @description Payload to log out a user */
|
|
1204
1202
|
LogoutPayload: {
|
|
@@ -1252,8 +1250,6 @@ interface components$1 {
|
|
|
1252
1250
|
};
|
|
1253
1251
|
/** @enum {string} */
|
|
1254
1252
|
ErrorCode: "ERROR";
|
|
1255
|
-
/** @enum {string} */
|
|
1256
|
-
Provider: "GOOGLE";
|
|
1257
1253
|
};
|
|
1258
1254
|
responses: {
|
|
1259
1255
|
/** @description Login success */
|
|
@@ -1360,17 +1356,17 @@ interface operations$1 {
|
|
|
1360
1356
|
500: components$1["responses"]["InternalServerError"];
|
|
1361
1357
|
};
|
|
1362
1358
|
};
|
|
1363
|
-
|
|
1359
|
+
loginWithFirebase: {
|
|
1364
1360
|
parameters: {
|
|
1365
1361
|
query?: never;
|
|
1366
1362
|
header?: never;
|
|
1367
1363
|
path?: never;
|
|
1368
1364
|
cookie?: never;
|
|
1369
1365
|
};
|
|
1370
|
-
/** @description The request body to log in a user
|
|
1366
|
+
/** @description The request body to log in a user with Firebase */
|
|
1371
1367
|
requestBody: {
|
|
1372
1368
|
content: {
|
|
1373
|
-
"application/json": components$1["schemas"]["
|
|
1369
|
+
"application/json": components$1["schemas"]["LoginWithFirebasePayload"];
|
|
1374
1370
|
};
|
|
1375
1371
|
};
|
|
1376
1372
|
responses: {
|
|
@@ -1727,6 +1723,10 @@ type Order = TradeServiceSchemas['Order'];
|
|
|
1727
1723
|
type OrderType = TradeServiceSchemas['OrderType'];
|
|
1728
1724
|
type Holding = TradeServiceSchemas['Holding'];
|
|
1729
1725
|
type TradeServiceError = TradeServiceSchemas['Error'];
|
|
1726
|
+
type LoginPayload = UserServiceSchemas['LoginPayload'];
|
|
1727
|
+
type LoginWithFirebasePayload = UserServiceSchemas['LoginWithFirebasePayload'];
|
|
1728
|
+
type RefreshAccessTokenPayload = UserServiceSchemas['RefreshAccessTokenPayload'];
|
|
1729
|
+
type LogoutPayload = UserServiceSchemas['LogoutPayload'];
|
|
1730
1730
|
type User = UserServiceSchemas['User'];
|
|
1731
1731
|
type AddUserPayload = UserServiceSchemas['AddUserPayload'];
|
|
1732
1732
|
type UpdateUserPayload = UserServiceSchemas['UpdateUserPayload'];
|
|
@@ -1737,4 +1737,4 @@ type UploadImageResponse = AssetServiceSchemas['UploadImageResponse'];
|
|
|
1737
1737
|
type DeleteImagePayload = AssetServiceSchemas['DeleteImagePayload'];
|
|
1738
1738
|
type AssetServiceError = AssetServiceSchemas['Error'];
|
|
1739
1739
|
|
|
1740
|
-
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 MarketServiceError, type NewsArticle, type Order, type OrderType, type Portfolio, type PortfolioType, 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 };
|
|
1740
|
+
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 LoginPayload, type LoginWithFirebasePayload, type LogoutPayload, type MarketServiceError, type NewsArticle, type Order, type OrderType, type Portfolio, type PortfolioType, type RefreshAccessTokenPayload, 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 };
|
|
@@ -23,7 +23,7 @@ func GetAuthMiddleware(accessTokenSecret string) func(http.Handler) http.Handler
|
|
|
23
23
|
return func(next http.Handler) http.Handler {
|
|
24
24
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
25
25
|
// check if the request path is a login endpoint
|
|
26
|
-
if slices.Contains([]string{"/v1/auth/login", "/v1/auth/login/
|
|
26
|
+
if slices.Contains([]string{"/v1/auth/login", "/v1/auth/login/firebase"}, r.URL.Path) {
|
|
27
27
|
next.ServeHTTP(w, r)
|
|
28
28
|
return
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -29,19 +29,19 @@ paths:
|
|
|
29
29
|
500:
|
|
30
30
|
$ref: '#/components/responses/InternalServerError'
|
|
31
31
|
|
|
32
|
-
/auth/login/
|
|
32
|
+
/auth/login/firebase:
|
|
33
33
|
post:
|
|
34
|
-
description: Logs in a user
|
|
35
|
-
operationId:
|
|
34
|
+
description: Logs in a user with Firebase
|
|
35
|
+
operationId: loginWithFirebase
|
|
36
36
|
tags:
|
|
37
37
|
- Auth
|
|
38
38
|
requestBody:
|
|
39
|
-
description: The request body to log in a user
|
|
39
|
+
description: The request body to log in 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/LoginWithFirebasePayload'
|
|
45
45
|
responses:
|
|
46
46
|
200:
|
|
47
47
|
$ref: '#/components/responses/LoginSuccess'
|
|
@@ -214,18 +214,14 @@ components:
|
|
|
214
214
|
- email
|
|
215
215
|
- password
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
description: Payload to log in a user
|
|
217
|
+
LoginWithFirebasePayload:
|
|
218
|
+
description: Payload to log in a user with Firebase
|
|
219
219
|
properties:
|
|
220
|
-
|
|
221
|
-
$ref: '#/components/schemas/Provider'
|
|
222
|
-
example: GOOGLE
|
|
223
|
-
authorizationCode:
|
|
220
|
+
idToken:
|
|
224
221
|
type: string
|
|
225
|
-
example:
|
|
222
|
+
example: ABCD.1234.abcd
|
|
226
223
|
required:
|
|
227
|
-
-
|
|
228
|
-
- authorizationCode
|
|
224
|
+
- idToken
|
|
229
225
|
|
|
230
226
|
LogoutPayload:
|
|
231
227
|
description: Payload to log out a user
|
|
@@ -315,11 +311,6 @@ components:
|
|
|
315
311
|
enum:
|
|
316
312
|
- ERROR
|
|
317
313
|
|
|
318
|
-
Provider:
|
|
319
|
-
type: string
|
|
320
|
-
enum:
|
|
321
|
-
- GOOGLE
|
|
322
|
-
|
|
323
314
|
responses:
|
|
324
315
|
LoginSuccess:
|
|
325
316
|
description: Login success
|
|
@@ -21,7 +21,7 @@ export interface paths {
|
|
|
21
21
|
patch?: never;
|
|
22
22
|
trace?: never;
|
|
23
23
|
};
|
|
24
|
-
"/auth/login/
|
|
24
|
+
"/auth/login/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 Logs in a user
|
|
34
|
-
post: operations["
|
|
33
|
+
/** @description Logs in a user with Firebase */
|
|
34
|
+
post: operations["loginWithFirebase"];
|
|
35
35
|
delete?: never;
|
|
36
36
|
options?: never;
|
|
37
37
|
head?: never;
|
|
@@ -119,12 +119,10 @@ export interface components {
|
|
|
119
119
|
/** @example Password123! */
|
|
120
120
|
password: string;
|
|
121
121
|
};
|
|
122
|
-
/** @description Payload to log in a user
|
|
123
|
-
|
|
124
|
-
/** @example
|
|
125
|
-
|
|
126
|
-
/** @example 123456 */
|
|
127
|
-
authorizationCode: string;
|
|
122
|
+
/** @description Payload to log in a user with Firebase */
|
|
123
|
+
LoginWithFirebasePayload: {
|
|
124
|
+
/** @example ABCD.1234.abcd */
|
|
125
|
+
idToken: string;
|
|
128
126
|
};
|
|
129
127
|
/** @description Payload to log out a user */
|
|
130
128
|
LogoutPayload: {
|
|
@@ -178,8 +176,6 @@ export interface components {
|
|
|
178
176
|
};
|
|
179
177
|
/** @enum {string} */
|
|
180
178
|
ErrorCode: "ERROR";
|
|
181
|
-
/** @enum {string} */
|
|
182
|
-
Provider: "GOOGLE";
|
|
183
179
|
};
|
|
184
180
|
responses: {
|
|
185
181
|
/** @description Login success */
|
|
@@ -287,17 +283,17 @@ export interface operations {
|
|
|
287
283
|
500: components["responses"]["InternalServerError"];
|
|
288
284
|
};
|
|
289
285
|
};
|
|
290
|
-
|
|
286
|
+
loginWithFirebase: {
|
|
291
287
|
parameters: {
|
|
292
288
|
query?: never;
|
|
293
289
|
header?: never;
|
|
294
290
|
path?: never;
|
|
295
291
|
cookie?: never;
|
|
296
292
|
};
|
|
297
|
-
/** @description The request body to log in a user
|
|
293
|
+
/** @description The request body to log in a user with Firebase */
|
|
298
294
|
requestBody: {
|
|
299
295
|
content: {
|
|
300
|
-
"application/json": components["schemas"]["
|
|
296
|
+
"application/json": components["schemas"]["LoginWithFirebasePayload"];
|
|
301
297
|
};
|
|
302
298
|
};
|
|
303
299
|
responses: {
|
package/ts/types/types.ts
CHANGED
|
@@ -39,6 +39,10 @@ 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
|
+
export type LoginWithFirebasePayload = UserServiceSchemas['LoginWithFirebasePayload'];
|
|
44
|
+
export type RefreshAccessTokenPayload = UserServiceSchemas['RefreshAccessTokenPayload'];
|
|
45
|
+
export type LogoutPayload = UserServiceSchemas['LogoutPayload'];
|
|
42
46
|
export type User = UserServiceSchemas['User'];
|
|
43
47
|
export type AddUserPayload = UserServiceSchemas['AddUserPayload'];
|
|
44
48
|
export type UpdateUserPayload = UserServiceSchemas['UpdateUserPayload'];
|