squarefi-bff-api-module 1.22.3 → 1.22.4
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/api/types/types.d.ts +9 -36
- package/dist/api/user.d.ts +3 -3
- package/package.json +1 -1
- package/src/api/types/types.ts +12 -36
- package/src/api/user.ts +5 -5
|
@@ -2065,28 +2065,10 @@ export declare namespace API {
|
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
2067
|
namespace User {
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
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
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
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
|
|
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
|
}
|
package/dist/api/user.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { API } from './types/types';
|
|
2
2
|
export declare const user: {
|
|
3
|
-
get: () => Promise<API.User.
|
|
3
|
+
get: () => Promise<API.User.Get.Response>;
|
|
4
4
|
userData: {
|
|
5
|
-
get: () => Promise<API.User.UserData.
|
|
6
|
-
update: (data: API.User.UserData.
|
|
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
package/src/api/types/types.ts
CHANGED
|
@@ -2425,28 +2425,11 @@ export namespace API {
|
|
|
2425
2425
|
}
|
|
2426
2426
|
|
|
2427
2427
|
export namespace User {
|
|
2428
|
-
export
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
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
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
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
|
|
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.
|
|
6
|
+
get: (): Promise<API.User.Get.Response> => apiClientV2.getRequest<API.User.Get.Response>('/user'),
|
|
7
7
|
userData: {
|
|
8
|
-
get: (): Promise<API.User.UserData.
|
|
9
|
-
apiClientV2.getRequest<API.User.UserData.
|
|
10
|
-
update: (data: API.User.UserData.
|
|
11
|
-
apiClientV2.patchRequest<API.User.UserData.
|
|
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: {
|