@kanda-libs/ks-component-ts 0.2.199 → 0.2.201

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.199",
3
+ "version": "0.2.201",
4
4
  "description": "Kanda form component library",
5
5
  "main": "dist/index.esm.js",
6
6
  "module": "dist/index.esm.js",
@@ -0,0 +1,2 @@
1
+ export * from "./queryFilter";
2
+ export * from "./queryFormat";
@@ -0,0 +1,8 @@
1
+ import { OperationParameter } from "@openapi-io-ts/runtime";
2
+
3
+ export const queryFilter: OperationParameter = {
4
+ _tag: "FormParameter",
5
+ explode: true,
6
+ in: "query",
7
+ name: "q",
8
+ };
@@ -0,0 +1,8 @@
1
+ import { OperationParameter } from "@openapi-io-ts/runtime";
2
+
3
+ export const queryFormat: OperationParameter = {
4
+ _tag: "FormParameter",
5
+ explode: true,
6
+ in: "query",
7
+ name: "format",
8
+ };
@@ -14,6 +14,7 @@ export const Approval = t.intersection([
14
14
  t.literal("invalid_details"),
15
15
  t.literal("mismatched_details"),
16
16
  t.literal("investigation_required"),
17
+ t.literal("manual_review_required"),
17
18
  t.literal("not_approved"),
18
19
  ]),
19
20
  }),
@@ -32,6 +33,7 @@ export interface Approval {
32
33
  | "invalid_details"
33
34
  | "mismatched_details"
34
35
  | "investigation_required"
36
+ | "manual_review_required"
35
37
  | "not_approved";
36
38
  reason_note?: string;
37
39
  report_raw?: string;
@@ -0,0 +1,20 @@
1
+ import * as t from "io-ts";
2
+ import { Approval } from "./Approval";
3
+ import { Metadata } from "./Metadata";
4
+ import { OnboardingStage } from "./OnboardingStage";
5
+
6
+ export const InfoOnboarding = t.partial({
7
+ id: t.string,
8
+ cid: t.string,
9
+ current_stage: OnboardingStage,
10
+ current_approval: Approval,
11
+ metadata: Metadata,
12
+ });
13
+
14
+ export interface InfoOnboarding {
15
+ id?: string;
16
+ cid?: string;
17
+ current_stage?: OnboardingStage;
18
+ current_approval?: Approval;
19
+ metadata?: Metadata;
20
+ }
@@ -43,6 +43,7 @@ export * from "./InfoGhost";
43
43
  export * from "./InfoIP";
44
44
  export * from "./InfoLegacyRedirect";
45
45
  export * from "./InfoMe";
46
+ export * from "./InfoOnboarding";
46
47
  export * from "./InfoPartnerBranding";
47
48
  export * from "./InfoQuery";
48
49
  export * from "./InfoSession";
@@ -1,7 +1,13 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
2
  import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
3
4
  import * as schemas from "../components/schemas";
4
5
 
6
+ export type GetCompaniesRequestParameters = {
7
+ queryFormat?: "reduced" | "full";
8
+ queryFilter?: string;
9
+ };
10
+
5
11
  export const getCompaniesOperation = {
6
12
  path: "/api/company",
7
13
  method: "get",
@@ -9,11 +15,11 @@ export const getCompaniesOperation = {
9
15
  "200": { _tag: "JsonResponse", decoder: t.array(schemas.Company) },
10
16
  default: { _tag: "JsonResponse", decoder: schemas.Error },
11
17
  },
12
- parameters: [],
18
+ parameters: [parameters.queryFormat, parameters.queryFilter],
13
19
  requestDefaultHeaders: { Accept: "application/json" },
14
20
  } as const;
15
21
 
16
22
  export type GetCompaniesRequestFunction = RequestFunction<
17
- undefined,
23
+ { params: GetCompaniesRequestParameters },
18
24
  Array<schemas.Company>
19
25
  >;
@@ -1,7 +1,13 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
2
  import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
3
4
  import * as schemas from "../components/schemas";
4
5
 
6
+ export type GetCreditsRequestParameters = {
7
+ queryFormat?: "reduced" | "full";
8
+ queryFilter?: string;
9
+ };
10
+
5
11
  export const getCreditsOperation = {
6
12
  path: "/api/credit",
7
13
  method: "get",
@@ -9,11 +15,11 @@ export const getCreditsOperation = {
9
15
  "200": { _tag: "JsonResponse", decoder: t.array(schemas.Credit) },
10
16
  default: { _tag: "JsonResponse", decoder: schemas.Error },
11
17
  },
12
- parameters: [],
18
+ parameters: [parameters.queryFormat, parameters.queryFilter],
13
19
  requestDefaultHeaders: { Accept: "application/json" },
14
20
  } as const;
15
21
 
16
22
  export type GetCreditsRequestFunction = RequestFunction<
17
- undefined,
23
+ { params: GetCreditsRequestParameters },
18
24
  Array<schemas.Credit>
19
25
  >;
@@ -1,7 +1,13 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
2
  import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
3
4
  import * as schemas from "../components/schemas";
4
5
 
6
+ export type GetDocumentsRequestParameters = {
7
+ queryFormat?: "reduced" | "full";
8
+ queryFilter?: string;
9
+ };
10
+
5
11
  export const getDocumentsOperation = {
6
12
  path: "/api/document",
7
13
  method: "get",
@@ -9,11 +15,11 @@ export const getDocumentsOperation = {
9
15
  "200": { _tag: "JsonResponse", decoder: t.array(schemas.Document) },
10
16
  default: { _tag: "JsonResponse", decoder: schemas.Error },
11
17
  },
12
- parameters: [],
18
+ parameters: [parameters.queryFormat, parameters.queryFilter],
13
19
  requestDefaultHeaders: { Accept: "application/json" },
14
20
  } as const;
15
21
 
16
22
  export type GetDocumentsRequestFunction = RequestFunction<
17
- undefined,
23
+ { params: GetDocumentsRequestParameters },
18
24
  Array<schemas.Document>
19
25
  >;
@@ -1,7 +1,13 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
2
  import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
3
4
  import * as schemas from "../components/schemas";
4
5
 
6
+ export type GetJobsRequestParameters = {
7
+ queryFormat?: "reduced" | "full";
8
+ queryFilter?: string;
9
+ };
10
+
5
11
  export const getJobsOperation = {
6
12
  path: "/api/job",
7
13
  method: "get",
@@ -9,11 +15,11 @@ export const getJobsOperation = {
9
15
  "200": { _tag: "JsonResponse", decoder: t.array(schemas.Job) },
10
16
  default: { _tag: "JsonResponse", decoder: schemas.Error },
11
17
  },
12
- parameters: [],
18
+ parameters: [parameters.queryFormat, parameters.queryFilter],
13
19
  requestDefaultHeaders: { Accept: "application/json" },
14
20
  } as const;
15
21
 
16
22
  export type GetJobsRequestFunction = RequestFunction<
17
- undefined,
23
+ { params: GetJobsRequestParameters },
18
24
  Array<schemas.Job>
19
25
  >;
@@ -1,7 +1,13 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
2
  import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
3
4
  import * as schemas from "../components/schemas";
4
5
 
6
+ export type GetMonitorsRequestParameters = {
7
+ queryFormat?: "reduced" | "full";
8
+ queryFilter?: string;
9
+ };
10
+
5
11
  export const getMonitorsOperation = {
6
12
  path: "/api/monitor",
7
13
  method: "get",
@@ -9,11 +15,11 @@ export const getMonitorsOperation = {
9
15
  "200": { _tag: "JsonResponse", decoder: t.array(schemas.Monitor) },
10
16
  default: { _tag: "JsonResponse", decoder: schemas.Error },
11
17
  },
12
- parameters: [],
18
+ parameters: [parameters.queryFormat, parameters.queryFilter],
13
19
  requestDefaultHeaders: { Accept: "application/json" },
14
20
  } as const;
15
21
 
16
22
  export type GetMonitorsRequestFunction = RequestFunction<
17
- undefined,
23
+ { params: GetMonitorsRequestParameters },
18
24
  Array<schemas.Monitor>
19
25
  >;
@@ -1,7 +1,13 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
2
  import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
3
4
  import * as schemas from "../components/schemas";
4
5
 
6
+ export type GetOnboardingsRequestParameters = {
7
+ queryFormat?: "reduced" | "full";
8
+ queryFilter?: string;
9
+ };
10
+
5
11
  export const getOnboardingsOperation = {
6
12
  path: "/api/onboarding",
7
13
  method: "get",
@@ -9,11 +15,11 @@ export const getOnboardingsOperation = {
9
15
  "200": { _tag: "JsonResponse", decoder: t.array(schemas.Onboarding) },
10
16
  default: { _tag: "JsonResponse", decoder: schemas.Error },
11
17
  },
12
- parameters: [],
18
+ parameters: [parameters.queryFormat, parameters.queryFilter],
13
19
  requestDefaultHeaders: { Accept: "application/json" },
14
20
  } as const;
15
21
 
16
22
  export type GetOnboardingsRequestFunction = RequestFunction<
17
- undefined,
23
+ { params: GetOnboardingsRequestParameters },
18
24
  Array<schemas.Onboarding>
19
25
  >;
@@ -1,7 +1,13 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
2
  import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
3
4
  import * as schemas from "../components/schemas";
4
5
 
6
+ export type GetPartnersRequestParameters = {
7
+ queryFormat?: "reduced" | "full";
8
+ queryFilter?: string;
9
+ };
10
+
5
11
  export const getPartnersOperation = {
6
12
  path: "/api/partner",
7
13
  method: "get",
@@ -9,11 +15,11 @@ export const getPartnersOperation = {
9
15
  "200": { _tag: "JsonResponse", decoder: t.array(schemas.Partner) },
10
16
  default: { _tag: "JsonResponse", decoder: schemas.Error },
11
17
  },
12
- parameters: [],
18
+ parameters: [parameters.queryFormat, parameters.queryFilter],
13
19
  requestDefaultHeaders: { Accept: "application/json" },
14
20
  } as const;
15
21
 
16
22
  export type GetPartnersRequestFunction = RequestFunction<
17
- undefined,
23
+ { params: GetPartnersRequestParameters },
18
24
  Array<schemas.Partner>
19
25
  >;
@@ -1,7 +1,13 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
2
  import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
3
4
  import * as schemas from "../components/schemas";
4
5
 
6
+ export type GetPaymentsRequestParameters = {
7
+ queryFormat?: "reduced" | "full";
8
+ queryFilter?: string;
9
+ };
10
+
5
11
  export const getPaymentsOperation = {
6
12
  path: "/api/payment",
7
13
  method: "get",
@@ -9,11 +15,11 @@ export const getPaymentsOperation = {
9
15
  "200": { _tag: "JsonResponse", decoder: t.array(schemas.Payment) },
10
16
  default: { _tag: "JsonResponse", decoder: schemas.Error },
11
17
  },
12
- parameters: [],
18
+ parameters: [parameters.queryFormat, parameters.queryFilter],
13
19
  requestDefaultHeaders: { Accept: "application/json" },
14
20
  } as const;
15
21
 
16
22
  export type GetPaymentsRequestFunction = RequestFunction<
17
- undefined,
23
+ { params: GetPaymentsRequestParameters },
18
24
  Array<schemas.Payment>
19
25
  >;
@@ -1,7 +1,13 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
2
  import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
3
4
  import * as schemas from "../components/schemas";
4
5
 
6
+ export type GetRatesRequestParameters = {
7
+ queryFormat?: "reduced" | "full";
8
+ queryFilter?: string;
9
+ };
10
+
5
11
  export const getRatesOperation = {
6
12
  path: "/api/rate",
7
13
  method: "get",
@@ -9,11 +15,11 @@ export const getRatesOperation = {
9
15
  "200": { _tag: "JsonResponse", decoder: t.array(schemas.Rate) },
10
16
  default: { _tag: "JsonResponse", decoder: schemas.Error },
11
17
  },
12
- parameters: [],
18
+ parameters: [parameters.queryFormat, parameters.queryFilter],
13
19
  requestDefaultHeaders: { Accept: "application/json" },
14
20
  } as const;
15
21
 
16
22
  export type GetRatesRequestFunction = RequestFunction<
17
- undefined,
23
+ { params: GetRatesRequestParameters },
18
24
  Array<schemas.Rate>
19
25
  >;
@@ -1,7 +1,13 @@
1
1
  import type { RequestFunction } from "@openapi-io-ts/runtime";
2
2
  import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
3
4
  import * as schemas from "../components/schemas";
4
5
 
6
+ export type GetSubscriptionsRequestParameters = {
7
+ queryFormat?: "reduced" | "full";
8
+ queryFilter?: string;
9
+ };
10
+
5
11
  export const getSubscriptionsOperation = {
6
12
  path: "/api/subscription",
7
13
  method: "get",
@@ -9,11 +15,11 @@ export const getSubscriptionsOperation = {
9
15
  "200": { _tag: "JsonResponse", decoder: t.array(schemas.Subscription) },
10
16
  default: { _tag: "JsonResponse", decoder: schemas.Error },
11
17
  },
12
- parameters: [],
18
+ parameters: [parameters.queryFormat, parameters.queryFilter],
13
19
  requestDefaultHeaders: { Accept: "application/json" },
14
20
  } as const;
15
21
 
16
22
  export type GetSubscriptionsRequestFunction = RequestFunction<
17
- undefined,
23
+ { params: GetSubscriptionsRequestParameters },
18
24
  Array<schemas.Subscription>
19
25
  >;
@@ -158,6 +158,10 @@ import {
158
158
  infoLegacyRedirectOperation,
159
159
  InfoLegacyRedirectRequestFunction,
160
160
  } from "./infoLegacyRedirect";
161
+ import {
162
+ infoOnboardingOperation,
163
+ InfoOnboardingRequestFunction,
164
+ } from "./infoOnboarding";
161
165
  import {
162
166
  infoPartnerBrandingOperation,
163
167
  InfoPartnerBrandingRequestFunction,
@@ -312,6 +316,7 @@ export const operations = {
312
316
  infoGhost: infoGhostOperation,
313
317
  infoQuery: infoQueryOperation,
314
318
  infoCompany: infoCompanyOperation,
319
+ infoOnboarding: infoOnboardingOperation,
315
320
  infoDirector: infoDirectorOperation,
316
321
  infoCustomer: infoCustomerOperation,
317
322
  infoCredit: infoCreditOperation,
@@ -424,6 +429,7 @@ export interface OperationRequestFunctionMap {
424
429
  infoGhost: InfoGhostRequestFunction;
425
430
  infoQuery: InfoQueryRequestFunction;
426
431
  infoCompany: InfoCompanyRequestFunction;
432
+ infoOnboarding: InfoOnboardingRequestFunction;
427
433
  infoDirector: InfoDirectorRequestFunction;
428
434
  infoCustomer: InfoCustomerRequestFunction;
429
435
  infoCredit: InfoCreditRequestFunction;
@@ -538,6 +544,10 @@ export const requestFunctionsBuilder = (
538
544
  infoGhost: requestFunctionBuilder(operations.infoGhost, requestAdapter),
539
545
  infoQuery: requestFunctionBuilder(operations.infoQuery, requestAdapter),
540
546
  infoCompany: requestFunctionBuilder(operations.infoCompany, requestAdapter),
547
+ infoOnboarding: requestFunctionBuilder(
548
+ operations.infoOnboarding,
549
+ requestAdapter
550
+ ),
541
551
  infoDirector: requestFunctionBuilder(operations.infoDirector, requestAdapter),
542
552
  infoCustomer: requestFunctionBuilder(operations.infoCustomer, requestAdapter),
543
553
  infoCredit: requestFunctionBuilder(operations.infoCredit, requestAdapter),
@@ -785,6 +795,12 @@ export const infoCompanyServiceBuilder = (
785
795
  infoCompany: requestFunctions.infoCompany,
786
796
  });
787
797
 
798
+ export const infoOnboardingServiceBuilder = (
799
+ requestFunctions: OperationRequestFunctionMap
800
+ ) => ({
801
+ infoOnboarding: requestFunctions.infoOnboarding,
802
+ });
803
+
788
804
  export const infoDirectorServiceBuilder = (
789
805
  requestFunctions: OperationRequestFunctionMap
790
806
  ) => ({
@@ -0,0 +1,18 @@
1
+ import type { RequestFunction } from "@openapi-io-ts/runtime";
2
+ import * as schemas from "../components/schemas";
3
+
4
+ export const infoOnboardingOperation = {
5
+ path: "/api/info/onboarding",
6
+ method: "get",
7
+ responses: {
8
+ "200": { _tag: "JsonResponse", decoder: schemas.InfoOnboarding },
9
+ default: { _tag: "JsonResponse", decoder: schemas.Error },
10
+ },
11
+ parameters: [],
12
+ requestDefaultHeaders: { Accept: "application/json" },
13
+ } as const;
14
+
15
+ export type InfoOnboardingRequestFunction = RequestFunction<
16
+ undefined,
17
+ schemas.InfoOnboarding
18
+ >;