@kanda-libs/ks-component-ts 0.3.68 → 0.3.70

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.
Files changed (77) hide show
  1. package/.DS_Store +0 -0
  2. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/italic/GalanoGrotesqueBlackItalic.woff +0 -0
  3. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/italic/GalanoGrotesqueBoldItalic.woff +0 -0
  4. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/italic/GalanoGrotesqueExtraBoldItalic.woff +0 -0
  5. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/italic/GalanoGrotesqueExtraLightItalic.woff +0 -0
  6. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/italic/GalanoGrotesqueHeavyItalic.woff +0 -0
  7. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/italic/GalanoGrotesqueLightItalic.woff +0 -0
  8. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/italic/GalanoGrotesqueMediumItalic.woff +0 -0
  9. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/italic/GalanoGrotesqueRegularItalic.woff +0 -0
  10. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/italic/GalanoGrotesqueSemiBoldItalic.woff +0 -0
  11. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/italic/GalanoGrotesqueThinItalic.woff +0 -0
  12. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/regular/GalanoGrotesqueBlack.woff +0 -0
  13. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/regular/GalanoGrotesqueBold.woff +0 -0
  14. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/regular/GalanoGrotesqueExtraBold.woff +0 -0
  15. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/regular/GalanoGrotesqueExtraLight.woff +0 -0
  16. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/regular/GalanoGrotesqueHeavy.woff +0 -0
  17. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/regular/GalanoGrotesqueLight.woff +0 -0
  18. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/regular/GalanoGrotesqueMedium.woff +0 -0
  19. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/regular/GalanoGrotesqueRegular.woff +0 -0
  20. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/regular/GalanoGrotesqueSemiBold.woff +0 -0
  21. package/app/.yalc/@kanda-libs/ks-component-ts/dist/fonts/GalanoGrotesque/regular/GalanoGrotesqueThin.woff +0 -0
  22. package/app/.yalc/@kanda-libs/ks-component-ts/dist/index.esm.js +5 -0
  23. package/app/.yalc/@kanda-libs/ks-component-ts/dist/index.esm.js.map +7 -0
  24. package/app/.yalc/@kanda-libs/ks-component-ts/dist/library.css +4657 -0
  25. package/app/.yalc/@kanda-libs/ks-component-ts/package.json +97 -0
  26. package/app/.yalc/@kanda-libs/ks-component-ts/yalc.sig +1 -0
  27. package/app/yalc.lock +9 -0
  28. package/dist/index.d.ts +15180 -12900
  29. package/dist/index.esm.js +4 -4
  30. package/dist/index.esm.js.map +3 -3
  31. package/package.json +1 -1
  32. package/src/.DS_Store +0 -0
  33. package/src/field/.DS_Store +0 -0
  34. package/src/field/components/.DS_Store +0 -0
  35. package/src/generated/components/schemas/Company.ts +3 -0
  36. package/src/generated/components/schemas/CompanyTraining.ts +12 -0
  37. package/src/generated/components/schemas/Enquiry.ts +30 -0
  38. package/src/generated/components/schemas/EnquiryBody.ts +18 -0
  39. package/src/generated/components/schemas/EnquiryInfo.ts +29 -0
  40. package/src/generated/components/schemas/EnquiryState.ts +28 -0
  41. package/src/generated/components/schemas/EnquiryStateRequest.ts +10 -0
  42. package/src/generated/components/schemas/InfoEnquiry.ts +26 -0
  43. package/src/generated/components/schemas/InfoTag.ts +15 -0
  44. package/src/generated/components/schemas/InterestInCredit.ts +5 -0
  45. package/src/generated/components/schemas/InterestInCreditRequest.ts +10 -0
  46. package/src/generated/components/schemas/JobInfo.ts +20 -0
  47. package/src/generated/components/schemas/MaxBudget.ts +16 -0
  48. package/src/generated/components/schemas/PreferenceMap.ts +5 -0
  49. package/src/generated/components/schemas/Tag.ts +7 -0
  50. package/src/generated/components/schemas/TagBody.ts +17 -0
  51. package/src/generated/components/schemas/WorkType.ts +2 -0
  52. package/src/generated/components/schemas/index.ts +15 -0
  53. package/src/generated/operations/deleteEnquiry.ts +29 -0
  54. package/src/generated/operations/deleteTag.ts +29 -0
  55. package/src/generated/operations/getEnquiries.ts +25 -0
  56. package/src/generated/operations/getEnquiry.ts +29 -0
  57. package/src/generated/operations/getInfoEnquiry.ts +29 -0
  58. package/src/generated/operations/getTag.ts +29 -0
  59. package/src/generated/operations/getTags.ts +25 -0
  60. package/src/generated/operations/index.ts +243 -0
  61. package/src/generated/operations/postEnquiry.ts +24 -0
  62. package/src/generated/operations/postEnquiryArchive.ts +29 -0
  63. package/src/generated/operations/postEnquiryBudget.ts +35 -0
  64. package/src/generated/operations/postEnquiryConsumer.ts +35 -0
  65. package/src/generated/operations/postEnquiryConsumerPreferences.ts +38 -0
  66. package/src/generated/operations/postEnquiryConsumerSignature.ts +38 -0
  67. package/src/generated/operations/postEnquiryConvertJob.ts +29 -0
  68. package/src/generated/operations/postEnquiryInterestInCredit.ts +38 -0
  69. package/src/generated/operations/postEnquiryJobInfo.ts +35 -0
  70. package/src/generated/operations/postEnquiryState.ts +38 -0
  71. package/src/generated/operations/postEnquirySubmit.ts +29 -0
  72. package/src/generated/operations/postEnquiryUnarchive.ts +29 -0
  73. package/src/generated/operations/postTag.ts +24 -0
  74. package/src/generated/operations/putEnquiry.ts +35 -0
  75. package/src/generated/operations/putInfoTag.ts +24 -0
  76. package/src/generated/operations/putTag.ts +35 -0
  77. package/src/generated/widget/index.tsx +72343 -63566
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanda-libs/ks-component-ts",
3
- "version": "0.3.68",
3
+ "version": "0.3.70",
4
4
  "description": "Kanda form component library",
5
5
  "main": "dist/index.esm.js",
6
6
  "module": "dist/index.esm.js",
package/src/.DS_Store ADDED
Binary file
Binary file
Binary file
@@ -4,6 +4,7 @@ import { Analytics } from "./Analytics";
4
4
  import { BankAccount } from "./BankAccount";
5
5
  import { BusinessConfig } from "./BusinessConfig";
6
6
  import { CompanyInfo } from "./CompanyInfo";
7
+ import { CompanyTraining } from "./CompanyTraining";
7
8
  import { CompanyType } from "./CompanyType";
8
9
  import { ContactInfo } from "./ContactInfo";
9
10
  import { Document } from "./Document";
@@ -77,6 +78,7 @@ export const Company = t.intersection([
77
78
  business_type: t.string,
78
79
  business_config: BusinessConfig,
79
80
  tier_config: TierConfig,
81
+ training_status: CompanyTraining,
80
82
  metadata: Metadata,
81
83
  }),
82
84
  ]);
@@ -131,5 +133,6 @@ export interface Company {
131
133
  business_type?: string;
132
134
  business_config?: BusinessConfig;
133
135
  tier_config?: TierConfig;
136
+ training_status?: CompanyTraining;
134
137
  metadata?: Metadata;
135
138
  }
@@ -0,0 +1,12 @@
1
+ import * as t from "io-ts";
2
+
3
+ export const CompanyTraining = t.union([
4
+ t.literal("training_required"),
5
+ t.literal("training_scheduled"),
6
+ t.literal("training_done"),
7
+ ]);
8
+
9
+ export type CompanyTraining =
10
+ | "training_required"
11
+ | "training_scheduled"
12
+ | "training_done";
@@ -0,0 +1,30 @@
1
+ import * as t from "io-ts";
2
+ import { Archived } from "./Archived";
3
+ import { BaseId } from "./BaseId";
4
+ import { EnquiryInfo } from "./EnquiryInfo";
5
+ import { EnquiryState } from "./EnquiryState";
6
+
7
+ export const Enquiry = t.intersection([
8
+ BaseId,
9
+ t.intersection([
10
+ t.type({
11
+ name: t.string,
12
+ source: t.string,
13
+ current_state: EnquiryState,
14
+ states: t.array(EnquiryState),
15
+ archived: Archived,
16
+ }),
17
+ t.partial({
18
+ enquiry_info: EnquiryInfo,
19
+ }),
20
+ ]),
21
+ ]);
22
+
23
+ export type Enquiry = BaseId & {
24
+ name: string;
25
+ source: string;
26
+ enquiry_info?: EnquiryInfo;
27
+ current_state: EnquiryState;
28
+ states: Array<EnquiryState>;
29
+ archived: Archived;
30
+ };
@@ -0,0 +1,18 @@
1
+ import * as t from "io-ts";
2
+ import { EnquiryInfo } from "./EnquiryInfo";
3
+
4
+ export const EnquiryBody = t.intersection([
5
+ t.type({
6
+ name: t.string,
7
+ source: t.string,
8
+ }),
9
+ t.partial({
10
+ enquiry_info: EnquiryInfo,
11
+ }),
12
+ ]);
13
+
14
+ export interface EnquiryBody {
15
+ name: string;
16
+ source: string;
17
+ enquiry_info?: EnquiryInfo;
18
+ }
@@ -0,0 +1,29 @@
1
+ import * as t from "io-ts";
2
+ import { ConsumerSignature } from "./ConsumerSignature";
3
+ import { Customer } from "./Customer";
4
+ import { InterestInCredit } from "./InterestInCredit";
5
+ import { JobInfo } from "./JobInfo";
6
+ import { MaxBudget } from "./MaxBudget";
7
+ import { PreferenceMap } from "./PreferenceMap";
8
+
9
+ export const EnquiryInfo = t.intersection([
10
+ t.type({
11
+ consumer: Customer,
12
+ consumer_signature: ConsumerSignature,
13
+ }),
14
+ t.partial({
15
+ job_info: JobInfo,
16
+ interest_in_credit: InterestInCredit,
17
+ budget: MaxBudget,
18
+ consumer_preferences: PreferenceMap,
19
+ }),
20
+ ]);
21
+
22
+ export interface EnquiryInfo {
23
+ consumer: Customer;
24
+ consumer_signature: ConsumerSignature;
25
+ job_info?: JobInfo;
26
+ interest_in_credit?: InterestInCredit;
27
+ budget?: MaxBudget;
28
+ consumer_preferences?: PreferenceMap;
29
+ }
@@ -0,0 +1,28 @@
1
+ import * as t from "io-ts";
2
+
3
+ export const EnquiryState = t.union([
4
+ t.literal("viewed"),
5
+ t.literal("contact_only"),
6
+ t.literal("contact_agreed"),
7
+ t.literal("ask_for_quote"),
8
+ t.literal("quoted"),
9
+ t.literal("preferences_set"),
10
+ t.literal("submitted"),
11
+ t.literal("converted_to_job"),
12
+ t.literal("unreachable"),
13
+ t.literal("not_interested"),
14
+ t.literal("other_reason"),
15
+ ]);
16
+
17
+ export type EnquiryState =
18
+ | "viewed"
19
+ | "contact_only"
20
+ | "contact_agreed"
21
+ | "ask_for_quote"
22
+ | "quoted"
23
+ | "preferences_set"
24
+ | "submitted"
25
+ | "converted_to_job"
26
+ | "unreachable"
27
+ | "not_interested"
28
+ | "other_reason";
@@ -0,0 +1,10 @@
1
+ import * as t from "io-ts";
2
+ import { EnquiryState } from "./EnquiryState";
3
+
4
+ export const EnquiryStateRequest = t.type({
5
+ state: EnquiryState,
6
+ });
7
+
8
+ export interface EnquiryStateRequest {
9
+ state: EnquiryState;
10
+ }
@@ -0,0 +1,26 @@
1
+ import * as t from "io-ts";
2
+ import { Branding } from "./Branding";
3
+ import { ContactInfo } from "./ContactInfo";
4
+ import { Enquiry } from "./Enquiry";
5
+ import { InfoWorkType } from "./InfoWorkType";
6
+ import { WorkType } from "./WorkType";
7
+
8
+ export const InfoEnquiry = t.intersection([
9
+ t.type({
10
+ enquiry: Enquiry,
11
+ contact_info: ContactInfo,
12
+ work_types: t.array(WorkType),
13
+ info_work_types: t.array(InfoWorkType),
14
+ }),
15
+ t.partial({
16
+ branding: Branding,
17
+ }),
18
+ ]);
19
+
20
+ export interface InfoEnquiry {
21
+ enquiry: Enquiry;
22
+ contact_info: ContactInfo;
23
+ work_types: Array<WorkType>;
24
+ info_work_types: Array<InfoWorkType>;
25
+ branding?: Branding;
26
+ }
@@ -0,0 +1,15 @@
1
+ import * as t from "io-ts";
2
+
3
+ export const InfoTag = t.intersection([
4
+ t.type({
5
+ name: t.string,
6
+ }),
7
+ t.partial({
8
+ xurl: t.string,
9
+ }),
10
+ ]);
11
+
12
+ export interface InfoTag {
13
+ name: string;
14
+ xurl?: string;
15
+ }
@@ -0,0 +1,5 @@
1
+ import * as t from "io-ts";
2
+
3
+ export const InterestInCredit = t.union([t.literal("yes"), t.literal("no")]);
4
+
5
+ export type InterestInCredit = "yes" | "no";
@@ -0,0 +1,10 @@
1
+ import * as t from "io-ts";
2
+ import { InterestInCredit } from "./InterestInCredit";
3
+
4
+ export const InterestInCreditRequest = t.type({
5
+ interest_in_credit: InterestInCredit,
6
+ });
7
+
8
+ export interface InterestInCreditRequest {
9
+ interest_in_credit: InterestInCredit;
10
+ }
@@ -0,0 +1,20 @@
1
+ import * as t from "io-ts";
2
+ import { Document } from "./Document";
3
+ import { JobItem } from "./JobItem";
4
+ import { WorkType } from "./WorkType";
5
+
6
+ export const JobInfo = t.intersection([
7
+ t.type({
8
+ job_items: t.array(JobItem),
9
+ work_type: WorkType,
10
+ }),
11
+ t.partial({
12
+ quote: Document,
13
+ }),
14
+ ]);
15
+
16
+ export interface JobInfo {
17
+ quote?: Document;
18
+ job_items: Array<JobItem>;
19
+ work_type: WorkType;
20
+ }
@@ -0,0 +1,16 @@
1
+ import * as t from "io-ts";
2
+ import { Money } from "./Money";
3
+
4
+ export const MaxBudget = t.intersection([
5
+ t.type({
6
+ max: Money,
7
+ }),
8
+ t.partial({
9
+ min: Money,
10
+ }),
11
+ ]);
12
+
13
+ export interface MaxBudget {
14
+ min?: Money;
15
+ max: Money;
16
+ }
@@ -0,0 +1,5 @@
1
+ import * as t from "io-ts";
2
+
3
+ export const PreferenceMap = t.record(t.string, t.string);
4
+
5
+ export type PreferenceMap = Record<string, string>;
@@ -0,0 +1,7 @@
1
+ import * as t from "io-ts";
2
+ import { BaseId } from "./BaseId";
3
+ import { TagBody } from "./TagBody";
4
+
5
+ export const Tag = t.intersection([BaseId, TagBody]);
6
+
7
+ export type Tag = BaseId & TagBody;
@@ -0,0 +1,17 @@
1
+ import * as t from "io-ts";
2
+
3
+ export const TagBody = t.intersection([
4
+ t.type({
5
+ name: t.string,
6
+ source: t.string,
7
+ }),
8
+ t.partial({
9
+ xurl: t.string,
10
+ }),
11
+ ]);
12
+
13
+ export interface TagBody {
14
+ name: string;
15
+ source: string;
16
+ xurl?: string;
17
+ }
@@ -16,6 +16,7 @@ export const WorkType = t.union([
16
16
  t.literal("central_heating_system"),
17
17
  t.literal("conservatory"),
18
18
  t.literal("conservatory_roof"),
19
+ t.literal("damp_proofing"),
19
20
  t.literal("decking"),
20
21
  t.literal("door_canopy"),
21
22
  t.literal("door_internal"),
@@ -118,6 +119,7 @@ export type WorkType =
118
119
  | "central_heating_system"
119
120
  | "conservatory"
120
121
  | "conservatory_roof"
122
+ | "damp_proofing"
121
123
  | "decking"
122
124
  | "door_canopy"
123
125
  | "door_internal"
@@ -28,6 +28,7 @@ export * from "./Company";
28
28
  export * from "./CompanyDirectorReport";
29
29
  export * from "./CompanyInfo";
30
30
  export * from "./CompanyReport";
31
+ export * from "./CompanyTraining";
31
32
  export * from "./CompanyType";
32
33
  export * from "./ConsumerReport";
33
34
  export * from "./ConsumerSignature";
@@ -42,6 +43,11 @@ export * from "./DirectorVerification";
42
43
  export * from "./Document";
43
44
  export * from "./EmployedDetails";
44
45
  export * from "./EmploymentDetails";
46
+ export * from "./Enquiry";
47
+ export * from "./EnquiryBody";
48
+ export * from "./EnquiryInfo";
49
+ export * from "./EnquiryState";
50
+ export * from "./EnquiryStateRequest";
45
51
  export * from "./Enrolment";
46
52
  export * from "./Enterprise";
47
53
  export * from "./EnterpriseUserRole";
@@ -66,6 +72,7 @@ export * from "./Income";
66
72
  export * from "./InfoAuth";
67
73
  export * from "./InfoCheckoutRedirect";
68
74
  export * from "./InfoCompany";
75
+ export * from "./InfoEnquiry";
69
76
  export * from "./InfoEntity";
70
77
  export * from "./InfoGhost";
71
78
  export * from "./InfoIntroductionStats";
@@ -80,9 +87,12 @@ export * from "./InfoRelation";
80
87
  export * from "./InfoSearch";
81
88
  export * from "./InfoSession";
82
89
  export * from "./InfoStats";
90
+ export * from "./InfoTag";
83
91
  export * from "./InfoTrade";
84
92
  export * from "./InfoValidationEmail";
85
93
  export * from "./InfoWorkType";
94
+ export * from "./InterestInCredit";
95
+ export * from "./InterestInCreditRequest";
86
96
  export * from "./Introduction";
87
97
  export * from "./IntroductionState";
88
98
  export * from "./IntroductionStateRequest";
@@ -91,6 +101,7 @@ export * from "./Job";
91
101
  export * from "./JobCompanyInfo";
92
102
  export * from "./JobCreditState";
93
103
  export * from "./JobDetails";
104
+ export * from "./JobInfo";
94
105
  export * from "./JobItem";
95
106
  export * from "./JobOverride";
96
107
  export * from "./LatLng";
@@ -103,6 +114,7 @@ export * from "./LenderConfig";
103
114
  export * from "./LenderImport";
104
115
  export * from "./LenderRateType";
105
116
  export * from "./LimitedCompanyInfo";
117
+ export * from "./MaxBudget";
106
118
  export * from "./Metadata";
107
119
  export * from "./Metarefs";
108
120
  export * from "./Money";
@@ -117,6 +129,7 @@ export * from "./Partner";
117
129
  export * from "./Payment";
118
130
  export * from "./PaymentOption";
119
131
  export * from "./Pence";
132
+ export * from "./PreferenceMap";
120
133
  export * from "./PreferenceOption";
121
134
  export * from "./PurchaseEvent";
122
135
  export * from "./Quiz";
@@ -138,6 +151,8 @@ export * from "./SignDocument";
138
151
  export * from "./SolarCompanyInfo";
139
152
  export * from "./SoleTraderInfo";
140
153
  export * from "./Subscription";
154
+ export * from "./Tag";
155
+ export * from "./TagBody";
141
156
  export * from "./Tally";
142
157
  export * from "./Tier";
143
158
  export * from "./TierConfig";
@@ -0,0 +1,29 @@
1
+ import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
2
+ import * as schemas from "../components/schemas";
3
+
4
+ export type DeleteEnquiryRequestParameters = {
5
+ id: string;
6
+ };
7
+
8
+ export const deleteEnquiryOperation = {
9
+ path: "/api/enquiry/{id}",
10
+ method: "delete",
11
+ responses: {
12
+ "200": { _tag: "JsonResponse", decoder: schemas.Enquiry },
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: { Accept: "application/json" },
24
+ } as const;
25
+
26
+ export type DeleteEnquiryRequestFunction = RequestFunction<
27
+ { params: DeleteEnquiryRequestParameters },
28
+ schemas.Enquiry
29
+ >;
@@ -0,0 +1,29 @@
1
+ import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
2
+ import * as schemas from "../components/schemas";
3
+
4
+ export type DeleteTagRequestParameters = {
5
+ id: string;
6
+ };
7
+
8
+ export const deleteTagOperation = {
9
+ path: "/api/tag/{id}",
10
+ method: "delete",
11
+ responses: {
12
+ "200": { _tag: "JsonResponse", decoder: schemas.Tag },
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: { Accept: "application/json" },
24
+ } as const;
25
+
26
+ export type DeleteTagRequestFunction = RequestFunction<
27
+ { params: DeleteTagRequestParameters },
28
+ schemas.Tag
29
+ >;
@@ -0,0 +1,25 @@
1
+ import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
2
+ import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
4
+ import * as schemas from "../components/schemas";
5
+
6
+ export type GetEnquiriesRequestParameters = {
7
+ format?: "reduced" | "full";
8
+ q?: string;
9
+ };
10
+
11
+ export const getEnquiriesOperation = {
12
+ path: "/api/enquiry",
13
+ method: "get",
14
+ responses: {
15
+ "200": { _tag: "JsonResponse", decoder: t.array(schemas.Enquiry) },
16
+ default: { _tag: "JsonResponse", decoder: schemas.Error },
17
+ },
18
+ parameters: [parameters.format, parameters.q],
19
+ requestDefaultHeaders: { Accept: "application/json" },
20
+ } as const;
21
+
22
+ export type GetEnquiriesRequestFunction = RequestFunction<
23
+ { params: GetEnquiriesRequestParameters },
24
+ Array<schemas.Enquiry>
25
+ >;
@@ -0,0 +1,29 @@
1
+ import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
2
+ import * as schemas from "../components/schemas";
3
+
4
+ export type GetEnquiryRequestParameters = {
5
+ id: string;
6
+ };
7
+
8
+ export const getEnquiryOperation = {
9
+ path: "/api/enquiry/{id}",
10
+ method: "get",
11
+ responses: {
12
+ "200": { _tag: "JsonResponse", decoder: schemas.Enquiry },
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: { Accept: "application/json" },
24
+ } as const;
25
+
26
+ export type GetEnquiryRequestFunction = RequestFunction<
27
+ { params: GetEnquiryRequestParameters },
28
+ schemas.Enquiry
29
+ >;
@@ -0,0 +1,29 @@
1
+ import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
2
+ import * as schemas from "../components/schemas";
3
+
4
+ export type GetInfoEnquiryRequestParameters = {
5
+ id: string;
6
+ };
7
+
8
+ export const getInfoEnquiryOperation = {
9
+ path: "/api/info/enquiry",
10
+ method: "get",
11
+ responses: {
12
+ "200": { _tag: "JsonResponse", decoder: schemas.InfoEnquiry },
13
+ default: { _tag: "JsonResponse", decoder: schemas.Error },
14
+ },
15
+ parameters: [
16
+ {
17
+ _tag: "FormParameter",
18
+ explode: true,
19
+ in: "query",
20
+ name: "id",
21
+ },
22
+ ],
23
+ requestDefaultHeaders: { Accept: "application/json" },
24
+ } as const;
25
+
26
+ export type GetInfoEnquiryRequestFunction = RequestFunction<
27
+ { params: GetInfoEnquiryRequestParameters },
28
+ schemas.InfoEnquiry
29
+ >;
@@ -0,0 +1,29 @@
1
+ import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
2
+ import * as schemas from "../components/schemas";
3
+
4
+ export type GetTagRequestParameters = {
5
+ id: string;
6
+ };
7
+
8
+ export const getTagOperation = {
9
+ path: "/api/tag/{id}",
10
+ method: "get",
11
+ responses: {
12
+ "200": { _tag: "JsonResponse", decoder: schemas.Tag },
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: { Accept: "application/json" },
24
+ } as const;
25
+
26
+ export type GetTagRequestFunction = RequestFunction<
27
+ { params: GetTagRequestParameters },
28
+ schemas.Tag
29
+ >;
@@ -0,0 +1,25 @@
1
+ import type { RequestFunction } from "@kanda-libs/openapi-io-ts-runtime";
2
+ import * as t from "io-ts";
3
+ import * as parameters from "../components/parameters";
4
+ import * as schemas from "../components/schemas";
5
+
6
+ export type GetTagsRequestParameters = {
7
+ format?: "reduced" | "full";
8
+ q?: string;
9
+ };
10
+
11
+ export const getTagsOperation = {
12
+ path: "/api/tag",
13
+ method: "get",
14
+ responses: {
15
+ "200": { _tag: "JsonResponse", decoder: t.array(schemas.Tag) },
16
+ default: { _tag: "JsonResponse", decoder: schemas.Error },
17
+ },
18
+ parameters: [parameters.format, parameters.q],
19
+ requestDefaultHeaders: { Accept: "application/json" },
20
+ } as const;
21
+
22
+ export type GetTagsRequestFunction = RequestFunction<
23
+ { params: GetTagsRequestParameters },
24
+ Array<schemas.Tag>
25
+ >;