@kanda-libs/ks-component-ts 0.2.475 → 0.2.476

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.475",
3
+ "version": "0.2.476",
4
4
  "description": "Kanda form component library",
5
5
  "main": "dist/index.esm.js",
6
6
  "module": "dist/index.esm.js",
@@ -0,0 +1,32 @@
1
+ import * as t from "io-ts";
2
+ import { Metadata } from "./Metadata";
3
+
4
+ export const InfoRelation = t.intersection([
5
+ t.type({
6
+ groups: t.array(t.string),
7
+ departments: t.array(t.string),
8
+ branches: t.array(t.string),
9
+ }),
10
+ t.partial({
11
+ id: t.string,
12
+ cid: t.string,
13
+ aid: t.string,
14
+ oid: t.string,
15
+ eid: t.string,
16
+ bid: t.string,
17
+ metadata: Metadata,
18
+ }),
19
+ ]);
20
+
21
+ export interface InfoRelation {
22
+ id?: string;
23
+ cid?: string;
24
+ aid?: string;
25
+ oid?: string;
26
+ eid?: string;
27
+ bid?: string;
28
+ groups: Array<string>;
29
+ departments: Array<string>;
30
+ branches: Array<string>;
31
+ metadata?: Metadata;
32
+ }
@@ -64,6 +64,7 @@ export * from "./InfoMe";
64
64
  export * from "./InfoOnboarding";
65
65
  export * from "./InfoPartnerBranding";
66
66
  export * from "./InfoQuery";
67
+ export * from "./InfoRelation";
67
68
  export * from "./InfoSearch";
68
69
  export * from "./InfoSession";
69
70
  export * from "./InfoStats";
@@ -289,6 +289,10 @@ import {
289
289
  } from "./infoPutCache";
290
290
  import { infoQueryOperation, InfoQueryRequestFunction } from "./infoQuery";
291
291
  import { infoRateOperation, InfoRateRequestFunction } from "./infoRate";
292
+ import {
293
+ infoRelationOperation,
294
+ InfoRelationRequestFunction,
295
+ } from "./infoRelation";
292
296
  import { infoSearchOperation, InfoSearchRequestFunction } from "./infoSearch";
293
297
  import {
294
298
  infoSessionOperation,
@@ -585,6 +589,7 @@ export const operations: Operations = {
585
589
  infoPartnerBranding: infoPartnerBrandingOperation,
586
590
  infoEnterprise: infoEnterpriseOperation,
587
591
  infoEnterpriseRole: infoEnterpriseRoleOperation,
592
+ infoRelation: infoRelationOperation,
588
593
  infoLead: infoLeadOperation,
589
594
  infoStats: infoStatsOperation,
590
595
  putInfoStats: putInfoStatsOperation,
@@ -769,6 +774,7 @@ export interface OperationRequestFunctionMap {
769
774
  infoPartnerBranding: InfoPartnerBrandingRequestFunction;
770
775
  infoEnterprise: InfoEnterpriseRequestFunction;
771
776
  infoEnterpriseRole: InfoEnterpriseRoleRequestFunction;
777
+ infoRelation: InfoRelationRequestFunction;
772
778
  infoLead: InfoLeadRequestFunction;
773
779
  infoStats: InfoStatsRequestFunction;
774
780
  putInfoStats: PutInfoStatsRequestFunction;
@@ -991,6 +997,7 @@ export const requestFunctionsBuilder = (
991
997
  operations.infoEnterpriseRole,
992
998
  requestAdapter
993
999
  ),
1000
+ infoRelation: requestFunctionBuilder(operations.infoRelation, requestAdapter),
994
1001
  infoLead: requestFunctionBuilder(operations.infoLead, requestAdapter),
995
1002
  infoStats: requestFunctionBuilder(operations.infoStats, requestAdapter),
996
1003
  putInfoStats: requestFunctionBuilder(operations.putInfoStats, requestAdapter),
@@ -1557,6 +1564,12 @@ export const infoEnterpriseRoleServiceBuilder = (
1557
1564
  infoEnterpriseRole: requestFunctions.infoEnterpriseRole,
1558
1565
  });
1559
1566
 
1567
+ export const infoRelationServiceBuilder = (
1568
+ requestFunctions: OperationRequestFunctionMap
1569
+ ) => ({
1570
+ infoRelation: requestFunctions.infoRelation,
1571
+ });
1572
+
1560
1573
  export const infoLeadServiceBuilder = (
1561
1574
  requestFunctions: OperationRequestFunctionMap
1562
1575
  ) => ({
@@ -1793,6 +1806,7 @@ export interface Operations {
1793
1806
  infoPartnerBranding: typeof infoPartnerBrandingOperation;
1794
1807
  infoEnterprise: typeof infoEnterpriseOperation;
1795
1808
  infoEnterpriseRole: typeof infoEnterpriseRoleOperation;
1809
+ infoRelation: typeof infoRelationOperation;
1796
1810
  infoLead: typeof infoLeadOperation;
1797
1811
  infoStats: typeof infoStatsOperation;
1798
1812
  putInfoStats: typeof putInfoStatsOperation;
@@ -0,0 +1,24 @@
1
+ import type { RequestFunction } from "@openapi-io-ts/runtime";
2
+ import * as schemas from "../components/schemas";
3
+
4
+ export const infoRelationOperation = {
5
+ path: "/api/info/relation",
6
+ method: "put",
7
+ responses: {
8
+ "200": { _tag: "JsonResponse", decoder: schemas.InfoRelation },
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 InfoRelationRequestFunction = RequestFunction<
22
+ { body: schemas.InfoRelation },
23
+ schemas.InfoRelation
24
+ >;