@kanda-libs/ks-component-ts 0.3.88 → 0.3.90
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 +14881 -14715
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +3 -3
- package/package.json +1 -1
- package/src/generated/components/schemas/DeviceRegistration.ts +16 -0
- package/src/generated/components/schemas/NewDeviceRegistrationRequest.ts +11 -0
- package/src/generated/components/schemas/UpdateDeviceRegistrationRequest.ts +13 -0
- package/src/generated/components/schemas/UserProfile.ts +14 -0
- package/src/generated/components/schemas/index.ts +4 -0
- package/src/generated/operations/deleteProfileDeviceRegistration.ts +24 -0
- package/src/generated/operations/getUserProfile.ts +18 -0
- package/src/generated/operations/index.ts +54 -0
- package/src/generated/operations/postProfileDeviceRegistration.ts +24 -0
- package/src/generated/operations/putProfileDeviceRegistration.ts +24 -0
- package/src/generated/widget/index.tsx +72111 -71541
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { DateFromISOString } from "io-ts-types";
|
|
3
|
+
|
|
4
|
+
export const DeviceRegistration = t.type({
|
|
5
|
+
id: t.string,
|
|
6
|
+
name: t.string,
|
|
7
|
+
token: t.string,
|
|
8
|
+
registered_at: DateFromISOString,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export interface DeviceRegistration {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
token: string;
|
|
15
|
+
registered_at: Date;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
|
|
3
|
+
export const UpdateDeviceRegistrationRequest = t.type({
|
|
4
|
+
id: t.string,
|
|
5
|
+
name: t.string,
|
|
6
|
+
token: t.string,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export interface UpdateDeviceRegistrationRequest {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
token: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { BaseId } from "./BaseId";
|
|
3
|
+
import { DeviceRegistration } from "./DeviceRegistration";
|
|
4
|
+
|
|
5
|
+
export const UserProfile = t.intersection([
|
|
6
|
+
BaseId,
|
|
7
|
+
t.type({
|
|
8
|
+
device_registrations: t.array(DeviceRegistration),
|
|
9
|
+
}),
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
export type UserProfile = BaseId & {
|
|
13
|
+
device_registrations: Array<DeviceRegistration>;
|
|
14
|
+
};
|
|
@@ -38,6 +38,7 @@ export * from "./Credit";
|
|
|
38
38
|
export * from "./Customer";
|
|
39
39
|
export * from "./CustomerDetails";
|
|
40
40
|
export * from "./CustomerOptions";
|
|
41
|
+
export * from "./DeviceRegistration";
|
|
41
42
|
export * from "./DirectorInfo";
|
|
42
43
|
export * from "./DirectorVerification";
|
|
43
44
|
export * from "./Document";
|
|
@@ -120,6 +121,7 @@ export * from "./Metarefs";
|
|
|
120
121
|
export * from "./Money";
|
|
121
122
|
export * from "./MoneyTotal";
|
|
122
123
|
export * from "./Monitor";
|
|
124
|
+
export * from "./NewDeviceRegistrationRequest";
|
|
123
125
|
export * from "./NotEmployedDetails";
|
|
124
126
|
export * from "./Onboarding";
|
|
125
127
|
export * from "./OnboardingStage";
|
|
@@ -165,7 +167,9 @@ export * from "./TradeSummary";
|
|
|
165
167
|
export * from "./TradeType";
|
|
166
168
|
export * from "./Training";
|
|
167
169
|
export * from "./Transaction";
|
|
170
|
+
export * from "./UpdateDeviceRegistrationRequest";
|
|
168
171
|
export * from "./UserEvent";
|
|
172
|
+
export * from "./UserProfile";
|
|
169
173
|
export * from "./UserType";
|
|
170
174
|
export * from "./UTM";
|
|
171
175
|
export * from "./VatNumber";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
|
|
2
|
+
import * as schemas from "../components/schemas";
|
|
3
|
+
|
|
4
|
+
export const deleteProfileDeviceRegistrationOperation = {
|
|
5
|
+
path: "/api/info/profile-device-registration",
|
|
6
|
+
method: "delete",
|
|
7
|
+
responses: {
|
|
8
|
+
"200": { _tag: "JsonResponse", decoder: schemas.UserProfile },
|
|
9
|
+
default: { _tag: "JsonResponse", decoder: schemas.Error },
|
|
10
|
+
},
|
|
11
|
+
parameters: [],
|
|
12
|
+
requestDefaultHeaders: {
|
|
13
|
+
"Content-Type": "application/json",
|
|
14
|
+
Accept: "application/json",
|
|
15
|
+
},
|
|
16
|
+
body: {
|
|
17
|
+
_tag: "JsonBody",
|
|
18
|
+
},
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
export type DeleteProfileDeviceRegistrationRequestFunction = RequestFunction<
|
|
22
|
+
{ body: string },
|
|
23
|
+
schemas.UserProfile
|
|
24
|
+
>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
|
|
2
|
+
import * as schemas from "../components/schemas";
|
|
3
|
+
|
|
4
|
+
export const getUserProfileOperation = {
|
|
5
|
+
path: "/api/info/profile",
|
|
6
|
+
method: "get",
|
|
7
|
+
responses: {
|
|
8
|
+
"200": { _tag: "JsonResponse", decoder: schemas.UserProfile },
|
|
9
|
+
default: { _tag: "JsonResponse", decoder: schemas.Error },
|
|
10
|
+
},
|
|
11
|
+
parameters: [],
|
|
12
|
+
requestDefaultHeaders: { Accept: "application/json" },
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
export type GetUserProfileRequestFunction = RequestFunction<
|
|
16
|
+
undefined,
|
|
17
|
+
schemas.UserProfile
|
|
18
|
+
>;
|
|
@@ -100,6 +100,10 @@ import {
|
|
|
100
100
|
deletePaymentOperation,
|
|
101
101
|
DeletePaymentRequestFunction,
|
|
102
102
|
} from "./deletePayment";
|
|
103
|
+
import {
|
|
104
|
+
deleteProfileDeviceRegistrationOperation,
|
|
105
|
+
DeleteProfileDeviceRegistrationRequestFunction,
|
|
106
|
+
} from "./deleteProfileDeviceRegistration";
|
|
103
107
|
import { deleteRateOperation, DeleteRateRequestFunction } from "./deleteRate";
|
|
104
108
|
import {
|
|
105
109
|
deleteSubscriptionOperation,
|
|
@@ -251,6 +255,10 @@ import {
|
|
|
251
255
|
getTransactionsOperation,
|
|
252
256
|
GetTransactionsRequestFunction,
|
|
253
257
|
} from "./getTransactions";
|
|
258
|
+
import {
|
|
259
|
+
getUserProfileOperation,
|
|
260
|
+
GetUserProfileRequestFunction,
|
|
261
|
+
} from "./getUserProfile";
|
|
254
262
|
import {
|
|
255
263
|
importFcaApprovedOperation,
|
|
256
264
|
ImportFcaApprovedRequestFunction,
|
|
@@ -564,6 +572,10 @@ import {
|
|
|
564
572
|
postPaymentOperation,
|
|
565
573
|
PostPaymentRequestFunction,
|
|
566
574
|
} from "./postPayment";
|
|
575
|
+
import {
|
|
576
|
+
postProfileDeviceRegistrationOperation,
|
|
577
|
+
PostProfileDeviceRegistrationRequestFunction,
|
|
578
|
+
} from "./postProfileDeviceRegistration";
|
|
567
579
|
import { postRateOperation, PostRateRequestFunction } from "./postRate";
|
|
568
580
|
import {
|
|
569
581
|
postSubscriptionOperation,
|
|
@@ -620,6 +632,10 @@ import {
|
|
|
620
632
|
} from "./putOnboarding";
|
|
621
633
|
import { putPartnerOperation, PutPartnerRequestFunction } from "./putPartner";
|
|
622
634
|
import { putPaymentOperation, PutPaymentRequestFunction } from "./putPayment";
|
|
635
|
+
import {
|
|
636
|
+
putProfileDeviceRegistrationOperation,
|
|
637
|
+
PutProfileDeviceRegistrationRequestFunction,
|
|
638
|
+
} from "./putProfileDeviceRegistration";
|
|
623
639
|
import { putRateOperation, PutRateRequestFunction } from "./putRate";
|
|
624
640
|
import {
|
|
625
641
|
putSubscriptionOperation,
|
|
@@ -676,6 +692,10 @@ export const operations: Operations = {
|
|
|
676
692
|
me: meOperation,
|
|
677
693
|
postMe: postMeOperation,
|
|
678
694
|
putMe: putMeOperation,
|
|
695
|
+
getUserProfile: getUserProfileOperation,
|
|
696
|
+
postProfileDeviceRegistration: postProfileDeviceRegistrationOperation,
|
|
697
|
+
putProfileDeviceRegistration: putProfileDeviceRegistrationOperation,
|
|
698
|
+
deleteProfileDeviceRegistration: deleteProfileDeviceRegistrationOperation,
|
|
679
699
|
infoHealth: infoHealthOperation,
|
|
680
700
|
infoGhost: infoGhostOperation,
|
|
681
701
|
infoQuery: infoQueryOperation,
|
|
@@ -899,6 +919,10 @@ export interface OperationRequestFunctionMap {
|
|
|
899
919
|
me: MeRequestFunction;
|
|
900
920
|
postMe: PostMeRequestFunction;
|
|
901
921
|
putMe: PutMeRequestFunction;
|
|
922
|
+
getUserProfile: GetUserProfileRequestFunction;
|
|
923
|
+
postProfileDeviceRegistration: PostProfileDeviceRegistrationRequestFunction;
|
|
924
|
+
putProfileDeviceRegistration: PutProfileDeviceRegistrationRequestFunction;
|
|
925
|
+
deleteProfileDeviceRegistration: DeleteProfileDeviceRegistrationRequestFunction;
|
|
902
926
|
infoHealth: InfoHealthRequestFunction;
|
|
903
927
|
infoGhost: InfoGhostRequestFunction;
|
|
904
928
|
infoQuery: InfoQueryRequestFunction;
|
|
@@ -1123,6 +1147,22 @@ export const requestFunctionsBuilder = (
|
|
|
1123
1147
|
me: requestFunctionBuilder(operations.me, requestAdapter),
|
|
1124
1148
|
postMe: requestFunctionBuilder(operations.postMe, requestAdapter),
|
|
1125
1149
|
putMe: requestFunctionBuilder(operations.putMe, requestAdapter),
|
|
1150
|
+
getUserProfile: requestFunctionBuilder(
|
|
1151
|
+
operations.getUserProfile,
|
|
1152
|
+
requestAdapter
|
|
1153
|
+
),
|
|
1154
|
+
postProfileDeviceRegistration: requestFunctionBuilder(
|
|
1155
|
+
operations.postProfileDeviceRegistration,
|
|
1156
|
+
requestAdapter
|
|
1157
|
+
),
|
|
1158
|
+
putProfileDeviceRegistration: requestFunctionBuilder(
|
|
1159
|
+
operations.putProfileDeviceRegistration,
|
|
1160
|
+
requestAdapter
|
|
1161
|
+
),
|
|
1162
|
+
deleteProfileDeviceRegistration: requestFunctionBuilder(
|
|
1163
|
+
operations.deleteProfileDeviceRegistration,
|
|
1164
|
+
requestAdapter
|
|
1165
|
+
),
|
|
1126
1166
|
infoHealth: requestFunctionBuilder(operations.infoHealth, requestAdapter),
|
|
1127
1167
|
infoGhost: requestFunctionBuilder(operations.infoGhost, requestAdapter),
|
|
1128
1168
|
infoQuery: requestFunctionBuilder(operations.infoQuery, requestAdapter),
|
|
@@ -1676,6 +1716,16 @@ export const authUserServiceBuilder = (
|
|
|
1676
1716
|
putMe: requestFunctions.putMe,
|
|
1677
1717
|
});
|
|
1678
1718
|
|
|
1719
|
+
export const userProfileServiceBuilder = (
|
|
1720
|
+
requestFunctions: OperationRequestFunctionMap
|
|
1721
|
+
) => ({
|
|
1722
|
+
getUserProfile: requestFunctions.getUserProfile,
|
|
1723
|
+
postProfileDeviceRegistration: requestFunctions.postProfileDeviceRegistration,
|
|
1724
|
+
putProfileDeviceRegistration: requestFunctions.putProfileDeviceRegistration,
|
|
1725
|
+
deleteProfileDeviceRegistration:
|
|
1726
|
+
requestFunctions.deleteProfileDeviceRegistration,
|
|
1727
|
+
});
|
|
1728
|
+
|
|
1679
1729
|
export const infoHealthServiceBuilder = (
|
|
1680
1730
|
requestFunctions: OperationRequestFunctionMap
|
|
1681
1731
|
) => ({
|
|
@@ -2150,6 +2200,10 @@ export interface Operations {
|
|
|
2150
2200
|
me: typeof meOperation;
|
|
2151
2201
|
postMe: typeof postMeOperation;
|
|
2152
2202
|
putMe: typeof putMeOperation;
|
|
2203
|
+
getUserProfile: typeof getUserProfileOperation;
|
|
2204
|
+
postProfileDeviceRegistration: typeof postProfileDeviceRegistrationOperation;
|
|
2205
|
+
putProfileDeviceRegistration: typeof putProfileDeviceRegistrationOperation;
|
|
2206
|
+
deleteProfileDeviceRegistration: typeof deleteProfileDeviceRegistrationOperation;
|
|
2153
2207
|
infoHealth: typeof infoHealthOperation;
|
|
2154
2208
|
infoGhost: typeof infoGhostOperation;
|
|
2155
2209
|
infoQuery: typeof infoQueryOperation;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
|
|
2
|
+
import * as schemas from "../components/schemas";
|
|
3
|
+
|
|
4
|
+
export const postProfileDeviceRegistrationOperation = {
|
|
5
|
+
path: "/api/info/profile-device-registration",
|
|
6
|
+
method: "post",
|
|
7
|
+
responses: {
|
|
8
|
+
"200": { _tag: "JsonResponse", decoder: schemas.UserProfile },
|
|
9
|
+
default: { _tag: "JsonResponse", decoder: schemas.Error },
|
|
10
|
+
},
|
|
11
|
+
parameters: [],
|
|
12
|
+
requestDefaultHeaders: {
|
|
13
|
+
"Content-Type": "application/json",
|
|
14
|
+
Accept: "application/json",
|
|
15
|
+
},
|
|
16
|
+
body: {
|
|
17
|
+
_tag: "JsonBody",
|
|
18
|
+
},
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
export type PostProfileDeviceRegistrationRequestFunction = RequestFunction<
|
|
22
|
+
{ body: schemas.NewDeviceRegistrationRequest },
|
|
23
|
+
schemas.UserProfile
|
|
24
|
+
>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
|
|
2
|
+
import * as schemas from "../components/schemas";
|
|
3
|
+
|
|
4
|
+
export const putProfileDeviceRegistrationOperation = {
|
|
5
|
+
path: "/api/info/profile-device-registration",
|
|
6
|
+
method: "put",
|
|
7
|
+
responses: {
|
|
8
|
+
"200": { _tag: "JsonResponse", decoder: schemas.UserProfile },
|
|
9
|
+
default: { _tag: "JsonResponse", decoder: schemas.Error },
|
|
10
|
+
},
|
|
11
|
+
parameters: [],
|
|
12
|
+
requestDefaultHeaders: {
|
|
13
|
+
"Content-Type": "application/json",
|
|
14
|
+
Accept: "application/json",
|
|
15
|
+
},
|
|
16
|
+
body: {
|
|
17
|
+
_tag: "JsonBody",
|
|
18
|
+
},
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
export type PutProfileDeviceRegistrationRequestFunction = RequestFunction<
|
|
22
|
+
{ body: schemas.UpdateDeviceRegistrationRequest },
|
|
23
|
+
schemas.UserProfile
|
|
24
|
+
>;
|