@clientcasa/sdk 0.6.2 → 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.
Files changed (111) hide show
  1. package/README.md +13 -0
  2. package/esm/funcs/venues-create.d.ts +16 -0
  3. package/esm/funcs/venues-create.d.ts.map +1 -0
  4. package/esm/funcs/venues-create.js +93 -0
  5. package/esm/funcs/venues-create.js.map +1 -0
  6. package/esm/funcs/venues-delete.d.ts +15 -0
  7. package/esm/funcs/venues-delete.d.ts.map +1 -0
  8. package/esm/funcs/venues-delete.js +106 -0
  9. package/esm/funcs/venues-delete.js.map +1 -0
  10. package/esm/funcs/venues-get.d.ts +16 -0
  11. package/esm/funcs/venues-get.d.ts.map +1 -0
  12. package/esm/funcs/venues-get.js +107 -0
  13. package/esm/funcs/venues-get.js.map +1 -0
  14. package/esm/funcs/venues-list.d.ts +18 -0
  15. package/esm/funcs/venues-list.d.ts.map +1 -0
  16. package/esm/funcs/venues-list.js +136 -0
  17. package/esm/funcs/venues-list.js.map +1 -0
  18. package/esm/funcs/venues-update.d.ts +16 -0
  19. package/esm/funcs/venues-update.d.ts.map +1 -0
  20. package/esm/funcs/venues-update.js +108 -0
  21. package/esm/funcs/venues-update.js.map +1 -0
  22. package/esm/lib/config.d.ts +2 -2
  23. package/esm/lib/config.js +2 -2
  24. package/esm/models/index.d.ts +4 -0
  25. package/esm/models/index.d.ts.map +1 -1
  26. package/esm/models/index.js +4 -0
  27. package/esm/models/index.js.map +1 -1
  28. package/esm/models/operations/create-venue.d.ts +30 -0
  29. package/esm/models/operations/create-venue.d.ts.map +1 -0
  30. package/esm/models/operations/create-venue.js +27 -0
  31. package/esm/models/operations/create-venue.js.map +1 -0
  32. package/esm/models/operations/delete-venue.d.ts +27 -0
  33. package/esm/models/operations/delete-venue.d.ts.map +1 -0
  34. package/esm/models/operations/delete-venue.js +20 -0
  35. package/esm/models/operations/delete-venue.js.map +1 -0
  36. package/esm/models/operations/get-venue.d.ts +27 -0
  37. package/esm/models/operations/get-venue.d.ts.map +1 -0
  38. package/esm/models/operations/get-venue.js +20 -0
  39. package/esm/models/operations/get-venue.js.map +1 -0
  40. package/esm/models/operations/index.d.ts +5 -0
  41. package/esm/models/operations/index.d.ts.map +1 -1
  42. package/esm/models/operations/index.js +5 -0
  43. package/esm/models/operations/index.js.map +1 -1
  44. package/esm/models/operations/list-venues.d.ts +45 -0
  45. package/esm/models/operations/list-venues.d.ts.map +1 -0
  46. package/esm/models/operations/list-venues.js +42 -0
  47. package/esm/models/operations/list-venues.js.map +1 -0
  48. package/esm/models/operations/update-venue.d.ts +30 -0
  49. package/esm/models/operations/update-venue.d.ts.map +1 -0
  50. package/esm/models/operations/update-venue.js +22 -0
  51. package/esm/models/operations/update-venue.js.map +1 -0
  52. package/esm/models/timeline-item-create.d.ts +10 -0
  53. package/esm/models/timeline-item-create.d.ts.map +1 -1
  54. package/esm/models/timeline-item-create.js +4 -0
  55. package/esm/models/timeline-item-create.js.map +1 -1
  56. package/esm/models/timeline-item-update.d.ts +10 -0
  57. package/esm/models/timeline-item-update.d.ts.map +1 -1
  58. package/esm/models/timeline-item-update.js +4 -0
  59. package/esm/models/timeline-item-update.js.map +1 -1
  60. package/esm/models/timeline-item.d.ts +10 -0
  61. package/esm/models/timeline-item.d.ts.map +1 -1
  62. package/esm/models/timeline-item.js +4 -0
  63. package/esm/models/timeline-item.js.map +1 -1
  64. package/esm/models/venue-create.d.ts +88 -0
  65. package/esm/models/venue-create.d.ts.map +1 -0
  66. package/esm/models/venue-create.js +58 -0
  67. package/esm/models/venue-create.js.map +1 -0
  68. package/esm/models/venue-list.d.ts +13 -0
  69. package/esm/models/venue-list.d.ts.map +1 -0
  70. package/esm/models/venue-list.js +17 -0
  71. package/esm/models/venue-list.js.map +1 -0
  72. package/esm/models/venue-update.d.ts +88 -0
  73. package/esm/models/venue-update.d.ts.map +1 -0
  74. package/esm/models/venue-update.js +58 -0
  75. package/esm/models/venue-update.js.map +1 -0
  76. package/esm/models/venue.d.ts +67 -0
  77. package/esm/models/venue.d.ts.map +1 -0
  78. package/esm/models/venue.js +65 -0
  79. package/esm/models/venue.js.map +1 -0
  80. package/esm/sdk/sdk.d.ts +3 -0
  81. package/esm/sdk/sdk.d.ts.map +1 -1
  82. package/esm/sdk/sdk.js +5 -0
  83. package/esm/sdk/sdk.js.map +1 -1
  84. package/esm/sdk/venues.d.ts +29 -0
  85. package/esm/sdk/venues.d.ts.map +1 -0
  86. package/esm/sdk/venues.js +44 -0
  87. package/esm/sdk/venues.js.map +1 -0
  88. package/jsr.json +1 -1
  89. package/package.json +1 -1
  90. package/src/funcs/venues-create.ts +192 -0
  91. package/src/funcs/venues-delete.ts +201 -0
  92. package/src/funcs/venues-get.ts +202 -0
  93. package/src/funcs/venues-list.ts +272 -0
  94. package/src/funcs/venues-update.ts +203 -0
  95. package/src/lib/config.ts +2 -2
  96. package/src/models/index.ts +4 -0
  97. package/src/models/operations/create-venue.ts +73 -0
  98. package/src/models/operations/delete-venue.ts +61 -0
  99. package/src/models/operations/get-venue.ts +59 -0
  100. package/src/models/operations/index.ts +5 -0
  101. package/src/models/operations/list-venues.ts +110 -0
  102. package/src/models/operations/update-venue.ts +65 -0
  103. package/src/models/timeline-item-create.ts +10 -0
  104. package/src/models/timeline-item-update.ts +10 -0
  105. package/src/models/timeline-item.ts +10 -0
  106. package/src/models/venue-create.ts +172 -0
  107. package/src/models/venue-list.ts +35 -0
  108. package/src/models/venue-update.ts +172 -0
  109. package/src/models/venue.ts +155 -0
  110. package/src/sdk/sdk.ts +6 -0
  111. 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.2",
64
+ sdkVersion: "0.6.3",
65
65
  genVersion: "2.913.3",
66
- userAgent: "speakeasy-sdk/typescript 0.6.2 2.913.3 1.0.0 @clientcasa/sdk",
66
+ userAgent: "speakeasy-sdk/typescript 0.6.3 2.913.3 1.0.0 @clientcasa/sdk",
67
67
  } as const;
@@ -82,6 +82,10 @@ export * from "./vendor-list.js";
82
82
  export * from "./vendor-update.js";
83
83
  export * from "./vendor.js";
84
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";
85
89
  export * from "./webhook-create.js";
86
90
  export * from "./webhook-list.js";
87
91
  export * from "./webhook-update.js";
@@ -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
+ }
@@ -18,6 +18,7 @@ export * from "./create-time-entry.js";
18
18
  export * from "./create-timeline-item.js";
19
19
  export * from "./create-transaction.js";
20
20
  export * from "./create-vendor.js";
21
+ export * from "./create-venue.js";
21
22
  export * from "./create-webhook.js";
22
23
  export * from "./delete-calendar-event.js";
23
24
  export * from "./delete-catalog-item.js";
@@ -33,6 +34,7 @@ export * from "./delete-time-entry.js";
33
34
  export * from "./delete-timeline-item.js";
34
35
  export * from "./delete-transaction.js";
35
36
  export * from "./delete-vendor.js";
37
+ export * from "./delete-venue.js";
36
38
  export * from "./delete-webhook.js";
37
39
  export * from "./get-calendar-event.js";
38
40
  export * from "./get-catalog-item.js";
@@ -54,6 +56,7 @@ export * from "./get-time-entry.js";
54
56
  export * from "./get-timeline-item.js";
55
57
  export * from "./get-transaction.js";
56
58
  export * from "./get-vendor.js";
59
+ export * from "./get-venue.js";
57
60
  export * from "./get-webhook.js";
58
61
  export * from "./list-calendar-events.js";
59
62
  export * from "./list-catalog-items.js";
@@ -75,6 +78,7 @@ export * from "./list-time-entries.js";
75
78
  export * from "./list-timeline-items.js";
76
79
  export * from "./list-transactions.js";
77
80
  export * from "./list-vendors.js";
81
+ export * from "./list-venues.js";
78
82
  export * from "./list-webhooks.js";
79
83
  export * from "./update-calendar-event.js";
80
84
  export * from "./update-catalog-item.js";
@@ -91,4 +95,5 @@ export * from "./update-time-entry.js";
91
95
  export * from "./update-timeline-item.js";
92
96
  export * from "./update-transaction.js";
93
97
  export * from "./update-vendor.js";
98
+ export * from "./update-venue.js";
94
99
  export * from "./update-webhook.js";
@@ -0,0 +1,110 @@
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 { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
11
+ import * as models from "../index.js";
12
+
13
+ export type ListVenuesSecurity = {
14
+ apiKey?: string | undefined;
15
+ bearer?: string | undefined;
16
+ };
17
+
18
+ export const ListVenuesStatus = {
19
+ Active: "active",
20
+ Archived: "archived",
21
+ } as const;
22
+ export type ListVenuesStatus = ClosedEnum<typeof ListVenuesStatus>;
23
+
24
+ export type ListVenuesRequest = {
25
+ page?: number | undefined;
26
+ pageSize?: number | undefined;
27
+ status?: ListVenuesStatus | undefined;
28
+ };
29
+
30
+ export type ListVenuesResponse = {
31
+ result: models.VenueList;
32
+ };
33
+
34
+ /** @internal */
35
+ export type ListVenuesSecurity$Outbound = {
36
+ apiKey?: string | undefined;
37
+ bearer?: string | undefined;
38
+ };
39
+
40
+ /** @internal */
41
+ export const ListVenuesSecurity$outboundSchema: z.ZodMiniType<
42
+ ListVenuesSecurity$Outbound,
43
+ ListVenuesSecurity
44
+ > = z.object({
45
+ apiKey: z.optional(z.string()),
46
+ bearer: z.optional(z.string()),
47
+ });
48
+
49
+ export function listVenuesSecurityToJSON(
50
+ listVenuesSecurity: ListVenuesSecurity,
51
+ ): string {
52
+ return JSON.stringify(
53
+ ListVenuesSecurity$outboundSchema.parse(listVenuesSecurity),
54
+ );
55
+ }
56
+
57
+ /** @internal */
58
+ export const ListVenuesStatus$outboundSchema: z.ZodMiniEnum<
59
+ typeof ListVenuesStatus
60
+ > = z.enum(ListVenuesStatus);
61
+
62
+ /** @internal */
63
+ export type ListVenuesRequest$Outbound = {
64
+ page: number;
65
+ pageSize: number;
66
+ status?: string | undefined;
67
+ };
68
+
69
+ /** @internal */
70
+ export const ListVenuesRequest$outboundSchema: z.ZodMiniType<
71
+ ListVenuesRequest$Outbound,
72
+ ListVenuesRequest
73
+ > = z.object({
74
+ page: z._default(z.int(), 1),
75
+ pageSize: z._default(z.int(), 25),
76
+ status: z.optional(ListVenuesStatus$outboundSchema),
77
+ });
78
+
79
+ export function listVenuesRequestToJSON(
80
+ listVenuesRequest: ListVenuesRequest,
81
+ ): string {
82
+ return JSON.stringify(
83
+ ListVenuesRequest$outboundSchema.parse(listVenuesRequest),
84
+ );
85
+ }
86
+
87
+ /** @internal */
88
+ export const ListVenuesResponse$inboundSchema: z.ZodMiniType<
89
+ ListVenuesResponse,
90
+ unknown
91
+ > = z.pipe(
92
+ z.object({
93
+ Result: models.VenueList$inboundSchema,
94
+ }),
95
+ z.transform((v) => {
96
+ return remap$(v, {
97
+ "Result": "result",
98
+ });
99
+ }),
100
+ );
101
+
102
+ export function listVenuesResponseFromJSON(
103
+ jsonString: string,
104
+ ): SafeParseResult<ListVenuesResponse, SDKValidationError> {
105
+ return safeParse(
106
+ jsonString,
107
+ (x) => ListVenuesResponse$inboundSchema.parse(JSON.parse(x)),
108
+ `Failed to parse 'ListVenuesResponse' from JSON`,
109
+ );
110
+ }
@@ -0,0 +1,65 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import * as models from "../index.js";
7
+
8
+ export type UpdateVenueSecurity = {
9
+ apiKey?: string | undefined;
10
+ bearer?: string | undefined;
11
+ };
12
+
13
+ export type UpdateVenueRequest = {
14
+ /**
15
+ * UUID v4
16
+ */
17
+ id: string;
18
+ body: models.VenueUpdate;
19
+ };
20
+
21
+ /** @internal */
22
+ export type UpdateVenueSecurity$Outbound = {
23
+ apiKey?: string | undefined;
24
+ bearer?: string | undefined;
25
+ };
26
+
27
+ /** @internal */
28
+ export const UpdateVenueSecurity$outboundSchema: z.ZodMiniType<
29
+ UpdateVenueSecurity$Outbound,
30
+ UpdateVenueSecurity
31
+ > = z.object({
32
+ apiKey: z.optional(z.string()),
33
+ bearer: z.optional(z.string()),
34
+ });
35
+
36
+ export function updateVenueSecurityToJSON(
37
+ updateVenueSecurity: UpdateVenueSecurity,
38
+ ): string {
39
+ return JSON.stringify(
40
+ UpdateVenueSecurity$outboundSchema.parse(updateVenueSecurity),
41
+ );
42
+ }
43
+
44
+ /** @internal */
45
+ export type UpdateVenueRequest$Outbound = {
46
+ id: string;
47
+ body: models.VenueUpdate$Outbound;
48
+ };
49
+
50
+ /** @internal */
51
+ export const UpdateVenueRequest$outboundSchema: z.ZodMiniType<
52
+ UpdateVenueRequest$Outbound,
53
+ UpdateVenueRequest
54
+ > = z.object({
55
+ id: z.string(),
56
+ body: models.VenueUpdate$outboundSchema,
57
+ });
58
+
59
+ export function updateVenueRequestToJSON(
60
+ updateVenueRequest: UpdateVenueRequest,
61
+ ): string {
62
+ return JSON.stringify(
63
+ UpdateVenueRequest$outboundSchema.parse(updateVenueRequest),
64
+ );
65
+ }
@@ -5,15 +5,22 @@
5
5
  import * as z from "zod/v4-mini";
6
6
  import { ClosedEnum } from "../types/enums.js";
7
7
 
8
+ /**
9
+ * How the item is timed. 'none' floats (the cascade solves its time from order + duration). 'fixed' pins the item's START to requestedStartTime (HH:MM). 'fixed-end' pins the item's END to requestedStartTime — a hard stop / curfew / 'must be done by'; the schedule back-solves the items before it to fit (pin = end − duration). 'custom-event' pins to a named Key Moment via anchorKey. 'sunset'/'sunrise' pin to the venue's golden hour. 'ceremony'/'event-start' are legacy named anchors.
10
+ */
8
11
  export const TimelineItemCreateAnchorType = {
9
12
  None: "none",
10
13
  Fixed: "fixed",
14
+ FixedEnd: "fixed-end",
11
15
  Ceremony: "ceremony",
12
16
  EventStart: "event-start",
13
17
  Sunset: "sunset",
14
18
  Sunrise: "sunrise",
15
19
  CustomEvent: "custom-event",
16
20
  } as const;
21
+ /**
22
+ * How the item is timed. 'none' floats (the cascade solves its time from order + duration). 'fixed' pins the item's START to requestedStartTime (HH:MM). 'fixed-end' pins the item's END to requestedStartTime — a hard stop / curfew / 'must be done by'; the schedule back-solves the items before it to fit (pin = end − duration). 'custom-event' pins to a named Key Moment via anchorKey. 'sunset'/'sunrise' pin to the venue's golden hour. 'ceremony'/'event-start' are legacy named anchors.
23
+ */
17
24
  export type TimelineItemCreateAnchorType = ClosedEnum<
18
25
  typeof TimelineItemCreateAnchorType
19
26
  >;
@@ -53,6 +60,9 @@ export type TimelineItemCreate = {
53
60
  bufferAfterMinutes?: number | undefined;
54
61
  travelTimeMinutes?: number | undefined;
55
62
  locked?: boolean | undefined;
63
+ /**
64
+ * How the item is timed. 'none' floats (the cascade solves its time from order + duration). 'fixed' pins the item's START to requestedStartTime (HH:MM). 'fixed-end' pins the item's END to requestedStartTime — a hard stop / curfew / 'must be done by'; the schedule back-solves the items before it to fit (pin = end − duration). 'custom-event' pins to a named Key Moment via anchorKey. 'sunset'/'sunrise' pin to the venue's golden hour. 'ceremony'/'event-start' are legacy named anchors.
65
+ */
56
66
  anchorType?: TimelineItemCreateAnchorType | undefined;
57
67
  anchorKey?: string | undefined;
58
68
  location?: string | undefined;