@rivascva/dt-idl 1.1.115 → 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 CHANGED
@@ -1096,7 +1096,7 @@ interface paths$1 {
1096
1096
  patch?: never;
1097
1097
  trace?: never;
1098
1098
  };
1099
- "/auth/login/by-provider": {
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 by a provider */
1109
- post: operations$1["loginByProvider"];
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 by a provider */
1197
- LoginByProviderPayload: {
1198
- /** @example GOOGLE */
1199
- provider: components$1["schemas"]["Provider"];
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
- loginByProvider: {
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 by a provider */
1366
+ /** @description The request body to log in a user with Firebase */
1371
1367
  requestBody: {
1372
1368
  content: {
1373
- "application/json": components$1["schemas"]["LoginByProviderPayload"];
1369
+ "application/json": components$1["schemas"]["LoginWithFirebasePayload"];
1374
1370
  };
1375
1371
  };
1376
1372
  responses: {
@@ -1728,7 +1724,7 @@ type OrderType = TradeServiceSchemas['OrderType'];
1728
1724
  type Holding = TradeServiceSchemas['Holding'];
1729
1725
  type TradeServiceError = TradeServiceSchemas['Error'];
1730
1726
  type LoginPayload = UserServiceSchemas['LoginPayload'];
1731
- type LoginByProviderPayload = UserServiceSchemas['LoginByProviderPayload'];
1727
+ type LoginWithFirebasePayload = UserServiceSchemas['LoginWithFirebasePayload'];
1732
1728
  type RefreshAccessTokenPayload = UserServiceSchemas['RefreshAccessTokenPayload'];
1733
1729
  type LogoutPayload = UserServiceSchemas['LogoutPayload'];
1734
1730
  type User = UserServiceSchemas['User'];
@@ -1741,4 +1737,4 @@ type UploadImageResponse = AssetServiceSchemas['UploadImageResponse'];
1741
1737
  type DeleteImagePayload = AssetServiceSchemas['DeleteImagePayload'];
1742
1738
  type AssetServiceError = AssetServiceSchemas['Error'];
1743
1739
 
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 LoginByProviderPayload, type LoginPayload, 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 };
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/by-provider"}, r.URL.Path) {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivascva/dt-idl",
3
- "version": "1.1.115",
3
+ "version": "1.1.116",
4
4
  "description": "Dream Trade - Interface Definition Language",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -29,19 +29,19 @@ paths:
29
29
  500:
30
30
  $ref: '#/components/responses/InternalServerError'
31
31
 
32
- /auth/login/by-provider:
32
+ /auth/login/firebase:
33
33
  post:
34
- description: Logs in a user by a provider
35
- operationId: loginByProvider
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 by a provider
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/LoginByProviderPayload'
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
- LoginByProviderPayload:
218
- description: Payload to log in a user by a provider
217
+ LoginWithFirebasePayload:
218
+ description: Payload to log in a user with Firebase
219
219
  properties:
220
- provider:
221
- $ref: '#/components/schemas/Provider'
222
- example: GOOGLE
223
- authorizationCode:
220
+ idToken:
224
221
  type: string
225
- example: 123456
222
+ example: ABCD.1234.abcd
226
223
  required:
227
- - provider
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/by-provider": {
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 by a provider */
34
- post: operations["loginByProvider"];
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 by a provider */
123
- LoginByProviderPayload: {
124
- /** @example GOOGLE */
125
- provider: components["schemas"]["Provider"];
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
- loginByProvider: {
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 by a provider */
293
+ /** @description The request body to log in a user with Firebase */
298
294
  requestBody: {
299
295
  content: {
300
- "application/json": components["schemas"]["LoginByProviderPayload"];
296
+ "application/json": components["schemas"]["LoginWithFirebasePayload"];
301
297
  };
302
298
  };
303
299
  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 LoginByProviderPayload = UserServiceSchemas['LoginByProviderPayload'];
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'];