@kanda-libs/ks-component-ts 0.2.272 → 0.2.273

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.272",
3
+ "version": "0.2.273",
4
4
  "description": "Kanda form component library",
5
5
  "main": "dist/index.esm.js",
6
6
  "module": "dist/index.esm.js",
@@ -0,0 +1,18 @@
1
+ import * as t from "io-ts";
2
+ import { WorkType } from "./WorkType";
3
+
4
+ export const TradeFilter = t.intersection([
5
+ t.type({
6
+ distance: t.number,
7
+ }),
8
+ t.partial({
9
+ work_types: t.array(WorkType),
10
+ keyword: t.string,
11
+ }),
12
+ ]);
13
+
14
+ export interface TradeFilter {
15
+ distance: number;
16
+ work_types?: Array<WorkType>;
17
+ keyword?: string;
18
+ }
@@ -94,6 +94,7 @@ export * from "./SoleTraderInfo";
94
94
  export * from "./Subscription";
95
95
  export * from "./Tally";
96
96
  export * from "./Title";
97
+ export * from "./TradeFilter";
97
98
  export * from "./TradeSummary";
98
99
  export * from "./UserEvent";
99
100
  export * from "./UserType";
@@ -30,10 +30,16 @@ export const matchTradesLeadOperation = {
30
30
  parameters.x_kanda_eid,
31
31
  parameters.x_kanda_tid,
32
32
  ],
33
- requestDefaultHeaders: { Accept: "application/json" },
33
+ requestDefaultHeaders: {
34
+ "Content-Type": "application/json",
35
+ Accept: "application/json",
36
+ },
37
+ body: {
38
+ _tag: "JsonBody",
39
+ },
34
40
  } as const;
35
41
 
36
42
  export type MatchTradesLeadRequestFunction = RequestFunction<
37
- { params: MatchTradesLeadRequestParameters },
43
+ { params: MatchTradesLeadRequestParameters; body: schemas.TradeFilter },
38
44
  Array<schemas.TradeSummary>
39
45
  >;
@@ -14,7 +14,7 @@ export const tradeQuoteApprovalLeadOperation = {
14
14
  path: "/api/lead/{id}/trade-quote-approval",
15
15
  method: "post",
16
16
  responses: {
17
- "200": { _tag: "JsonResponse", decoder: schemas.Lead },
17
+ "200": { _tag: "JsonResponse", decoder: schemas.Job },
18
18
  default: { _tag: "JsonResponse", decoder: schemas.Error },
19
19
  },
20
20
  parameters: [
@@ -34,5 +34,5 @@ export const tradeQuoteApprovalLeadOperation = {
34
34
 
35
35
  export type TradeQuoteApprovalLeadRequestFunction = RequestFunction<
36
36
  { params: TradeQuoteApprovalLeadRequestParameters },
37
- schemas.Lead
37
+ schemas.Job
38
38
  >;