@kanda-libs/ks-component-ts 0.3.43 → 0.3.45

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.43",
3
+ "version": "0.3.45",
4
4
  "description": "Kanda form component library",
5
5
  "main": "dist/index.esm.js",
6
6
  "module": "dist/index.esm.js",
@@ -0,0 +1,12 @@
1
+ import * as t from "io-ts";
2
+ import { Archived } from "./Archived";
3
+
4
+ export const ActionRemark = t.type({
5
+ archive: Archived,
6
+ remark: t.string,
7
+ });
8
+
9
+ export interface ActionRemark {
10
+ archive: Archived;
11
+ remark: string;
12
+ }
@@ -25,6 +25,7 @@ export const Introduction = t.intersection([
25
25
  bid: t.string,
26
26
  tid: t.string,
27
27
  archived: Archived,
28
+ remark: t.string,
28
29
  consumer_signature: ConsumerSignature,
29
30
  consumer_details: ApplicantDetails,
30
31
  budgets: Budgets,
@@ -50,6 +51,7 @@ export interface Introduction {
50
51
  bid?: string;
51
52
  tid?: string;
52
53
  archived?: Archived;
54
+ remark?: string;
53
55
  consumer: Customer;
54
56
  consumer_signature?: ConsumerSignature;
55
57
  consumer_details?: ApplicantDetails;
@@ -1,3 +1,4 @@
1
+ export * from "./ActionRemark";
1
2
  export * from "./ActionState";
2
3
  export * from "./Address";
3
4
  export * from "./Analytics";
@@ -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 ActionIntroductionRequestParameters = {
5
+ id: string;
6
+ };
7
+
8
+ export const actionIntroductionOperation = {
9
+ path: "/api/introduction/{id}/action",
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 ActionIntroductionRequestFunction = RequestFunction<
33
+ { params: ActionIntroductionRequestParameters; body: schemas.ActionRemark },
34
+ schemas.Introduction
35
+ >;
@@ -10,6 +10,10 @@ import {
10
10
  actionAdhocOperation,
11
11
  ActionAdhocRequestFunction,
12
12
  } from "./actionAdhoc";
13
+ import {
14
+ actionIntroductionOperation,
15
+ ActionIntroductionRequestFunction,
16
+ } from "./actionIntroduction";
13
17
  import {
14
18
  applyCreditOperation,
15
19
  ApplyCreditRequestFunction,
@@ -658,6 +662,7 @@ export const operations: Operations = {
658
662
  submitIntroductionState: submitIntroductionStateOperation,
659
663
  postIntroductionConvertJob: postIntroductionConvertJobOperation,
660
664
  postIntroductionNotification: postIntroductionNotificationOperation,
665
+ actionIntroduction: actionIntroductionOperation,
661
666
  getCompanies: getCompaniesOperation,
662
667
  postCompany: postCompanyOperation,
663
668
  getCompany: getCompanyOperation,
@@ -851,6 +856,7 @@ export interface OperationRequestFunctionMap {
851
856
  submitIntroductionState: SubmitIntroductionStateRequestFunction;
852
857
  postIntroductionConvertJob: PostIntroductionConvertJobRequestFunction;
853
858
  postIntroductionNotification: PostIntroductionNotificationRequestFunction;
859
+ actionIntroduction: ActionIntroductionRequestFunction;
854
860
  getCompanies: GetCompaniesRequestFunction;
855
861
  postCompany: PostCompanyRequestFunction;
856
862
  getCompany: GetCompanyRequestFunction;
@@ -1190,6 +1196,10 @@ export const requestFunctionsBuilder = (
1190
1196
  operations.postIntroductionNotification,
1191
1197
  requestAdapter
1192
1198
  ),
1199
+ actionIntroduction: requestFunctionBuilder(
1200
+ operations.actionIntroduction,
1201
+ requestAdapter
1202
+ ),
1193
1203
  getCompanies: requestFunctionBuilder(operations.getCompanies, requestAdapter),
1194
1204
  postCompany: requestFunctionBuilder(operations.postCompany, requestAdapter),
1195
1205
  getCompany: requestFunctionBuilder(operations.getCompany, requestAdapter),
@@ -1718,6 +1728,7 @@ export const introductionServiceBuilder = (
1718
1728
  submitIntroductionState: requestFunctions.submitIntroductionState,
1719
1729
  postIntroductionConvertJob: requestFunctions.postIntroductionConvertJob,
1720
1730
  postIntroductionNotification: requestFunctions.postIntroductionNotification,
1731
+ actionIntroduction: requestFunctions.actionIntroduction,
1721
1732
  });
1722
1733
 
1723
1734
  export const companyServiceBuilder = (
@@ -1936,6 +1947,7 @@ export interface Operations {
1936
1947
  submitIntroductionState: typeof submitIntroductionStateOperation;
1937
1948
  postIntroductionConvertJob: typeof postIntroductionConvertJobOperation;
1938
1949
  postIntroductionNotification: typeof postIntroductionNotificationOperation;
1950
+ actionIntroduction: typeof actionIntroductionOperation;
1939
1951
  getCompanies: typeof getCompaniesOperation;
1940
1952
  postCompany: typeof postCompanyOperation;
1941
1953
  getCompany: typeof getCompanyOperation;