@kanda-libs/ks-component-ts 0.3.104 → 0.3.106
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 +15074 -15022
- 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/CheckoutStep.ts +24 -0
- package/src/generated/components/schemas/CustomerOptions.ts +2 -0
- package/src/generated/components/schemas/Job.ts +5 -0
- package/src/generated/components/schemas/JobStep.ts +19 -0
- package/src/generated/components/schemas/index.ts +2 -0
- package/src/generated/operations/index.ts +30 -0
- package/src/generated/operations/reactivateCompany.ts +29 -0
- package/src/generated/operations/stepJob.ts +35 -0
- package/src/generated/operations/suspendCompany.ts +29 -0
- package/src/generated/widget/index.tsx +66882 -66473
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
|
|
3
|
+
export const CheckoutStep = t.union([
|
|
4
|
+
t.literal("checkout_quote_viewed"),
|
|
5
|
+
t.literal("checkout_quote_accepted"),
|
|
6
|
+
t.literal("checkout_quote_changes_requested"),
|
|
7
|
+
t.literal("checkout_quote_changes_amended"),
|
|
8
|
+
t.literal("checkout_quote_changes_rejected"),
|
|
9
|
+
t.literal("checkout_quote_declined"),
|
|
10
|
+
t.literal("checkout_quote_payment_selected"),
|
|
11
|
+
t.literal("checkout_quote_finalised"),
|
|
12
|
+
t.literal("checkout_quote_completed"),
|
|
13
|
+
]);
|
|
14
|
+
|
|
15
|
+
export type CheckoutStep =
|
|
16
|
+
| "checkout_quote_viewed"
|
|
17
|
+
| "checkout_quote_accepted"
|
|
18
|
+
| "checkout_quote_changes_requested"
|
|
19
|
+
| "checkout_quote_changes_amended"
|
|
20
|
+
| "checkout_quote_changes_rejected"
|
|
21
|
+
| "checkout_quote_declined"
|
|
22
|
+
| "checkout_quote_payment_selected"
|
|
23
|
+
| "checkout_quote_finalised"
|
|
24
|
+
| "checkout_quote_completed";
|
|
@@ -12,6 +12,7 @@ export const CustomerOptions = t.intersection([
|
|
|
12
12
|
t.partial({
|
|
13
13
|
deposit_value: Money,
|
|
14
14
|
agree_commission_terms: Signature,
|
|
15
|
+
declined_reason: t.string,
|
|
15
16
|
}),
|
|
16
17
|
]);
|
|
17
18
|
|
|
@@ -20,4 +21,5 @@ export interface CustomerOptions {
|
|
|
20
21
|
finance_option: FinanceRate;
|
|
21
22
|
deposit_value?: Money;
|
|
22
23
|
agree_commission_terms?: Signature;
|
|
24
|
+
declined_reason?: string;
|
|
23
25
|
}
|
|
@@ -8,6 +8,7 @@ import { FinanceRate } from "./FinanceRate";
|
|
|
8
8
|
import { FinanceStatus } from "./FinanceStatus";
|
|
9
9
|
import { FlowType } from "./FlowType";
|
|
10
10
|
import { JobItem } from "./JobItem";
|
|
11
|
+
import { JobStep } from "./JobStep";
|
|
11
12
|
import { Metadata } from "./Metadata";
|
|
12
13
|
import { Metarefs } from "./Metarefs";
|
|
13
14
|
import { Money } from "./Money";
|
|
@@ -62,6 +63,8 @@ export const Job = t.intersection([
|
|
|
62
63
|
quoted_to: t.string,
|
|
63
64
|
introduced_to: t.string,
|
|
64
65
|
job_documents: t.array(Document),
|
|
66
|
+
current_step: JobStep,
|
|
67
|
+
steps: t.array(JobStep),
|
|
65
68
|
xid: t.string,
|
|
66
69
|
xref: t.string,
|
|
67
70
|
redirect_urls: RedirectURLs,
|
|
@@ -101,6 +104,8 @@ export interface Job {
|
|
|
101
104
|
quoted_to?: string;
|
|
102
105
|
introduced_to?: string;
|
|
103
106
|
job_documents?: Array<Document>;
|
|
107
|
+
current_step?: JobStep;
|
|
108
|
+
steps?: Array<JobStep>;
|
|
104
109
|
xid?: string;
|
|
105
110
|
xref?: string;
|
|
106
111
|
redirect_urls?: RedirectURLs;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { DateFromISOString } from "io-ts-types";
|
|
3
|
+
import { CheckoutStep } from "./CheckoutStep";
|
|
4
|
+
|
|
5
|
+
export const JobStep = t.intersection([
|
|
6
|
+
t.type({
|
|
7
|
+
name: CheckoutStep,
|
|
8
|
+
appended_at: DateFromISOString,
|
|
9
|
+
}),
|
|
10
|
+
t.partial({
|
|
11
|
+
text: t.string,
|
|
12
|
+
}),
|
|
13
|
+
]);
|
|
14
|
+
|
|
15
|
+
export interface JobStep {
|
|
16
|
+
name: CheckoutStep;
|
|
17
|
+
text?: string;
|
|
18
|
+
appended_at: Date;
|
|
19
|
+
}
|
|
@@ -21,6 +21,7 @@ export * from "./Campaign";
|
|
|
21
21
|
export * from "./CampaignEvent";
|
|
22
22
|
export * from "./Category";
|
|
23
23
|
export * from "./CheckoutOption";
|
|
24
|
+
export * from "./CheckoutStep";
|
|
24
25
|
export * from "./CommContext";
|
|
25
26
|
export * from "./CommExtras";
|
|
26
27
|
export * from "./CommPreferences";
|
|
@@ -106,6 +107,7 @@ export * from "./JobDetails";
|
|
|
106
107
|
export * from "./JobInfo";
|
|
107
108
|
export * from "./JobItem";
|
|
108
109
|
export * from "./JobOverride";
|
|
110
|
+
export * from "./JobStep";
|
|
109
111
|
export * from "./KagentChat";
|
|
110
112
|
export * from "./KagentChatRequest";
|
|
111
113
|
export * from "./KagentMessage";
|
|
@@ -661,6 +661,10 @@ import {
|
|
|
661
661
|
} from "./quoteCredit";
|
|
662
662
|
import { quoteJobOperation, QuoteJobRequestFunction } from "./quoteJob";
|
|
663
663
|
import { quoteLeadOperation, QuoteLeadRequestFunction } from "./quoteLead";
|
|
664
|
+
import {
|
|
665
|
+
reactivateCompanyOperation,
|
|
666
|
+
ReactivateCompanyRequestFunction,
|
|
667
|
+
} from "./reactivateCompany";
|
|
664
668
|
import { reapplyJobOperation, ReapplyJobRequestFunction } from "./reapplyJob";
|
|
665
669
|
import { referLeadOperation, ReferLeadRequestFunction } from "./referLead";
|
|
666
670
|
import { resendJobOperation, ResendJobRequestFunction } from "./resendJob";
|
|
@@ -675,10 +679,15 @@ import {
|
|
|
675
679
|
signJobSatNoteOperation,
|
|
676
680
|
SignJobSatNoteRequestFunction,
|
|
677
681
|
} from "./signJobSatNote";
|
|
682
|
+
import { stepJobOperation, StepJobRequestFunction } from "./stepJob";
|
|
678
683
|
import {
|
|
679
684
|
submitIntroductionStateOperation,
|
|
680
685
|
SubmitIntroductionStateRequestFunction,
|
|
681
686
|
} from "./submitIntroductionState";
|
|
687
|
+
import {
|
|
688
|
+
suspendCompanyOperation,
|
|
689
|
+
SuspendCompanyRequestFunction,
|
|
690
|
+
} from "./suspendCompany";
|
|
682
691
|
import { tradeLeadOperation, TradeLeadRequestFunction } from "./tradeLead";
|
|
683
692
|
import {
|
|
684
693
|
tradeQuoteApprovalLeadOperation,
|
|
@@ -792,6 +801,8 @@ export const operations: Operations = {
|
|
|
792
801
|
directorCompany: directorCompanyOperation,
|
|
793
802
|
getCompanyReferrals: getCompanyReferralsOperation,
|
|
794
803
|
postCompanyReferrals: postCompanyReferralsOperation,
|
|
804
|
+
suspendCompany: suspendCompanyOperation,
|
|
805
|
+
reactivateCompany: reactivateCompanyOperation,
|
|
795
806
|
approveCompany: approveCompanyOperation,
|
|
796
807
|
declineCompany: declineCompanyOperation,
|
|
797
808
|
exportFcaApproved: exportFcaApprovedOperation,
|
|
@@ -807,6 +818,7 @@ export const operations: Operations = {
|
|
|
807
818
|
completeJob: completeJobOperation,
|
|
808
819
|
archiveJob: archiveJobOperation,
|
|
809
820
|
unarchiveJob: unarchiveJobOperation,
|
|
821
|
+
stepJob: stepJobOperation,
|
|
810
822
|
quoteJob: quoteJobOperation,
|
|
811
823
|
applyJob: applyJobOperation,
|
|
812
824
|
reapplyJob: reapplyJobOperation,
|
|
@@ -1020,6 +1032,8 @@ export interface OperationRequestFunctionMap {
|
|
|
1020
1032
|
directorCompany: DirectorCompanyRequestFunction;
|
|
1021
1033
|
getCompanyReferrals: GetCompanyReferralsRequestFunction;
|
|
1022
1034
|
postCompanyReferrals: PostCompanyReferralsRequestFunction;
|
|
1035
|
+
suspendCompany: SuspendCompanyRequestFunction;
|
|
1036
|
+
reactivateCompany: ReactivateCompanyRequestFunction;
|
|
1023
1037
|
approveCompany: ApproveCompanyRequestFunction;
|
|
1024
1038
|
declineCompany: DeclineCompanyRequestFunction;
|
|
1025
1039
|
exportFcaApproved: ExportFcaApprovedRequestFunction;
|
|
@@ -1035,6 +1049,7 @@ export interface OperationRequestFunctionMap {
|
|
|
1035
1049
|
completeJob: CompleteJobRequestFunction;
|
|
1036
1050
|
archiveJob: ArchiveJobRequestFunction;
|
|
1037
1051
|
unarchiveJob: UnarchiveJobRequestFunction;
|
|
1052
|
+
stepJob: StepJobRequestFunction;
|
|
1038
1053
|
quoteJob: QuoteJobRequestFunction;
|
|
1039
1054
|
applyJob: ApplyJobRequestFunction;
|
|
1040
1055
|
reapplyJob: ReapplyJobRequestFunction;
|
|
@@ -1436,6 +1451,14 @@ export const requestFunctionsBuilder = (
|
|
|
1436
1451
|
operations.postCompanyReferrals,
|
|
1437
1452
|
requestAdapter
|
|
1438
1453
|
),
|
|
1454
|
+
suspendCompany: requestFunctionBuilder(
|
|
1455
|
+
operations.suspendCompany,
|
|
1456
|
+
requestAdapter
|
|
1457
|
+
),
|
|
1458
|
+
reactivateCompany: requestFunctionBuilder(
|
|
1459
|
+
operations.reactivateCompany,
|
|
1460
|
+
requestAdapter
|
|
1461
|
+
),
|
|
1439
1462
|
approveCompany: requestFunctionBuilder(
|
|
1440
1463
|
operations.approveCompany,
|
|
1441
1464
|
requestAdapter
|
|
@@ -1463,6 +1486,7 @@ export const requestFunctionsBuilder = (
|
|
|
1463
1486
|
completeJob: requestFunctionBuilder(operations.completeJob, requestAdapter),
|
|
1464
1487
|
archiveJob: requestFunctionBuilder(operations.archiveJob, requestAdapter),
|
|
1465
1488
|
unarchiveJob: requestFunctionBuilder(operations.unarchiveJob, requestAdapter),
|
|
1489
|
+
stepJob: requestFunctionBuilder(operations.stepJob, requestAdapter),
|
|
1466
1490
|
quoteJob: requestFunctionBuilder(operations.quoteJob, requestAdapter),
|
|
1467
1491
|
applyJob: requestFunctionBuilder(operations.applyJob, requestAdapter),
|
|
1468
1492
|
reapplyJob: requestFunctionBuilder(operations.reapplyJob, requestAdapter),
|
|
@@ -1815,6 +1839,7 @@ export const jobServiceBuilder = (
|
|
|
1815
1839
|
completeJob: requestFunctions.completeJob,
|
|
1816
1840
|
archiveJob: requestFunctions.archiveJob,
|
|
1817
1841
|
unarchiveJob: requestFunctions.unarchiveJob,
|
|
1842
|
+
stepJob: requestFunctions.stepJob,
|
|
1818
1843
|
quoteJob: requestFunctions.quoteJob,
|
|
1819
1844
|
applyJob: requestFunctions.applyJob,
|
|
1820
1845
|
reapplyJob: requestFunctions.reapplyJob,
|
|
@@ -2054,6 +2079,8 @@ export const companyServiceBuilder = (
|
|
|
2054
2079
|
directorCompany: requestFunctions.directorCompany,
|
|
2055
2080
|
getCompanyReferrals: requestFunctions.getCompanyReferrals,
|
|
2056
2081
|
postCompanyReferrals: requestFunctions.postCompanyReferrals,
|
|
2082
|
+
suspendCompany: requestFunctions.suspendCompany,
|
|
2083
|
+
reactivateCompany: requestFunctions.reactivateCompany,
|
|
2057
2084
|
approveCompany: requestFunctions.approveCompany,
|
|
2058
2085
|
declineCompany: requestFunctions.declineCompany,
|
|
2059
2086
|
exportFcaApproved: requestFunctions.exportFcaApproved,
|
|
@@ -2315,6 +2342,8 @@ export interface Operations {
|
|
|
2315
2342
|
directorCompany: typeof directorCompanyOperation;
|
|
2316
2343
|
getCompanyReferrals: typeof getCompanyReferralsOperation;
|
|
2317
2344
|
postCompanyReferrals: typeof postCompanyReferralsOperation;
|
|
2345
|
+
suspendCompany: typeof suspendCompanyOperation;
|
|
2346
|
+
reactivateCompany: typeof reactivateCompanyOperation;
|
|
2318
2347
|
approveCompany: typeof approveCompanyOperation;
|
|
2319
2348
|
declineCompany: typeof declineCompanyOperation;
|
|
2320
2349
|
exportFcaApproved: typeof exportFcaApprovedOperation;
|
|
@@ -2330,6 +2359,7 @@ export interface Operations {
|
|
|
2330
2359
|
completeJob: typeof completeJobOperation;
|
|
2331
2360
|
archiveJob: typeof archiveJobOperation;
|
|
2332
2361
|
unarchiveJob: typeof unarchiveJobOperation;
|
|
2362
|
+
stepJob: typeof stepJobOperation;
|
|
2333
2363
|
quoteJob: typeof quoteJobOperation;
|
|
2334
2364
|
applyJob: typeof applyJobOperation;
|
|
2335
2365
|
reapplyJob: typeof reapplyJobOperation;
|
|
@@ -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 ReactivateCompanyRequestParameters = {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const reactivateCompanyOperation = {
|
|
9
|
+
path: "/api/company/{id}/reactivate",
|
|
10
|
+
method: "post",
|
|
11
|
+
responses: {
|
|
12
|
+
"200": { _tag: "JsonResponse", decoder: schemas.Company },
|
|
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 ReactivateCompanyRequestFunction = RequestFunction<
|
|
27
|
+
{ params: ReactivateCompanyRequestParameters },
|
|
28
|
+
schemas.Company
|
|
29
|
+
>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
|
|
2
|
+
import * as schemas from "../components/schemas";
|
|
3
|
+
|
|
4
|
+
export type StepJobRequestParameters = {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const stepJobOperation = {
|
|
9
|
+
path: "/api/job/{id}/step",
|
|
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: {
|
|
24
|
+
"Content-Type": "application/json",
|
|
25
|
+
Accept: "application/json",
|
|
26
|
+
},
|
|
27
|
+
body: {
|
|
28
|
+
_tag: "JsonBody",
|
|
29
|
+
},
|
|
30
|
+
} as const;
|
|
31
|
+
|
|
32
|
+
export type StepJobRequestFunction = RequestFunction<
|
|
33
|
+
{ params: StepJobRequestParameters; body: schemas.JobStep },
|
|
34
|
+
schemas.Job
|
|
35
|
+
>;
|
|
@@ -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 SuspendCompanyRequestParameters = {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const suspendCompanyOperation = {
|
|
9
|
+
path: "/api/company/{id}/suspend",
|
|
10
|
+
method: "post",
|
|
11
|
+
responses: {
|
|
12
|
+
"200": { _tag: "JsonResponse", decoder: schemas.Company },
|
|
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 SuspendCompanyRequestFunction = RequestFunction<
|
|
27
|
+
{ params: SuspendCompanyRequestParameters },
|
|
28
|
+
schemas.Company
|
|
29
|
+
>;
|