@rivascva/dt-idl 1.1.115 → 1.1.117
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 +13 -16
- package/go/middlewares/middlewares.go +1 -1
- package/package.json +1 -1
- package/services/dt-user-service.yaml +13 -19
- package/ts/services/dt-user-service.ts +11 -14
- package/ts/types/types.ts +1 -1
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,11 @@ 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
|
-
|
|
1201
|
-
authorizationCode: string;
|
|
1196
|
+
/** @description Payload to log in a user with Firebase */
|
|
1197
|
+
LoginWithFirebasePayload: {
|
|
1198
|
+
/** @example ABCD.1234.abcd */
|
|
1199
|
+
idToken: string;
|
|
1200
|
+
newUserDetails?: components$1["schemas"]["AddUserPayload"];
|
|
1202
1201
|
};
|
|
1203
1202
|
/** @description Payload to log out a user */
|
|
1204
1203
|
LogoutPayload: {
|
|
@@ -1252,8 +1251,6 @@ interface components$1 {
|
|
|
1252
1251
|
};
|
|
1253
1252
|
/** @enum {string} */
|
|
1254
1253
|
ErrorCode: "ERROR";
|
|
1255
|
-
/** @enum {string} */
|
|
1256
|
-
Provider: "GOOGLE";
|
|
1257
1254
|
};
|
|
1258
1255
|
responses: {
|
|
1259
1256
|
/** @description Login success */
|
|
@@ -1360,17 +1357,17 @@ interface operations$1 {
|
|
|
1360
1357
|
500: components$1["responses"]["InternalServerError"];
|
|
1361
1358
|
};
|
|
1362
1359
|
};
|
|
1363
|
-
|
|
1360
|
+
loginWithFirebase: {
|
|
1364
1361
|
parameters: {
|
|
1365
1362
|
query?: never;
|
|
1366
1363
|
header?: never;
|
|
1367
1364
|
path?: never;
|
|
1368
1365
|
cookie?: never;
|
|
1369
1366
|
};
|
|
1370
|
-
/** @description The request body to log in a user
|
|
1367
|
+
/** @description The request body to log in a user with Firebase */
|
|
1371
1368
|
requestBody: {
|
|
1372
1369
|
content: {
|
|
1373
|
-
"application/json": components$1["schemas"]["
|
|
1370
|
+
"application/json": components$1["schemas"]["LoginWithFirebasePayload"];
|
|
1374
1371
|
};
|
|
1375
1372
|
};
|
|
1376
1373
|
responses: {
|
|
@@ -1728,7 +1725,7 @@ type OrderType = TradeServiceSchemas['OrderType'];
|
|
|
1728
1725
|
type Holding = TradeServiceSchemas['Holding'];
|
|
1729
1726
|
type TradeServiceError = TradeServiceSchemas['Error'];
|
|
1730
1727
|
type LoginPayload = UserServiceSchemas['LoginPayload'];
|
|
1731
|
-
type
|
|
1728
|
+
type LoginWithFirebasePayload = UserServiceSchemas['LoginWithFirebasePayload'];
|
|
1732
1729
|
type RefreshAccessTokenPayload = UserServiceSchemas['RefreshAccessTokenPayload'];
|
|
1733
1730
|
type LogoutPayload = UserServiceSchemas['LogoutPayload'];
|
|
1734
1731
|
type User = UserServiceSchemas['User'];
|
|
@@ -1741,4 +1738,4 @@ type UploadImageResponse = AssetServiceSchemas['UploadImageResponse'];
|
|
|
1741
1738
|
type DeleteImagePayload = AssetServiceSchemas['DeleteImagePayload'];
|
|
1742
1739
|
type AssetServiceError = AssetServiceSchemas['Error'];
|
|
1743
1740
|
|
|
1744
|
-
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
|
|
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 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,17 @@ 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
|
|
223
|
+
newUserDetails:
|
|
224
|
+
allOf:
|
|
225
|
+
- $ref: '#/components/schemas/AddUserPayload'
|
|
226
226
|
required:
|
|
227
|
-
-
|
|
228
|
-
- authorizationCode
|
|
227
|
+
- idToken
|
|
229
228
|
|
|
230
229
|
LogoutPayload:
|
|
231
230
|
description: Payload to log out a user
|
|
@@ -315,11 +314,6 @@ components:
|
|
|
315
314
|
enum:
|
|
316
315
|
- ERROR
|
|
317
316
|
|
|
318
|
-
Provider:
|
|
319
|
-
type: string
|
|
320
|
-
enum:
|
|
321
|
-
- GOOGLE
|
|
322
|
-
|
|
323
317
|
responses:
|
|
324
318
|
LoginSuccess:
|
|
325
319
|
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,11 @@ 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
|
-
|
|
127
|
-
authorizationCode: string;
|
|
122
|
+
/** @description Payload to log in a user with Firebase */
|
|
123
|
+
LoginWithFirebasePayload: {
|
|
124
|
+
/** @example ABCD.1234.abcd */
|
|
125
|
+
idToken: string;
|
|
126
|
+
newUserDetails?: components["schemas"]["AddUserPayload"];
|
|
128
127
|
};
|
|
129
128
|
/** @description Payload to log out a user */
|
|
130
129
|
LogoutPayload: {
|
|
@@ -178,8 +177,6 @@ export interface components {
|
|
|
178
177
|
};
|
|
179
178
|
/** @enum {string} */
|
|
180
179
|
ErrorCode: "ERROR";
|
|
181
|
-
/** @enum {string} */
|
|
182
|
-
Provider: "GOOGLE";
|
|
183
180
|
};
|
|
184
181
|
responses: {
|
|
185
182
|
/** @description Login success */
|
|
@@ -287,17 +284,17 @@ export interface operations {
|
|
|
287
284
|
500: components["responses"]["InternalServerError"];
|
|
288
285
|
};
|
|
289
286
|
};
|
|
290
|
-
|
|
287
|
+
loginWithFirebase: {
|
|
291
288
|
parameters: {
|
|
292
289
|
query?: never;
|
|
293
290
|
header?: never;
|
|
294
291
|
path?: never;
|
|
295
292
|
cookie?: never;
|
|
296
293
|
};
|
|
297
|
-
/** @description The request body to log in a user
|
|
294
|
+
/** @description The request body to log in a user with Firebase */
|
|
298
295
|
requestBody: {
|
|
299
296
|
content: {
|
|
300
|
-
"application/json": components["schemas"]["
|
|
297
|
+
"application/json": components["schemas"]["LoginWithFirebasePayload"];
|
|
301
298
|
};
|
|
302
299
|
};
|
|
303
300
|
responses: {
|
package/ts/types/types.ts
CHANGED
|
@@ -40,7 +40,7 @@ export type TradeServiceError = TradeServiceSchemas['Error'];
|
|
|
40
40
|
|
|
41
41
|
// User Service Types
|
|
42
42
|
export type LoginPayload = UserServiceSchemas['LoginPayload'];
|
|
43
|
-
export type
|
|
43
|
+
export type LoginWithFirebasePayload = UserServiceSchemas['LoginWithFirebasePayload'];
|
|
44
44
|
export type RefreshAccessTokenPayload = UserServiceSchemas['RefreshAccessTokenPayload'];
|
|
45
45
|
export type LogoutPayload = UserServiceSchemas['LogoutPayload'];
|
|
46
46
|
export type User = UserServiceSchemas['User'];
|