@kanda-libs/ks-component-ts 0.3.3 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanda-libs/ks-component-ts",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Kanda form component library",
5
5
  "main": "dist/index.esm.js",
6
6
  "module": "dist/index.esm.js",
@@ -10,9 +10,11 @@ export const IntroductionState = t.union([
10
10
  t.literal("consumer_is_accepted"),
11
11
  t.literal("consumer_is_declined"),
12
12
  t.literal("job_details_provided"),
13
+ t.literal("job_details_amended"),
13
14
  t.literal("trader_sent"),
14
15
  t.literal("trader_viewed"),
15
16
  t.literal("trader_agreed"),
17
+ t.literal("trader_agreed_amended"),
16
18
  t.literal("trader_contact_provided"),
17
19
  t.literal("trader_details_provided"),
18
20
  t.literal("trader_rejected"),
@@ -32,9 +34,11 @@ export type IntroductionState =
32
34
  | "consumer_is_accepted"
33
35
  | "consumer_is_declined"
34
36
  | "job_details_provided"
37
+ | "job_details_amended"
35
38
  | "trader_sent"
36
39
  | "trader_viewed"
37
40
  | "trader_agreed"
41
+ | "trader_agreed_amended"
38
42
  | "trader_contact_provided"
39
43
  | "trader_details_provided"
40
44
  | "trader_rejected"
@@ -9,6 +9,7 @@ import { FinanceStatus } from "./FinanceStatus";
9
9
  import { FlowType } from "./FlowType";
10
10
  import { JobItem } from "./JobItem";
11
11
  import { Metadata } from "./Metadata";
12
+ import { Metarefs } from "./Metarefs";
12
13
  import { Money } from "./Money";
13
14
  import { MoneyTotal } from "./MoneyTotal";
14
15
  import { Payment } from "./Payment";
@@ -64,6 +65,7 @@ export const Job = t.intersection([
64
65
  xid: t.string,
65
66
  xref: t.string,
66
67
  redirect_urls: RedirectURLs,
68
+ metarefs: Metarefs,
67
69
  metadata: Metadata,
68
70
  }),
69
71
  ]);
@@ -102,5 +104,6 @@ export interface Job {
102
104
  xid?: string;
103
105
  xref?: string;
104
106
  redirect_urls?: RedirectURLs;
107
+ metarefs?: Metarefs;
105
108
  metadata?: Metadata;
106
109
  }
@@ -1,5 +1,6 @@
1
1
  import * as t from "io-ts";
2
2
  import { JobItem } from "./JobItem";
3
+ import { Metarefs } from "./Metarefs";
3
4
  import { MoneyTotal } from "./MoneyTotal";
4
5
 
5
6
  export const JobDetails = t.intersection([
@@ -9,12 +10,14 @@ export const JobDetails = t.intersection([
9
10
  items: t.array(JobItem),
10
11
  }),
11
12
  t.partial({
13
+ metarefs: Metarefs,
12
14
  total: MoneyTotal,
13
15
  }),
14
16
  ]);
15
17
 
16
18
  export interface JobDetails {
17
19
  reference: string;
20
+ metarefs?: Metarefs;
18
21
  description: string;
19
22
  items: Array<JobItem>;
20
23
  total?: MoneyTotal;
@@ -0,0 +1,9 @@
1
+ import * as t from "io-ts";
2
+
3
+ export const Metarefs = t.type({
4
+ references: t.array(t.string),
5
+ });
6
+
7
+ export interface Metarefs {
8
+ references: Array<string>;
9
+ }
@@ -95,6 +95,7 @@ export * from "./LenderImport";
95
95
  export * from "./LenderRateType";
96
96
  export * from "./LimitedCompanyInfo";
97
97
  export * from "./Metadata";
98
+ export * from "./Metarefs";
98
99
  export * from "./Money";
99
100
  export * from "./MoneyTotal";
100
101
  export * from "./Monitor";
@@ -385,6 +385,10 @@ import {
385
385
  postIntroductionOperation,
386
386
  PostIntroductionRequestFunction,
387
387
  } from "./postIntroduction";
388
+ import {
389
+ postIntroductionAmendJobDetailsOperation,
390
+ PostIntroductionAmendJobDetailsRequestFunction,
391
+ } from "./postIntroductionAmendJobDetails";
388
392
  import {
389
393
  postIntroductionConsumerApplyOperation,
390
394
  PostIntroductionConsumerApplyRequestFunction,
@@ -421,6 +425,10 @@ import {
421
425
  postIntroductionTraderOperation,
422
426
  PostIntroductionTraderRequestFunction,
423
427
  } from "./postIntroductionTrader";
428
+ import {
429
+ postIntroductionTraderApproveAmendedOperation,
430
+ PostIntroductionTraderApproveAmendedRequestFunction,
431
+ } from "./postIntroductionTraderApproveAmended";
424
432
  import {
425
433
  postIntroductionTraderDetailsOperation,
426
434
  PostIntroductionTraderDetailsRequestFunction,
@@ -625,8 +633,11 @@ export const operations: Operations = {
625
633
  postIntroductionConsumerBudgets: postIntroductionConsumerBudgetsOperation,
626
634
  postIntroductionConsumerApply: postIntroductionConsumerApplyOperation,
627
635
  postIntroductionJobDetails: postIntroductionJobDetailsOperation,
636
+ postIntroductionAmendJobDetails: postIntroductionAmendJobDetailsOperation,
628
637
  postIntroductionTrader: postIntroductionTraderOperation,
629
638
  postIntroductionTraderSignature: postIntroductionTraderSignatureOperation,
639
+ postIntroductionTraderApproveAmended:
640
+ postIntroductionTraderApproveAmendedOperation,
630
641
  postIntroductionTraderDetails: postIntroductionTraderDetailsOperation,
631
642
  postIntroductionRejectJob: postIntroductionRejectJobOperation,
632
643
  submitIntroductionState: submitIntroductionStateOperation,
@@ -813,8 +824,10 @@ export interface OperationRequestFunctionMap {
813
824
  postIntroductionConsumerBudgets: PostIntroductionConsumerBudgetsRequestFunction;
814
825
  postIntroductionConsumerApply: PostIntroductionConsumerApplyRequestFunction;
815
826
  postIntroductionJobDetails: PostIntroductionJobDetailsRequestFunction;
827
+ postIntroductionAmendJobDetails: PostIntroductionAmendJobDetailsRequestFunction;
816
828
  postIntroductionTrader: PostIntroductionTraderRequestFunction;
817
829
  postIntroductionTraderSignature: PostIntroductionTraderSignatureRequestFunction;
830
+ postIntroductionTraderApproveAmended: PostIntroductionTraderApproveAmendedRequestFunction;
818
831
  postIntroductionTraderDetails: PostIntroductionTraderDetailsRequestFunction;
819
832
  postIntroductionRejectJob: PostIntroductionRejectJobRequestFunction;
820
833
  submitIntroductionState: SubmitIntroductionStateRequestFunction;
@@ -1114,6 +1127,10 @@ export const requestFunctionsBuilder = (
1114
1127
  operations.postIntroductionJobDetails,
1115
1128
  requestAdapter
1116
1129
  ),
1130
+ postIntroductionAmendJobDetails: requestFunctionBuilder(
1131
+ operations.postIntroductionAmendJobDetails,
1132
+ requestAdapter
1133
+ ),
1117
1134
  postIntroductionTrader: requestFunctionBuilder(
1118
1135
  operations.postIntroductionTrader,
1119
1136
  requestAdapter
@@ -1122,6 +1139,10 @@ export const requestFunctionsBuilder = (
1122
1139
  operations.postIntroductionTraderSignature,
1123
1140
  requestAdapter
1124
1141
  ),
1142
+ postIntroductionTraderApproveAmended: requestFunctionBuilder(
1143
+ operations.postIntroductionTraderApproveAmended,
1144
+ requestAdapter
1145
+ ),
1125
1146
  postIntroductionTraderDetails: requestFunctionBuilder(
1126
1147
  operations.postIntroductionTraderDetails,
1127
1148
  requestAdapter
@@ -1645,9 +1666,13 @@ export const introductionServiceBuilder = (
1645
1666
  requestFunctions.postIntroductionConsumerBudgets,
1646
1667
  postIntroductionConsumerApply: requestFunctions.postIntroductionConsumerApply,
1647
1668
  postIntroductionJobDetails: requestFunctions.postIntroductionJobDetails,
1669
+ postIntroductionAmendJobDetails:
1670
+ requestFunctions.postIntroductionAmendJobDetails,
1648
1671
  postIntroductionTrader: requestFunctions.postIntroductionTrader,
1649
1672
  postIntroductionTraderSignature:
1650
1673
  requestFunctions.postIntroductionTraderSignature,
1674
+ postIntroductionTraderApproveAmended:
1675
+ requestFunctions.postIntroductionTraderApproveAmended,
1651
1676
  postIntroductionTraderDetails: requestFunctions.postIntroductionTraderDetails,
1652
1677
  postIntroductionRejectJob: requestFunctions.postIntroductionRejectJob,
1653
1678
  submitIntroductionState: requestFunctions.submitIntroductionState,
@@ -1859,8 +1884,10 @@ export interface Operations {
1859
1884
  postIntroductionConsumerBudgets: typeof postIntroductionConsumerBudgetsOperation;
1860
1885
  postIntroductionConsumerApply: typeof postIntroductionConsumerApplyOperation;
1861
1886
  postIntroductionJobDetails: typeof postIntroductionJobDetailsOperation;
1887
+ postIntroductionAmendJobDetails: typeof postIntroductionAmendJobDetailsOperation;
1862
1888
  postIntroductionTrader: typeof postIntroductionTraderOperation;
1863
1889
  postIntroductionTraderSignature: typeof postIntroductionTraderSignatureOperation;
1890
+ postIntroductionTraderApproveAmended: typeof postIntroductionTraderApproveAmendedOperation;
1864
1891
  postIntroductionTraderDetails: typeof postIntroductionTraderDetailsOperation;
1865
1892
  postIntroductionRejectJob: typeof postIntroductionRejectJobOperation;
1866
1893
  submitIntroductionState: typeof submitIntroductionStateOperation;
@@ -0,0 +1,38 @@
1
+ import type { RequestFunction } from "@openapi-io-ts/runtime";
2
+ import * as schemas from "../components/schemas";
3
+
4
+ export type PostIntroductionAmendJobDetailsRequestParameters = {
5
+ id: string;
6
+ };
7
+
8
+ export const postIntroductionAmendJobDetailsOperation = {
9
+ path: "/api/introduction/{id}/amend-job-details",
10
+ method: "post",
11
+ responses: {
12
+ "200": { _tag: "JsonResponse", decoder: schemas.Introduction },
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 PostIntroductionAmendJobDetailsRequestFunction = RequestFunction<
33
+ {
34
+ params: PostIntroductionAmendJobDetailsRequestParameters;
35
+ body: schemas.JobDetails;
36
+ },
37
+ schemas.Introduction
38
+ >;
@@ -0,0 +1,39 @@
1
+ import type { RequestFunction } from "@openapi-io-ts/runtime";
2
+ import * as schemas from "../components/schemas";
3
+
4
+ export type PostIntroductionTraderApproveAmendedRequestParameters = {
5
+ id: string;
6
+ };
7
+
8
+ export const postIntroductionTraderApproveAmendedOperation = {
9
+ path: "/api/introduction/{id}/trader-approve-amended",
10
+ method: "post",
11
+ responses: {
12
+ "200": { _tag: "JsonResponse", decoder: schemas.Introduction },
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 PostIntroductionTraderApproveAmendedRequestFunction =
33
+ RequestFunction<
34
+ {
35
+ params: PostIntroductionTraderApproveAmendedRequestParameters;
36
+ body: schemas.Signature;
37
+ },
38
+ schemas.Introduction
39
+ >;