@kanda-libs/ks-component-ts 0.3.90 → 0.3.92
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 +15257 -14907
- 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/KagentChat.ts +26 -0
- package/src/generated/components/schemas/KagentChatRequest.ts +16 -0
- package/src/generated/components/schemas/KagentMessage.ts +18 -0
- package/src/generated/components/schemas/KagentVisitorInfo.ts +16 -0
- package/src/generated/components/schemas/index.ts +4 -0
- package/src/generated/operations/index.ts +23 -0
- package/src/generated/operations/infoKagent.ts +24 -0
- package/src/generated/operations/jobSwitchDeposit.ts +29 -0
- package/src/generated/widget/index.tsx +73295 -71513
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { BaseId } from "./BaseId";
|
|
3
|
+
import { KagentMessage } from "./KagentMessage";
|
|
4
|
+
import { KagentVisitorInfo } from "./KagentVisitorInfo";
|
|
5
|
+
import { TradeSummary } from "./TradeSummary";
|
|
6
|
+
|
|
7
|
+
export const KagentChat = t.intersection([
|
|
8
|
+
BaseId,
|
|
9
|
+
t.intersection([
|
|
10
|
+
t.type({
|
|
11
|
+
messages: t.array(KagentMessage),
|
|
12
|
+
finished: t.boolean,
|
|
13
|
+
trade_summaries: t.array(TradeSummary),
|
|
14
|
+
}),
|
|
15
|
+
t.partial({
|
|
16
|
+
visitor_info: KagentVisitorInfo,
|
|
17
|
+
}),
|
|
18
|
+
]),
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
export type KagentChat = BaseId & {
|
|
22
|
+
messages: Array<KagentMessage>;
|
|
23
|
+
finished: boolean;
|
|
24
|
+
trade_summaries: Array<TradeSummary>;
|
|
25
|
+
visitor_info?: KagentVisitorInfo;
|
|
26
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { KagentMessage } from "./KagentMessage";
|
|
3
|
+
|
|
4
|
+
export const KagentChatRequest = t.intersection([
|
|
5
|
+
t.type({
|
|
6
|
+
messages: t.array(KagentMessage),
|
|
7
|
+
}),
|
|
8
|
+
t.partial({
|
|
9
|
+
id: t.string,
|
|
10
|
+
}),
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
export interface KagentChatRequest {
|
|
14
|
+
id?: string;
|
|
15
|
+
messages: Array<KagentMessage>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { DateFromISOString } from "io-ts-types";
|
|
3
|
+
|
|
4
|
+
export const KagentMessage = t.intersection([
|
|
5
|
+
t.type({
|
|
6
|
+
role: t.string,
|
|
7
|
+
content: t.string,
|
|
8
|
+
}),
|
|
9
|
+
t.partial({
|
|
10
|
+
messaged_at: DateFromISOString,
|
|
11
|
+
}),
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
export interface KagentMessage {
|
|
15
|
+
role: string;
|
|
16
|
+
content: string;
|
|
17
|
+
messaged_at?: Date;
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { WorkType } from "./WorkType";
|
|
3
|
+
|
|
4
|
+
export const KagentVisitorInfo = t.type({
|
|
5
|
+
summary: t.string,
|
|
6
|
+
postcode: t.string,
|
|
7
|
+
work_type: WorkType,
|
|
8
|
+
contact_name: t.string,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export interface KagentVisitorInfo {
|
|
12
|
+
summary: string;
|
|
13
|
+
postcode: string;
|
|
14
|
+
work_type: WorkType;
|
|
15
|
+
contact_name: string;
|
|
16
|
+
}
|
|
@@ -105,6 +105,10 @@ export * from "./JobDetails";
|
|
|
105
105
|
export * from "./JobInfo";
|
|
106
106
|
export * from "./JobItem";
|
|
107
107
|
export * from "./JobOverride";
|
|
108
|
+
export * from "./KagentChat";
|
|
109
|
+
export * from "./KagentChatRequest";
|
|
110
|
+
export * from "./KagentMessage";
|
|
111
|
+
export * from "./KagentVisitorInfo";
|
|
108
112
|
export * from "./LatLng";
|
|
109
113
|
export * from "./Lead";
|
|
110
114
|
export * from "./LeadApplicant";
|
|
@@ -316,6 +316,7 @@ import {
|
|
|
316
316
|
InfoIntroductionStatsRequestFunction,
|
|
317
317
|
} from "./infoIntroductionStats";
|
|
318
318
|
import { infoIPOperation, InfoIPRequestFunction } from "./infoIP";
|
|
319
|
+
import { infoKagentOperation, InfoKagentRequestFunction } from "./infoKagent";
|
|
319
320
|
import { infoLeadOperation, InfoLeadRequestFunction } from "./infoLead";
|
|
320
321
|
import {
|
|
321
322
|
infoLegacyRedirectOperation,
|
|
@@ -370,6 +371,10 @@ import {
|
|
|
370
371
|
jobCompanyInfoOperation,
|
|
371
372
|
JobCompanyInfoRequestFunction,
|
|
372
373
|
} from "./jobCompanyInfo";
|
|
374
|
+
import {
|
|
375
|
+
jobSwitchDepositOperation,
|
|
376
|
+
JobSwitchDepositRequestFunction,
|
|
377
|
+
} from "./jobSwitchDeposit";
|
|
373
378
|
import {
|
|
374
379
|
lenderReviewJobSatNoteOperation,
|
|
375
380
|
LenderReviewJobSatNoteRequestFunction,
|
|
@@ -699,6 +704,7 @@ export const operations: Operations = {
|
|
|
699
704
|
infoHealth: infoHealthOperation,
|
|
700
705
|
infoGhost: infoGhostOperation,
|
|
701
706
|
infoQuery: infoQueryOperation,
|
|
707
|
+
infoKagent: infoKagentOperation,
|
|
702
708
|
infoTradeSummary: infoTradeSummaryOperation,
|
|
703
709
|
infoCompany: infoCompanyOperation,
|
|
704
710
|
infoOnboarding: infoOnboardingOperation,
|
|
@@ -805,6 +811,7 @@ export const operations: Operations = {
|
|
|
805
811
|
applyJob: applyJobOperation,
|
|
806
812
|
reapplyJob: reapplyJobOperation,
|
|
807
813
|
payJob: payJobOperation,
|
|
814
|
+
jobSwitchDeposit: jobSwitchDepositOperation,
|
|
808
815
|
viewJobSatNote: viewJobSatNoteOperation,
|
|
809
816
|
signJobSatNote: signJobSatNoteOperation,
|
|
810
817
|
approveJobSatNote: approveJobSatNoteOperation,
|
|
@@ -926,6 +933,7 @@ export interface OperationRequestFunctionMap {
|
|
|
926
933
|
infoHealth: InfoHealthRequestFunction;
|
|
927
934
|
infoGhost: InfoGhostRequestFunction;
|
|
928
935
|
infoQuery: InfoQueryRequestFunction;
|
|
936
|
+
infoKagent: InfoKagentRequestFunction;
|
|
929
937
|
infoTradeSummary: InfoTradeSummaryRequestFunction;
|
|
930
938
|
infoCompany: InfoCompanyRequestFunction;
|
|
931
939
|
infoOnboarding: InfoOnboardingRequestFunction;
|
|
@@ -1031,6 +1039,7 @@ export interface OperationRequestFunctionMap {
|
|
|
1031
1039
|
applyJob: ApplyJobRequestFunction;
|
|
1032
1040
|
reapplyJob: ReapplyJobRequestFunction;
|
|
1033
1041
|
payJob: PayJobRequestFunction;
|
|
1042
|
+
jobSwitchDeposit: JobSwitchDepositRequestFunction;
|
|
1034
1043
|
viewJobSatNote: ViewJobSatNoteRequestFunction;
|
|
1035
1044
|
signJobSatNote: SignJobSatNoteRequestFunction;
|
|
1036
1045
|
approveJobSatNote: ApproveJobSatNoteRequestFunction;
|
|
@@ -1166,6 +1175,7 @@ export const requestFunctionsBuilder = (
|
|
|
1166
1175
|
infoHealth: requestFunctionBuilder(operations.infoHealth, requestAdapter),
|
|
1167
1176
|
infoGhost: requestFunctionBuilder(operations.infoGhost, requestAdapter),
|
|
1168
1177
|
infoQuery: requestFunctionBuilder(operations.infoQuery, requestAdapter),
|
|
1178
|
+
infoKagent: requestFunctionBuilder(operations.infoKagent, requestAdapter),
|
|
1169
1179
|
infoTradeSummary: requestFunctionBuilder(
|
|
1170
1180
|
operations.infoTradeSummary,
|
|
1171
1181
|
requestAdapter
|
|
@@ -1457,6 +1467,10 @@ export const requestFunctionsBuilder = (
|
|
|
1457
1467
|
applyJob: requestFunctionBuilder(operations.applyJob, requestAdapter),
|
|
1458
1468
|
reapplyJob: requestFunctionBuilder(operations.reapplyJob, requestAdapter),
|
|
1459
1469
|
payJob: requestFunctionBuilder(operations.payJob, requestAdapter),
|
|
1470
|
+
jobSwitchDeposit: requestFunctionBuilder(
|
|
1471
|
+
operations.jobSwitchDeposit,
|
|
1472
|
+
requestAdapter
|
|
1473
|
+
),
|
|
1460
1474
|
viewJobSatNote: requestFunctionBuilder(
|
|
1461
1475
|
operations.viewJobSatNote,
|
|
1462
1476
|
requestAdapter
|
|
@@ -1744,6 +1758,12 @@ export const infoQueryServiceBuilder = (
|
|
|
1744
1758
|
infoQuery: requestFunctions.infoQuery,
|
|
1745
1759
|
});
|
|
1746
1760
|
|
|
1761
|
+
export const infoKagentServiceBuilder = (
|
|
1762
|
+
requestFunctions: OperationRequestFunctionMap
|
|
1763
|
+
) => ({
|
|
1764
|
+
infoKagent: requestFunctions.infoKagent,
|
|
1765
|
+
});
|
|
1766
|
+
|
|
1747
1767
|
export const tradeSummaryServiceBuilder = (
|
|
1748
1768
|
requestFunctions: OperationRequestFunctionMap
|
|
1749
1769
|
) => ({
|
|
@@ -1799,6 +1819,7 @@ export const jobServiceBuilder = (
|
|
|
1799
1819
|
applyJob: requestFunctions.applyJob,
|
|
1800
1820
|
reapplyJob: requestFunctions.reapplyJob,
|
|
1801
1821
|
payJob: requestFunctions.payJob,
|
|
1822
|
+
jobSwitchDeposit: requestFunctions.jobSwitchDeposit,
|
|
1802
1823
|
viewJobSatNote: requestFunctions.viewJobSatNote,
|
|
1803
1824
|
signJobSatNote: requestFunctions.signJobSatNote,
|
|
1804
1825
|
approveJobSatNote: requestFunctions.approveJobSatNote,
|
|
@@ -2207,6 +2228,7 @@ export interface Operations {
|
|
|
2207
2228
|
infoHealth: typeof infoHealthOperation;
|
|
2208
2229
|
infoGhost: typeof infoGhostOperation;
|
|
2209
2230
|
infoQuery: typeof infoQueryOperation;
|
|
2231
|
+
infoKagent: typeof infoKagentOperation;
|
|
2210
2232
|
infoTradeSummary: typeof infoTradeSummaryOperation;
|
|
2211
2233
|
infoCompany: typeof infoCompanyOperation;
|
|
2212
2234
|
infoOnboarding: typeof infoOnboardingOperation;
|
|
@@ -2312,6 +2334,7 @@ export interface Operations {
|
|
|
2312
2334
|
applyJob: typeof applyJobOperation;
|
|
2313
2335
|
reapplyJob: typeof reapplyJobOperation;
|
|
2314
2336
|
payJob: typeof payJobOperation;
|
|
2337
|
+
jobSwitchDeposit: typeof jobSwitchDepositOperation;
|
|
2315
2338
|
viewJobSatNote: typeof viewJobSatNoteOperation;
|
|
2316
2339
|
signJobSatNote: typeof signJobSatNoteOperation;
|
|
2317
2340
|
approveJobSatNote: typeof approveJobSatNoteOperation;
|
|
@@ -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 infoKagentOperation = {
|
|
5
|
+
path: "/api/info/kagent",
|
|
6
|
+
method: "post",
|
|
7
|
+
responses: {
|
|
8
|
+
"200": { _tag: "JsonResponse", decoder: schemas.KagentChat },
|
|
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 InfoKagentRequestFunction = RequestFunction<
|
|
22
|
+
{ body: schemas.KagentChatRequest },
|
|
23
|
+
schemas.KagentChat
|
|
24
|
+
>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
|
|
2
|
+
import * as schemas from "../components/schemas";
|
|
3
|
+
|
|
4
|
+
export type JobSwitchDepositRequestParameters = {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const jobSwitchDepositOperation = {
|
|
9
|
+
path: "/api/job/{id}/switch-deposit",
|
|
10
|
+
method: "post",
|
|
11
|
+
responses: {
|
|
12
|
+
"200": { _tag: "JsonResponse", decoder: schemas.Job },
|
|
13
|
+
default: { _tag: "JsonResponse", decoder: schemas.Error },
|
|
14
|
+
},
|
|
15
|
+
parameters: [
|
|
16
|
+
{
|
|
17
|
+
_tag: "FormParameter",
|
|
18
|
+
explode: false,
|
|
19
|
+
in: "path",
|
|
20
|
+
name: "id",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
requestDefaultHeaders: { Accept: "application/json" },
|
|
24
|
+
} as const;
|
|
25
|
+
|
|
26
|
+
export type JobSwitchDepositRequestFunction = RequestFunction<
|
|
27
|
+
{ params: JobSwitchDepositRequestParameters },
|
|
28
|
+
schemas.Job
|
|
29
|
+
>;
|