threecommon 0.1.0__py3-none-any.whl
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.
- threecommon/__init__.py +79 -0
- threecommon/_core/__init__.py +6 -0
- threecommon/_core/headers.py +41 -0
- threecommon/_core/http_client.py +424 -0
- threecommon/_core/parse.py +77 -0
- threecommon/_core/retry.py +80 -0
- threecommon/_core/telemetry.py +77 -0
- threecommon/_core/url.py +31 -0
- threecommon/_generated/__init__.py +8 -0
- threecommon/_generated/models.py +614 -0
- threecommon/api_version.py +15 -0
- threecommon/client.py +184 -0
- threecommon/config.py +140 -0
- threecommon/errors/__init__.py +35 -0
- threecommon/errors/base.py +81 -0
- threecommon/errors/classes.py +75 -0
- threecommon/events/__init__.py +28 -0
- threecommon/events/service.py +170 -0
- threecommon/events/types.py +124 -0
- threecommon/filters/__init__.py +51 -0
- threecommon/filters/builder.py +188 -0
- threecommon/filters/types.py +69 -0
- threecommon/helpers.py +19 -0
- threecommon/invoices/__init__.py +40 -0
- threecommon/invoices/service.py +266 -0
- threecommon/invoices/types.py +195 -0
- threecommon/pagination/__init__.py +12 -0
- threecommon/pagination/auto_paginator.py +98 -0
- threecommon/py.typed +0 -0
- threecommon/version.py +10 -0
- threecommon-0.1.0.dist-info/METADATA +399 -0
- threecommon-0.1.0.dist-info/RECORD +34 -0
- threecommon-0.1.0.dist-info/WHEEL +4 -0
- threecommon-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,614 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: spec.yaml
|
|
3
|
+
# timestamp: 2026-05-06T14:05:00+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Any
|
|
9
|
+
|
|
10
|
+
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Status(Enum):
|
|
14
|
+
OK = "ok"
|
|
15
|
+
DEGRADED = "degraded"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Db(Enum):
|
|
19
|
+
CONNECTED = "connected"
|
|
20
|
+
DISCONNECTED = "disconnected"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class HealthGetResponse(BaseModel):
|
|
24
|
+
model_config = ConfigDict(
|
|
25
|
+
extra="forbid",
|
|
26
|
+
)
|
|
27
|
+
status: Status
|
|
28
|
+
version: str
|
|
29
|
+
timestamp: AwareDatetime = Field(
|
|
30
|
+
...,
|
|
31
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
32
|
+
)
|
|
33
|
+
db: Db
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class V1GetResponse(BaseModel):
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
extra="forbid",
|
|
39
|
+
)
|
|
40
|
+
api: str
|
|
41
|
+
version: str
|
|
42
|
+
docs: str = Field(..., description="URL to the interactive API documentation")
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class Error(BaseModel):
|
|
46
|
+
model_config = ConfigDict(
|
|
47
|
+
extra="forbid",
|
|
48
|
+
)
|
|
49
|
+
code: str
|
|
50
|
+
message: str
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class V1GetResponse1(BaseModel):
|
|
54
|
+
"""
|
|
55
|
+
Missing or invalid API key
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
model_config = ConfigDict(
|
|
59
|
+
extra="forbid",
|
|
60
|
+
)
|
|
61
|
+
error: Error
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class Status1(Enum):
|
|
65
|
+
DRAFT = "draft"
|
|
66
|
+
OPEN = "open"
|
|
67
|
+
CLOSED = "closed"
|
|
68
|
+
UNPUBLISHED = "unpublished"
|
|
69
|
+
CANCELLED = "cancelled"
|
|
70
|
+
POSTPONED = "postponed"
|
|
71
|
+
SCHEDULE = "schedule"
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class SortDirection(Enum):
|
|
75
|
+
ASC = "asc"
|
|
76
|
+
DESC = "desc"
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class V1EventsGetParametersQuery(BaseModel):
|
|
80
|
+
page: int | None = Field(0, ge=0, le=9007199254740991)
|
|
81
|
+
pageSize: int | None = Field(20, ge=1, le=50)
|
|
82
|
+
status: Status1 | None = None
|
|
83
|
+
search: str | None = None
|
|
84
|
+
startBefore: AwareDatetime | None = Field(
|
|
85
|
+
None,
|
|
86
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
87
|
+
)
|
|
88
|
+
startAfter: AwareDatetime | None = Field(
|
|
89
|
+
None,
|
|
90
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
91
|
+
)
|
|
92
|
+
sortField: str | None = None
|
|
93
|
+
sortDirection: SortDirection | None = None
|
|
94
|
+
filters: str | None = None
|
|
95
|
+
fields: str | None = None
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class Type(Enum):
|
|
99
|
+
TEXT = "text"
|
|
100
|
+
IMAGE = "image"
|
|
101
|
+
VIDEO = "video"
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class DescriptionBlock(BaseModel):
|
|
105
|
+
model_config = ConfigDict(
|
|
106
|
+
extra="forbid",
|
|
107
|
+
)
|
|
108
|
+
type: Type
|
|
109
|
+
content: str
|
|
110
|
+
id: float
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
class Schedule(Enum):
|
|
114
|
+
SINGLE_DATE = "Single date"
|
|
115
|
+
MULTIPLE_DATES = "Multiple dates"
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class Status2(Enum):
|
|
119
|
+
"""
|
|
120
|
+
The status of an event.
|
|
121
|
+
- draft: has not been published
|
|
122
|
+
- open: published and ticket sales are open
|
|
123
|
+
- closed: published, ticket sales are closed but the event will proceed as normal
|
|
124
|
+
- unpublished: was previously published, but is no longer visible
|
|
125
|
+
- cancelled: published, ticket sales closed, event is cancelled
|
|
126
|
+
- postponed: published, ticket sales closed, event is postponed
|
|
127
|
+
- schedule: not yet published, scheduled to be published in the future
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
DRAFT = "draft"
|
|
131
|
+
OPEN = "open"
|
|
132
|
+
CLOSED = "closed"
|
|
133
|
+
UNPUBLISHED = "unpublished"
|
|
134
|
+
CANCELLED = "cancelled"
|
|
135
|
+
POSTPONED = "postponed"
|
|
136
|
+
SCHEDULE = "schedule"
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class MinPriceCents(Enum):
|
|
140
|
+
"""
|
|
141
|
+
Minimum ticket/product price in cents. Does not contain fees.
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
NONE_TYPE_NONE = None
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class MaxPriceCents(Enum):
|
|
148
|
+
"""
|
|
149
|
+
Maximum ticket/product price in cents. Does not contain fees.
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
NONE_TYPE_NONE = None
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
class Location(BaseModel):
|
|
156
|
+
"""
|
|
157
|
+
Event location with address and coordinates
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
model_config = ConfigDict(
|
|
161
|
+
extra="forbid",
|
|
162
|
+
)
|
|
163
|
+
address: str | None = None
|
|
164
|
+
lat: float | None = None
|
|
165
|
+
lng: float | None = None
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
class Type1(Enum):
|
|
169
|
+
URL = "url"
|
|
170
|
+
TEXT = "text"
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class CustomTerms(BaseModel):
|
|
174
|
+
"""
|
|
175
|
+
Custom checkout conditions
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
model_config = ConfigDict(
|
|
179
|
+
extra="forbid",
|
|
180
|
+
)
|
|
181
|
+
hasCustomTerms: bool | None = None
|
|
182
|
+
type: Type1 | None = None
|
|
183
|
+
url: str | None = None
|
|
184
|
+
content: str | None = None
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class Datum(BaseModel):
|
|
188
|
+
model_config = ConfigDict(
|
|
189
|
+
extra="forbid",
|
|
190
|
+
)
|
|
191
|
+
id: str | None = None
|
|
192
|
+
name: str | None = None
|
|
193
|
+
type: str | None = Field(None, description="'event', 'booking', 'recurring', or 'multiple'")
|
|
194
|
+
description: str | None = Field(
|
|
195
|
+
None,
|
|
196
|
+
description="Event description as HTML. Only present when descriptionBlocks is empty.",
|
|
197
|
+
)
|
|
198
|
+
descriptionBlocks: list[DescriptionBlock] | None = Field(
|
|
199
|
+
None,
|
|
200
|
+
description="Rich content blocks for the event description. If present and non-empty, clients should render these instead of the description field.\nEach block has a type (text: HTML content, image: URL, video: YouTube URL) and content string.",
|
|
201
|
+
)
|
|
202
|
+
schedule: Schedule | None = None
|
|
203
|
+
start: AwareDatetime | None = Field(
|
|
204
|
+
None,
|
|
205
|
+
description="For single-date events the start time; for multi-date the first time slot.",
|
|
206
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
207
|
+
)
|
|
208
|
+
end: AwareDatetime | None = Field(
|
|
209
|
+
None,
|
|
210
|
+
description="For single-date events the end time; for multi-date the last time slot.",
|
|
211
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
212
|
+
)
|
|
213
|
+
multiDayStartTimes: list[str] | None = Field(
|
|
214
|
+
None, description="All start times for multi-day events"
|
|
215
|
+
)
|
|
216
|
+
multiDayEndTimes: list[str] | None = Field(
|
|
217
|
+
None, description="All end times for multi-day events"
|
|
218
|
+
)
|
|
219
|
+
status: Status2 | None = Field(
|
|
220
|
+
None,
|
|
221
|
+
description="The status of an event.\n- draft: has not been published\n- open: published and ticket sales are open\n- closed: published, ticket sales are closed but the event will proceed as normal\n- unpublished: was previously published, but is no longer visible\n- cancelled: published, ticket sales closed, event is cancelled\n- postponed: published, ticket sales closed, event is postponed\n- schedule: not yet published, scheduled to be published in the future",
|
|
222
|
+
)
|
|
223
|
+
itemsSold: float | None = Field(None, description="Total tickets and products sold")
|
|
224
|
+
revenueCents: float | None = Field(None, description="Total event revenue, in cents")
|
|
225
|
+
minPriceCents: float | MinPriceCents | None = Field(
|
|
226
|
+
None,
|
|
227
|
+
description="Minimum ticket/product price in cents. Does not contain fees.",
|
|
228
|
+
)
|
|
229
|
+
maxPriceCents: float | MaxPriceCents | None = Field(
|
|
230
|
+
None,
|
|
231
|
+
description="Maximum ticket/product price in cents. Does not contain fees.",
|
|
232
|
+
)
|
|
233
|
+
currency: str | None = Field(None, description="Currency code (e.g. USD, CAD)")
|
|
234
|
+
timeZone: str | None = Field(
|
|
235
|
+
None, description="IANA time zone (may be missing for pre-2024 events)"
|
|
236
|
+
)
|
|
237
|
+
isPublic: bool | None = Field(None, description="True if the event is public")
|
|
238
|
+
isVirtual: bool | None = Field(None, description="True if the event is virtual")
|
|
239
|
+
location: Location | None = Field(
|
|
240
|
+
None, description="Event location with address and coordinates"
|
|
241
|
+
)
|
|
242
|
+
locationPlaceholder: str | None = Field(
|
|
243
|
+
None, description="Placeholder text to link to location"
|
|
244
|
+
)
|
|
245
|
+
virtualEventLink: str | None = Field(None, description="Link for virtual access")
|
|
246
|
+
venueName: str | None = Field(None, description="Name of the associated seating-chart venue")
|
|
247
|
+
image: str | None = Field(None, description="URL of the event's main image")
|
|
248
|
+
images: list[str] | None = Field(None, description="Gallery images")
|
|
249
|
+
tags: list[str] | None = Field(None, description="Tag metadata")
|
|
250
|
+
customTags: list[str] | None = Field(None, description="Custom tag overlays")
|
|
251
|
+
contentBlocks: list[dict[str, Any]] | None = Field(
|
|
252
|
+
None, description="Structured content (FAQs, etc.)"
|
|
253
|
+
)
|
|
254
|
+
language: str | None = Field(None, description="Event language (e.g. 'en', 'fr')")
|
|
255
|
+
isCancelled: bool | None = Field(None, description="Cancellation flag")
|
|
256
|
+
redirectUrl: str | None = Field(None, description="Post-checkout URL")
|
|
257
|
+
customTerms: CustomTerms | None = Field(None, description="Custom checkout conditions")
|
|
258
|
+
createdAt: AwareDatetime | None = Field(
|
|
259
|
+
None,
|
|
260
|
+
description="Creation timestamp",
|
|
261
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
262
|
+
)
|
|
263
|
+
updatedAt: AwareDatetime | None = Field(
|
|
264
|
+
None,
|
|
265
|
+
description="Last update timestamp",
|
|
266
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
class V1EventsGetResponse(BaseModel):
|
|
271
|
+
model_config = ConfigDict(
|
|
272
|
+
extra="forbid",
|
|
273
|
+
)
|
|
274
|
+
data: list[Datum]
|
|
275
|
+
hasMore: bool
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
class Error1(BaseModel):
|
|
279
|
+
model_config = ConfigDict(
|
|
280
|
+
extra="forbid",
|
|
281
|
+
)
|
|
282
|
+
code: str
|
|
283
|
+
message: str
|
|
284
|
+
details: Any | None = None
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
class V1EventsGetResponse1(BaseModel):
|
|
288
|
+
model_config = ConfigDict(
|
|
289
|
+
extra="forbid",
|
|
290
|
+
)
|
|
291
|
+
error: Error1
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
class V1EventsGetResponse2(V1EventsGetResponse1):
|
|
295
|
+
pass
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
class V1EventsIdGetParametersQuery(BaseModel):
|
|
299
|
+
fields: str | None = None
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
class DescriptionBlock1(DescriptionBlock):
|
|
303
|
+
pass
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
class CustomTerms1(CustomTerms):
|
|
307
|
+
"""
|
|
308
|
+
Custom checkout conditions
|
|
309
|
+
"""
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
class Data(BaseModel):
|
|
313
|
+
model_config = ConfigDict(
|
|
314
|
+
extra="forbid",
|
|
315
|
+
)
|
|
316
|
+
id: str | None = None
|
|
317
|
+
name: str | None = None
|
|
318
|
+
type: str | None = Field(None, description="'event', 'booking', 'recurring', or 'multiple'")
|
|
319
|
+
description: str | None = Field(
|
|
320
|
+
None,
|
|
321
|
+
description="Event description as HTML. Only present when descriptionBlocks is empty.",
|
|
322
|
+
)
|
|
323
|
+
descriptionBlocks: list[DescriptionBlock1] | None = Field(
|
|
324
|
+
None,
|
|
325
|
+
description="Rich content blocks for the event description. If present and non-empty, clients should render these instead of the description field.\nEach block has a type (text: HTML content, image: URL, video: YouTube URL) and content string.",
|
|
326
|
+
)
|
|
327
|
+
schedule: Schedule | None = None
|
|
328
|
+
start: AwareDatetime | None = Field(
|
|
329
|
+
None,
|
|
330
|
+
description="For single-date events the start time; for multi-date the first time slot.",
|
|
331
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
332
|
+
)
|
|
333
|
+
end: AwareDatetime | None = Field(
|
|
334
|
+
None,
|
|
335
|
+
description="For single-date events the end time; for multi-date the last time slot.",
|
|
336
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
337
|
+
)
|
|
338
|
+
multiDayStartTimes: list[str] | None = Field(
|
|
339
|
+
None, description="All start times for multi-day events"
|
|
340
|
+
)
|
|
341
|
+
multiDayEndTimes: list[str] | None = Field(
|
|
342
|
+
None, description="All end times for multi-day events"
|
|
343
|
+
)
|
|
344
|
+
status: Status2 | None = Field(
|
|
345
|
+
None,
|
|
346
|
+
description="The status of an event.\n- draft: has not been published\n- open: published and ticket sales are open\n- closed: published, ticket sales are closed but the event will proceed as normal\n- unpublished: was previously published, but is no longer visible\n- cancelled: published, ticket sales closed, event is cancelled\n- postponed: published, ticket sales closed, event is postponed\n- schedule: not yet published, scheduled to be published in the future",
|
|
347
|
+
)
|
|
348
|
+
itemsSold: float | None = Field(None, description="Total tickets and products sold")
|
|
349
|
+
revenueCents: float | None = Field(None, description="Total event revenue, in cents")
|
|
350
|
+
minPriceCents: float | MinPriceCents | None = Field(
|
|
351
|
+
None,
|
|
352
|
+
description="Minimum ticket/product price in cents. Does not contain fees.",
|
|
353
|
+
)
|
|
354
|
+
maxPriceCents: float | MaxPriceCents | None = Field(
|
|
355
|
+
None,
|
|
356
|
+
description="Maximum ticket/product price in cents. Does not contain fees.",
|
|
357
|
+
)
|
|
358
|
+
currency: str | None = Field(None, description="Currency code (e.g. USD, CAD)")
|
|
359
|
+
timeZone: str | None = Field(
|
|
360
|
+
None, description="IANA time zone (may be missing for pre-2024 events)"
|
|
361
|
+
)
|
|
362
|
+
isPublic: bool | None = Field(None, description="True if the event is public")
|
|
363
|
+
isVirtual: bool | None = Field(None, description="True if the event is virtual")
|
|
364
|
+
location: Location | None = Field(
|
|
365
|
+
None, description="Event location with address and coordinates"
|
|
366
|
+
)
|
|
367
|
+
locationPlaceholder: str | None = Field(
|
|
368
|
+
None, description="Placeholder text to link to location"
|
|
369
|
+
)
|
|
370
|
+
virtualEventLink: str | None = Field(None, description="Link for virtual access")
|
|
371
|
+
venueName: str | None = Field(None, description="Name of the associated seating-chart venue")
|
|
372
|
+
image: str | None = Field(None, description="URL of the event's main image")
|
|
373
|
+
images: list[str] | None = Field(None, description="Gallery images")
|
|
374
|
+
tags: list[str] | None = Field(None, description="Tag metadata")
|
|
375
|
+
customTags: list[str] | None = Field(None, description="Custom tag overlays")
|
|
376
|
+
contentBlocks: list[dict[str, Any]] | None = Field(
|
|
377
|
+
None, description="Structured content (FAQs, etc.)"
|
|
378
|
+
)
|
|
379
|
+
language: str | None = Field(None, description="Event language (e.g. 'en', 'fr')")
|
|
380
|
+
isCancelled: bool | None = Field(None, description="Cancellation flag")
|
|
381
|
+
redirectUrl: str | None = Field(None, description="Post-checkout URL")
|
|
382
|
+
customTerms: CustomTerms1 | None = Field(None, description="Custom checkout conditions")
|
|
383
|
+
createdAt: AwareDatetime | None = Field(
|
|
384
|
+
None,
|
|
385
|
+
description="Creation timestamp",
|
|
386
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
387
|
+
)
|
|
388
|
+
updatedAt: AwareDatetime | None = Field(
|
|
389
|
+
None,
|
|
390
|
+
description="Last update timestamp",
|
|
391
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
392
|
+
)
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
class V1EventsIdGetResponse(BaseModel):
|
|
396
|
+
model_config = ConfigDict(
|
|
397
|
+
extra="forbid",
|
|
398
|
+
)
|
|
399
|
+
data: Data
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
class V1EventsIdGetResponse1(V1EventsGetResponse1):
|
|
403
|
+
pass
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
class V1EventsIdGetResponse2(V1EventsGetResponse1):
|
|
407
|
+
pass
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
class V1EventsIdGetResponse3(V1EventsGetResponse1):
|
|
411
|
+
pass
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
class DescriptionBlock2(BaseModel):
|
|
415
|
+
type: Type
|
|
416
|
+
content: str
|
|
417
|
+
id: float
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
class Status4(Enum):
|
|
421
|
+
"""
|
|
422
|
+
Event status (e.g. draft, open, closed, cancelled)
|
|
423
|
+
"""
|
|
424
|
+
|
|
425
|
+
DRAFT = "draft"
|
|
426
|
+
OPEN = "open"
|
|
427
|
+
CLOSED = "closed"
|
|
428
|
+
UNPUBLISHED = "unpublished"
|
|
429
|
+
CANCELLED = "cancelled"
|
|
430
|
+
POSTPONED = "postponed"
|
|
431
|
+
SCHEDULE = "schedule"
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
class Privacy(Enum):
|
|
435
|
+
"""
|
|
436
|
+
Public events appear on discover; private are link-only
|
|
437
|
+
"""
|
|
438
|
+
|
|
439
|
+
PUBLIC = "public"
|
|
440
|
+
PRIVATE = "private"
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
class EventType(Enum):
|
|
444
|
+
"""
|
|
445
|
+
Virtual or in-person
|
|
446
|
+
"""
|
|
447
|
+
|
|
448
|
+
VIRTUAL = "virtual"
|
|
449
|
+
INPERSON = "inperson"
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
class CustomTerms2(BaseModel):
|
|
453
|
+
"""
|
|
454
|
+
Custom terms and conditions
|
|
455
|
+
"""
|
|
456
|
+
|
|
457
|
+
hasCustomTerms: bool
|
|
458
|
+
type: Type1
|
|
459
|
+
url: str
|
|
460
|
+
content: str
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
class V1EventsIdPatchRequest(BaseModel):
|
|
464
|
+
name: str | None = Field(None, description="Event name")
|
|
465
|
+
description: str | None = Field(None, description="Event description (HTML supported)")
|
|
466
|
+
descriptionBlocks: list[DescriptionBlock2] | None = Field(
|
|
467
|
+
None, description="Rich content blocks for the event description"
|
|
468
|
+
)
|
|
469
|
+
status: Status4 | None = Field(
|
|
470
|
+
None, description="Event status (e.g. draft, open, closed, cancelled)"
|
|
471
|
+
)
|
|
472
|
+
start: AwareDatetime | None = Field(
|
|
473
|
+
None,
|
|
474
|
+
description="Start date/time in UTC",
|
|
475
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
476
|
+
)
|
|
477
|
+
end: AwareDatetime | None = Field(
|
|
478
|
+
None,
|
|
479
|
+
description="End date/time in UTC",
|
|
480
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
481
|
+
)
|
|
482
|
+
hasEndDate: bool | None = Field(None, description="Whether the event has a specified end time")
|
|
483
|
+
privacy: Privacy | None = Field(
|
|
484
|
+
None, description="Public events appear on discover; private are link-only"
|
|
485
|
+
)
|
|
486
|
+
eventType: EventType | None = Field(None, description="Virtual or in-person")
|
|
487
|
+
virtualEventLink: str | None = Field(None, description="Link to virtual event")
|
|
488
|
+
address: str | None = Field(None, description="Event location address")
|
|
489
|
+
locationPlaceholder: str | None = Field(
|
|
490
|
+
None, description="Placeholder text when no address is set"
|
|
491
|
+
)
|
|
492
|
+
timeZone: str | None = Field(None, description='IANA time zone (e.g. "America/New_York")')
|
|
493
|
+
collectEmails: bool | None = Field(
|
|
494
|
+
None, description="Enable checkout; if false customers cannot order"
|
|
495
|
+
)
|
|
496
|
+
redirectUrl: str | None = Field(None, description="URL to redirect to after checkout")
|
|
497
|
+
customTerms: CustomTerms2 | None = Field(None, description="Custom terms and conditions")
|
|
498
|
+
customTags: list[str] | None = Field(None, description="Custom tag overlays")
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
class DescriptionBlock3(DescriptionBlock):
|
|
502
|
+
pass
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
class CustomTerms3(CustomTerms):
|
|
506
|
+
"""
|
|
507
|
+
Custom checkout conditions
|
|
508
|
+
"""
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
class Data1(BaseModel):
|
|
512
|
+
model_config = ConfigDict(
|
|
513
|
+
extra="forbid",
|
|
514
|
+
)
|
|
515
|
+
id: str | None = None
|
|
516
|
+
name: str | None = None
|
|
517
|
+
type: str | None = Field(None, description="'event', 'booking', 'recurring', or 'multiple'")
|
|
518
|
+
description: str | None = Field(
|
|
519
|
+
None,
|
|
520
|
+
description="Event description as HTML. Only present when descriptionBlocks is empty.",
|
|
521
|
+
)
|
|
522
|
+
descriptionBlocks: list[DescriptionBlock3] | None = Field(
|
|
523
|
+
None,
|
|
524
|
+
description="Rich content blocks for the event description. If present and non-empty, clients should render these instead of the description field.\nEach block has a type (text: HTML content, image: URL, video: YouTube URL) and content string.",
|
|
525
|
+
)
|
|
526
|
+
schedule: Schedule | None = None
|
|
527
|
+
start: AwareDatetime | None = Field(
|
|
528
|
+
None,
|
|
529
|
+
description="For single-date events the start time; for multi-date the first time slot.",
|
|
530
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
531
|
+
)
|
|
532
|
+
end: AwareDatetime | None = Field(
|
|
533
|
+
None,
|
|
534
|
+
description="For single-date events the end time; for multi-date the last time slot.",
|
|
535
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
536
|
+
)
|
|
537
|
+
multiDayStartTimes: list[str] | None = Field(
|
|
538
|
+
None, description="All start times for multi-day events"
|
|
539
|
+
)
|
|
540
|
+
multiDayEndTimes: list[str] | None = Field(
|
|
541
|
+
None, description="All end times for multi-day events"
|
|
542
|
+
)
|
|
543
|
+
status: Status2 | None = Field(
|
|
544
|
+
None,
|
|
545
|
+
description="The status of an event.\n- draft: has not been published\n- open: published and ticket sales are open\n- closed: published, ticket sales are closed but the event will proceed as normal\n- unpublished: was previously published, but is no longer visible\n- cancelled: published, ticket sales closed, event is cancelled\n- postponed: published, ticket sales closed, event is postponed\n- schedule: not yet published, scheduled to be published in the future",
|
|
546
|
+
)
|
|
547
|
+
itemsSold: float | None = Field(None, description="Total tickets and products sold")
|
|
548
|
+
revenueCents: float | None = Field(None, description="Total event revenue, in cents")
|
|
549
|
+
minPriceCents: float | MinPriceCents | None = Field(
|
|
550
|
+
None,
|
|
551
|
+
description="Minimum ticket/product price in cents. Does not contain fees.",
|
|
552
|
+
)
|
|
553
|
+
maxPriceCents: float | MaxPriceCents | None = Field(
|
|
554
|
+
None,
|
|
555
|
+
description="Maximum ticket/product price in cents. Does not contain fees.",
|
|
556
|
+
)
|
|
557
|
+
currency: str | None = Field(None, description="Currency code (e.g. USD, CAD)")
|
|
558
|
+
timeZone: str | None = Field(
|
|
559
|
+
None, description="IANA time zone (may be missing for pre-2024 events)"
|
|
560
|
+
)
|
|
561
|
+
isPublic: bool | None = Field(None, description="True if the event is public")
|
|
562
|
+
isVirtual: bool | None = Field(None, description="True if the event is virtual")
|
|
563
|
+
location: Location | None = Field(
|
|
564
|
+
None, description="Event location with address and coordinates"
|
|
565
|
+
)
|
|
566
|
+
locationPlaceholder: str | None = Field(
|
|
567
|
+
None, description="Placeholder text to link to location"
|
|
568
|
+
)
|
|
569
|
+
virtualEventLink: str | None = Field(None, description="Link for virtual access")
|
|
570
|
+
venueName: str | None = Field(None, description="Name of the associated seating-chart venue")
|
|
571
|
+
image: str | None = Field(None, description="URL of the event's main image")
|
|
572
|
+
images: list[str] | None = Field(None, description="Gallery images")
|
|
573
|
+
tags: list[str] | None = Field(None, description="Tag metadata")
|
|
574
|
+
customTags: list[str] | None = Field(None, description="Custom tag overlays")
|
|
575
|
+
contentBlocks: list[dict[str, Any]] | None = Field(
|
|
576
|
+
None, description="Structured content (FAQs, etc.)"
|
|
577
|
+
)
|
|
578
|
+
language: str | None = Field(None, description="Event language (e.g. 'en', 'fr')")
|
|
579
|
+
isCancelled: bool | None = Field(None, description="Cancellation flag")
|
|
580
|
+
redirectUrl: str | None = Field(None, description="Post-checkout URL")
|
|
581
|
+
customTerms: CustomTerms3 | None = Field(None, description="Custom checkout conditions")
|
|
582
|
+
createdAt: AwareDatetime | None = Field(
|
|
583
|
+
None,
|
|
584
|
+
description="Creation timestamp",
|
|
585
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
586
|
+
)
|
|
587
|
+
updatedAt: AwareDatetime | None = Field(
|
|
588
|
+
None,
|
|
589
|
+
description="Last update timestamp",
|
|
590
|
+
pattern="^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
591
|
+
)
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
class V1EventsIdPatchResponse(BaseModel):
|
|
595
|
+
model_config = ConfigDict(
|
|
596
|
+
extra="forbid",
|
|
597
|
+
)
|
|
598
|
+
data: Data1
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
class V1EventsIdPatchResponse1(V1EventsGetResponse1):
|
|
602
|
+
pass
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
class V1EventsIdPatchResponse2(V1EventsGetResponse1):
|
|
606
|
+
pass
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
class V1EventsIdPatchResponse3(V1EventsGetResponse1):
|
|
610
|
+
pass
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
class V1EventsIdPatchResponse4(V1EventsGetResponse1):
|
|
614
|
+
pass
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Pinned 3Common Public API version.
|
|
2
|
+
|
|
3
|
+
Sent as the `Threecommon-Version` header on every request. The server uses
|
|
4
|
+
this to dispatch to the matching version of its internal handlers, so older
|
|
5
|
+
SDKs continue to receive the response shape they were compiled against even
|
|
6
|
+
after the API evolves.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
#: API version this SDK is built against.
|
|
10
|
+
API_VERSION = "2026-04-29"
|
|
11
|
+
|
|
12
|
+
#: Path segment appended to the configured base URL when constructing
|
|
13
|
+
#: request URLs. Pinned to /v1 for now; will become configurable when v2
|
|
14
|
+
#: ships.
|
|
15
|
+
API_PATH = "/v1"
|