@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.
Files changed (141) hide show
  1. package/README.md +18 -0
  2. package/esm/funcs/inquiries-create.d.ts +16 -0
  3. package/esm/funcs/inquiries-create.d.ts.map +1 -0
  4. package/esm/funcs/inquiries-create.js +93 -0
  5. package/esm/funcs/inquiries-create.js.map +1 -0
  6. package/esm/funcs/venues-create.d.ts +16 -0
  7. package/esm/funcs/venues-create.d.ts.map +1 -0
  8. package/esm/funcs/venues-create.js +93 -0
  9. package/esm/funcs/venues-create.js.map +1 -0
  10. package/esm/funcs/venues-delete.d.ts +15 -0
  11. package/esm/funcs/venues-delete.d.ts.map +1 -0
  12. package/esm/funcs/venues-delete.js +106 -0
  13. package/esm/funcs/venues-delete.js.map +1 -0
  14. package/esm/funcs/venues-get.d.ts +16 -0
  15. package/esm/funcs/venues-get.d.ts.map +1 -0
  16. package/esm/funcs/venues-get.js +107 -0
  17. package/esm/funcs/venues-get.js.map +1 -0
  18. package/esm/funcs/venues-list.d.ts +18 -0
  19. package/esm/funcs/venues-list.d.ts.map +1 -0
  20. package/esm/funcs/venues-list.js +136 -0
  21. package/esm/funcs/venues-list.js.map +1 -0
  22. package/esm/funcs/venues-update.d.ts +16 -0
  23. package/esm/funcs/venues-update.d.ts.map +1 -0
  24. package/esm/funcs/venues-update.js +108 -0
  25. package/esm/funcs/venues-update.js.map +1 -0
  26. package/esm/lib/config.d.ts +3 -3
  27. package/esm/lib/config.js +3 -3
  28. package/esm/models/form-submission.d.ts +1 -1
  29. package/esm/models/form-submission.d.ts.map +1 -1
  30. package/esm/models/form-submission.js +1 -1
  31. package/esm/models/form-submission.js.map +1 -1
  32. package/esm/models/index.d.ts +6 -0
  33. package/esm/models/index.d.ts.map +1 -1
  34. package/esm/models/index.js +6 -0
  35. package/esm/models/index.js.map +1 -1
  36. package/esm/models/inquiry-create.d.ts +32 -0
  37. package/esm/models/inquiry-create.d.ts.map +1 -0
  38. package/esm/models/inquiry-create.js +23 -0
  39. package/esm/models/inquiry-create.js.map +1 -0
  40. package/esm/models/inquiry.d.ts +33 -0
  41. package/esm/models/inquiry.d.ts.map +1 -0
  42. package/esm/models/inquiry.js +23 -0
  43. package/esm/models/inquiry.js.map +1 -0
  44. package/esm/models/operations/create-inquiry.d.ts +30 -0
  45. package/esm/models/operations/create-inquiry.d.ts.map +1 -0
  46. package/esm/models/operations/create-inquiry.js +27 -0
  47. package/esm/models/operations/create-inquiry.js.map +1 -0
  48. package/esm/models/operations/create-venue.d.ts +30 -0
  49. package/esm/models/operations/create-venue.d.ts.map +1 -0
  50. package/esm/models/operations/create-venue.js +27 -0
  51. package/esm/models/operations/create-venue.js.map +1 -0
  52. package/esm/models/operations/delete-venue.d.ts +27 -0
  53. package/esm/models/operations/delete-venue.d.ts.map +1 -0
  54. package/esm/models/operations/delete-venue.js +20 -0
  55. package/esm/models/operations/delete-venue.js.map +1 -0
  56. package/esm/models/operations/get-venue.d.ts +27 -0
  57. package/esm/models/operations/get-venue.d.ts.map +1 -0
  58. package/esm/models/operations/get-venue.js +20 -0
  59. package/esm/models/operations/get-venue.js.map +1 -0
  60. package/esm/models/operations/index.d.ts +6 -0
  61. package/esm/models/operations/index.d.ts.map +1 -1
  62. package/esm/models/operations/index.js +6 -0
  63. package/esm/models/operations/index.js.map +1 -1
  64. package/esm/models/operations/list-venues.d.ts +45 -0
  65. package/esm/models/operations/list-venues.d.ts.map +1 -0
  66. package/esm/models/operations/list-venues.js +42 -0
  67. package/esm/models/operations/list-venues.js.map +1 -0
  68. package/esm/models/operations/update-venue.d.ts +30 -0
  69. package/esm/models/operations/update-venue.d.ts.map +1 -0
  70. package/esm/models/operations/update-venue.js +22 -0
  71. package/esm/models/operations/update-venue.js.map +1 -0
  72. package/esm/models/timeline-item-create.d.ts +10 -0
  73. package/esm/models/timeline-item-create.d.ts.map +1 -1
  74. package/esm/models/timeline-item-create.js +4 -0
  75. package/esm/models/timeline-item-create.js.map +1 -1
  76. package/esm/models/timeline-item-update.d.ts +10 -0
  77. package/esm/models/timeline-item-update.d.ts.map +1 -1
  78. package/esm/models/timeline-item-update.js +4 -0
  79. package/esm/models/timeline-item-update.js.map +1 -1
  80. package/esm/models/timeline-item.d.ts +10 -0
  81. package/esm/models/timeline-item.d.ts.map +1 -1
  82. package/esm/models/timeline-item.js +4 -0
  83. package/esm/models/timeline-item.js.map +1 -1
  84. package/esm/models/venue-create.d.ts +88 -0
  85. package/esm/models/venue-create.d.ts.map +1 -0
  86. package/esm/models/venue-create.js +58 -0
  87. package/esm/models/venue-create.js.map +1 -0
  88. package/esm/models/venue-list.d.ts +13 -0
  89. package/esm/models/venue-list.d.ts.map +1 -0
  90. package/esm/models/venue-list.js +17 -0
  91. package/esm/models/venue-list.js.map +1 -0
  92. package/esm/models/venue-update.d.ts +88 -0
  93. package/esm/models/venue-update.d.ts.map +1 -0
  94. package/esm/models/venue-update.js +58 -0
  95. package/esm/models/venue-update.js.map +1 -0
  96. package/esm/models/venue.d.ts +67 -0
  97. package/esm/models/venue.d.ts.map +1 -0
  98. package/esm/models/venue.js +65 -0
  99. package/esm/models/venue.js.map +1 -0
  100. package/esm/sdk/inquiries.d.ts +10 -0
  101. package/esm/sdk/inquiries.d.ts.map +1 -0
  102. package/esm/sdk/inquiries.js +15 -0
  103. package/esm/sdk/inquiries.js.map +1 -0
  104. package/esm/sdk/sdk.d.ts +6 -0
  105. package/esm/sdk/sdk.d.ts.map +1 -1
  106. package/esm/sdk/sdk.js +10 -0
  107. package/esm/sdk/sdk.js.map +1 -1
  108. package/esm/sdk/venues.d.ts +29 -0
  109. package/esm/sdk/venues.d.ts.map +1 -0
  110. package/esm/sdk/venues.js +44 -0
  111. package/esm/sdk/venues.js.map +1 -0
  112. package/jsr.json +1 -1
  113. package/package.json +1 -1
  114. package/src/funcs/inquiries-create.ts +192 -0
  115. package/src/funcs/venues-create.ts +192 -0
  116. package/src/funcs/venues-delete.ts +201 -0
  117. package/src/funcs/venues-get.ts +202 -0
  118. package/src/funcs/venues-list.ts +272 -0
  119. package/src/funcs/venues-update.ts +203 -0
  120. package/src/lib/config.ts +3 -3
  121. package/src/models/form-submission.ts +2 -2
  122. package/src/models/index.ts +6 -0
  123. package/src/models/inquiry-create.ts +57 -0
  124. package/src/models/inquiry.ts +58 -0
  125. package/src/models/operations/create-inquiry.ts +73 -0
  126. package/src/models/operations/create-venue.ts +73 -0
  127. package/src/models/operations/delete-venue.ts +61 -0
  128. package/src/models/operations/get-venue.ts +59 -0
  129. package/src/models/operations/index.ts +6 -0
  130. package/src/models/operations/list-venues.ts +110 -0
  131. package/src/models/operations/update-venue.ts +65 -0
  132. package/src/models/timeline-item-create.ts +10 -0
  133. package/src/models/timeline-item-update.ts +10 -0
  134. package/src/models/timeline-item.ts +10 -0
  135. package/src/models/venue-create.ts +172 -0
  136. package/src/models/venue-list.ts +35 -0
  137. package/src/models/venue-update.ts +172 -0
  138. package/src/models/venue.ts +155 -0
  139. package/src/sdk/inquiries.ts +27 -0
  140. package/src/sdk/sdk.ts +12 -0
  141. package/src/sdk/venues.ts +96 -0
@@ -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;
@@ -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
+ }