@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.
- package/README.md +13 -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 +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/index.d.ts +4 -0
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +4 -0
- package/esm/models/index.js.map +1 -1
- 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 +5 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +5 -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/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +5 -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/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 +2 -2
- package/src/models/index.ts +4 -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 +5 -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/sdk.ts +6 -0
- package/src/sdk/venues.ts +96 -0
|
@@ -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 TimelineItemUpdateAnchorType = {
|
|
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 TimelineItemUpdateAnchorType = ClosedEnum<
|
|
18
25
|
typeof TimelineItemUpdateAnchorType
|
|
19
26
|
>;
|
|
@@ -53,6 +60,9 @@ export type TimelineItemUpdate = {
|
|
|
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?: TimelineItemUpdateAnchorType | undefined;
|
|
57
67
|
anchorKey?: string | null | undefined;
|
|
58
68
|
location?: string | null | undefined;
|
|
@@ -10,15 +10,22 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
10
10
|
import * as types from "../types/primitives.js";
|
|
11
11
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* 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.
|
|
15
|
+
*/
|
|
13
16
|
export const TimelineItemAnchorType = {
|
|
14
17
|
None: "none",
|
|
15
18
|
Fixed: "fixed",
|
|
19
|
+
FixedEnd: "fixed-end",
|
|
16
20
|
Ceremony: "ceremony",
|
|
17
21
|
EventStart: "event-start",
|
|
18
22
|
Sunset: "sunset",
|
|
19
23
|
Sunrise: "sunrise",
|
|
20
24
|
CustomEvent: "custom-event",
|
|
21
25
|
} as const;
|
|
26
|
+
/**
|
|
27
|
+
* 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.
|
|
28
|
+
*/
|
|
22
29
|
export type TimelineItemAnchorType = OpenEnum<typeof TimelineItemAnchorType>;
|
|
23
30
|
|
|
24
31
|
export const TimelineItemVisibleTo = {
|
|
@@ -56,6 +63,9 @@ export type TimelineItem = {
|
|
|
56
63
|
bufferAfterMinutes: number | null;
|
|
57
64
|
travelTimeMinutes: number | null;
|
|
58
65
|
locked: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* 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.
|
|
68
|
+
*/
|
|
59
69
|
anchorType: TimelineItemAnchorType;
|
|
60
70
|
anchorKey: string | null;
|
|
61
71
|
location: string | null;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export type VenueCreateAddress = {
|
|
9
|
+
line1?: string | undefined;
|
|
10
|
+
line2?: string | undefined;
|
|
11
|
+
city?: string | undefined;
|
|
12
|
+
state?: string | undefined;
|
|
13
|
+
postalCode?: string | undefined;
|
|
14
|
+
country?: string | undefined;
|
|
15
|
+
lat?: number | undefined;
|
|
16
|
+
lng?: number | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type VenueCreateContact = {
|
|
20
|
+
name?: string | undefined;
|
|
21
|
+
role?: string | undefined;
|
|
22
|
+
email?: string | undefined;
|
|
23
|
+
phone?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type VenueCreateSpace = {
|
|
27
|
+
name: string;
|
|
28
|
+
notes?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const VenueCreateStatus = {
|
|
32
|
+
Active: "active",
|
|
33
|
+
Archived: "archived",
|
|
34
|
+
} as const;
|
|
35
|
+
export type VenueCreateStatus = ClosedEnum<typeof VenueCreateStatus>;
|
|
36
|
+
|
|
37
|
+
export type VenueCreate = {
|
|
38
|
+
name: string;
|
|
39
|
+
website?: string | undefined;
|
|
40
|
+
address?: VenueCreateAddress | undefined;
|
|
41
|
+
timezone?: string | undefined;
|
|
42
|
+
contacts?: Array<VenueCreateContact> | undefined;
|
|
43
|
+
spaces?: Array<VenueCreateSpace> | undefined;
|
|
44
|
+
notes?: string | undefined;
|
|
45
|
+
tagIds?: Array<string> | undefined;
|
|
46
|
+
status?: VenueCreateStatus | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type VenueCreateAddress$Outbound = {
|
|
51
|
+
line1?: string | undefined;
|
|
52
|
+
line2?: string | undefined;
|
|
53
|
+
city?: string | undefined;
|
|
54
|
+
state?: string | undefined;
|
|
55
|
+
postalCode?: string | undefined;
|
|
56
|
+
country?: string | undefined;
|
|
57
|
+
lat?: number | undefined;
|
|
58
|
+
lng?: number | undefined;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const VenueCreateAddress$outboundSchema: z.ZodMiniType<
|
|
63
|
+
VenueCreateAddress$Outbound,
|
|
64
|
+
VenueCreateAddress
|
|
65
|
+
> = z.object({
|
|
66
|
+
line1: z.optional(z.string()),
|
|
67
|
+
line2: z.optional(z.string()),
|
|
68
|
+
city: z.optional(z.string()),
|
|
69
|
+
state: z.optional(z.string()),
|
|
70
|
+
postalCode: z.optional(z.string()),
|
|
71
|
+
country: z.optional(z.string()),
|
|
72
|
+
lat: z.optional(z.number()),
|
|
73
|
+
lng: z.optional(z.number()),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export function venueCreateAddressToJSON(
|
|
77
|
+
venueCreateAddress: VenueCreateAddress,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
VenueCreateAddress$outboundSchema.parse(venueCreateAddress),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export type VenueCreateContact$Outbound = {
|
|
86
|
+
name?: string | undefined;
|
|
87
|
+
role?: string | undefined;
|
|
88
|
+
email?: string | undefined;
|
|
89
|
+
phone?: string | undefined;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const VenueCreateContact$outboundSchema: z.ZodMiniType<
|
|
94
|
+
VenueCreateContact$Outbound,
|
|
95
|
+
VenueCreateContact
|
|
96
|
+
> = z.object({
|
|
97
|
+
name: z.optional(z.string()),
|
|
98
|
+
role: z.optional(z.string()),
|
|
99
|
+
email: z.optional(z.string()),
|
|
100
|
+
phone: z.optional(z.string()),
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export function venueCreateContactToJSON(
|
|
104
|
+
venueCreateContact: VenueCreateContact,
|
|
105
|
+
): string {
|
|
106
|
+
return JSON.stringify(
|
|
107
|
+
VenueCreateContact$outboundSchema.parse(venueCreateContact),
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export type VenueCreateSpace$Outbound = {
|
|
113
|
+
name: string;
|
|
114
|
+
notes?: string | undefined;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const VenueCreateSpace$outboundSchema: z.ZodMiniType<
|
|
119
|
+
VenueCreateSpace$Outbound,
|
|
120
|
+
VenueCreateSpace
|
|
121
|
+
> = z.object({
|
|
122
|
+
name: z.string(),
|
|
123
|
+
notes: z.optional(z.string()),
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export function venueCreateSpaceToJSON(
|
|
127
|
+
venueCreateSpace: VenueCreateSpace,
|
|
128
|
+
): string {
|
|
129
|
+
return JSON.stringify(
|
|
130
|
+
VenueCreateSpace$outboundSchema.parse(venueCreateSpace),
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** @internal */
|
|
135
|
+
export const VenueCreateStatus$outboundSchema: z.ZodMiniEnum<
|
|
136
|
+
typeof VenueCreateStatus
|
|
137
|
+
> = z.enum(VenueCreateStatus);
|
|
138
|
+
|
|
139
|
+
/** @internal */
|
|
140
|
+
export type VenueCreate$Outbound = {
|
|
141
|
+
name: string;
|
|
142
|
+
website?: string | undefined;
|
|
143
|
+
address?: VenueCreateAddress$Outbound | undefined;
|
|
144
|
+
timezone?: string | undefined;
|
|
145
|
+
contacts?: Array<VenueCreateContact$Outbound> | undefined;
|
|
146
|
+
spaces?: Array<VenueCreateSpace$Outbound> | undefined;
|
|
147
|
+
notes?: string | undefined;
|
|
148
|
+
tagIds?: Array<string> | undefined;
|
|
149
|
+
status: string;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/** @internal */
|
|
153
|
+
export const VenueCreate$outboundSchema: z.ZodMiniType<
|
|
154
|
+
VenueCreate$Outbound,
|
|
155
|
+
VenueCreate
|
|
156
|
+
> = z.object({
|
|
157
|
+
name: z.string(),
|
|
158
|
+
website: z.optional(z.string()),
|
|
159
|
+
address: z.optional(z.lazy(() => VenueCreateAddress$outboundSchema)),
|
|
160
|
+
timezone: z.optional(z.string()),
|
|
161
|
+
contacts: z.optional(
|
|
162
|
+
z.array(z.lazy(() => VenueCreateContact$outboundSchema)),
|
|
163
|
+
),
|
|
164
|
+
spaces: z.optional(z.array(z.lazy(() => VenueCreateSpace$outboundSchema))),
|
|
165
|
+
notes: z.optional(z.string()),
|
|
166
|
+
tagIds: z.optional(z.array(z.string())),
|
|
167
|
+
status: z._default(VenueCreateStatus$outboundSchema, "active"),
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
export function venueCreateToJSON(venueCreate: VenueCreate): string {
|
|
171
|
+
return JSON.stringify(VenueCreate$outboundSchema.parse(venueCreate));
|
|
172
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
9
|
+
import {
|
|
10
|
+
PaginationMeta,
|
|
11
|
+
PaginationMeta$inboundSchema,
|
|
12
|
+
} from "./pagination-meta.js";
|
|
13
|
+
import { Venue, Venue$inboundSchema } from "./venue.js";
|
|
14
|
+
|
|
15
|
+
export type VenueList = {
|
|
16
|
+
data: Array<Venue>;
|
|
17
|
+
pagination: PaginationMeta;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const VenueList$inboundSchema: z.ZodMiniType<VenueList, unknown> = z
|
|
22
|
+
.object({
|
|
23
|
+
data: z.array(Venue$inboundSchema),
|
|
24
|
+
pagination: PaginationMeta$inboundSchema,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function venueListFromJSON(
|
|
28
|
+
jsonString: string,
|
|
29
|
+
): SafeParseResult<VenueList, SDKValidationError> {
|
|
30
|
+
return safeParse(
|
|
31
|
+
jsonString,
|
|
32
|
+
(x) => VenueList$inboundSchema.parse(JSON.parse(x)),
|
|
33
|
+
`Failed to parse 'VenueList' from JSON`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export type VenueUpdateAddress = {
|
|
9
|
+
line1?: string | undefined;
|
|
10
|
+
line2?: string | undefined;
|
|
11
|
+
city?: string | undefined;
|
|
12
|
+
state?: string | undefined;
|
|
13
|
+
postalCode?: string | undefined;
|
|
14
|
+
country?: string | undefined;
|
|
15
|
+
lat?: number | undefined;
|
|
16
|
+
lng?: number | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type VenueUpdateContact = {
|
|
20
|
+
name?: string | undefined;
|
|
21
|
+
role?: string | undefined;
|
|
22
|
+
email?: string | undefined;
|
|
23
|
+
phone?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type VenueUpdateSpace = {
|
|
27
|
+
name: string;
|
|
28
|
+
notes?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const VenueUpdateStatus = {
|
|
32
|
+
Active: "active",
|
|
33
|
+
Archived: "archived",
|
|
34
|
+
} as const;
|
|
35
|
+
export type VenueUpdateStatus = ClosedEnum<typeof VenueUpdateStatus>;
|
|
36
|
+
|
|
37
|
+
export type VenueUpdate = {
|
|
38
|
+
name?: string | undefined;
|
|
39
|
+
website?: string | null | undefined;
|
|
40
|
+
address?: VenueUpdateAddress | undefined;
|
|
41
|
+
timezone?: string | null | undefined;
|
|
42
|
+
contacts?: Array<VenueUpdateContact> | undefined;
|
|
43
|
+
spaces?: Array<VenueUpdateSpace> | undefined;
|
|
44
|
+
notes?: string | null | undefined;
|
|
45
|
+
tagIds?: Array<string> | undefined;
|
|
46
|
+
status?: VenueUpdateStatus | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type VenueUpdateAddress$Outbound = {
|
|
51
|
+
line1?: string | undefined;
|
|
52
|
+
line2?: string | undefined;
|
|
53
|
+
city?: string | undefined;
|
|
54
|
+
state?: string | undefined;
|
|
55
|
+
postalCode?: string | undefined;
|
|
56
|
+
country?: string | undefined;
|
|
57
|
+
lat?: number | undefined;
|
|
58
|
+
lng?: number | undefined;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const VenueUpdateAddress$outboundSchema: z.ZodMiniType<
|
|
63
|
+
VenueUpdateAddress$Outbound,
|
|
64
|
+
VenueUpdateAddress
|
|
65
|
+
> = z.object({
|
|
66
|
+
line1: z.optional(z.string()),
|
|
67
|
+
line2: z.optional(z.string()),
|
|
68
|
+
city: z.optional(z.string()),
|
|
69
|
+
state: z.optional(z.string()),
|
|
70
|
+
postalCode: z.optional(z.string()),
|
|
71
|
+
country: z.optional(z.string()),
|
|
72
|
+
lat: z.optional(z.number()),
|
|
73
|
+
lng: z.optional(z.number()),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export function venueUpdateAddressToJSON(
|
|
77
|
+
venueUpdateAddress: VenueUpdateAddress,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
VenueUpdateAddress$outboundSchema.parse(venueUpdateAddress),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export type VenueUpdateContact$Outbound = {
|
|
86
|
+
name?: string | undefined;
|
|
87
|
+
role?: string | undefined;
|
|
88
|
+
email?: string | undefined;
|
|
89
|
+
phone?: string | undefined;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const VenueUpdateContact$outboundSchema: z.ZodMiniType<
|
|
94
|
+
VenueUpdateContact$Outbound,
|
|
95
|
+
VenueUpdateContact
|
|
96
|
+
> = z.object({
|
|
97
|
+
name: z.optional(z.string()),
|
|
98
|
+
role: z.optional(z.string()),
|
|
99
|
+
email: z.optional(z.string()),
|
|
100
|
+
phone: z.optional(z.string()),
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export function venueUpdateContactToJSON(
|
|
104
|
+
venueUpdateContact: VenueUpdateContact,
|
|
105
|
+
): string {
|
|
106
|
+
return JSON.stringify(
|
|
107
|
+
VenueUpdateContact$outboundSchema.parse(venueUpdateContact),
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export type VenueUpdateSpace$Outbound = {
|
|
113
|
+
name: string;
|
|
114
|
+
notes?: string | undefined;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const VenueUpdateSpace$outboundSchema: z.ZodMiniType<
|
|
119
|
+
VenueUpdateSpace$Outbound,
|
|
120
|
+
VenueUpdateSpace
|
|
121
|
+
> = z.object({
|
|
122
|
+
name: z.string(),
|
|
123
|
+
notes: z.optional(z.string()),
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export function venueUpdateSpaceToJSON(
|
|
127
|
+
venueUpdateSpace: VenueUpdateSpace,
|
|
128
|
+
): string {
|
|
129
|
+
return JSON.stringify(
|
|
130
|
+
VenueUpdateSpace$outboundSchema.parse(venueUpdateSpace),
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** @internal */
|
|
135
|
+
export const VenueUpdateStatus$outboundSchema: z.ZodMiniEnum<
|
|
136
|
+
typeof VenueUpdateStatus
|
|
137
|
+
> = z.enum(VenueUpdateStatus);
|
|
138
|
+
|
|
139
|
+
/** @internal */
|
|
140
|
+
export type VenueUpdate$Outbound = {
|
|
141
|
+
name?: string | undefined;
|
|
142
|
+
website?: string | null | undefined;
|
|
143
|
+
address?: VenueUpdateAddress$Outbound | undefined;
|
|
144
|
+
timezone?: string | null | undefined;
|
|
145
|
+
contacts?: Array<VenueUpdateContact$Outbound> | undefined;
|
|
146
|
+
spaces?: Array<VenueUpdateSpace$Outbound> | undefined;
|
|
147
|
+
notes?: string | null | undefined;
|
|
148
|
+
tagIds?: Array<string> | undefined;
|
|
149
|
+
status?: string | undefined;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/** @internal */
|
|
153
|
+
export const VenueUpdate$outboundSchema: z.ZodMiniType<
|
|
154
|
+
VenueUpdate$Outbound,
|
|
155
|
+
VenueUpdate
|
|
156
|
+
> = z.object({
|
|
157
|
+
name: z.optional(z.string()),
|
|
158
|
+
website: z.optional(z.nullable(z.string())),
|
|
159
|
+
address: z.optional(z.lazy(() => VenueUpdateAddress$outboundSchema)),
|
|
160
|
+
timezone: z.optional(z.nullable(z.string())),
|
|
161
|
+
contacts: z.optional(
|
|
162
|
+
z.array(z.lazy(() => VenueUpdateContact$outboundSchema)),
|
|
163
|
+
),
|
|
164
|
+
spaces: z.optional(z.array(z.lazy(() => VenueUpdateSpace$outboundSchema))),
|
|
165
|
+
notes: z.optional(z.nullable(z.string())),
|
|
166
|
+
tagIds: z.optional(z.array(z.string())),
|
|
167
|
+
status: z.optional(VenueUpdateStatus$outboundSchema),
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
export function venueUpdateToJSON(venueUpdate: VenueUpdate): string {
|
|
171
|
+
return JSON.stringify(VenueUpdate$outboundSchema.parse(venueUpdate));
|
|
172
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
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 * as openEnums from "../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import * as types from "../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export type VenueAddress1 = {
|
|
14
|
+
line1: string | null;
|
|
15
|
+
line2: string | null;
|
|
16
|
+
city: string | null;
|
|
17
|
+
state: string | null;
|
|
18
|
+
postalCode: string | null;
|
|
19
|
+
country: string | null;
|
|
20
|
+
lat: number | null;
|
|
21
|
+
lng: number | null;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type VenueContact = {
|
|
25
|
+
name: string | null;
|
|
26
|
+
role: string | null;
|
|
27
|
+
email: string | null;
|
|
28
|
+
phone: string | null;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type VenueSpace = {
|
|
32
|
+
name: string;
|
|
33
|
+
notes: string | null;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const VenueStatus = {
|
|
37
|
+
Active: "active",
|
|
38
|
+
Archived: "archived",
|
|
39
|
+
} as const;
|
|
40
|
+
export type VenueStatus = OpenEnum<typeof VenueStatus>;
|
|
41
|
+
|
|
42
|
+
export type Venue = {
|
|
43
|
+
/**
|
|
44
|
+
* UUID v4
|
|
45
|
+
*/
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
website: string | null;
|
|
49
|
+
address: VenueAddress1 | null;
|
|
50
|
+
timezone: string | null;
|
|
51
|
+
contacts: Array<VenueContact>;
|
|
52
|
+
spaces: Array<VenueSpace>;
|
|
53
|
+
notes: string | null;
|
|
54
|
+
tagIds: Array<string>;
|
|
55
|
+
status: VenueStatus;
|
|
56
|
+
/**
|
|
57
|
+
* ISO 8601 timestamp (UTC)
|
|
58
|
+
*/
|
|
59
|
+
createdAt: Date;
|
|
60
|
+
/**
|
|
61
|
+
* ISO 8601 timestamp (UTC)
|
|
62
|
+
*/
|
|
63
|
+
updatedAt: Date;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const VenueAddress1$inboundSchema: z.ZodMiniType<
|
|
68
|
+
VenueAddress1,
|
|
69
|
+
unknown
|
|
70
|
+
> = z.object({
|
|
71
|
+
line1: types.nullable(types.string()),
|
|
72
|
+
line2: types.nullable(types.string()),
|
|
73
|
+
city: types.nullable(types.string()),
|
|
74
|
+
state: types.nullable(types.string()),
|
|
75
|
+
postalCode: types.nullable(types.string()),
|
|
76
|
+
country: types.nullable(types.string()),
|
|
77
|
+
lat: types.nullable(types.number()),
|
|
78
|
+
lng: types.nullable(types.number()),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export function venueAddress1FromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<VenueAddress1, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) => VenueAddress1$inboundSchema.parse(JSON.parse(x)),
|
|
87
|
+
`Failed to parse 'VenueAddress1' from JSON`,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const VenueContact$inboundSchema: z.ZodMiniType<VenueContact, unknown> =
|
|
93
|
+
z.object({
|
|
94
|
+
name: types.nullable(types.string()),
|
|
95
|
+
role: types.nullable(types.string()),
|
|
96
|
+
email: types.nullable(types.string()),
|
|
97
|
+
phone: types.nullable(types.string()),
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export function venueContactFromJSON(
|
|
101
|
+
jsonString: string,
|
|
102
|
+
): SafeParseResult<VenueContact, SDKValidationError> {
|
|
103
|
+
return safeParse(
|
|
104
|
+
jsonString,
|
|
105
|
+
(x) => VenueContact$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
+
`Failed to parse 'VenueContact' from JSON`,
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** @internal */
|
|
111
|
+
export const VenueSpace$inboundSchema: z.ZodMiniType<VenueSpace, unknown> = z
|
|
112
|
+
.object({
|
|
113
|
+
name: types.string(),
|
|
114
|
+
notes: types.nullable(types.string()),
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export function venueSpaceFromJSON(
|
|
118
|
+
jsonString: string,
|
|
119
|
+
): SafeParseResult<VenueSpace, SDKValidationError> {
|
|
120
|
+
return safeParse(
|
|
121
|
+
jsonString,
|
|
122
|
+
(x) => VenueSpace$inboundSchema.parse(JSON.parse(x)),
|
|
123
|
+
`Failed to parse 'VenueSpace' from JSON`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const VenueStatus$inboundSchema: z.ZodMiniType<VenueStatus, unknown> =
|
|
129
|
+
openEnums.inboundSchema(VenueStatus);
|
|
130
|
+
|
|
131
|
+
/** @internal */
|
|
132
|
+
export const Venue$inboundSchema: z.ZodMiniType<Venue, unknown> = z.object({
|
|
133
|
+
id: types.string(),
|
|
134
|
+
name: types.string(),
|
|
135
|
+
website: types.nullable(types.string()),
|
|
136
|
+
address: types.nullable(z.lazy(() => VenueAddress1$inboundSchema)),
|
|
137
|
+
timezone: types.nullable(types.string()),
|
|
138
|
+
contacts: z.array(z.lazy(() => VenueContact$inboundSchema)),
|
|
139
|
+
spaces: z.array(z.lazy(() => VenueSpace$inboundSchema)),
|
|
140
|
+
notes: types.nullable(types.string()),
|
|
141
|
+
tagIds: z.array(types.string()),
|
|
142
|
+
status: VenueStatus$inboundSchema,
|
|
143
|
+
createdAt: types.date(),
|
|
144
|
+
updatedAt: types.date(),
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
export function venueFromJSON(
|
|
148
|
+
jsonString: string,
|
|
149
|
+
): SafeParseResult<Venue, SDKValidationError> {
|
|
150
|
+
return safeParse(
|
|
151
|
+
jsonString,
|
|
152
|
+
(x) => Venue$inboundSchema.parse(JSON.parse(x)),
|
|
153
|
+
`Failed to parse 'Venue' from JSON`,
|
|
154
|
+
);
|
|
155
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -24,6 +24,7 @@ import { TimeEntries } from "./time-entries.js";
|
|
|
24
24
|
import { TimelineItems } from "./timeline-items.js";
|
|
25
25
|
import { Transactions } from "./transactions.js";
|
|
26
26
|
import { Vendors } from "./vendors.js";
|
|
27
|
+
import { Venues } from "./venues.js";
|
|
27
28
|
import { Webhooks } from "./webhooks.js";
|
|
28
29
|
|
|
29
30
|
export class ClientCasa extends ClientSDK {
|
|
@@ -132,6 +133,11 @@ export class ClientCasa extends ClientSDK {
|
|
|
132
133
|
return (this._vendors ??= new Vendors(this._options));
|
|
133
134
|
}
|
|
134
135
|
|
|
136
|
+
private _venues?: Venues;
|
|
137
|
+
get venues(): Venues {
|
|
138
|
+
return (this._venues ??= new Venues(this._options));
|
|
139
|
+
}
|
|
140
|
+
|
|
135
141
|
private _webhooks?: Webhooks;
|
|
136
142
|
get webhooks(): Webhooks {
|
|
137
143
|
return (this._webhooks ??= new Webhooks(this._options));
|