airbyte-agent-asana 0.19.27__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.

Potentially problematic release.


This version of airbyte-agent-asana might be problematic. Click here for more details.

Files changed (55) hide show
  1. airbyte_agent_asana/__init__.py +145 -0
  2. airbyte_agent_asana/_vendored/__init__.py +1 -0
  3. airbyte_agent_asana/_vendored/connector_sdk/__init__.py +82 -0
  4. airbyte_agent_asana/_vendored/connector_sdk/auth_strategies.py +1123 -0
  5. airbyte_agent_asana/_vendored/connector_sdk/auth_template.py +135 -0
  6. airbyte_agent_asana/_vendored/connector_sdk/cloud_utils/__init__.py +5 -0
  7. airbyte_agent_asana/_vendored/connector_sdk/cloud_utils/client.py +213 -0
  8. airbyte_agent_asana/_vendored/connector_sdk/connector_model_loader.py +957 -0
  9. airbyte_agent_asana/_vendored/connector_sdk/constants.py +78 -0
  10. airbyte_agent_asana/_vendored/connector_sdk/exceptions.py +23 -0
  11. airbyte_agent_asana/_vendored/connector_sdk/executor/__init__.py +31 -0
  12. airbyte_agent_asana/_vendored/connector_sdk/executor/hosted_executor.py +197 -0
  13. airbyte_agent_asana/_vendored/connector_sdk/executor/local_executor.py +1504 -0
  14. airbyte_agent_asana/_vendored/connector_sdk/executor/models.py +190 -0
  15. airbyte_agent_asana/_vendored/connector_sdk/extensions.py +655 -0
  16. airbyte_agent_asana/_vendored/connector_sdk/http/__init__.py +37 -0
  17. airbyte_agent_asana/_vendored/connector_sdk/http/adapters/__init__.py +9 -0
  18. airbyte_agent_asana/_vendored/connector_sdk/http/adapters/httpx_adapter.py +251 -0
  19. airbyte_agent_asana/_vendored/connector_sdk/http/config.py +98 -0
  20. airbyte_agent_asana/_vendored/connector_sdk/http/exceptions.py +119 -0
  21. airbyte_agent_asana/_vendored/connector_sdk/http/protocols.py +114 -0
  22. airbyte_agent_asana/_vendored/connector_sdk/http/response.py +102 -0
  23. airbyte_agent_asana/_vendored/connector_sdk/http_client.py +686 -0
  24. airbyte_agent_asana/_vendored/connector_sdk/logging/__init__.py +11 -0
  25. airbyte_agent_asana/_vendored/connector_sdk/logging/logger.py +264 -0
  26. airbyte_agent_asana/_vendored/connector_sdk/logging/types.py +92 -0
  27. airbyte_agent_asana/_vendored/connector_sdk/observability/__init__.py +11 -0
  28. airbyte_agent_asana/_vendored/connector_sdk/observability/models.py +19 -0
  29. airbyte_agent_asana/_vendored/connector_sdk/observability/redactor.py +81 -0
  30. airbyte_agent_asana/_vendored/connector_sdk/observability/session.py +94 -0
  31. airbyte_agent_asana/_vendored/connector_sdk/performance/__init__.py +6 -0
  32. airbyte_agent_asana/_vendored/connector_sdk/performance/instrumentation.py +57 -0
  33. airbyte_agent_asana/_vendored/connector_sdk/performance/metrics.py +93 -0
  34. airbyte_agent_asana/_vendored/connector_sdk/schema/__init__.py +75 -0
  35. airbyte_agent_asana/_vendored/connector_sdk/schema/base.py +161 -0
  36. airbyte_agent_asana/_vendored/connector_sdk/schema/components.py +238 -0
  37. airbyte_agent_asana/_vendored/connector_sdk/schema/connector.py +131 -0
  38. airbyte_agent_asana/_vendored/connector_sdk/schema/extensions.py +109 -0
  39. airbyte_agent_asana/_vendored/connector_sdk/schema/operations.py +146 -0
  40. airbyte_agent_asana/_vendored/connector_sdk/schema/security.py +213 -0
  41. airbyte_agent_asana/_vendored/connector_sdk/secrets.py +182 -0
  42. airbyte_agent_asana/_vendored/connector_sdk/telemetry/__init__.py +10 -0
  43. airbyte_agent_asana/_vendored/connector_sdk/telemetry/config.py +32 -0
  44. airbyte_agent_asana/_vendored/connector_sdk/telemetry/events.py +58 -0
  45. airbyte_agent_asana/_vendored/connector_sdk/telemetry/tracker.py +151 -0
  46. airbyte_agent_asana/_vendored/connector_sdk/types.py +241 -0
  47. airbyte_agent_asana/_vendored/connector_sdk/utils.py +60 -0
  48. airbyte_agent_asana/_vendored/connector_sdk/validation.py +822 -0
  49. airbyte_agent_asana/connector.py +1770 -0
  50. airbyte_agent_asana/connector_model.py +1863 -0
  51. airbyte_agent_asana/models.py +744 -0
  52. airbyte_agent_asana/types.py +195 -0
  53. airbyte_agent_asana-0.19.27.dist-info/METADATA +144 -0
  54. airbyte_agent_asana-0.19.27.dist-info/RECORD +55 -0
  55. airbyte_agent_asana-0.19.27.dist-info/WHEEL +4 -0
@@ -0,0 +1,1863 @@
1
+ """
2
+ Connector model for asana.
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
+ AsanaConnectorModel: ConnectorModel = ConnectorModel(
31
+ id=UUID('d0243522-dccf-4978-8ba0-37ed47a0bdbf'),
32
+ name='asana',
33
+ version='0.1.6',
34
+ base_url='https://app.asana.com/api/1.0',
35
+ auth=AuthConfig(
36
+ options=[
37
+ AuthOption(
38
+ scheme_name='oauth2',
39
+ type=AuthType.OAUTH2,
40
+ config={
41
+ 'header': 'Authorization',
42
+ 'prefix': 'Bearer',
43
+ 'refresh_url': 'https://app.asana.com/-/oauth_token',
44
+ },
45
+ user_config_spec=AirbyteAuthConfig(
46
+ title='OAuth 2',
47
+ type='object',
48
+ required=['refresh_token', 'client_id', 'client_secret'],
49
+ properties={
50
+ 'access_token': AuthConfigFieldSpec(
51
+ title='Access Token',
52
+ description='OAuth access token for API requests',
53
+ airbyte_secret=True,
54
+ ),
55
+ 'refresh_token': AuthConfigFieldSpec(
56
+ title='Refresh Token',
57
+ description='OAuth refresh token for automatic token renewal',
58
+ airbyte_secret=True,
59
+ ),
60
+ 'client_id': AuthConfigFieldSpec(
61
+ title='Client ID',
62
+ description='Connected App Consumer Key',
63
+ ),
64
+ 'client_secret': AuthConfigFieldSpec(
65
+ title='Client Secret',
66
+ description='Connected App Consumer Secret',
67
+ airbyte_secret=True,
68
+ ),
69
+ },
70
+ auth_mapping={
71
+ 'access_token': '${access_token}',
72
+ 'refresh_token': '${refresh_token}',
73
+ 'client_id': '${client_id}',
74
+ 'client_secret': '${client_secret}',
75
+ },
76
+ ),
77
+ ),
78
+ AuthOption(
79
+ scheme_name='personalAccessToken',
80
+ type=AuthType.BEARER,
81
+ config={'header': 'Authorization', 'prefix': 'Bearer'},
82
+ user_config_spec=AirbyteAuthConfig(
83
+ title='Personal Access Token',
84
+ type='object',
85
+ required=['token'],
86
+ properties={
87
+ 'token': AuthConfigFieldSpec(
88
+ title='Personal Access Token',
89
+ description='Your Asana Personal Access Token. Generate one at https://app.asana.com/0/my-apps',
90
+ airbyte_secret=True,
91
+ ),
92
+ },
93
+ auth_mapping={'token': '${token}'},
94
+ ),
95
+ ),
96
+ ],
97
+ ),
98
+ entities=[
99
+ EntityDefinition(
100
+ name='tasks',
101
+ actions=[Action.LIST, Action.GET],
102
+ endpoints={
103
+ Action.LIST: EndpointDefinition(
104
+ method='GET',
105
+ path='/tasks',
106
+ action=Action.LIST,
107
+ description='Returns a paginated list of tasks. Must include either a project OR a section OR a workspace AND assignee parameter.',
108
+ query_params=[
109
+ 'limit',
110
+ 'offset',
111
+ 'project',
112
+ 'workspace',
113
+ 'section',
114
+ 'assignee',
115
+ 'completed_since',
116
+ 'modified_since',
117
+ ],
118
+ query_params_schema={
119
+ 'limit': {
120
+ 'type': 'integer',
121
+ 'required': False,
122
+ 'default': 20,
123
+ },
124
+ 'offset': {'type': 'string', 'required': False},
125
+ 'project': {'type': 'string', 'required': False},
126
+ 'workspace': {'type': 'string', 'required': False},
127
+ 'section': {'type': 'string', 'required': False},
128
+ 'assignee': {'type': 'string', 'required': False},
129
+ 'completed_since': {'type': 'string', 'required': False},
130
+ 'modified_since': {'type': 'string', 'required': False},
131
+ },
132
+ response_schema={
133
+ 'type': 'object',
134
+ 'description': 'Paginated list of tasks containing compact task objects',
135
+ 'properties': {
136
+ 'data': {
137
+ 'type': 'array',
138
+ 'items': {
139
+ 'type': 'object',
140
+ 'description': 'Compact task object',
141
+ 'properties': {
142
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
143
+ 'resource_type': {'type': 'string', 'description': 'Resource type (task)'},
144
+ 'name': {'type': 'string', 'description': 'Task name'},
145
+ 'resource_subtype': {'type': 'string', 'description': 'Task subtype'},
146
+ 'created_by': {
147
+ 'type': 'object',
148
+ 'description': 'User who created the task',
149
+ 'properties': {
150
+ 'gid': {'type': 'string'},
151
+ 'resource_type': {'type': 'string'},
152
+ },
153
+ },
154
+ },
155
+ 'x-airbyte-entity-name': 'tasks',
156
+ },
157
+ },
158
+ 'next_page': {
159
+ 'type': ['object', 'null'],
160
+ 'properties': {
161
+ 'offset': {'type': 'string'},
162
+ 'path': {'type': 'string'},
163
+ 'uri': {'type': 'string'},
164
+ },
165
+ },
166
+ },
167
+ },
168
+ record_extractor='$.data',
169
+ meta_extractor={'next_page': '$.next_page'},
170
+ ),
171
+ Action.GET: EndpointDefinition(
172
+ method='GET',
173
+ path='/tasks/{task_gid}',
174
+ action=Action.GET,
175
+ description='Get a single task by its ID',
176
+ path_params=['task_gid'],
177
+ path_params_schema={
178
+ 'task_gid': {'type': 'string', 'required': True},
179
+ },
180
+ response_schema={
181
+ 'type': 'object',
182
+ 'description': 'Task response wrapper',
183
+ 'properties': {
184
+ 'data': {
185
+ 'type': 'object',
186
+ 'description': 'Full task object',
187
+ 'properties': {
188
+ 'gid': {
189
+ 'type': 'string',
190
+ 'actual_time_minutes': {
191
+ 'type': ['integer', 'null'],
192
+ },
193
+ 'assignee': {
194
+ 'type': 'object',
195
+ 'properties': {
196
+ 'gid': {'type': 'string'},
197
+ 'name': {'type': 'string'},
198
+ 'resource_type': {'type': 'string'},
199
+ },
200
+ },
201
+ 'assignee_status': {'type': 'string'},
202
+ 'assignee_section': {
203
+ 'type': 'object',
204
+ 'properties': {
205
+ 'gid': {'type': 'string'},
206
+ 'name': {'type': 'string'},
207
+ 'resource_type': {'type': 'string'},
208
+ },
209
+ },
210
+ 'completed': {'type': 'boolean'},
211
+ 'completed_at': {
212
+ 'type': ['string', 'null'],
213
+ },
214
+ 'created_at': {'type': 'string'},
215
+ 'due_at': {
216
+ 'type': ['string', 'null'],
217
+ },
218
+ 'due_on': {
219
+ 'type': ['string', 'null'],
220
+ },
221
+ 'followers': {
222
+ 'type': 'array',
223
+ 'items': {
224
+ 'type': 'object',
225
+ 'properties': {
226
+ 'gid': {'type': 'string'},
227
+ 'name': {'type': 'string'},
228
+ 'resource_type': {'type': 'string'},
229
+ },
230
+ },
231
+ },
232
+ 'hearted': {'type': 'boolean'},
233
+ 'hearts': {'type': 'array'},
234
+ 'liked': {'type': 'boolean'},
235
+ 'likes': {'type': 'array'},
236
+ 'memberships': {
237
+ 'type': 'array',
238
+ 'items': {
239
+ 'type': 'object',
240
+ 'properties': {
241
+ 'project': {
242
+ 'type': 'object',
243
+ 'properties': {
244
+ 'gid': {'type': 'string'},
245
+ 'name': {'type': 'string'},
246
+ 'resource_type': {'type': 'string'},
247
+ },
248
+ },
249
+ 'section': {
250
+ 'type': 'object',
251
+ 'properties': {
252
+ 'gid': {'type': 'string'},
253
+ 'name': {'type': 'string'},
254
+ 'resource_type': {'type': 'string'},
255
+ },
256
+ },
257
+ },
258
+ },
259
+ },
260
+ 'modified_at': {'type': 'string'},
261
+ 'name': {'type': 'string'},
262
+ 'notes': {'type': 'string'},
263
+ 'num_hearts': {'type': 'integer'},
264
+ 'num_likes': {'type': 'integer'},
265
+ 'parent': {
266
+ 'type': ['object', 'null'],
267
+ },
268
+ 'permalink_url': {'type': 'string'},
269
+ 'projects': {
270
+ 'type': 'array',
271
+ 'items': {
272
+ 'type': 'object',
273
+ 'properties': {
274
+ 'gid': {'type': 'string'},
275
+ 'name': {'type': 'string'},
276
+ 'resource_type': {'type': 'string'},
277
+ },
278
+ },
279
+ },
280
+ 'resource_type': {'type': 'string'},
281
+ 'start_at': {
282
+ 'type': ['string', 'null'],
283
+ },
284
+ 'start_on': {
285
+ 'type': ['string', 'null'],
286
+ },
287
+ 'tags': {'type': 'array'},
288
+ 'resource_subtype': {'type': 'string'},
289
+ 'workspace': {
290
+ 'type': 'object',
291
+ 'properties': {
292
+ 'gid': {'type': 'string'},
293
+ 'name': {'type': 'string'},
294
+ 'resource_type': {'type': 'string'},
295
+ },
296
+ },
297
+ },
298
+ },
299
+ },
300
+ },
301
+ },
302
+ record_extractor='$.data',
303
+ ),
304
+ },
305
+ entity_schema={
306
+ 'type': 'object',
307
+ 'description': 'Compact task object',
308
+ 'properties': {
309
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
310
+ 'resource_type': {'type': 'string', 'description': 'Resource type (task)'},
311
+ 'name': {'type': 'string', 'description': 'Task name'},
312
+ 'resource_subtype': {'type': 'string', 'description': 'Task subtype'},
313
+ 'created_by': {
314
+ 'type': 'object',
315
+ 'description': 'User who created the task',
316
+ 'properties': {
317
+ 'gid': {'type': 'string'},
318
+ 'resource_type': {'type': 'string'},
319
+ },
320
+ },
321
+ },
322
+ 'x-airbyte-entity-name': 'tasks',
323
+ },
324
+ ),
325
+ EntityDefinition(
326
+ name='project_tasks',
327
+ actions=[Action.LIST],
328
+ endpoints={
329
+ Action.LIST: EndpointDefinition(
330
+ method='GET',
331
+ path='/projects/{project_gid}/tasks',
332
+ action=Action.LIST,
333
+ description='Returns all tasks in a project',
334
+ query_params=['limit', 'offset', 'completed_since'],
335
+ query_params_schema={
336
+ 'limit': {
337
+ 'type': 'integer',
338
+ 'required': False,
339
+ 'default': 20,
340
+ },
341
+ 'offset': {'type': 'string', 'required': False},
342
+ 'completed_since': {'type': 'string', 'required': False},
343
+ },
344
+ path_params=['project_gid'],
345
+ path_params_schema={
346
+ 'project_gid': {'type': 'string', 'required': True},
347
+ },
348
+ response_schema={
349
+ 'type': 'object',
350
+ 'description': 'Paginated list of tasks containing compact task objects',
351
+ 'properties': {
352
+ 'data': {
353
+ 'type': 'array',
354
+ 'items': {
355
+ 'type': 'object',
356
+ 'description': 'Compact task object',
357
+ 'properties': {
358
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
359
+ 'resource_type': {'type': 'string', 'description': 'Resource type (task)'},
360
+ 'name': {'type': 'string', 'description': 'Task name'},
361
+ 'resource_subtype': {'type': 'string', 'description': 'Task subtype'},
362
+ 'created_by': {
363
+ 'type': 'object',
364
+ 'description': 'User who created the task',
365
+ 'properties': {
366
+ 'gid': {'type': 'string'},
367
+ 'resource_type': {'type': 'string'},
368
+ },
369
+ },
370
+ },
371
+ 'x-airbyte-entity-name': 'tasks',
372
+ },
373
+ },
374
+ 'next_page': {
375
+ 'type': ['object', 'null'],
376
+ 'properties': {
377
+ 'offset': {'type': 'string'},
378
+ 'path': {'type': 'string'},
379
+ 'uri': {'type': 'string'},
380
+ },
381
+ },
382
+ },
383
+ },
384
+ record_extractor='$.data',
385
+ meta_extractor={'next_page': '$.next_page'},
386
+ ),
387
+ },
388
+ ),
389
+ EntityDefinition(
390
+ name='workspace_task_search',
391
+ actions=[Action.LIST],
392
+ endpoints={
393
+ Action.LIST: EndpointDefinition(
394
+ method='GET',
395
+ path='/workspaces/{workspace_gid}/tasks/search',
396
+ action=Action.LIST,
397
+ description='Returns tasks that match the specified search criteria. Note - This endpoint requires a premium Asana account. At least one search parameter must be provided.',
398
+ query_params=[
399
+ 'limit',
400
+ 'offset',
401
+ 'text',
402
+ 'completed',
403
+ 'assignee.any',
404
+ 'projects.any',
405
+ 'sections.any',
406
+ 'teams.any',
407
+ 'followers.any',
408
+ 'created_at.after',
409
+ 'created_at.before',
410
+ 'modified_at.after',
411
+ 'modified_at.before',
412
+ 'due_on.after',
413
+ 'due_on.before',
414
+ 'resource_subtype',
415
+ 'sort_by',
416
+ 'sort_ascending',
417
+ ],
418
+ query_params_schema={
419
+ 'limit': {'type': 'integer', 'required': False},
420
+ 'offset': {'type': 'string', 'required': False},
421
+ 'text': {'type': 'string', 'required': False},
422
+ 'completed': {'type': 'boolean', 'required': False},
423
+ 'assignee.any': {'type': 'string', 'required': False},
424
+ 'projects.any': {'type': 'string', 'required': False},
425
+ 'sections.any': {'type': 'string', 'required': False},
426
+ 'teams.any': {'type': 'string', 'required': False},
427
+ 'followers.any': {'type': 'string', 'required': False},
428
+ 'created_at.after': {'type': 'string', 'required': False},
429
+ 'created_at.before': {'type': 'string', 'required': False},
430
+ 'modified_at.after': {'type': 'string', 'required': False},
431
+ 'modified_at.before': {'type': 'string', 'required': False},
432
+ 'due_on.after': {'type': 'string', 'required': False},
433
+ 'due_on.before': {'type': 'string', 'required': False},
434
+ 'resource_subtype': {'type': 'string', 'required': False},
435
+ 'sort_by': {'type': 'string', 'required': False},
436
+ 'sort_ascending': {'type': 'boolean', 'required': False},
437
+ },
438
+ path_params=['workspace_gid'],
439
+ path_params_schema={
440
+ 'workspace_gid': {'type': 'string', 'required': True},
441
+ },
442
+ response_schema={
443
+ 'type': 'object',
444
+ 'description': 'Paginated list of tasks containing compact task objects',
445
+ 'properties': {
446
+ 'data': {
447
+ 'type': 'array',
448
+ 'items': {
449
+ 'type': 'object',
450
+ 'description': 'Compact task object',
451
+ 'properties': {
452
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
453
+ 'resource_type': {'type': 'string', 'description': 'Resource type (task)'},
454
+ 'name': {'type': 'string', 'description': 'Task name'},
455
+ 'resource_subtype': {'type': 'string', 'description': 'Task subtype'},
456
+ 'created_by': {
457
+ 'type': 'object',
458
+ 'description': 'User who created the task',
459
+ 'properties': {
460
+ 'gid': {'type': 'string'},
461
+ 'resource_type': {'type': 'string'},
462
+ },
463
+ },
464
+ },
465
+ 'x-airbyte-entity-name': 'tasks',
466
+ },
467
+ },
468
+ 'next_page': {
469
+ 'type': ['object', 'null'],
470
+ 'properties': {
471
+ 'offset': {'type': 'string'},
472
+ 'path': {'type': 'string'},
473
+ 'uri': {'type': 'string'},
474
+ },
475
+ },
476
+ },
477
+ },
478
+ record_extractor='$.data',
479
+ meta_extractor={'next_page': '$.next_page'},
480
+ ),
481
+ },
482
+ ),
483
+ EntityDefinition(
484
+ name='projects',
485
+ actions=[Action.LIST, Action.GET],
486
+ endpoints={
487
+ Action.LIST: EndpointDefinition(
488
+ method='GET',
489
+ path='/projects',
490
+ action=Action.LIST,
491
+ description='Returns a paginated list of projects',
492
+ query_params=[
493
+ 'limit',
494
+ 'offset',
495
+ 'workspace',
496
+ 'team',
497
+ 'archived',
498
+ ],
499
+ query_params_schema={
500
+ 'limit': {
501
+ 'type': 'integer',
502
+ 'required': False,
503
+ 'default': 20,
504
+ },
505
+ 'offset': {'type': 'string', 'required': False},
506
+ 'workspace': {'type': 'string', 'required': False},
507
+ 'team': {'type': 'string', 'required': False},
508
+ 'archived': {'type': 'boolean', 'required': False},
509
+ },
510
+ response_schema={
511
+ 'type': 'object',
512
+ 'description': 'Paginated list of projects containing compact project objects',
513
+ 'properties': {
514
+ 'data': {
515
+ 'type': 'array',
516
+ 'items': {
517
+ 'type': 'object',
518
+ 'description': 'Compact project object',
519
+ 'properties': {
520
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
521
+ 'resource_type': {'type': 'string', 'description': 'Resource type (project)'},
522
+ 'name': {'type': 'string', 'description': 'Project name'},
523
+ },
524
+ 'x-airbyte-entity-name': 'projects',
525
+ },
526
+ },
527
+ 'next_page': {
528
+ 'type': ['object', 'null'],
529
+ 'properties': {
530
+ 'offset': {'type': 'string'},
531
+ 'path': {'type': 'string'},
532
+ 'uri': {'type': 'string'},
533
+ },
534
+ },
535
+ },
536
+ },
537
+ record_extractor='$.data',
538
+ meta_extractor={'next_page': '$.next_page'},
539
+ ),
540
+ Action.GET: EndpointDefinition(
541
+ method='GET',
542
+ path='/projects/{project_gid}',
543
+ action=Action.GET,
544
+ description='Get a single project by its ID',
545
+ path_params=['project_gid'],
546
+ path_params_schema={
547
+ 'project_gid': {'type': 'string', 'required': True},
548
+ },
549
+ response_schema={
550
+ 'type': 'object',
551
+ 'description': 'Project response wrapper',
552
+ 'properties': {
553
+ 'data': {
554
+ 'type': 'object',
555
+ 'description': 'Full project object',
556
+ 'properties': {
557
+ 'gid': {'type': 'string'},
558
+ 'archived': {'type': 'boolean'},
559
+ 'color': {
560
+ 'type': ['string', 'null'],
561
+ },
562
+ 'completed': {'type': 'boolean'},
563
+ 'completed_at': {
564
+ 'type': ['string', 'null'],
565
+ },
566
+ 'created_at': {'type': 'string'},
567
+ 'current_status': {
568
+ 'type': ['object', 'null'],
569
+ 'properties': {
570
+ 'gid': {'type': 'string'},
571
+ 'author': {
572
+ 'type': 'object',
573
+ 'properties': {
574
+ 'gid': {'type': 'string'},
575
+ 'name': {'type': 'string'},
576
+ 'resource_type': {'type': 'string'},
577
+ },
578
+ },
579
+ 'color': {'type': 'string'},
580
+ 'created_at': {'type': 'string'},
581
+ 'created_by': {
582
+ 'type': 'object',
583
+ 'properties': {
584
+ 'gid': {'type': 'string'},
585
+ 'name': {'type': 'string'},
586
+ 'resource_type': {'type': 'string'},
587
+ },
588
+ },
589
+ 'modified_at': {'type': 'string'},
590
+ 'resource_type': {'type': 'string'},
591
+ 'text': {'type': 'string'},
592
+ 'title': {'type': 'string'},
593
+ },
594
+ },
595
+ 'current_status_update': {
596
+ 'type': ['object', 'null'],
597
+ 'properties': {
598
+ 'gid': {'type': 'string'},
599
+ 'resource_type': {'type': 'string'},
600
+ 'resource_subtype': {'type': 'string'},
601
+ 'title': {'type': 'string'},
602
+ },
603
+ },
604
+ 'custom_fields': {'type': 'array'},
605
+ 'default_access_level': {'type': 'string'},
606
+ 'default_view': {'type': 'string'},
607
+ 'due_on': {
608
+ 'type': ['string', 'null'],
609
+ },
610
+ 'due_date': {
611
+ 'type': ['string', 'null'],
612
+ },
613
+ 'followers': {
614
+ 'type': 'array',
615
+ 'items': {
616
+ 'type': 'object',
617
+ 'properties': {
618
+ 'gid': {'type': 'string'},
619
+ 'name': {'type': 'string'},
620
+ 'resource_type': {'type': 'string'},
621
+ },
622
+ },
623
+ },
624
+ 'members': {
625
+ 'type': 'array',
626
+ 'items': {
627
+ 'type': 'object',
628
+ 'properties': {
629
+ 'gid': {'type': 'string'},
630
+ 'name': {'type': 'string'},
631
+ 'resource_type': {'type': 'string'},
632
+ },
633
+ },
634
+ },
635
+ 'minimum_access_level_for_customization': {'type': 'string'},
636
+ 'minimum_access_level_for_sharing': {'type': 'string'},
637
+ 'modified_at': {'type': 'string'},
638
+ 'name': {'type': 'string'},
639
+ 'notes': {'type': 'string'},
640
+ 'owner': {
641
+ 'type': 'object',
642
+ 'properties': {
643
+ 'gid': {'type': 'string'},
644
+ 'name': {'type': 'string'},
645
+ 'resource_type': {'type': 'string'},
646
+ },
647
+ },
648
+ 'permalink_url': {'type': 'string'},
649
+ 'privacy_setting': {'type': 'string'},
650
+ 'public': {'type': 'boolean'},
651
+ 'resource_type': {'type': 'string'},
652
+ 'start_on': {
653
+ 'type': ['string', 'null'],
654
+ },
655
+ 'team': {
656
+ 'type': 'object',
657
+ 'properties': {
658
+ 'gid': {'type': 'string'},
659
+ 'name': {'type': 'string'},
660
+ 'resource_type': {'type': 'string'},
661
+ },
662
+ },
663
+ 'workspace': {
664
+ 'type': 'object',
665
+ 'properties': {
666
+ 'gid': {'type': 'string'},
667
+ 'name': {'type': 'string'},
668
+ 'resource_type': {'type': 'string'},
669
+ },
670
+ },
671
+ },
672
+ },
673
+ },
674
+ },
675
+ record_extractor='$.data',
676
+ ),
677
+ },
678
+ entity_schema={
679
+ 'type': 'object',
680
+ 'description': 'Compact project object',
681
+ 'properties': {
682
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
683
+ 'resource_type': {'type': 'string', 'description': 'Resource type (project)'},
684
+ 'name': {'type': 'string', 'description': 'Project name'},
685
+ },
686
+ 'x-airbyte-entity-name': 'projects',
687
+ },
688
+ ),
689
+ EntityDefinition(
690
+ name='task_projects',
691
+ actions=[Action.LIST],
692
+ endpoints={
693
+ Action.LIST: EndpointDefinition(
694
+ method='GET',
695
+ path='/tasks/{task_gid}/projects',
696
+ action=Action.LIST,
697
+ description='Returns all projects a task is in',
698
+ query_params=['limit', 'offset'],
699
+ query_params_schema={
700
+ 'limit': {
701
+ 'type': 'integer',
702
+ 'required': False,
703
+ 'default': 20,
704
+ },
705
+ 'offset': {'type': 'string', 'required': False},
706
+ },
707
+ path_params=['task_gid'],
708
+ path_params_schema={
709
+ 'task_gid': {'type': 'string', 'required': True},
710
+ },
711
+ response_schema={
712
+ 'type': 'object',
713
+ 'description': 'Paginated list of projects containing compact project objects',
714
+ 'properties': {
715
+ 'data': {
716
+ 'type': 'array',
717
+ 'items': {
718
+ 'type': 'object',
719
+ 'description': 'Compact project object',
720
+ 'properties': {
721
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
722
+ 'resource_type': {'type': 'string', 'description': 'Resource type (project)'},
723
+ 'name': {'type': 'string', 'description': 'Project name'},
724
+ },
725
+ 'x-airbyte-entity-name': 'projects',
726
+ },
727
+ },
728
+ 'next_page': {
729
+ 'type': ['object', 'null'],
730
+ 'properties': {
731
+ 'offset': {'type': 'string'},
732
+ 'path': {'type': 'string'},
733
+ 'uri': {'type': 'string'},
734
+ },
735
+ },
736
+ },
737
+ },
738
+ record_extractor='$.data',
739
+ meta_extractor={'next_page': '$.next_page'},
740
+ ),
741
+ },
742
+ ),
743
+ EntityDefinition(
744
+ name='team_projects',
745
+ actions=[Action.LIST],
746
+ endpoints={
747
+ Action.LIST: EndpointDefinition(
748
+ method='GET',
749
+ path='/teams/{team_gid}/projects',
750
+ action=Action.LIST,
751
+ description='Returns all projects for a team',
752
+ query_params=['limit', 'offset', 'archived'],
753
+ query_params_schema={
754
+ 'limit': {
755
+ 'type': 'integer',
756
+ 'required': False,
757
+ 'default': 20,
758
+ },
759
+ 'offset': {'type': 'string', 'required': False},
760
+ 'archived': {'type': 'boolean', 'required': False},
761
+ },
762
+ path_params=['team_gid'],
763
+ path_params_schema={
764
+ 'team_gid': {'type': 'string', 'required': True},
765
+ },
766
+ response_schema={
767
+ 'type': 'object',
768
+ 'description': 'Paginated list of projects containing compact project objects',
769
+ 'properties': {
770
+ 'data': {
771
+ 'type': 'array',
772
+ 'items': {
773
+ 'type': 'object',
774
+ 'description': 'Compact project object',
775
+ 'properties': {
776
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
777
+ 'resource_type': {'type': 'string', 'description': 'Resource type (project)'},
778
+ 'name': {'type': 'string', 'description': 'Project name'},
779
+ },
780
+ 'x-airbyte-entity-name': 'projects',
781
+ },
782
+ },
783
+ 'next_page': {
784
+ 'type': ['object', 'null'],
785
+ 'properties': {
786
+ 'offset': {'type': 'string'},
787
+ 'path': {'type': 'string'},
788
+ 'uri': {'type': 'string'},
789
+ },
790
+ },
791
+ },
792
+ },
793
+ record_extractor='$.data',
794
+ meta_extractor={'next_page': '$.next_page'},
795
+ ),
796
+ },
797
+ ),
798
+ EntityDefinition(
799
+ name='workspace_projects',
800
+ actions=[Action.LIST],
801
+ endpoints={
802
+ Action.LIST: EndpointDefinition(
803
+ method='GET',
804
+ path='/workspaces/{workspace_gid}/projects',
805
+ action=Action.LIST,
806
+ description='Returns all projects in a workspace',
807
+ query_params=['limit', 'offset', 'archived'],
808
+ query_params_schema={
809
+ 'limit': {
810
+ 'type': 'integer',
811
+ 'required': False,
812
+ 'default': 20,
813
+ },
814
+ 'offset': {'type': 'string', 'required': False},
815
+ 'archived': {'type': 'boolean', 'required': False},
816
+ },
817
+ path_params=['workspace_gid'],
818
+ path_params_schema={
819
+ 'workspace_gid': {'type': 'string', 'required': True},
820
+ },
821
+ response_schema={
822
+ 'type': 'object',
823
+ 'description': 'Paginated list of projects containing compact project objects',
824
+ 'properties': {
825
+ 'data': {
826
+ 'type': 'array',
827
+ 'items': {
828
+ 'type': 'object',
829
+ 'description': 'Compact project object',
830
+ 'properties': {
831
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
832
+ 'resource_type': {'type': 'string', 'description': 'Resource type (project)'},
833
+ 'name': {'type': 'string', 'description': 'Project name'},
834
+ },
835
+ 'x-airbyte-entity-name': 'projects',
836
+ },
837
+ },
838
+ 'next_page': {
839
+ 'type': ['object', 'null'],
840
+ 'properties': {
841
+ 'offset': {'type': 'string'},
842
+ 'path': {'type': 'string'},
843
+ 'uri': {'type': 'string'},
844
+ },
845
+ },
846
+ },
847
+ },
848
+ record_extractor='$.data',
849
+ meta_extractor={'next_page': '$.next_page'},
850
+ ),
851
+ },
852
+ ),
853
+ EntityDefinition(
854
+ name='workspaces',
855
+ actions=[Action.LIST, Action.GET],
856
+ endpoints={
857
+ Action.LIST: EndpointDefinition(
858
+ method='GET',
859
+ path='/workspaces',
860
+ action=Action.LIST,
861
+ description='Returns a paginated list of workspaces',
862
+ query_params=['limit', 'offset'],
863
+ query_params_schema={
864
+ 'limit': {
865
+ 'type': 'integer',
866
+ 'required': False,
867
+ 'default': 20,
868
+ },
869
+ 'offset': {'type': 'string', 'required': False},
870
+ },
871
+ response_schema={
872
+ 'type': 'object',
873
+ 'description': 'Paginated list of workspaces containing compact workspace objects',
874
+ 'properties': {
875
+ 'data': {
876
+ 'type': 'array',
877
+ 'items': {
878
+ 'type': 'object',
879
+ 'description': 'Compact workspace object',
880
+ 'properties': {
881
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
882
+ 'resource_type': {'type': 'string', 'description': 'Resource type (workspace)'},
883
+ 'name': {'type': 'string', 'description': 'Workspace name'},
884
+ },
885
+ 'x-airbyte-entity-name': 'workspaces',
886
+ },
887
+ },
888
+ 'next_page': {
889
+ 'type': ['object', 'null'],
890
+ 'properties': {
891
+ 'offset': {'type': 'string'},
892
+ 'path': {'type': 'string'},
893
+ 'uri': {'type': 'string'},
894
+ },
895
+ },
896
+ },
897
+ },
898
+ record_extractor='$.data',
899
+ meta_extractor={'next_page': '$.next_page'},
900
+ ),
901
+ Action.GET: EndpointDefinition(
902
+ method='GET',
903
+ path='/workspaces/{workspace_gid}',
904
+ action=Action.GET,
905
+ description='Get a single workspace by its ID',
906
+ path_params=['workspace_gid'],
907
+ path_params_schema={
908
+ 'workspace_gid': {'type': 'string', 'required': True},
909
+ },
910
+ response_schema={
911
+ 'type': 'object',
912
+ 'description': 'Workspace response wrapper',
913
+ 'properties': {
914
+ 'data': {
915
+ 'type': 'object',
916
+ 'description': 'Full workspace object',
917
+ 'properties': {
918
+ 'gid': {'type': 'string'},
919
+ 'resource_type': {'type': 'string'},
920
+ 'name': {'type': 'string'},
921
+ 'email_domains': {
922
+ 'type': 'array',
923
+ 'items': {'type': 'string'},
924
+ },
925
+ 'is_organization': {'type': 'boolean'},
926
+ },
927
+ },
928
+ },
929
+ },
930
+ record_extractor='$.data',
931
+ ),
932
+ },
933
+ entity_schema={
934
+ 'type': 'object',
935
+ 'description': 'Compact workspace object',
936
+ 'properties': {
937
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
938
+ 'resource_type': {'type': 'string', 'description': 'Resource type (workspace)'},
939
+ 'name': {'type': 'string', 'description': 'Workspace name'},
940
+ },
941
+ 'x-airbyte-entity-name': 'workspaces',
942
+ },
943
+ ),
944
+ EntityDefinition(
945
+ name='users',
946
+ actions=[Action.LIST, Action.GET],
947
+ endpoints={
948
+ Action.LIST: EndpointDefinition(
949
+ method='GET',
950
+ path='/users',
951
+ action=Action.LIST,
952
+ description='Returns a paginated list of users',
953
+ query_params=[
954
+ 'limit',
955
+ 'offset',
956
+ 'workspace',
957
+ 'team',
958
+ ],
959
+ query_params_schema={
960
+ 'limit': {
961
+ 'type': 'integer',
962
+ 'required': False,
963
+ 'default': 20,
964
+ },
965
+ 'offset': {'type': 'string', 'required': False},
966
+ 'workspace': {'type': 'string', 'required': False},
967
+ 'team': {'type': 'string', 'required': False},
968
+ },
969
+ response_schema={
970
+ 'type': 'object',
971
+ 'description': 'Paginated list of users containing compact user objects',
972
+ 'properties': {
973
+ 'data': {
974
+ 'type': 'array',
975
+ 'items': {
976
+ 'type': 'object',
977
+ 'description': 'Compact user object',
978
+ 'properties': {
979
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
980
+ 'resource_type': {'type': 'string', 'description': 'Resource type (user)'},
981
+ 'name': {'type': 'string', 'description': 'User name'},
982
+ },
983
+ 'x-airbyte-entity-name': 'users',
984
+ },
985
+ },
986
+ 'next_page': {
987
+ 'type': ['object', 'null'],
988
+ 'properties': {
989
+ 'offset': {'type': 'string'},
990
+ 'path': {'type': 'string'},
991
+ 'uri': {'type': 'string'},
992
+ },
993
+ },
994
+ },
995
+ },
996
+ record_extractor='$.data',
997
+ meta_extractor={'next_page': '$.next_page'},
998
+ ),
999
+ Action.GET: EndpointDefinition(
1000
+ method='GET',
1001
+ path='/users/{user_gid}',
1002
+ action=Action.GET,
1003
+ description='Get a single user by their ID',
1004
+ path_params=['user_gid'],
1005
+ path_params_schema={
1006
+ 'user_gid': {'type': 'string', 'required': True},
1007
+ },
1008
+ response_schema={
1009
+ 'type': 'object',
1010
+ 'description': 'User response wrapper',
1011
+ 'properties': {
1012
+ 'data': {
1013
+ 'type': 'object',
1014
+ 'description': 'Full user object',
1015
+ 'properties': {
1016
+ 'gid': {'type': 'string'},
1017
+ 'email': {'type': 'string'},
1018
+ 'name': {'type': 'string'},
1019
+ 'photo': {
1020
+ 'type': ['object', 'null'],
1021
+ },
1022
+ 'resource_type': {'type': 'string'},
1023
+ 'workspaces': {
1024
+ 'type': 'array',
1025
+ 'items': {
1026
+ 'type': 'object',
1027
+ 'properties': {
1028
+ 'gid': {'type': 'string'},
1029
+ 'name': {'type': 'string'},
1030
+ 'resource_type': {'type': 'string'},
1031
+ },
1032
+ },
1033
+ },
1034
+ },
1035
+ },
1036
+ },
1037
+ },
1038
+ record_extractor='$.data',
1039
+ ),
1040
+ },
1041
+ entity_schema={
1042
+ 'type': 'object',
1043
+ 'description': 'Compact user object',
1044
+ 'properties': {
1045
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1046
+ 'resource_type': {'type': 'string', 'description': 'Resource type (user)'},
1047
+ 'name': {'type': 'string', 'description': 'User name'},
1048
+ },
1049
+ 'x-airbyte-entity-name': 'users',
1050
+ },
1051
+ ),
1052
+ EntityDefinition(
1053
+ name='workspace_users',
1054
+ actions=[Action.LIST],
1055
+ endpoints={
1056
+ Action.LIST: EndpointDefinition(
1057
+ method='GET',
1058
+ path='/workspaces/{workspace_gid}/users',
1059
+ action=Action.LIST,
1060
+ description='Returns all users in a workspace',
1061
+ query_params=['limit', 'offset'],
1062
+ query_params_schema={
1063
+ 'limit': {
1064
+ 'type': 'integer',
1065
+ 'required': False,
1066
+ 'default': 20,
1067
+ },
1068
+ 'offset': {'type': 'string', 'required': False},
1069
+ },
1070
+ path_params=['workspace_gid'],
1071
+ path_params_schema={
1072
+ 'workspace_gid': {'type': 'string', 'required': True},
1073
+ },
1074
+ response_schema={
1075
+ 'type': 'object',
1076
+ 'description': 'Paginated list of users containing compact user objects',
1077
+ 'properties': {
1078
+ 'data': {
1079
+ 'type': 'array',
1080
+ 'items': {
1081
+ 'type': 'object',
1082
+ 'description': 'Compact user object',
1083
+ 'properties': {
1084
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1085
+ 'resource_type': {'type': 'string', 'description': 'Resource type (user)'},
1086
+ 'name': {'type': 'string', 'description': 'User name'},
1087
+ },
1088
+ 'x-airbyte-entity-name': 'users',
1089
+ },
1090
+ },
1091
+ 'next_page': {
1092
+ 'type': ['object', 'null'],
1093
+ 'properties': {
1094
+ 'offset': {'type': 'string'},
1095
+ 'path': {'type': 'string'},
1096
+ 'uri': {'type': 'string'},
1097
+ },
1098
+ },
1099
+ },
1100
+ },
1101
+ record_extractor='$.data',
1102
+ meta_extractor={'next_page': '$.next_page'},
1103
+ ),
1104
+ },
1105
+ ),
1106
+ EntityDefinition(
1107
+ name='team_users',
1108
+ actions=[Action.LIST],
1109
+ endpoints={
1110
+ Action.LIST: EndpointDefinition(
1111
+ method='GET',
1112
+ path='/teams/{team_gid}/users',
1113
+ action=Action.LIST,
1114
+ description='Returns all users in a team',
1115
+ query_params=['limit', 'offset'],
1116
+ query_params_schema={
1117
+ 'limit': {
1118
+ 'type': 'integer',
1119
+ 'required': False,
1120
+ 'default': 20,
1121
+ },
1122
+ 'offset': {'type': 'string', 'required': False},
1123
+ },
1124
+ path_params=['team_gid'],
1125
+ path_params_schema={
1126
+ 'team_gid': {'type': 'string', 'required': True},
1127
+ },
1128
+ response_schema={
1129
+ 'type': 'object',
1130
+ 'description': 'Paginated list of users containing compact user objects',
1131
+ 'properties': {
1132
+ 'data': {
1133
+ 'type': 'array',
1134
+ 'items': {
1135
+ 'type': 'object',
1136
+ 'description': 'Compact user object',
1137
+ 'properties': {
1138
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1139
+ 'resource_type': {'type': 'string', 'description': 'Resource type (user)'},
1140
+ 'name': {'type': 'string', 'description': 'User name'},
1141
+ },
1142
+ 'x-airbyte-entity-name': 'users',
1143
+ },
1144
+ },
1145
+ 'next_page': {
1146
+ 'type': ['object', 'null'],
1147
+ 'properties': {
1148
+ 'offset': {'type': 'string'},
1149
+ 'path': {'type': 'string'},
1150
+ 'uri': {'type': 'string'},
1151
+ },
1152
+ },
1153
+ },
1154
+ },
1155
+ record_extractor='$.data',
1156
+ meta_extractor={'next_page': '$.next_page'},
1157
+ ),
1158
+ },
1159
+ ),
1160
+ EntityDefinition(
1161
+ name='teams',
1162
+ actions=[Action.GET],
1163
+ endpoints={
1164
+ Action.GET: EndpointDefinition(
1165
+ method='GET',
1166
+ path='/teams/{team_gid}',
1167
+ action=Action.GET,
1168
+ description='Get a single team by its ID',
1169
+ path_params=['team_gid'],
1170
+ path_params_schema={
1171
+ 'team_gid': {'type': 'string', 'required': True},
1172
+ },
1173
+ response_schema={
1174
+ 'type': 'object',
1175
+ 'description': 'Team response wrapper',
1176
+ 'properties': {
1177
+ 'data': {
1178
+ 'type': 'object',
1179
+ 'description': 'Full team object',
1180
+ 'properties': {
1181
+ 'gid': {'type': 'string'},
1182
+ 'name': {'type': 'string'},
1183
+ 'organization': {
1184
+ 'type': 'object',
1185
+ 'properties': {
1186
+ 'gid': {'type': 'string'},
1187
+ 'name': {'type': 'string'},
1188
+ 'resource_type': {'type': 'string'},
1189
+ },
1190
+ },
1191
+ 'permalink_url': {'type': 'string'},
1192
+ 'resource_type': {'type': 'string'},
1193
+ },
1194
+ },
1195
+ },
1196
+ },
1197
+ record_extractor='$.data',
1198
+ ),
1199
+ },
1200
+ entity_schema={
1201
+ 'type': 'object',
1202
+ 'description': 'Compact team object',
1203
+ 'properties': {
1204
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1205
+ 'resource_type': {'type': 'string', 'description': 'Resource type (team)'},
1206
+ 'name': {'type': 'string', 'description': 'Team name'},
1207
+ },
1208
+ 'x-airbyte-entity-name': 'teams',
1209
+ },
1210
+ ),
1211
+ EntityDefinition(
1212
+ name='workspace_teams',
1213
+ actions=[Action.LIST],
1214
+ endpoints={
1215
+ Action.LIST: EndpointDefinition(
1216
+ method='GET',
1217
+ path='/workspaces/{workspace_gid}/teams',
1218
+ action=Action.LIST,
1219
+ description='Returns all teams in a workspace',
1220
+ query_params=['limit', 'offset'],
1221
+ query_params_schema={
1222
+ 'limit': {
1223
+ 'type': 'integer',
1224
+ 'required': False,
1225
+ 'default': 20,
1226
+ },
1227
+ 'offset': {'type': 'string', 'required': False},
1228
+ },
1229
+ path_params=['workspace_gid'],
1230
+ path_params_schema={
1231
+ 'workspace_gid': {'type': 'string', 'required': True},
1232
+ },
1233
+ response_schema={
1234
+ 'type': 'object',
1235
+ 'description': 'Paginated list of teams containing compact team objects',
1236
+ 'properties': {
1237
+ 'data': {
1238
+ 'type': 'array',
1239
+ 'items': {
1240
+ 'type': 'object',
1241
+ 'description': 'Compact team object',
1242
+ 'properties': {
1243
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1244
+ 'resource_type': {'type': 'string', 'description': 'Resource type (team)'},
1245
+ 'name': {'type': 'string', 'description': 'Team name'},
1246
+ },
1247
+ 'x-airbyte-entity-name': 'teams',
1248
+ },
1249
+ },
1250
+ 'next_page': {
1251
+ 'type': ['object', 'null'],
1252
+ 'properties': {
1253
+ 'offset': {'type': 'string'},
1254
+ 'path': {'type': 'string'},
1255
+ 'uri': {'type': 'string'},
1256
+ },
1257
+ },
1258
+ },
1259
+ },
1260
+ record_extractor='$.data',
1261
+ meta_extractor={'next_page': '$.next_page'},
1262
+ ),
1263
+ },
1264
+ ),
1265
+ EntityDefinition(
1266
+ name='user_teams',
1267
+ actions=[Action.LIST],
1268
+ endpoints={
1269
+ Action.LIST: EndpointDefinition(
1270
+ method='GET',
1271
+ path='/users/{user_gid}/teams',
1272
+ action=Action.LIST,
1273
+ description='Returns all teams a user is a member of',
1274
+ query_params=['organization', 'limit', 'offset'],
1275
+ query_params_schema={
1276
+ 'organization': {'type': 'string', 'required': True},
1277
+ 'limit': {
1278
+ 'type': 'integer',
1279
+ 'required': False,
1280
+ 'default': 20,
1281
+ },
1282
+ 'offset': {'type': 'string', 'required': False},
1283
+ },
1284
+ path_params=['user_gid'],
1285
+ path_params_schema={
1286
+ 'user_gid': {'type': 'string', 'required': True},
1287
+ },
1288
+ response_schema={
1289
+ 'type': 'object',
1290
+ 'description': 'Paginated list of teams containing compact team objects',
1291
+ 'properties': {
1292
+ 'data': {
1293
+ 'type': 'array',
1294
+ 'items': {
1295
+ 'type': 'object',
1296
+ 'description': 'Compact team object',
1297
+ 'properties': {
1298
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1299
+ 'resource_type': {'type': 'string', 'description': 'Resource type (team)'},
1300
+ 'name': {'type': 'string', 'description': 'Team name'},
1301
+ },
1302
+ 'x-airbyte-entity-name': 'teams',
1303
+ },
1304
+ },
1305
+ 'next_page': {
1306
+ 'type': ['object', 'null'],
1307
+ 'properties': {
1308
+ 'offset': {'type': 'string'},
1309
+ 'path': {'type': 'string'},
1310
+ 'uri': {'type': 'string'},
1311
+ },
1312
+ },
1313
+ },
1314
+ },
1315
+ record_extractor='$.data',
1316
+ meta_extractor={'next_page': '$.next_page'},
1317
+ ),
1318
+ },
1319
+ ),
1320
+ EntityDefinition(
1321
+ name='attachments',
1322
+ actions=[Action.LIST, Action.GET, Action.DOWNLOAD],
1323
+ endpoints={
1324
+ Action.LIST: EndpointDefinition(
1325
+ method='GET',
1326
+ path='/attachments',
1327
+ action=Action.LIST,
1328
+ description='Returns a list of attachments for an object (task, project, etc.)',
1329
+ query_params=['parent', 'limit', 'offset'],
1330
+ query_params_schema={
1331
+ 'parent': {'type': 'string', 'required': True},
1332
+ 'limit': {
1333
+ 'type': 'integer',
1334
+ 'required': False,
1335
+ 'default': 20,
1336
+ },
1337
+ 'offset': {'type': 'string', 'required': False},
1338
+ },
1339
+ response_schema={
1340
+ 'type': 'object',
1341
+ 'description': 'Paginated list of attachments containing compact attachment objects',
1342
+ 'properties': {
1343
+ 'data': {
1344
+ 'type': 'array',
1345
+ 'items': {
1346
+ 'type': 'object',
1347
+ 'description': 'Compact attachment object',
1348
+ 'properties': {
1349
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1350
+ 'resource_type': {'type': 'string', 'description': 'Resource type (attachment)'},
1351
+ 'name': {'type': 'string', 'description': 'The name of the attachment'},
1352
+ 'resource_subtype': {'type': 'string', 'description': 'The type of the attachment (e.g., external, dropbox, gdrive, asana, etc.)'},
1353
+ },
1354
+ 'x-airbyte-entity-name': 'attachments',
1355
+ },
1356
+ },
1357
+ 'next_page': {
1358
+ 'type': ['object', 'null'],
1359
+ 'properties': {
1360
+ 'offset': {'type': 'string'},
1361
+ 'path': {'type': 'string'},
1362
+ 'uri': {'type': 'string'},
1363
+ },
1364
+ },
1365
+ },
1366
+ },
1367
+ record_extractor='$.data',
1368
+ meta_extractor={'next_page': '$.next_page'},
1369
+ ),
1370
+ Action.GET: EndpointDefinition(
1371
+ method='GET',
1372
+ path='/attachments/{attachment_gid}',
1373
+ action=Action.GET,
1374
+ description='Get details for a single attachment by its GID',
1375
+ path_params=['attachment_gid'],
1376
+ path_params_schema={
1377
+ 'attachment_gid': {'type': 'string', 'required': True},
1378
+ },
1379
+ response_schema={
1380
+ 'type': 'object',
1381
+ 'description': 'Attachment response wrapper',
1382
+ 'properties': {
1383
+ 'data': {
1384
+ 'type': 'object',
1385
+ 'description': 'Full attachment object',
1386
+ 'properties': {
1387
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1388
+ 'resource_type': {'type': 'string', 'description': 'Resource type (attachment)'},
1389
+ 'name': {'type': 'string', 'description': 'The name of the attachment'},
1390
+ 'resource_subtype': {'type': 'string', 'description': 'The type of the attachment (e.g., external, dropbox, gdrive, etc.)'},
1391
+ 'created_at': {
1392
+ 'type': 'string',
1393
+ 'format': 'date-time',
1394
+ 'description': 'The time at which this attachment was created',
1395
+ },
1396
+ 'download_url': {
1397
+ 'type': ['string', 'null'],
1398
+ 'format': 'uri',
1399
+ 'description': 'The URL where the attachment can be downloaded. May be null if the attachment is hosted externally.',
1400
+ },
1401
+ 'permanent_url': {
1402
+ 'type': ['string', 'null'],
1403
+ 'format': 'uri',
1404
+ 'description': 'The permanent URL of the attachment. May be null if the attachment does not support permanent URLs.',
1405
+ },
1406
+ 'host': {'type': 'string', 'description': 'The service hosting the attachment (asana, dropbox, gdrive, box, etc.)'},
1407
+ 'parent': {
1408
+ 'type': 'object',
1409
+ 'description': 'The parent object this attachment is attached to',
1410
+ 'properties': {
1411
+ 'gid': {'type': 'string'},
1412
+ 'resource_type': {'type': 'string'},
1413
+ 'name': {'type': 'string'},
1414
+ 'resource_subtype': {'type': 'string', 'description': 'The subtype of the parent resource'},
1415
+ },
1416
+ },
1417
+ 'view_url': {
1418
+ 'type': ['string', 'null'],
1419
+ 'format': 'uri',
1420
+ 'description': 'The URL where the attachment can be viewed in a browser',
1421
+ },
1422
+ 'size': {
1423
+ 'type': ['integer', 'null'],
1424
+ 'description': 'The size of the attachment in bytes',
1425
+ },
1426
+ },
1427
+ },
1428
+ },
1429
+ },
1430
+ record_extractor='$.data',
1431
+ ),
1432
+ Action.DOWNLOAD: EndpointDefinition(
1433
+ method='GET',
1434
+ path='/attachments/{attachment_gid}:download',
1435
+ path_override=PathOverrideConfig(
1436
+ path='/attachments/{attachment_gid}',
1437
+ ),
1438
+ action=Action.DOWNLOAD,
1439
+ description='Downloads the file content of an attachment. This operation first retrieves the attachment\nmetadata to get the download_url, then downloads the file from that URL.\n',
1440
+ path_params=['attachment_gid'],
1441
+ path_params_schema={
1442
+ 'attachment_gid': {'type': 'string', 'required': True},
1443
+ },
1444
+ file_field='data.download_url',
1445
+ ),
1446
+ },
1447
+ entity_schema={
1448
+ 'type': 'object',
1449
+ 'description': 'Compact attachment object',
1450
+ 'properties': {
1451
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1452
+ 'resource_type': {'type': 'string', 'description': 'Resource type (attachment)'},
1453
+ 'name': {'type': 'string', 'description': 'The name of the attachment'},
1454
+ 'resource_subtype': {'type': 'string', 'description': 'The type of the attachment (e.g., external, dropbox, gdrive, asana, etc.)'},
1455
+ },
1456
+ 'x-airbyte-entity-name': 'attachments',
1457
+ },
1458
+ ),
1459
+ EntityDefinition(
1460
+ name='workspace_tags',
1461
+ actions=[Action.LIST],
1462
+ endpoints={
1463
+ Action.LIST: EndpointDefinition(
1464
+ method='GET',
1465
+ path='/workspaces/{workspace_gid}/tags',
1466
+ action=Action.LIST,
1467
+ description='Returns all tags in a workspace',
1468
+ query_params=['limit', 'offset'],
1469
+ query_params_schema={
1470
+ 'limit': {
1471
+ 'type': 'integer',
1472
+ 'required': False,
1473
+ 'default': 20,
1474
+ },
1475
+ 'offset': {'type': 'string', 'required': False},
1476
+ },
1477
+ path_params=['workspace_gid'],
1478
+ path_params_schema={
1479
+ 'workspace_gid': {'type': 'string', 'required': True},
1480
+ },
1481
+ response_schema={
1482
+ 'type': 'object',
1483
+ 'description': 'Paginated list of tags containing compact tag objects',
1484
+ 'properties': {
1485
+ 'data': {
1486
+ 'type': 'array',
1487
+ 'items': {
1488
+ 'type': 'object',
1489
+ 'description': 'Compact tag object',
1490
+ 'properties': {
1491
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1492
+ 'resource_type': {'type': 'string', 'description': 'Resource type (tag)'},
1493
+ 'name': {'type': 'string', 'description': 'Tag name'},
1494
+ },
1495
+ 'x-airbyte-entity-name': 'tags',
1496
+ },
1497
+ },
1498
+ 'next_page': {
1499
+ 'type': ['object', 'null'],
1500
+ 'properties': {
1501
+ 'offset': {'type': 'string'},
1502
+ 'path': {'type': 'string'},
1503
+ 'uri': {'type': 'string'},
1504
+ },
1505
+ },
1506
+ },
1507
+ },
1508
+ record_extractor='$.data',
1509
+ meta_extractor={'next_page': '$.next_page'},
1510
+ ),
1511
+ },
1512
+ ),
1513
+ EntityDefinition(
1514
+ name='tags',
1515
+ actions=[Action.GET],
1516
+ endpoints={
1517
+ Action.GET: EndpointDefinition(
1518
+ method='GET',
1519
+ path='/tags/{tag_gid}',
1520
+ action=Action.GET,
1521
+ description='Get a single tag by its ID',
1522
+ path_params=['tag_gid'],
1523
+ path_params_schema={
1524
+ 'tag_gid': {'type': 'string', 'required': True},
1525
+ },
1526
+ response_schema={
1527
+ 'type': 'object',
1528
+ 'description': 'Tag response wrapper',
1529
+ 'properties': {
1530
+ 'data': {
1531
+ 'type': 'object',
1532
+ 'description': 'Full tag object',
1533
+ 'properties': {
1534
+ 'gid': {'type': 'string'},
1535
+ 'resource_type': {'type': 'string'},
1536
+ 'name': {'type': 'string'},
1537
+ 'color': {'type': 'string'},
1538
+ 'created_at': {'type': 'string'},
1539
+ 'followers': {'type': 'array'},
1540
+ 'notes': {'type': 'string'},
1541
+ 'permalink_url': {'type': 'string'},
1542
+ 'workspace': {
1543
+ 'type': 'object',
1544
+ 'properties': {
1545
+ 'gid': {'type': 'string'},
1546
+ 'name': {'type': 'string'},
1547
+ 'resource_type': {'type': 'string'},
1548
+ },
1549
+ },
1550
+ },
1551
+ },
1552
+ },
1553
+ },
1554
+ record_extractor='$.data',
1555
+ ),
1556
+ },
1557
+ entity_schema={
1558
+ 'type': 'object',
1559
+ 'description': 'Compact tag object',
1560
+ 'properties': {
1561
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1562
+ 'resource_type': {'type': 'string', 'description': 'Resource type (tag)'},
1563
+ 'name': {'type': 'string', 'description': 'Tag name'},
1564
+ },
1565
+ 'x-airbyte-entity-name': 'tags',
1566
+ },
1567
+ ),
1568
+ EntityDefinition(
1569
+ name='project_sections',
1570
+ actions=[Action.LIST],
1571
+ endpoints={
1572
+ Action.LIST: EndpointDefinition(
1573
+ method='GET',
1574
+ path='/projects/{project_gid}/sections',
1575
+ action=Action.LIST,
1576
+ description='Returns all sections in a project',
1577
+ query_params=['limit', 'offset'],
1578
+ query_params_schema={
1579
+ 'limit': {
1580
+ 'type': 'integer',
1581
+ 'required': False,
1582
+ 'default': 20,
1583
+ },
1584
+ 'offset': {'type': 'string', 'required': False},
1585
+ },
1586
+ path_params=['project_gid'],
1587
+ path_params_schema={
1588
+ 'project_gid': {'type': 'string', 'required': True},
1589
+ },
1590
+ response_schema={
1591
+ 'type': 'object',
1592
+ 'description': 'Paginated list of sections containing compact section objects',
1593
+ 'properties': {
1594
+ 'data': {
1595
+ 'type': 'array',
1596
+ 'items': {
1597
+ 'type': 'object',
1598
+ 'description': 'Compact section object',
1599
+ 'properties': {
1600
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1601
+ 'resource_type': {'type': 'string', 'description': 'Resource type (section)'},
1602
+ 'name': {'type': 'string', 'description': 'Section name'},
1603
+ },
1604
+ 'x-airbyte-entity-name': 'sections',
1605
+ },
1606
+ },
1607
+ 'next_page': {
1608
+ 'type': ['object', 'null'],
1609
+ 'properties': {
1610
+ 'offset': {'type': 'string'},
1611
+ 'path': {'type': 'string'},
1612
+ 'uri': {'type': 'string'},
1613
+ },
1614
+ },
1615
+ },
1616
+ },
1617
+ record_extractor='$.data',
1618
+ meta_extractor={'next_page': '$.next_page'},
1619
+ ),
1620
+ },
1621
+ ),
1622
+ EntityDefinition(
1623
+ name='sections',
1624
+ actions=[Action.GET],
1625
+ endpoints={
1626
+ Action.GET: EndpointDefinition(
1627
+ method='GET',
1628
+ path='/sections/{section_gid}',
1629
+ action=Action.GET,
1630
+ description='Get a single section by its ID',
1631
+ path_params=['section_gid'],
1632
+ path_params_schema={
1633
+ 'section_gid': {'type': 'string', 'required': True},
1634
+ },
1635
+ response_schema={
1636
+ 'type': 'object',
1637
+ 'description': 'Section response wrapper',
1638
+ 'properties': {
1639
+ 'data': {
1640
+ 'type': 'object',
1641
+ 'description': 'Full section object',
1642
+ 'properties': {
1643
+ 'gid': {'type': 'string'},
1644
+ 'resource_type': {'type': 'string'},
1645
+ 'name': {'type': 'string'},
1646
+ 'created_at': {'type': 'string'},
1647
+ 'project': {
1648
+ 'type': 'object',
1649
+ 'properties': {
1650
+ 'gid': {'type': 'string'},
1651
+ 'name': {'type': 'string'},
1652
+ 'resource_type': {'type': 'string'},
1653
+ },
1654
+ },
1655
+ },
1656
+ },
1657
+ },
1658
+ },
1659
+ record_extractor='$.data',
1660
+ ),
1661
+ },
1662
+ entity_schema={
1663
+ 'type': 'object',
1664
+ 'description': 'Compact section object',
1665
+ 'properties': {
1666
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1667
+ 'resource_type': {'type': 'string', 'description': 'Resource type (section)'},
1668
+ 'name': {'type': 'string', 'description': 'Section name'},
1669
+ },
1670
+ 'x-airbyte-entity-name': 'sections',
1671
+ },
1672
+ ),
1673
+ EntityDefinition(
1674
+ name='task_subtasks',
1675
+ actions=[Action.LIST],
1676
+ endpoints={
1677
+ Action.LIST: EndpointDefinition(
1678
+ method='GET',
1679
+ path='/tasks/{task_gid}/subtasks',
1680
+ action=Action.LIST,
1681
+ description='Returns all subtasks of a task',
1682
+ query_params=['limit', 'offset'],
1683
+ query_params_schema={
1684
+ 'limit': {
1685
+ 'type': 'integer',
1686
+ 'required': False,
1687
+ 'default': 20,
1688
+ },
1689
+ 'offset': {'type': 'string', 'required': False},
1690
+ },
1691
+ path_params=['task_gid'],
1692
+ path_params_schema={
1693
+ 'task_gid': {'type': 'string', 'required': True},
1694
+ },
1695
+ response_schema={
1696
+ 'type': 'object',
1697
+ 'description': 'Paginated list of tasks containing compact task objects',
1698
+ 'properties': {
1699
+ 'data': {
1700
+ 'type': 'array',
1701
+ 'items': {
1702
+ 'type': 'object',
1703
+ 'description': 'Compact task object',
1704
+ 'properties': {
1705
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1706
+ 'resource_type': {'type': 'string', 'description': 'Resource type (task)'},
1707
+ 'name': {'type': 'string', 'description': 'Task name'},
1708
+ 'resource_subtype': {'type': 'string', 'description': 'Task subtype'},
1709
+ 'created_by': {
1710
+ 'type': 'object',
1711
+ 'description': 'User who created the task',
1712
+ 'properties': {
1713
+ 'gid': {'type': 'string'},
1714
+ 'resource_type': {'type': 'string'},
1715
+ },
1716
+ },
1717
+ },
1718
+ 'x-airbyte-entity-name': 'tasks',
1719
+ },
1720
+ },
1721
+ 'next_page': {
1722
+ 'type': ['object', 'null'],
1723
+ 'properties': {
1724
+ 'offset': {'type': 'string'},
1725
+ 'path': {'type': 'string'},
1726
+ 'uri': {'type': 'string'},
1727
+ },
1728
+ },
1729
+ },
1730
+ },
1731
+ record_extractor='$.data',
1732
+ meta_extractor={'next_page': '$.next_page'},
1733
+ ),
1734
+ },
1735
+ ),
1736
+ EntityDefinition(
1737
+ name='task_dependencies',
1738
+ actions=[Action.LIST],
1739
+ endpoints={
1740
+ Action.LIST: EndpointDefinition(
1741
+ method='GET',
1742
+ path='/tasks/{task_gid}/dependencies',
1743
+ action=Action.LIST,
1744
+ description='Returns all tasks that this task depends on',
1745
+ query_params=['limit', 'offset'],
1746
+ query_params_schema={
1747
+ 'limit': {
1748
+ 'type': 'integer',
1749
+ 'required': False,
1750
+ 'default': 20,
1751
+ },
1752
+ 'offset': {'type': 'string', 'required': False},
1753
+ },
1754
+ path_params=['task_gid'],
1755
+ path_params_schema={
1756
+ 'task_gid': {'type': 'string', 'required': True},
1757
+ },
1758
+ response_schema={
1759
+ 'type': 'object',
1760
+ 'description': 'Paginated list of tasks containing compact task objects',
1761
+ 'properties': {
1762
+ 'data': {
1763
+ 'type': 'array',
1764
+ 'items': {
1765
+ 'type': 'object',
1766
+ 'description': 'Compact task object',
1767
+ 'properties': {
1768
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1769
+ 'resource_type': {'type': 'string', 'description': 'Resource type (task)'},
1770
+ 'name': {'type': 'string', 'description': 'Task name'},
1771
+ 'resource_subtype': {'type': 'string', 'description': 'Task subtype'},
1772
+ 'created_by': {
1773
+ 'type': 'object',
1774
+ 'description': 'User who created the task',
1775
+ 'properties': {
1776
+ 'gid': {'type': 'string'},
1777
+ 'resource_type': {'type': 'string'},
1778
+ },
1779
+ },
1780
+ },
1781
+ 'x-airbyte-entity-name': 'tasks',
1782
+ },
1783
+ },
1784
+ 'next_page': {
1785
+ 'type': ['object', 'null'],
1786
+ 'properties': {
1787
+ 'offset': {'type': 'string'},
1788
+ 'path': {'type': 'string'},
1789
+ 'uri': {'type': 'string'},
1790
+ },
1791
+ },
1792
+ },
1793
+ },
1794
+ record_extractor='$.data',
1795
+ meta_extractor={'next_page': '$.next_page'},
1796
+ ),
1797
+ },
1798
+ ),
1799
+ EntityDefinition(
1800
+ name='task_dependents',
1801
+ actions=[Action.LIST],
1802
+ endpoints={
1803
+ Action.LIST: EndpointDefinition(
1804
+ method='GET',
1805
+ path='/tasks/{task_gid}/dependents',
1806
+ action=Action.LIST,
1807
+ description='Returns all tasks that depend on this task',
1808
+ query_params=['limit', 'offset'],
1809
+ query_params_schema={
1810
+ 'limit': {
1811
+ 'type': 'integer',
1812
+ 'required': False,
1813
+ 'default': 20,
1814
+ },
1815
+ 'offset': {'type': 'string', 'required': False},
1816
+ },
1817
+ path_params=['task_gid'],
1818
+ path_params_schema={
1819
+ 'task_gid': {'type': 'string', 'required': True},
1820
+ },
1821
+ response_schema={
1822
+ 'type': 'object',
1823
+ 'description': 'Paginated list of tasks containing compact task objects',
1824
+ 'properties': {
1825
+ 'data': {
1826
+ 'type': 'array',
1827
+ 'items': {
1828
+ 'type': 'object',
1829
+ 'description': 'Compact task object',
1830
+ 'properties': {
1831
+ 'gid': {'type': 'string', 'description': 'Globally unique identifier'},
1832
+ 'resource_type': {'type': 'string', 'description': 'Resource type (task)'},
1833
+ 'name': {'type': 'string', 'description': 'Task name'},
1834
+ 'resource_subtype': {'type': 'string', 'description': 'Task subtype'},
1835
+ 'created_by': {
1836
+ 'type': 'object',
1837
+ 'description': 'User who created the task',
1838
+ 'properties': {
1839
+ 'gid': {'type': 'string'},
1840
+ 'resource_type': {'type': 'string'},
1841
+ },
1842
+ },
1843
+ },
1844
+ 'x-airbyte-entity-name': 'tasks',
1845
+ },
1846
+ },
1847
+ 'next_page': {
1848
+ 'type': ['object', 'null'],
1849
+ 'properties': {
1850
+ 'offset': {'type': 'string'},
1851
+ 'path': {'type': 'string'},
1852
+ 'uri': {'type': 'string'},
1853
+ },
1854
+ },
1855
+ },
1856
+ },
1857
+ record_extractor='$.data',
1858
+ meta_extractor={'next_page': '$.next_page'},
1859
+ ),
1860
+ },
1861
+ ),
1862
+ ],
1863
+ )