@kanda-libs/ks-component-ts 0.2.278 → 0.2.280

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanda-libs/ks-component-ts",
3
- "version": "0.2.278",
3
+ "version": "0.2.280",
4
4
  "description": "Kanda form component library",
5
5
  "main": "dist/index.esm.js",
6
6
  "module": "dist/index.esm.js",
@@ -19,7 +19,6 @@ export const Enterprise = t.intersection([
19
19
  aid: t.string,
20
20
  oid: t.string,
21
21
  eid: t.string,
22
- rid: t.string,
23
22
  bid: t.string,
24
23
  subdomain: t.string,
25
24
  branch_code: t.string,
@@ -35,7 +34,6 @@ export interface Enterprise {
35
34
  aid?: string;
36
35
  oid?: string;
37
36
  eid?: string;
38
- rid?: string;
39
37
  bid?: string;
40
38
  enterprise_type:
41
39
  | "main_office"
@@ -0,0 +1,34 @@
1
+ import * as t from "io-ts";
2
+ import { Customer } from "./Customer";
3
+ import { JobItem } from "./JobItem";
4
+ import { Money } from "./Money";
5
+ import { RedirectURLs } from "./RedirectURLs";
6
+ import { WorkType } from "./WorkType";
7
+
8
+ export const InfoCheckoutRedirect = t.intersection([
9
+ t.type({
10
+ reference: t.string,
11
+ work_type: WorkType,
12
+ deposit_type: t.union([
13
+ t.literal("no_deposit"),
14
+ t.literal("partial_deposit"),
15
+ t.literal("fixed_deposit"),
16
+ ]),
17
+ deposit_value: Money,
18
+ customer: Customer,
19
+ job_items: t.array(JobItem),
20
+ }),
21
+ t.partial({
22
+ redirect_urls: RedirectURLs,
23
+ }),
24
+ ]);
25
+
26
+ export interface InfoCheckoutRedirect {
27
+ reference: string;
28
+ work_type: WorkType;
29
+ deposit_type: "no_deposit" | "partial_deposit" | "fixed_deposit";
30
+ deposit_value: Money;
31
+ customer: Customer;
32
+ job_items: Array<JobItem>;
33
+ redirect_urls?: RedirectURLs;
34
+ }
@@ -22,6 +22,7 @@ export const LeadQuote = t.intersection([
22
22
  job_items: t.array(JobItem),
23
23
  deposit: Money,
24
24
  total: MoneyTotal,
25
+ reference: t.string,
25
26
  }),
26
27
  ]);
27
28
 
@@ -38,4 +39,5 @@ export interface LeadQuote {
38
39
  job_items?: Array<JobItem>;
39
40
  deposit?: Money;
40
41
  total?: MoneyTotal;
42
+ reference?: string;
41
43
  }
@@ -12,6 +12,9 @@ export const Payment = t.intersection([
12
12
  cid: t.string,
13
13
  oid: t.string,
14
14
  aid: t.string,
15
+ eid: t.string,
16
+ bid: t.string,
17
+ tid: t.string,
15
18
  kid: t.string,
16
19
  kind: t.union([t.literal("job"), t.literal("charge")]),
17
20
  xid: t.string,
@@ -35,6 +38,9 @@ export interface Payment {
35
38
  cid?: string;
36
39
  oid?: string;
37
40
  aid?: string;
41
+ eid?: string;
42
+ bid?: string;
43
+ tid?: string;
38
44
  kid?: string;
39
45
  kind?: "job" | "charge";
40
46
  xid?: string;
@@ -41,6 +41,7 @@ export * from "./FlowType";
41
41
  export * from "./Gender";
42
42
  export * from "./Income";
43
43
  export * from "./InfoAuth";
44
+ export * from "./InfoCheckoutRedirect";
44
45
  export * from "./InfoCompany";
45
46
  export * from "./InfoEntity";
46
47
  export * from "./InfoGhost";
@@ -153,6 +153,10 @@ import {
153
153
  GetSubscriptionsRequestFunction,
154
154
  } from "./getSubscriptions";
155
155
  import { infoAuthOperation, InfoAuthRequestFunction } from "./infoAuth";
156
+ import {
157
+ infoCheckoutRedirectOperation,
158
+ InfoCheckoutRedirectRequestFunction,
159
+ } from "./infoCheckoutRedirect";
156
160
  import {
157
161
  infoClaimAccountOperation,
158
162
  InfoClaimAccountRequestFunction,
@@ -355,6 +359,10 @@ import { referLeadOperation, ReferLeadRequestFunction } from "./referLead";
355
359
  import { resendJobOperation, ResendJobRequestFunction } from "./resendJob";
356
360
  import { runnerOperation, RunnerRequestFunction } from "./runner";
357
361
  import { sendJobOperation, SendJobRequestFunction } from "./sendJob";
362
+ import {
363
+ sendLeadJobOperation,
364
+ SendLeadJobRequestFunction,
365
+ } from "./sendLeadJob";
358
366
  import { signCreditOperation, SignCreditRequestFunction } from "./signCredit";
359
367
  import {
360
368
  signJobSateNoteOperation,
@@ -395,6 +403,7 @@ export const operations: Operations = {
395
403
  infoClaimAccount: infoClaimAccountOperation,
396
404
  infoRate: infoRateOperation,
397
405
  infoLegacyRedirect: infoLegacyRedirectOperation,
406
+ infoCheckoutRedirect: infoCheckoutRedirectOperation,
398
407
  infoIP: infoIPOperation,
399
408
  infoValidateEmail: infoValidateEmailOperation,
400
409
  infoGetCache: infoGetCacheOperation,
@@ -482,6 +491,7 @@ export const operations: Operations = {
482
491
  putLead: putLeadOperation,
483
492
  deleteLead: deleteLeadOperation,
484
493
  quoteLead: quoteLeadOperation,
494
+ sendLeadJob: sendLeadJobOperation,
485
495
  tradeLead: tradeLeadOperation,
486
496
  tradeQuoteApprovalLead: tradeQuoteApprovalLeadOperation,
487
497
  matchTradesLead: matchTradesLeadOperation,
@@ -532,6 +542,7 @@ export interface OperationRequestFunctionMap {
532
542
  infoClaimAccount: InfoClaimAccountRequestFunction;
533
543
  infoRate: InfoRateRequestFunction;
534
544
  infoLegacyRedirect: InfoLegacyRedirectRequestFunction;
545
+ infoCheckoutRedirect: InfoCheckoutRedirectRequestFunction;
535
546
  infoIP: InfoIPRequestFunction;
536
547
  infoValidateEmail: InfoValidateEmailRequestFunction;
537
548
  infoGetCache: InfoGetCacheRequestFunction;
@@ -619,6 +630,7 @@ export interface OperationRequestFunctionMap {
619
630
  putLead: PutLeadRequestFunction;
620
631
  deleteLead: DeleteLeadRequestFunction;
621
632
  quoteLead: QuoteLeadRequestFunction;
633
+ sendLeadJob: SendLeadJobRequestFunction;
622
634
  tradeLead: TradeLeadRequestFunction;
623
635
  tradeQuoteApprovalLead: TradeQuoteApprovalLeadRequestFunction;
624
636
  matchTradesLead: MatchTradesLeadRequestFunction;
@@ -686,6 +698,10 @@ export const requestFunctionsBuilder = (
686
698
  operations.infoLegacyRedirect,
687
699
  requestAdapter
688
700
  ),
701
+ infoCheckoutRedirect: requestFunctionBuilder(
702
+ operations.infoCheckoutRedirect,
703
+ requestAdapter
704
+ ),
689
705
  infoIP: requestFunctionBuilder(operations.infoIP, requestAdapter),
690
706
  infoValidateEmail: requestFunctionBuilder(
691
707
  operations.infoValidateEmail,
@@ -872,6 +888,7 @@ export const requestFunctionsBuilder = (
872
888
  putLead: requestFunctionBuilder(operations.putLead, requestAdapter),
873
889
  deleteLead: requestFunctionBuilder(operations.deleteLead, requestAdapter),
874
890
  quoteLead: requestFunctionBuilder(operations.quoteLead, requestAdapter),
891
+ sendLeadJob: requestFunctionBuilder(operations.sendLeadJob, requestAdapter),
875
892
  tradeLead: requestFunctionBuilder(operations.tradeLead, requestAdapter),
876
893
  tradeQuoteApprovalLead: requestFunctionBuilder(
877
894
  operations.tradeQuoteApprovalLead,
@@ -1068,6 +1085,7 @@ export const infoRedirectServiceBuilder = (
1068
1085
  requestFunctions: OperationRequestFunctionMap
1069
1086
  ) => ({
1070
1087
  infoLegacyRedirect: requestFunctions.infoLegacyRedirect,
1088
+ infoCheckoutRedirect: requestFunctions.infoCheckoutRedirect,
1071
1089
  });
1072
1090
 
1073
1091
  export const infoIPServiceBuilder = (
@@ -1195,6 +1213,7 @@ export const leadServiceBuilder = (
1195
1213
  putLead: requestFunctions.putLead,
1196
1214
  deleteLead: requestFunctions.deleteLead,
1197
1215
  quoteLead: requestFunctions.quoteLead,
1216
+ sendLeadJob: requestFunctions.sendLeadJob,
1198
1217
  tradeLead: requestFunctions.tradeLead,
1199
1218
  tradeQuoteApprovalLead: requestFunctions.tradeQuoteApprovalLead,
1200
1219
  matchTradesLead: requestFunctions.matchTradesLead,
@@ -1265,6 +1284,7 @@ export interface Operations {
1265
1284
  infoClaimAccount: typeof infoClaimAccountOperation;
1266
1285
  infoRate: typeof infoRateOperation;
1267
1286
  infoLegacyRedirect: typeof infoLegacyRedirectOperation;
1287
+ infoCheckoutRedirect: typeof infoCheckoutRedirectOperation;
1268
1288
  infoIP: typeof infoIPOperation;
1269
1289
  infoValidateEmail: typeof infoValidateEmailOperation;
1270
1290
  infoGetCache: typeof infoGetCacheOperation;
@@ -1352,6 +1372,7 @@ export interface Operations {
1352
1372
  putLead: typeof putLeadOperation;
1353
1373
  deleteLead: typeof deleteLeadOperation;
1354
1374
  quoteLead: typeof quoteLeadOperation;
1375
+ sendLeadJob: typeof sendLeadJobOperation;
1355
1376
  tradeLead: typeof tradeLeadOperation;
1356
1377
  tradeQuoteApprovalLead: typeof tradeQuoteApprovalLeadOperation;
1357
1378
  matchTradesLead: typeof matchTradesLeadOperation;
@@ -0,0 +1,24 @@
1
+ import type { RequestFunction } from "@openapi-io-ts/runtime";
2
+ import * as schemas from "../components/schemas";
3
+
4
+ export const infoCheckoutRedirectOperation = {
5
+ path: "/api/info/checkout-redirect",
6
+ method: "put",
7
+ responses: {
8
+ "200": { _tag: "JsonResponse", decoder: schemas.InfoLegacyRedirect },
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 InfoCheckoutRedirectRequestFunction = RequestFunction<
22
+ { body: schemas.InfoCheckoutRedirect },
23
+ schemas.InfoLegacyRedirect
24
+ >;
@@ -0,0 +1,38 @@
1
+ import type { RequestFunction } from "@openapi-io-ts/runtime";
2
+ import * as parameters from "../components/parameters";
3
+ import * as schemas from "../components/schemas";
4
+
5
+ export type SendLeadJobRequestParameters = {
6
+ id: string;
7
+ x_kanda_bid?: string;
8
+ x_kanda_cid?: string;
9
+ x_kanda_eid?: string;
10
+ x_kanda_tid?: string;
11
+ };
12
+
13
+ export const sendLeadJobOperation = {
14
+ path: "/api/lead/{id}/send-job",
15
+ method: "post",
16
+ responses: {
17
+ "200": { _tag: "JsonResponse", decoder: schemas.Lead },
18
+ default: { _tag: "JsonResponse", decoder: schemas.Error },
19
+ },
20
+ parameters: [
21
+ {
22
+ _tag: "FormParameter",
23
+ explode: false,
24
+ in: "path",
25
+ name: "id",
26
+ },
27
+ parameters.x_kanda_bid,
28
+ parameters.x_kanda_cid,
29
+ parameters.x_kanda_eid,
30
+ parameters.x_kanda_tid,
31
+ ],
32
+ requestDefaultHeaders: { Accept: "application/json" },
33
+ } as const;
34
+
35
+ export type SendLeadJobRequestFunction = RequestFunction<
36
+ { params: SendLeadJobRequestParameters },
37
+ schemas.Lead
38
+ >;