@clientcasa/sdk 0.6.1 → 0.6.3
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/README.md +18 -0
- package/esm/funcs/inquiries-create.d.ts +16 -0
- package/esm/funcs/inquiries-create.d.ts.map +1 -0
- package/esm/funcs/inquiries-create.js +93 -0
- package/esm/funcs/inquiries-create.js.map +1 -0
- package/esm/funcs/venues-create.d.ts +16 -0
- package/esm/funcs/venues-create.d.ts.map +1 -0
- package/esm/funcs/venues-create.js +93 -0
- package/esm/funcs/venues-create.js.map +1 -0
- package/esm/funcs/venues-delete.d.ts +15 -0
- package/esm/funcs/venues-delete.d.ts.map +1 -0
- package/esm/funcs/venues-delete.js +106 -0
- package/esm/funcs/venues-delete.js.map +1 -0
- package/esm/funcs/venues-get.d.ts +16 -0
- package/esm/funcs/venues-get.d.ts.map +1 -0
- package/esm/funcs/venues-get.js +107 -0
- package/esm/funcs/venues-get.js.map +1 -0
- package/esm/funcs/venues-list.d.ts +18 -0
- package/esm/funcs/venues-list.d.ts.map +1 -0
- package/esm/funcs/venues-list.js +136 -0
- package/esm/funcs/venues-list.js.map +1 -0
- package/esm/funcs/venues-update.d.ts +16 -0
- package/esm/funcs/venues-update.d.ts.map +1 -0
- package/esm/funcs/venues-update.js +108 -0
- package/esm/funcs/venues-update.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/form-submission.d.ts +1 -1
- package/esm/models/form-submission.d.ts.map +1 -1
- package/esm/models/form-submission.js +1 -1
- package/esm/models/form-submission.js.map +1 -1
- package/esm/models/index.d.ts +6 -0
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +6 -0
- package/esm/models/index.js.map +1 -1
- package/esm/models/inquiry-create.d.ts +32 -0
- package/esm/models/inquiry-create.d.ts.map +1 -0
- package/esm/models/inquiry-create.js +23 -0
- package/esm/models/inquiry-create.js.map +1 -0
- package/esm/models/inquiry.d.ts +33 -0
- package/esm/models/inquiry.d.ts.map +1 -0
- package/esm/models/inquiry.js +23 -0
- package/esm/models/inquiry.js.map +1 -0
- package/esm/models/operations/create-inquiry.d.ts +30 -0
- package/esm/models/operations/create-inquiry.d.ts.map +1 -0
- package/esm/models/operations/create-inquiry.js +27 -0
- package/esm/models/operations/create-inquiry.js.map +1 -0
- package/esm/models/operations/create-venue.d.ts +30 -0
- package/esm/models/operations/create-venue.d.ts.map +1 -0
- package/esm/models/operations/create-venue.js +27 -0
- package/esm/models/operations/create-venue.js.map +1 -0
- package/esm/models/operations/delete-venue.d.ts +27 -0
- package/esm/models/operations/delete-venue.d.ts.map +1 -0
- package/esm/models/operations/delete-venue.js +20 -0
- package/esm/models/operations/delete-venue.js.map +1 -0
- package/esm/models/operations/get-venue.d.ts +27 -0
- package/esm/models/operations/get-venue.d.ts.map +1 -0
- package/esm/models/operations/get-venue.js +20 -0
- package/esm/models/operations/get-venue.js.map +1 -0
- package/esm/models/operations/index.d.ts +6 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +6 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/list-venues.d.ts +45 -0
- package/esm/models/operations/list-venues.d.ts.map +1 -0
- package/esm/models/operations/list-venues.js +42 -0
- package/esm/models/operations/list-venues.js.map +1 -0
- package/esm/models/operations/update-venue.d.ts +30 -0
- package/esm/models/operations/update-venue.d.ts.map +1 -0
- package/esm/models/operations/update-venue.js +22 -0
- package/esm/models/operations/update-venue.js.map +1 -0
- package/esm/models/timeline-item-create.d.ts +10 -0
- package/esm/models/timeline-item-create.d.ts.map +1 -1
- package/esm/models/timeline-item-create.js +4 -0
- package/esm/models/timeline-item-create.js.map +1 -1
- package/esm/models/timeline-item-update.d.ts +10 -0
- package/esm/models/timeline-item-update.d.ts.map +1 -1
- package/esm/models/timeline-item-update.js +4 -0
- package/esm/models/timeline-item-update.js.map +1 -1
- package/esm/models/timeline-item.d.ts +10 -0
- package/esm/models/timeline-item.d.ts.map +1 -1
- package/esm/models/timeline-item.js +4 -0
- package/esm/models/timeline-item.js.map +1 -1
- package/esm/models/venue-create.d.ts +88 -0
- package/esm/models/venue-create.d.ts.map +1 -0
- package/esm/models/venue-create.js +58 -0
- package/esm/models/venue-create.js.map +1 -0
- package/esm/models/venue-list.d.ts +13 -0
- package/esm/models/venue-list.d.ts.map +1 -0
- package/esm/models/venue-list.js +17 -0
- package/esm/models/venue-list.js.map +1 -0
- package/esm/models/venue-update.d.ts +88 -0
- package/esm/models/venue-update.d.ts.map +1 -0
- package/esm/models/venue-update.js +58 -0
- package/esm/models/venue-update.js.map +1 -0
- package/esm/models/venue.d.ts +67 -0
- package/esm/models/venue.d.ts.map +1 -0
- package/esm/models/venue.js +65 -0
- package/esm/models/venue.js.map +1 -0
- package/esm/sdk/inquiries.d.ts +10 -0
- package/esm/sdk/inquiries.d.ts.map +1 -0
- package/esm/sdk/inquiries.js +15 -0
- package/esm/sdk/inquiries.js.map +1 -0
- package/esm/sdk/sdk.d.ts +6 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +10 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/venues.d.ts +29 -0
- package/esm/sdk/venues.d.ts.map +1 -0
- package/esm/sdk/venues.js +44 -0
- package/esm/sdk/venues.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/inquiries-create.ts +192 -0
- package/src/funcs/venues-create.ts +192 -0
- package/src/funcs/venues-delete.ts +201 -0
- package/src/funcs/venues-get.ts +202 -0
- package/src/funcs/venues-list.ts +272 -0
- package/src/funcs/venues-update.ts +203 -0
- package/src/lib/config.ts +3 -3
- package/src/models/form-submission.ts +2 -2
- package/src/models/index.ts +6 -0
- package/src/models/inquiry-create.ts +57 -0
- package/src/models/inquiry.ts +58 -0
- package/src/models/operations/create-inquiry.ts +73 -0
- package/src/models/operations/create-venue.ts +73 -0
- package/src/models/operations/delete-venue.ts +61 -0
- package/src/models/operations/get-venue.ts +59 -0
- package/src/models/operations/index.ts +6 -0
- package/src/models/operations/list-venues.ts +110 -0
- package/src/models/operations/update-venue.ts +65 -0
- package/src/models/timeline-item-create.ts +10 -0
- package/src/models/timeline-item-update.ts +10 -0
- package/src/models/timeline-item.ts +10 -0
- package/src/models/venue-create.ts +172 -0
- package/src/models/venue-list.ts +35 -0
- package/src/models/venue-update.ts +172 -0
- package/src/models/venue.ts +155 -0
- package/src/sdk/inquiries.ts +27 -0
- package/src/sdk/sdk.ts +12 -0
- package/src/sdk/venues.ts +96 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { ClientCasaCore } from "../core.js";
|
|
7
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
12
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import { resolveSecurity } from "../lib/security.js";
|
|
14
|
+
import { pathToFunc } from "../lib/url.js";
|
|
15
|
+
import { ClientCasaError } from "../models/errors/client-casa-error.js";
|
|
16
|
+
import {
|
|
17
|
+
ConnectionError,
|
|
18
|
+
InvalidRequestError,
|
|
19
|
+
RequestAbortedError,
|
|
20
|
+
RequestTimeoutError,
|
|
21
|
+
UnexpectedClientError,
|
|
22
|
+
} from "../models/errors/http-client-errors.js";
|
|
23
|
+
import * as errors from "../models/errors/index.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
26
|
+
import * as models from "../models/index.js";
|
|
27
|
+
import * as operations from "../models/operations/index.js";
|
|
28
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
29
|
+
import { Result } from "../types/fp.js";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Update a venue
|
|
33
|
+
*/
|
|
34
|
+
export function venuesUpdate(
|
|
35
|
+
client: ClientCasaCore,
|
|
36
|
+
security: operations.UpdateVenueSecurity,
|
|
37
|
+
request: operations.UpdateVenueRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
models.Venue,
|
|
42
|
+
| errors.ApiError
|
|
43
|
+
| ClientCasaError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
security,
|
|
56
|
+
request,
|
|
57
|
+
options,
|
|
58
|
+
));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function $do(
|
|
62
|
+
client: ClientCasaCore,
|
|
63
|
+
security: operations.UpdateVenueSecurity,
|
|
64
|
+
request: operations.UpdateVenueRequest,
|
|
65
|
+
options?: RequestOptions,
|
|
66
|
+
): Promise<
|
|
67
|
+
[
|
|
68
|
+
Result<
|
|
69
|
+
models.Venue,
|
|
70
|
+
| errors.ApiError
|
|
71
|
+
| ClientCasaError
|
|
72
|
+
| ResponseValidationError
|
|
73
|
+
| ConnectionError
|
|
74
|
+
| RequestAbortedError
|
|
75
|
+
| RequestTimeoutError
|
|
76
|
+
| InvalidRequestError
|
|
77
|
+
| UnexpectedClientError
|
|
78
|
+
| SDKValidationError
|
|
79
|
+
>,
|
|
80
|
+
APICall,
|
|
81
|
+
]
|
|
82
|
+
> {
|
|
83
|
+
const parsed = safeParse(
|
|
84
|
+
request,
|
|
85
|
+
(value) => z.parse(operations.UpdateVenueRequest$outboundSchema, value),
|
|
86
|
+
"Input validation failed",
|
|
87
|
+
);
|
|
88
|
+
if (!parsed.ok) {
|
|
89
|
+
return [parsed, { status: "invalid" }];
|
|
90
|
+
}
|
|
91
|
+
const payload = parsed.value;
|
|
92
|
+
const body = encodeJSON("body", payload.body, { explode: true });
|
|
93
|
+
|
|
94
|
+
const pathParams = {
|
|
95
|
+
id: encodeSimple("id", payload.id, {
|
|
96
|
+
explode: false,
|
|
97
|
+
charEncoding: "percent",
|
|
98
|
+
}),
|
|
99
|
+
};
|
|
100
|
+
const path = pathToFunc("/api/v1/venues/{id}")(pathParams);
|
|
101
|
+
|
|
102
|
+
const headers = new Headers(compactMap({
|
|
103
|
+
"Content-Type": "application/json",
|
|
104
|
+
Accept: "application/json",
|
|
105
|
+
}));
|
|
106
|
+
|
|
107
|
+
const requestSecurity = resolveSecurity(
|
|
108
|
+
[
|
|
109
|
+
{
|
|
110
|
+
fieldName: "x-api-key",
|
|
111
|
+
type: "apiKey:header",
|
|
112
|
+
value: security?.apiKey,
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
[
|
|
116
|
+
{
|
|
117
|
+
fieldName: "Authorization",
|
|
118
|
+
type: "http:bearer",
|
|
119
|
+
value: security?.bearer,
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
const context = {
|
|
125
|
+
options: client._options,
|
|
126
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
127
|
+
operationID: "updateVenue",
|
|
128
|
+
oAuth2Scopes: null,
|
|
129
|
+
|
|
130
|
+
resolvedSecurity: requestSecurity,
|
|
131
|
+
|
|
132
|
+
securitySource: security,
|
|
133
|
+
retryConfig: options?.retries
|
|
134
|
+
|| client._options.retryConfig
|
|
135
|
+
|| {
|
|
136
|
+
strategy: "backoff",
|
|
137
|
+
backoff: {
|
|
138
|
+
initialInterval: 500,
|
|
139
|
+
maxInterval: 30000,
|
|
140
|
+
exponent: 1.5,
|
|
141
|
+
maxElapsedTime: 30000,
|
|
142
|
+
},
|
|
143
|
+
retryConnectionErrors: true,
|
|
144
|
+
}
|
|
145
|
+
|| { strategy: "none" },
|
|
146
|
+
retryCodes: options?.retryCodes || ["429", "5XX"],
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const requestRes = client._createRequest(context, {
|
|
150
|
+
security: requestSecurity,
|
|
151
|
+
method: "PATCH",
|
|
152
|
+
baseURL: options?.serverURL,
|
|
153
|
+
path: path,
|
|
154
|
+
headers: headers,
|
|
155
|
+
body: body,
|
|
156
|
+
userAgent: client._options.userAgent,
|
|
157
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
158
|
+
}, options);
|
|
159
|
+
if (!requestRes.ok) {
|
|
160
|
+
return [requestRes, { status: "invalid" }];
|
|
161
|
+
}
|
|
162
|
+
const req = requestRes.value;
|
|
163
|
+
|
|
164
|
+
const doResult = await client._do(req, {
|
|
165
|
+
context,
|
|
166
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
167
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
168
|
+
retryConfig: context.retryConfig,
|
|
169
|
+
retryCodes: context.retryCodes,
|
|
170
|
+
});
|
|
171
|
+
if (!doResult.ok) {
|
|
172
|
+
return [doResult, { status: "request-error", request: req }];
|
|
173
|
+
}
|
|
174
|
+
const response = doResult.value;
|
|
175
|
+
|
|
176
|
+
const responseFields = {
|
|
177
|
+
HttpMeta: { Response: response, Request: req },
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const [result] = await M.match<
|
|
181
|
+
models.Venue,
|
|
182
|
+
| errors.ApiError
|
|
183
|
+
| ClientCasaError
|
|
184
|
+
| ResponseValidationError
|
|
185
|
+
| ConnectionError
|
|
186
|
+
| RequestAbortedError
|
|
187
|
+
| RequestTimeoutError
|
|
188
|
+
| InvalidRequestError
|
|
189
|
+
| UnexpectedClientError
|
|
190
|
+
| SDKValidationError
|
|
191
|
+
>(
|
|
192
|
+
M.json(200, models.Venue$inboundSchema),
|
|
193
|
+
M.jsonErr([400, 401, 403, 404, 429], errors.ApiError$inboundSchema),
|
|
194
|
+
M.jsonErr(500, errors.ApiError$inboundSchema),
|
|
195
|
+
M.fail("4XX"),
|
|
196
|
+
M.fail("5XX"),
|
|
197
|
+
)(response, req, { extraFields: responseFields });
|
|
198
|
+
if (!result.ok) {
|
|
199
|
+
return [result, { status: "complete", request: req, response }];
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
return [result, { status: "complete", request: req, response }];
|
|
203
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "1.0.0",
|
|
64
|
-
sdkVersion: "0.6.
|
|
65
|
-
genVersion: "2.
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 0.6.
|
|
64
|
+
sdkVersion: "0.6.3",
|
|
65
|
+
genVersion: "2.913.3",
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 0.6.3 2.913.3 1.0.0 @clientcasa/sdk",
|
|
67
67
|
} as const;
|
|
@@ -34,7 +34,7 @@ export type FormSubmission = {
|
|
|
34
34
|
/**
|
|
35
35
|
* UUID v4
|
|
36
36
|
*/
|
|
37
|
-
formId: string;
|
|
37
|
+
formId: string | null;
|
|
38
38
|
kind: FormSubmissionKind | null;
|
|
39
39
|
status: FormSubmissionStatus;
|
|
40
40
|
/**
|
|
@@ -76,7 +76,7 @@ export const FormSubmission$inboundSchema: z.ZodMiniType<
|
|
|
76
76
|
unknown
|
|
77
77
|
> = z.object({
|
|
78
78
|
id: types.string(),
|
|
79
|
-
formId: types.string(),
|
|
79
|
+
formId: types.nullable(types.string()),
|
|
80
80
|
kind: types.nullable(FormSubmissionKind$inboundSchema),
|
|
81
81
|
status: FormSubmissionStatus$inboundSchema,
|
|
82
82
|
contactId: types.nullable(types.string()),
|
package/src/models/index.ts
CHANGED
|
@@ -42,6 +42,8 @@ export * from "./form-submission-answer.js";
|
|
|
42
42
|
export * from "./form-submission-list.js";
|
|
43
43
|
export * from "./form-submission.js";
|
|
44
44
|
export * from "./form.js";
|
|
45
|
+
export * from "./inquiry-create.js";
|
|
46
|
+
export * from "./inquiry.js";
|
|
45
47
|
export * from "./invoice-create.js";
|
|
46
48
|
export * from "./invoice-line-item.js";
|
|
47
49
|
export * from "./invoice-list.js";
|
|
@@ -80,6 +82,10 @@ export * from "./vendor-list.js";
|
|
|
80
82
|
export * from "./vendor-update.js";
|
|
81
83
|
export * from "./vendor.js";
|
|
82
84
|
export * from "./venue-address.js";
|
|
85
|
+
export * from "./venue-create.js";
|
|
86
|
+
export * from "./venue-list.js";
|
|
87
|
+
export * from "./venue-update.js";
|
|
88
|
+
export * from "./venue.js";
|
|
83
89
|
export * from "./webhook-create.js";
|
|
84
90
|
export * from "./webhook-list.js";
|
|
85
91
|
export * from "./webhook-update.js";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { smartUnion } from "../types/smart-union.js";
|
|
7
|
+
|
|
8
|
+
export type Fields = string | Array<string>;
|
|
9
|
+
|
|
10
|
+
export type InquiryCreate = {
|
|
11
|
+
name: string;
|
|
12
|
+
email: string;
|
|
13
|
+
phone?: string | undefined;
|
|
14
|
+
preferredDate?: string | undefined;
|
|
15
|
+
message?: string | undefined;
|
|
16
|
+
fields?: { [k: string]: string | Array<string> } | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type Fields$Outbound = string | Array<string>;
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const Fields$outboundSchema: z.ZodMiniType<Fields$Outbound, Fields> =
|
|
24
|
+
smartUnion([z.string(), z.array(z.string())]);
|
|
25
|
+
|
|
26
|
+
export function fieldsToJSON(fields: Fields): string {
|
|
27
|
+
return JSON.stringify(Fields$outboundSchema.parse(fields));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type InquiryCreate$Outbound = {
|
|
32
|
+
name: string;
|
|
33
|
+
email: string;
|
|
34
|
+
phone?: string | undefined;
|
|
35
|
+
preferredDate?: string | undefined;
|
|
36
|
+
message?: string | undefined;
|
|
37
|
+
fields?: { [k: string]: string | Array<string> } | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const InquiryCreate$outboundSchema: z.ZodMiniType<
|
|
42
|
+
InquiryCreate$Outbound,
|
|
43
|
+
InquiryCreate
|
|
44
|
+
> = z.object({
|
|
45
|
+
name: z.string(),
|
|
46
|
+
email: z.string(),
|
|
47
|
+
phone: z.optional(z.string()),
|
|
48
|
+
preferredDate: z.optional(z.string()),
|
|
49
|
+
message: z.optional(z.string()),
|
|
50
|
+
fields: z.optional(
|
|
51
|
+
z.record(z.string(), smartUnion([z.string(), z.array(z.string())])),
|
|
52
|
+
),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function inquiryCreateToJSON(inquiryCreate: InquiryCreate): string {
|
|
56
|
+
return JSON.stringify(InquiryCreate$outboundSchema.parse(inquiryCreate));
|
|
57
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import * as types from "../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
11
|
+
|
|
12
|
+
export const InquiryStatus = {
|
|
13
|
+
Received: "received",
|
|
14
|
+
} as const;
|
|
15
|
+
export type InquiryStatus = ClosedEnum<typeof InquiryStatus>;
|
|
16
|
+
|
|
17
|
+
export type Inquiry = {
|
|
18
|
+
/**
|
|
19
|
+
* UUID v4
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
status: InquiryStatus;
|
|
23
|
+
/**
|
|
24
|
+
* UUID v4
|
|
25
|
+
*/
|
|
26
|
+
clientId: string | null;
|
|
27
|
+
/**
|
|
28
|
+
* UUID v4
|
|
29
|
+
*/
|
|
30
|
+
contactId: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* UUID v4
|
|
33
|
+
*/
|
|
34
|
+
submissionId: string | null;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const InquiryStatus$inboundSchema: z.ZodMiniEnum<typeof InquiryStatus> =
|
|
39
|
+
z.enum(InquiryStatus);
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const Inquiry$inboundSchema: z.ZodMiniType<Inquiry, unknown> = z.object({
|
|
43
|
+
id: types.string(),
|
|
44
|
+
status: InquiryStatus$inboundSchema,
|
|
45
|
+
clientId: types.nullable(types.string()),
|
|
46
|
+
contactId: types.nullable(types.string()),
|
|
47
|
+
submissionId: types.nullable(types.string()),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export function inquiryFromJSON(
|
|
51
|
+
jsonString: string,
|
|
52
|
+
): SafeParseResult<Inquiry, SDKValidationError> {
|
|
53
|
+
return safeParse(
|
|
54
|
+
jsonString,
|
|
55
|
+
(x) => Inquiry$inboundSchema.parse(JSON.parse(x)),
|
|
56
|
+
`Failed to parse 'Inquiry' from JSON`,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
|
|
9
|
+
export type CreateInquirySecurity = {
|
|
10
|
+
apiKey?: string | undefined;
|
|
11
|
+
bearer?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type CreateInquiryRequest = {
|
|
15
|
+
/**
|
|
16
|
+
* Optional unique key that makes this create safely retryable. Replaying the same key returns the original response instead of creating a duplicate; reusing a key with a different request body returns 409.
|
|
17
|
+
*/
|
|
18
|
+
idempotencyKey?: string | undefined;
|
|
19
|
+
body: models.InquiryCreate;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export type CreateInquirySecurity$Outbound = {
|
|
24
|
+
apiKey?: string | undefined;
|
|
25
|
+
bearer?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const CreateInquirySecurity$outboundSchema: z.ZodMiniType<
|
|
30
|
+
CreateInquirySecurity$Outbound,
|
|
31
|
+
CreateInquirySecurity
|
|
32
|
+
> = z.object({
|
|
33
|
+
apiKey: z.optional(z.string()),
|
|
34
|
+
bearer: z.optional(z.string()),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function createInquirySecurityToJSON(
|
|
38
|
+
createInquirySecurity: CreateInquirySecurity,
|
|
39
|
+
): string {
|
|
40
|
+
return JSON.stringify(
|
|
41
|
+
CreateInquirySecurity$outboundSchema.parse(createInquirySecurity),
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type CreateInquiryRequest$Outbound = {
|
|
47
|
+
"Idempotency-Key"?: string | undefined;
|
|
48
|
+
body: models.InquiryCreate$Outbound;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const CreateInquiryRequest$outboundSchema: z.ZodMiniType<
|
|
53
|
+
CreateInquiryRequest$Outbound,
|
|
54
|
+
CreateInquiryRequest
|
|
55
|
+
> = z.pipe(
|
|
56
|
+
z.object({
|
|
57
|
+
idempotencyKey: z.optional(z.string()),
|
|
58
|
+
body: models.InquiryCreate$outboundSchema,
|
|
59
|
+
}),
|
|
60
|
+
z.transform((v) => {
|
|
61
|
+
return remap$(v, {
|
|
62
|
+
idempotencyKey: "Idempotency-Key",
|
|
63
|
+
});
|
|
64
|
+
}),
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
export function createInquiryRequestToJSON(
|
|
68
|
+
createInquiryRequest: CreateInquiryRequest,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
CreateInquiryRequest$outboundSchema.parse(createInquiryRequest),
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
|
|
9
|
+
export type CreateVenueSecurity = {
|
|
10
|
+
apiKey?: string | undefined;
|
|
11
|
+
bearer?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type CreateVenueRequest = {
|
|
15
|
+
/**
|
|
16
|
+
* Optional unique key that makes this create safely retryable. Replaying the same key returns the original response instead of creating a duplicate; reusing a key with a different request body returns 409.
|
|
17
|
+
*/
|
|
18
|
+
idempotencyKey?: string | undefined;
|
|
19
|
+
body: models.VenueCreate;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export type CreateVenueSecurity$Outbound = {
|
|
24
|
+
apiKey?: string | undefined;
|
|
25
|
+
bearer?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const CreateVenueSecurity$outboundSchema: z.ZodMiniType<
|
|
30
|
+
CreateVenueSecurity$Outbound,
|
|
31
|
+
CreateVenueSecurity
|
|
32
|
+
> = z.object({
|
|
33
|
+
apiKey: z.optional(z.string()),
|
|
34
|
+
bearer: z.optional(z.string()),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function createVenueSecurityToJSON(
|
|
38
|
+
createVenueSecurity: CreateVenueSecurity,
|
|
39
|
+
): string {
|
|
40
|
+
return JSON.stringify(
|
|
41
|
+
CreateVenueSecurity$outboundSchema.parse(createVenueSecurity),
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type CreateVenueRequest$Outbound = {
|
|
47
|
+
"Idempotency-Key"?: string | undefined;
|
|
48
|
+
body: models.VenueCreate$Outbound;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const CreateVenueRequest$outboundSchema: z.ZodMiniType<
|
|
53
|
+
CreateVenueRequest$Outbound,
|
|
54
|
+
CreateVenueRequest
|
|
55
|
+
> = z.pipe(
|
|
56
|
+
z.object({
|
|
57
|
+
idempotencyKey: z.optional(z.string()),
|
|
58
|
+
body: models.VenueCreate$outboundSchema,
|
|
59
|
+
}),
|
|
60
|
+
z.transform((v) => {
|
|
61
|
+
return remap$(v, {
|
|
62
|
+
idempotencyKey: "Idempotency-Key",
|
|
63
|
+
});
|
|
64
|
+
}),
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
export function createVenueRequestToJSON(
|
|
68
|
+
createVenueRequest: CreateVenueRequest,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
CreateVenueRequest$outboundSchema.parse(createVenueRequest),
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type DeleteVenueSecurity = {
|
|
8
|
+
apiKey?: string | undefined;
|
|
9
|
+
bearer?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type DeleteVenueRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* UUID v4
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type DeleteVenueSecurity$Outbound = {
|
|
21
|
+
apiKey?: string | undefined;
|
|
22
|
+
bearer?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const DeleteVenueSecurity$outboundSchema: z.ZodMiniType<
|
|
27
|
+
DeleteVenueSecurity$Outbound,
|
|
28
|
+
DeleteVenueSecurity
|
|
29
|
+
> = z.object({
|
|
30
|
+
apiKey: z.optional(z.string()),
|
|
31
|
+
bearer: z.optional(z.string()),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function deleteVenueSecurityToJSON(
|
|
35
|
+
deleteVenueSecurity: DeleteVenueSecurity,
|
|
36
|
+
): string {
|
|
37
|
+
return JSON.stringify(
|
|
38
|
+
DeleteVenueSecurity$outboundSchema.parse(deleteVenueSecurity),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type DeleteVenueRequest$Outbound = {
|
|
44
|
+
id: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const DeleteVenueRequest$outboundSchema: z.ZodMiniType<
|
|
49
|
+
DeleteVenueRequest$Outbound,
|
|
50
|
+
DeleteVenueRequest
|
|
51
|
+
> = z.object({
|
|
52
|
+
id: z.string(),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function deleteVenueRequestToJSON(
|
|
56
|
+
deleteVenueRequest: DeleteVenueRequest,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
DeleteVenueRequest$outboundSchema.parse(deleteVenueRequest),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type GetVenueSecurity = {
|
|
8
|
+
apiKey?: string | undefined;
|
|
9
|
+
bearer?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type GetVenueRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* UUID v4
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type GetVenueSecurity$Outbound = {
|
|
21
|
+
apiKey?: string | undefined;
|
|
22
|
+
bearer?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const GetVenueSecurity$outboundSchema: z.ZodMiniType<
|
|
27
|
+
GetVenueSecurity$Outbound,
|
|
28
|
+
GetVenueSecurity
|
|
29
|
+
> = z.object({
|
|
30
|
+
apiKey: z.optional(z.string()),
|
|
31
|
+
bearer: z.optional(z.string()),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function getVenueSecurityToJSON(
|
|
35
|
+
getVenueSecurity: GetVenueSecurity,
|
|
36
|
+
): string {
|
|
37
|
+
return JSON.stringify(
|
|
38
|
+
GetVenueSecurity$outboundSchema.parse(getVenueSecurity),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type GetVenueRequest$Outbound = {
|
|
44
|
+
id: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const GetVenueRequest$outboundSchema: z.ZodMiniType<
|
|
49
|
+
GetVenueRequest$Outbound,
|
|
50
|
+
GetVenueRequest
|
|
51
|
+
> = z.object({
|
|
52
|
+
id: z.string(),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function getVenueRequestToJSON(
|
|
56
|
+
getVenueRequest: GetVenueRequest,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(GetVenueRequest$outboundSchema.parse(getVenueRequest));
|
|
59
|
+
}
|
|
@@ -9,6 +9,7 @@ export * from "./create-contact.js";
|
|
|
9
9
|
export * from "./create-contract.js";
|
|
10
10
|
export * from "./create-event-day-vendor.js";
|
|
11
11
|
export * from "./create-event-day.js";
|
|
12
|
+
export * from "./create-inquiry.js";
|
|
12
13
|
export * from "./create-invoice.js";
|
|
13
14
|
export * from "./create-milestone.js";
|
|
14
15
|
export * from "./create-payment.js";
|
|
@@ -17,6 +18,7 @@ export * from "./create-time-entry.js";
|
|
|
17
18
|
export * from "./create-timeline-item.js";
|
|
18
19
|
export * from "./create-transaction.js";
|
|
19
20
|
export * from "./create-vendor.js";
|
|
21
|
+
export * from "./create-venue.js";
|
|
20
22
|
export * from "./create-webhook.js";
|
|
21
23
|
export * from "./delete-calendar-event.js";
|
|
22
24
|
export * from "./delete-catalog-item.js";
|
|
@@ -32,6 +34,7 @@ export * from "./delete-time-entry.js";
|
|
|
32
34
|
export * from "./delete-timeline-item.js";
|
|
33
35
|
export * from "./delete-transaction.js";
|
|
34
36
|
export * from "./delete-vendor.js";
|
|
37
|
+
export * from "./delete-venue.js";
|
|
35
38
|
export * from "./delete-webhook.js";
|
|
36
39
|
export * from "./get-calendar-event.js";
|
|
37
40
|
export * from "./get-catalog-item.js";
|
|
@@ -53,6 +56,7 @@ export * from "./get-time-entry.js";
|
|
|
53
56
|
export * from "./get-timeline-item.js";
|
|
54
57
|
export * from "./get-transaction.js";
|
|
55
58
|
export * from "./get-vendor.js";
|
|
59
|
+
export * from "./get-venue.js";
|
|
56
60
|
export * from "./get-webhook.js";
|
|
57
61
|
export * from "./list-calendar-events.js";
|
|
58
62
|
export * from "./list-catalog-items.js";
|
|
@@ -74,6 +78,7 @@ export * from "./list-time-entries.js";
|
|
|
74
78
|
export * from "./list-timeline-items.js";
|
|
75
79
|
export * from "./list-transactions.js";
|
|
76
80
|
export * from "./list-vendors.js";
|
|
81
|
+
export * from "./list-venues.js";
|
|
77
82
|
export * from "./list-webhooks.js";
|
|
78
83
|
export * from "./update-calendar-event.js";
|
|
79
84
|
export * from "./update-catalog-item.js";
|
|
@@ -90,4 +95,5 @@ export * from "./update-time-entry.js";
|
|
|
90
95
|
export * from "./update-timeline-item.js";
|
|
91
96
|
export * from "./update-transaction.js";
|
|
92
97
|
export * from "./update-vendor.js";
|
|
98
|
+
export * from "./update-venue.js";
|
|
93
99
|
export * from "./update-webhook.js";
|