squarefi-bff-api-module 1.22.3 → 1.22.5

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.
@@ -1040,6 +1040,8 @@ export interface components {
1040
1040
  is_developer: boolean;
1041
1041
  first_name?: string | null;
1042
1042
  last_name?: string | null;
1043
+ /** @description User birth date in ISO 8601 format */
1044
+ birth_date?: string | null;
1043
1045
  };
1044
1046
  SignInByEmailWithPasswordDto: {
1045
1047
  password: string;
@@ -1060,6 +1062,8 @@ export interface components {
1060
1062
  default_currency?: string;
1061
1063
  first_name?: string | null;
1062
1064
  last_name?: string | null;
1065
+ /** @description User birth date in ISO 8601 format */
1066
+ birth_date?: string | null;
1063
1067
  };
1064
1068
  ChangeEmailDto: {
1065
1069
  access_token: string;
@@ -2065,28 +2065,10 @@ export declare namespace API {
2065
2065
  }
2066
2066
  }
2067
2067
  namespace User {
2068
- interface User {
2069
- id: string;
2070
- aud: string;
2071
- confirmation_sent_at: string;
2072
- recovery_sent_at: string;
2073
- email_change_sent_at: string;
2074
- new_email: string;
2075
- new_phone: string;
2076
- invited_at: string;
2077
- action_link: string;
2078
- email: string;
2079
- phone: string;
2080
- created_at: string;
2081
- confirmed_at: string;
2082
- email_confirmed_at: string;
2083
- phone_confirmed_at: string;
2084
- last_sign_in_at: string;
2085
- role: string;
2086
- updated_at: string;
2087
- identities: string[];
2088
- is_anonymous: boolean;
2089
- factors: string[];
2068
+ type User = components['schemas']['UserEntity'];
2069
+ namespace Get {
2070
+ type Request = operations['UserController_getMe']['parameters']['query'];
2071
+ type Response = operations['UserController_getMe']['responses']['200']['content']['application/json'];
2090
2072
  }
2091
2073
  namespace UpdateUser {
2092
2074
  namespace Phone {
@@ -2121,21 +2103,12 @@ export declare namespace API {
2121
2103
  }
2122
2104
  }
2123
2105
  namespace UserData {
2124
- interface UserData {
2125
- can_invite: boolean;
2126
- created_at: string;
2127
- id: number;
2128
- kyc_date: string;
2129
- kyc_status: KYCStatuses | string;
2130
- referral_name: string;
2131
- tenant_id: string;
2132
- turnover_limit: number;
2133
- user_id: string;
2134
- default_currency: string;
2135
- is_developer: boolean;
2136
- user_group_id: string | null;
2106
+ type UserData = components['schemas']['UserDataEntity'];
2107
+ namespace Get {
2108
+ type Request = operations['UserController_getMyUserData']['parameters']['query'];
2109
+ type Response = operations['UserController_getMyUserData']['responses']['200']['content']['application/json'];
2137
2110
  }
2138
- namespace UpdateUserData {
2111
+ namespace Update {
2139
2112
  type Request = operations['UserController_updateMyUserData']['requestBody']['content']['application/json'];
2140
2113
  type Response = operations['UserController_updateMyUserData']['responses']['200']['content']['application/json'];
2141
2114
  }
@@ -1,9 +1,9 @@
1
1
  import { API } from './types/types';
2
2
  export declare const user: {
3
- get: () => Promise<API.User.User>;
3
+ get: () => Promise<API.User.Get.Response>;
4
4
  userData: {
5
- get: () => Promise<API.User.UserData.UserData>;
6
- update: (data: API.User.UserData.UpdateUserData.Request) => Promise<API.User.UserData.UpdateUserData.Response>;
5
+ get: () => Promise<API.User.UserData.Get.Response>;
6
+ update: (data: API.User.UserData.Update.Request) => Promise<API.User.UserData.Update.Response>;
7
7
  };
8
8
  update: {
9
9
  phone: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.22.3",
3
+ "version": "1.22.5",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1041,6 +1041,8 @@ export interface components {
1041
1041
  is_developer: boolean;
1042
1042
  first_name?: string | null;
1043
1043
  last_name?: string | null;
1044
+ /** @description User birth date in ISO 8601 format */
1045
+ birth_date?: string | null;
1044
1046
  };
1045
1047
  SignInByEmailWithPasswordDto: {
1046
1048
  password: string;
@@ -1061,6 +1063,8 @@ export interface components {
1061
1063
  default_currency?: string;
1062
1064
  first_name?: string | null;
1063
1065
  last_name?: string | null;
1066
+ /** @description User birth date in ISO 8601 format */
1067
+ birth_date?: string | null;
1064
1068
  };
1065
1069
  ChangeEmailDto: {
1066
1070
  access_token: string;
@@ -2425,28 +2425,11 @@ export namespace API {
2425
2425
  }
2426
2426
 
2427
2427
  export namespace User {
2428
- export interface User {
2429
- id: string;
2430
- aud: string;
2431
- confirmation_sent_at: string;
2432
- recovery_sent_at: string;
2433
- email_change_sent_at: string;
2434
- new_email: string;
2435
- new_phone: string;
2436
- invited_at: string;
2437
- action_link: string;
2438
- email: string;
2439
- phone: string;
2440
- created_at: string;
2441
- confirmed_at: string;
2442
- email_confirmed_at: string;
2443
- phone_confirmed_at: string;
2444
- last_sign_in_at: string;
2445
- role: string;
2446
- updated_at: string;
2447
- identities: string[];
2448
- is_anonymous: boolean;
2449
- factors: string[];
2428
+ export type User = components['schemas']['UserEntity'];
2429
+
2430
+ export namespace Get {
2431
+ export type Request = operations['UserController_getMe']['parameters']['query'];
2432
+ export type Response = operations['UserController_getMe']['responses']['200']['content']['application/json'];
2450
2433
  }
2451
2434
 
2452
2435
  export namespace UpdateUser {
@@ -2485,22 +2468,15 @@ export namespace API {
2485
2468
  }
2486
2469
 
2487
2470
  export namespace UserData {
2488
- export interface UserData {
2489
- can_invite: boolean;
2490
- created_at: string;
2491
- id: number;
2492
- kyc_date: string;
2493
- kyc_status: KYCStatuses | string;
2494
- referral_name: string;
2495
- tenant_id: string;
2496
- turnover_limit: number;
2497
- user_id: string;
2498
- default_currency: string;
2499
- is_developer: boolean; // have to add in API V2
2500
- user_group_id: string | null; // have to add in API V2
2471
+ export type UserData = components['schemas']['UserDataEntity'];
2472
+
2473
+ export namespace Get {
2474
+ export type Request = operations['UserController_getMyUserData']['parameters']['query'];
2475
+ export type Response =
2476
+ operations['UserController_getMyUserData']['responses']['200']['content']['application/json'];
2501
2477
  }
2502
2478
 
2503
- export namespace UpdateUserData {
2479
+ export namespace Update {
2504
2480
  export type Request =
2505
2481
  operations['UserController_updateMyUserData']['requestBody']['content']['application/json'];
2506
2482
 
package/src/api/user.ts CHANGED
@@ -3,12 +3,12 @@ import { API } from './types/types';
3
3
  import { apiClientV2 } from '../utils/apiClientFactory';
4
4
 
5
5
  export const user = {
6
- get: (): Promise<API.User.User> => apiClientV2.getRequest<API.User.User>('/user'),
6
+ get: (): Promise<API.User.Get.Response> => apiClientV2.getRequest<API.User.Get.Response>('/user'),
7
7
  userData: {
8
- get: (): Promise<API.User.UserData.UserData> =>
9
- apiClientV2.getRequest<API.User.UserData.UserData>('/user/user-data'),
10
- update: (data: API.User.UserData.UpdateUserData.Request): Promise<API.User.UserData.UpdateUserData.Response> =>
11
- apiClientV2.patchRequest<API.User.UserData.UpdateUserData.Response>('/user/user-data', { data }),
8
+ get: (): Promise<API.User.UserData.Get.Response> =>
9
+ apiClientV2.getRequest<API.User.UserData.Get.Response>('/user/user-data'),
10
+ update: (data: API.User.UserData.Update.Request): Promise<API.User.UserData.Update.Response> =>
11
+ apiClientV2.patchRequest<API.User.UserData.Update.Response>('/user/user-data', { data }),
12
12
  },
13
13
  update: {
14
14
  phone: {