@kanda-libs/ks-component-ts 0.3.69 → 0.3.71
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/dist/index.d.ts +15218 -12946
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +3 -3
- package/package.json +1 -1
- package/src/generated/components/schemas/Enquiry.ts +30 -0
- package/src/generated/components/schemas/EnquiryBody.ts +18 -0
- package/src/generated/components/schemas/EnquiryInfo.ts +29 -0
- package/src/generated/components/schemas/EnquiryState.ts +28 -0
- package/src/generated/components/schemas/EnquiryStateRequest.ts +10 -0
- package/src/generated/components/schemas/InfoEnquiry.ts +26 -0
- package/src/generated/components/schemas/InfoTag.ts +15 -0
- package/src/generated/components/schemas/InterestInCredit.ts +5 -0
- package/src/generated/components/schemas/InterestInCreditRequest.ts +10 -0
- package/src/generated/components/schemas/JobInfo.ts +20 -0
- package/src/generated/components/schemas/MaxBudget.ts +16 -0
- package/src/generated/components/schemas/PreferenceMap.ts +5 -0
- package/src/generated/components/schemas/SearchHits.ts +14 -0
- package/src/generated/components/schemas/SearchIndex.ts +4 -0
- package/src/generated/components/schemas/Tag.ts +7 -0
- package/src/generated/components/schemas/TagBody.ts +17 -0
- package/src/generated/components/schemas/WorkType.ts +2 -0
- package/src/generated/components/schemas/index.ts +14 -0
- package/src/generated/operations/deleteEnquiry.ts +29 -0
- package/src/generated/operations/deleteTag.ts +29 -0
- package/src/generated/operations/getEnquiries.ts +25 -0
- package/src/generated/operations/getEnquiry.ts +29 -0
- package/src/generated/operations/getInfoEnquiry.ts +29 -0
- package/src/generated/operations/getTag.ts +29 -0
- package/src/generated/operations/getTags.ts +25 -0
- package/src/generated/operations/index.ts +243 -0
- package/src/generated/operations/postEnquiry.ts +24 -0
- package/src/generated/operations/postEnquiryArchive.ts +29 -0
- package/src/generated/operations/postEnquiryBudget.ts +35 -0
- package/src/generated/operations/postEnquiryConsumer.ts +35 -0
- package/src/generated/operations/postEnquiryConsumerPreferences.ts +38 -0
- package/src/generated/operations/postEnquiryConsumerSignature.ts +38 -0
- package/src/generated/operations/postEnquiryConvertJob.ts +29 -0
- package/src/generated/operations/postEnquiryInterestInCredit.ts +38 -0
- package/src/generated/operations/postEnquiryJobInfo.ts +35 -0
- package/src/generated/operations/postEnquiryState.ts +38 -0
- package/src/generated/operations/postEnquirySubmit.ts +29 -0
- package/src/generated/operations/postEnquiryUnarchive.ts +29 -0
- package/src/generated/operations/postTag.ts +24 -0
- package/src/generated/operations/putEnquiry.ts +35 -0
- package/src/generated/operations/putInfoTag.ts +24 -0
- package/src/generated/operations/putTag.ts +35 -0
- package/src/generated/widget/index.tsx +71508 -62799
package/package.json
CHANGED
|
@@ -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,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,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
|
+
}
|
|
@@ -2,10 +2,12 @@ import * as t from "io-ts";
|
|
|
2
2
|
import { Audit } from "./Audit";
|
|
3
3
|
import { Company } from "./Company";
|
|
4
4
|
import { Credit } from "./Credit";
|
|
5
|
+
import { Enquiry } from "./Enquiry";
|
|
5
6
|
import { Enterprise } from "./Enterprise";
|
|
6
7
|
import { Introduction } from "./Introduction";
|
|
7
8
|
import { Job } from "./Job";
|
|
8
9
|
import { Onboarding } from "./Onboarding";
|
|
10
|
+
import { Tag } from "./Tag";
|
|
9
11
|
import { Transaction } from "./Transaction";
|
|
10
12
|
|
|
11
13
|
export const SearchHits = t.type({
|
|
@@ -18,6 +20,9 @@ export const SearchHits = t.type({
|
|
|
18
20
|
credit: t.array(Credit),
|
|
19
21
|
credit_hits: t.number,
|
|
20
22
|
credit_returned: t.number,
|
|
23
|
+
enquiry: t.array(Enquiry),
|
|
24
|
+
enquiry_hits: t.number,
|
|
25
|
+
enquiry_returned: t.number,
|
|
21
26
|
enterprise: t.array(Enterprise),
|
|
22
27
|
enterprise_hits: t.number,
|
|
23
28
|
enterprise_returned: t.number,
|
|
@@ -30,6 +35,9 @@ export const SearchHits = t.type({
|
|
|
30
35
|
onboarding: t.array(Onboarding),
|
|
31
36
|
onboarding_hits: t.number,
|
|
32
37
|
onboarding_returned: t.number,
|
|
38
|
+
tag: t.array(Tag),
|
|
39
|
+
tag_hits: t.number,
|
|
40
|
+
tag_returned: t.number,
|
|
33
41
|
transaction: t.array(Transaction),
|
|
34
42
|
transaction_hits: t.number,
|
|
35
43
|
transaction_returned: t.number,
|
|
@@ -45,6 +53,9 @@ export interface SearchHits {
|
|
|
45
53
|
credit: Array<Credit>;
|
|
46
54
|
credit_hits: number;
|
|
47
55
|
credit_returned: number;
|
|
56
|
+
enquiry: Array<Enquiry>;
|
|
57
|
+
enquiry_hits: number;
|
|
58
|
+
enquiry_returned: number;
|
|
48
59
|
enterprise: Array<Enterprise>;
|
|
49
60
|
enterprise_hits: number;
|
|
50
61
|
enterprise_returned: number;
|
|
@@ -57,6 +68,9 @@ export interface SearchHits {
|
|
|
57
68
|
onboarding: Array<Onboarding>;
|
|
58
69
|
onboarding_hits: number;
|
|
59
70
|
onboarding_returned: number;
|
|
71
|
+
tag: Array<Tag>;
|
|
72
|
+
tag_hits: number;
|
|
73
|
+
tag_returned: number;
|
|
60
74
|
transaction: Array<Transaction>;
|
|
61
75
|
transaction_hits: number;
|
|
62
76
|
transaction_returned: number;
|
|
@@ -4,10 +4,12 @@ export const SearchIndex = t.union([
|
|
|
4
4
|
t.literal("audit"),
|
|
5
5
|
t.literal("company"),
|
|
6
6
|
t.literal("credit"),
|
|
7
|
+
t.literal("enquiry"),
|
|
7
8
|
t.literal("enterprise"),
|
|
8
9
|
t.literal("introduction"),
|
|
9
10
|
t.literal("job"),
|
|
10
11
|
t.literal("onboarding"),
|
|
12
|
+
t.literal("tag"),
|
|
11
13
|
t.literal("transaction"),
|
|
12
14
|
]);
|
|
13
15
|
|
|
@@ -15,8 +17,10 @@ export type SearchIndex =
|
|
|
15
17
|
| "audit"
|
|
16
18
|
| "company"
|
|
17
19
|
| "credit"
|
|
20
|
+
| "enquiry"
|
|
18
21
|
| "enterprise"
|
|
19
22
|
| "introduction"
|
|
20
23
|
| "job"
|
|
21
24
|
| "onboarding"
|
|
25
|
+
| "tag"
|
|
22
26
|
| "transaction";
|
|
@@ -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"
|
|
@@ -43,6 +43,11 @@ export * from "./DirectorVerification";
|
|
|
43
43
|
export * from "./Document";
|
|
44
44
|
export * from "./EmployedDetails";
|
|
45
45
|
export * from "./EmploymentDetails";
|
|
46
|
+
export * from "./Enquiry";
|
|
47
|
+
export * from "./EnquiryBody";
|
|
48
|
+
export * from "./EnquiryInfo";
|
|
49
|
+
export * from "./EnquiryState";
|
|
50
|
+
export * from "./EnquiryStateRequest";
|
|
46
51
|
export * from "./Enrolment";
|
|
47
52
|
export * from "./Enterprise";
|
|
48
53
|
export * from "./EnterpriseUserRole";
|
|
@@ -67,6 +72,7 @@ export * from "./Income";
|
|
|
67
72
|
export * from "./InfoAuth";
|
|
68
73
|
export * from "./InfoCheckoutRedirect";
|
|
69
74
|
export * from "./InfoCompany";
|
|
75
|
+
export * from "./InfoEnquiry";
|
|
70
76
|
export * from "./InfoEntity";
|
|
71
77
|
export * from "./InfoGhost";
|
|
72
78
|
export * from "./InfoIntroductionStats";
|
|
@@ -81,9 +87,12 @@ export * from "./InfoRelation";
|
|
|
81
87
|
export * from "./InfoSearch";
|
|
82
88
|
export * from "./InfoSession";
|
|
83
89
|
export * from "./InfoStats";
|
|
90
|
+
export * from "./InfoTag";
|
|
84
91
|
export * from "./InfoTrade";
|
|
85
92
|
export * from "./InfoValidationEmail";
|
|
86
93
|
export * from "./InfoWorkType";
|
|
94
|
+
export * from "./InterestInCredit";
|
|
95
|
+
export * from "./InterestInCreditRequest";
|
|
87
96
|
export * from "./Introduction";
|
|
88
97
|
export * from "./IntroductionState";
|
|
89
98
|
export * from "./IntroductionStateRequest";
|
|
@@ -92,6 +101,7 @@ export * from "./Job";
|
|
|
92
101
|
export * from "./JobCompanyInfo";
|
|
93
102
|
export * from "./JobCreditState";
|
|
94
103
|
export * from "./JobDetails";
|
|
104
|
+
export * from "./JobInfo";
|
|
95
105
|
export * from "./JobItem";
|
|
96
106
|
export * from "./JobOverride";
|
|
97
107
|
export * from "./LatLng";
|
|
@@ -104,6 +114,7 @@ export * from "./LenderConfig";
|
|
|
104
114
|
export * from "./LenderImport";
|
|
105
115
|
export * from "./LenderRateType";
|
|
106
116
|
export * from "./LimitedCompanyInfo";
|
|
117
|
+
export * from "./MaxBudget";
|
|
107
118
|
export * from "./Metadata";
|
|
108
119
|
export * from "./Metarefs";
|
|
109
120
|
export * from "./Money";
|
|
@@ -118,6 +129,7 @@ export * from "./Partner";
|
|
|
118
129
|
export * from "./Payment";
|
|
119
130
|
export * from "./PaymentOption";
|
|
120
131
|
export * from "./Pence";
|
|
132
|
+
export * from "./PreferenceMap";
|
|
121
133
|
export * from "./PreferenceOption";
|
|
122
134
|
export * from "./PurchaseEvent";
|
|
123
135
|
export * from "./Quiz";
|
|
@@ -139,6 +151,8 @@ export * from "./SignDocument";
|
|
|
139
151
|
export * from "./SolarCompanyInfo";
|
|
140
152
|
export * from "./SoleTraderInfo";
|
|
141
153
|
export * from "./Subscription";
|
|
154
|
+
export * from "./Tag";
|
|
155
|
+
export * from "./TagBody";
|
|
142
156
|
export * from "./Tally";
|
|
143
157
|
export * from "./Tier";
|
|
144
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
|
+
>;
|