airbyte-agent-hubspot 0.15.20__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.
- airbyte_agent_hubspot/__init__.py +86 -0
- airbyte_agent_hubspot/_vendored/__init__.py +1 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/__init__.py +82 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/auth_strategies.py +1123 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/auth_template.py +135 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/cloud_utils/__init__.py +5 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/cloud_utils/client.py +213 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/connector_model_loader.py +957 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/constants.py +78 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/exceptions.py +23 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/executor/__init__.py +31 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/executor/hosted_executor.py +197 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/executor/local_executor.py +1504 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/executor/models.py +190 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/extensions.py +655 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/http/__init__.py +37 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/http/adapters/__init__.py +9 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/http/adapters/httpx_adapter.py +251 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/http/config.py +98 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/http/exceptions.py +119 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/http/protocols.py +114 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/http/response.py +102 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/http_client.py +679 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/logging/__init__.py +11 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/logging/logger.py +264 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/logging/types.py +92 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/observability/__init__.py +11 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/observability/models.py +19 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/observability/redactor.py +81 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/observability/session.py +94 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/performance/__init__.py +6 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/performance/instrumentation.py +57 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/performance/metrics.py +93 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/schema/__init__.py +75 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/schema/base.py +161 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/schema/components.py +238 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/schema/connector.py +131 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/schema/extensions.py +109 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/schema/operations.py +146 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/schema/security.py +213 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/secrets.py +182 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/telemetry/__init__.py +10 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/telemetry/config.py +32 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/telemetry/events.py +58 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/telemetry/tracker.py +151 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/types.py +241 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/utils.py +60 -0
- airbyte_agent_hubspot/_vendored/connector_sdk/validation.py +822 -0
- airbyte_agent_hubspot/connector.py +1104 -0
- airbyte_agent_hubspot/connector_model.py +2660 -0
- airbyte_agent_hubspot/models.py +438 -0
- airbyte_agent_hubspot/types.py +217 -0
- airbyte_agent_hubspot-0.15.20.dist-info/METADATA +105 -0
- airbyte_agent_hubspot-0.15.20.dist-info/RECORD +55 -0
- airbyte_agent_hubspot-0.15.20.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,2660 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Connector model for hubspot.
|
|
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
|
+
AuthType,
|
|
14
|
+
ConnectorModel,
|
|
15
|
+
EndpointDefinition,
|
|
16
|
+
EntityDefinition,
|
|
17
|
+
)
|
|
18
|
+
from ._vendored.connector_sdk.schema.security import (
|
|
19
|
+
AirbyteAuthConfig,
|
|
20
|
+
AuthConfigFieldSpec,
|
|
21
|
+
)
|
|
22
|
+
from uuid import (
|
|
23
|
+
UUID,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
HubspotConnectorModel: ConnectorModel = ConnectorModel(
|
|
27
|
+
id=UUID('36c891d9-4bd9-43ac-bad2-10e12756272c'),
|
|
28
|
+
name='hubspot',
|
|
29
|
+
version='0.1.2',
|
|
30
|
+
base_url='https://api.hubapi.com',
|
|
31
|
+
auth=AuthConfig(
|
|
32
|
+
type=AuthType.OAUTH2,
|
|
33
|
+
config={
|
|
34
|
+
'header': 'Authorization',
|
|
35
|
+
'prefix': 'Bearer',
|
|
36
|
+
'refresh_url': 'https://api.hubapi.com/oauth/v1/token',
|
|
37
|
+
},
|
|
38
|
+
user_config_spec=AirbyteAuthConfig(
|
|
39
|
+
title='OAuth2 Authentication',
|
|
40
|
+
type='object',
|
|
41
|
+
required=[
|
|
42
|
+
'client_id',
|
|
43
|
+
'client_secret',
|
|
44
|
+
'refresh_token',
|
|
45
|
+
'access_token',
|
|
46
|
+
],
|
|
47
|
+
properties={
|
|
48
|
+
'client_id': AuthConfigFieldSpec(
|
|
49
|
+
title='Client ID',
|
|
50
|
+
description='Your HubSpot OAuth2 Client ID',
|
|
51
|
+
),
|
|
52
|
+
'client_secret': AuthConfigFieldSpec(
|
|
53
|
+
title='Client Secret',
|
|
54
|
+
description='Your HubSpot OAuth2 Client Secret',
|
|
55
|
+
airbyte_secret=True,
|
|
56
|
+
),
|
|
57
|
+
'refresh_token': AuthConfigFieldSpec(
|
|
58
|
+
title='Refresh Token',
|
|
59
|
+
description='Your HubSpot OAuth2 Refresh Token',
|
|
60
|
+
airbyte_secret=True,
|
|
61
|
+
),
|
|
62
|
+
'access_token': AuthConfigFieldSpec(
|
|
63
|
+
title='Access Token',
|
|
64
|
+
description='Your HubSpot OAuth2 Access Token (optional if refresh_token is provided)',
|
|
65
|
+
airbyte_secret=True,
|
|
66
|
+
),
|
|
67
|
+
},
|
|
68
|
+
auth_mapping={
|
|
69
|
+
'client_id': '${client_id}',
|
|
70
|
+
'client_secret': '${client_secret}',
|
|
71
|
+
'refresh_token': '${refresh_token}',
|
|
72
|
+
'access_token': '${access_token}',
|
|
73
|
+
},
|
|
74
|
+
),
|
|
75
|
+
),
|
|
76
|
+
entities=[
|
|
77
|
+
EntityDefinition(
|
|
78
|
+
name='contacts',
|
|
79
|
+
actions=[Action.LIST, Action.GET, Action.SEARCH],
|
|
80
|
+
endpoints={
|
|
81
|
+
Action.LIST: EndpointDefinition(
|
|
82
|
+
method='GET',
|
|
83
|
+
path='/crm/v3/objects/contacts',
|
|
84
|
+
action=Action.LIST,
|
|
85
|
+
description='Returns a paginated list of contacts',
|
|
86
|
+
query_params=[
|
|
87
|
+
'limit',
|
|
88
|
+
'after',
|
|
89
|
+
'associations',
|
|
90
|
+
'properties',
|
|
91
|
+
'propertiesWithHistory',
|
|
92
|
+
'archived',
|
|
93
|
+
],
|
|
94
|
+
query_params_schema={
|
|
95
|
+
'limit': {
|
|
96
|
+
'type': 'integer',
|
|
97
|
+
'required': False,
|
|
98
|
+
'default': 25,
|
|
99
|
+
},
|
|
100
|
+
'after': {'type': 'string', 'required': False},
|
|
101
|
+
'associations': {'type': 'string', 'required': False},
|
|
102
|
+
'properties': {'type': 'string', 'required': False},
|
|
103
|
+
'propertiesWithHistory': {'type': 'string', 'required': False},
|
|
104
|
+
'archived': {'type': 'boolean', 'required': False},
|
|
105
|
+
},
|
|
106
|
+
response_schema={
|
|
107
|
+
'type': 'object',
|
|
108
|
+
'description': 'Paginated list of contacts',
|
|
109
|
+
'properties': {
|
|
110
|
+
'results': {
|
|
111
|
+
'type': 'array',
|
|
112
|
+
'items': {
|
|
113
|
+
'type': 'object',
|
|
114
|
+
'description': 'HubSpot contact object',
|
|
115
|
+
'properties': {
|
|
116
|
+
'id': {'type': 'string', 'description': 'Unique contact identifier'},
|
|
117
|
+
'properties': {
|
|
118
|
+
'type': 'object',
|
|
119
|
+
'description': 'Contact properties',
|
|
120
|
+
'properties': {
|
|
121
|
+
'createdate': {
|
|
122
|
+
'type': ['string', 'null'],
|
|
123
|
+
},
|
|
124
|
+
'email': {
|
|
125
|
+
'type': ['string', 'null'],
|
|
126
|
+
},
|
|
127
|
+
'firstname': {
|
|
128
|
+
'type': ['string', 'null'],
|
|
129
|
+
},
|
|
130
|
+
'hs_object_id': {
|
|
131
|
+
'type': ['string', 'null'],
|
|
132
|
+
},
|
|
133
|
+
'lastmodifieddate': {
|
|
134
|
+
'type': ['string', 'null'],
|
|
135
|
+
},
|
|
136
|
+
'lastname': {
|
|
137
|
+
'type': ['string', 'null'],
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
'additionalProperties': True,
|
|
141
|
+
},
|
|
142
|
+
'createdAt': {
|
|
143
|
+
'type': 'string',
|
|
144
|
+
'format': 'date-time',
|
|
145
|
+
'description': 'Creation timestamp',
|
|
146
|
+
},
|
|
147
|
+
'updatedAt': {
|
|
148
|
+
'type': 'string',
|
|
149
|
+
'format': 'date-time',
|
|
150
|
+
'description': 'Last update timestamp',
|
|
151
|
+
},
|
|
152
|
+
'archived': {'type': 'boolean', 'description': 'Whether the contact is archived'},
|
|
153
|
+
'archivedAt': {
|
|
154
|
+
'type': ['string', 'null'],
|
|
155
|
+
'format': 'date-time',
|
|
156
|
+
'description': 'Timestamp when the contact was archived',
|
|
157
|
+
},
|
|
158
|
+
'propertiesWithHistory': {
|
|
159
|
+
'type': ['object', 'null'],
|
|
160
|
+
'description': 'Properties with historical values',
|
|
161
|
+
'additionalProperties': True,
|
|
162
|
+
},
|
|
163
|
+
'associations': {
|
|
164
|
+
'type': ['object', 'null'],
|
|
165
|
+
'description': 'Relationships with other CRM objects',
|
|
166
|
+
'additionalProperties': True,
|
|
167
|
+
},
|
|
168
|
+
'objectWriteTraceId': {
|
|
169
|
+
'type': ['string', 'null'],
|
|
170
|
+
'description': 'Trace identifier for write operations',
|
|
171
|
+
},
|
|
172
|
+
'url': {
|
|
173
|
+
'type': ['string', 'null'],
|
|
174
|
+
'description': 'URL to view contact in HubSpot',
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
'x-airbyte-entity-name': 'contacts',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
'paging': {
|
|
181
|
+
'type': 'object',
|
|
182
|
+
'description': 'Pagination information',
|
|
183
|
+
'properties': {
|
|
184
|
+
'next': {
|
|
185
|
+
'type': 'object',
|
|
186
|
+
'properties': {
|
|
187
|
+
'after': {'type': 'string', 'description': 'Cursor for next page'},
|
|
188
|
+
'link': {'type': 'string', 'description': 'URL for next page'},
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
'total': {'type': 'integer', 'description': 'Total number of results (search only)'},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
record_extractor='$.results',
|
|
197
|
+
meta_extractor={'next_cursor': '$.paging.next.after', 'next_link': '$.paging.next.link'},
|
|
198
|
+
),
|
|
199
|
+
Action.GET: EndpointDefinition(
|
|
200
|
+
method='GET',
|
|
201
|
+
path='/crm/v3/objects/contacts/{contactId}',
|
|
202
|
+
action=Action.GET,
|
|
203
|
+
description='Get a single contact by ID',
|
|
204
|
+
query_params=[
|
|
205
|
+
'properties',
|
|
206
|
+
'propertiesWithHistory',
|
|
207
|
+
'associations',
|
|
208
|
+
'idProperty',
|
|
209
|
+
'archived',
|
|
210
|
+
],
|
|
211
|
+
query_params_schema={
|
|
212
|
+
'properties': {'type': 'string', 'required': False},
|
|
213
|
+
'propertiesWithHistory': {'type': 'string', 'required': False},
|
|
214
|
+
'associations': {'type': 'string', 'required': False},
|
|
215
|
+
'idProperty': {'type': 'string', 'required': False},
|
|
216
|
+
'archived': {'type': 'boolean', 'required': False},
|
|
217
|
+
},
|
|
218
|
+
path_params=['contactId'],
|
|
219
|
+
path_params_schema={
|
|
220
|
+
'contactId': {'type': 'string', 'required': True},
|
|
221
|
+
},
|
|
222
|
+
response_schema={
|
|
223
|
+
'type': 'object',
|
|
224
|
+
'description': 'HubSpot contact object',
|
|
225
|
+
'properties': {
|
|
226
|
+
'id': {'type': 'string', 'description': 'Unique contact identifier'},
|
|
227
|
+
'properties': {
|
|
228
|
+
'type': 'object',
|
|
229
|
+
'description': 'Contact properties',
|
|
230
|
+
'properties': {
|
|
231
|
+
'createdate': {
|
|
232
|
+
'type': ['string', 'null'],
|
|
233
|
+
},
|
|
234
|
+
'email': {
|
|
235
|
+
'type': ['string', 'null'],
|
|
236
|
+
},
|
|
237
|
+
'firstname': {
|
|
238
|
+
'type': ['string', 'null'],
|
|
239
|
+
},
|
|
240
|
+
'hs_object_id': {
|
|
241
|
+
'type': ['string', 'null'],
|
|
242
|
+
},
|
|
243
|
+
'lastmodifieddate': {
|
|
244
|
+
'type': ['string', 'null'],
|
|
245
|
+
},
|
|
246
|
+
'lastname': {
|
|
247
|
+
'type': ['string', 'null'],
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
'additionalProperties': True,
|
|
251
|
+
},
|
|
252
|
+
'createdAt': {
|
|
253
|
+
'type': 'string',
|
|
254
|
+
'format': 'date-time',
|
|
255
|
+
'description': 'Creation timestamp',
|
|
256
|
+
},
|
|
257
|
+
'updatedAt': {
|
|
258
|
+
'type': 'string',
|
|
259
|
+
'format': 'date-time',
|
|
260
|
+
'description': 'Last update timestamp',
|
|
261
|
+
},
|
|
262
|
+
'archived': {'type': 'boolean', 'description': 'Whether the contact is archived'},
|
|
263
|
+
'archivedAt': {
|
|
264
|
+
'type': ['string', 'null'],
|
|
265
|
+
'format': 'date-time',
|
|
266
|
+
'description': 'Timestamp when the contact was archived',
|
|
267
|
+
},
|
|
268
|
+
'propertiesWithHistory': {
|
|
269
|
+
'type': ['object', 'null'],
|
|
270
|
+
'description': 'Properties with historical values',
|
|
271
|
+
'additionalProperties': True,
|
|
272
|
+
},
|
|
273
|
+
'associations': {
|
|
274
|
+
'type': ['object', 'null'],
|
|
275
|
+
'description': 'Relationships with other CRM objects',
|
|
276
|
+
'additionalProperties': True,
|
|
277
|
+
},
|
|
278
|
+
'objectWriteTraceId': {
|
|
279
|
+
'type': ['string', 'null'],
|
|
280
|
+
'description': 'Trace identifier for write operations',
|
|
281
|
+
},
|
|
282
|
+
'url': {
|
|
283
|
+
'type': ['string', 'null'],
|
|
284
|
+
'description': 'URL to view contact in HubSpot',
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
'x-airbyte-entity-name': 'contacts',
|
|
288
|
+
},
|
|
289
|
+
),
|
|
290
|
+
Action.SEARCH: EndpointDefinition(
|
|
291
|
+
method='POST',
|
|
292
|
+
path='/crm/v3/objects/contacts/search',
|
|
293
|
+
action=Action.SEARCH,
|
|
294
|
+
description='Search for contacts by filtering on properties, searching through associations, and sorting results.',
|
|
295
|
+
body_fields=[
|
|
296
|
+
'filterGroups',
|
|
297
|
+
'properties',
|
|
298
|
+
'limit',
|
|
299
|
+
'after',
|
|
300
|
+
'sorts',
|
|
301
|
+
'query',
|
|
302
|
+
],
|
|
303
|
+
request_schema={
|
|
304
|
+
'type': 'object',
|
|
305
|
+
'properties': {
|
|
306
|
+
'filterGroups': {
|
|
307
|
+
'type': 'array',
|
|
308
|
+
'description': 'Up to 6 groups of filters defining additional query criteria.',
|
|
309
|
+
'required': True,
|
|
310
|
+
'items': {
|
|
311
|
+
'type': 'object',
|
|
312
|
+
'properties': {
|
|
313
|
+
'filters': {
|
|
314
|
+
'type': 'array',
|
|
315
|
+
'required': True,
|
|
316
|
+
'items': {
|
|
317
|
+
'type': 'object',
|
|
318
|
+
'properties': {
|
|
319
|
+
'operator': {
|
|
320
|
+
'type': 'string',
|
|
321
|
+
'enum': [
|
|
322
|
+
'BETWEEN',
|
|
323
|
+
'CONTAINS_TOKEN',
|
|
324
|
+
'EQ',
|
|
325
|
+
'GT',
|
|
326
|
+
'GTE',
|
|
327
|
+
'HAS_PROPERTY',
|
|
328
|
+
'IN',
|
|
329
|
+
'LT',
|
|
330
|
+
'LTE',
|
|
331
|
+
'NEQ',
|
|
332
|
+
'NOT_CONTAINS_TOKEN',
|
|
333
|
+
'NOT_HAS_PROPERTY',
|
|
334
|
+
'NOT_IN',
|
|
335
|
+
],
|
|
336
|
+
'required': True,
|
|
337
|
+
},
|
|
338
|
+
'propertyName': {
|
|
339
|
+
'type': 'string',
|
|
340
|
+
'description': 'The name of the property to apply the filter on.',
|
|
341
|
+
'required': True,
|
|
342
|
+
},
|
|
343
|
+
'value': {'type': 'string', 'description': 'The value to match against the property.'},
|
|
344
|
+
'values': {
|
|
345
|
+
'type': 'array',
|
|
346
|
+
'description': 'The values to match against the property.',
|
|
347
|
+
'items': {'type': 'string'},
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
'properties': {
|
|
356
|
+
'type': 'array',
|
|
357
|
+
'description': 'A list of property names to include in the response.',
|
|
358
|
+
'required': True,
|
|
359
|
+
'items': {'type': 'string'},
|
|
360
|
+
},
|
|
361
|
+
'limit': {
|
|
362
|
+
'type': 'integer',
|
|
363
|
+
'description': 'Maximum number of results to return',
|
|
364
|
+
'required': True,
|
|
365
|
+
'minimum': 1,
|
|
366
|
+
'maximum': 200,
|
|
367
|
+
'default': 25,
|
|
368
|
+
},
|
|
369
|
+
'after': {'type': 'string', 'description': 'A paging cursor token for retrieving subsequent pages.'},
|
|
370
|
+
'sorts': {
|
|
371
|
+
'type': 'array',
|
|
372
|
+
'description': 'Sort criteria',
|
|
373
|
+
'required': True,
|
|
374
|
+
'items': {
|
|
375
|
+
'type': 'object',
|
|
376
|
+
'properties': {
|
|
377
|
+
'propertyName': {'type': 'string'},
|
|
378
|
+
'direction': {
|
|
379
|
+
'type': 'string',
|
|
380
|
+
'enum': ['ASCENDING', 'DESCENDING'],
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
'query': {'type': 'string', 'description': 'The search query string, up to 3000 characters.'},
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
response_schema={
|
|
389
|
+
'type': 'object',
|
|
390
|
+
'description': 'Paginated list of contacts',
|
|
391
|
+
'properties': {
|
|
392
|
+
'results': {
|
|
393
|
+
'type': 'array',
|
|
394
|
+
'items': {
|
|
395
|
+
'type': 'object',
|
|
396
|
+
'description': 'HubSpot contact object',
|
|
397
|
+
'properties': {
|
|
398
|
+
'id': {'type': 'string', 'description': 'Unique contact identifier'},
|
|
399
|
+
'properties': {
|
|
400
|
+
'type': 'object',
|
|
401
|
+
'description': 'Contact properties',
|
|
402
|
+
'properties': {
|
|
403
|
+
'createdate': {
|
|
404
|
+
'type': ['string', 'null'],
|
|
405
|
+
},
|
|
406
|
+
'email': {
|
|
407
|
+
'type': ['string', 'null'],
|
|
408
|
+
},
|
|
409
|
+
'firstname': {
|
|
410
|
+
'type': ['string', 'null'],
|
|
411
|
+
},
|
|
412
|
+
'hs_object_id': {
|
|
413
|
+
'type': ['string', 'null'],
|
|
414
|
+
},
|
|
415
|
+
'lastmodifieddate': {
|
|
416
|
+
'type': ['string', 'null'],
|
|
417
|
+
},
|
|
418
|
+
'lastname': {
|
|
419
|
+
'type': ['string', 'null'],
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
'additionalProperties': True,
|
|
423
|
+
},
|
|
424
|
+
'createdAt': {
|
|
425
|
+
'type': 'string',
|
|
426
|
+
'format': 'date-time',
|
|
427
|
+
'description': 'Creation timestamp',
|
|
428
|
+
},
|
|
429
|
+
'updatedAt': {
|
|
430
|
+
'type': 'string',
|
|
431
|
+
'format': 'date-time',
|
|
432
|
+
'description': 'Last update timestamp',
|
|
433
|
+
},
|
|
434
|
+
'archived': {'type': 'boolean', 'description': 'Whether the contact is archived'},
|
|
435
|
+
'archivedAt': {
|
|
436
|
+
'type': ['string', 'null'],
|
|
437
|
+
'format': 'date-time',
|
|
438
|
+
'description': 'Timestamp when the contact was archived',
|
|
439
|
+
},
|
|
440
|
+
'propertiesWithHistory': {
|
|
441
|
+
'type': ['object', 'null'],
|
|
442
|
+
'description': 'Properties with historical values',
|
|
443
|
+
'additionalProperties': True,
|
|
444
|
+
},
|
|
445
|
+
'associations': {
|
|
446
|
+
'type': ['object', 'null'],
|
|
447
|
+
'description': 'Relationships with other CRM objects',
|
|
448
|
+
'additionalProperties': True,
|
|
449
|
+
},
|
|
450
|
+
'objectWriteTraceId': {
|
|
451
|
+
'type': ['string', 'null'],
|
|
452
|
+
'description': 'Trace identifier for write operations',
|
|
453
|
+
},
|
|
454
|
+
'url': {
|
|
455
|
+
'type': ['string', 'null'],
|
|
456
|
+
'description': 'URL to view contact in HubSpot',
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
|
+
'x-airbyte-entity-name': 'contacts',
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
'paging': {
|
|
463
|
+
'type': 'object',
|
|
464
|
+
'description': 'Pagination information',
|
|
465
|
+
'properties': {
|
|
466
|
+
'next': {
|
|
467
|
+
'type': 'object',
|
|
468
|
+
'properties': {
|
|
469
|
+
'after': {'type': 'string', 'description': 'Cursor for next page'},
|
|
470
|
+
'link': {'type': 'string', 'description': 'URL for next page'},
|
|
471
|
+
},
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
'total': {'type': 'integer', 'description': 'Total number of results (search only)'},
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
record_extractor='$.results',
|
|
479
|
+
meta_extractor={
|
|
480
|
+
'total': '$.total',
|
|
481
|
+
'next_cursor': '$.paging.next.after',
|
|
482
|
+
'next_link': '$.paging.next.link',
|
|
483
|
+
},
|
|
484
|
+
),
|
|
485
|
+
},
|
|
486
|
+
entity_schema={
|
|
487
|
+
'type': 'object',
|
|
488
|
+
'description': 'HubSpot contact object',
|
|
489
|
+
'properties': {
|
|
490
|
+
'id': {'type': 'string', 'description': 'Unique contact identifier'},
|
|
491
|
+
'properties': {
|
|
492
|
+
'type': 'object',
|
|
493
|
+
'description': 'Contact properties',
|
|
494
|
+
'properties': {
|
|
495
|
+
'createdate': {
|
|
496
|
+
'type': ['string', 'null'],
|
|
497
|
+
},
|
|
498
|
+
'email': {
|
|
499
|
+
'type': ['string', 'null'],
|
|
500
|
+
},
|
|
501
|
+
'firstname': {
|
|
502
|
+
'type': ['string', 'null'],
|
|
503
|
+
},
|
|
504
|
+
'hs_object_id': {
|
|
505
|
+
'type': ['string', 'null'],
|
|
506
|
+
},
|
|
507
|
+
'lastmodifieddate': {
|
|
508
|
+
'type': ['string', 'null'],
|
|
509
|
+
},
|
|
510
|
+
'lastname': {
|
|
511
|
+
'type': ['string', 'null'],
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
'additionalProperties': True,
|
|
515
|
+
},
|
|
516
|
+
'createdAt': {
|
|
517
|
+
'type': 'string',
|
|
518
|
+
'format': 'date-time',
|
|
519
|
+
'description': 'Creation timestamp',
|
|
520
|
+
},
|
|
521
|
+
'updatedAt': {
|
|
522
|
+
'type': 'string',
|
|
523
|
+
'format': 'date-time',
|
|
524
|
+
'description': 'Last update timestamp',
|
|
525
|
+
},
|
|
526
|
+
'archived': {'type': 'boolean', 'description': 'Whether the contact is archived'},
|
|
527
|
+
'archivedAt': {
|
|
528
|
+
'type': ['string', 'null'],
|
|
529
|
+
'format': 'date-time',
|
|
530
|
+
'description': 'Timestamp when the contact was archived',
|
|
531
|
+
},
|
|
532
|
+
'propertiesWithHistory': {
|
|
533
|
+
'type': ['object', 'null'],
|
|
534
|
+
'description': 'Properties with historical values',
|
|
535
|
+
'additionalProperties': True,
|
|
536
|
+
},
|
|
537
|
+
'associations': {
|
|
538
|
+
'type': ['object', 'null'],
|
|
539
|
+
'description': 'Relationships with other CRM objects',
|
|
540
|
+
'additionalProperties': True,
|
|
541
|
+
},
|
|
542
|
+
'objectWriteTraceId': {
|
|
543
|
+
'type': ['string', 'null'],
|
|
544
|
+
'description': 'Trace identifier for write operations',
|
|
545
|
+
},
|
|
546
|
+
'url': {
|
|
547
|
+
'type': ['string', 'null'],
|
|
548
|
+
'description': 'URL to view contact in HubSpot',
|
|
549
|
+
},
|
|
550
|
+
},
|
|
551
|
+
'x-airbyte-entity-name': 'contacts',
|
|
552
|
+
},
|
|
553
|
+
),
|
|
554
|
+
EntityDefinition(
|
|
555
|
+
name='companies',
|
|
556
|
+
actions=[Action.LIST, Action.GET, Action.SEARCH],
|
|
557
|
+
endpoints={
|
|
558
|
+
Action.LIST: EndpointDefinition(
|
|
559
|
+
method='GET',
|
|
560
|
+
path='/crm/v3/objects/companies',
|
|
561
|
+
action=Action.LIST,
|
|
562
|
+
description='Retrieve all companies, using query parameters to control the information that gets returned.',
|
|
563
|
+
query_params=[
|
|
564
|
+
'limit',
|
|
565
|
+
'after',
|
|
566
|
+
'associations',
|
|
567
|
+
'properties',
|
|
568
|
+
'propertiesWithHistory',
|
|
569
|
+
'archived',
|
|
570
|
+
],
|
|
571
|
+
query_params_schema={
|
|
572
|
+
'limit': {
|
|
573
|
+
'type': 'integer',
|
|
574
|
+
'required': False,
|
|
575
|
+
'default': 25,
|
|
576
|
+
},
|
|
577
|
+
'after': {'type': 'string', 'required': False},
|
|
578
|
+
'associations': {'type': 'string', 'required': False},
|
|
579
|
+
'properties': {'type': 'string', 'required': False},
|
|
580
|
+
'propertiesWithHistory': {'type': 'string', 'required': False},
|
|
581
|
+
'archived': {'type': 'boolean', 'required': False},
|
|
582
|
+
},
|
|
583
|
+
response_schema={
|
|
584
|
+
'type': 'object',
|
|
585
|
+
'description': 'Paginated list of companies',
|
|
586
|
+
'properties': {
|
|
587
|
+
'results': {
|
|
588
|
+
'type': 'array',
|
|
589
|
+
'items': {
|
|
590
|
+
'type': 'object',
|
|
591
|
+
'description': 'HubSpot company object',
|
|
592
|
+
'properties': {
|
|
593
|
+
'id': {'type': 'string', 'description': 'Unique company identifier'},
|
|
594
|
+
'properties': {
|
|
595
|
+
'type': 'object',
|
|
596
|
+
'description': 'Company properties',
|
|
597
|
+
'properties': {
|
|
598
|
+
'createdate': {
|
|
599
|
+
'type': ['string', 'null'],
|
|
600
|
+
},
|
|
601
|
+
'domain': {
|
|
602
|
+
'type': ['string', 'null'],
|
|
603
|
+
},
|
|
604
|
+
'hs_lastmodifieddate': {
|
|
605
|
+
'type': ['string', 'null'],
|
|
606
|
+
},
|
|
607
|
+
'hs_object_id': {
|
|
608
|
+
'type': ['string', 'null'],
|
|
609
|
+
},
|
|
610
|
+
'name': {
|
|
611
|
+
'type': ['string', 'null'],
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
'additionalProperties': True,
|
|
615
|
+
},
|
|
616
|
+
'createdAt': {
|
|
617
|
+
'type': 'string',
|
|
618
|
+
'format': 'date-time',
|
|
619
|
+
'description': 'Creation timestamp',
|
|
620
|
+
},
|
|
621
|
+
'updatedAt': {
|
|
622
|
+
'type': 'string',
|
|
623
|
+
'format': 'date-time',
|
|
624
|
+
'description': 'Last update timestamp',
|
|
625
|
+
},
|
|
626
|
+
'archived': {'type': 'boolean', 'description': 'Whether the company is archived'},
|
|
627
|
+
'archivedAt': {
|
|
628
|
+
'type': ['string', 'null'],
|
|
629
|
+
'format': 'date-time',
|
|
630
|
+
'description': 'Timestamp when the company was archived',
|
|
631
|
+
},
|
|
632
|
+
'propertiesWithHistory': {
|
|
633
|
+
'type': ['object', 'null'],
|
|
634
|
+
'description': 'Properties with historical values',
|
|
635
|
+
'additionalProperties': True,
|
|
636
|
+
},
|
|
637
|
+
'associations': {
|
|
638
|
+
'type': ['object', 'null'],
|
|
639
|
+
'description': 'Relationships with other CRM objects',
|
|
640
|
+
'additionalProperties': True,
|
|
641
|
+
},
|
|
642
|
+
'objectWriteTraceId': {
|
|
643
|
+
'type': ['string', 'null'],
|
|
644
|
+
'description': 'Trace identifier for write operations',
|
|
645
|
+
},
|
|
646
|
+
'url': {
|
|
647
|
+
'type': ['string', 'null'],
|
|
648
|
+
'description': 'URL to view company in HubSpot',
|
|
649
|
+
},
|
|
650
|
+
},
|
|
651
|
+
'x-airbyte-entity-name': 'companies',
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
'paging': {
|
|
655
|
+
'type': 'object',
|
|
656
|
+
'description': 'Pagination information',
|
|
657
|
+
'properties': {
|
|
658
|
+
'next': {
|
|
659
|
+
'type': 'object',
|
|
660
|
+
'properties': {
|
|
661
|
+
'after': {'type': 'string', 'description': 'Cursor for next page'},
|
|
662
|
+
'link': {'type': 'string', 'description': 'URL for next page'},
|
|
663
|
+
},
|
|
664
|
+
},
|
|
665
|
+
},
|
|
666
|
+
},
|
|
667
|
+
'total': {'type': 'integer', 'description': 'Total number of results (search only)'},
|
|
668
|
+
},
|
|
669
|
+
},
|
|
670
|
+
record_extractor='$.results',
|
|
671
|
+
meta_extractor={'next_cursor': '$.paging.next.after', 'next_link': '$.paging.next.link'},
|
|
672
|
+
),
|
|
673
|
+
Action.GET: EndpointDefinition(
|
|
674
|
+
method='GET',
|
|
675
|
+
path='/crm/v3/objects/companies/{companyId}',
|
|
676
|
+
action=Action.GET,
|
|
677
|
+
description='Get a single company by ID',
|
|
678
|
+
query_params=[
|
|
679
|
+
'properties',
|
|
680
|
+
'propertiesWithHistory',
|
|
681
|
+
'associations',
|
|
682
|
+
'idProperty',
|
|
683
|
+
'archived',
|
|
684
|
+
],
|
|
685
|
+
query_params_schema={
|
|
686
|
+
'properties': {'type': 'string', 'required': False},
|
|
687
|
+
'propertiesWithHistory': {'type': 'string', 'required': False},
|
|
688
|
+
'associations': {'type': 'string', 'required': False},
|
|
689
|
+
'idProperty': {'type': 'string', 'required': False},
|
|
690
|
+
'archived': {'type': 'boolean', 'required': False},
|
|
691
|
+
},
|
|
692
|
+
path_params=['companyId'],
|
|
693
|
+
path_params_schema={
|
|
694
|
+
'companyId': {'type': 'string', 'required': True},
|
|
695
|
+
},
|
|
696
|
+
response_schema={
|
|
697
|
+
'type': 'object',
|
|
698
|
+
'description': 'HubSpot company object',
|
|
699
|
+
'properties': {
|
|
700
|
+
'id': {'type': 'string', 'description': 'Unique company identifier'},
|
|
701
|
+
'properties': {
|
|
702
|
+
'type': 'object',
|
|
703
|
+
'description': 'Company properties',
|
|
704
|
+
'properties': {
|
|
705
|
+
'createdate': {
|
|
706
|
+
'type': ['string', 'null'],
|
|
707
|
+
},
|
|
708
|
+
'domain': {
|
|
709
|
+
'type': ['string', 'null'],
|
|
710
|
+
},
|
|
711
|
+
'hs_lastmodifieddate': {
|
|
712
|
+
'type': ['string', 'null'],
|
|
713
|
+
},
|
|
714
|
+
'hs_object_id': {
|
|
715
|
+
'type': ['string', 'null'],
|
|
716
|
+
},
|
|
717
|
+
'name': {
|
|
718
|
+
'type': ['string', 'null'],
|
|
719
|
+
},
|
|
720
|
+
},
|
|
721
|
+
'additionalProperties': True,
|
|
722
|
+
},
|
|
723
|
+
'createdAt': {
|
|
724
|
+
'type': 'string',
|
|
725
|
+
'format': 'date-time',
|
|
726
|
+
'description': 'Creation timestamp',
|
|
727
|
+
},
|
|
728
|
+
'updatedAt': {
|
|
729
|
+
'type': 'string',
|
|
730
|
+
'format': 'date-time',
|
|
731
|
+
'description': 'Last update timestamp',
|
|
732
|
+
},
|
|
733
|
+
'archived': {'type': 'boolean', 'description': 'Whether the company is archived'},
|
|
734
|
+
'archivedAt': {
|
|
735
|
+
'type': ['string', 'null'],
|
|
736
|
+
'format': 'date-time',
|
|
737
|
+
'description': 'Timestamp when the company was archived',
|
|
738
|
+
},
|
|
739
|
+
'propertiesWithHistory': {
|
|
740
|
+
'type': ['object', 'null'],
|
|
741
|
+
'description': 'Properties with historical values',
|
|
742
|
+
'additionalProperties': True,
|
|
743
|
+
},
|
|
744
|
+
'associations': {
|
|
745
|
+
'type': ['object', 'null'],
|
|
746
|
+
'description': 'Relationships with other CRM objects',
|
|
747
|
+
'additionalProperties': True,
|
|
748
|
+
},
|
|
749
|
+
'objectWriteTraceId': {
|
|
750
|
+
'type': ['string', 'null'],
|
|
751
|
+
'description': 'Trace identifier for write operations',
|
|
752
|
+
},
|
|
753
|
+
'url': {
|
|
754
|
+
'type': ['string', 'null'],
|
|
755
|
+
'description': 'URL to view company in HubSpot',
|
|
756
|
+
},
|
|
757
|
+
},
|
|
758
|
+
'x-airbyte-entity-name': 'companies',
|
|
759
|
+
},
|
|
760
|
+
),
|
|
761
|
+
Action.SEARCH: EndpointDefinition(
|
|
762
|
+
method='POST',
|
|
763
|
+
path='/crm/v3/objects/companies/search',
|
|
764
|
+
action=Action.SEARCH,
|
|
765
|
+
description='Search for companies by filtering on properties, searching through associations, and sorting results.',
|
|
766
|
+
body_fields=[
|
|
767
|
+
'filterGroups',
|
|
768
|
+
'properties',
|
|
769
|
+
'limit',
|
|
770
|
+
'after',
|
|
771
|
+
'sorts',
|
|
772
|
+
'query',
|
|
773
|
+
],
|
|
774
|
+
request_schema={
|
|
775
|
+
'type': 'object',
|
|
776
|
+
'properties': {
|
|
777
|
+
'filterGroups': {
|
|
778
|
+
'type': 'array',
|
|
779
|
+
'description': 'Up to 6 groups of filters defining additional query criteria.',
|
|
780
|
+
'required': True,
|
|
781
|
+
'items': {
|
|
782
|
+
'type': 'object',
|
|
783
|
+
'properties': {
|
|
784
|
+
'filters': {
|
|
785
|
+
'type': 'array',
|
|
786
|
+
'required': True,
|
|
787
|
+
'items': {
|
|
788
|
+
'type': 'object',
|
|
789
|
+
'properties': {
|
|
790
|
+
'operator': {
|
|
791
|
+
'type': 'string',
|
|
792
|
+
'enum': [
|
|
793
|
+
'BETWEEN',
|
|
794
|
+
'CONTAINS_TOKEN',
|
|
795
|
+
'EQ',
|
|
796
|
+
'GT',
|
|
797
|
+
'GTE',
|
|
798
|
+
'HAS_PROPERTY',
|
|
799
|
+
'IN',
|
|
800
|
+
'LT',
|
|
801
|
+
'LTE',
|
|
802
|
+
'NEQ',
|
|
803
|
+
'NOT_CONTAINS_TOKEN',
|
|
804
|
+
'NOT_HAS_PROPERTY',
|
|
805
|
+
'NOT_IN',
|
|
806
|
+
],
|
|
807
|
+
'required': True,
|
|
808
|
+
},
|
|
809
|
+
'propertyName': {
|
|
810
|
+
'type': 'string',
|
|
811
|
+
'description': 'The name of the property to apply the filter on.',
|
|
812
|
+
'required': True,
|
|
813
|
+
},
|
|
814
|
+
'value': {'type': 'string', 'description': 'The value to match against the property.'},
|
|
815
|
+
'values': {
|
|
816
|
+
'type': 'array',
|
|
817
|
+
'description': 'The values to match against the property.',
|
|
818
|
+
'items': {'type': 'string'},
|
|
819
|
+
},
|
|
820
|
+
},
|
|
821
|
+
},
|
|
822
|
+
},
|
|
823
|
+
},
|
|
824
|
+
},
|
|
825
|
+
},
|
|
826
|
+
'properties': {
|
|
827
|
+
'type': 'array',
|
|
828
|
+
'description': 'A list of property names to include in the response.',
|
|
829
|
+
'required': True,
|
|
830
|
+
'items': {'type': 'string'},
|
|
831
|
+
},
|
|
832
|
+
'limit': {
|
|
833
|
+
'type': 'integer',
|
|
834
|
+
'description': 'Maximum number of results to return',
|
|
835
|
+
'required': True,
|
|
836
|
+
'minimum': 1,
|
|
837
|
+
'maximum': 200,
|
|
838
|
+
'default': 25,
|
|
839
|
+
},
|
|
840
|
+
'after': {'type': 'string', 'description': 'A paging cursor token for retrieving subsequent pages.'},
|
|
841
|
+
'sorts': {
|
|
842
|
+
'type': 'array',
|
|
843
|
+
'description': 'Sort criteria',
|
|
844
|
+
'required': True,
|
|
845
|
+
'items': {
|
|
846
|
+
'type': 'object',
|
|
847
|
+
'properties': {
|
|
848
|
+
'propertyName': {'type': 'string'},
|
|
849
|
+
'direction': {
|
|
850
|
+
'type': 'string',
|
|
851
|
+
'enum': ['ASCENDING', 'DESCENDING'],
|
|
852
|
+
},
|
|
853
|
+
},
|
|
854
|
+
},
|
|
855
|
+
},
|
|
856
|
+
'query': {'type': 'string', 'description': 'The search query string, up to 3000 characters.'},
|
|
857
|
+
},
|
|
858
|
+
},
|
|
859
|
+
response_schema={
|
|
860
|
+
'type': 'object',
|
|
861
|
+
'description': 'Paginated list of companies',
|
|
862
|
+
'properties': {
|
|
863
|
+
'results': {
|
|
864
|
+
'type': 'array',
|
|
865
|
+
'items': {
|
|
866
|
+
'type': 'object',
|
|
867
|
+
'description': 'HubSpot company object',
|
|
868
|
+
'properties': {
|
|
869
|
+
'id': {'type': 'string', 'description': 'Unique company identifier'},
|
|
870
|
+
'properties': {
|
|
871
|
+
'type': 'object',
|
|
872
|
+
'description': 'Company properties',
|
|
873
|
+
'properties': {
|
|
874
|
+
'createdate': {
|
|
875
|
+
'type': ['string', 'null'],
|
|
876
|
+
},
|
|
877
|
+
'domain': {
|
|
878
|
+
'type': ['string', 'null'],
|
|
879
|
+
},
|
|
880
|
+
'hs_lastmodifieddate': {
|
|
881
|
+
'type': ['string', 'null'],
|
|
882
|
+
},
|
|
883
|
+
'hs_object_id': {
|
|
884
|
+
'type': ['string', 'null'],
|
|
885
|
+
},
|
|
886
|
+
'name': {
|
|
887
|
+
'type': ['string', 'null'],
|
|
888
|
+
},
|
|
889
|
+
},
|
|
890
|
+
'additionalProperties': True,
|
|
891
|
+
},
|
|
892
|
+
'createdAt': {
|
|
893
|
+
'type': 'string',
|
|
894
|
+
'format': 'date-time',
|
|
895
|
+
'description': 'Creation timestamp',
|
|
896
|
+
},
|
|
897
|
+
'updatedAt': {
|
|
898
|
+
'type': 'string',
|
|
899
|
+
'format': 'date-time',
|
|
900
|
+
'description': 'Last update timestamp',
|
|
901
|
+
},
|
|
902
|
+
'archived': {'type': 'boolean', 'description': 'Whether the company is archived'},
|
|
903
|
+
'archivedAt': {
|
|
904
|
+
'type': ['string', 'null'],
|
|
905
|
+
'format': 'date-time',
|
|
906
|
+
'description': 'Timestamp when the company was archived',
|
|
907
|
+
},
|
|
908
|
+
'propertiesWithHistory': {
|
|
909
|
+
'type': ['object', 'null'],
|
|
910
|
+
'description': 'Properties with historical values',
|
|
911
|
+
'additionalProperties': True,
|
|
912
|
+
},
|
|
913
|
+
'associations': {
|
|
914
|
+
'type': ['object', 'null'],
|
|
915
|
+
'description': 'Relationships with other CRM objects',
|
|
916
|
+
'additionalProperties': True,
|
|
917
|
+
},
|
|
918
|
+
'objectWriteTraceId': {
|
|
919
|
+
'type': ['string', 'null'],
|
|
920
|
+
'description': 'Trace identifier for write operations',
|
|
921
|
+
},
|
|
922
|
+
'url': {
|
|
923
|
+
'type': ['string', 'null'],
|
|
924
|
+
'description': 'URL to view company in HubSpot',
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
'x-airbyte-entity-name': 'companies',
|
|
928
|
+
},
|
|
929
|
+
},
|
|
930
|
+
'paging': {
|
|
931
|
+
'type': 'object',
|
|
932
|
+
'description': 'Pagination information',
|
|
933
|
+
'properties': {
|
|
934
|
+
'next': {
|
|
935
|
+
'type': 'object',
|
|
936
|
+
'properties': {
|
|
937
|
+
'after': {'type': 'string', 'description': 'Cursor for next page'},
|
|
938
|
+
'link': {'type': 'string', 'description': 'URL for next page'},
|
|
939
|
+
},
|
|
940
|
+
},
|
|
941
|
+
},
|
|
942
|
+
},
|
|
943
|
+
'total': {'type': 'integer', 'description': 'Total number of results (search only)'},
|
|
944
|
+
},
|
|
945
|
+
},
|
|
946
|
+
record_extractor='$.results',
|
|
947
|
+
meta_extractor={
|
|
948
|
+
'total': '$.total',
|
|
949
|
+
'next_cursor': '$.paging.next.after',
|
|
950
|
+
'next_link': '$.paging.next.link',
|
|
951
|
+
},
|
|
952
|
+
),
|
|
953
|
+
},
|
|
954
|
+
entity_schema={
|
|
955
|
+
'type': 'object',
|
|
956
|
+
'description': 'HubSpot company object',
|
|
957
|
+
'properties': {
|
|
958
|
+
'id': {'type': 'string', 'description': 'Unique company identifier'},
|
|
959
|
+
'properties': {
|
|
960
|
+
'type': 'object',
|
|
961
|
+
'description': 'Company properties',
|
|
962
|
+
'properties': {
|
|
963
|
+
'createdate': {
|
|
964
|
+
'type': ['string', 'null'],
|
|
965
|
+
},
|
|
966
|
+
'domain': {
|
|
967
|
+
'type': ['string', 'null'],
|
|
968
|
+
},
|
|
969
|
+
'hs_lastmodifieddate': {
|
|
970
|
+
'type': ['string', 'null'],
|
|
971
|
+
},
|
|
972
|
+
'hs_object_id': {
|
|
973
|
+
'type': ['string', 'null'],
|
|
974
|
+
},
|
|
975
|
+
'name': {
|
|
976
|
+
'type': ['string', 'null'],
|
|
977
|
+
},
|
|
978
|
+
},
|
|
979
|
+
'additionalProperties': True,
|
|
980
|
+
},
|
|
981
|
+
'createdAt': {
|
|
982
|
+
'type': 'string',
|
|
983
|
+
'format': 'date-time',
|
|
984
|
+
'description': 'Creation timestamp',
|
|
985
|
+
},
|
|
986
|
+
'updatedAt': {
|
|
987
|
+
'type': 'string',
|
|
988
|
+
'format': 'date-time',
|
|
989
|
+
'description': 'Last update timestamp',
|
|
990
|
+
},
|
|
991
|
+
'archived': {'type': 'boolean', 'description': 'Whether the company is archived'},
|
|
992
|
+
'archivedAt': {
|
|
993
|
+
'type': ['string', 'null'],
|
|
994
|
+
'format': 'date-time',
|
|
995
|
+
'description': 'Timestamp when the company was archived',
|
|
996
|
+
},
|
|
997
|
+
'propertiesWithHistory': {
|
|
998
|
+
'type': ['object', 'null'],
|
|
999
|
+
'description': 'Properties with historical values',
|
|
1000
|
+
'additionalProperties': True,
|
|
1001
|
+
},
|
|
1002
|
+
'associations': {
|
|
1003
|
+
'type': ['object', 'null'],
|
|
1004
|
+
'description': 'Relationships with other CRM objects',
|
|
1005
|
+
'additionalProperties': True,
|
|
1006
|
+
},
|
|
1007
|
+
'objectWriteTraceId': {
|
|
1008
|
+
'type': ['string', 'null'],
|
|
1009
|
+
'description': 'Trace identifier for write operations',
|
|
1010
|
+
},
|
|
1011
|
+
'url': {
|
|
1012
|
+
'type': ['string', 'null'],
|
|
1013
|
+
'description': 'URL to view company in HubSpot',
|
|
1014
|
+
},
|
|
1015
|
+
},
|
|
1016
|
+
'x-airbyte-entity-name': 'companies',
|
|
1017
|
+
},
|
|
1018
|
+
),
|
|
1019
|
+
EntityDefinition(
|
|
1020
|
+
name='deals',
|
|
1021
|
+
actions=[Action.LIST, Action.GET, Action.SEARCH],
|
|
1022
|
+
endpoints={
|
|
1023
|
+
Action.LIST: EndpointDefinition(
|
|
1024
|
+
method='GET',
|
|
1025
|
+
path='/crm/v3/objects/deals',
|
|
1026
|
+
action=Action.LIST,
|
|
1027
|
+
description='Returns a paginated list of deals',
|
|
1028
|
+
query_params=[
|
|
1029
|
+
'limit',
|
|
1030
|
+
'after',
|
|
1031
|
+
'associations',
|
|
1032
|
+
'properties',
|
|
1033
|
+
'propertiesWithHistory',
|
|
1034
|
+
'archived',
|
|
1035
|
+
],
|
|
1036
|
+
query_params_schema={
|
|
1037
|
+
'limit': {
|
|
1038
|
+
'type': 'integer',
|
|
1039
|
+
'required': False,
|
|
1040
|
+
'default': 25,
|
|
1041
|
+
},
|
|
1042
|
+
'after': {'type': 'string', 'required': False},
|
|
1043
|
+
'associations': {'type': 'string', 'required': False},
|
|
1044
|
+
'properties': {'type': 'string', 'required': False},
|
|
1045
|
+
'propertiesWithHistory': {'type': 'string', 'required': False},
|
|
1046
|
+
'archived': {'type': 'boolean', 'required': False},
|
|
1047
|
+
},
|
|
1048
|
+
response_schema={
|
|
1049
|
+
'type': 'object',
|
|
1050
|
+
'description': 'Paginated list of deals',
|
|
1051
|
+
'properties': {
|
|
1052
|
+
'results': {
|
|
1053
|
+
'type': 'array',
|
|
1054
|
+
'items': {
|
|
1055
|
+
'type': 'object',
|
|
1056
|
+
'description': 'HubSpot deal object',
|
|
1057
|
+
'properties': {
|
|
1058
|
+
'id': {'type': 'string', 'description': 'Unique deal identifier'},
|
|
1059
|
+
'properties': {
|
|
1060
|
+
'type': 'object',
|
|
1061
|
+
'description': 'Deal properties',
|
|
1062
|
+
'properties': {
|
|
1063
|
+
'amount': {
|
|
1064
|
+
'type': ['string', 'null'],
|
|
1065
|
+
},
|
|
1066
|
+
'closedate': {
|
|
1067
|
+
'type': ['string', 'null'],
|
|
1068
|
+
},
|
|
1069
|
+
'createdate': {
|
|
1070
|
+
'type': ['string', 'null'],
|
|
1071
|
+
},
|
|
1072
|
+
'dealname': {
|
|
1073
|
+
'type': ['string', 'null'],
|
|
1074
|
+
},
|
|
1075
|
+
'dealstage': {
|
|
1076
|
+
'type': ['string', 'null'],
|
|
1077
|
+
},
|
|
1078
|
+
'hs_lastmodifieddate': {
|
|
1079
|
+
'type': ['string', 'null'],
|
|
1080
|
+
},
|
|
1081
|
+
'hs_object_id': {
|
|
1082
|
+
'type': ['string', 'null'],
|
|
1083
|
+
},
|
|
1084
|
+
'pipeline': {
|
|
1085
|
+
'type': ['string', 'null'],
|
|
1086
|
+
},
|
|
1087
|
+
},
|
|
1088
|
+
'additionalProperties': True,
|
|
1089
|
+
},
|
|
1090
|
+
'createdAt': {
|
|
1091
|
+
'type': 'string',
|
|
1092
|
+
'format': 'date-time',
|
|
1093
|
+
'description': 'Creation timestamp',
|
|
1094
|
+
},
|
|
1095
|
+
'updatedAt': {
|
|
1096
|
+
'type': 'string',
|
|
1097
|
+
'format': 'date-time',
|
|
1098
|
+
'description': 'Last update timestamp',
|
|
1099
|
+
},
|
|
1100
|
+
'archived': {'type': 'boolean', 'description': 'Whether the deal is archived'},
|
|
1101
|
+
'archivedAt': {
|
|
1102
|
+
'type': ['string', 'null'],
|
|
1103
|
+
'format': 'date-time',
|
|
1104
|
+
'description': 'Timestamp when the deal was archived',
|
|
1105
|
+
},
|
|
1106
|
+
'propertiesWithHistory': {
|
|
1107
|
+
'type': ['object', 'null'],
|
|
1108
|
+
'description': 'Properties with historical values',
|
|
1109
|
+
'additionalProperties': True,
|
|
1110
|
+
},
|
|
1111
|
+
'associations': {
|
|
1112
|
+
'type': ['object', 'null'],
|
|
1113
|
+
'description': 'Relationships with other CRM objects',
|
|
1114
|
+
'additionalProperties': True,
|
|
1115
|
+
},
|
|
1116
|
+
'objectWriteTraceId': {
|
|
1117
|
+
'type': ['string', 'null'],
|
|
1118
|
+
'description': 'Trace identifier for write operations',
|
|
1119
|
+
},
|
|
1120
|
+
'url': {
|
|
1121
|
+
'type': ['string', 'null'],
|
|
1122
|
+
'description': 'URL to view deal in HubSpot',
|
|
1123
|
+
},
|
|
1124
|
+
},
|
|
1125
|
+
'x-airbyte-entity-name': 'deals',
|
|
1126
|
+
},
|
|
1127
|
+
},
|
|
1128
|
+
'paging': {
|
|
1129
|
+
'type': 'object',
|
|
1130
|
+
'description': 'Pagination information',
|
|
1131
|
+
'properties': {
|
|
1132
|
+
'next': {
|
|
1133
|
+
'type': 'object',
|
|
1134
|
+
'properties': {
|
|
1135
|
+
'after': {'type': 'string', 'description': 'Cursor for next page'},
|
|
1136
|
+
'link': {'type': 'string', 'description': 'URL for next page'},
|
|
1137
|
+
},
|
|
1138
|
+
},
|
|
1139
|
+
},
|
|
1140
|
+
},
|
|
1141
|
+
'total': {'type': 'integer', 'description': 'Total number of results (search only)'},
|
|
1142
|
+
},
|
|
1143
|
+
},
|
|
1144
|
+
record_extractor='$.results',
|
|
1145
|
+
meta_extractor={'next_cursor': '$.paging.next.after', 'next_link': '$.paging.next.link'},
|
|
1146
|
+
),
|
|
1147
|
+
Action.GET: EndpointDefinition(
|
|
1148
|
+
method='GET',
|
|
1149
|
+
path='/crm/v3/objects/deals/{dealId}',
|
|
1150
|
+
action=Action.GET,
|
|
1151
|
+
description='Get a single deal by ID',
|
|
1152
|
+
query_params=[
|
|
1153
|
+
'properties',
|
|
1154
|
+
'propertiesWithHistory',
|
|
1155
|
+
'associations',
|
|
1156
|
+
'idProperty',
|
|
1157
|
+
'archived',
|
|
1158
|
+
],
|
|
1159
|
+
query_params_schema={
|
|
1160
|
+
'properties': {'type': 'string', 'required': False},
|
|
1161
|
+
'propertiesWithHistory': {'type': 'string', 'required': False},
|
|
1162
|
+
'associations': {'type': 'string', 'required': False},
|
|
1163
|
+
'idProperty': {'type': 'string', 'required': False},
|
|
1164
|
+
'archived': {'type': 'boolean', 'required': False},
|
|
1165
|
+
},
|
|
1166
|
+
path_params=['dealId'],
|
|
1167
|
+
path_params_schema={
|
|
1168
|
+
'dealId': {'type': 'string', 'required': True},
|
|
1169
|
+
},
|
|
1170
|
+
response_schema={
|
|
1171
|
+
'type': 'object',
|
|
1172
|
+
'description': 'HubSpot deal object',
|
|
1173
|
+
'properties': {
|
|
1174
|
+
'id': {'type': 'string', 'description': 'Unique deal identifier'},
|
|
1175
|
+
'properties': {
|
|
1176
|
+
'type': 'object',
|
|
1177
|
+
'description': 'Deal properties',
|
|
1178
|
+
'properties': {
|
|
1179
|
+
'amount': {
|
|
1180
|
+
'type': ['string', 'null'],
|
|
1181
|
+
},
|
|
1182
|
+
'closedate': {
|
|
1183
|
+
'type': ['string', 'null'],
|
|
1184
|
+
},
|
|
1185
|
+
'createdate': {
|
|
1186
|
+
'type': ['string', 'null'],
|
|
1187
|
+
},
|
|
1188
|
+
'dealname': {
|
|
1189
|
+
'type': ['string', 'null'],
|
|
1190
|
+
},
|
|
1191
|
+
'dealstage': {
|
|
1192
|
+
'type': ['string', 'null'],
|
|
1193
|
+
},
|
|
1194
|
+
'hs_lastmodifieddate': {
|
|
1195
|
+
'type': ['string', 'null'],
|
|
1196
|
+
},
|
|
1197
|
+
'hs_object_id': {
|
|
1198
|
+
'type': ['string', 'null'],
|
|
1199
|
+
},
|
|
1200
|
+
'pipeline': {
|
|
1201
|
+
'type': ['string', 'null'],
|
|
1202
|
+
},
|
|
1203
|
+
},
|
|
1204
|
+
'additionalProperties': True,
|
|
1205
|
+
},
|
|
1206
|
+
'createdAt': {
|
|
1207
|
+
'type': 'string',
|
|
1208
|
+
'format': 'date-time',
|
|
1209
|
+
'description': 'Creation timestamp',
|
|
1210
|
+
},
|
|
1211
|
+
'updatedAt': {
|
|
1212
|
+
'type': 'string',
|
|
1213
|
+
'format': 'date-time',
|
|
1214
|
+
'description': 'Last update timestamp',
|
|
1215
|
+
},
|
|
1216
|
+
'archived': {'type': 'boolean', 'description': 'Whether the deal is archived'},
|
|
1217
|
+
'archivedAt': {
|
|
1218
|
+
'type': ['string', 'null'],
|
|
1219
|
+
'format': 'date-time',
|
|
1220
|
+
'description': 'Timestamp when the deal was archived',
|
|
1221
|
+
},
|
|
1222
|
+
'propertiesWithHistory': {
|
|
1223
|
+
'type': ['object', 'null'],
|
|
1224
|
+
'description': 'Properties with historical values',
|
|
1225
|
+
'additionalProperties': True,
|
|
1226
|
+
},
|
|
1227
|
+
'associations': {
|
|
1228
|
+
'type': ['object', 'null'],
|
|
1229
|
+
'description': 'Relationships with other CRM objects',
|
|
1230
|
+
'additionalProperties': True,
|
|
1231
|
+
},
|
|
1232
|
+
'objectWriteTraceId': {
|
|
1233
|
+
'type': ['string', 'null'],
|
|
1234
|
+
'description': 'Trace identifier for write operations',
|
|
1235
|
+
},
|
|
1236
|
+
'url': {
|
|
1237
|
+
'type': ['string', 'null'],
|
|
1238
|
+
'description': 'URL to view deal in HubSpot',
|
|
1239
|
+
},
|
|
1240
|
+
},
|
|
1241
|
+
'x-airbyte-entity-name': 'deals',
|
|
1242
|
+
},
|
|
1243
|
+
),
|
|
1244
|
+
Action.SEARCH: EndpointDefinition(
|
|
1245
|
+
method='POST',
|
|
1246
|
+
path='/crm/v3/objects/deals/search',
|
|
1247
|
+
action=Action.SEARCH,
|
|
1248
|
+
description='Search deals with filters and sorting',
|
|
1249
|
+
body_fields=[
|
|
1250
|
+
'filterGroups',
|
|
1251
|
+
'properties',
|
|
1252
|
+
'limit',
|
|
1253
|
+
'after',
|
|
1254
|
+
'sorts',
|
|
1255
|
+
'query',
|
|
1256
|
+
],
|
|
1257
|
+
request_schema={
|
|
1258
|
+
'type': 'object',
|
|
1259
|
+
'properties': {
|
|
1260
|
+
'filterGroups': {
|
|
1261
|
+
'type': 'array',
|
|
1262
|
+
'description': 'Up to 6 groups of filters defining additional query criteria.',
|
|
1263
|
+
'required': True,
|
|
1264
|
+
'items': {
|
|
1265
|
+
'type': 'object',
|
|
1266
|
+
'properties': {
|
|
1267
|
+
'filters': {
|
|
1268
|
+
'type': 'array',
|
|
1269
|
+
'required': True,
|
|
1270
|
+
'items': {
|
|
1271
|
+
'type': 'object',
|
|
1272
|
+
'properties': {
|
|
1273
|
+
'operator': {
|
|
1274
|
+
'type': 'string',
|
|
1275
|
+
'enum': [
|
|
1276
|
+
'BETWEEN',
|
|
1277
|
+
'CONTAINS_TOKEN',
|
|
1278
|
+
'EQ',
|
|
1279
|
+
'GT',
|
|
1280
|
+
'GTE',
|
|
1281
|
+
'HAS_PROPERTY',
|
|
1282
|
+
'IN',
|
|
1283
|
+
'LT',
|
|
1284
|
+
'LTE',
|
|
1285
|
+
'NEQ',
|
|
1286
|
+
'NOT_CONTAINS_TOKEN',
|
|
1287
|
+
'NOT_HAS_PROPERTY',
|
|
1288
|
+
'NOT_IN',
|
|
1289
|
+
],
|
|
1290
|
+
'required': True,
|
|
1291
|
+
},
|
|
1292
|
+
'propertyName': {
|
|
1293
|
+
'type': 'string',
|
|
1294
|
+
'description': 'The name of the property to apply the filter on.',
|
|
1295
|
+
'required': True,
|
|
1296
|
+
},
|
|
1297
|
+
'value': {'type': 'string', 'description': 'The value to match against the property.'},
|
|
1298
|
+
'values': {
|
|
1299
|
+
'type': 'array',
|
|
1300
|
+
'description': 'The values to match against the property.',
|
|
1301
|
+
'items': {'type': 'string'},
|
|
1302
|
+
},
|
|
1303
|
+
},
|
|
1304
|
+
},
|
|
1305
|
+
},
|
|
1306
|
+
},
|
|
1307
|
+
},
|
|
1308
|
+
},
|
|
1309
|
+
'properties': {
|
|
1310
|
+
'type': 'array',
|
|
1311
|
+
'description': 'A list of property names to include in the response.',
|
|
1312
|
+
'required': True,
|
|
1313
|
+
'items': {'type': 'string'},
|
|
1314
|
+
},
|
|
1315
|
+
'limit': {
|
|
1316
|
+
'type': 'integer',
|
|
1317
|
+
'description': 'Maximum number of results to return',
|
|
1318
|
+
'required': True,
|
|
1319
|
+
'minimum': 1,
|
|
1320
|
+
'maximum': 200,
|
|
1321
|
+
'default': 25,
|
|
1322
|
+
},
|
|
1323
|
+
'after': {'type': 'string', 'description': 'A paging cursor token for retrieving subsequent pages.'},
|
|
1324
|
+
'sorts': {
|
|
1325
|
+
'type': 'array',
|
|
1326
|
+
'description': 'Sort criteria',
|
|
1327
|
+
'required': True,
|
|
1328
|
+
'items': {
|
|
1329
|
+
'type': 'object',
|
|
1330
|
+
'properties': {
|
|
1331
|
+
'propertyName': {'type': 'string'},
|
|
1332
|
+
'direction': {
|
|
1333
|
+
'type': 'string',
|
|
1334
|
+
'enum': ['ASCENDING', 'DESCENDING'],
|
|
1335
|
+
},
|
|
1336
|
+
},
|
|
1337
|
+
},
|
|
1338
|
+
},
|
|
1339
|
+
'query': {'type': 'string', 'description': 'The search query string, up to 3000 characters.'},
|
|
1340
|
+
},
|
|
1341
|
+
},
|
|
1342
|
+
response_schema={
|
|
1343
|
+
'type': 'object',
|
|
1344
|
+
'description': 'Paginated list of deals',
|
|
1345
|
+
'properties': {
|
|
1346
|
+
'results': {
|
|
1347
|
+
'type': 'array',
|
|
1348
|
+
'items': {
|
|
1349
|
+
'type': 'object',
|
|
1350
|
+
'description': 'HubSpot deal object',
|
|
1351
|
+
'properties': {
|
|
1352
|
+
'id': {'type': 'string', 'description': 'Unique deal identifier'},
|
|
1353
|
+
'properties': {
|
|
1354
|
+
'type': 'object',
|
|
1355
|
+
'description': 'Deal properties',
|
|
1356
|
+
'properties': {
|
|
1357
|
+
'amount': {
|
|
1358
|
+
'type': ['string', 'null'],
|
|
1359
|
+
},
|
|
1360
|
+
'closedate': {
|
|
1361
|
+
'type': ['string', 'null'],
|
|
1362
|
+
},
|
|
1363
|
+
'createdate': {
|
|
1364
|
+
'type': ['string', 'null'],
|
|
1365
|
+
},
|
|
1366
|
+
'dealname': {
|
|
1367
|
+
'type': ['string', 'null'],
|
|
1368
|
+
},
|
|
1369
|
+
'dealstage': {
|
|
1370
|
+
'type': ['string', 'null'],
|
|
1371
|
+
},
|
|
1372
|
+
'hs_lastmodifieddate': {
|
|
1373
|
+
'type': ['string', 'null'],
|
|
1374
|
+
},
|
|
1375
|
+
'hs_object_id': {
|
|
1376
|
+
'type': ['string', 'null'],
|
|
1377
|
+
},
|
|
1378
|
+
'pipeline': {
|
|
1379
|
+
'type': ['string', 'null'],
|
|
1380
|
+
},
|
|
1381
|
+
},
|
|
1382
|
+
'additionalProperties': True,
|
|
1383
|
+
},
|
|
1384
|
+
'createdAt': {
|
|
1385
|
+
'type': 'string',
|
|
1386
|
+
'format': 'date-time',
|
|
1387
|
+
'description': 'Creation timestamp',
|
|
1388
|
+
},
|
|
1389
|
+
'updatedAt': {
|
|
1390
|
+
'type': 'string',
|
|
1391
|
+
'format': 'date-time',
|
|
1392
|
+
'description': 'Last update timestamp',
|
|
1393
|
+
},
|
|
1394
|
+
'archived': {'type': 'boolean', 'description': 'Whether the deal is archived'},
|
|
1395
|
+
'archivedAt': {
|
|
1396
|
+
'type': ['string', 'null'],
|
|
1397
|
+
'format': 'date-time',
|
|
1398
|
+
'description': 'Timestamp when the deal was archived',
|
|
1399
|
+
},
|
|
1400
|
+
'propertiesWithHistory': {
|
|
1401
|
+
'type': ['object', 'null'],
|
|
1402
|
+
'description': 'Properties with historical values',
|
|
1403
|
+
'additionalProperties': True,
|
|
1404
|
+
},
|
|
1405
|
+
'associations': {
|
|
1406
|
+
'type': ['object', 'null'],
|
|
1407
|
+
'description': 'Relationships with other CRM objects',
|
|
1408
|
+
'additionalProperties': True,
|
|
1409
|
+
},
|
|
1410
|
+
'objectWriteTraceId': {
|
|
1411
|
+
'type': ['string', 'null'],
|
|
1412
|
+
'description': 'Trace identifier for write operations',
|
|
1413
|
+
},
|
|
1414
|
+
'url': {
|
|
1415
|
+
'type': ['string', 'null'],
|
|
1416
|
+
'description': 'URL to view deal in HubSpot',
|
|
1417
|
+
},
|
|
1418
|
+
},
|
|
1419
|
+
'x-airbyte-entity-name': 'deals',
|
|
1420
|
+
},
|
|
1421
|
+
},
|
|
1422
|
+
'paging': {
|
|
1423
|
+
'type': 'object',
|
|
1424
|
+
'description': 'Pagination information',
|
|
1425
|
+
'properties': {
|
|
1426
|
+
'next': {
|
|
1427
|
+
'type': 'object',
|
|
1428
|
+
'properties': {
|
|
1429
|
+
'after': {'type': 'string', 'description': 'Cursor for next page'},
|
|
1430
|
+
'link': {'type': 'string', 'description': 'URL for next page'},
|
|
1431
|
+
},
|
|
1432
|
+
},
|
|
1433
|
+
},
|
|
1434
|
+
},
|
|
1435
|
+
'total': {'type': 'integer', 'description': 'Total number of results (search only)'},
|
|
1436
|
+
},
|
|
1437
|
+
},
|
|
1438
|
+
record_extractor='$.results',
|
|
1439
|
+
meta_extractor={
|
|
1440
|
+
'total': '$.total',
|
|
1441
|
+
'next_cursor': '$.paging.next.after',
|
|
1442
|
+
'next_link': '$.paging.next.link',
|
|
1443
|
+
},
|
|
1444
|
+
),
|
|
1445
|
+
},
|
|
1446
|
+
entity_schema={
|
|
1447
|
+
'type': 'object',
|
|
1448
|
+
'description': 'HubSpot deal object',
|
|
1449
|
+
'properties': {
|
|
1450
|
+
'id': {'type': 'string', 'description': 'Unique deal identifier'},
|
|
1451
|
+
'properties': {
|
|
1452
|
+
'type': 'object',
|
|
1453
|
+
'description': 'Deal properties',
|
|
1454
|
+
'properties': {
|
|
1455
|
+
'amount': {
|
|
1456
|
+
'type': ['string', 'null'],
|
|
1457
|
+
},
|
|
1458
|
+
'closedate': {
|
|
1459
|
+
'type': ['string', 'null'],
|
|
1460
|
+
},
|
|
1461
|
+
'createdate': {
|
|
1462
|
+
'type': ['string', 'null'],
|
|
1463
|
+
},
|
|
1464
|
+
'dealname': {
|
|
1465
|
+
'type': ['string', 'null'],
|
|
1466
|
+
},
|
|
1467
|
+
'dealstage': {
|
|
1468
|
+
'type': ['string', 'null'],
|
|
1469
|
+
},
|
|
1470
|
+
'hs_lastmodifieddate': {
|
|
1471
|
+
'type': ['string', 'null'],
|
|
1472
|
+
},
|
|
1473
|
+
'hs_object_id': {
|
|
1474
|
+
'type': ['string', 'null'],
|
|
1475
|
+
},
|
|
1476
|
+
'pipeline': {
|
|
1477
|
+
'type': ['string', 'null'],
|
|
1478
|
+
},
|
|
1479
|
+
},
|
|
1480
|
+
'additionalProperties': True,
|
|
1481
|
+
},
|
|
1482
|
+
'createdAt': {
|
|
1483
|
+
'type': 'string',
|
|
1484
|
+
'format': 'date-time',
|
|
1485
|
+
'description': 'Creation timestamp',
|
|
1486
|
+
},
|
|
1487
|
+
'updatedAt': {
|
|
1488
|
+
'type': 'string',
|
|
1489
|
+
'format': 'date-time',
|
|
1490
|
+
'description': 'Last update timestamp',
|
|
1491
|
+
},
|
|
1492
|
+
'archived': {'type': 'boolean', 'description': 'Whether the deal is archived'},
|
|
1493
|
+
'archivedAt': {
|
|
1494
|
+
'type': ['string', 'null'],
|
|
1495
|
+
'format': 'date-time',
|
|
1496
|
+
'description': 'Timestamp when the deal was archived',
|
|
1497
|
+
},
|
|
1498
|
+
'propertiesWithHistory': {
|
|
1499
|
+
'type': ['object', 'null'],
|
|
1500
|
+
'description': 'Properties with historical values',
|
|
1501
|
+
'additionalProperties': True,
|
|
1502
|
+
},
|
|
1503
|
+
'associations': {
|
|
1504
|
+
'type': ['object', 'null'],
|
|
1505
|
+
'description': 'Relationships with other CRM objects',
|
|
1506
|
+
'additionalProperties': True,
|
|
1507
|
+
},
|
|
1508
|
+
'objectWriteTraceId': {
|
|
1509
|
+
'type': ['string', 'null'],
|
|
1510
|
+
'description': 'Trace identifier for write operations',
|
|
1511
|
+
},
|
|
1512
|
+
'url': {
|
|
1513
|
+
'type': ['string', 'null'],
|
|
1514
|
+
'description': 'URL to view deal in HubSpot',
|
|
1515
|
+
},
|
|
1516
|
+
},
|
|
1517
|
+
'x-airbyte-entity-name': 'deals',
|
|
1518
|
+
},
|
|
1519
|
+
),
|
|
1520
|
+
EntityDefinition(
|
|
1521
|
+
name='tickets',
|
|
1522
|
+
actions=[Action.LIST, Action.GET, Action.SEARCH],
|
|
1523
|
+
endpoints={
|
|
1524
|
+
Action.LIST: EndpointDefinition(
|
|
1525
|
+
method='GET',
|
|
1526
|
+
path='/crm/v3/objects/tickets',
|
|
1527
|
+
action=Action.LIST,
|
|
1528
|
+
description='Returns a paginated list of tickets',
|
|
1529
|
+
query_params=[
|
|
1530
|
+
'limit',
|
|
1531
|
+
'after',
|
|
1532
|
+
'associations',
|
|
1533
|
+
'properties',
|
|
1534
|
+
'propertiesWithHistory',
|
|
1535
|
+
'archived',
|
|
1536
|
+
],
|
|
1537
|
+
query_params_schema={
|
|
1538
|
+
'limit': {
|
|
1539
|
+
'type': 'integer',
|
|
1540
|
+
'required': False,
|
|
1541
|
+
'default': 25,
|
|
1542
|
+
},
|
|
1543
|
+
'after': {'type': 'string', 'required': False},
|
|
1544
|
+
'associations': {'type': 'string', 'required': False},
|
|
1545
|
+
'properties': {'type': 'string', 'required': False},
|
|
1546
|
+
'propertiesWithHistory': {'type': 'string', 'required': False},
|
|
1547
|
+
'archived': {'type': 'boolean', 'required': False},
|
|
1548
|
+
},
|
|
1549
|
+
response_schema={
|
|
1550
|
+
'type': 'object',
|
|
1551
|
+
'description': 'Paginated list of tickets',
|
|
1552
|
+
'properties': {
|
|
1553
|
+
'results': {
|
|
1554
|
+
'type': 'array',
|
|
1555
|
+
'items': {
|
|
1556
|
+
'type': 'object',
|
|
1557
|
+
'description': 'HubSpot ticket object',
|
|
1558
|
+
'properties': {
|
|
1559
|
+
'id': {'type': 'string', 'description': 'Unique ticket identifier'},
|
|
1560
|
+
'properties': {
|
|
1561
|
+
'type': 'object',
|
|
1562
|
+
'description': 'Ticket properties',
|
|
1563
|
+
'properties': {
|
|
1564
|
+
'content': {
|
|
1565
|
+
'type': ['string', 'null'],
|
|
1566
|
+
},
|
|
1567
|
+
'createdate': {
|
|
1568
|
+
'type': ['string', 'null'],
|
|
1569
|
+
},
|
|
1570
|
+
'hs_lastmodifieddate': {
|
|
1571
|
+
'type': ['string', 'null'],
|
|
1572
|
+
},
|
|
1573
|
+
'hs_object_id': {
|
|
1574
|
+
'type': ['string', 'null'],
|
|
1575
|
+
},
|
|
1576
|
+
'hs_pipeline': {
|
|
1577
|
+
'type': ['string', 'null'],
|
|
1578
|
+
},
|
|
1579
|
+
'hs_pipeline_stage': {
|
|
1580
|
+
'type': ['string', 'null'],
|
|
1581
|
+
},
|
|
1582
|
+
'hs_ticket_category': {
|
|
1583
|
+
'type': ['string', 'null'],
|
|
1584
|
+
},
|
|
1585
|
+
'hs_ticket_priority': {
|
|
1586
|
+
'type': ['string', 'null'],
|
|
1587
|
+
},
|
|
1588
|
+
'subject': {
|
|
1589
|
+
'type': ['string', 'null'],
|
|
1590
|
+
},
|
|
1591
|
+
},
|
|
1592
|
+
'additionalProperties': True,
|
|
1593
|
+
},
|
|
1594
|
+
'createdAt': {
|
|
1595
|
+
'type': 'string',
|
|
1596
|
+
'format': 'date-time',
|
|
1597
|
+
'description': 'Creation timestamp',
|
|
1598
|
+
},
|
|
1599
|
+
'updatedAt': {
|
|
1600
|
+
'type': 'string',
|
|
1601
|
+
'format': 'date-time',
|
|
1602
|
+
'description': 'Last update timestamp',
|
|
1603
|
+
},
|
|
1604
|
+
'archived': {'type': 'boolean', 'description': 'Whether the ticket is archived'},
|
|
1605
|
+
'archivedAt': {
|
|
1606
|
+
'type': ['string', 'null'],
|
|
1607
|
+
'format': 'date-time',
|
|
1608
|
+
'description': 'Timestamp when the ticket was archived',
|
|
1609
|
+
},
|
|
1610
|
+
'propertiesWithHistory': {
|
|
1611
|
+
'type': ['object', 'null'],
|
|
1612
|
+
'description': 'Properties with historical values',
|
|
1613
|
+
'additionalProperties': True,
|
|
1614
|
+
},
|
|
1615
|
+
'associations': {
|
|
1616
|
+
'type': ['object', 'null'],
|
|
1617
|
+
'description': 'Relationships with other CRM objects',
|
|
1618
|
+
'additionalProperties': True,
|
|
1619
|
+
},
|
|
1620
|
+
'objectWriteTraceId': {
|
|
1621
|
+
'type': ['string', 'null'],
|
|
1622
|
+
'description': 'Trace identifier for write operations',
|
|
1623
|
+
},
|
|
1624
|
+
'url': {
|
|
1625
|
+
'type': ['string', 'null'],
|
|
1626
|
+
'description': 'URL to view ticket in HubSpot',
|
|
1627
|
+
},
|
|
1628
|
+
},
|
|
1629
|
+
'x-airbyte-entity-name': 'tickets',
|
|
1630
|
+
},
|
|
1631
|
+
},
|
|
1632
|
+
'paging': {
|
|
1633
|
+
'type': 'object',
|
|
1634
|
+
'description': 'Pagination information',
|
|
1635
|
+
'properties': {
|
|
1636
|
+
'next': {
|
|
1637
|
+
'type': 'object',
|
|
1638
|
+
'properties': {
|
|
1639
|
+
'after': {'type': 'string', 'description': 'Cursor for next page'},
|
|
1640
|
+
'link': {'type': 'string', 'description': 'URL for next page'},
|
|
1641
|
+
},
|
|
1642
|
+
},
|
|
1643
|
+
},
|
|
1644
|
+
},
|
|
1645
|
+
'total': {'type': 'integer', 'description': 'Total number of results (search only)'},
|
|
1646
|
+
},
|
|
1647
|
+
},
|
|
1648
|
+
record_extractor='$.results',
|
|
1649
|
+
meta_extractor={'next_cursor': '$.paging.next.after', 'next_link': '$.paging.next.link'},
|
|
1650
|
+
),
|
|
1651
|
+
Action.GET: EndpointDefinition(
|
|
1652
|
+
method='GET',
|
|
1653
|
+
path='/crm/v3/objects/tickets/{ticketId}',
|
|
1654
|
+
action=Action.GET,
|
|
1655
|
+
description='Get a single ticket by ID',
|
|
1656
|
+
query_params=[
|
|
1657
|
+
'properties',
|
|
1658
|
+
'propertiesWithHistory',
|
|
1659
|
+
'associations',
|
|
1660
|
+
'idProperty',
|
|
1661
|
+
'archived',
|
|
1662
|
+
],
|
|
1663
|
+
query_params_schema={
|
|
1664
|
+
'properties': {'type': 'string', 'required': False},
|
|
1665
|
+
'propertiesWithHistory': {'type': 'string', 'required': False},
|
|
1666
|
+
'associations': {'type': 'string', 'required': False},
|
|
1667
|
+
'idProperty': {'type': 'string', 'required': False},
|
|
1668
|
+
'archived': {'type': 'boolean', 'required': False},
|
|
1669
|
+
},
|
|
1670
|
+
path_params=['ticketId'],
|
|
1671
|
+
path_params_schema={
|
|
1672
|
+
'ticketId': {'type': 'string', 'required': True},
|
|
1673
|
+
},
|
|
1674
|
+
response_schema={
|
|
1675
|
+
'type': 'object',
|
|
1676
|
+
'description': 'HubSpot ticket object',
|
|
1677
|
+
'properties': {
|
|
1678
|
+
'id': {'type': 'string', 'description': 'Unique ticket identifier'},
|
|
1679
|
+
'properties': {
|
|
1680
|
+
'type': 'object',
|
|
1681
|
+
'description': 'Ticket properties',
|
|
1682
|
+
'properties': {
|
|
1683
|
+
'content': {
|
|
1684
|
+
'type': ['string', 'null'],
|
|
1685
|
+
},
|
|
1686
|
+
'createdate': {
|
|
1687
|
+
'type': ['string', 'null'],
|
|
1688
|
+
},
|
|
1689
|
+
'hs_lastmodifieddate': {
|
|
1690
|
+
'type': ['string', 'null'],
|
|
1691
|
+
},
|
|
1692
|
+
'hs_object_id': {
|
|
1693
|
+
'type': ['string', 'null'],
|
|
1694
|
+
},
|
|
1695
|
+
'hs_pipeline': {
|
|
1696
|
+
'type': ['string', 'null'],
|
|
1697
|
+
},
|
|
1698
|
+
'hs_pipeline_stage': {
|
|
1699
|
+
'type': ['string', 'null'],
|
|
1700
|
+
},
|
|
1701
|
+
'hs_ticket_category': {
|
|
1702
|
+
'type': ['string', 'null'],
|
|
1703
|
+
},
|
|
1704
|
+
'hs_ticket_priority': {
|
|
1705
|
+
'type': ['string', 'null'],
|
|
1706
|
+
},
|
|
1707
|
+
'subject': {
|
|
1708
|
+
'type': ['string', 'null'],
|
|
1709
|
+
},
|
|
1710
|
+
},
|
|
1711
|
+
'additionalProperties': True,
|
|
1712
|
+
},
|
|
1713
|
+
'createdAt': {
|
|
1714
|
+
'type': 'string',
|
|
1715
|
+
'format': 'date-time',
|
|
1716
|
+
'description': 'Creation timestamp',
|
|
1717
|
+
},
|
|
1718
|
+
'updatedAt': {
|
|
1719
|
+
'type': 'string',
|
|
1720
|
+
'format': 'date-time',
|
|
1721
|
+
'description': 'Last update timestamp',
|
|
1722
|
+
},
|
|
1723
|
+
'archived': {'type': 'boolean', 'description': 'Whether the ticket is archived'},
|
|
1724
|
+
'archivedAt': {
|
|
1725
|
+
'type': ['string', 'null'],
|
|
1726
|
+
'format': 'date-time',
|
|
1727
|
+
'description': 'Timestamp when the ticket was archived',
|
|
1728
|
+
},
|
|
1729
|
+
'propertiesWithHistory': {
|
|
1730
|
+
'type': ['object', 'null'],
|
|
1731
|
+
'description': 'Properties with historical values',
|
|
1732
|
+
'additionalProperties': True,
|
|
1733
|
+
},
|
|
1734
|
+
'associations': {
|
|
1735
|
+
'type': ['object', 'null'],
|
|
1736
|
+
'description': 'Relationships with other CRM objects',
|
|
1737
|
+
'additionalProperties': True,
|
|
1738
|
+
},
|
|
1739
|
+
'objectWriteTraceId': {
|
|
1740
|
+
'type': ['string', 'null'],
|
|
1741
|
+
'description': 'Trace identifier for write operations',
|
|
1742
|
+
},
|
|
1743
|
+
'url': {
|
|
1744
|
+
'type': ['string', 'null'],
|
|
1745
|
+
'description': 'URL to view ticket in HubSpot',
|
|
1746
|
+
},
|
|
1747
|
+
},
|
|
1748
|
+
'x-airbyte-entity-name': 'tickets',
|
|
1749
|
+
},
|
|
1750
|
+
),
|
|
1751
|
+
Action.SEARCH: EndpointDefinition(
|
|
1752
|
+
method='POST',
|
|
1753
|
+
path='/crm/v3/objects/tickets/search',
|
|
1754
|
+
action=Action.SEARCH,
|
|
1755
|
+
description='Search for tickets by filtering on properties, searching through associations, and sorting results.',
|
|
1756
|
+
body_fields=[
|
|
1757
|
+
'filterGroups',
|
|
1758
|
+
'properties',
|
|
1759
|
+
'limit',
|
|
1760
|
+
'after',
|
|
1761
|
+
'sorts',
|
|
1762
|
+
'query',
|
|
1763
|
+
],
|
|
1764
|
+
request_schema={
|
|
1765
|
+
'type': 'object',
|
|
1766
|
+
'properties': {
|
|
1767
|
+
'filterGroups': {
|
|
1768
|
+
'type': 'array',
|
|
1769
|
+
'description': 'Up to 6 groups of filters defining additional query criteria.',
|
|
1770
|
+
'required': True,
|
|
1771
|
+
'items': {
|
|
1772
|
+
'type': 'object',
|
|
1773
|
+
'properties': {
|
|
1774
|
+
'filters': {
|
|
1775
|
+
'type': 'array',
|
|
1776
|
+
'required': True,
|
|
1777
|
+
'items': {
|
|
1778
|
+
'type': 'object',
|
|
1779
|
+
'properties': {
|
|
1780
|
+
'operator': {
|
|
1781
|
+
'type': 'string',
|
|
1782
|
+
'enum': [
|
|
1783
|
+
'BETWEEN',
|
|
1784
|
+
'CONTAINS_TOKEN',
|
|
1785
|
+
'EQ',
|
|
1786
|
+
'GT',
|
|
1787
|
+
'GTE',
|
|
1788
|
+
'HAS_PROPERTY',
|
|
1789
|
+
'IN',
|
|
1790
|
+
'LT',
|
|
1791
|
+
'LTE',
|
|
1792
|
+
'NEQ',
|
|
1793
|
+
'NOT_CONTAINS_TOKEN',
|
|
1794
|
+
'NOT_HAS_PROPERTY',
|
|
1795
|
+
'NOT_IN',
|
|
1796
|
+
],
|
|
1797
|
+
'required': True,
|
|
1798
|
+
},
|
|
1799
|
+
'propertyName': {
|
|
1800
|
+
'type': 'string',
|
|
1801
|
+
'description': 'The name of the property to apply the filter on.',
|
|
1802
|
+
'required': True,
|
|
1803
|
+
},
|
|
1804
|
+
'value': {'type': 'string', 'description': 'The value to match against the property.'},
|
|
1805
|
+
'values': {
|
|
1806
|
+
'type': 'array',
|
|
1807
|
+
'description': 'The values to match against the property.',
|
|
1808
|
+
'items': {'type': 'string'},
|
|
1809
|
+
},
|
|
1810
|
+
},
|
|
1811
|
+
},
|
|
1812
|
+
},
|
|
1813
|
+
},
|
|
1814
|
+
},
|
|
1815
|
+
},
|
|
1816
|
+
'properties': {
|
|
1817
|
+
'type': 'array',
|
|
1818
|
+
'description': 'A list of property names to include in the response.',
|
|
1819
|
+
'required': True,
|
|
1820
|
+
'items': {'type': 'string'},
|
|
1821
|
+
},
|
|
1822
|
+
'limit': {
|
|
1823
|
+
'type': 'integer',
|
|
1824
|
+
'description': 'Maximum number of results to return',
|
|
1825
|
+
'required': True,
|
|
1826
|
+
'minimum': 1,
|
|
1827
|
+
'maximum': 200,
|
|
1828
|
+
'default': 25,
|
|
1829
|
+
},
|
|
1830
|
+
'after': {'type': 'string', 'description': 'A paging cursor token for retrieving subsequent pages.'},
|
|
1831
|
+
'sorts': {
|
|
1832
|
+
'type': 'array',
|
|
1833
|
+
'description': 'Sort criteria',
|
|
1834
|
+
'required': True,
|
|
1835
|
+
'items': {
|
|
1836
|
+
'type': 'object',
|
|
1837
|
+
'properties': {
|
|
1838
|
+
'propertyName': {'type': 'string'},
|
|
1839
|
+
'direction': {
|
|
1840
|
+
'type': 'string',
|
|
1841
|
+
'enum': ['ASCENDING', 'DESCENDING'],
|
|
1842
|
+
},
|
|
1843
|
+
},
|
|
1844
|
+
},
|
|
1845
|
+
},
|
|
1846
|
+
'query': {'type': 'string', 'description': 'The search query string, up to 3000 characters.'},
|
|
1847
|
+
},
|
|
1848
|
+
},
|
|
1849
|
+
response_schema={
|
|
1850
|
+
'type': 'object',
|
|
1851
|
+
'description': 'Paginated list of tickets',
|
|
1852
|
+
'properties': {
|
|
1853
|
+
'results': {
|
|
1854
|
+
'type': 'array',
|
|
1855
|
+
'items': {
|
|
1856
|
+
'type': 'object',
|
|
1857
|
+
'description': 'HubSpot ticket object',
|
|
1858
|
+
'properties': {
|
|
1859
|
+
'id': {'type': 'string', 'description': 'Unique ticket identifier'},
|
|
1860
|
+
'properties': {
|
|
1861
|
+
'type': 'object',
|
|
1862
|
+
'description': 'Ticket properties',
|
|
1863
|
+
'properties': {
|
|
1864
|
+
'content': {
|
|
1865
|
+
'type': ['string', 'null'],
|
|
1866
|
+
},
|
|
1867
|
+
'createdate': {
|
|
1868
|
+
'type': ['string', 'null'],
|
|
1869
|
+
},
|
|
1870
|
+
'hs_lastmodifieddate': {
|
|
1871
|
+
'type': ['string', 'null'],
|
|
1872
|
+
},
|
|
1873
|
+
'hs_object_id': {
|
|
1874
|
+
'type': ['string', 'null'],
|
|
1875
|
+
},
|
|
1876
|
+
'hs_pipeline': {
|
|
1877
|
+
'type': ['string', 'null'],
|
|
1878
|
+
},
|
|
1879
|
+
'hs_pipeline_stage': {
|
|
1880
|
+
'type': ['string', 'null'],
|
|
1881
|
+
},
|
|
1882
|
+
'hs_ticket_category': {
|
|
1883
|
+
'type': ['string', 'null'],
|
|
1884
|
+
},
|
|
1885
|
+
'hs_ticket_priority': {
|
|
1886
|
+
'type': ['string', 'null'],
|
|
1887
|
+
},
|
|
1888
|
+
'subject': {
|
|
1889
|
+
'type': ['string', 'null'],
|
|
1890
|
+
},
|
|
1891
|
+
},
|
|
1892
|
+
'additionalProperties': True,
|
|
1893
|
+
},
|
|
1894
|
+
'createdAt': {
|
|
1895
|
+
'type': 'string',
|
|
1896
|
+
'format': 'date-time',
|
|
1897
|
+
'description': 'Creation timestamp',
|
|
1898
|
+
},
|
|
1899
|
+
'updatedAt': {
|
|
1900
|
+
'type': 'string',
|
|
1901
|
+
'format': 'date-time',
|
|
1902
|
+
'description': 'Last update timestamp',
|
|
1903
|
+
},
|
|
1904
|
+
'archived': {'type': 'boolean', 'description': 'Whether the ticket is archived'},
|
|
1905
|
+
'archivedAt': {
|
|
1906
|
+
'type': ['string', 'null'],
|
|
1907
|
+
'format': 'date-time',
|
|
1908
|
+
'description': 'Timestamp when the ticket was archived',
|
|
1909
|
+
},
|
|
1910
|
+
'propertiesWithHistory': {
|
|
1911
|
+
'type': ['object', 'null'],
|
|
1912
|
+
'description': 'Properties with historical values',
|
|
1913
|
+
'additionalProperties': True,
|
|
1914
|
+
},
|
|
1915
|
+
'associations': {
|
|
1916
|
+
'type': ['object', 'null'],
|
|
1917
|
+
'description': 'Relationships with other CRM objects',
|
|
1918
|
+
'additionalProperties': True,
|
|
1919
|
+
},
|
|
1920
|
+
'objectWriteTraceId': {
|
|
1921
|
+
'type': ['string', 'null'],
|
|
1922
|
+
'description': 'Trace identifier for write operations',
|
|
1923
|
+
},
|
|
1924
|
+
'url': {
|
|
1925
|
+
'type': ['string', 'null'],
|
|
1926
|
+
'description': 'URL to view ticket in HubSpot',
|
|
1927
|
+
},
|
|
1928
|
+
},
|
|
1929
|
+
'x-airbyte-entity-name': 'tickets',
|
|
1930
|
+
},
|
|
1931
|
+
},
|
|
1932
|
+
'paging': {
|
|
1933
|
+
'type': 'object',
|
|
1934
|
+
'description': 'Pagination information',
|
|
1935
|
+
'properties': {
|
|
1936
|
+
'next': {
|
|
1937
|
+
'type': 'object',
|
|
1938
|
+
'properties': {
|
|
1939
|
+
'after': {'type': 'string', 'description': 'Cursor for next page'},
|
|
1940
|
+
'link': {'type': 'string', 'description': 'URL for next page'},
|
|
1941
|
+
},
|
|
1942
|
+
},
|
|
1943
|
+
},
|
|
1944
|
+
},
|
|
1945
|
+
'total': {'type': 'integer', 'description': 'Total number of results (search only)'},
|
|
1946
|
+
},
|
|
1947
|
+
},
|
|
1948
|
+
record_extractor='$.results',
|
|
1949
|
+
meta_extractor={
|
|
1950
|
+
'total': '$.total',
|
|
1951
|
+
'next_cursor': '$.paging.next.after',
|
|
1952
|
+
'next_link': '$.paging.next.link',
|
|
1953
|
+
},
|
|
1954
|
+
),
|
|
1955
|
+
},
|
|
1956
|
+
entity_schema={
|
|
1957
|
+
'type': 'object',
|
|
1958
|
+
'description': 'HubSpot ticket object',
|
|
1959
|
+
'properties': {
|
|
1960
|
+
'id': {'type': 'string', 'description': 'Unique ticket identifier'},
|
|
1961
|
+
'properties': {
|
|
1962
|
+
'type': 'object',
|
|
1963
|
+
'description': 'Ticket properties',
|
|
1964
|
+
'properties': {
|
|
1965
|
+
'content': {
|
|
1966
|
+
'type': ['string', 'null'],
|
|
1967
|
+
},
|
|
1968
|
+
'createdate': {
|
|
1969
|
+
'type': ['string', 'null'],
|
|
1970
|
+
},
|
|
1971
|
+
'hs_lastmodifieddate': {
|
|
1972
|
+
'type': ['string', 'null'],
|
|
1973
|
+
},
|
|
1974
|
+
'hs_object_id': {
|
|
1975
|
+
'type': ['string', 'null'],
|
|
1976
|
+
},
|
|
1977
|
+
'hs_pipeline': {
|
|
1978
|
+
'type': ['string', 'null'],
|
|
1979
|
+
},
|
|
1980
|
+
'hs_pipeline_stage': {
|
|
1981
|
+
'type': ['string', 'null'],
|
|
1982
|
+
},
|
|
1983
|
+
'hs_ticket_category': {
|
|
1984
|
+
'type': ['string', 'null'],
|
|
1985
|
+
},
|
|
1986
|
+
'hs_ticket_priority': {
|
|
1987
|
+
'type': ['string', 'null'],
|
|
1988
|
+
},
|
|
1989
|
+
'subject': {
|
|
1990
|
+
'type': ['string', 'null'],
|
|
1991
|
+
},
|
|
1992
|
+
},
|
|
1993
|
+
'additionalProperties': True,
|
|
1994
|
+
},
|
|
1995
|
+
'createdAt': {
|
|
1996
|
+
'type': 'string',
|
|
1997
|
+
'format': 'date-time',
|
|
1998
|
+
'description': 'Creation timestamp',
|
|
1999
|
+
},
|
|
2000
|
+
'updatedAt': {
|
|
2001
|
+
'type': 'string',
|
|
2002
|
+
'format': 'date-time',
|
|
2003
|
+
'description': 'Last update timestamp',
|
|
2004
|
+
},
|
|
2005
|
+
'archived': {'type': 'boolean', 'description': 'Whether the ticket is archived'},
|
|
2006
|
+
'archivedAt': {
|
|
2007
|
+
'type': ['string', 'null'],
|
|
2008
|
+
'format': 'date-time',
|
|
2009
|
+
'description': 'Timestamp when the ticket was archived',
|
|
2010
|
+
},
|
|
2011
|
+
'propertiesWithHistory': {
|
|
2012
|
+
'type': ['object', 'null'],
|
|
2013
|
+
'description': 'Properties with historical values',
|
|
2014
|
+
'additionalProperties': True,
|
|
2015
|
+
},
|
|
2016
|
+
'associations': {
|
|
2017
|
+
'type': ['object', 'null'],
|
|
2018
|
+
'description': 'Relationships with other CRM objects',
|
|
2019
|
+
'additionalProperties': True,
|
|
2020
|
+
},
|
|
2021
|
+
'objectWriteTraceId': {
|
|
2022
|
+
'type': ['string', 'null'],
|
|
2023
|
+
'description': 'Trace identifier for write operations',
|
|
2024
|
+
},
|
|
2025
|
+
'url': {
|
|
2026
|
+
'type': ['string', 'null'],
|
|
2027
|
+
'description': 'URL to view ticket in HubSpot',
|
|
2028
|
+
},
|
|
2029
|
+
},
|
|
2030
|
+
'x-airbyte-entity-name': 'tickets',
|
|
2031
|
+
},
|
|
2032
|
+
),
|
|
2033
|
+
EntityDefinition(
|
|
2034
|
+
name='schemas',
|
|
2035
|
+
actions=[Action.LIST, Action.GET],
|
|
2036
|
+
endpoints={
|
|
2037
|
+
Action.LIST: EndpointDefinition(
|
|
2038
|
+
method='GET',
|
|
2039
|
+
path='/crm-object-schemas/v3/schemas',
|
|
2040
|
+
action=Action.LIST,
|
|
2041
|
+
description='Returns all custom object schemas to discover available custom objects',
|
|
2042
|
+
query_params=['archived'],
|
|
2043
|
+
query_params_schema={
|
|
2044
|
+
'archived': {'type': 'boolean', 'required': False},
|
|
2045
|
+
},
|
|
2046
|
+
response_schema={
|
|
2047
|
+
'type': 'object',
|
|
2048
|
+
'description': 'List of custom object schemas',
|
|
2049
|
+
'properties': {
|
|
2050
|
+
'results': {
|
|
2051
|
+
'type': 'array',
|
|
2052
|
+
'items': {
|
|
2053
|
+
'type': 'object',
|
|
2054
|
+
'description': 'Custom object schema definition',
|
|
2055
|
+
'properties': {
|
|
2056
|
+
'id': {'type': 'string', 'description': 'Schema ID'},
|
|
2057
|
+
'name': {'type': 'string', 'description': 'Schema name'},
|
|
2058
|
+
'labels': {
|
|
2059
|
+
'type': 'object',
|
|
2060
|
+
'description': 'Display labels',
|
|
2061
|
+
'properties': {
|
|
2062
|
+
'singular': {'type': 'string'},
|
|
2063
|
+
'plural': {'type': 'string'},
|
|
2064
|
+
},
|
|
2065
|
+
},
|
|
2066
|
+
'objectTypeId': {'type': 'string', 'description': 'Object type identifier'},
|
|
2067
|
+
'fullyQualifiedName': {'type': 'string', 'description': 'Fully qualified name (p{portal_id}_{object_name})'},
|
|
2068
|
+
'requiredProperties': {
|
|
2069
|
+
'type': 'array',
|
|
2070
|
+
'items': {'type': 'string'},
|
|
2071
|
+
},
|
|
2072
|
+
'searchableProperties': {
|
|
2073
|
+
'type': 'array',
|
|
2074
|
+
'items': {'type': 'string'},
|
|
2075
|
+
},
|
|
2076
|
+
'primaryDisplayProperty': {'type': 'string'},
|
|
2077
|
+
'secondaryDisplayProperties': {
|
|
2078
|
+
'type': 'array',
|
|
2079
|
+
'items': {'type': 'string'},
|
|
2080
|
+
},
|
|
2081
|
+
'description': {
|
|
2082
|
+
'type': ['string', 'null'],
|
|
2083
|
+
},
|
|
2084
|
+
'allowsSensitiveProperties': {'type': 'boolean'},
|
|
2085
|
+
'archived': {'type': 'boolean'},
|
|
2086
|
+
'restorable': {'type': 'boolean'},
|
|
2087
|
+
'metaType': {'type': 'string'},
|
|
2088
|
+
'createdByUserId': {'type': 'integer'},
|
|
2089
|
+
'updatedByUserId': {'type': 'integer'},
|
|
2090
|
+
'properties': {
|
|
2091
|
+
'type': 'array',
|
|
2092
|
+
'description': 'Schema properties',
|
|
2093
|
+
'items': {
|
|
2094
|
+
'type': 'object',
|
|
2095
|
+
'properties': {
|
|
2096
|
+
'name': {'type': 'string'},
|
|
2097
|
+
'label': {'type': 'string'},
|
|
2098
|
+
'type': {'type': 'string'},
|
|
2099
|
+
'fieldType': {'type': 'string'},
|
|
2100
|
+
'description': {'type': 'string'},
|
|
2101
|
+
'groupName': {'type': 'string'},
|
|
2102
|
+
'displayOrder': {'type': 'integer'},
|
|
2103
|
+
'calculated': {'type': 'boolean'},
|
|
2104
|
+
'externalOptions': {'type': 'boolean'},
|
|
2105
|
+
'archived': {'type': 'boolean'},
|
|
2106
|
+
'hasUniqueValue': {'type': 'boolean'},
|
|
2107
|
+
'hidden': {'type': 'boolean'},
|
|
2108
|
+
'formField': {'type': 'boolean'},
|
|
2109
|
+
'dataSensitivity': {'type': 'string'},
|
|
2110
|
+
'hubspotDefined': {'type': 'boolean'},
|
|
2111
|
+
'updatedAt': {'type': 'string'},
|
|
2112
|
+
'createdAt': {'type': 'string'},
|
|
2113
|
+
'options': {'type': 'array'},
|
|
2114
|
+
'createdUserId': {'type': 'string'},
|
|
2115
|
+
'updatedUserId': {'type': 'string'},
|
|
2116
|
+
'showCurrencySymbol': {'type': 'boolean'},
|
|
2117
|
+
'modificationMetadata': {
|
|
2118
|
+
'type': 'object',
|
|
2119
|
+
'properties': {
|
|
2120
|
+
'archivable': {'type': 'boolean'},
|
|
2121
|
+
'readOnlyDefinition': {'type': 'boolean'},
|
|
2122
|
+
'readOnlyValue': {'type': 'boolean'},
|
|
2123
|
+
'readOnlyOptions': {'type': 'boolean'},
|
|
2124
|
+
},
|
|
2125
|
+
'additionalProperties': True,
|
|
2126
|
+
},
|
|
2127
|
+
},
|
|
2128
|
+
'additionalProperties': True,
|
|
2129
|
+
},
|
|
2130
|
+
},
|
|
2131
|
+
'associations': {
|
|
2132
|
+
'type': 'array',
|
|
2133
|
+
'items': {
|
|
2134
|
+
'type': 'object',
|
|
2135
|
+
'properties': {
|
|
2136
|
+
'fromObjectTypeId': {'type': 'string'},
|
|
2137
|
+
'toObjectTypeId': {'type': 'string'},
|
|
2138
|
+
'name': {'type': 'string'},
|
|
2139
|
+
'cardinality': {'type': 'string'},
|
|
2140
|
+
'id': {'type': 'string'},
|
|
2141
|
+
'inverseCardinality': {'type': 'string'},
|
|
2142
|
+
'hasUserEnforcedMaxToObjectIds': {'type': 'boolean'},
|
|
2143
|
+
'hasUserEnforcedMaxFromObjectIds': {'type': 'boolean'},
|
|
2144
|
+
'maxToObjectIds': {'type': 'integer'},
|
|
2145
|
+
'maxFromObjectIds': {'type': 'integer'},
|
|
2146
|
+
'createdAt': {
|
|
2147
|
+
'type': ['string', 'null'],
|
|
2148
|
+
},
|
|
2149
|
+
'updatedAt': {
|
|
2150
|
+
'type': ['string', 'null'],
|
|
2151
|
+
},
|
|
2152
|
+
},
|
|
2153
|
+
'additionalProperties': True,
|
|
2154
|
+
},
|
|
2155
|
+
},
|
|
2156
|
+
'createdAt': {'type': 'string', 'format': 'date-time'},
|
|
2157
|
+
'updatedAt': {'type': 'string', 'format': 'date-time'},
|
|
2158
|
+
},
|
|
2159
|
+
'x-airbyte-entity-name': 'schemas',
|
|
2160
|
+
},
|
|
2161
|
+
},
|
|
2162
|
+
},
|
|
2163
|
+
},
|
|
2164
|
+
record_extractor='$.results',
|
|
2165
|
+
),
|
|
2166
|
+
Action.GET: EndpointDefinition(
|
|
2167
|
+
method='GET',
|
|
2168
|
+
path='/crm-object-schemas/v3/schemas/{objectType}',
|
|
2169
|
+
action=Action.GET,
|
|
2170
|
+
description='Get the schema for a specific custom object type',
|
|
2171
|
+
path_params=['objectType'],
|
|
2172
|
+
path_params_schema={
|
|
2173
|
+
'objectType': {'type': 'string', 'required': True},
|
|
2174
|
+
},
|
|
2175
|
+
response_schema={
|
|
2176
|
+
'type': 'object',
|
|
2177
|
+
'description': 'Custom object schema definition',
|
|
2178
|
+
'properties': {
|
|
2179
|
+
'id': {'type': 'string', 'description': 'Schema ID'},
|
|
2180
|
+
'name': {'type': 'string', 'description': 'Schema name'},
|
|
2181
|
+
'labels': {
|
|
2182
|
+
'type': 'object',
|
|
2183
|
+
'description': 'Display labels',
|
|
2184
|
+
'properties': {
|
|
2185
|
+
'singular': {'type': 'string'},
|
|
2186
|
+
'plural': {'type': 'string'},
|
|
2187
|
+
},
|
|
2188
|
+
},
|
|
2189
|
+
'objectTypeId': {'type': 'string', 'description': 'Object type identifier'},
|
|
2190
|
+
'fullyQualifiedName': {'type': 'string', 'description': 'Fully qualified name (p{portal_id}_{object_name})'},
|
|
2191
|
+
'requiredProperties': {
|
|
2192
|
+
'type': 'array',
|
|
2193
|
+
'items': {'type': 'string'},
|
|
2194
|
+
},
|
|
2195
|
+
'searchableProperties': {
|
|
2196
|
+
'type': 'array',
|
|
2197
|
+
'items': {'type': 'string'},
|
|
2198
|
+
},
|
|
2199
|
+
'primaryDisplayProperty': {'type': 'string'},
|
|
2200
|
+
'secondaryDisplayProperties': {
|
|
2201
|
+
'type': 'array',
|
|
2202
|
+
'items': {'type': 'string'},
|
|
2203
|
+
},
|
|
2204
|
+
'description': {
|
|
2205
|
+
'type': ['string', 'null'],
|
|
2206
|
+
},
|
|
2207
|
+
'allowsSensitiveProperties': {'type': 'boolean'},
|
|
2208
|
+
'archived': {'type': 'boolean'},
|
|
2209
|
+
'restorable': {'type': 'boolean'},
|
|
2210
|
+
'metaType': {'type': 'string'},
|
|
2211
|
+
'createdByUserId': {'type': 'integer'},
|
|
2212
|
+
'updatedByUserId': {'type': 'integer'},
|
|
2213
|
+
'properties': {
|
|
2214
|
+
'type': 'array',
|
|
2215
|
+
'description': 'Schema properties',
|
|
2216
|
+
'items': {
|
|
2217
|
+
'type': 'object',
|
|
2218
|
+
'properties': {
|
|
2219
|
+
'name': {'type': 'string'},
|
|
2220
|
+
'label': {'type': 'string'},
|
|
2221
|
+
'type': {'type': 'string'},
|
|
2222
|
+
'fieldType': {'type': 'string'},
|
|
2223
|
+
'description': {'type': 'string'},
|
|
2224
|
+
'groupName': {'type': 'string'},
|
|
2225
|
+
'displayOrder': {'type': 'integer'},
|
|
2226
|
+
'calculated': {'type': 'boolean'},
|
|
2227
|
+
'externalOptions': {'type': 'boolean'},
|
|
2228
|
+
'archived': {'type': 'boolean'},
|
|
2229
|
+
'hasUniqueValue': {'type': 'boolean'},
|
|
2230
|
+
'hidden': {'type': 'boolean'},
|
|
2231
|
+
'formField': {'type': 'boolean'},
|
|
2232
|
+
'dataSensitivity': {'type': 'string'},
|
|
2233
|
+
'hubspotDefined': {'type': 'boolean'},
|
|
2234
|
+
'updatedAt': {'type': 'string'},
|
|
2235
|
+
'createdAt': {'type': 'string'},
|
|
2236
|
+
'options': {'type': 'array'},
|
|
2237
|
+
'createdUserId': {'type': 'string'},
|
|
2238
|
+
'updatedUserId': {'type': 'string'},
|
|
2239
|
+
'showCurrencySymbol': {'type': 'boolean'},
|
|
2240
|
+
'modificationMetadata': {
|
|
2241
|
+
'type': 'object',
|
|
2242
|
+
'properties': {
|
|
2243
|
+
'archivable': {'type': 'boolean'},
|
|
2244
|
+
'readOnlyDefinition': {'type': 'boolean'},
|
|
2245
|
+
'readOnlyValue': {'type': 'boolean'},
|
|
2246
|
+
'readOnlyOptions': {'type': 'boolean'},
|
|
2247
|
+
},
|
|
2248
|
+
'additionalProperties': True,
|
|
2249
|
+
},
|
|
2250
|
+
},
|
|
2251
|
+
'additionalProperties': True,
|
|
2252
|
+
},
|
|
2253
|
+
},
|
|
2254
|
+
'associations': {
|
|
2255
|
+
'type': 'array',
|
|
2256
|
+
'items': {
|
|
2257
|
+
'type': 'object',
|
|
2258
|
+
'properties': {
|
|
2259
|
+
'fromObjectTypeId': {'type': 'string'},
|
|
2260
|
+
'toObjectTypeId': {'type': 'string'},
|
|
2261
|
+
'name': {'type': 'string'},
|
|
2262
|
+
'cardinality': {'type': 'string'},
|
|
2263
|
+
'id': {'type': 'string'},
|
|
2264
|
+
'inverseCardinality': {'type': 'string'},
|
|
2265
|
+
'hasUserEnforcedMaxToObjectIds': {'type': 'boolean'},
|
|
2266
|
+
'hasUserEnforcedMaxFromObjectIds': {'type': 'boolean'},
|
|
2267
|
+
'maxToObjectIds': {'type': 'integer'},
|
|
2268
|
+
'maxFromObjectIds': {'type': 'integer'},
|
|
2269
|
+
'createdAt': {
|
|
2270
|
+
'type': ['string', 'null'],
|
|
2271
|
+
},
|
|
2272
|
+
'updatedAt': {
|
|
2273
|
+
'type': ['string', 'null'],
|
|
2274
|
+
},
|
|
2275
|
+
},
|
|
2276
|
+
'additionalProperties': True,
|
|
2277
|
+
},
|
|
2278
|
+
},
|
|
2279
|
+
'createdAt': {'type': 'string', 'format': 'date-time'},
|
|
2280
|
+
'updatedAt': {'type': 'string', 'format': 'date-time'},
|
|
2281
|
+
},
|
|
2282
|
+
'x-airbyte-entity-name': 'schemas',
|
|
2283
|
+
},
|
|
2284
|
+
),
|
|
2285
|
+
},
|
|
2286
|
+
entity_schema={
|
|
2287
|
+
'type': 'object',
|
|
2288
|
+
'description': 'Custom object schema definition',
|
|
2289
|
+
'properties': {
|
|
2290
|
+
'id': {'type': 'string', 'description': 'Schema ID'},
|
|
2291
|
+
'name': {'type': 'string', 'description': 'Schema name'},
|
|
2292
|
+
'labels': {
|
|
2293
|
+
'type': 'object',
|
|
2294
|
+
'description': 'Display labels',
|
|
2295
|
+
'properties': {
|
|
2296
|
+
'singular': {'type': 'string'},
|
|
2297
|
+
'plural': {'type': 'string'},
|
|
2298
|
+
},
|
|
2299
|
+
},
|
|
2300
|
+
'objectTypeId': {'type': 'string', 'description': 'Object type identifier'},
|
|
2301
|
+
'fullyQualifiedName': {'type': 'string', 'description': 'Fully qualified name (p{portal_id}_{object_name})'},
|
|
2302
|
+
'requiredProperties': {
|
|
2303
|
+
'type': 'array',
|
|
2304
|
+
'items': {'type': 'string'},
|
|
2305
|
+
},
|
|
2306
|
+
'searchableProperties': {
|
|
2307
|
+
'type': 'array',
|
|
2308
|
+
'items': {'type': 'string'},
|
|
2309
|
+
},
|
|
2310
|
+
'primaryDisplayProperty': {'type': 'string'},
|
|
2311
|
+
'secondaryDisplayProperties': {
|
|
2312
|
+
'type': 'array',
|
|
2313
|
+
'items': {'type': 'string'},
|
|
2314
|
+
},
|
|
2315
|
+
'description': {
|
|
2316
|
+
'type': ['string', 'null'],
|
|
2317
|
+
},
|
|
2318
|
+
'allowsSensitiveProperties': {'type': 'boolean'},
|
|
2319
|
+
'archived': {'type': 'boolean'},
|
|
2320
|
+
'restorable': {'type': 'boolean'},
|
|
2321
|
+
'metaType': {'type': 'string'},
|
|
2322
|
+
'createdByUserId': {'type': 'integer'},
|
|
2323
|
+
'updatedByUserId': {'type': 'integer'},
|
|
2324
|
+
'properties': {
|
|
2325
|
+
'type': 'array',
|
|
2326
|
+
'description': 'Schema properties',
|
|
2327
|
+
'items': {
|
|
2328
|
+
'type': 'object',
|
|
2329
|
+
'properties': {
|
|
2330
|
+
'name': {'type': 'string'},
|
|
2331
|
+
'label': {'type': 'string'},
|
|
2332
|
+
'type': {'type': 'string'},
|
|
2333
|
+
'fieldType': {'type': 'string'},
|
|
2334
|
+
'description': {'type': 'string'},
|
|
2335
|
+
'groupName': {'type': 'string'},
|
|
2336
|
+
'displayOrder': {'type': 'integer'},
|
|
2337
|
+
'calculated': {'type': 'boolean'},
|
|
2338
|
+
'externalOptions': {'type': 'boolean'},
|
|
2339
|
+
'archived': {'type': 'boolean'},
|
|
2340
|
+
'hasUniqueValue': {'type': 'boolean'},
|
|
2341
|
+
'hidden': {'type': 'boolean'},
|
|
2342
|
+
'formField': {'type': 'boolean'},
|
|
2343
|
+
'dataSensitivity': {'type': 'string'},
|
|
2344
|
+
'hubspotDefined': {'type': 'boolean'},
|
|
2345
|
+
'updatedAt': {'type': 'string'},
|
|
2346
|
+
'createdAt': {'type': 'string'},
|
|
2347
|
+
'options': {'type': 'array'},
|
|
2348
|
+
'createdUserId': {'type': 'string'},
|
|
2349
|
+
'updatedUserId': {'type': 'string'},
|
|
2350
|
+
'showCurrencySymbol': {'type': 'boolean'},
|
|
2351
|
+
'modificationMetadata': {
|
|
2352
|
+
'type': 'object',
|
|
2353
|
+
'properties': {
|
|
2354
|
+
'archivable': {'type': 'boolean'},
|
|
2355
|
+
'readOnlyDefinition': {'type': 'boolean'},
|
|
2356
|
+
'readOnlyValue': {'type': 'boolean'},
|
|
2357
|
+
'readOnlyOptions': {'type': 'boolean'},
|
|
2358
|
+
},
|
|
2359
|
+
'additionalProperties': True,
|
|
2360
|
+
},
|
|
2361
|
+
},
|
|
2362
|
+
'additionalProperties': True,
|
|
2363
|
+
},
|
|
2364
|
+
},
|
|
2365
|
+
'associations': {
|
|
2366
|
+
'type': 'array',
|
|
2367
|
+
'items': {
|
|
2368
|
+
'type': 'object',
|
|
2369
|
+
'properties': {
|
|
2370
|
+
'fromObjectTypeId': {'type': 'string'},
|
|
2371
|
+
'toObjectTypeId': {'type': 'string'},
|
|
2372
|
+
'name': {'type': 'string'},
|
|
2373
|
+
'cardinality': {'type': 'string'},
|
|
2374
|
+
'id': {'type': 'string'},
|
|
2375
|
+
'inverseCardinality': {'type': 'string'},
|
|
2376
|
+
'hasUserEnforcedMaxToObjectIds': {'type': 'boolean'},
|
|
2377
|
+
'hasUserEnforcedMaxFromObjectIds': {'type': 'boolean'},
|
|
2378
|
+
'maxToObjectIds': {'type': 'integer'},
|
|
2379
|
+
'maxFromObjectIds': {'type': 'integer'},
|
|
2380
|
+
'createdAt': {
|
|
2381
|
+
'type': ['string', 'null'],
|
|
2382
|
+
},
|
|
2383
|
+
'updatedAt': {
|
|
2384
|
+
'type': ['string', 'null'],
|
|
2385
|
+
},
|
|
2386
|
+
},
|
|
2387
|
+
'additionalProperties': True,
|
|
2388
|
+
},
|
|
2389
|
+
},
|
|
2390
|
+
'createdAt': {'type': 'string', 'format': 'date-time'},
|
|
2391
|
+
'updatedAt': {'type': 'string', 'format': 'date-time'},
|
|
2392
|
+
},
|
|
2393
|
+
'x-airbyte-entity-name': 'schemas',
|
|
2394
|
+
},
|
|
2395
|
+
),
|
|
2396
|
+
EntityDefinition(
|
|
2397
|
+
name='objects',
|
|
2398
|
+
actions=[Action.LIST, Action.GET],
|
|
2399
|
+
endpoints={
|
|
2400
|
+
Action.LIST: EndpointDefinition(
|
|
2401
|
+
method='GET',
|
|
2402
|
+
path='/crm/v3/objects/{objectType}',
|
|
2403
|
+
action=Action.LIST,
|
|
2404
|
+
description='Read a page of objects. Control what is returned via the properties query param.',
|
|
2405
|
+
query_params=[
|
|
2406
|
+
'limit',
|
|
2407
|
+
'after',
|
|
2408
|
+
'properties',
|
|
2409
|
+
'archived',
|
|
2410
|
+
'associations',
|
|
2411
|
+
'propertiesWithHistory',
|
|
2412
|
+
],
|
|
2413
|
+
query_params_schema={
|
|
2414
|
+
'limit': {
|
|
2415
|
+
'type': 'integer',
|
|
2416
|
+
'required': False,
|
|
2417
|
+
'default': 25,
|
|
2418
|
+
},
|
|
2419
|
+
'after': {'type': 'string', 'required': False},
|
|
2420
|
+
'properties': {'type': 'string', 'required': False},
|
|
2421
|
+
'archived': {
|
|
2422
|
+
'type': 'boolean',
|
|
2423
|
+
'required': False,
|
|
2424
|
+
'default': False,
|
|
2425
|
+
},
|
|
2426
|
+
'associations': {'type': 'string', 'required': False},
|
|
2427
|
+
'propertiesWithHistory': {'type': 'string', 'required': False},
|
|
2428
|
+
},
|
|
2429
|
+
path_params=['objectType'],
|
|
2430
|
+
path_params_schema={
|
|
2431
|
+
'objectType': {'type': 'string', 'required': True},
|
|
2432
|
+
},
|
|
2433
|
+
response_schema={
|
|
2434
|
+
'type': 'object',
|
|
2435
|
+
'description': 'Paginated list of generic CRM objects',
|
|
2436
|
+
'properties': {
|
|
2437
|
+
'results': {
|
|
2438
|
+
'type': 'array',
|
|
2439
|
+
'items': {
|
|
2440
|
+
'type': 'object',
|
|
2441
|
+
'description': 'Generic HubSpot CRM object (for custom objects)',
|
|
2442
|
+
'properties': {
|
|
2443
|
+
'id': {'type': 'string', 'description': 'Unique object identifier'},
|
|
2444
|
+
'properties': {
|
|
2445
|
+
'type': 'object',
|
|
2446
|
+
'description': 'Object properties',
|
|
2447
|
+
'properties': {
|
|
2448
|
+
'hs_createdate': {
|
|
2449
|
+
'type': ['string', 'null'],
|
|
2450
|
+
},
|
|
2451
|
+
'hs_lastmodifieddate': {
|
|
2452
|
+
'type': ['string', 'null'],
|
|
2453
|
+
},
|
|
2454
|
+
'hs_object_id': {
|
|
2455
|
+
'type': ['string', 'null'],
|
|
2456
|
+
},
|
|
2457
|
+
},
|
|
2458
|
+
'additionalProperties': True,
|
|
2459
|
+
},
|
|
2460
|
+
'createdAt': {
|
|
2461
|
+
'type': 'string',
|
|
2462
|
+
'format': 'date-time',
|
|
2463
|
+
'description': 'Creation timestamp',
|
|
2464
|
+
},
|
|
2465
|
+
'updatedAt': {
|
|
2466
|
+
'type': 'string',
|
|
2467
|
+
'format': 'date-time',
|
|
2468
|
+
'description': 'Last update timestamp',
|
|
2469
|
+
},
|
|
2470
|
+
'archived': {'type': 'boolean', 'description': 'Whether the object is archived'},
|
|
2471
|
+
'archivedAt': {
|
|
2472
|
+
'type': ['string', 'null'],
|
|
2473
|
+
'format': 'date-time',
|
|
2474
|
+
'description': 'Timestamp when the object was archived',
|
|
2475
|
+
},
|
|
2476
|
+
'propertiesWithHistory': {
|
|
2477
|
+
'type': ['object', 'null'],
|
|
2478
|
+
'description': 'Properties with historical values',
|
|
2479
|
+
'additionalProperties': True,
|
|
2480
|
+
},
|
|
2481
|
+
'associations': {
|
|
2482
|
+
'type': ['object', 'null'],
|
|
2483
|
+
'description': 'Relationships with other CRM objects',
|
|
2484
|
+
'additionalProperties': True,
|
|
2485
|
+
},
|
|
2486
|
+
'objectWriteTraceId': {
|
|
2487
|
+
'type': ['string', 'null'],
|
|
2488
|
+
'description': 'Trace identifier for write operations',
|
|
2489
|
+
},
|
|
2490
|
+
'url': {
|
|
2491
|
+
'type': ['string', 'null'],
|
|
2492
|
+
'description': 'URL to view object in HubSpot',
|
|
2493
|
+
},
|
|
2494
|
+
},
|
|
2495
|
+
'x-airbyte-entity-name': 'objects',
|
|
2496
|
+
},
|
|
2497
|
+
},
|
|
2498
|
+
'paging': {
|
|
2499
|
+
'type': 'object',
|
|
2500
|
+
'description': 'Pagination information',
|
|
2501
|
+
'properties': {
|
|
2502
|
+
'next': {
|
|
2503
|
+
'type': 'object',
|
|
2504
|
+
'properties': {
|
|
2505
|
+
'after': {'type': 'string', 'description': 'Cursor for next page'},
|
|
2506
|
+
'link': {'type': 'string', 'description': 'URL for next page'},
|
|
2507
|
+
},
|
|
2508
|
+
},
|
|
2509
|
+
},
|
|
2510
|
+
},
|
|
2511
|
+
},
|
|
2512
|
+
},
|
|
2513
|
+
record_extractor='$.results',
|
|
2514
|
+
meta_extractor={'next_cursor': '$.paging.next.after', 'next_link': '$.paging.next.link'},
|
|
2515
|
+
),
|
|
2516
|
+
Action.GET: EndpointDefinition(
|
|
2517
|
+
method='GET',
|
|
2518
|
+
path='/crm/v3/objects/{objectType}/{objectId}',
|
|
2519
|
+
action=Action.GET,
|
|
2520
|
+
description='Read an Object identified by {objectId}. {objectId} refers to the internal object ID by default, or optionally any unique property value as specified by the idProperty query param. Control what is returned via the properties query param.',
|
|
2521
|
+
query_params=[
|
|
2522
|
+
'properties',
|
|
2523
|
+
'archived',
|
|
2524
|
+
'associations',
|
|
2525
|
+
'idProperty',
|
|
2526
|
+
'propertiesWithHistory',
|
|
2527
|
+
],
|
|
2528
|
+
query_params_schema={
|
|
2529
|
+
'properties': {'type': 'string', 'required': False},
|
|
2530
|
+
'archived': {'type': 'boolean', 'required': False},
|
|
2531
|
+
'associations': {'type': 'string', 'required': False},
|
|
2532
|
+
'idProperty': {'type': 'string', 'required': False},
|
|
2533
|
+
'propertiesWithHistory': {'type': 'string', 'required': False},
|
|
2534
|
+
},
|
|
2535
|
+
path_params=['objectType', 'objectId'],
|
|
2536
|
+
path_params_schema={
|
|
2537
|
+
'objectType': {'type': 'string', 'required': True},
|
|
2538
|
+
'objectId': {'type': 'string', 'required': True},
|
|
2539
|
+
},
|
|
2540
|
+
response_schema={
|
|
2541
|
+
'type': 'object',
|
|
2542
|
+
'description': 'Generic HubSpot CRM object (for custom objects)',
|
|
2543
|
+
'properties': {
|
|
2544
|
+
'id': {'type': 'string', 'description': 'Unique object identifier'},
|
|
2545
|
+
'properties': {
|
|
2546
|
+
'type': 'object',
|
|
2547
|
+
'description': 'Object properties',
|
|
2548
|
+
'properties': {
|
|
2549
|
+
'hs_createdate': {
|
|
2550
|
+
'type': ['string', 'null'],
|
|
2551
|
+
},
|
|
2552
|
+
'hs_lastmodifieddate': {
|
|
2553
|
+
'type': ['string', 'null'],
|
|
2554
|
+
},
|
|
2555
|
+
'hs_object_id': {
|
|
2556
|
+
'type': ['string', 'null'],
|
|
2557
|
+
},
|
|
2558
|
+
},
|
|
2559
|
+
'additionalProperties': True,
|
|
2560
|
+
},
|
|
2561
|
+
'createdAt': {
|
|
2562
|
+
'type': 'string',
|
|
2563
|
+
'format': 'date-time',
|
|
2564
|
+
'description': 'Creation timestamp',
|
|
2565
|
+
},
|
|
2566
|
+
'updatedAt': {
|
|
2567
|
+
'type': 'string',
|
|
2568
|
+
'format': 'date-time',
|
|
2569
|
+
'description': 'Last update timestamp',
|
|
2570
|
+
},
|
|
2571
|
+
'archived': {'type': 'boolean', 'description': 'Whether the object is archived'},
|
|
2572
|
+
'archivedAt': {
|
|
2573
|
+
'type': ['string', 'null'],
|
|
2574
|
+
'format': 'date-time',
|
|
2575
|
+
'description': 'Timestamp when the object was archived',
|
|
2576
|
+
},
|
|
2577
|
+
'propertiesWithHistory': {
|
|
2578
|
+
'type': ['object', 'null'],
|
|
2579
|
+
'description': 'Properties with historical values',
|
|
2580
|
+
'additionalProperties': True,
|
|
2581
|
+
},
|
|
2582
|
+
'associations': {
|
|
2583
|
+
'type': ['object', 'null'],
|
|
2584
|
+
'description': 'Relationships with other CRM objects',
|
|
2585
|
+
'additionalProperties': True,
|
|
2586
|
+
},
|
|
2587
|
+
'objectWriteTraceId': {
|
|
2588
|
+
'type': ['string', 'null'],
|
|
2589
|
+
'description': 'Trace identifier for write operations',
|
|
2590
|
+
},
|
|
2591
|
+
'url': {
|
|
2592
|
+
'type': ['string', 'null'],
|
|
2593
|
+
'description': 'URL to view object in HubSpot',
|
|
2594
|
+
},
|
|
2595
|
+
},
|
|
2596
|
+
'x-airbyte-entity-name': 'objects',
|
|
2597
|
+
},
|
|
2598
|
+
),
|
|
2599
|
+
},
|
|
2600
|
+
entity_schema={
|
|
2601
|
+
'type': 'object',
|
|
2602
|
+
'description': 'Generic HubSpot CRM object (for custom objects)',
|
|
2603
|
+
'properties': {
|
|
2604
|
+
'id': {'type': 'string', 'description': 'Unique object identifier'},
|
|
2605
|
+
'properties': {
|
|
2606
|
+
'type': 'object',
|
|
2607
|
+
'description': 'Object properties',
|
|
2608
|
+
'properties': {
|
|
2609
|
+
'hs_createdate': {
|
|
2610
|
+
'type': ['string', 'null'],
|
|
2611
|
+
},
|
|
2612
|
+
'hs_lastmodifieddate': {
|
|
2613
|
+
'type': ['string', 'null'],
|
|
2614
|
+
},
|
|
2615
|
+
'hs_object_id': {
|
|
2616
|
+
'type': ['string', 'null'],
|
|
2617
|
+
},
|
|
2618
|
+
},
|
|
2619
|
+
'additionalProperties': True,
|
|
2620
|
+
},
|
|
2621
|
+
'createdAt': {
|
|
2622
|
+
'type': 'string',
|
|
2623
|
+
'format': 'date-time',
|
|
2624
|
+
'description': 'Creation timestamp',
|
|
2625
|
+
},
|
|
2626
|
+
'updatedAt': {
|
|
2627
|
+
'type': 'string',
|
|
2628
|
+
'format': 'date-time',
|
|
2629
|
+
'description': 'Last update timestamp',
|
|
2630
|
+
},
|
|
2631
|
+
'archived': {'type': 'boolean', 'description': 'Whether the object is archived'},
|
|
2632
|
+
'archivedAt': {
|
|
2633
|
+
'type': ['string', 'null'],
|
|
2634
|
+
'format': 'date-time',
|
|
2635
|
+
'description': 'Timestamp when the object was archived',
|
|
2636
|
+
},
|
|
2637
|
+
'propertiesWithHistory': {
|
|
2638
|
+
'type': ['object', 'null'],
|
|
2639
|
+
'description': 'Properties with historical values',
|
|
2640
|
+
'additionalProperties': True,
|
|
2641
|
+
},
|
|
2642
|
+
'associations': {
|
|
2643
|
+
'type': ['object', 'null'],
|
|
2644
|
+
'description': 'Relationships with other CRM objects',
|
|
2645
|
+
'additionalProperties': True,
|
|
2646
|
+
},
|
|
2647
|
+
'objectWriteTraceId': {
|
|
2648
|
+
'type': ['string', 'null'],
|
|
2649
|
+
'description': 'Trace identifier for write operations',
|
|
2650
|
+
},
|
|
2651
|
+
'url': {
|
|
2652
|
+
'type': ['string', 'null'],
|
|
2653
|
+
'description': 'URL to view object in HubSpot',
|
|
2654
|
+
},
|
|
2655
|
+
},
|
|
2656
|
+
'x-airbyte-entity-name': 'objects',
|
|
2657
|
+
},
|
|
2658
|
+
),
|
|
2659
|
+
],
|
|
2660
|
+
)
|