@kanda-libs/ks-component-ts 0.3.36 → 0.3.38

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.36",
3
+ "version": "0.3.38",
4
4
  "description": "Kanda form component library",
5
5
  "main": "dist/index.esm.js",
6
6
  "module": "dist/index.esm.js",
@@ -0,0 +1,9 @@
1
+ import * as t from "io-ts";
2
+
3
+ export const InfoIntroductionStats = t.type({
4
+ report: t.UnknownRecord,
5
+ });
6
+
7
+ export interface InfoIntroductionStats {
8
+ report: Record<string, unknown>;
9
+ }
@@ -0,0 +1,30 @@
1
+ import * as t from "io-ts";
2
+ import { Pence } from "./Pence";
3
+
4
+ export const IntroductionStats = t.type({
5
+ branch_code: t.string,
6
+ introductions_sent: Pence,
7
+ introductions_completed: Pence,
8
+ order_details_added: Pence,
9
+ tradesperson_approved: Pence,
10
+ finance_applications: Pence,
11
+ approve_applications: Pence,
12
+ potential_revenue: Pence,
13
+ total_revenue: Pence,
14
+ average_order_value: Pence,
15
+ approval_rate: Pence,
16
+ });
17
+
18
+ export interface IntroductionStats {
19
+ branch_code: string;
20
+ introductions_sent: Pence;
21
+ introductions_completed: Pence;
22
+ order_details_added: Pence;
23
+ tradesperson_approved: Pence;
24
+ finance_applications: Pence;
25
+ approve_applications: Pence;
26
+ potential_revenue: Pence;
27
+ total_revenue: Pence;
28
+ average_order_value: Pence;
29
+ approval_rate: Pence;
30
+ }
@@ -66,6 +66,7 @@ export * from "./InfoCheckoutRedirect";
66
66
  export * from "./InfoCompany";
67
67
  export * from "./InfoEntity";
68
68
  export * from "./InfoGhost";
69
+ export * from "./InfoIntroductionStats";
69
70
  export * from "./InfoIP";
70
71
  export * from "./InfoLead";
71
72
  export * from "./InfoLegacyRedirect";
@@ -82,6 +83,7 @@ export * from "./InfoValidationEmail";
82
83
  export * from "./Introduction";
83
84
  export * from "./IntroductionState";
84
85
  export * from "./IntroductionStateRequest";
86
+ export * from "./IntroductionStats";
85
87
  export * from "./Job";
86
88
  export * from "./JobCompanyInfo";
87
89
  export * from "./JobCreditState";
@@ -275,6 +275,10 @@ import {
275
275
  } from "./infoGetCache";
276
276
  import { infoGhostOperation, InfoGhostRequestFunction } from "./infoGhost";
277
277
  import { infoHealthOperation, InfoHealthRequestFunction } from "./infoHealth";
278
+ import {
279
+ infoIntroductionStatsOperation,
280
+ InfoIntroductionStatsRequestFunction,
281
+ } from "./infoIntroductionStats";
278
282
  import { infoIPOperation, InfoIPRequestFunction } from "./infoIP";
279
283
  import { infoLeadOperation, InfoLeadRequestFunction } from "./infoLead";
280
284
  import {
@@ -613,6 +617,7 @@ export const operations: Operations = {
613
617
  infoLead: infoLeadOperation,
614
618
  infoStats: infoStatsOperation,
615
619
  putInfoStats: putInfoStatsOperation,
620
+ infoIntroductionStats: infoIntroductionStatsOperation,
616
621
  getPartners: getPartnersOperation,
617
622
  postPartner: postPartnerOperation,
618
623
  getPartner: getPartnerOperation,
@@ -806,6 +811,7 @@ export interface OperationRequestFunctionMap {
806
811
  infoLead: InfoLeadRequestFunction;
807
812
  infoStats: InfoStatsRequestFunction;
808
813
  putInfoStats: PutInfoStatsRequestFunction;
814
+ infoIntroductionStats: InfoIntroductionStatsRequestFunction;
809
815
  getPartners: GetPartnersRequestFunction;
810
816
  postPartner: PostPartnerRequestFunction;
811
817
  getPartner: GetPartnerRequestFunction;
@@ -1036,6 +1042,10 @@ export const requestFunctionsBuilder = (
1036
1042
  infoLead: requestFunctionBuilder(operations.infoLead, requestAdapter),
1037
1043
  infoStats: requestFunctionBuilder(operations.infoStats, requestAdapter),
1038
1044
  putInfoStats: requestFunctionBuilder(operations.putInfoStats, requestAdapter),
1045
+ infoIntroductionStats: requestFunctionBuilder(
1046
+ operations.infoIntroductionStats,
1047
+ requestAdapter
1048
+ ),
1039
1049
  getPartners: requestFunctionBuilder(operations.getPartners, requestAdapter),
1040
1050
  postPartner: requestFunctionBuilder(operations.postPartner, requestAdapter),
1041
1051
  getPartner: requestFunctionBuilder(operations.getPartner, requestAdapter),
@@ -1639,6 +1649,12 @@ export const infoStatsServiceBuilder = (
1639
1649
  putInfoStats: requestFunctions.putInfoStats,
1640
1650
  });
1641
1651
 
1652
+ export const infoIntroductionStatsServiceBuilder = (
1653
+ requestFunctions: OperationRequestFunctionMap
1654
+ ) => ({
1655
+ infoIntroductionStats: requestFunctions.infoIntroductionStats,
1656
+ });
1657
+
1642
1658
  export const partnerServiceBuilder = (
1643
1659
  requestFunctions: OperationRequestFunctionMap
1644
1660
  ) => ({
@@ -1880,6 +1896,7 @@ export interface Operations {
1880
1896
  infoLead: typeof infoLeadOperation;
1881
1897
  infoStats: typeof infoStatsOperation;
1882
1898
  putInfoStats: typeof putInfoStatsOperation;
1899
+ infoIntroductionStats: typeof infoIntroductionStatsOperation;
1883
1900
  getPartners: typeof getPartnersOperation;
1884
1901
  postPartner: typeof postPartnerOperation;
1885
1902
  getPartner: typeof getPartnerOperation;
@@ -0,0 +1,24 @@
1
+ import type { RequestFunction } from "@openapi-io-ts/runtime";
2
+ import * as parameters from "../components/parameters";
3
+ import * as schemas from "../components/schemas";
4
+
5
+ export type InfoIntroductionStatsRequestParameters = {
6
+ format?: "reduced" | "full";
7
+ q?: string;
8
+ };
9
+
10
+ export const infoIntroductionStatsOperation = {
11
+ path: "/api/info/introduction-stats",
12
+ method: "get",
13
+ responses: {
14
+ "200": { _tag: "JsonResponse", decoder: schemas.InfoIntroductionStats },
15
+ default: { _tag: "JsonResponse", decoder: schemas.Error },
16
+ },
17
+ parameters: [parameters.format, parameters.q],
18
+ requestDefaultHeaders: { Accept: "application/json" },
19
+ } as const;
20
+
21
+ export type InfoIntroductionStatsRequestFunction = RequestFunction<
22
+ { params: InfoIntroductionStatsRequestParameters },
23
+ schemas.InfoIntroductionStats
24
+ >;