airbyte-agent-zendesk-support 0.18.40__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.
Files changed (57) hide show
  1. airbyte_agent_zendesk_support/__init__.py +261 -0
  2. airbyte_agent_zendesk_support/_vendored/__init__.py +1 -0
  3. airbyte_agent_zendesk_support/_vendored/connector_sdk/__init__.py +82 -0
  4. airbyte_agent_zendesk_support/_vendored/connector_sdk/auth_strategies.py +1120 -0
  5. airbyte_agent_zendesk_support/_vendored/connector_sdk/auth_template.py +135 -0
  6. airbyte_agent_zendesk_support/_vendored/connector_sdk/cloud_utils/__init__.py +5 -0
  7. airbyte_agent_zendesk_support/_vendored/connector_sdk/cloud_utils/client.py +213 -0
  8. airbyte_agent_zendesk_support/_vendored/connector_sdk/connector_model_loader.py +964 -0
  9. airbyte_agent_zendesk_support/_vendored/connector_sdk/constants.py +78 -0
  10. airbyte_agent_zendesk_support/_vendored/connector_sdk/exceptions.py +23 -0
  11. airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/__init__.py +31 -0
  12. airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/hosted_executor.py +196 -0
  13. airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/local_executor.py +1573 -0
  14. airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/models.py +190 -0
  15. airbyte_agent_zendesk_support/_vendored/connector_sdk/extensions.py +693 -0
  16. airbyte_agent_zendesk_support/_vendored/connector_sdk/http/__init__.py +37 -0
  17. airbyte_agent_zendesk_support/_vendored/connector_sdk/http/adapters/__init__.py +9 -0
  18. airbyte_agent_zendesk_support/_vendored/connector_sdk/http/adapters/httpx_adapter.py +251 -0
  19. airbyte_agent_zendesk_support/_vendored/connector_sdk/http/config.py +98 -0
  20. airbyte_agent_zendesk_support/_vendored/connector_sdk/http/exceptions.py +119 -0
  21. airbyte_agent_zendesk_support/_vendored/connector_sdk/http/protocols.py +114 -0
  22. airbyte_agent_zendesk_support/_vendored/connector_sdk/http/response.py +104 -0
  23. airbyte_agent_zendesk_support/_vendored/connector_sdk/http_client.py +686 -0
  24. airbyte_agent_zendesk_support/_vendored/connector_sdk/introspection.py +262 -0
  25. airbyte_agent_zendesk_support/_vendored/connector_sdk/logging/__init__.py +11 -0
  26. airbyte_agent_zendesk_support/_vendored/connector_sdk/logging/logger.py +264 -0
  27. airbyte_agent_zendesk_support/_vendored/connector_sdk/logging/types.py +92 -0
  28. airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/__init__.py +11 -0
  29. airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/config.py +179 -0
  30. airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/models.py +19 -0
  31. airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/redactor.py +81 -0
  32. airbyte_agent_zendesk_support/_vendored/connector_sdk/observability/session.py +103 -0
  33. airbyte_agent_zendesk_support/_vendored/connector_sdk/performance/__init__.py +6 -0
  34. airbyte_agent_zendesk_support/_vendored/connector_sdk/performance/instrumentation.py +57 -0
  35. airbyte_agent_zendesk_support/_vendored/connector_sdk/performance/metrics.py +93 -0
  36. airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/__init__.py +75 -0
  37. airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/base.py +161 -0
  38. airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/components.py +239 -0
  39. airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/connector.py +120 -0
  40. airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/extensions.py +109 -0
  41. airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/operations.py +146 -0
  42. airbyte_agent_zendesk_support/_vendored/connector_sdk/schema/security.py +223 -0
  43. airbyte_agent_zendesk_support/_vendored/connector_sdk/secrets.py +182 -0
  44. airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/__init__.py +10 -0
  45. airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/config.py +32 -0
  46. airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/events.py +59 -0
  47. airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/tracker.py +155 -0
  48. airbyte_agent_zendesk_support/_vendored/connector_sdk/types.py +245 -0
  49. airbyte_agent_zendesk_support/_vendored/connector_sdk/utils.py +60 -0
  50. airbyte_agent_zendesk_support/_vendored/connector_sdk/validation.py +822 -0
  51. airbyte_agent_zendesk_support/connector.py +2276 -0
  52. airbyte_agent_zendesk_support/connector_model.py +3948 -0
  53. airbyte_agent_zendesk_support/models.py +790 -0
  54. airbyte_agent_zendesk_support/types.py +216 -0
  55. airbyte_agent_zendesk_support-0.18.40.dist-info/METADATA +145 -0
  56. airbyte_agent_zendesk_support-0.18.40.dist-info/RECORD +57 -0
  57. airbyte_agent_zendesk_support-0.18.40.dist-info/WHEEL +4 -0
@@ -0,0 +1,3948 @@
1
+ """
2
+ Connector model for zendesk-support.
3
+
4
+ This file is auto-generated from the connector definition at build time.
5
+ DO NOT EDIT MANUALLY - changes will be overwritten on next generation.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from ._vendored.connector_sdk.types import (
11
+ Action,
12
+ AuthConfig,
13
+ AuthOption,
14
+ AuthType,
15
+ ConnectorModel,
16
+ EndpointDefinition,
17
+ EntityDefinition,
18
+ )
19
+ from ._vendored.connector_sdk.schema.security import (
20
+ AirbyteAuthConfig,
21
+ AuthConfigFieldSpec,
22
+ )
23
+ from ._vendored.connector_sdk.schema.components import (
24
+ PathOverrideConfig,
25
+ )
26
+ from uuid import (
27
+ UUID,
28
+ )
29
+
30
+ ZendeskSupportConnectorModel: ConnectorModel = ConnectorModel(
31
+ id=UUID('79c1aa37-dae3-42ae-b333-d1c105477715'),
32
+ name='zendesk-support',
33
+ version='0.1.4',
34
+ base_url='https://{subdomain}.zendesk.com/api/v2',
35
+ auth=AuthConfig(
36
+ options=[
37
+ AuthOption(
38
+ scheme_name='zendeskOAuth',
39
+ type=AuthType.OAUTH2,
40
+ config={
41
+ 'header': 'Authorization',
42
+ 'prefix': 'Bearer',
43
+ 'refresh_url': 'https://{{subdomain}}.zendesk.com/oauth/tokens',
44
+ },
45
+ user_config_spec=AirbyteAuthConfig(
46
+ title='OAuth 2.0',
47
+ description='Zendesk OAuth 2.0 authentication',
48
+ type='object',
49
+ required=['access_token'],
50
+ properties={
51
+ 'access_token': AuthConfigFieldSpec(
52
+ title='Access Token',
53
+ description='OAuth 2.0 access token',
54
+ airbyte_secret=True,
55
+ ),
56
+ 'refresh_token': AuthConfigFieldSpec(
57
+ title='Refresh Token',
58
+ description='OAuth 2.0 refresh token (optional)',
59
+ airbyte_secret=True,
60
+ ),
61
+ },
62
+ auth_mapping={'access_token': '${access_token}', 'refresh_token': '${refresh_token}'},
63
+ replication_auth_key_mapping={'access_token': 'access_token'},
64
+ ),
65
+ ),
66
+ AuthOption(
67
+ scheme_name='zendeskAPIToken',
68
+ type=AuthType.BASIC,
69
+ user_config_spec=AirbyteAuthConfig(
70
+ title='API Token',
71
+ description='Authenticate using email and API token',
72
+ type='object',
73
+ required=['email', 'api_token'],
74
+ properties={
75
+ 'email': AuthConfigFieldSpec(
76
+ title='Email Address',
77
+ description='Your Zendesk account email address',
78
+ format='email',
79
+ ),
80
+ 'api_token': AuthConfigFieldSpec(
81
+ title='API Token',
82
+ description='Your Zendesk API token from Admin Center',
83
+ airbyte_secret=True,
84
+ ),
85
+ },
86
+ auth_mapping={'username': '${email}/token', 'password': '${api_token}'},
87
+ replication_auth_key_mapping={'email': 'email', 'api_token': 'api_token'},
88
+ ),
89
+ ),
90
+ ],
91
+ ),
92
+ entities=[
93
+ EntityDefinition(
94
+ name='tickets',
95
+ actions=[Action.LIST, Action.GET],
96
+ endpoints={
97
+ Action.LIST: EndpointDefinition(
98
+ method='GET',
99
+ path='/tickets.json',
100
+ action=Action.LIST,
101
+ description='Returns a list of all tickets in your account',
102
+ query_params=['page', 'external_id', 'sort'],
103
+ query_params_schema={
104
+ 'page': {'type': 'integer', 'required': False},
105
+ 'external_id': {'type': 'string', 'required': False},
106
+ 'sort': {'type': 'string', 'required': False},
107
+ },
108
+ response_schema={
109
+ 'type': 'object',
110
+ 'properties': {
111
+ 'tickets': {
112
+ 'type': 'array',
113
+ 'items': {
114
+ 'type': 'object',
115
+ 'description': 'Zendesk Support ticket object',
116
+ 'properties': {
117
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the ticket is created'},
118
+ 'url': {'type': 'string', 'description': 'The API url of this ticket'},
119
+ 'external_id': {
120
+ 'type': ['string', 'null'],
121
+ 'description': 'An id you can use to link Zendesk Support tickets to local records',
122
+ },
123
+ 'type': {
124
+ 'type': ['string', 'null'],
125
+ 'description': 'The type of this ticket (problem, incident, question, task)',
126
+ },
127
+ 'subject': {
128
+ 'type': ['string', 'null'],
129
+ 'description': 'The value of the subject field for this ticket',
130
+ },
131
+ 'raw_subject': {
132
+ 'type': ['string', 'null'],
133
+ 'description': 'The dynamic content placeholder or the subject value',
134
+ },
135
+ 'description': {'type': 'string', 'description': 'Read-only first comment on the ticket'},
136
+ 'priority': {
137
+ 'type': ['string', 'null'],
138
+ 'description': 'The urgency with which the ticket should be addressed (urgent, high, normal, low)',
139
+ },
140
+ 'status': {
141
+ 'type': 'string',
142
+ 'enum': [
143
+ 'new',
144
+ 'open',
145
+ 'pending',
146
+ 'hold',
147
+ 'solved',
148
+ 'closed',
149
+ ],
150
+ 'description': 'The state of the ticket',
151
+ },
152
+ 'recipient': {
153
+ 'type': ['string', 'null'],
154
+ 'description': 'The original recipient e-mail address of the ticket',
155
+ },
156
+ 'requester_id': {'type': 'integer', 'description': 'The user who requested this ticket'},
157
+ 'submitter_id': {'type': 'integer', 'description': 'The user who submitted the ticket'},
158
+ 'assignee_id': {
159
+ 'type': ['integer', 'null'],
160
+ 'description': 'The agent currently assigned to the ticket',
161
+ },
162
+ 'organization_id': {
163
+ 'type': ['integer', 'null'],
164
+ 'description': 'The organization of the requester',
165
+ },
166
+ 'group_id': {
167
+ 'type': ['integer', 'null'],
168
+ 'description': 'The group this ticket is assigned to',
169
+ },
170
+ 'collaborator_ids': {
171
+ 'type': 'array',
172
+ 'items': {'type': 'integer'},
173
+ 'description': "The ids of users currently CC'ed on the ticket",
174
+ },
175
+ 'follower_ids': {
176
+ 'type': 'array',
177
+ 'items': {'type': 'integer'},
178
+ 'description': 'The ids of agents currently following the ticket',
179
+ },
180
+ 'email_cc_ids': {
181
+ 'type': 'array',
182
+ 'items': {'type': 'integer'},
183
+ 'description': "The ids of agents or end users currently CC'ed on the ticket",
184
+ },
185
+ 'forum_topic_id': {
186
+ 'type': ['integer', 'null'],
187
+ 'description': 'The topic in the Zendesk Web portal this ticket originated from',
188
+ },
189
+ 'problem_id': {
190
+ 'type': ['integer', 'null'],
191
+ 'description': 'For tickets of type incident, the ID of the problem the incident is linked to',
192
+ },
193
+ 'has_incidents': {'type': 'boolean', 'description': 'Is true if a ticket is a problem type and has one or more incidents linked to it'},
194
+ 'is_public': {'type': 'boolean', 'description': 'Is true if any comments are public, false otherwise'},
195
+ 'due_at': {
196
+ 'type': ['string', 'null'],
197
+ 'format': 'date-time',
198
+ 'description': 'If this is a ticket of type task it has a due date',
199
+ },
200
+ 'tags': {
201
+ 'type': 'array',
202
+ 'items': {'type': 'string'},
203
+ 'description': 'The array of tags applied to this ticket',
204
+ },
205
+ 'custom_fields': {
206
+ 'type': 'array',
207
+ 'items': {'type': 'object'},
208
+ 'description': 'Custom fields for the ticket',
209
+ },
210
+ 'satisfaction_rating': {'type': 'object', 'description': 'The satisfaction rating of the ticket'},
211
+ 'sharing_agreement_ids': {
212
+ 'type': 'array',
213
+ 'items': {'type': 'integer'},
214
+ 'description': 'The ids of the sharing agreements used for this ticket',
215
+ },
216
+ 'custom_status_id': {'type': 'integer', 'description': 'The custom ticket status id of the ticket'},
217
+ 'fields': {
218
+ 'type': 'array',
219
+ 'items': {'type': 'object'},
220
+ 'description': 'Ticket fields',
221
+ },
222
+ 'followup_ids': {
223
+ 'type': 'array',
224
+ 'items': {'type': 'integer'},
225
+ 'description': 'The ids of the followups created from this ticket',
226
+ },
227
+ 'ticket_form_id': {'type': 'integer', 'description': 'Enterprise only. The id of the ticket form to render for the ticket'},
228
+ 'brand_id': {'type': 'integer', 'description': 'Enterprise only. The id of the brand this ticket is associated with'},
229
+ 'allow_channelback': {'type': 'boolean', 'description': 'Is false if channelback is disabled, true otherwise'},
230
+ 'allow_attachments': {'type': 'boolean', 'description': 'Permission for agents to add attachments to a comment'},
231
+ 'from_messaging_channel': {'type': 'boolean', 'description': "If true, the ticket's via type is a messaging channel"},
232
+ 'generated_timestamp': {'type': 'integer', 'description': 'A Unix timestamp for the ticket'},
233
+ 'created_at': {
234
+ 'type': 'string',
235
+ 'format': 'date-time',
236
+ 'description': 'When this record was created',
237
+ },
238
+ 'updated_at': {
239
+ 'type': 'string',
240
+ 'format': 'date-time',
241
+ 'description': 'When this record was last updated',
242
+ },
243
+ 'via': {'type': 'object', 'description': 'How the ticket was created'},
244
+ },
245
+ 'required': ['id'],
246
+ 'x-airbyte-entity-name': 'tickets',
247
+ },
248
+ },
249
+ 'next_page': {
250
+ 'type': ['string', 'null'],
251
+ 'description': 'URL to the next page of results',
252
+ },
253
+ 'previous_page': {
254
+ 'type': ['string', 'null'],
255
+ 'description': 'URL to the previous page of results',
256
+ },
257
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
258
+ },
259
+ },
260
+ record_extractor='$.tickets',
261
+ meta_extractor={
262
+ 'next_page': '$.next_page',
263
+ 'previous_page': '$.previous_page',
264
+ 'count': '$.count',
265
+ },
266
+ ),
267
+ Action.GET: EndpointDefinition(
268
+ method='GET',
269
+ path='/tickets/{ticket_id}.json',
270
+ action=Action.GET,
271
+ description='Returns a ticket by its ID',
272
+ path_params=['ticket_id'],
273
+ path_params_schema={
274
+ 'ticket_id': {'type': 'integer', 'required': True},
275
+ },
276
+ response_schema={
277
+ 'type': 'object',
278
+ 'properties': {
279
+ 'ticket': {
280
+ 'type': 'object',
281
+ 'description': 'Zendesk Support ticket object',
282
+ 'properties': {
283
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the ticket is created'},
284
+ 'url': {'type': 'string', 'description': 'The API url of this ticket'},
285
+ 'external_id': {
286
+ 'type': ['string', 'null'],
287
+ 'description': 'An id you can use to link Zendesk Support tickets to local records',
288
+ },
289
+ 'type': {
290
+ 'type': ['string', 'null'],
291
+ 'description': 'The type of this ticket (problem, incident, question, task)',
292
+ },
293
+ 'subject': {
294
+ 'type': ['string', 'null'],
295
+ 'description': 'The value of the subject field for this ticket',
296
+ },
297
+ 'raw_subject': {
298
+ 'type': ['string', 'null'],
299
+ 'description': 'The dynamic content placeholder or the subject value',
300
+ },
301
+ 'description': {'type': 'string', 'description': 'Read-only first comment on the ticket'},
302
+ 'priority': {
303
+ 'type': ['string', 'null'],
304
+ 'description': 'The urgency with which the ticket should be addressed (urgent, high, normal, low)',
305
+ },
306
+ 'status': {
307
+ 'type': 'string',
308
+ 'enum': [
309
+ 'new',
310
+ 'open',
311
+ 'pending',
312
+ 'hold',
313
+ 'solved',
314
+ 'closed',
315
+ ],
316
+ 'description': 'The state of the ticket',
317
+ },
318
+ 'recipient': {
319
+ 'type': ['string', 'null'],
320
+ 'description': 'The original recipient e-mail address of the ticket',
321
+ },
322
+ 'requester_id': {'type': 'integer', 'description': 'The user who requested this ticket'},
323
+ 'submitter_id': {'type': 'integer', 'description': 'The user who submitted the ticket'},
324
+ 'assignee_id': {
325
+ 'type': ['integer', 'null'],
326
+ 'description': 'The agent currently assigned to the ticket',
327
+ },
328
+ 'organization_id': {
329
+ 'type': ['integer', 'null'],
330
+ 'description': 'The organization of the requester',
331
+ },
332
+ 'group_id': {
333
+ 'type': ['integer', 'null'],
334
+ 'description': 'The group this ticket is assigned to',
335
+ },
336
+ 'collaborator_ids': {
337
+ 'type': 'array',
338
+ 'items': {'type': 'integer'},
339
+ 'description': "The ids of users currently CC'ed on the ticket",
340
+ },
341
+ 'follower_ids': {
342
+ 'type': 'array',
343
+ 'items': {'type': 'integer'},
344
+ 'description': 'The ids of agents currently following the ticket',
345
+ },
346
+ 'email_cc_ids': {
347
+ 'type': 'array',
348
+ 'items': {'type': 'integer'},
349
+ 'description': "The ids of agents or end users currently CC'ed on the ticket",
350
+ },
351
+ 'forum_topic_id': {
352
+ 'type': ['integer', 'null'],
353
+ 'description': 'The topic in the Zendesk Web portal this ticket originated from',
354
+ },
355
+ 'problem_id': {
356
+ 'type': ['integer', 'null'],
357
+ 'description': 'For tickets of type incident, the ID of the problem the incident is linked to',
358
+ },
359
+ 'has_incidents': {'type': 'boolean', 'description': 'Is true if a ticket is a problem type and has one or more incidents linked to it'},
360
+ 'is_public': {'type': 'boolean', 'description': 'Is true if any comments are public, false otherwise'},
361
+ 'due_at': {
362
+ 'type': ['string', 'null'],
363
+ 'format': 'date-time',
364
+ 'description': 'If this is a ticket of type task it has a due date',
365
+ },
366
+ 'tags': {
367
+ 'type': 'array',
368
+ 'items': {'type': 'string'},
369
+ 'description': 'The array of tags applied to this ticket',
370
+ },
371
+ 'custom_fields': {
372
+ 'type': 'array',
373
+ 'items': {'type': 'object'},
374
+ 'description': 'Custom fields for the ticket',
375
+ },
376
+ 'satisfaction_rating': {'type': 'object', 'description': 'The satisfaction rating of the ticket'},
377
+ 'sharing_agreement_ids': {
378
+ 'type': 'array',
379
+ 'items': {'type': 'integer'},
380
+ 'description': 'The ids of the sharing agreements used for this ticket',
381
+ },
382
+ 'custom_status_id': {'type': 'integer', 'description': 'The custom ticket status id of the ticket'},
383
+ 'fields': {
384
+ 'type': 'array',
385
+ 'items': {'type': 'object'},
386
+ 'description': 'Ticket fields',
387
+ },
388
+ 'followup_ids': {
389
+ 'type': 'array',
390
+ 'items': {'type': 'integer'},
391
+ 'description': 'The ids of the followups created from this ticket',
392
+ },
393
+ 'ticket_form_id': {'type': 'integer', 'description': 'Enterprise only. The id of the ticket form to render for the ticket'},
394
+ 'brand_id': {'type': 'integer', 'description': 'Enterprise only. The id of the brand this ticket is associated with'},
395
+ 'allow_channelback': {'type': 'boolean', 'description': 'Is false if channelback is disabled, true otherwise'},
396
+ 'allow_attachments': {'type': 'boolean', 'description': 'Permission for agents to add attachments to a comment'},
397
+ 'from_messaging_channel': {'type': 'boolean', 'description': "If true, the ticket's via type is a messaging channel"},
398
+ 'generated_timestamp': {'type': 'integer', 'description': 'A Unix timestamp for the ticket'},
399
+ 'created_at': {
400
+ 'type': 'string',
401
+ 'format': 'date-time',
402
+ 'description': 'When this record was created',
403
+ },
404
+ 'updated_at': {
405
+ 'type': 'string',
406
+ 'format': 'date-time',
407
+ 'description': 'When this record was last updated',
408
+ },
409
+ 'via': {'type': 'object', 'description': 'How the ticket was created'},
410
+ },
411
+ 'required': ['id'],
412
+ 'x-airbyte-entity-name': 'tickets',
413
+ },
414
+ },
415
+ },
416
+ record_extractor='$.ticket',
417
+ ),
418
+ },
419
+ entity_schema={
420
+ 'type': 'object',
421
+ 'description': 'Zendesk Support ticket object',
422
+ 'properties': {
423
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the ticket is created'},
424
+ 'url': {'type': 'string', 'description': 'The API url of this ticket'},
425
+ 'external_id': {
426
+ 'type': ['string', 'null'],
427
+ 'description': 'An id you can use to link Zendesk Support tickets to local records',
428
+ },
429
+ 'type': {
430
+ 'type': ['string', 'null'],
431
+ 'description': 'The type of this ticket (problem, incident, question, task)',
432
+ },
433
+ 'subject': {
434
+ 'type': ['string', 'null'],
435
+ 'description': 'The value of the subject field for this ticket',
436
+ },
437
+ 'raw_subject': {
438
+ 'type': ['string', 'null'],
439
+ 'description': 'The dynamic content placeholder or the subject value',
440
+ },
441
+ 'description': {'type': 'string', 'description': 'Read-only first comment on the ticket'},
442
+ 'priority': {
443
+ 'type': ['string', 'null'],
444
+ 'description': 'The urgency with which the ticket should be addressed (urgent, high, normal, low)',
445
+ },
446
+ 'status': {
447
+ 'type': 'string',
448
+ 'enum': [
449
+ 'new',
450
+ 'open',
451
+ 'pending',
452
+ 'hold',
453
+ 'solved',
454
+ 'closed',
455
+ ],
456
+ 'description': 'The state of the ticket',
457
+ },
458
+ 'recipient': {
459
+ 'type': ['string', 'null'],
460
+ 'description': 'The original recipient e-mail address of the ticket',
461
+ },
462
+ 'requester_id': {'type': 'integer', 'description': 'The user who requested this ticket'},
463
+ 'submitter_id': {'type': 'integer', 'description': 'The user who submitted the ticket'},
464
+ 'assignee_id': {
465
+ 'type': ['integer', 'null'],
466
+ 'description': 'The agent currently assigned to the ticket',
467
+ },
468
+ 'organization_id': {
469
+ 'type': ['integer', 'null'],
470
+ 'description': 'The organization of the requester',
471
+ },
472
+ 'group_id': {
473
+ 'type': ['integer', 'null'],
474
+ 'description': 'The group this ticket is assigned to',
475
+ },
476
+ 'collaborator_ids': {
477
+ 'type': 'array',
478
+ 'items': {'type': 'integer'},
479
+ 'description': "The ids of users currently CC'ed on the ticket",
480
+ },
481
+ 'follower_ids': {
482
+ 'type': 'array',
483
+ 'items': {'type': 'integer'},
484
+ 'description': 'The ids of agents currently following the ticket',
485
+ },
486
+ 'email_cc_ids': {
487
+ 'type': 'array',
488
+ 'items': {'type': 'integer'},
489
+ 'description': "The ids of agents or end users currently CC'ed on the ticket",
490
+ },
491
+ 'forum_topic_id': {
492
+ 'type': ['integer', 'null'],
493
+ 'description': 'The topic in the Zendesk Web portal this ticket originated from',
494
+ },
495
+ 'problem_id': {
496
+ 'type': ['integer', 'null'],
497
+ 'description': 'For tickets of type incident, the ID of the problem the incident is linked to',
498
+ },
499
+ 'has_incidents': {'type': 'boolean', 'description': 'Is true if a ticket is a problem type and has one or more incidents linked to it'},
500
+ 'is_public': {'type': 'boolean', 'description': 'Is true if any comments are public, false otherwise'},
501
+ 'due_at': {
502
+ 'type': ['string', 'null'],
503
+ 'format': 'date-time',
504
+ 'description': 'If this is a ticket of type task it has a due date',
505
+ },
506
+ 'tags': {
507
+ 'type': 'array',
508
+ 'items': {'type': 'string'},
509
+ 'description': 'The array of tags applied to this ticket',
510
+ },
511
+ 'custom_fields': {
512
+ 'type': 'array',
513
+ 'items': {'type': 'object'},
514
+ 'description': 'Custom fields for the ticket',
515
+ },
516
+ 'satisfaction_rating': {'type': 'object', 'description': 'The satisfaction rating of the ticket'},
517
+ 'sharing_agreement_ids': {
518
+ 'type': 'array',
519
+ 'items': {'type': 'integer'},
520
+ 'description': 'The ids of the sharing agreements used for this ticket',
521
+ },
522
+ 'custom_status_id': {'type': 'integer', 'description': 'The custom ticket status id of the ticket'},
523
+ 'fields': {
524
+ 'type': 'array',
525
+ 'items': {'type': 'object'},
526
+ 'description': 'Ticket fields',
527
+ },
528
+ 'followup_ids': {
529
+ 'type': 'array',
530
+ 'items': {'type': 'integer'},
531
+ 'description': 'The ids of the followups created from this ticket',
532
+ },
533
+ 'ticket_form_id': {'type': 'integer', 'description': 'Enterprise only. The id of the ticket form to render for the ticket'},
534
+ 'brand_id': {'type': 'integer', 'description': 'Enterprise only. The id of the brand this ticket is associated with'},
535
+ 'allow_channelback': {'type': 'boolean', 'description': 'Is false if channelback is disabled, true otherwise'},
536
+ 'allow_attachments': {'type': 'boolean', 'description': 'Permission for agents to add attachments to a comment'},
537
+ 'from_messaging_channel': {'type': 'boolean', 'description': "If true, the ticket's via type is a messaging channel"},
538
+ 'generated_timestamp': {'type': 'integer', 'description': 'A Unix timestamp for the ticket'},
539
+ 'created_at': {
540
+ 'type': 'string',
541
+ 'format': 'date-time',
542
+ 'description': 'When this record was created',
543
+ },
544
+ 'updated_at': {
545
+ 'type': 'string',
546
+ 'format': 'date-time',
547
+ 'description': 'When this record was last updated',
548
+ },
549
+ 'via': {'type': 'object', 'description': 'How the ticket was created'},
550
+ },
551
+ 'required': ['id'],
552
+ 'x-airbyte-entity-name': 'tickets',
553
+ },
554
+ ),
555
+ EntityDefinition(
556
+ name='users',
557
+ actions=[Action.LIST, Action.GET],
558
+ endpoints={
559
+ Action.LIST: EndpointDefinition(
560
+ method='GET',
561
+ path='/users.json',
562
+ action=Action.LIST,
563
+ description='Returns a list of all users in your account',
564
+ query_params=['page', 'role', 'external_id'],
565
+ query_params_schema={
566
+ 'page': {'type': 'integer', 'required': False},
567
+ 'role': {'type': 'string', 'required': False},
568
+ 'external_id': {'type': 'string', 'required': False},
569
+ },
570
+ response_schema={
571
+ 'type': 'object',
572
+ 'properties': {
573
+ 'users': {
574
+ 'type': 'array',
575
+ 'items': {
576
+ 'type': 'object',
577
+ 'description': 'Zendesk Support user object',
578
+ 'properties': {
579
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the user is created'},
580
+ 'url': {'type': 'string', 'description': "The user's API url"},
581
+ 'name': {'type': 'string', 'description': "The user's name"},
582
+ 'email': {
583
+ 'type': ['string', 'null'],
584
+ 'description': "The user's primary email address",
585
+ },
586
+ 'alias': {
587
+ 'type': ['string', 'null'],
588
+ 'description': 'An alias displayed to end users',
589
+ },
590
+ 'phone': {
591
+ 'type': ['string', 'null'],
592
+ 'description': "The user's primary phone number",
593
+ },
594
+ 'time_zone': {'type': 'string', 'description': "The user's time zone"},
595
+ 'locale': {'type': 'string', 'description': "The user's locale"},
596
+ 'locale_id': {'type': 'integer', 'description': "The user's language identifier"},
597
+ 'organization_id': {
598
+ 'type': ['integer', 'null'],
599
+ 'description': "The id of the user's organization",
600
+ },
601
+ 'role': {
602
+ 'type': 'string',
603
+ 'enum': ['end-user', 'agent', 'admin'],
604
+ 'description': "The user's role",
605
+ },
606
+ 'role_type': {
607
+ 'type': ['integer', 'null'],
608
+ 'description': "The user's role id",
609
+ },
610
+ 'custom_role_id': {
611
+ 'type': ['integer', 'null'],
612
+ 'description': 'A custom role if the user is an agent on the Enterprise plan',
613
+ },
614
+ 'external_id': {
615
+ 'type': ['string', 'null'],
616
+ 'description': 'A unique identifier from another system',
617
+ },
618
+ 'tags': {
619
+ 'type': 'array',
620
+ 'items': {'type': 'string'},
621
+ 'description': "The user's tags",
622
+ },
623
+ 'active': {'type': 'boolean', 'description': 'False if the user has been deleted'},
624
+ 'verified': {'type': 'boolean', 'description': "If the user's primary identity is verified or not"},
625
+ 'shared': {'type': 'boolean', 'description': 'If the user is shared from a different Zendesk Support instance'},
626
+ 'shared_agent': {'type': 'boolean', 'description': 'If the user is a shared agent from a different Zendesk Support instance'},
627
+ 'shared_phone_number': {
628
+ 'type': ['boolean', 'null'],
629
+ 'description': 'Whether the phone number is shared or not',
630
+ },
631
+ 'signature': {
632
+ 'type': ['string', 'null'],
633
+ 'description': "The user's signature",
634
+ },
635
+ 'details': {
636
+ 'type': ['string', 'null'],
637
+ 'description': 'Any details you want to store about the user',
638
+ },
639
+ 'notes': {
640
+ 'type': ['string', 'null'],
641
+ 'description': 'Any notes you want to store about the user',
642
+ },
643
+ 'suspended': {'type': 'boolean', 'description': 'If the agent is suspended'},
644
+ 'restricted_agent': {'type': 'boolean', 'description': 'If the agent has any restrictions'},
645
+ 'only_private_comments': {'type': 'boolean', 'description': 'True if the user can only create private comments'},
646
+ 'moderator': {'type': 'boolean', 'description': 'If the user has forum moderation capabilities'},
647
+ 'ticket_restriction': {
648
+ 'type': ['string', 'null'],
649
+ 'description': 'Specifies which tickets the user has access to',
650
+ },
651
+ 'default_group_id': {
652
+ 'type': ['integer', 'null'],
653
+ 'description': "The id of the user's default group",
654
+ },
655
+ 'report_csv': {'type': 'boolean', 'description': 'Whether or not the user can access the CSV report'},
656
+ 'photo': {
657
+ 'type': ['object', 'null'],
658
+ 'description': "The user's profile picture",
659
+ },
660
+ 'user_fields': {'type': 'object', 'description': 'Custom fields for the user'},
661
+ 'last_login_at': {
662
+ 'type': ['string', 'null'],
663
+ 'format': 'date-time',
664
+ 'description': 'The last time the user signed in to Zendesk Support',
665
+ },
666
+ 'two_factor_auth_enabled': {
667
+ 'type': ['boolean', 'null'],
668
+ 'description': 'If two-factor authentication is enabled',
669
+ },
670
+ 'iana_time_zone': {'type': 'string', 'description': "The user's IANA time zone name"},
671
+ 'permanently_deleted': {'type': 'boolean', 'description': 'If the user has been permanently deleted'},
672
+ 'created_at': {
673
+ 'type': 'string',
674
+ 'format': 'date-time',
675
+ 'description': 'When the user was created',
676
+ },
677
+ 'updated_at': {
678
+ 'type': 'string',
679
+ 'format': 'date-time',
680
+ 'description': 'When the user was last updated',
681
+ },
682
+ },
683
+ 'required': ['id'],
684
+ 'x-airbyte-entity-name': 'users',
685
+ },
686
+ },
687
+ 'next_page': {
688
+ 'type': ['string', 'null'],
689
+ 'description': 'URL to the next page of results',
690
+ },
691
+ 'previous_page': {
692
+ 'type': ['string', 'null'],
693
+ 'description': 'URL to the previous page of results',
694
+ },
695
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
696
+ },
697
+ },
698
+ record_extractor='$.users',
699
+ meta_extractor={
700
+ 'next_page': '$.next_page',
701
+ 'previous_page': '$.previous_page',
702
+ 'count': '$.count',
703
+ },
704
+ ),
705
+ Action.GET: EndpointDefinition(
706
+ method='GET',
707
+ path='/users/{user_id}.json',
708
+ action=Action.GET,
709
+ description='Returns a user by their ID',
710
+ path_params=['user_id'],
711
+ path_params_schema={
712
+ 'user_id': {'type': 'integer', 'required': True},
713
+ },
714
+ response_schema={
715
+ 'type': 'object',
716
+ 'properties': {
717
+ 'user': {
718
+ 'type': 'object',
719
+ 'description': 'Zendesk Support user object',
720
+ 'properties': {
721
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the user is created'},
722
+ 'url': {'type': 'string', 'description': "The user's API url"},
723
+ 'name': {'type': 'string', 'description': "The user's name"},
724
+ 'email': {
725
+ 'type': ['string', 'null'],
726
+ 'description': "The user's primary email address",
727
+ },
728
+ 'alias': {
729
+ 'type': ['string', 'null'],
730
+ 'description': 'An alias displayed to end users',
731
+ },
732
+ 'phone': {
733
+ 'type': ['string', 'null'],
734
+ 'description': "The user's primary phone number",
735
+ },
736
+ 'time_zone': {'type': 'string', 'description': "The user's time zone"},
737
+ 'locale': {'type': 'string', 'description': "The user's locale"},
738
+ 'locale_id': {'type': 'integer', 'description': "The user's language identifier"},
739
+ 'organization_id': {
740
+ 'type': ['integer', 'null'],
741
+ 'description': "The id of the user's organization",
742
+ },
743
+ 'role': {
744
+ 'type': 'string',
745
+ 'enum': ['end-user', 'agent', 'admin'],
746
+ 'description': "The user's role",
747
+ },
748
+ 'role_type': {
749
+ 'type': ['integer', 'null'],
750
+ 'description': "The user's role id",
751
+ },
752
+ 'custom_role_id': {
753
+ 'type': ['integer', 'null'],
754
+ 'description': 'A custom role if the user is an agent on the Enterprise plan',
755
+ },
756
+ 'external_id': {
757
+ 'type': ['string', 'null'],
758
+ 'description': 'A unique identifier from another system',
759
+ },
760
+ 'tags': {
761
+ 'type': 'array',
762
+ 'items': {'type': 'string'},
763
+ 'description': "The user's tags",
764
+ },
765
+ 'active': {'type': 'boolean', 'description': 'False if the user has been deleted'},
766
+ 'verified': {'type': 'boolean', 'description': "If the user's primary identity is verified or not"},
767
+ 'shared': {'type': 'boolean', 'description': 'If the user is shared from a different Zendesk Support instance'},
768
+ 'shared_agent': {'type': 'boolean', 'description': 'If the user is a shared agent from a different Zendesk Support instance'},
769
+ 'shared_phone_number': {
770
+ 'type': ['boolean', 'null'],
771
+ 'description': 'Whether the phone number is shared or not',
772
+ },
773
+ 'signature': {
774
+ 'type': ['string', 'null'],
775
+ 'description': "The user's signature",
776
+ },
777
+ 'details': {
778
+ 'type': ['string', 'null'],
779
+ 'description': 'Any details you want to store about the user',
780
+ },
781
+ 'notes': {
782
+ 'type': ['string', 'null'],
783
+ 'description': 'Any notes you want to store about the user',
784
+ },
785
+ 'suspended': {'type': 'boolean', 'description': 'If the agent is suspended'},
786
+ 'restricted_agent': {'type': 'boolean', 'description': 'If the agent has any restrictions'},
787
+ 'only_private_comments': {'type': 'boolean', 'description': 'True if the user can only create private comments'},
788
+ 'moderator': {'type': 'boolean', 'description': 'If the user has forum moderation capabilities'},
789
+ 'ticket_restriction': {
790
+ 'type': ['string', 'null'],
791
+ 'description': 'Specifies which tickets the user has access to',
792
+ },
793
+ 'default_group_id': {
794
+ 'type': ['integer', 'null'],
795
+ 'description': "The id of the user's default group",
796
+ },
797
+ 'report_csv': {'type': 'boolean', 'description': 'Whether or not the user can access the CSV report'},
798
+ 'photo': {
799
+ 'type': ['object', 'null'],
800
+ 'description': "The user's profile picture",
801
+ },
802
+ 'user_fields': {'type': 'object', 'description': 'Custom fields for the user'},
803
+ 'last_login_at': {
804
+ 'type': ['string', 'null'],
805
+ 'format': 'date-time',
806
+ 'description': 'The last time the user signed in to Zendesk Support',
807
+ },
808
+ 'two_factor_auth_enabled': {
809
+ 'type': ['boolean', 'null'],
810
+ 'description': 'If two-factor authentication is enabled',
811
+ },
812
+ 'iana_time_zone': {'type': 'string', 'description': "The user's IANA time zone name"},
813
+ 'permanently_deleted': {'type': 'boolean', 'description': 'If the user has been permanently deleted'},
814
+ 'created_at': {
815
+ 'type': 'string',
816
+ 'format': 'date-time',
817
+ 'description': 'When the user was created',
818
+ },
819
+ 'updated_at': {
820
+ 'type': 'string',
821
+ 'format': 'date-time',
822
+ 'description': 'When the user was last updated',
823
+ },
824
+ },
825
+ 'required': ['id'],
826
+ 'x-airbyte-entity-name': 'users',
827
+ },
828
+ },
829
+ },
830
+ record_extractor='$.user',
831
+ ),
832
+ },
833
+ entity_schema={
834
+ 'type': 'object',
835
+ 'description': 'Zendesk Support user object',
836
+ 'properties': {
837
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the user is created'},
838
+ 'url': {'type': 'string', 'description': "The user's API url"},
839
+ 'name': {'type': 'string', 'description': "The user's name"},
840
+ 'email': {
841
+ 'type': ['string', 'null'],
842
+ 'description': "The user's primary email address",
843
+ },
844
+ 'alias': {
845
+ 'type': ['string', 'null'],
846
+ 'description': 'An alias displayed to end users',
847
+ },
848
+ 'phone': {
849
+ 'type': ['string', 'null'],
850
+ 'description': "The user's primary phone number",
851
+ },
852
+ 'time_zone': {'type': 'string', 'description': "The user's time zone"},
853
+ 'locale': {'type': 'string', 'description': "The user's locale"},
854
+ 'locale_id': {'type': 'integer', 'description': "The user's language identifier"},
855
+ 'organization_id': {
856
+ 'type': ['integer', 'null'],
857
+ 'description': "The id of the user's organization",
858
+ },
859
+ 'role': {
860
+ 'type': 'string',
861
+ 'enum': ['end-user', 'agent', 'admin'],
862
+ 'description': "The user's role",
863
+ },
864
+ 'role_type': {
865
+ 'type': ['integer', 'null'],
866
+ 'description': "The user's role id",
867
+ },
868
+ 'custom_role_id': {
869
+ 'type': ['integer', 'null'],
870
+ 'description': 'A custom role if the user is an agent on the Enterprise plan',
871
+ },
872
+ 'external_id': {
873
+ 'type': ['string', 'null'],
874
+ 'description': 'A unique identifier from another system',
875
+ },
876
+ 'tags': {
877
+ 'type': 'array',
878
+ 'items': {'type': 'string'},
879
+ 'description': "The user's tags",
880
+ },
881
+ 'active': {'type': 'boolean', 'description': 'False if the user has been deleted'},
882
+ 'verified': {'type': 'boolean', 'description': "If the user's primary identity is verified or not"},
883
+ 'shared': {'type': 'boolean', 'description': 'If the user is shared from a different Zendesk Support instance'},
884
+ 'shared_agent': {'type': 'boolean', 'description': 'If the user is a shared agent from a different Zendesk Support instance'},
885
+ 'shared_phone_number': {
886
+ 'type': ['boolean', 'null'],
887
+ 'description': 'Whether the phone number is shared or not',
888
+ },
889
+ 'signature': {
890
+ 'type': ['string', 'null'],
891
+ 'description': "The user's signature",
892
+ },
893
+ 'details': {
894
+ 'type': ['string', 'null'],
895
+ 'description': 'Any details you want to store about the user',
896
+ },
897
+ 'notes': {
898
+ 'type': ['string', 'null'],
899
+ 'description': 'Any notes you want to store about the user',
900
+ },
901
+ 'suspended': {'type': 'boolean', 'description': 'If the agent is suspended'},
902
+ 'restricted_agent': {'type': 'boolean', 'description': 'If the agent has any restrictions'},
903
+ 'only_private_comments': {'type': 'boolean', 'description': 'True if the user can only create private comments'},
904
+ 'moderator': {'type': 'boolean', 'description': 'If the user has forum moderation capabilities'},
905
+ 'ticket_restriction': {
906
+ 'type': ['string', 'null'],
907
+ 'description': 'Specifies which tickets the user has access to',
908
+ },
909
+ 'default_group_id': {
910
+ 'type': ['integer', 'null'],
911
+ 'description': "The id of the user's default group",
912
+ },
913
+ 'report_csv': {'type': 'boolean', 'description': 'Whether or not the user can access the CSV report'},
914
+ 'photo': {
915
+ 'type': ['object', 'null'],
916
+ 'description': "The user's profile picture",
917
+ },
918
+ 'user_fields': {'type': 'object', 'description': 'Custom fields for the user'},
919
+ 'last_login_at': {
920
+ 'type': ['string', 'null'],
921
+ 'format': 'date-time',
922
+ 'description': 'The last time the user signed in to Zendesk Support',
923
+ },
924
+ 'two_factor_auth_enabled': {
925
+ 'type': ['boolean', 'null'],
926
+ 'description': 'If two-factor authentication is enabled',
927
+ },
928
+ 'iana_time_zone': {'type': 'string', 'description': "The user's IANA time zone name"},
929
+ 'permanently_deleted': {'type': 'boolean', 'description': 'If the user has been permanently deleted'},
930
+ 'created_at': {
931
+ 'type': 'string',
932
+ 'format': 'date-time',
933
+ 'description': 'When the user was created',
934
+ },
935
+ 'updated_at': {
936
+ 'type': 'string',
937
+ 'format': 'date-time',
938
+ 'description': 'When the user was last updated',
939
+ },
940
+ },
941
+ 'required': ['id'],
942
+ 'x-airbyte-entity-name': 'users',
943
+ },
944
+ ),
945
+ EntityDefinition(
946
+ name='organizations',
947
+ actions=[Action.LIST, Action.GET],
948
+ endpoints={
949
+ Action.LIST: EndpointDefinition(
950
+ method='GET',
951
+ path='/organizations.json',
952
+ action=Action.LIST,
953
+ description='Returns a list of all organizations in your account',
954
+ query_params=['page'],
955
+ query_params_schema={
956
+ 'page': {'type': 'integer', 'required': False},
957
+ },
958
+ response_schema={
959
+ 'type': 'object',
960
+ 'properties': {
961
+ 'organizations': {
962
+ 'type': 'array',
963
+ 'items': {
964
+ 'type': 'object',
965
+ 'description': 'Zendesk Support organization object',
966
+ 'properties': {
967
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the organization is created'},
968
+ 'url': {'type': 'string', 'description': 'The API url of this organization'},
969
+ 'name': {'type': 'string', 'description': 'A unique name for the organization'},
970
+ 'details': {
971
+ 'type': ['string', 'null'],
972
+ 'description': 'Any details about the organization',
973
+ },
974
+ 'notes': {
975
+ 'type': ['string', 'null'],
976
+ 'description': 'Any notes about the organization',
977
+ },
978
+ 'group_id': {
979
+ 'type': ['integer', 'null'],
980
+ 'description': 'New tickets from users in this organization are automatically put in this group',
981
+ },
982
+ 'shared_tickets': {'type': 'boolean', 'description': "End users in this organization are able to see each other's tickets"},
983
+ 'shared_comments': {'type': 'boolean', 'description': "End users in this organization are able to comment on each other's tickets"},
984
+ 'external_id': {
985
+ 'type': ['string', 'null'],
986
+ 'description': 'A unique external id to associate organizations to an external record',
987
+ },
988
+ 'domain_names': {
989
+ 'type': 'array',
990
+ 'items': {'type': 'string'},
991
+ 'description': 'An array of domain names associated with this organization',
992
+ },
993
+ 'tags': {
994
+ 'type': 'array',
995
+ 'items': {'type': 'string'},
996
+ 'description': 'The tags of the organization',
997
+ },
998
+ 'organization_fields': {'type': 'object', 'description': 'Custom fields for this organization'},
999
+ 'created_at': {
1000
+ 'type': 'string',
1001
+ 'format': 'date-time',
1002
+ 'description': 'When the organization was created',
1003
+ },
1004
+ 'updated_at': {
1005
+ 'type': 'string',
1006
+ 'format': 'date-time',
1007
+ 'description': 'When the organization was last updated',
1008
+ },
1009
+ },
1010
+ 'required': ['id'],
1011
+ 'x-airbyte-entity-name': 'organizations',
1012
+ },
1013
+ },
1014
+ 'next_page': {
1015
+ 'type': ['string', 'null'],
1016
+ 'description': 'URL to the next page of results',
1017
+ },
1018
+ 'previous_page': {
1019
+ 'type': ['string', 'null'],
1020
+ 'description': 'URL to the previous page of results',
1021
+ },
1022
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
1023
+ },
1024
+ },
1025
+ record_extractor='$.organizations',
1026
+ meta_extractor={
1027
+ 'next_page': '$.next_page',
1028
+ 'previous_page': '$.previous_page',
1029
+ 'count': '$.count',
1030
+ },
1031
+ ),
1032
+ Action.GET: EndpointDefinition(
1033
+ method='GET',
1034
+ path='/organizations/{organization_id}.json',
1035
+ action=Action.GET,
1036
+ description='Returns an organization by its ID',
1037
+ path_params=['organization_id'],
1038
+ path_params_schema={
1039
+ 'organization_id': {'type': 'integer', 'required': True},
1040
+ },
1041
+ response_schema={
1042
+ 'type': 'object',
1043
+ 'properties': {
1044
+ 'organization': {
1045
+ 'type': 'object',
1046
+ 'description': 'Zendesk Support organization object',
1047
+ 'properties': {
1048
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the organization is created'},
1049
+ 'url': {'type': 'string', 'description': 'The API url of this organization'},
1050
+ 'name': {'type': 'string', 'description': 'A unique name for the organization'},
1051
+ 'details': {
1052
+ 'type': ['string', 'null'],
1053
+ 'description': 'Any details about the organization',
1054
+ },
1055
+ 'notes': {
1056
+ 'type': ['string', 'null'],
1057
+ 'description': 'Any notes about the organization',
1058
+ },
1059
+ 'group_id': {
1060
+ 'type': ['integer', 'null'],
1061
+ 'description': 'New tickets from users in this organization are automatically put in this group',
1062
+ },
1063
+ 'shared_tickets': {'type': 'boolean', 'description': "End users in this organization are able to see each other's tickets"},
1064
+ 'shared_comments': {'type': 'boolean', 'description': "End users in this organization are able to comment on each other's tickets"},
1065
+ 'external_id': {
1066
+ 'type': ['string', 'null'],
1067
+ 'description': 'A unique external id to associate organizations to an external record',
1068
+ },
1069
+ 'domain_names': {
1070
+ 'type': 'array',
1071
+ 'items': {'type': 'string'},
1072
+ 'description': 'An array of domain names associated with this organization',
1073
+ },
1074
+ 'tags': {
1075
+ 'type': 'array',
1076
+ 'items': {'type': 'string'},
1077
+ 'description': 'The tags of the organization',
1078
+ },
1079
+ 'organization_fields': {'type': 'object', 'description': 'Custom fields for this organization'},
1080
+ 'created_at': {
1081
+ 'type': 'string',
1082
+ 'format': 'date-time',
1083
+ 'description': 'When the organization was created',
1084
+ },
1085
+ 'updated_at': {
1086
+ 'type': 'string',
1087
+ 'format': 'date-time',
1088
+ 'description': 'When the organization was last updated',
1089
+ },
1090
+ },
1091
+ 'required': ['id'],
1092
+ 'x-airbyte-entity-name': 'organizations',
1093
+ },
1094
+ },
1095
+ },
1096
+ record_extractor='$.organization',
1097
+ ),
1098
+ },
1099
+ entity_schema={
1100
+ 'type': 'object',
1101
+ 'description': 'Zendesk Support organization object',
1102
+ 'properties': {
1103
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the organization is created'},
1104
+ 'url': {'type': 'string', 'description': 'The API url of this organization'},
1105
+ 'name': {'type': 'string', 'description': 'A unique name for the organization'},
1106
+ 'details': {
1107
+ 'type': ['string', 'null'],
1108
+ 'description': 'Any details about the organization',
1109
+ },
1110
+ 'notes': {
1111
+ 'type': ['string', 'null'],
1112
+ 'description': 'Any notes about the organization',
1113
+ },
1114
+ 'group_id': {
1115
+ 'type': ['integer', 'null'],
1116
+ 'description': 'New tickets from users in this organization are automatically put in this group',
1117
+ },
1118
+ 'shared_tickets': {'type': 'boolean', 'description': "End users in this organization are able to see each other's tickets"},
1119
+ 'shared_comments': {'type': 'boolean', 'description': "End users in this organization are able to comment on each other's tickets"},
1120
+ 'external_id': {
1121
+ 'type': ['string', 'null'],
1122
+ 'description': 'A unique external id to associate organizations to an external record',
1123
+ },
1124
+ 'domain_names': {
1125
+ 'type': 'array',
1126
+ 'items': {'type': 'string'},
1127
+ 'description': 'An array of domain names associated with this organization',
1128
+ },
1129
+ 'tags': {
1130
+ 'type': 'array',
1131
+ 'items': {'type': 'string'},
1132
+ 'description': 'The tags of the organization',
1133
+ },
1134
+ 'organization_fields': {'type': 'object', 'description': 'Custom fields for this organization'},
1135
+ 'created_at': {
1136
+ 'type': 'string',
1137
+ 'format': 'date-time',
1138
+ 'description': 'When the organization was created',
1139
+ },
1140
+ 'updated_at': {
1141
+ 'type': 'string',
1142
+ 'format': 'date-time',
1143
+ 'description': 'When the organization was last updated',
1144
+ },
1145
+ },
1146
+ 'required': ['id'],
1147
+ 'x-airbyte-entity-name': 'organizations',
1148
+ },
1149
+ ),
1150
+ EntityDefinition(
1151
+ name='groups',
1152
+ actions=[Action.LIST, Action.GET],
1153
+ endpoints={
1154
+ Action.LIST: EndpointDefinition(
1155
+ method='GET',
1156
+ path='/groups.json',
1157
+ action=Action.LIST,
1158
+ description='Returns a list of all groups in your account',
1159
+ query_params=['page', 'exclude_deleted'],
1160
+ query_params_schema={
1161
+ 'page': {'type': 'integer', 'required': False},
1162
+ 'exclude_deleted': {
1163
+ 'type': 'boolean',
1164
+ 'required': False,
1165
+ 'default': False,
1166
+ },
1167
+ },
1168
+ response_schema={
1169
+ 'type': 'object',
1170
+ 'properties': {
1171
+ 'groups': {
1172
+ 'type': 'array',
1173
+ 'items': {
1174
+ 'type': 'object',
1175
+ 'description': 'Zendesk Support group object',
1176
+ 'properties': {
1177
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when creating groups'},
1178
+ 'url': {'type': 'string', 'description': 'The API url of the group'},
1179
+ 'name': {'type': 'string', 'description': 'The name of the group'},
1180
+ 'description': {'type': 'string', 'description': 'The description of the group'},
1181
+ 'default': {'type': 'boolean', 'description': 'If the group is the default one for the account'},
1182
+ 'deleted': {'type': 'boolean', 'description': 'Deleted groups get marked as such'},
1183
+ 'is_public': {'type': 'boolean', 'description': 'If true, the group is public. If false, the group is private'},
1184
+ 'created_at': {
1185
+ 'type': 'string',
1186
+ 'format': 'date-time',
1187
+ 'description': 'When the group was created',
1188
+ },
1189
+ 'updated_at': {
1190
+ 'type': 'string',
1191
+ 'format': 'date-time',
1192
+ 'description': 'When the group was last updated',
1193
+ },
1194
+ },
1195
+ 'required': ['id'],
1196
+ 'x-airbyte-entity-name': 'groups',
1197
+ },
1198
+ },
1199
+ 'next_page': {
1200
+ 'type': ['string', 'null'],
1201
+ 'description': 'URL to the next page of results',
1202
+ },
1203
+ 'previous_page': {
1204
+ 'type': ['string', 'null'],
1205
+ 'description': 'URL to the previous page of results',
1206
+ },
1207
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
1208
+ },
1209
+ },
1210
+ record_extractor='$.groups',
1211
+ meta_extractor={
1212
+ 'next_page': '$.next_page',
1213
+ 'previous_page': '$.previous_page',
1214
+ 'count': '$.count',
1215
+ },
1216
+ ),
1217
+ Action.GET: EndpointDefinition(
1218
+ method='GET',
1219
+ path='/groups/{group_id}.json',
1220
+ action=Action.GET,
1221
+ description='Returns a group by its ID',
1222
+ path_params=['group_id'],
1223
+ path_params_schema={
1224
+ 'group_id': {'type': 'integer', 'required': True},
1225
+ },
1226
+ response_schema={
1227
+ 'type': 'object',
1228
+ 'properties': {
1229
+ 'group': {
1230
+ 'type': 'object',
1231
+ 'description': 'Zendesk Support group object',
1232
+ 'properties': {
1233
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when creating groups'},
1234
+ 'url': {'type': 'string', 'description': 'The API url of the group'},
1235
+ 'name': {'type': 'string', 'description': 'The name of the group'},
1236
+ 'description': {'type': 'string', 'description': 'The description of the group'},
1237
+ 'default': {'type': 'boolean', 'description': 'If the group is the default one for the account'},
1238
+ 'deleted': {'type': 'boolean', 'description': 'Deleted groups get marked as such'},
1239
+ 'is_public': {'type': 'boolean', 'description': 'If true, the group is public. If false, the group is private'},
1240
+ 'created_at': {
1241
+ 'type': 'string',
1242
+ 'format': 'date-time',
1243
+ 'description': 'When the group was created',
1244
+ },
1245
+ 'updated_at': {
1246
+ 'type': 'string',
1247
+ 'format': 'date-time',
1248
+ 'description': 'When the group was last updated',
1249
+ },
1250
+ },
1251
+ 'required': ['id'],
1252
+ 'x-airbyte-entity-name': 'groups',
1253
+ },
1254
+ },
1255
+ },
1256
+ record_extractor='$.group',
1257
+ ),
1258
+ },
1259
+ entity_schema={
1260
+ 'type': 'object',
1261
+ 'description': 'Zendesk Support group object',
1262
+ 'properties': {
1263
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when creating groups'},
1264
+ 'url': {'type': 'string', 'description': 'The API url of the group'},
1265
+ 'name': {'type': 'string', 'description': 'The name of the group'},
1266
+ 'description': {'type': 'string', 'description': 'The description of the group'},
1267
+ 'default': {'type': 'boolean', 'description': 'If the group is the default one for the account'},
1268
+ 'deleted': {'type': 'boolean', 'description': 'Deleted groups get marked as such'},
1269
+ 'is_public': {'type': 'boolean', 'description': 'If true, the group is public. If false, the group is private'},
1270
+ 'created_at': {
1271
+ 'type': 'string',
1272
+ 'format': 'date-time',
1273
+ 'description': 'When the group was created',
1274
+ },
1275
+ 'updated_at': {
1276
+ 'type': 'string',
1277
+ 'format': 'date-time',
1278
+ 'description': 'When the group was last updated',
1279
+ },
1280
+ },
1281
+ 'required': ['id'],
1282
+ 'x-airbyte-entity-name': 'groups',
1283
+ },
1284
+ ),
1285
+ EntityDefinition(
1286
+ name='ticket_comments',
1287
+ actions=[Action.LIST],
1288
+ endpoints={
1289
+ Action.LIST: EndpointDefinition(
1290
+ method='GET',
1291
+ path='/tickets/{ticket_id}/comments.json',
1292
+ action=Action.LIST,
1293
+ description='Returns a list of comments for a specific ticket',
1294
+ query_params=['page', 'include_inline_images', 'sort'],
1295
+ query_params_schema={
1296
+ 'page': {'type': 'integer', 'required': False},
1297
+ 'include_inline_images': {
1298
+ 'type': 'boolean',
1299
+ 'required': False,
1300
+ 'default': False,
1301
+ },
1302
+ 'sort': {'type': 'string', 'required': False},
1303
+ },
1304
+ path_params=['ticket_id'],
1305
+ path_params_schema={
1306
+ 'ticket_id': {'type': 'integer', 'required': True},
1307
+ },
1308
+ response_schema={
1309
+ 'type': 'object',
1310
+ 'properties': {
1311
+ 'comments': {
1312
+ 'type': 'array',
1313
+ 'items': {
1314
+ 'type': 'object',
1315
+ 'description': 'Zendesk Support ticket comment object',
1316
+ 'properties': {
1317
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the comment is created'},
1318
+ 'type': {'type': 'string', 'description': 'Comment or VoiceComment'},
1319
+ 'body': {'type': 'string', 'description': 'The comment string'},
1320
+ 'html_body': {'type': 'string', 'description': 'The comment formatted as HTML'},
1321
+ 'plain_body': {'type': 'string', 'description': 'The comment presented as plain text'},
1322
+ 'public': {'type': 'boolean', 'description': 'True if a public comment; false if an internal note'},
1323
+ 'author_id': {'type': 'integer', 'description': 'The id of the comment author'},
1324
+ 'attachments': {
1325
+ 'type': 'array',
1326
+ 'items': {'type': 'object'},
1327
+ 'description': 'Attachments, if any',
1328
+ },
1329
+ 'audit_id': {'type': 'integer', 'description': 'The id of the ticket audit record'},
1330
+ 'via': {'type': 'object', 'description': 'How the comment was created'},
1331
+ 'metadata': {'type': 'object', 'description': 'System information and comment flags'},
1332
+ 'created_at': {
1333
+ 'type': 'string',
1334
+ 'format': 'date-time',
1335
+ 'description': 'When the comment was created',
1336
+ },
1337
+ },
1338
+ 'required': ['id'],
1339
+ 'x-airbyte-entity-name': 'ticket_comments',
1340
+ },
1341
+ },
1342
+ 'next_page': {
1343
+ 'type': ['string', 'null'],
1344
+ 'description': 'URL to the next page of results',
1345
+ },
1346
+ 'previous_page': {
1347
+ 'type': ['string', 'null'],
1348
+ 'description': 'URL to the previous page of results',
1349
+ },
1350
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
1351
+ },
1352
+ },
1353
+ record_extractor='$.comments',
1354
+ meta_extractor={
1355
+ 'next_page': '$.next_page',
1356
+ 'previous_page': '$.previous_page',
1357
+ 'count': '$.count',
1358
+ },
1359
+ ),
1360
+ },
1361
+ entity_schema={
1362
+ 'type': 'object',
1363
+ 'description': 'Zendesk Support ticket comment object',
1364
+ 'properties': {
1365
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the comment is created'},
1366
+ 'type': {'type': 'string', 'description': 'Comment or VoiceComment'},
1367
+ 'body': {'type': 'string', 'description': 'The comment string'},
1368
+ 'html_body': {'type': 'string', 'description': 'The comment formatted as HTML'},
1369
+ 'plain_body': {'type': 'string', 'description': 'The comment presented as plain text'},
1370
+ 'public': {'type': 'boolean', 'description': 'True if a public comment; false if an internal note'},
1371
+ 'author_id': {'type': 'integer', 'description': 'The id of the comment author'},
1372
+ 'attachments': {
1373
+ 'type': 'array',
1374
+ 'items': {'type': 'object'},
1375
+ 'description': 'Attachments, if any',
1376
+ },
1377
+ 'audit_id': {'type': 'integer', 'description': 'The id of the ticket audit record'},
1378
+ 'via': {'type': 'object', 'description': 'How the comment was created'},
1379
+ 'metadata': {'type': 'object', 'description': 'System information and comment flags'},
1380
+ 'created_at': {
1381
+ 'type': 'string',
1382
+ 'format': 'date-time',
1383
+ 'description': 'When the comment was created',
1384
+ },
1385
+ },
1386
+ 'required': ['id'],
1387
+ 'x-airbyte-entity-name': 'ticket_comments',
1388
+ },
1389
+ ),
1390
+ EntityDefinition(
1391
+ name='attachments',
1392
+ actions=[Action.GET, Action.DOWNLOAD],
1393
+ endpoints={
1394
+ Action.GET: EndpointDefinition(
1395
+ method='GET',
1396
+ path='/attachments/{attachment_id}.json',
1397
+ action=Action.GET,
1398
+ description='Returns an attachment by its ID',
1399
+ path_params=['attachment_id'],
1400
+ path_params_schema={
1401
+ 'attachment_id': {'type': 'integer', 'required': True},
1402
+ },
1403
+ response_schema={
1404
+ 'type': 'object',
1405
+ 'properties': {
1406
+ 'attachment': {
1407
+ 'type': 'object',
1408
+ 'description': 'Zendesk Support attachment object',
1409
+ 'properties': {
1410
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when created'},
1411
+ 'file_name': {'type': 'string', 'description': 'The name of the file'},
1412
+ 'content_url': {'type': 'string', 'description': 'A full URL where the attachment file can be downloaded'},
1413
+ 'mapped_content_url': {'type': 'string', 'description': 'The URL the attachment file has been mapped to'},
1414
+ 'content_type': {'type': 'string', 'description': 'The content type of the file'},
1415
+ 'size': {'type': 'integer', 'description': 'The size of the file in bytes'},
1416
+ 'width': {
1417
+ 'type': ['integer', 'null'],
1418
+ 'description': 'The width of the image file',
1419
+ },
1420
+ 'height': {
1421
+ 'type': ['integer', 'null'],
1422
+ 'description': 'The height of the image file',
1423
+ },
1424
+ 'inline': {'type': 'boolean', 'description': 'If true, the attachment is excluded from the attachment list'},
1425
+ 'deleted': {'type': 'boolean', 'description': 'If true, the attachment has been deleted'},
1426
+ 'malware_access_override': {'type': 'boolean', 'description': 'If true, access is allowed even if it has been deemed malware'},
1427
+ 'malware_scan_result': {'type': 'string', 'description': 'Result of malware scan'},
1428
+ 'url': {'type': 'string', 'description': 'A URL to access the attachment'},
1429
+ 'thumbnails': {
1430
+ 'type': 'array',
1431
+ 'items': {'type': 'object'},
1432
+ 'description': 'An array of attachment objects for image thumbnails',
1433
+ },
1434
+ },
1435
+ 'required': ['id'],
1436
+ 'x-airbyte-entity-name': 'attachments',
1437
+ },
1438
+ },
1439
+ },
1440
+ record_extractor='$.attachment',
1441
+ ),
1442
+ Action.DOWNLOAD: EndpointDefinition(
1443
+ method='GET',
1444
+ path='/attachments/{attachment_id}:download',
1445
+ path_override=PathOverrideConfig(
1446
+ path='/attachments/{attachment_id}.json',
1447
+ ),
1448
+ action=Action.DOWNLOAD,
1449
+ description='Downloads the file content of a ticket attachment',
1450
+ path_params=['attachment_id'],
1451
+ path_params_schema={
1452
+ 'attachment_id': {'type': 'integer', 'required': True},
1453
+ },
1454
+ file_field='attachment.content_url',
1455
+ ),
1456
+ },
1457
+ entity_schema={
1458
+ 'type': 'object',
1459
+ 'description': 'Zendesk Support attachment object',
1460
+ 'properties': {
1461
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when created'},
1462
+ 'file_name': {'type': 'string', 'description': 'The name of the file'},
1463
+ 'content_url': {'type': 'string', 'description': 'A full URL where the attachment file can be downloaded'},
1464
+ 'mapped_content_url': {'type': 'string', 'description': 'The URL the attachment file has been mapped to'},
1465
+ 'content_type': {'type': 'string', 'description': 'The content type of the file'},
1466
+ 'size': {'type': 'integer', 'description': 'The size of the file in bytes'},
1467
+ 'width': {
1468
+ 'type': ['integer', 'null'],
1469
+ 'description': 'The width of the image file',
1470
+ },
1471
+ 'height': {
1472
+ 'type': ['integer', 'null'],
1473
+ 'description': 'The height of the image file',
1474
+ },
1475
+ 'inline': {'type': 'boolean', 'description': 'If true, the attachment is excluded from the attachment list'},
1476
+ 'deleted': {'type': 'boolean', 'description': 'If true, the attachment has been deleted'},
1477
+ 'malware_access_override': {'type': 'boolean', 'description': 'If true, access is allowed even if it has been deemed malware'},
1478
+ 'malware_scan_result': {'type': 'string', 'description': 'Result of malware scan'},
1479
+ 'url': {'type': 'string', 'description': 'A URL to access the attachment'},
1480
+ 'thumbnails': {
1481
+ 'type': 'array',
1482
+ 'items': {'type': 'object'},
1483
+ 'description': 'An array of attachment objects for image thumbnails',
1484
+ },
1485
+ },
1486
+ 'required': ['id'],
1487
+ 'x-airbyte-entity-name': 'attachments',
1488
+ },
1489
+ ),
1490
+ EntityDefinition(
1491
+ name='ticket_audits',
1492
+ actions=[Action.LIST],
1493
+ endpoints={
1494
+ Action.LIST: EndpointDefinition(
1495
+ method='GET',
1496
+ path='/tickets/{ticket_id}/audits.json',
1497
+ action=Action.LIST,
1498
+ description='Returns a list of audits for a specific ticket',
1499
+ query_params=['page'],
1500
+ query_params_schema={
1501
+ 'page': {'type': 'integer', 'required': False},
1502
+ },
1503
+ path_params=['ticket_id'],
1504
+ path_params_schema={
1505
+ 'ticket_id': {'type': 'integer', 'required': True},
1506
+ },
1507
+ response_schema={
1508
+ 'type': 'object',
1509
+ 'properties': {
1510
+ 'audits': {
1511
+ 'type': 'array',
1512
+ 'items': {
1513
+ 'type': 'object',
1514
+ 'description': 'Zendesk Support ticket audit object',
1515
+ 'properties': {
1516
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when creating audits'},
1517
+ 'ticket_id': {'type': 'integer', 'description': 'The ID of the associated ticket'},
1518
+ 'author_id': {'type': 'integer', 'description': 'The user who created the audit'},
1519
+ 'metadata': {'type': 'object', 'description': 'Metadata for the audit'},
1520
+ 'via': {'type': 'object', 'description': 'How the audit was created'},
1521
+ 'events': {
1522
+ 'type': 'array',
1523
+ 'items': {'type': 'object'},
1524
+ 'description': 'An array of the events that happened in this audit',
1525
+ },
1526
+ 'created_at': {
1527
+ 'type': 'string',
1528
+ 'format': 'date-time',
1529
+ 'description': 'When the audit was created',
1530
+ },
1531
+ },
1532
+ 'required': ['id'],
1533
+ 'x-airbyte-entity-name': 'ticket_audits',
1534
+ },
1535
+ },
1536
+ 'next_page': {
1537
+ 'type': ['string', 'null'],
1538
+ 'description': 'URL to the next page of results',
1539
+ },
1540
+ 'previous_page': {
1541
+ 'type': ['string', 'null'],
1542
+ 'description': 'URL to the previous page of results',
1543
+ },
1544
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
1545
+ },
1546
+ },
1547
+ record_extractor='$.audits',
1548
+ meta_extractor={
1549
+ 'next_page': '$.next_page',
1550
+ 'previous_page': '$.previous_page',
1551
+ 'count': '$.count',
1552
+ },
1553
+ ),
1554
+ },
1555
+ entity_schema={
1556
+ 'type': 'object',
1557
+ 'description': 'Zendesk Support ticket audit object',
1558
+ 'properties': {
1559
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when creating audits'},
1560
+ 'ticket_id': {'type': 'integer', 'description': 'The ID of the associated ticket'},
1561
+ 'author_id': {'type': 'integer', 'description': 'The user who created the audit'},
1562
+ 'metadata': {'type': 'object', 'description': 'Metadata for the audit'},
1563
+ 'via': {'type': 'object', 'description': 'How the audit was created'},
1564
+ 'events': {
1565
+ 'type': 'array',
1566
+ 'items': {'type': 'object'},
1567
+ 'description': 'An array of the events that happened in this audit',
1568
+ },
1569
+ 'created_at': {
1570
+ 'type': 'string',
1571
+ 'format': 'date-time',
1572
+ 'description': 'When the audit was created',
1573
+ },
1574
+ },
1575
+ 'required': ['id'],
1576
+ 'x-airbyte-entity-name': 'ticket_audits',
1577
+ },
1578
+ ),
1579
+ EntityDefinition(
1580
+ name='ticket_metrics',
1581
+ actions=[Action.LIST],
1582
+ endpoints={
1583
+ Action.LIST: EndpointDefinition(
1584
+ method='GET',
1585
+ path='/ticket_metrics.json',
1586
+ action=Action.LIST,
1587
+ description='Returns a list of all ticket metrics',
1588
+ query_params=['page'],
1589
+ query_params_schema={
1590
+ 'page': {'type': 'integer', 'required': False},
1591
+ },
1592
+ response_schema={
1593
+ 'type': 'object',
1594
+ 'properties': {
1595
+ 'ticket_metrics': {
1596
+ 'type': 'array',
1597
+ 'items': {
1598
+ 'type': 'object',
1599
+ 'description': 'Zendesk Support ticket metric object',
1600
+ 'properties': {
1601
+ 'id': {'type': 'integer', 'description': 'Automatically assigned'},
1602
+ 'url': {'type': 'string', 'description': 'The API url of the ticket metric'},
1603
+ 'ticket_id': {'type': 'integer', 'description': 'Id of the associated ticket'},
1604
+ 'group_stations': {'type': 'integer', 'description': 'Number of groups the ticket passed through'},
1605
+ 'assignee_stations': {'type': 'integer', 'description': 'Number of assignees the ticket had'},
1606
+ 'reopens': {'type': 'integer', 'description': 'Total number of times the ticket was reopened'},
1607
+ 'replies': {'type': 'integer', 'description': 'The total number of times the ticket was replied to'},
1608
+ 'assignee_updated_at': {
1609
+ 'type': ['string', 'null'],
1610
+ 'format': 'date-time',
1611
+ 'description': 'When the assignee last updated the ticket',
1612
+ },
1613
+ 'requester_updated_at': {
1614
+ 'type': 'string',
1615
+ 'format': 'date-time',
1616
+ 'description': 'When the requester last updated the ticket',
1617
+ },
1618
+ 'status_updated_at': {
1619
+ 'type': 'string',
1620
+ 'format': 'date-time',
1621
+ 'description': 'When the status was last updated',
1622
+ },
1623
+ 'initially_assigned_at': {
1624
+ 'type': ['string', 'null'],
1625
+ 'format': 'date-time',
1626
+ 'description': 'When the ticket was initially assigned',
1627
+ },
1628
+ 'assigned_at': {
1629
+ 'type': ['string', 'null'],
1630
+ 'format': 'date-time',
1631
+ 'description': 'When the ticket was last assigned',
1632
+ },
1633
+ 'solved_at': {
1634
+ 'type': ['string', 'null'],
1635
+ 'format': 'date-time',
1636
+ 'description': 'When the ticket was solved',
1637
+ },
1638
+ 'latest_comment_added_at': {
1639
+ 'type': 'string',
1640
+ 'format': 'date-time',
1641
+ 'description': 'When the latest comment was added',
1642
+ },
1643
+ 'reply_time_in_minutes': {'type': 'object', 'description': 'Number of minutes to the first reply'},
1644
+ 'first_resolution_time_in_minutes': {'type': 'object', 'description': 'Number of minutes to the first resolution time'},
1645
+ 'full_resolution_time_in_minutes': {'type': 'object', 'description': 'Number of minutes to the full resolution'},
1646
+ 'agent_wait_time_in_minutes': {'type': 'object', 'description': 'Number of minutes the agent waited'},
1647
+ 'requester_wait_time_in_minutes': {'type': 'object', 'description': 'Number of minutes the requester waited'},
1648
+ 'on_hold_time_in_minutes': {'type': 'object', 'description': 'Number of minutes on hold'},
1649
+ 'created_at': {
1650
+ 'type': 'string',
1651
+ 'format': 'date-time',
1652
+ 'description': 'When the record was created',
1653
+ },
1654
+ 'updated_at': {
1655
+ 'type': 'string',
1656
+ 'format': 'date-time',
1657
+ 'description': 'When the record was last updated',
1658
+ },
1659
+ },
1660
+ 'required': ['id'],
1661
+ 'x-airbyte-entity-name': 'ticket_metrics',
1662
+ },
1663
+ },
1664
+ 'next_page': {
1665
+ 'type': ['string', 'null'],
1666
+ 'description': 'URL to the next page of results',
1667
+ },
1668
+ 'previous_page': {
1669
+ 'type': ['string', 'null'],
1670
+ 'description': 'URL to the previous page of results',
1671
+ },
1672
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
1673
+ },
1674
+ },
1675
+ record_extractor='$.ticket_metrics',
1676
+ meta_extractor={
1677
+ 'next_page': '$.next_page',
1678
+ 'previous_page': '$.previous_page',
1679
+ 'count': '$.count',
1680
+ },
1681
+ ),
1682
+ },
1683
+ entity_schema={
1684
+ 'type': 'object',
1685
+ 'description': 'Zendesk Support ticket metric object',
1686
+ 'properties': {
1687
+ 'id': {'type': 'integer', 'description': 'Automatically assigned'},
1688
+ 'url': {'type': 'string', 'description': 'The API url of the ticket metric'},
1689
+ 'ticket_id': {'type': 'integer', 'description': 'Id of the associated ticket'},
1690
+ 'group_stations': {'type': 'integer', 'description': 'Number of groups the ticket passed through'},
1691
+ 'assignee_stations': {'type': 'integer', 'description': 'Number of assignees the ticket had'},
1692
+ 'reopens': {'type': 'integer', 'description': 'Total number of times the ticket was reopened'},
1693
+ 'replies': {'type': 'integer', 'description': 'The total number of times the ticket was replied to'},
1694
+ 'assignee_updated_at': {
1695
+ 'type': ['string', 'null'],
1696
+ 'format': 'date-time',
1697
+ 'description': 'When the assignee last updated the ticket',
1698
+ },
1699
+ 'requester_updated_at': {
1700
+ 'type': 'string',
1701
+ 'format': 'date-time',
1702
+ 'description': 'When the requester last updated the ticket',
1703
+ },
1704
+ 'status_updated_at': {
1705
+ 'type': 'string',
1706
+ 'format': 'date-time',
1707
+ 'description': 'When the status was last updated',
1708
+ },
1709
+ 'initially_assigned_at': {
1710
+ 'type': ['string', 'null'],
1711
+ 'format': 'date-time',
1712
+ 'description': 'When the ticket was initially assigned',
1713
+ },
1714
+ 'assigned_at': {
1715
+ 'type': ['string', 'null'],
1716
+ 'format': 'date-time',
1717
+ 'description': 'When the ticket was last assigned',
1718
+ },
1719
+ 'solved_at': {
1720
+ 'type': ['string', 'null'],
1721
+ 'format': 'date-time',
1722
+ 'description': 'When the ticket was solved',
1723
+ },
1724
+ 'latest_comment_added_at': {
1725
+ 'type': 'string',
1726
+ 'format': 'date-time',
1727
+ 'description': 'When the latest comment was added',
1728
+ },
1729
+ 'reply_time_in_minutes': {'type': 'object', 'description': 'Number of minutes to the first reply'},
1730
+ 'first_resolution_time_in_minutes': {'type': 'object', 'description': 'Number of minutes to the first resolution time'},
1731
+ 'full_resolution_time_in_minutes': {'type': 'object', 'description': 'Number of minutes to the full resolution'},
1732
+ 'agent_wait_time_in_minutes': {'type': 'object', 'description': 'Number of minutes the agent waited'},
1733
+ 'requester_wait_time_in_minutes': {'type': 'object', 'description': 'Number of minutes the requester waited'},
1734
+ 'on_hold_time_in_minutes': {'type': 'object', 'description': 'Number of minutes on hold'},
1735
+ 'created_at': {
1736
+ 'type': 'string',
1737
+ 'format': 'date-time',
1738
+ 'description': 'When the record was created',
1739
+ },
1740
+ 'updated_at': {
1741
+ 'type': 'string',
1742
+ 'format': 'date-time',
1743
+ 'description': 'When the record was last updated',
1744
+ },
1745
+ },
1746
+ 'required': ['id'],
1747
+ 'x-airbyte-entity-name': 'ticket_metrics',
1748
+ },
1749
+ ),
1750
+ EntityDefinition(
1751
+ name='ticket_fields',
1752
+ actions=[Action.LIST, Action.GET],
1753
+ endpoints={
1754
+ Action.LIST: EndpointDefinition(
1755
+ method='GET',
1756
+ path='/ticket_fields.json',
1757
+ action=Action.LIST,
1758
+ description='Returns a list of all ticket fields',
1759
+ query_params=['page', 'locale'],
1760
+ query_params_schema={
1761
+ 'page': {'type': 'integer', 'required': False},
1762
+ 'locale': {'type': 'string', 'required': False},
1763
+ },
1764
+ response_schema={
1765
+ 'type': 'object',
1766
+ 'properties': {
1767
+ 'ticket_fields': {
1768
+ 'type': 'array',
1769
+ 'items': {
1770
+ 'type': 'object',
1771
+ 'description': 'Zendesk Support ticket field object',
1772
+ 'properties': {
1773
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when created'},
1774
+ 'url': {'type': 'string', 'description': 'The URL for this resource'},
1775
+ 'type': {'type': 'string', 'description': 'The type of the custom field'},
1776
+ 'title': {'type': 'string', 'description': 'The title of the custom field'},
1777
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder'},
1778
+ 'description': {'type': 'string', 'description': 'Describes the purpose of the ticket field'},
1779
+ 'raw_description': {'type': 'string', 'description': 'The dynamic content placeholder for description'},
1780
+ 'position': {'type': 'integer', 'description': 'A relative position for the ticket field'},
1781
+ 'active': {'type': 'boolean', 'description': 'Whether this field is available'},
1782
+ 'required': {'type': 'boolean', 'description': 'If true, agents must enter a value in the field'},
1783
+ 'collapsed_for_agents': {'type': 'boolean', 'description': 'If true, the field is shown to agents by default'},
1784
+ 'regexp_for_validation': {
1785
+ 'type': ['string', 'null'],
1786
+ 'description': 'Regular expression for validation',
1787
+ },
1788
+ 'title_in_portal': {'type': 'string', 'description': 'The title of the ticket field for end users'},
1789
+ 'raw_title_in_portal': {'type': 'string', 'description': 'The dynamic content placeholder for title in portal'},
1790
+ 'visible_in_portal': {'type': 'boolean', 'description': 'Whether this field is visible to end users'},
1791
+ 'editable_in_portal': {'type': 'boolean', 'description': 'Whether this field is editable by end users'},
1792
+ 'required_in_portal': {'type': 'boolean', 'description': 'If true, end users must enter a value in the field'},
1793
+ 'tag': {
1794
+ 'type': ['string', 'null'],
1795
+ 'description': 'A tag value to set for checkbox fields',
1796
+ },
1797
+ 'custom_field_options': {
1798
+ 'type': 'array',
1799
+ 'items': {'type': 'object'},
1800
+ 'description': 'Required for multiselect or tagger fields',
1801
+ },
1802
+ 'system_field_options': {
1803
+ 'type': 'array',
1804
+ 'items': {'type': 'object'},
1805
+ 'description': 'Presented for system ticket fields of type tagger',
1806
+ },
1807
+ 'sub_type_id': {'type': 'integer', 'description': 'For system ticket fields of type priority and status'},
1808
+ 'removable': {'type': 'boolean', 'description': 'If false, this field is a system field that must be present'},
1809
+ 'agent_description': {
1810
+ 'type': ['string', 'null'],
1811
+ 'description': 'A description only agents can see',
1812
+ },
1813
+ 'created_at': {
1814
+ 'type': 'string',
1815
+ 'format': 'date-time',
1816
+ 'description': 'When the ticket field was created',
1817
+ },
1818
+ 'updated_at': {
1819
+ 'type': 'string',
1820
+ 'format': 'date-time',
1821
+ 'description': 'When the ticket field was last updated',
1822
+ },
1823
+ },
1824
+ 'required': ['id'],
1825
+ 'x-airbyte-entity-name': 'ticket_fields',
1826
+ },
1827
+ },
1828
+ 'next_page': {
1829
+ 'type': ['string', 'null'],
1830
+ 'description': 'URL to the next page of results',
1831
+ },
1832
+ 'previous_page': {
1833
+ 'type': ['string', 'null'],
1834
+ 'description': 'URL to the previous page of results',
1835
+ },
1836
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
1837
+ },
1838
+ },
1839
+ record_extractor='$.ticket_fields',
1840
+ meta_extractor={
1841
+ 'next_page': '$.next_page',
1842
+ 'previous_page': '$.previous_page',
1843
+ 'count': '$.count',
1844
+ },
1845
+ ),
1846
+ Action.GET: EndpointDefinition(
1847
+ method='GET',
1848
+ path='/ticket_fields/{ticket_field_id}.json',
1849
+ action=Action.GET,
1850
+ description='Returns a ticket field by its ID',
1851
+ path_params=['ticket_field_id'],
1852
+ path_params_schema={
1853
+ 'ticket_field_id': {'type': 'integer', 'required': True},
1854
+ },
1855
+ response_schema={
1856
+ 'type': 'object',
1857
+ 'properties': {
1858
+ 'ticket_field': {
1859
+ 'type': 'object',
1860
+ 'description': 'Zendesk Support ticket field object',
1861
+ 'properties': {
1862
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when created'},
1863
+ 'url': {'type': 'string', 'description': 'The URL for this resource'},
1864
+ 'type': {'type': 'string', 'description': 'The type of the custom field'},
1865
+ 'title': {'type': 'string', 'description': 'The title of the custom field'},
1866
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder'},
1867
+ 'description': {'type': 'string', 'description': 'Describes the purpose of the ticket field'},
1868
+ 'raw_description': {'type': 'string', 'description': 'The dynamic content placeholder for description'},
1869
+ 'position': {'type': 'integer', 'description': 'A relative position for the ticket field'},
1870
+ 'active': {'type': 'boolean', 'description': 'Whether this field is available'},
1871
+ 'required': {'type': 'boolean', 'description': 'If true, agents must enter a value in the field'},
1872
+ 'collapsed_for_agents': {'type': 'boolean', 'description': 'If true, the field is shown to agents by default'},
1873
+ 'regexp_for_validation': {
1874
+ 'type': ['string', 'null'],
1875
+ 'description': 'Regular expression for validation',
1876
+ },
1877
+ 'title_in_portal': {'type': 'string', 'description': 'The title of the ticket field for end users'},
1878
+ 'raw_title_in_portal': {'type': 'string', 'description': 'The dynamic content placeholder for title in portal'},
1879
+ 'visible_in_portal': {'type': 'boolean', 'description': 'Whether this field is visible to end users'},
1880
+ 'editable_in_portal': {'type': 'boolean', 'description': 'Whether this field is editable by end users'},
1881
+ 'required_in_portal': {'type': 'boolean', 'description': 'If true, end users must enter a value in the field'},
1882
+ 'tag': {
1883
+ 'type': ['string', 'null'],
1884
+ 'description': 'A tag value to set for checkbox fields',
1885
+ },
1886
+ 'custom_field_options': {
1887
+ 'type': 'array',
1888
+ 'items': {'type': 'object'},
1889
+ 'description': 'Required for multiselect or tagger fields',
1890
+ },
1891
+ 'system_field_options': {
1892
+ 'type': 'array',
1893
+ 'items': {'type': 'object'},
1894
+ 'description': 'Presented for system ticket fields of type tagger',
1895
+ },
1896
+ 'sub_type_id': {'type': 'integer', 'description': 'For system ticket fields of type priority and status'},
1897
+ 'removable': {'type': 'boolean', 'description': 'If false, this field is a system field that must be present'},
1898
+ 'agent_description': {
1899
+ 'type': ['string', 'null'],
1900
+ 'description': 'A description only agents can see',
1901
+ },
1902
+ 'created_at': {
1903
+ 'type': 'string',
1904
+ 'format': 'date-time',
1905
+ 'description': 'When the ticket field was created',
1906
+ },
1907
+ 'updated_at': {
1908
+ 'type': 'string',
1909
+ 'format': 'date-time',
1910
+ 'description': 'When the ticket field was last updated',
1911
+ },
1912
+ },
1913
+ 'required': ['id'],
1914
+ 'x-airbyte-entity-name': 'ticket_fields',
1915
+ },
1916
+ },
1917
+ },
1918
+ record_extractor='$.ticket_field',
1919
+ ),
1920
+ },
1921
+ entity_schema={
1922
+ 'type': 'object',
1923
+ 'description': 'Zendesk Support ticket field object',
1924
+ 'properties': {
1925
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when created'},
1926
+ 'url': {'type': 'string', 'description': 'The URL for this resource'},
1927
+ 'type': {'type': 'string', 'description': 'The type of the custom field'},
1928
+ 'title': {'type': 'string', 'description': 'The title of the custom field'},
1929
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder'},
1930
+ 'description': {'type': 'string', 'description': 'Describes the purpose of the ticket field'},
1931
+ 'raw_description': {'type': 'string', 'description': 'The dynamic content placeholder for description'},
1932
+ 'position': {'type': 'integer', 'description': 'A relative position for the ticket field'},
1933
+ 'active': {'type': 'boolean', 'description': 'Whether this field is available'},
1934
+ 'required': {'type': 'boolean', 'description': 'If true, agents must enter a value in the field'},
1935
+ 'collapsed_for_agents': {'type': 'boolean', 'description': 'If true, the field is shown to agents by default'},
1936
+ 'regexp_for_validation': {
1937
+ 'type': ['string', 'null'],
1938
+ 'description': 'Regular expression for validation',
1939
+ },
1940
+ 'title_in_portal': {'type': 'string', 'description': 'The title of the ticket field for end users'},
1941
+ 'raw_title_in_portal': {'type': 'string', 'description': 'The dynamic content placeholder for title in portal'},
1942
+ 'visible_in_portal': {'type': 'boolean', 'description': 'Whether this field is visible to end users'},
1943
+ 'editable_in_portal': {'type': 'boolean', 'description': 'Whether this field is editable by end users'},
1944
+ 'required_in_portal': {'type': 'boolean', 'description': 'If true, end users must enter a value in the field'},
1945
+ 'tag': {
1946
+ 'type': ['string', 'null'],
1947
+ 'description': 'A tag value to set for checkbox fields',
1948
+ },
1949
+ 'custom_field_options': {
1950
+ 'type': 'array',
1951
+ 'items': {'type': 'object'},
1952
+ 'description': 'Required for multiselect or tagger fields',
1953
+ },
1954
+ 'system_field_options': {
1955
+ 'type': 'array',
1956
+ 'items': {'type': 'object'},
1957
+ 'description': 'Presented for system ticket fields of type tagger',
1958
+ },
1959
+ 'sub_type_id': {'type': 'integer', 'description': 'For system ticket fields of type priority and status'},
1960
+ 'removable': {'type': 'boolean', 'description': 'If false, this field is a system field that must be present'},
1961
+ 'agent_description': {
1962
+ 'type': ['string', 'null'],
1963
+ 'description': 'A description only agents can see',
1964
+ },
1965
+ 'created_at': {
1966
+ 'type': 'string',
1967
+ 'format': 'date-time',
1968
+ 'description': 'When the ticket field was created',
1969
+ },
1970
+ 'updated_at': {
1971
+ 'type': 'string',
1972
+ 'format': 'date-time',
1973
+ 'description': 'When the ticket field was last updated',
1974
+ },
1975
+ },
1976
+ 'required': ['id'],
1977
+ 'x-airbyte-entity-name': 'ticket_fields',
1978
+ },
1979
+ ),
1980
+ EntityDefinition(
1981
+ name='brands',
1982
+ actions=[Action.LIST, Action.GET],
1983
+ endpoints={
1984
+ Action.LIST: EndpointDefinition(
1985
+ method='GET',
1986
+ path='/brands.json',
1987
+ action=Action.LIST,
1988
+ description='Returns a list of all brands for the account',
1989
+ query_params=['page'],
1990
+ query_params_schema={
1991
+ 'page': {'type': 'integer', 'required': False},
1992
+ },
1993
+ response_schema={
1994
+ 'type': 'object',
1995
+ 'properties': {
1996
+ 'brands': {
1997
+ 'type': 'array',
1998
+ 'items': {
1999
+ 'type': 'object',
2000
+ 'description': 'Zendesk Support brand object',
2001
+ 'properties': {
2002
+ 'id': {'type': 'integer', 'description': 'The ID automatically assigned when the brand is created'},
2003
+ 'url': {'type': 'string', 'description': 'The API url of this brand'},
2004
+ 'name': {'type': 'string', 'description': 'The name of the brand'},
2005
+ 'brand_url': {'type': 'string', 'description': 'The url of the brand'},
2006
+ 'subdomain': {'type': 'string', 'description': 'The subdomain of the brand'},
2007
+ 'host_mapping': {
2008
+ 'type': ['string', 'null'],
2009
+ 'description': 'The hostmapping to this brand, if any',
2010
+ },
2011
+ 'has_help_center': {'type': 'boolean', 'description': 'If the brand has a Help Center'},
2012
+ 'help_center_state': {'type': 'string', 'description': 'The state of the Help Center'},
2013
+ 'active': {'type': 'boolean', 'description': 'If the brand is active'},
2014
+ 'default': {'type': 'boolean', 'description': 'Is the brand the default brand for this account'},
2015
+ 'is_deleted': {'type': 'boolean', 'description': 'If the brand object is deleted or not'},
2016
+ 'logo': {
2017
+ 'type': ['object', 'null'],
2018
+ 'description': 'A file represented as an Attachment object',
2019
+ },
2020
+ 'ticket_form_ids': {
2021
+ 'type': 'array',
2022
+ 'items': {'type': 'integer'},
2023
+ 'description': 'The ids of ticket forms that are available for use by a brand',
2024
+ },
2025
+ 'signature_template': {'type': 'string', 'description': 'The signature template for a brand'},
2026
+ 'created_at': {
2027
+ 'type': 'string',
2028
+ 'format': 'date-time',
2029
+ 'description': 'The time the brand was created',
2030
+ },
2031
+ 'updated_at': {
2032
+ 'type': 'string',
2033
+ 'format': 'date-time',
2034
+ 'description': 'The time the brand was last updated',
2035
+ },
2036
+ },
2037
+ 'required': ['id'],
2038
+ 'x-airbyte-entity-name': 'brands',
2039
+ },
2040
+ },
2041
+ 'next_page': {
2042
+ 'type': ['string', 'null'],
2043
+ 'description': 'URL to the next page of results',
2044
+ },
2045
+ 'previous_page': {
2046
+ 'type': ['string', 'null'],
2047
+ 'description': 'URL to the previous page of results',
2048
+ },
2049
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
2050
+ },
2051
+ },
2052
+ record_extractor='$.brands',
2053
+ meta_extractor={
2054
+ 'next_page': '$.next_page',
2055
+ 'previous_page': '$.previous_page',
2056
+ 'count': '$.count',
2057
+ },
2058
+ ),
2059
+ Action.GET: EndpointDefinition(
2060
+ method='GET',
2061
+ path='/brands/{brand_id}.json',
2062
+ action=Action.GET,
2063
+ description='Returns a brand by its ID',
2064
+ path_params=['brand_id'],
2065
+ path_params_schema={
2066
+ 'brand_id': {'type': 'integer', 'required': True},
2067
+ },
2068
+ response_schema={
2069
+ 'type': 'object',
2070
+ 'properties': {
2071
+ 'brand': {
2072
+ 'type': 'object',
2073
+ 'description': 'Zendesk Support brand object',
2074
+ 'properties': {
2075
+ 'id': {'type': 'integer', 'description': 'The ID automatically assigned when the brand is created'},
2076
+ 'url': {'type': 'string', 'description': 'The API url of this brand'},
2077
+ 'name': {'type': 'string', 'description': 'The name of the brand'},
2078
+ 'brand_url': {'type': 'string', 'description': 'The url of the brand'},
2079
+ 'subdomain': {'type': 'string', 'description': 'The subdomain of the brand'},
2080
+ 'host_mapping': {
2081
+ 'type': ['string', 'null'],
2082
+ 'description': 'The hostmapping to this brand, if any',
2083
+ },
2084
+ 'has_help_center': {'type': 'boolean', 'description': 'If the brand has a Help Center'},
2085
+ 'help_center_state': {'type': 'string', 'description': 'The state of the Help Center'},
2086
+ 'active': {'type': 'boolean', 'description': 'If the brand is active'},
2087
+ 'default': {'type': 'boolean', 'description': 'Is the brand the default brand for this account'},
2088
+ 'is_deleted': {'type': 'boolean', 'description': 'If the brand object is deleted or not'},
2089
+ 'logo': {
2090
+ 'type': ['object', 'null'],
2091
+ 'description': 'A file represented as an Attachment object',
2092
+ },
2093
+ 'ticket_form_ids': {
2094
+ 'type': 'array',
2095
+ 'items': {'type': 'integer'},
2096
+ 'description': 'The ids of ticket forms that are available for use by a brand',
2097
+ },
2098
+ 'signature_template': {'type': 'string', 'description': 'The signature template for a brand'},
2099
+ 'created_at': {
2100
+ 'type': 'string',
2101
+ 'format': 'date-time',
2102
+ 'description': 'The time the brand was created',
2103
+ },
2104
+ 'updated_at': {
2105
+ 'type': 'string',
2106
+ 'format': 'date-time',
2107
+ 'description': 'The time the brand was last updated',
2108
+ },
2109
+ },
2110
+ 'required': ['id'],
2111
+ 'x-airbyte-entity-name': 'brands',
2112
+ },
2113
+ },
2114
+ },
2115
+ record_extractor='$.brand',
2116
+ ),
2117
+ },
2118
+ entity_schema={
2119
+ 'type': 'object',
2120
+ 'description': 'Zendesk Support brand object',
2121
+ 'properties': {
2122
+ 'id': {'type': 'integer', 'description': 'The ID automatically assigned when the brand is created'},
2123
+ 'url': {'type': 'string', 'description': 'The API url of this brand'},
2124
+ 'name': {'type': 'string', 'description': 'The name of the brand'},
2125
+ 'brand_url': {'type': 'string', 'description': 'The url of the brand'},
2126
+ 'subdomain': {'type': 'string', 'description': 'The subdomain of the brand'},
2127
+ 'host_mapping': {
2128
+ 'type': ['string', 'null'],
2129
+ 'description': 'The hostmapping to this brand, if any',
2130
+ },
2131
+ 'has_help_center': {'type': 'boolean', 'description': 'If the brand has a Help Center'},
2132
+ 'help_center_state': {'type': 'string', 'description': 'The state of the Help Center'},
2133
+ 'active': {'type': 'boolean', 'description': 'If the brand is active'},
2134
+ 'default': {'type': 'boolean', 'description': 'Is the brand the default brand for this account'},
2135
+ 'is_deleted': {'type': 'boolean', 'description': 'If the brand object is deleted or not'},
2136
+ 'logo': {
2137
+ 'type': ['object', 'null'],
2138
+ 'description': 'A file represented as an Attachment object',
2139
+ },
2140
+ 'ticket_form_ids': {
2141
+ 'type': 'array',
2142
+ 'items': {'type': 'integer'},
2143
+ 'description': 'The ids of ticket forms that are available for use by a brand',
2144
+ },
2145
+ 'signature_template': {'type': 'string', 'description': 'The signature template for a brand'},
2146
+ 'created_at': {
2147
+ 'type': 'string',
2148
+ 'format': 'date-time',
2149
+ 'description': 'The time the brand was created',
2150
+ },
2151
+ 'updated_at': {
2152
+ 'type': 'string',
2153
+ 'format': 'date-time',
2154
+ 'description': 'The time the brand was last updated',
2155
+ },
2156
+ },
2157
+ 'required': ['id'],
2158
+ 'x-airbyte-entity-name': 'brands',
2159
+ },
2160
+ ),
2161
+ EntityDefinition(
2162
+ name='views',
2163
+ actions=[Action.LIST, Action.GET],
2164
+ endpoints={
2165
+ Action.LIST: EndpointDefinition(
2166
+ method='GET',
2167
+ path='/views.json',
2168
+ action=Action.LIST,
2169
+ description='Returns a list of all views for the account',
2170
+ query_params=[
2171
+ 'page',
2172
+ 'access',
2173
+ 'active',
2174
+ 'group_id',
2175
+ 'sort_by',
2176
+ 'sort_order',
2177
+ ],
2178
+ query_params_schema={
2179
+ 'page': {'type': 'integer', 'required': False},
2180
+ 'access': {'type': 'string', 'required': False},
2181
+ 'active': {'type': 'boolean', 'required': False},
2182
+ 'group_id': {'type': 'integer', 'required': False},
2183
+ 'sort_by': {'type': 'string', 'required': False},
2184
+ 'sort_order': {'type': 'string', 'required': False},
2185
+ },
2186
+ response_schema={
2187
+ 'type': 'object',
2188
+ 'properties': {
2189
+ 'views': {
2190
+ 'type': 'array',
2191
+ 'items': {
2192
+ 'type': 'object',
2193
+ 'description': 'Zendesk Support view object',
2194
+ 'properties': {
2195
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the view is created'},
2196
+ 'url': {'type': 'string', 'description': 'The URL for this resource'},
2197
+ 'title': {'type': 'string', 'description': 'The title of the view'},
2198
+ 'active': {'type': 'boolean', 'description': 'Whether the view is active'},
2199
+ 'position': {'type': 'integer', 'description': 'The position of the view'},
2200
+ 'description': {
2201
+ 'type': ['string', 'null'],
2202
+ 'description': 'The description of the view',
2203
+ },
2204
+ 'execution': {'type': 'object', 'description': 'An object describing how the view should be executed'},
2205
+ 'conditions': {'type': 'object', 'description': 'An object that describes the conditions under which the view will be executed'},
2206
+ 'restriction': {
2207
+ 'type': ['object', 'null'],
2208
+ 'description': 'Who may access this view',
2209
+ },
2210
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2211
+ 'created_at': {
2212
+ 'type': 'string',
2213
+ 'format': 'date-time',
2214
+ 'description': 'The time the view was created',
2215
+ },
2216
+ 'updated_at': {
2217
+ 'type': 'string',
2218
+ 'format': 'date-time',
2219
+ 'description': 'The time the view was last updated',
2220
+ },
2221
+ },
2222
+ 'required': ['id'],
2223
+ 'x-airbyte-entity-name': 'views',
2224
+ },
2225
+ },
2226
+ 'next_page': {
2227
+ 'type': ['string', 'null'],
2228
+ 'description': 'URL to the next page of results',
2229
+ },
2230
+ 'previous_page': {
2231
+ 'type': ['string', 'null'],
2232
+ 'description': 'URL to the previous page of results',
2233
+ },
2234
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
2235
+ },
2236
+ },
2237
+ record_extractor='$.views',
2238
+ meta_extractor={
2239
+ 'next_page': '$.next_page',
2240
+ 'previous_page': '$.previous_page',
2241
+ 'count': '$.count',
2242
+ },
2243
+ ),
2244
+ Action.GET: EndpointDefinition(
2245
+ method='GET',
2246
+ path='/views/{view_id}.json',
2247
+ action=Action.GET,
2248
+ description='Returns a view by its ID',
2249
+ path_params=['view_id'],
2250
+ path_params_schema={
2251
+ 'view_id': {'type': 'integer', 'required': True},
2252
+ },
2253
+ response_schema={
2254
+ 'type': 'object',
2255
+ 'properties': {
2256
+ 'view': {
2257
+ 'type': 'object',
2258
+ 'description': 'Zendesk Support view object',
2259
+ 'properties': {
2260
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the view is created'},
2261
+ 'url': {'type': 'string', 'description': 'The URL for this resource'},
2262
+ 'title': {'type': 'string', 'description': 'The title of the view'},
2263
+ 'active': {'type': 'boolean', 'description': 'Whether the view is active'},
2264
+ 'position': {'type': 'integer', 'description': 'The position of the view'},
2265
+ 'description': {
2266
+ 'type': ['string', 'null'],
2267
+ 'description': 'The description of the view',
2268
+ },
2269
+ 'execution': {'type': 'object', 'description': 'An object describing how the view should be executed'},
2270
+ 'conditions': {'type': 'object', 'description': 'An object that describes the conditions under which the view will be executed'},
2271
+ 'restriction': {
2272
+ 'type': ['object', 'null'],
2273
+ 'description': 'Who may access this view',
2274
+ },
2275
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2276
+ 'created_at': {
2277
+ 'type': 'string',
2278
+ 'format': 'date-time',
2279
+ 'description': 'The time the view was created',
2280
+ },
2281
+ 'updated_at': {
2282
+ 'type': 'string',
2283
+ 'format': 'date-time',
2284
+ 'description': 'The time the view was last updated',
2285
+ },
2286
+ },
2287
+ 'required': ['id'],
2288
+ 'x-airbyte-entity-name': 'views',
2289
+ },
2290
+ },
2291
+ },
2292
+ record_extractor='$.view',
2293
+ ),
2294
+ },
2295
+ entity_schema={
2296
+ 'type': 'object',
2297
+ 'description': 'Zendesk Support view object',
2298
+ 'properties': {
2299
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the view is created'},
2300
+ 'url': {'type': 'string', 'description': 'The URL for this resource'},
2301
+ 'title': {'type': 'string', 'description': 'The title of the view'},
2302
+ 'active': {'type': 'boolean', 'description': 'Whether the view is active'},
2303
+ 'position': {'type': 'integer', 'description': 'The position of the view'},
2304
+ 'description': {
2305
+ 'type': ['string', 'null'],
2306
+ 'description': 'The description of the view',
2307
+ },
2308
+ 'execution': {'type': 'object', 'description': 'An object describing how the view should be executed'},
2309
+ 'conditions': {'type': 'object', 'description': 'An object that describes the conditions under which the view will be executed'},
2310
+ 'restriction': {
2311
+ 'type': ['object', 'null'],
2312
+ 'description': 'Who may access this view',
2313
+ },
2314
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2315
+ 'created_at': {
2316
+ 'type': 'string',
2317
+ 'format': 'date-time',
2318
+ 'description': 'The time the view was created',
2319
+ },
2320
+ 'updated_at': {
2321
+ 'type': 'string',
2322
+ 'format': 'date-time',
2323
+ 'description': 'The time the view was last updated',
2324
+ },
2325
+ },
2326
+ 'required': ['id'],
2327
+ 'x-airbyte-entity-name': 'views',
2328
+ },
2329
+ ),
2330
+ EntityDefinition(
2331
+ name='macros',
2332
+ actions=[Action.LIST, Action.GET],
2333
+ endpoints={
2334
+ Action.LIST: EndpointDefinition(
2335
+ method='GET',
2336
+ path='/macros.json',
2337
+ action=Action.LIST,
2338
+ description='Returns a list of all macros for the account',
2339
+ query_params=[
2340
+ 'page',
2341
+ 'access',
2342
+ 'active',
2343
+ 'category',
2344
+ 'group_id',
2345
+ 'only_viewable',
2346
+ 'sort_by',
2347
+ 'sort_order',
2348
+ ],
2349
+ query_params_schema={
2350
+ 'page': {'type': 'integer', 'required': False},
2351
+ 'access': {'type': 'string', 'required': False},
2352
+ 'active': {'type': 'boolean', 'required': False},
2353
+ 'category': {'type': 'integer', 'required': False},
2354
+ 'group_id': {'type': 'integer', 'required': False},
2355
+ 'only_viewable': {'type': 'boolean', 'required': False},
2356
+ 'sort_by': {'type': 'string', 'required': False},
2357
+ 'sort_order': {'type': 'string', 'required': False},
2358
+ },
2359
+ response_schema={
2360
+ 'type': 'object',
2361
+ 'properties': {
2362
+ 'macros': {
2363
+ 'type': 'array',
2364
+ 'items': {
2365
+ 'type': 'object',
2366
+ 'description': 'Zendesk Support macro object',
2367
+ 'properties': {
2368
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the macro is created'},
2369
+ 'url': {'type': 'string', 'description': "A URL to access the macro's details"},
2370
+ 'title': {'type': 'string', 'description': 'The title of the macro'},
2371
+ 'active': {'type': 'boolean', 'description': 'Useful for determining if the macro should be displayed'},
2372
+ 'position': {'type': 'integer', 'description': 'The position of the macro'},
2373
+ 'description': {'type': 'string', 'description': 'The description of the macro'},
2374
+ 'actions': {
2375
+ 'type': 'array',
2376
+ 'items': {'type': 'object'},
2377
+ 'description': 'Actions to perform when macro is applied',
2378
+ },
2379
+ 'restriction': {
2380
+ 'type': ['object', 'null'],
2381
+ 'description': 'Who may access this macro',
2382
+ },
2383
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2384
+ 'created_at': {
2385
+ 'type': 'string',
2386
+ 'format': 'date-time',
2387
+ 'description': 'The time the macro was created',
2388
+ },
2389
+ 'updated_at': {
2390
+ 'type': 'string',
2391
+ 'format': 'date-time',
2392
+ 'description': 'The time the macro was last updated',
2393
+ },
2394
+ },
2395
+ 'required': ['id'],
2396
+ 'x-airbyte-entity-name': 'macros',
2397
+ },
2398
+ },
2399
+ 'next_page': {
2400
+ 'type': ['string', 'null'],
2401
+ 'description': 'URL to the next page of results',
2402
+ },
2403
+ 'previous_page': {
2404
+ 'type': ['string', 'null'],
2405
+ 'description': 'URL to the previous page of results',
2406
+ },
2407
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
2408
+ },
2409
+ },
2410
+ record_extractor='$.macros',
2411
+ meta_extractor={
2412
+ 'next_page': '$.next_page',
2413
+ 'previous_page': '$.previous_page',
2414
+ 'count': '$.count',
2415
+ },
2416
+ ),
2417
+ Action.GET: EndpointDefinition(
2418
+ method='GET',
2419
+ path='/macros/{macro_id}.json',
2420
+ action=Action.GET,
2421
+ description='Returns a macro by its ID',
2422
+ path_params=['macro_id'],
2423
+ path_params_schema={
2424
+ 'macro_id': {'type': 'integer', 'required': True},
2425
+ },
2426
+ response_schema={
2427
+ 'type': 'object',
2428
+ 'properties': {
2429
+ 'macro': {
2430
+ 'type': 'object',
2431
+ 'description': 'Zendesk Support macro object',
2432
+ 'properties': {
2433
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the macro is created'},
2434
+ 'url': {'type': 'string', 'description': "A URL to access the macro's details"},
2435
+ 'title': {'type': 'string', 'description': 'The title of the macro'},
2436
+ 'active': {'type': 'boolean', 'description': 'Useful for determining if the macro should be displayed'},
2437
+ 'position': {'type': 'integer', 'description': 'The position of the macro'},
2438
+ 'description': {'type': 'string', 'description': 'The description of the macro'},
2439
+ 'actions': {
2440
+ 'type': 'array',
2441
+ 'items': {'type': 'object'},
2442
+ 'description': 'Actions to perform when macro is applied',
2443
+ },
2444
+ 'restriction': {
2445
+ 'type': ['object', 'null'],
2446
+ 'description': 'Who may access this macro',
2447
+ },
2448
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2449
+ 'created_at': {
2450
+ 'type': 'string',
2451
+ 'format': 'date-time',
2452
+ 'description': 'The time the macro was created',
2453
+ },
2454
+ 'updated_at': {
2455
+ 'type': 'string',
2456
+ 'format': 'date-time',
2457
+ 'description': 'The time the macro was last updated',
2458
+ },
2459
+ },
2460
+ 'required': ['id'],
2461
+ 'x-airbyte-entity-name': 'macros',
2462
+ },
2463
+ },
2464
+ },
2465
+ record_extractor='$.macro',
2466
+ ),
2467
+ },
2468
+ entity_schema={
2469
+ 'type': 'object',
2470
+ 'description': 'Zendesk Support macro object',
2471
+ 'properties': {
2472
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the macro is created'},
2473
+ 'url': {'type': 'string', 'description': "A URL to access the macro's details"},
2474
+ 'title': {'type': 'string', 'description': 'The title of the macro'},
2475
+ 'active': {'type': 'boolean', 'description': 'Useful for determining if the macro should be displayed'},
2476
+ 'position': {'type': 'integer', 'description': 'The position of the macro'},
2477
+ 'description': {'type': 'string', 'description': 'The description of the macro'},
2478
+ 'actions': {
2479
+ 'type': 'array',
2480
+ 'items': {'type': 'object'},
2481
+ 'description': 'Actions to perform when macro is applied',
2482
+ },
2483
+ 'restriction': {
2484
+ 'type': ['object', 'null'],
2485
+ 'description': 'Who may access this macro',
2486
+ },
2487
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2488
+ 'created_at': {
2489
+ 'type': 'string',
2490
+ 'format': 'date-time',
2491
+ 'description': 'The time the macro was created',
2492
+ },
2493
+ 'updated_at': {
2494
+ 'type': 'string',
2495
+ 'format': 'date-time',
2496
+ 'description': 'The time the macro was last updated',
2497
+ },
2498
+ },
2499
+ 'required': ['id'],
2500
+ 'x-airbyte-entity-name': 'macros',
2501
+ },
2502
+ ),
2503
+ EntityDefinition(
2504
+ name='triggers',
2505
+ actions=[Action.LIST, Action.GET],
2506
+ endpoints={
2507
+ Action.LIST: EndpointDefinition(
2508
+ method='GET',
2509
+ path='/triggers.json',
2510
+ action=Action.LIST,
2511
+ description='Returns a list of all triggers for the account',
2512
+ query_params=[
2513
+ 'page',
2514
+ 'active',
2515
+ 'category_id',
2516
+ 'sort',
2517
+ ],
2518
+ query_params_schema={
2519
+ 'page': {'type': 'integer', 'required': False},
2520
+ 'active': {'type': 'boolean', 'required': False},
2521
+ 'category_id': {'type': 'string', 'required': False},
2522
+ 'sort': {'type': 'string', 'required': False},
2523
+ },
2524
+ response_schema={
2525
+ 'type': 'object',
2526
+ 'properties': {
2527
+ 'triggers': {
2528
+ 'type': 'array',
2529
+ 'items': {
2530
+ 'type': 'object',
2531
+ 'description': 'Zendesk Support trigger object',
2532
+ 'properties': {
2533
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when created'},
2534
+ 'url': {'type': 'string', 'description': 'The URL of the trigger'},
2535
+ 'title': {'type': 'string', 'description': 'The title of the trigger'},
2536
+ 'active': {'type': 'boolean', 'description': 'Whether the trigger is active'},
2537
+ 'position': {'type': 'integer', 'description': 'Position of the trigger'},
2538
+ 'description': {
2539
+ 'type': ['string', 'null'],
2540
+ 'description': 'The description of the trigger',
2541
+ },
2542
+ 'conditions': {'type': 'object', 'description': 'An object that describes the conditions under which the trigger will execute'},
2543
+ 'actions': {
2544
+ 'type': 'array',
2545
+ 'items': {'type': 'object'},
2546
+ 'description': 'An array of actions',
2547
+ },
2548
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2549
+ 'category_id': {'type': 'string', 'description': 'The ID of the category the trigger belongs to'},
2550
+ 'created_at': {
2551
+ 'type': 'string',
2552
+ 'format': 'date-time',
2553
+ 'description': 'The time the trigger was created',
2554
+ },
2555
+ 'updated_at': {
2556
+ 'type': 'string',
2557
+ 'format': 'date-time',
2558
+ 'description': 'The time the trigger was last updated',
2559
+ },
2560
+ },
2561
+ 'required': ['id'],
2562
+ 'x-airbyte-entity-name': 'triggers',
2563
+ },
2564
+ },
2565
+ 'next_page': {
2566
+ 'type': ['string', 'null'],
2567
+ 'description': 'URL to the next page of results',
2568
+ },
2569
+ 'previous_page': {
2570
+ 'type': ['string', 'null'],
2571
+ 'description': 'URL to the previous page of results',
2572
+ },
2573
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
2574
+ },
2575
+ },
2576
+ record_extractor='$.triggers',
2577
+ meta_extractor={
2578
+ 'next_page': '$.next_page',
2579
+ 'previous_page': '$.previous_page',
2580
+ 'count': '$.count',
2581
+ },
2582
+ ),
2583
+ Action.GET: EndpointDefinition(
2584
+ method='GET',
2585
+ path='/triggers/{trigger_id}.json',
2586
+ action=Action.GET,
2587
+ description='Returns a trigger by its ID',
2588
+ path_params=['trigger_id'],
2589
+ path_params_schema={
2590
+ 'trigger_id': {'type': 'integer', 'required': True},
2591
+ },
2592
+ response_schema={
2593
+ 'type': 'object',
2594
+ 'properties': {
2595
+ 'trigger': {
2596
+ 'type': 'object',
2597
+ 'description': 'Zendesk Support trigger object',
2598
+ 'properties': {
2599
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when created'},
2600
+ 'url': {'type': 'string', 'description': 'The URL of the trigger'},
2601
+ 'title': {'type': 'string', 'description': 'The title of the trigger'},
2602
+ 'active': {'type': 'boolean', 'description': 'Whether the trigger is active'},
2603
+ 'position': {'type': 'integer', 'description': 'Position of the trigger'},
2604
+ 'description': {
2605
+ 'type': ['string', 'null'],
2606
+ 'description': 'The description of the trigger',
2607
+ },
2608
+ 'conditions': {'type': 'object', 'description': 'An object that describes the conditions under which the trigger will execute'},
2609
+ 'actions': {
2610
+ 'type': 'array',
2611
+ 'items': {'type': 'object'},
2612
+ 'description': 'An array of actions',
2613
+ },
2614
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2615
+ 'category_id': {'type': 'string', 'description': 'The ID of the category the trigger belongs to'},
2616
+ 'created_at': {
2617
+ 'type': 'string',
2618
+ 'format': 'date-time',
2619
+ 'description': 'The time the trigger was created',
2620
+ },
2621
+ 'updated_at': {
2622
+ 'type': 'string',
2623
+ 'format': 'date-time',
2624
+ 'description': 'The time the trigger was last updated',
2625
+ },
2626
+ },
2627
+ 'required': ['id'],
2628
+ 'x-airbyte-entity-name': 'triggers',
2629
+ },
2630
+ },
2631
+ },
2632
+ record_extractor='$.trigger',
2633
+ ),
2634
+ },
2635
+ entity_schema={
2636
+ 'type': 'object',
2637
+ 'description': 'Zendesk Support trigger object',
2638
+ 'properties': {
2639
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when created'},
2640
+ 'url': {'type': 'string', 'description': 'The URL of the trigger'},
2641
+ 'title': {'type': 'string', 'description': 'The title of the trigger'},
2642
+ 'active': {'type': 'boolean', 'description': 'Whether the trigger is active'},
2643
+ 'position': {'type': 'integer', 'description': 'Position of the trigger'},
2644
+ 'description': {
2645
+ 'type': ['string', 'null'],
2646
+ 'description': 'The description of the trigger',
2647
+ },
2648
+ 'conditions': {'type': 'object', 'description': 'An object that describes the conditions under which the trigger will execute'},
2649
+ 'actions': {
2650
+ 'type': 'array',
2651
+ 'items': {'type': 'object'},
2652
+ 'description': 'An array of actions',
2653
+ },
2654
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2655
+ 'category_id': {'type': 'string', 'description': 'The ID of the category the trigger belongs to'},
2656
+ 'created_at': {
2657
+ 'type': 'string',
2658
+ 'format': 'date-time',
2659
+ 'description': 'The time the trigger was created',
2660
+ },
2661
+ 'updated_at': {
2662
+ 'type': 'string',
2663
+ 'format': 'date-time',
2664
+ 'description': 'The time the trigger was last updated',
2665
+ },
2666
+ },
2667
+ 'required': ['id'],
2668
+ 'x-airbyte-entity-name': 'triggers',
2669
+ },
2670
+ ),
2671
+ EntityDefinition(
2672
+ name='automations',
2673
+ actions=[Action.LIST, Action.GET],
2674
+ endpoints={
2675
+ Action.LIST: EndpointDefinition(
2676
+ method='GET',
2677
+ path='/automations.json',
2678
+ action=Action.LIST,
2679
+ description='Returns a list of all automations for the account',
2680
+ query_params=['page', 'active', 'sort'],
2681
+ query_params_schema={
2682
+ 'page': {'type': 'integer', 'required': False},
2683
+ 'active': {'type': 'boolean', 'required': False},
2684
+ 'sort': {'type': 'string', 'required': False},
2685
+ },
2686
+ response_schema={
2687
+ 'type': 'object',
2688
+ 'properties': {
2689
+ 'automations': {
2690
+ 'type': 'array',
2691
+ 'items': {
2692
+ 'type': 'object',
2693
+ 'description': 'Zendesk Support automation object',
2694
+ 'properties': {
2695
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when created'},
2696
+ 'url': {'type': 'string', 'description': 'The URL of the automation'},
2697
+ 'title': {'type': 'string', 'description': 'The title of the automation'},
2698
+ 'active': {'type': 'boolean', 'description': 'Whether the automation is active'},
2699
+ 'position': {'type': 'integer', 'description': 'The position of the automation'},
2700
+ 'conditions': {'type': 'object', 'description': 'An object that describes the conditions under which the automation will execute'},
2701
+ 'actions': {
2702
+ 'type': 'array',
2703
+ 'items': {'type': 'object'},
2704
+ 'description': 'An array of actions',
2705
+ },
2706
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2707
+ 'created_at': {
2708
+ 'type': 'string',
2709
+ 'format': 'date-time',
2710
+ 'description': 'The time the automation was created',
2711
+ },
2712
+ 'updated_at': {
2713
+ 'type': 'string',
2714
+ 'format': 'date-time',
2715
+ 'description': 'The time the automation was last updated',
2716
+ },
2717
+ },
2718
+ 'required': ['id'],
2719
+ 'x-airbyte-entity-name': 'automations',
2720
+ },
2721
+ },
2722
+ 'next_page': {
2723
+ 'type': ['string', 'null'],
2724
+ 'description': 'URL to the next page of results',
2725
+ },
2726
+ 'previous_page': {
2727
+ 'type': ['string', 'null'],
2728
+ 'description': 'URL to the previous page of results',
2729
+ },
2730
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
2731
+ },
2732
+ },
2733
+ record_extractor='$.automations',
2734
+ meta_extractor={
2735
+ 'next_page': '$.next_page',
2736
+ 'previous_page': '$.previous_page',
2737
+ 'count': '$.count',
2738
+ },
2739
+ ),
2740
+ Action.GET: EndpointDefinition(
2741
+ method='GET',
2742
+ path='/automations/{automation_id}.json',
2743
+ action=Action.GET,
2744
+ description='Returns an automation by its ID',
2745
+ path_params=['automation_id'],
2746
+ path_params_schema={
2747
+ 'automation_id': {'type': 'integer', 'required': True},
2748
+ },
2749
+ response_schema={
2750
+ 'type': 'object',
2751
+ 'properties': {
2752
+ 'automation': {
2753
+ 'type': 'object',
2754
+ 'description': 'Zendesk Support automation object',
2755
+ 'properties': {
2756
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when created'},
2757
+ 'url': {'type': 'string', 'description': 'The URL of the automation'},
2758
+ 'title': {'type': 'string', 'description': 'The title of the automation'},
2759
+ 'active': {'type': 'boolean', 'description': 'Whether the automation is active'},
2760
+ 'position': {'type': 'integer', 'description': 'The position of the automation'},
2761
+ 'conditions': {'type': 'object', 'description': 'An object that describes the conditions under which the automation will execute'},
2762
+ 'actions': {
2763
+ 'type': 'array',
2764
+ 'items': {'type': 'object'},
2765
+ 'description': 'An array of actions',
2766
+ },
2767
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2768
+ 'created_at': {
2769
+ 'type': 'string',
2770
+ 'format': 'date-time',
2771
+ 'description': 'The time the automation was created',
2772
+ },
2773
+ 'updated_at': {
2774
+ 'type': 'string',
2775
+ 'format': 'date-time',
2776
+ 'description': 'The time the automation was last updated',
2777
+ },
2778
+ },
2779
+ 'required': ['id'],
2780
+ 'x-airbyte-entity-name': 'automations',
2781
+ },
2782
+ },
2783
+ },
2784
+ record_extractor='$.automation',
2785
+ ),
2786
+ },
2787
+ entity_schema={
2788
+ 'type': 'object',
2789
+ 'description': 'Zendesk Support automation object',
2790
+ 'properties': {
2791
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when created'},
2792
+ 'url': {'type': 'string', 'description': 'The URL of the automation'},
2793
+ 'title': {'type': 'string', 'description': 'The title of the automation'},
2794
+ 'active': {'type': 'boolean', 'description': 'Whether the automation is active'},
2795
+ 'position': {'type': 'integer', 'description': 'The position of the automation'},
2796
+ 'conditions': {'type': 'object', 'description': 'An object that describes the conditions under which the automation will execute'},
2797
+ 'actions': {
2798
+ 'type': 'array',
2799
+ 'items': {'type': 'object'},
2800
+ 'description': 'An array of actions',
2801
+ },
2802
+ 'raw_title': {'type': 'string', 'description': 'The dynamic content placeholder for title'},
2803
+ 'created_at': {
2804
+ 'type': 'string',
2805
+ 'format': 'date-time',
2806
+ 'description': 'The time the automation was created',
2807
+ },
2808
+ 'updated_at': {
2809
+ 'type': 'string',
2810
+ 'format': 'date-time',
2811
+ 'description': 'The time the automation was last updated',
2812
+ },
2813
+ },
2814
+ 'required': ['id'],
2815
+ 'x-airbyte-entity-name': 'automations',
2816
+ },
2817
+ ),
2818
+ EntityDefinition(
2819
+ name='tags',
2820
+ actions=[Action.LIST],
2821
+ endpoints={
2822
+ Action.LIST: EndpointDefinition(
2823
+ method='GET',
2824
+ path='/tags.json',
2825
+ action=Action.LIST,
2826
+ description='Returns a list of all tags used in the account',
2827
+ query_params=['page'],
2828
+ query_params_schema={
2829
+ 'page': {'type': 'integer', 'required': False},
2830
+ },
2831
+ response_schema={
2832
+ 'type': 'object',
2833
+ 'properties': {
2834
+ 'tags': {
2835
+ 'type': 'array',
2836
+ 'items': {
2837
+ 'type': 'object',
2838
+ 'description': 'Zendesk Support tag object',
2839
+ 'properties': {
2840
+ 'name': {'type': 'string', 'description': 'The name of the tag'},
2841
+ 'count': {'type': 'integer', 'description': 'The number of tickets with this tag'},
2842
+ },
2843
+ 'required': ['name'],
2844
+ 'x-airbyte-entity-name': 'tags',
2845
+ },
2846
+ },
2847
+ 'next_page': {
2848
+ 'type': ['string', 'null'],
2849
+ 'description': 'URL to the next page of results',
2850
+ },
2851
+ 'previous_page': {
2852
+ 'type': ['string', 'null'],
2853
+ 'description': 'URL to the previous page of results',
2854
+ },
2855
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
2856
+ },
2857
+ },
2858
+ record_extractor='$.tags',
2859
+ meta_extractor={
2860
+ 'next_page': '$.next_page',
2861
+ 'previous_page': '$.previous_page',
2862
+ 'count': '$.count',
2863
+ },
2864
+ ),
2865
+ },
2866
+ entity_schema={
2867
+ 'type': 'object',
2868
+ 'description': 'Zendesk Support tag object',
2869
+ 'properties': {
2870
+ 'name': {'type': 'string', 'description': 'The name of the tag'},
2871
+ 'count': {'type': 'integer', 'description': 'The number of tickets with this tag'},
2872
+ },
2873
+ 'required': ['name'],
2874
+ 'x-airbyte-entity-name': 'tags',
2875
+ },
2876
+ ),
2877
+ EntityDefinition(
2878
+ name='satisfaction_ratings',
2879
+ actions=[Action.LIST, Action.GET],
2880
+ endpoints={
2881
+ Action.LIST: EndpointDefinition(
2882
+ method='GET',
2883
+ path='/satisfaction_ratings.json',
2884
+ action=Action.LIST,
2885
+ description='Returns a list of all satisfaction ratings',
2886
+ query_params=[
2887
+ 'page',
2888
+ 'score',
2889
+ 'start_time',
2890
+ 'end_time',
2891
+ ],
2892
+ query_params_schema={
2893
+ 'page': {'type': 'integer', 'required': False},
2894
+ 'score': {'type': 'string', 'required': False},
2895
+ 'start_time': {'type': 'integer', 'required': False},
2896
+ 'end_time': {'type': 'integer', 'required': False},
2897
+ },
2898
+ response_schema={
2899
+ 'type': 'object',
2900
+ 'properties': {
2901
+ 'satisfaction_ratings': {
2902
+ 'type': 'array',
2903
+ 'items': {
2904
+ 'type': 'object',
2905
+ 'description': 'Zendesk Support satisfaction rating object',
2906
+ 'properties': {
2907
+ 'id': {'type': 'integer', 'description': 'Automatically assigned'},
2908
+ 'url': {'type': 'string', 'description': 'The API url of this rating'},
2909
+ 'assignee_id': {
2910
+ 'type': ['integer', 'null'],
2911
+ 'description': 'The id of agent assigned to at the time of rating',
2912
+ },
2913
+ 'group_id': {
2914
+ 'type': ['integer', 'null'],
2915
+ 'description': 'The id of group assigned to at the time of rating',
2916
+ },
2917
+ 'requester_id': {'type': 'integer', 'description': 'The id of ticket requester submitting the rating'},
2918
+ 'ticket_id': {'type': 'integer', 'description': 'The id of the ticket being rated'},
2919
+ 'score': {'type': 'string', 'description': 'The rating (offered, unoffered, good, bad)'},
2920
+ 'comment': {
2921
+ 'type': ['string', 'null'],
2922
+ 'description': 'Feedback comment',
2923
+ },
2924
+ 'reason': {
2925
+ 'type': ['string', 'null'],
2926
+ 'description': 'The reason for a bad rating',
2927
+ },
2928
+ 'reason_id': {
2929
+ 'type': ['integer', 'null'],
2930
+ 'description': 'The id of a reason selected by the requester',
2931
+ },
2932
+ 'reason_code': {
2933
+ 'type': ['integer', 'null'],
2934
+ 'description': 'The reason code for the selection',
2935
+ },
2936
+ 'created_at': {
2937
+ 'type': 'string',
2938
+ 'format': 'date-time',
2939
+ 'description': 'When this record was created',
2940
+ },
2941
+ 'updated_at': {
2942
+ 'type': 'string',
2943
+ 'format': 'date-time',
2944
+ 'description': 'When this record was last updated',
2945
+ },
2946
+ },
2947
+ 'required': ['id'],
2948
+ 'x-airbyte-entity-name': 'satisfaction_ratings',
2949
+ },
2950
+ },
2951
+ 'next_page': {
2952
+ 'type': ['string', 'null'],
2953
+ 'description': 'URL to the next page of results',
2954
+ },
2955
+ 'previous_page': {
2956
+ 'type': ['string', 'null'],
2957
+ 'description': 'URL to the previous page of results',
2958
+ },
2959
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
2960
+ },
2961
+ },
2962
+ record_extractor='$.satisfaction_ratings',
2963
+ meta_extractor={
2964
+ 'next_page': '$.next_page',
2965
+ 'previous_page': '$.previous_page',
2966
+ 'count': '$.count',
2967
+ },
2968
+ ),
2969
+ Action.GET: EndpointDefinition(
2970
+ method='GET',
2971
+ path='/satisfaction_ratings/{satisfaction_rating_id}.json',
2972
+ action=Action.GET,
2973
+ description='Returns a satisfaction rating by its ID',
2974
+ path_params=['satisfaction_rating_id'],
2975
+ path_params_schema={
2976
+ 'satisfaction_rating_id': {'type': 'integer', 'required': True},
2977
+ },
2978
+ response_schema={
2979
+ 'type': 'object',
2980
+ 'properties': {
2981
+ 'satisfaction_rating': {
2982
+ 'type': 'object',
2983
+ 'description': 'Zendesk Support satisfaction rating object',
2984
+ 'properties': {
2985
+ 'id': {'type': 'integer', 'description': 'Automatically assigned'},
2986
+ 'url': {'type': 'string', 'description': 'The API url of this rating'},
2987
+ 'assignee_id': {
2988
+ 'type': ['integer', 'null'],
2989
+ 'description': 'The id of agent assigned to at the time of rating',
2990
+ },
2991
+ 'group_id': {
2992
+ 'type': ['integer', 'null'],
2993
+ 'description': 'The id of group assigned to at the time of rating',
2994
+ },
2995
+ 'requester_id': {'type': 'integer', 'description': 'The id of ticket requester submitting the rating'},
2996
+ 'ticket_id': {'type': 'integer', 'description': 'The id of the ticket being rated'},
2997
+ 'score': {'type': 'string', 'description': 'The rating (offered, unoffered, good, bad)'},
2998
+ 'comment': {
2999
+ 'type': ['string', 'null'],
3000
+ 'description': 'Feedback comment',
3001
+ },
3002
+ 'reason': {
3003
+ 'type': ['string', 'null'],
3004
+ 'description': 'The reason for a bad rating',
3005
+ },
3006
+ 'reason_id': {
3007
+ 'type': ['integer', 'null'],
3008
+ 'description': 'The id of a reason selected by the requester',
3009
+ },
3010
+ 'reason_code': {
3011
+ 'type': ['integer', 'null'],
3012
+ 'description': 'The reason code for the selection',
3013
+ },
3014
+ 'created_at': {
3015
+ 'type': 'string',
3016
+ 'format': 'date-time',
3017
+ 'description': 'When this record was created',
3018
+ },
3019
+ 'updated_at': {
3020
+ 'type': 'string',
3021
+ 'format': 'date-time',
3022
+ 'description': 'When this record was last updated',
3023
+ },
3024
+ },
3025
+ 'required': ['id'],
3026
+ 'x-airbyte-entity-name': 'satisfaction_ratings',
3027
+ },
3028
+ },
3029
+ },
3030
+ record_extractor='$.satisfaction_rating',
3031
+ ),
3032
+ },
3033
+ entity_schema={
3034
+ 'type': 'object',
3035
+ 'description': 'Zendesk Support satisfaction rating object',
3036
+ 'properties': {
3037
+ 'id': {'type': 'integer', 'description': 'Automatically assigned'},
3038
+ 'url': {'type': 'string', 'description': 'The API url of this rating'},
3039
+ 'assignee_id': {
3040
+ 'type': ['integer', 'null'],
3041
+ 'description': 'The id of agent assigned to at the time of rating',
3042
+ },
3043
+ 'group_id': {
3044
+ 'type': ['integer', 'null'],
3045
+ 'description': 'The id of group assigned to at the time of rating',
3046
+ },
3047
+ 'requester_id': {'type': 'integer', 'description': 'The id of ticket requester submitting the rating'},
3048
+ 'ticket_id': {'type': 'integer', 'description': 'The id of the ticket being rated'},
3049
+ 'score': {'type': 'string', 'description': 'The rating (offered, unoffered, good, bad)'},
3050
+ 'comment': {
3051
+ 'type': ['string', 'null'],
3052
+ 'description': 'Feedback comment',
3053
+ },
3054
+ 'reason': {
3055
+ 'type': ['string', 'null'],
3056
+ 'description': 'The reason for a bad rating',
3057
+ },
3058
+ 'reason_id': {
3059
+ 'type': ['integer', 'null'],
3060
+ 'description': 'The id of a reason selected by the requester',
3061
+ },
3062
+ 'reason_code': {
3063
+ 'type': ['integer', 'null'],
3064
+ 'description': 'The reason code for the selection',
3065
+ },
3066
+ 'created_at': {
3067
+ 'type': 'string',
3068
+ 'format': 'date-time',
3069
+ 'description': 'When this record was created',
3070
+ },
3071
+ 'updated_at': {
3072
+ 'type': 'string',
3073
+ 'format': 'date-time',
3074
+ 'description': 'When this record was last updated',
3075
+ },
3076
+ },
3077
+ 'required': ['id'],
3078
+ 'x-airbyte-entity-name': 'satisfaction_ratings',
3079
+ },
3080
+ ),
3081
+ EntityDefinition(
3082
+ name='group_memberships',
3083
+ actions=[Action.LIST],
3084
+ endpoints={
3085
+ Action.LIST: EndpointDefinition(
3086
+ method='GET',
3087
+ path='/group_memberships.json',
3088
+ action=Action.LIST,
3089
+ description='Returns a list of all group memberships',
3090
+ query_params=['page'],
3091
+ query_params_schema={
3092
+ 'page': {'type': 'integer', 'required': False},
3093
+ },
3094
+ response_schema={
3095
+ 'type': 'object',
3096
+ 'properties': {
3097
+ 'group_memberships': {
3098
+ 'type': 'array',
3099
+ 'items': {
3100
+ 'type': 'object',
3101
+ 'description': 'Zendesk Support group membership object',
3102
+ 'properties': {
3103
+ 'id': {'type': 'integer', 'description': 'Automatically assigned upon creation'},
3104
+ 'url': {'type': 'string', 'description': 'The API url of this record'},
3105
+ 'user_id': {'type': 'integer', 'description': 'The id of an agent'},
3106
+ 'group_id': {'type': 'integer', 'description': 'The id of a group'},
3107
+ 'default': {'type': 'boolean', 'description': "If true, tickets assigned directly to the agent will assume this membership's group"},
3108
+ 'created_at': {
3109
+ 'type': 'string',
3110
+ 'format': 'date-time',
3111
+ 'description': 'When the group membership was created',
3112
+ },
3113
+ 'updated_at': {
3114
+ 'type': 'string',
3115
+ 'format': 'date-time',
3116
+ 'description': 'When the group membership was last updated',
3117
+ },
3118
+ },
3119
+ 'required': ['id'],
3120
+ 'x-airbyte-entity-name': 'group_memberships',
3121
+ },
3122
+ },
3123
+ 'next_page': {
3124
+ 'type': ['string', 'null'],
3125
+ 'description': 'URL to the next page of results',
3126
+ },
3127
+ 'previous_page': {
3128
+ 'type': ['string', 'null'],
3129
+ 'description': 'URL to the previous page of results',
3130
+ },
3131
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
3132
+ },
3133
+ },
3134
+ record_extractor='$.group_memberships',
3135
+ meta_extractor={
3136
+ 'next_page': '$.next_page',
3137
+ 'previous_page': '$.previous_page',
3138
+ 'count': '$.count',
3139
+ },
3140
+ ),
3141
+ },
3142
+ entity_schema={
3143
+ 'type': 'object',
3144
+ 'description': 'Zendesk Support group membership object',
3145
+ 'properties': {
3146
+ 'id': {'type': 'integer', 'description': 'Automatically assigned upon creation'},
3147
+ 'url': {'type': 'string', 'description': 'The API url of this record'},
3148
+ 'user_id': {'type': 'integer', 'description': 'The id of an agent'},
3149
+ 'group_id': {'type': 'integer', 'description': 'The id of a group'},
3150
+ 'default': {'type': 'boolean', 'description': "If true, tickets assigned directly to the agent will assume this membership's group"},
3151
+ 'created_at': {
3152
+ 'type': 'string',
3153
+ 'format': 'date-time',
3154
+ 'description': 'When the group membership was created',
3155
+ },
3156
+ 'updated_at': {
3157
+ 'type': 'string',
3158
+ 'format': 'date-time',
3159
+ 'description': 'When the group membership was last updated',
3160
+ },
3161
+ },
3162
+ 'required': ['id'],
3163
+ 'x-airbyte-entity-name': 'group_memberships',
3164
+ },
3165
+ ),
3166
+ EntityDefinition(
3167
+ name='organization_memberships',
3168
+ actions=[Action.LIST],
3169
+ endpoints={
3170
+ Action.LIST: EndpointDefinition(
3171
+ method='GET',
3172
+ path='/organization_memberships.json',
3173
+ action=Action.LIST,
3174
+ description='Returns a list of all organization memberships',
3175
+ query_params=['page'],
3176
+ query_params_schema={
3177
+ 'page': {'type': 'integer', 'required': False},
3178
+ },
3179
+ response_schema={
3180
+ 'type': 'object',
3181
+ 'properties': {
3182
+ 'organization_memberships': {
3183
+ 'type': 'array',
3184
+ 'items': {
3185
+ 'type': 'object',
3186
+ 'description': 'Zendesk Support organization membership object',
3187
+ 'properties': {
3188
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the membership is created'},
3189
+ 'url': {'type': 'string', 'description': 'The API url of this membership'},
3190
+ 'user_id': {'type': 'integer', 'description': 'The ID of the user for whom this memberships belongs'},
3191
+ 'organization_id': {'type': 'integer', 'description': 'The ID of the organization associated with this user'},
3192
+ 'default': {'type': 'boolean', 'description': 'If true, this is the default organization for the user'},
3193
+ 'organization_name': {'type': 'string', 'description': 'The name of the organization'},
3194
+ 'view_tickets': {'type': 'boolean', 'description': 'If true, this user can view tickets from this organization'},
3195
+ 'created_at': {
3196
+ 'type': 'string',
3197
+ 'format': 'date-time',
3198
+ 'description': 'When the membership was created',
3199
+ },
3200
+ 'updated_at': {
3201
+ 'type': 'string',
3202
+ 'format': 'date-time',
3203
+ 'description': 'When the membership was last updated',
3204
+ },
3205
+ },
3206
+ 'required': ['id'],
3207
+ 'x-airbyte-entity-name': 'organization_memberships',
3208
+ },
3209
+ },
3210
+ 'next_page': {
3211
+ 'type': ['string', 'null'],
3212
+ 'description': 'URL to the next page of results',
3213
+ },
3214
+ 'previous_page': {
3215
+ 'type': ['string', 'null'],
3216
+ 'description': 'URL to the previous page of results',
3217
+ },
3218
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
3219
+ },
3220
+ },
3221
+ record_extractor='$.organization_memberships',
3222
+ meta_extractor={
3223
+ 'next_page': '$.next_page',
3224
+ 'previous_page': '$.previous_page',
3225
+ 'count': '$.count',
3226
+ },
3227
+ ),
3228
+ },
3229
+ entity_schema={
3230
+ 'type': 'object',
3231
+ 'description': 'Zendesk Support organization membership object',
3232
+ 'properties': {
3233
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the membership is created'},
3234
+ 'url': {'type': 'string', 'description': 'The API url of this membership'},
3235
+ 'user_id': {'type': 'integer', 'description': 'The ID of the user for whom this memberships belongs'},
3236
+ 'organization_id': {'type': 'integer', 'description': 'The ID of the organization associated with this user'},
3237
+ 'default': {'type': 'boolean', 'description': 'If true, this is the default organization for the user'},
3238
+ 'organization_name': {'type': 'string', 'description': 'The name of the organization'},
3239
+ 'view_tickets': {'type': 'boolean', 'description': 'If true, this user can view tickets from this organization'},
3240
+ 'created_at': {
3241
+ 'type': 'string',
3242
+ 'format': 'date-time',
3243
+ 'description': 'When the membership was created',
3244
+ },
3245
+ 'updated_at': {
3246
+ 'type': 'string',
3247
+ 'format': 'date-time',
3248
+ 'description': 'When the membership was last updated',
3249
+ },
3250
+ },
3251
+ 'required': ['id'],
3252
+ 'x-airbyte-entity-name': 'organization_memberships',
3253
+ },
3254
+ ),
3255
+ EntityDefinition(
3256
+ name='sla_policies',
3257
+ actions=[Action.LIST, Action.GET],
3258
+ endpoints={
3259
+ Action.LIST: EndpointDefinition(
3260
+ method='GET',
3261
+ path='/slas/policies.json',
3262
+ action=Action.LIST,
3263
+ description='Returns a list of all SLA policies',
3264
+ query_params=['page'],
3265
+ query_params_schema={
3266
+ 'page': {'type': 'integer', 'required': False},
3267
+ },
3268
+ response_schema={
3269
+ 'type': 'object',
3270
+ 'properties': {
3271
+ 'sla_policies': {
3272
+ 'type': 'array',
3273
+ 'items': {
3274
+ 'type': 'object',
3275
+ 'description': 'Zendesk Support SLA policy object',
3276
+ 'properties': {
3277
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the SLA policy is created'},
3278
+ 'url': {'type': 'string', 'description': 'URL of the SLA policy'},
3279
+ 'title': {'type': 'string', 'description': 'The title of the SLA policy'},
3280
+ 'description': {'type': 'string', 'description': 'The description of the SLA policy'},
3281
+ 'position': {'type': 'integer', 'description': 'Position of the SLA policy'},
3282
+ 'filter': {'type': 'object', 'description': 'Filter for the SLA policy'},
3283
+ 'policy_metrics': {
3284
+ 'type': 'array',
3285
+ 'items': {'type': 'object'},
3286
+ 'description': 'Array of policy metrics',
3287
+ },
3288
+ 'created_at': {
3289
+ 'type': 'string',
3290
+ 'format': 'date-time',
3291
+ 'description': 'When the SLA policy was created',
3292
+ },
3293
+ 'updated_at': {
3294
+ 'type': 'string',
3295
+ 'format': 'date-time',
3296
+ 'description': 'When the SLA policy was last updated',
3297
+ },
3298
+ },
3299
+ 'required': ['id'],
3300
+ 'x-airbyte-entity-name': 'sla_policies',
3301
+ },
3302
+ },
3303
+ 'next_page': {
3304
+ 'type': ['string', 'null'],
3305
+ 'description': 'URL to the next page of results',
3306
+ },
3307
+ 'previous_page': {
3308
+ 'type': ['string', 'null'],
3309
+ 'description': 'URL to the previous page of results',
3310
+ },
3311
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
3312
+ },
3313
+ },
3314
+ record_extractor='$.sla_policies',
3315
+ meta_extractor={
3316
+ 'next_page': '$.next_page',
3317
+ 'previous_page': '$.previous_page',
3318
+ 'count': '$.count',
3319
+ },
3320
+ ),
3321
+ Action.GET: EndpointDefinition(
3322
+ method='GET',
3323
+ path='/slas/policies/{sla_policy_id}.json',
3324
+ action=Action.GET,
3325
+ description='Returns an SLA policy by its ID',
3326
+ path_params=['sla_policy_id'],
3327
+ path_params_schema={
3328
+ 'sla_policy_id': {'type': 'integer', 'required': True},
3329
+ },
3330
+ response_schema={
3331
+ 'type': 'object',
3332
+ 'properties': {
3333
+ 'sla_policy': {
3334
+ 'type': 'object',
3335
+ 'description': 'Zendesk Support SLA policy object',
3336
+ 'properties': {
3337
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the SLA policy is created'},
3338
+ 'url': {'type': 'string', 'description': 'URL of the SLA policy'},
3339
+ 'title': {'type': 'string', 'description': 'The title of the SLA policy'},
3340
+ 'description': {'type': 'string', 'description': 'The description of the SLA policy'},
3341
+ 'position': {'type': 'integer', 'description': 'Position of the SLA policy'},
3342
+ 'filter': {'type': 'object', 'description': 'Filter for the SLA policy'},
3343
+ 'policy_metrics': {
3344
+ 'type': 'array',
3345
+ 'items': {'type': 'object'},
3346
+ 'description': 'Array of policy metrics',
3347
+ },
3348
+ 'created_at': {
3349
+ 'type': 'string',
3350
+ 'format': 'date-time',
3351
+ 'description': 'When the SLA policy was created',
3352
+ },
3353
+ 'updated_at': {
3354
+ 'type': 'string',
3355
+ 'format': 'date-time',
3356
+ 'description': 'When the SLA policy was last updated',
3357
+ },
3358
+ },
3359
+ 'required': ['id'],
3360
+ 'x-airbyte-entity-name': 'sla_policies',
3361
+ },
3362
+ },
3363
+ },
3364
+ record_extractor='$.sla_policy',
3365
+ ),
3366
+ },
3367
+ entity_schema={
3368
+ 'type': 'object',
3369
+ 'description': 'Zendesk Support SLA policy object',
3370
+ 'properties': {
3371
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when the SLA policy is created'},
3372
+ 'url': {'type': 'string', 'description': 'URL of the SLA policy'},
3373
+ 'title': {'type': 'string', 'description': 'The title of the SLA policy'},
3374
+ 'description': {'type': 'string', 'description': 'The description of the SLA policy'},
3375
+ 'position': {'type': 'integer', 'description': 'Position of the SLA policy'},
3376
+ 'filter': {'type': 'object', 'description': 'Filter for the SLA policy'},
3377
+ 'policy_metrics': {
3378
+ 'type': 'array',
3379
+ 'items': {'type': 'object'},
3380
+ 'description': 'Array of policy metrics',
3381
+ },
3382
+ 'created_at': {
3383
+ 'type': 'string',
3384
+ 'format': 'date-time',
3385
+ 'description': 'When the SLA policy was created',
3386
+ },
3387
+ 'updated_at': {
3388
+ 'type': 'string',
3389
+ 'format': 'date-time',
3390
+ 'description': 'When the SLA policy was last updated',
3391
+ },
3392
+ },
3393
+ 'required': ['id'],
3394
+ 'x-airbyte-entity-name': 'sla_policies',
3395
+ },
3396
+ ),
3397
+ EntityDefinition(
3398
+ name='ticket_forms',
3399
+ actions=[Action.LIST, Action.GET],
3400
+ endpoints={
3401
+ Action.LIST: EndpointDefinition(
3402
+ method='GET',
3403
+ path='/ticket_forms.json',
3404
+ action=Action.LIST,
3405
+ description='Returns a list of all ticket forms for the account',
3406
+ query_params=['page', 'active', 'end_user_visible'],
3407
+ query_params_schema={
3408
+ 'page': {'type': 'integer', 'required': False},
3409
+ 'active': {'type': 'boolean', 'required': False},
3410
+ 'end_user_visible': {'type': 'boolean', 'required': False},
3411
+ },
3412
+ response_schema={
3413
+ 'type': 'object',
3414
+ 'properties': {
3415
+ 'ticket_forms': {
3416
+ 'type': 'array',
3417
+ 'items': {
3418
+ 'type': 'object',
3419
+ 'description': 'Zendesk Support ticket form object',
3420
+ 'properties': {
3421
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when creating ticket forms'},
3422
+ 'url': {'type': 'string', 'description': 'URL of the ticket form'},
3423
+ 'name': {'type': 'string', 'description': 'The name of the form'},
3424
+ 'display_name': {'type': 'string', 'description': 'The name of the form that is displayed to an end user'},
3425
+ 'raw_name': {'type': 'string', 'description': 'The dynamic content placeholder for name'},
3426
+ 'raw_display_name': {'type': 'string', 'description': 'The dynamic content placeholder for display_name'},
3427
+ 'position': {'type': 'integer', 'description': 'The position of this form among other forms'},
3428
+ 'active': {'type': 'boolean', 'description': 'If the form is set as active'},
3429
+ 'end_user_visible': {'type': 'boolean', 'description': 'Is the form visible to the end user'},
3430
+ 'default': {'type': 'boolean', 'description': 'Is the form the default form for this account'},
3431
+ 'in_all_brands': {'type': 'boolean', 'description': 'Is the form available for use in all brands'},
3432
+ 'restricted_brand_ids': {
3433
+ 'type': 'array',
3434
+ 'items': {'type': 'integer'},
3435
+ 'description': 'ids of brands that this form is restricted to',
3436
+ },
3437
+ 'ticket_field_ids': {
3438
+ 'type': 'array',
3439
+ 'items': {'type': 'integer'},
3440
+ 'description': 'ids of all ticket fields which are in this form',
3441
+ },
3442
+ 'agent_conditions': {
3443
+ 'type': 'array',
3444
+ 'items': {'type': 'object'},
3445
+ 'description': 'Array of condition sets for agent workspaces',
3446
+ },
3447
+ 'end_user_conditions': {
3448
+ 'type': 'array',
3449
+ 'items': {'type': 'object'},
3450
+ 'description': 'Array of condition sets for end user products',
3451
+ },
3452
+ 'created_at': {
3453
+ 'type': 'string',
3454
+ 'format': 'date-time',
3455
+ 'description': 'When the ticket form was created',
3456
+ },
3457
+ 'updated_at': {
3458
+ 'type': 'string',
3459
+ 'format': 'date-time',
3460
+ 'description': 'When the ticket form was last updated',
3461
+ },
3462
+ },
3463
+ 'required': ['id'],
3464
+ 'x-airbyte-entity-name': 'ticket_forms',
3465
+ },
3466
+ },
3467
+ 'next_page': {
3468
+ 'type': ['string', 'null'],
3469
+ 'description': 'URL to the next page of results',
3470
+ },
3471
+ 'previous_page': {
3472
+ 'type': ['string', 'null'],
3473
+ 'description': 'URL to the previous page of results',
3474
+ },
3475
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
3476
+ },
3477
+ },
3478
+ record_extractor='$.ticket_forms',
3479
+ meta_extractor={
3480
+ 'next_page': '$.next_page',
3481
+ 'previous_page': '$.previous_page',
3482
+ 'count': '$.count',
3483
+ },
3484
+ ),
3485
+ Action.GET: EndpointDefinition(
3486
+ method='GET',
3487
+ path='/ticket_forms/{ticket_form_id}.json',
3488
+ action=Action.GET,
3489
+ description='Returns a ticket form by its ID',
3490
+ path_params=['ticket_form_id'],
3491
+ path_params_schema={
3492
+ 'ticket_form_id': {'type': 'integer', 'required': True},
3493
+ },
3494
+ response_schema={
3495
+ 'type': 'object',
3496
+ 'properties': {
3497
+ 'ticket_form': {
3498
+ 'type': 'object',
3499
+ 'description': 'Zendesk Support ticket form object',
3500
+ 'properties': {
3501
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when creating ticket forms'},
3502
+ 'url': {'type': 'string', 'description': 'URL of the ticket form'},
3503
+ 'name': {'type': 'string', 'description': 'The name of the form'},
3504
+ 'display_name': {'type': 'string', 'description': 'The name of the form that is displayed to an end user'},
3505
+ 'raw_name': {'type': 'string', 'description': 'The dynamic content placeholder for name'},
3506
+ 'raw_display_name': {'type': 'string', 'description': 'The dynamic content placeholder for display_name'},
3507
+ 'position': {'type': 'integer', 'description': 'The position of this form among other forms'},
3508
+ 'active': {'type': 'boolean', 'description': 'If the form is set as active'},
3509
+ 'end_user_visible': {'type': 'boolean', 'description': 'Is the form visible to the end user'},
3510
+ 'default': {'type': 'boolean', 'description': 'Is the form the default form for this account'},
3511
+ 'in_all_brands': {'type': 'boolean', 'description': 'Is the form available for use in all brands'},
3512
+ 'restricted_brand_ids': {
3513
+ 'type': 'array',
3514
+ 'items': {'type': 'integer'},
3515
+ 'description': 'ids of brands that this form is restricted to',
3516
+ },
3517
+ 'ticket_field_ids': {
3518
+ 'type': 'array',
3519
+ 'items': {'type': 'integer'},
3520
+ 'description': 'ids of all ticket fields which are in this form',
3521
+ },
3522
+ 'agent_conditions': {
3523
+ 'type': 'array',
3524
+ 'items': {'type': 'object'},
3525
+ 'description': 'Array of condition sets for agent workspaces',
3526
+ },
3527
+ 'end_user_conditions': {
3528
+ 'type': 'array',
3529
+ 'items': {'type': 'object'},
3530
+ 'description': 'Array of condition sets for end user products',
3531
+ },
3532
+ 'created_at': {
3533
+ 'type': 'string',
3534
+ 'format': 'date-time',
3535
+ 'description': 'When the ticket form was created',
3536
+ },
3537
+ 'updated_at': {
3538
+ 'type': 'string',
3539
+ 'format': 'date-time',
3540
+ 'description': 'When the ticket form was last updated',
3541
+ },
3542
+ },
3543
+ 'required': ['id'],
3544
+ 'x-airbyte-entity-name': 'ticket_forms',
3545
+ },
3546
+ },
3547
+ },
3548
+ record_extractor='$.ticket_form',
3549
+ ),
3550
+ },
3551
+ entity_schema={
3552
+ 'type': 'object',
3553
+ 'description': 'Zendesk Support ticket form object',
3554
+ 'properties': {
3555
+ 'id': {'type': 'integer', 'description': 'Automatically assigned when creating ticket forms'},
3556
+ 'url': {'type': 'string', 'description': 'URL of the ticket form'},
3557
+ 'name': {'type': 'string', 'description': 'The name of the form'},
3558
+ 'display_name': {'type': 'string', 'description': 'The name of the form that is displayed to an end user'},
3559
+ 'raw_name': {'type': 'string', 'description': 'The dynamic content placeholder for name'},
3560
+ 'raw_display_name': {'type': 'string', 'description': 'The dynamic content placeholder for display_name'},
3561
+ 'position': {'type': 'integer', 'description': 'The position of this form among other forms'},
3562
+ 'active': {'type': 'boolean', 'description': 'If the form is set as active'},
3563
+ 'end_user_visible': {'type': 'boolean', 'description': 'Is the form visible to the end user'},
3564
+ 'default': {'type': 'boolean', 'description': 'Is the form the default form for this account'},
3565
+ 'in_all_brands': {'type': 'boolean', 'description': 'Is the form available for use in all brands'},
3566
+ 'restricted_brand_ids': {
3567
+ 'type': 'array',
3568
+ 'items': {'type': 'integer'},
3569
+ 'description': 'ids of brands that this form is restricted to',
3570
+ },
3571
+ 'ticket_field_ids': {
3572
+ 'type': 'array',
3573
+ 'items': {'type': 'integer'},
3574
+ 'description': 'ids of all ticket fields which are in this form',
3575
+ },
3576
+ 'agent_conditions': {
3577
+ 'type': 'array',
3578
+ 'items': {'type': 'object'},
3579
+ 'description': 'Array of condition sets for agent workspaces',
3580
+ },
3581
+ 'end_user_conditions': {
3582
+ 'type': 'array',
3583
+ 'items': {'type': 'object'},
3584
+ 'description': 'Array of condition sets for end user products',
3585
+ },
3586
+ 'created_at': {
3587
+ 'type': 'string',
3588
+ 'format': 'date-time',
3589
+ 'description': 'When the ticket form was created',
3590
+ },
3591
+ 'updated_at': {
3592
+ 'type': 'string',
3593
+ 'format': 'date-time',
3594
+ 'description': 'When the ticket form was last updated',
3595
+ },
3596
+ },
3597
+ 'required': ['id'],
3598
+ 'x-airbyte-entity-name': 'ticket_forms',
3599
+ },
3600
+ ),
3601
+ EntityDefinition(
3602
+ name='articles',
3603
+ actions=[Action.LIST, Action.GET],
3604
+ endpoints={
3605
+ Action.LIST: EndpointDefinition(
3606
+ method='GET',
3607
+ path='/help_center/articles.json',
3608
+ action=Action.LIST,
3609
+ description='Returns a list of all articles in the Help Center',
3610
+ query_params=['page', 'sort_by', 'sort_order'],
3611
+ query_params_schema={
3612
+ 'page': {'type': 'integer', 'required': False},
3613
+ 'sort_by': {'type': 'string', 'required': False},
3614
+ 'sort_order': {
3615
+ 'type': 'string',
3616
+ 'required': False,
3617
+ 'default': 'asc',
3618
+ },
3619
+ },
3620
+ response_schema={
3621
+ 'type': 'object',
3622
+ 'properties': {
3623
+ 'articles': {
3624
+ 'type': 'array',
3625
+ 'items': {
3626
+ 'type': 'object',
3627
+ 'description': 'Help Center article object',
3628
+ 'properties': {
3629
+ 'id': {'type': 'integer', 'description': 'The unique ID of the article'},
3630
+ 'url': {'type': 'string', 'description': 'The API URL of the article'},
3631
+ 'html_url': {'type': 'string', 'description': 'The public URL of the article'},
3632
+ 'title': {'type': 'string', 'description': 'The title of the article'},
3633
+ 'body': {'type': 'string', 'description': 'The body content of the article (HTML)'},
3634
+ 'locale': {'type': 'string', 'description': 'The locale of the article'},
3635
+ 'author_id': {'type': 'integer', 'description': 'The ID of the user who created the article'},
3636
+ 'section_id': {'type': 'integer', 'description': 'The ID of the section the article belongs to'},
3637
+ 'created_at': {
3638
+ 'type': 'string',
3639
+ 'format': 'date-time',
3640
+ 'description': 'The time the article was created',
3641
+ },
3642
+ 'updated_at': {
3643
+ 'type': 'string',
3644
+ 'format': 'date-time',
3645
+ 'description': 'The time the article was last updated',
3646
+ },
3647
+ 'vote_sum': {'type': 'integer', 'description': 'Sum of upvotes and downvotes'},
3648
+ 'vote_count': {'type': 'integer', 'description': 'Number of votes'},
3649
+ 'label_names': {
3650
+ 'type': 'array',
3651
+ 'items': {'type': 'string'},
3652
+ 'description': 'List of label names associated with the article',
3653
+ },
3654
+ 'draft': {'type': 'boolean', 'description': 'Whether the article is a draft'},
3655
+ 'promoted': {'type': 'boolean', 'description': 'Whether the article is promoted'},
3656
+ 'position': {'type': 'integer', 'description': 'Position of the article in the section'},
3657
+ },
3658
+ 'required': ['id'],
3659
+ 'x-airbyte-entity-name': 'articles',
3660
+ },
3661
+ },
3662
+ 'next_page': {
3663
+ 'type': ['string', 'null'],
3664
+ 'description': 'URL to the next page of results',
3665
+ },
3666
+ 'previous_page': {
3667
+ 'type': ['string', 'null'],
3668
+ 'description': 'URL to the previous page of results',
3669
+ },
3670
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
3671
+ },
3672
+ },
3673
+ record_extractor='$.articles',
3674
+ meta_extractor={
3675
+ 'next_page': '$.next_page',
3676
+ 'previous_page': '$.previous_page',
3677
+ 'count': '$.count',
3678
+ },
3679
+ ),
3680
+ Action.GET: EndpointDefinition(
3681
+ method='GET',
3682
+ path='/help_center/articles/{id}.json',
3683
+ action=Action.GET,
3684
+ description='Retrieves the details of a specific article',
3685
+ path_params=['id'],
3686
+ path_params_schema={
3687
+ 'id': {'type': 'integer', 'required': True},
3688
+ },
3689
+ response_schema={
3690
+ 'type': 'object',
3691
+ 'properties': {
3692
+ 'article': {
3693
+ 'type': 'object',
3694
+ 'description': 'Help Center article object',
3695
+ 'properties': {
3696
+ 'id': {'type': 'integer', 'description': 'The unique ID of the article'},
3697
+ 'url': {'type': 'string', 'description': 'The API URL of the article'},
3698
+ 'html_url': {'type': 'string', 'description': 'The public URL of the article'},
3699
+ 'title': {'type': 'string', 'description': 'The title of the article'},
3700
+ 'body': {'type': 'string', 'description': 'The body content of the article (HTML)'},
3701
+ 'locale': {'type': 'string', 'description': 'The locale of the article'},
3702
+ 'author_id': {'type': 'integer', 'description': 'The ID of the user who created the article'},
3703
+ 'section_id': {'type': 'integer', 'description': 'The ID of the section the article belongs to'},
3704
+ 'created_at': {
3705
+ 'type': 'string',
3706
+ 'format': 'date-time',
3707
+ 'description': 'The time the article was created',
3708
+ },
3709
+ 'updated_at': {
3710
+ 'type': 'string',
3711
+ 'format': 'date-time',
3712
+ 'description': 'The time the article was last updated',
3713
+ },
3714
+ 'vote_sum': {'type': 'integer', 'description': 'Sum of upvotes and downvotes'},
3715
+ 'vote_count': {'type': 'integer', 'description': 'Number of votes'},
3716
+ 'label_names': {
3717
+ 'type': 'array',
3718
+ 'items': {'type': 'string'},
3719
+ 'description': 'List of label names associated with the article',
3720
+ },
3721
+ 'draft': {'type': 'boolean', 'description': 'Whether the article is a draft'},
3722
+ 'promoted': {'type': 'boolean', 'description': 'Whether the article is promoted'},
3723
+ 'position': {'type': 'integer', 'description': 'Position of the article in the section'},
3724
+ },
3725
+ 'required': ['id'],
3726
+ 'x-airbyte-entity-name': 'articles',
3727
+ },
3728
+ },
3729
+ },
3730
+ record_extractor='$.article',
3731
+ ),
3732
+ },
3733
+ entity_schema={
3734
+ 'type': 'object',
3735
+ 'description': 'Help Center article object',
3736
+ 'properties': {
3737
+ 'id': {'type': 'integer', 'description': 'The unique ID of the article'},
3738
+ 'url': {'type': 'string', 'description': 'The API URL of the article'},
3739
+ 'html_url': {'type': 'string', 'description': 'The public URL of the article'},
3740
+ 'title': {'type': 'string', 'description': 'The title of the article'},
3741
+ 'body': {'type': 'string', 'description': 'The body content of the article (HTML)'},
3742
+ 'locale': {'type': 'string', 'description': 'The locale of the article'},
3743
+ 'author_id': {'type': 'integer', 'description': 'The ID of the user who created the article'},
3744
+ 'section_id': {'type': 'integer', 'description': 'The ID of the section the article belongs to'},
3745
+ 'created_at': {
3746
+ 'type': 'string',
3747
+ 'format': 'date-time',
3748
+ 'description': 'The time the article was created',
3749
+ },
3750
+ 'updated_at': {
3751
+ 'type': 'string',
3752
+ 'format': 'date-time',
3753
+ 'description': 'The time the article was last updated',
3754
+ },
3755
+ 'vote_sum': {'type': 'integer', 'description': 'Sum of upvotes and downvotes'},
3756
+ 'vote_count': {'type': 'integer', 'description': 'Number of votes'},
3757
+ 'label_names': {
3758
+ 'type': 'array',
3759
+ 'items': {'type': 'string'},
3760
+ 'description': 'List of label names associated with the article',
3761
+ },
3762
+ 'draft': {'type': 'boolean', 'description': 'Whether the article is a draft'},
3763
+ 'promoted': {'type': 'boolean', 'description': 'Whether the article is promoted'},
3764
+ 'position': {'type': 'integer', 'description': 'Position of the article in the section'},
3765
+ },
3766
+ 'required': ['id'],
3767
+ 'x-airbyte-entity-name': 'articles',
3768
+ },
3769
+ ),
3770
+ EntityDefinition(
3771
+ name='article_attachments',
3772
+ actions=[Action.LIST, Action.GET, Action.DOWNLOAD],
3773
+ endpoints={
3774
+ Action.LIST: EndpointDefinition(
3775
+ method='GET',
3776
+ path='/help_center/articles/{article_id}/attachments.json',
3777
+ action=Action.LIST,
3778
+ description='Returns a list of all attachments for a specific article',
3779
+ query_params=['page'],
3780
+ query_params_schema={
3781
+ 'page': {'type': 'integer', 'required': False},
3782
+ },
3783
+ path_params=['article_id'],
3784
+ path_params_schema={
3785
+ 'article_id': {'type': 'integer', 'required': True},
3786
+ },
3787
+ response_schema={
3788
+ 'type': 'object',
3789
+ 'properties': {
3790
+ 'article_attachments': {
3791
+ 'type': 'array',
3792
+ 'items': {
3793
+ 'type': 'object',
3794
+ 'description': 'Article attachment object',
3795
+ 'properties': {
3796
+ 'id': {'type': 'integer', 'description': 'The unique ID of the attachment'},
3797
+ 'url': {
3798
+ 'type': 'string',
3799
+ 'format': 'uri',
3800
+ 'description': 'The API URL of the attachment',
3801
+ },
3802
+ 'article_id': {'type': 'integer', 'description': 'The ID of the article this attachment belongs to'},
3803
+ 'file_name': {'type': 'string', 'description': 'The name of the attached file'},
3804
+ 'content_type': {'type': 'string', 'description': 'The MIME type of the attachment'},
3805
+ 'content_url': {
3806
+ 'type': 'string',
3807
+ 'format': 'uri',
3808
+ 'description': 'The URL to download the attachment',
3809
+ },
3810
+ 'size': {'type': 'integer', 'description': 'The size of the attachment in bytes'},
3811
+ 'inline': {'type': 'boolean', 'description': 'Whether the attachment is displayed inline'},
3812
+ 'created_at': {
3813
+ 'type': 'string',
3814
+ 'format': 'date-time',
3815
+ 'description': 'The time the attachment was created',
3816
+ },
3817
+ 'updated_at': {
3818
+ 'type': 'string',
3819
+ 'format': 'date-time',
3820
+ 'description': 'The time the attachment was last updated',
3821
+ },
3822
+ },
3823
+ 'required': ['id', 'file_name'],
3824
+ 'x-airbyte-entity-name': 'article_attachments',
3825
+ },
3826
+ },
3827
+ 'next_page': {
3828
+ 'type': ['string', 'null'],
3829
+ 'description': 'URL to the next page of results',
3830
+ },
3831
+ 'previous_page': {
3832
+ 'type': ['string', 'null'],
3833
+ 'description': 'URL to the previous page of results',
3834
+ },
3835
+ 'count': {'type': 'integer', 'description': 'Total count of records'},
3836
+ },
3837
+ },
3838
+ record_extractor='$.article_attachments',
3839
+ meta_extractor={
3840
+ 'next_page': '$.next_page',
3841
+ 'previous_page': '$.previous_page',
3842
+ 'count': '$.count',
3843
+ },
3844
+ ),
3845
+ Action.GET: EndpointDefinition(
3846
+ method='GET',
3847
+ path='/help_center/articles/{article_id}/attachments/{attachment_id}',
3848
+ action=Action.GET,
3849
+ description='Retrieves the metadata of a specific attachment for a specific article',
3850
+ path_params=['article_id', 'attachment_id'],
3851
+ path_params_schema={
3852
+ 'article_id': {'type': 'integer', 'required': True},
3853
+ 'attachment_id': {'type': 'integer', 'required': True},
3854
+ },
3855
+ response_schema={
3856
+ 'type': 'object',
3857
+ 'properties': {
3858
+ 'article_attachment': {
3859
+ 'type': 'object',
3860
+ 'description': 'Article attachment object',
3861
+ 'properties': {
3862
+ 'id': {'type': 'integer', 'description': 'The unique ID of the attachment'},
3863
+ 'url': {
3864
+ 'type': 'string',
3865
+ 'format': 'uri',
3866
+ 'description': 'The API URL of the attachment',
3867
+ },
3868
+ 'article_id': {'type': 'integer', 'description': 'The ID of the article this attachment belongs to'},
3869
+ 'file_name': {'type': 'string', 'description': 'The name of the attached file'},
3870
+ 'content_type': {'type': 'string', 'description': 'The MIME type of the attachment'},
3871
+ 'content_url': {
3872
+ 'type': 'string',
3873
+ 'format': 'uri',
3874
+ 'description': 'The URL to download the attachment',
3875
+ },
3876
+ 'size': {'type': 'integer', 'description': 'The size of the attachment in bytes'},
3877
+ 'inline': {'type': 'boolean', 'description': 'Whether the attachment is displayed inline'},
3878
+ 'created_at': {
3879
+ 'type': 'string',
3880
+ 'format': 'date-time',
3881
+ 'description': 'The time the attachment was created',
3882
+ },
3883
+ 'updated_at': {
3884
+ 'type': 'string',
3885
+ 'format': 'date-time',
3886
+ 'description': 'The time the attachment was last updated',
3887
+ },
3888
+ },
3889
+ 'required': ['id', 'file_name'],
3890
+ 'x-airbyte-entity-name': 'article_attachments',
3891
+ },
3892
+ },
3893
+ },
3894
+ record_extractor='$.article_attachment',
3895
+ ),
3896
+ Action.DOWNLOAD: EndpointDefinition(
3897
+ method='GET',
3898
+ path='/help_center/articles/{article_id}/attachments/{attachment_id}:download',
3899
+ path_override=PathOverrideConfig(
3900
+ path='/help_center/articles/{article_id}/attachments/{attachment_id}',
3901
+ ),
3902
+ action=Action.DOWNLOAD,
3903
+ description='Downloads the file content of a specific attachment',
3904
+ path_params=['article_id', 'attachment_id'],
3905
+ path_params_schema={
3906
+ 'article_id': {'type': 'integer', 'required': True},
3907
+ 'attachment_id': {'type': 'integer', 'required': True},
3908
+ },
3909
+ file_field='article_attachment.content_url',
3910
+ ),
3911
+ },
3912
+ entity_schema={
3913
+ 'type': 'object',
3914
+ 'description': 'Article attachment object',
3915
+ 'properties': {
3916
+ 'id': {'type': 'integer', 'description': 'The unique ID of the attachment'},
3917
+ 'url': {
3918
+ 'type': 'string',
3919
+ 'format': 'uri',
3920
+ 'description': 'The API URL of the attachment',
3921
+ },
3922
+ 'article_id': {'type': 'integer', 'description': 'The ID of the article this attachment belongs to'},
3923
+ 'file_name': {'type': 'string', 'description': 'The name of the attached file'},
3924
+ 'content_type': {'type': 'string', 'description': 'The MIME type of the attachment'},
3925
+ 'content_url': {
3926
+ 'type': 'string',
3927
+ 'format': 'uri',
3928
+ 'description': 'The URL to download the attachment',
3929
+ },
3930
+ 'size': {'type': 'integer', 'description': 'The size of the attachment in bytes'},
3931
+ 'inline': {'type': 'boolean', 'description': 'Whether the attachment is displayed inline'},
3932
+ 'created_at': {
3933
+ 'type': 'string',
3934
+ 'format': 'date-time',
3935
+ 'description': 'The time the attachment was created',
3936
+ },
3937
+ 'updated_at': {
3938
+ 'type': 'string',
3939
+ 'format': 'date-time',
3940
+ 'description': 'The time the attachment was last updated',
3941
+ },
3942
+ },
3943
+ 'required': ['id', 'file_name'],
3944
+ 'x-airbyte-entity-name': 'article_attachments',
3945
+ },
3946
+ ),
3947
+ ],
3948
+ )