airbyte-agent-salesforce 0.1.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. airbyte_agent_salesforce/__init__.py +87 -0
  2. airbyte_agent_salesforce/_vendored/__init__.py +1 -0
  3. airbyte_agent_salesforce/_vendored/connector_sdk/__init__.py +82 -0
  4. airbyte_agent_salesforce/_vendored/connector_sdk/auth_strategies.py +1123 -0
  5. airbyte_agent_salesforce/_vendored/connector_sdk/auth_template.py +135 -0
  6. airbyte_agent_salesforce/_vendored/connector_sdk/cloud_utils/__init__.py +5 -0
  7. airbyte_agent_salesforce/_vendored/connector_sdk/cloud_utils/client.py +213 -0
  8. airbyte_agent_salesforce/_vendored/connector_sdk/connector_model_loader.py +957 -0
  9. airbyte_agent_salesforce/_vendored/connector_sdk/constants.py +78 -0
  10. airbyte_agent_salesforce/_vendored/connector_sdk/exceptions.py +23 -0
  11. airbyte_agent_salesforce/_vendored/connector_sdk/executor/__init__.py +31 -0
  12. airbyte_agent_salesforce/_vendored/connector_sdk/executor/hosted_executor.py +197 -0
  13. airbyte_agent_salesforce/_vendored/connector_sdk/executor/local_executor.py +1504 -0
  14. airbyte_agent_salesforce/_vendored/connector_sdk/executor/models.py +190 -0
  15. airbyte_agent_salesforce/_vendored/connector_sdk/extensions.py +655 -0
  16. airbyte_agent_salesforce/_vendored/connector_sdk/http/__init__.py +37 -0
  17. airbyte_agent_salesforce/_vendored/connector_sdk/http/adapters/__init__.py +9 -0
  18. airbyte_agent_salesforce/_vendored/connector_sdk/http/adapters/httpx_adapter.py +251 -0
  19. airbyte_agent_salesforce/_vendored/connector_sdk/http/config.py +98 -0
  20. airbyte_agent_salesforce/_vendored/connector_sdk/http/exceptions.py +119 -0
  21. airbyte_agent_salesforce/_vendored/connector_sdk/http/protocols.py +114 -0
  22. airbyte_agent_salesforce/_vendored/connector_sdk/http/response.py +102 -0
  23. airbyte_agent_salesforce/_vendored/connector_sdk/http_client.py +686 -0
  24. airbyte_agent_salesforce/_vendored/connector_sdk/logging/__init__.py +11 -0
  25. airbyte_agent_salesforce/_vendored/connector_sdk/logging/logger.py +264 -0
  26. airbyte_agent_salesforce/_vendored/connector_sdk/logging/types.py +92 -0
  27. airbyte_agent_salesforce/_vendored/connector_sdk/observability/__init__.py +11 -0
  28. airbyte_agent_salesforce/_vendored/connector_sdk/observability/models.py +19 -0
  29. airbyte_agent_salesforce/_vendored/connector_sdk/observability/redactor.py +81 -0
  30. airbyte_agent_salesforce/_vendored/connector_sdk/observability/session.py +94 -0
  31. airbyte_agent_salesforce/_vendored/connector_sdk/performance/__init__.py +6 -0
  32. airbyte_agent_salesforce/_vendored/connector_sdk/performance/instrumentation.py +57 -0
  33. airbyte_agent_salesforce/_vendored/connector_sdk/performance/metrics.py +93 -0
  34. airbyte_agent_salesforce/_vendored/connector_sdk/schema/__init__.py +75 -0
  35. airbyte_agent_salesforce/_vendored/connector_sdk/schema/base.py +161 -0
  36. airbyte_agent_salesforce/_vendored/connector_sdk/schema/components.py +238 -0
  37. airbyte_agent_salesforce/_vendored/connector_sdk/schema/connector.py +131 -0
  38. airbyte_agent_salesforce/_vendored/connector_sdk/schema/extensions.py +109 -0
  39. airbyte_agent_salesforce/_vendored/connector_sdk/schema/operations.py +146 -0
  40. airbyte_agent_salesforce/_vendored/connector_sdk/schema/security.py +213 -0
  41. airbyte_agent_salesforce/_vendored/connector_sdk/secrets.py +182 -0
  42. airbyte_agent_salesforce/_vendored/connector_sdk/telemetry/__init__.py +10 -0
  43. airbyte_agent_salesforce/_vendored/connector_sdk/telemetry/config.py +32 -0
  44. airbyte_agent_salesforce/_vendored/connector_sdk/telemetry/events.py +58 -0
  45. airbyte_agent_salesforce/_vendored/connector_sdk/telemetry/tracker.py +151 -0
  46. airbyte_agent_salesforce/_vendored/connector_sdk/types.py +241 -0
  47. airbyte_agent_salesforce/_vendored/connector_sdk/utils.py +60 -0
  48. airbyte_agent_salesforce/_vendored/connector_sdk/validation.py +822 -0
  49. airbyte_agent_salesforce/connector.py +1862 -0
  50. airbyte_agent_salesforce/connector_model.py +1597 -0
  51. airbyte_agent_salesforce/models.py +365 -0
  52. airbyte_agent_salesforce/types.py +166 -0
  53. airbyte_agent_salesforce-0.1.17.dist-info/METADATA +113 -0
  54. airbyte_agent_salesforce-0.1.17.dist-info/RECORD +55 -0
  55. airbyte_agent_salesforce-0.1.17.dist-info/WHEEL +4 -0
@@ -0,0 +1,1597 @@
1
+ """
2
+ Connector model for salesforce.
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 ._vendored.connector_sdk.schema.components import (
23
+ PathOverrideConfig,
24
+ )
25
+ from uuid import (
26
+ UUID,
27
+ )
28
+
29
+ SalesforceConnectorModel: ConnectorModel = ConnectorModel(
30
+ id=UUID('b117307c-14b6-41aa-9422-947e34922962'),
31
+ name='salesforce',
32
+ version='1.0.3',
33
+ base_url='{instance_url}/services/data/v59.0',
34
+ auth=AuthConfig(
35
+ type=AuthType.OAUTH2,
36
+ config={
37
+ 'header': 'Authorization',
38
+ 'prefix': 'Bearer',
39
+ 'refresh_url': 'https://login.salesforce.com/services/oauth2/token',
40
+ 'token_extract': ['instance_url'],
41
+ },
42
+ user_config_spec=AirbyteAuthConfig(
43
+ title='Salesforce OAuth 2.0',
44
+ type='object',
45
+ required=['refresh_token', 'client_id', 'client_secret'],
46
+ properties={
47
+ 'refresh_token': AuthConfigFieldSpec(
48
+ title='Refresh Token',
49
+ description='OAuth refresh token for automatic token renewal',
50
+ airbyte_secret=True,
51
+ ),
52
+ 'client_id': AuthConfigFieldSpec(
53
+ title='Client ID',
54
+ description='Connected App Consumer Key',
55
+ ),
56
+ 'client_secret': AuthConfigFieldSpec(
57
+ title='Client Secret',
58
+ description='Connected App Consumer Secret',
59
+ airbyte_secret=True,
60
+ ),
61
+ },
62
+ auth_mapping={
63
+ 'refresh_token': '${refresh_token}',
64
+ 'client_id': '${client_id}',
65
+ 'client_secret': '${client_secret}',
66
+ },
67
+ ),
68
+ ),
69
+ entities=[
70
+ EntityDefinition(
71
+ name='accounts',
72
+ actions=[Action.LIST, Action.GET, Action.SEARCH],
73
+ endpoints={
74
+ Action.LIST: EndpointDefinition(
75
+ method='GET',
76
+ path='/query:accounts',
77
+ path_override=PathOverrideConfig(
78
+ path='/query',
79
+ ),
80
+ action=Action.LIST,
81
+ description='Returns a list of accounts via SOQL query. Default returns up to 200 records.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\n',
82
+ query_params=['q'],
83
+ query_params_schema={
84
+ 'q': {
85
+ 'type': 'string',
86
+ 'required': True,
87
+ 'default': 'SELECT FIELDS(STANDARD) FROM Account ORDER BY LastModifiedDate DESC LIMIT 200',
88
+ },
89
+ },
90
+ response_schema={
91
+ 'type': 'object',
92
+ 'description': 'SOQL query result for accounts',
93
+ 'properties': {
94
+ 'totalSize': {'type': 'integer', 'description': 'Total number of records'},
95
+ 'done': {'type': 'boolean', 'description': 'Whether all records have been returned'},
96
+ 'nextRecordsUrl': {'type': 'string', 'description': 'URL to fetch next page of results'},
97
+ 'records': {
98
+ 'type': 'array',
99
+ 'items': {
100
+ 'type': 'object',
101
+ 'description': 'Salesforce Account object - uses FIELDS(STANDARD) so all standard fields are returned',
102
+ 'properties': {
103
+ 'Id': {'type': 'string', 'description': 'Unique identifier'},
104
+ 'Name': {'type': 'string', 'description': 'Account name'},
105
+ 'attributes': {
106
+ 'type': 'object',
107
+ 'properties': {
108
+ 'type': {'type': 'string'},
109
+ 'url': {'type': 'string'},
110
+ },
111
+ },
112
+ },
113
+ 'additionalProperties': True,
114
+ 'x-airbyte-entity-name': 'accounts',
115
+ },
116
+ },
117
+ },
118
+ },
119
+ ),
120
+ Action.GET: EndpointDefinition(
121
+ method='GET',
122
+ path='/sobjects/Account/{id}',
123
+ action=Action.GET,
124
+ description='Get a single account by ID. Returns all accessible fields by default.\nUse the `fields` parameter to retrieve only specific fields for better performance.\n',
125
+ query_params=['fields'],
126
+ query_params_schema={
127
+ 'fields': {'type': 'string', 'required': False},
128
+ },
129
+ path_params=['id'],
130
+ path_params_schema={
131
+ 'id': {'type': 'string', 'required': True},
132
+ },
133
+ response_schema={
134
+ 'type': 'object',
135
+ 'description': 'Salesforce Account object - uses FIELDS(STANDARD) so all standard fields are returned',
136
+ 'properties': {
137
+ 'Id': {'type': 'string', 'description': 'Unique identifier'},
138
+ 'Name': {'type': 'string', 'description': 'Account name'},
139
+ 'attributes': {
140
+ 'type': 'object',
141
+ 'properties': {
142
+ 'type': {'type': 'string'},
143
+ 'url': {'type': 'string'},
144
+ },
145
+ },
146
+ },
147
+ 'additionalProperties': True,
148
+ 'x-airbyte-entity-name': 'accounts',
149
+ },
150
+ ),
151
+ Action.SEARCH: EndpointDefinition(
152
+ method='GET',
153
+ path='/search:accounts',
154
+ path_override=PathOverrideConfig(
155
+ path='/search',
156
+ ),
157
+ action=Action.SEARCH,
158
+ description='Search for accounts using SOSL (Salesforce Object Search Language).\nSOSL is optimized for text-based searches across multiple fields and objects.\nUse SOQL (list action) for structured queries with specific field conditions.\n',
159
+ query_params=['q'],
160
+ query_params_schema={
161
+ 'q': {'type': 'string', 'required': True},
162
+ },
163
+ response_schema={
164
+ 'type': 'object',
165
+ 'description': 'SOSL search result',
166
+ 'properties': {
167
+ 'searchRecords': {
168
+ 'type': 'array',
169
+ 'description': 'Array of search result records',
170
+ 'items': {
171
+ 'type': 'object',
172
+ 'properties': {
173
+ 'Id': {'type': 'string'},
174
+ 'attributes': {
175
+ 'type': 'object',
176
+ 'properties': {
177
+ 'type': {'type': 'string'},
178
+ 'url': {'type': 'string'},
179
+ },
180
+ },
181
+ },
182
+ 'additionalProperties': True,
183
+ },
184
+ },
185
+ },
186
+ },
187
+ ),
188
+ },
189
+ entity_schema={
190
+ 'type': 'object',
191
+ 'description': 'Salesforce Account object - uses FIELDS(STANDARD) so all standard fields are returned',
192
+ 'properties': {
193
+ 'Id': {'type': 'string', 'description': 'Unique identifier'},
194
+ 'Name': {'type': 'string', 'description': 'Account name'},
195
+ 'attributes': {
196
+ 'type': 'object',
197
+ 'properties': {
198
+ 'type': {'type': 'string'},
199
+ 'url': {'type': 'string'},
200
+ },
201
+ },
202
+ },
203
+ 'additionalProperties': True,
204
+ 'x-airbyte-entity-name': 'accounts',
205
+ },
206
+ ),
207
+ EntityDefinition(
208
+ name='contacts',
209
+ actions=[Action.LIST, Action.GET, Action.SEARCH],
210
+ endpoints={
211
+ Action.LIST: EndpointDefinition(
212
+ method='GET',
213
+ path='/query:contacts',
214
+ path_override=PathOverrideConfig(
215
+ path='/query',
216
+ ),
217
+ action=Action.LIST,
218
+ description='Returns a list of contacts via SOQL query. Default returns up to 200 records.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\n',
219
+ query_params=['q'],
220
+ query_params_schema={
221
+ 'q': {
222
+ 'type': 'string',
223
+ 'required': True,
224
+ 'default': 'SELECT FIELDS(STANDARD) FROM Contact ORDER BY LastModifiedDate DESC LIMIT 200',
225
+ },
226
+ },
227
+ response_schema={
228
+ 'type': 'object',
229
+ 'description': 'SOQL query result for contacts',
230
+ 'properties': {
231
+ 'totalSize': {'type': 'integer'},
232
+ 'done': {'type': 'boolean'},
233
+ 'nextRecordsUrl': {'type': 'string'},
234
+ 'records': {
235
+ 'type': 'array',
236
+ 'items': {
237
+ 'type': 'object',
238
+ 'description': 'Salesforce Contact object - uses FIELDS(STANDARD) so all standard fields are returned',
239
+ 'properties': {
240
+ 'Id': {'type': 'string'},
241
+ 'Name': {'type': 'string'},
242
+ 'attributes': {
243
+ 'type': 'object',
244
+ 'properties': {
245
+ 'type': {'type': 'string'},
246
+ 'url': {'type': 'string'},
247
+ },
248
+ },
249
+ },
250
+ 'additionalProperties': True,
251
+ 'x-airbyte-entity-name': 'contacts',
252
+ },
253
+ },
254
+ },
255
+ },
256
+ ),
257
+ Action.GET: EndpointDefinition(
258
+ method='GET',
259
+ path='/sobjects/Contact/{id}',
260
+ action=Action.GET,
261
+ description='Get a single contact by ID. Returns all accessible fields by default.\nUse the `fields` parameter to retrieve only specific fields for better performance.\n',
262
+ query_params=['fields'],
263
+ query_params_schema={
264
+ 'fields': {'type': 'string', 'required': False},
265
+ },
266
+ path_params=['id'],
267
+ path_params_schema={
268
+ 'id': {'type': 'string', 'required': True},
269
+ },
270
+ response_schema={
271
+ 'type': 'object',
272
+ 'description': 'Salesforce Contact object - uses FIELDS(STANDARD) so all standard fields are returned',
273
+ 'properties': {
274
+ 'Id': {'type': 'string'},
275
+ 'Name': {'type': 'string'},
276
+ 'attributes': {
277
+ 'type': 'object',
278
+ 'properties': {
279
+ 'type': {'type': 'string'},
280
+ 'url': {'type': 'string'},
281
+ },
282
+ },
283
+ },
284
+ 'additionalProperties': True,
285
+ 'x-airbyte-entity-name': 'contacts',
286
+ },
287
+ ),
288
+ Action.SEARCH: EndpointDefinition(
289
+ method='GET',
290
+ path='/search:contacts',
291
+ path_override=PathOverrideConfig(
292
+ path='/search',
293
+ ),
294
+ action=Action.SEARCH,
295
+ description='Search for contacts using SOSL (Salesforce Object Search Language).\nSOSL is optimized for text-based searches across multiple fields.\n',
296
+ query_params=['q'],
297
+ query_params_schema={
298
+ 'q': {'type': 'string', 'required': True},
299
+ },
300
+ response_schema={
301
+ 'type': 'object',
302
+ 'description': 'SOSL search result',
303
+ 'properties': {
304
+ 'searchRecords': {
305
+ 'type': 'array',
306
+ 'description': 'Array of search result records',
307
+ 'items': {
308
+ 'type': 'object',
309
+ 'properties': {
310
+ 'Id': {'type': 'string'},
311
+ 'attributes': {
312
+ 'type': 'object',
313
+ 'properties': {
314
+ 'type': {'type': 'string'},
315
+ 'url': {'type': 'string'},
316
+ },
317
+ },
318
+ },
319
+ 'additionalProperties': True,
320
+ },
321
+ },
322
+ },
323
+ },
324
+ ),
325
+ },
326
+ entity_schema={
327
+ 'type': 'object',
328
+ 'description': 'Salesforce Contact object - uses FIELDS(STANDARD) so all standard fields are returned',
329
+ 'properties': {
330
+ 'Id': {'type': 'string'},
331
+ 'Name': {'type': 'string'},
332
+ 'attributes': {
333
+ 'type': 'object',
334
+ 'properties': {
335
+ 'type': {'type': 'string'},
336
+ 'url': {'type': 'string'},
337
+ },
338
+ },
339
+ },
340
+ 'additionalProperties': True,
341
+ 'x-airbyte-entity-name': 'contacts',
342
+ },
343
+ ),
344
+ EntityDefinition(
345
+ name='leads',
346
+ actions=[Action.LIST, Action.GET, Action.SEARCH],
347
+ endpoints={
348
+ Action.LIST: EndpointDefinition(
349
+ method='GET',
350
+ path='/query:leads',
351
+ path_override=PathOverrideConfig(
352
+ path='/query',
353
+ ),
354
+ action=Action.LIST,
355
+ description='Returns a list of leads via SOQL query. Default returns up to 200 records.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\n',
356
+ query_params=['q'],
357
+ query_params_schema={
358
+ 'q': {
359
+ 'type': 'string',
360
+ 'required': True,
361
+ 'default': 'SELECT FIELDS(STANDARD) FROM Lead ORDER BY LastModifiedDate DESC LIMIT 200',
362
+ },
363
+ },
364
+ response_schema={
365
+ 'type': 'object',
366
+ 'description': 'SOQL query result for leads',
367
+ 'properties': {
368
+ 'totalSize': {'type': 'integer'},
369
+ 'done': {'type': 'boolean'},
370
+ 'nextRecordsUrl': {'type': 'string'},
371
+ 'records': {
372
+ 'type': 'array',
373
+ 'items': {
374
+ 'type': 'object',
375
+ 'description': 'Salesforce Lead object - uses FIELDS(STANDARD) so all standard fields are returned',
376
+ 'properties': {
377
+ 'Id': {'type': 'string'},
378
+ 'Name': {'type': 'string'},
379
+ 'attributes': {
380
+ 'type': 'object',
381
+ 'properties': {
382
+ 'type': {'type': 'string'},
383
+ 'url': {'type': 'string'},
384
+ },
385
+ },
386
+ },
387
+ 'additionalProperties': True,
388
+ 'x-airbyte-entity-name': 'leads',
389
+ },
390
+ },
391
+ },
392
+ },
393
+ ),
394
+ Action.GET: EndpointDefinition(
395
+ method='GET',
396
+ path='/sobjects/Lead/{id}',
397
+ action=Action.GET,
398
+ description='Get a single lead by ID. Returns all accessible fields by default.\nUse the `fields` parameter to retrieve only specific fields for better performance.\n',
399
+ query_params=['fields'],
400
+ query_params_schema={
401
+ 'fields': {'type': 'string', 'required': False},
402
+ },
403
+ path_params=['id'],
404
+ path_params_schema={
405
+ 'id': {'type': 'string', 'required': True},
406
+ },
407
+ response_schema={
408
+ 'type': 'object',
409
+ 'description': 'Salesforce Lead object - uses FIELDS(STANDARD) so all standard fields are returned',
410
+ 'properties': {
411
+ 'Id': {'type': 'string'},
412
+ 'Name': {'type': 'string'},
413
+ 'attributes': {
414
+ 'type': 'object',
415
+ 'properties': {
416
+ 'type': {'type': 'string'},
417
+ 'url': {'type': 'string'},
418
+ },
419
+ },
420
+ },
421
+ 'additionalProperties': True,
422
+ 'x-airbyte-entity-name': 'leads',
423
+ },
424
+ ),
425
+ Action.SEARCH: EndpointDefinition(
426
+ method='GET',
427
+ path='/search:leads',
428
+ path_override=PathOverrideConfig(
429
+ path='/search',
430
+ ),
431
+ action=Action.SEARCH,
432
+ description='Search for leads using SOSL (Salesforce Object Search Language).\nSOSL is optimized for text-based searches across multiple fields.\n',
433
+ query_params=['q'],
434
+ query_params_schema={
435
+ 'q': {'type': 'string', 'required': True},
436
+ },
437
+ response_schema={
438
+ 'type': 'object',
439
+ 'description': 'SOSL search result',
440
+ 'properties': {
441
+ 'searchRecords': {
442
+ 'type': 'array',
443
+ 'description': 'Array of search result records',
444
+ 'items': {
445
+ 'type': 'object',
446
+ 'properties': {
447
+ 'Id': {'type': 'string'},
448
+ 'attributes': {
449
+ 'type': 'object',
450
+ 'properties': {
451
+ 'type': {'type': 'string'},
452
+ 'url': {'type': 'string'},
453
+ },
454
+ },
455
+ },
456
+ 'additionalProperties': True,
457
+ },
458
+ },
459
+ },
460
+ },
461
+ ),
462
+ },
463
+ entity_schema={
464
+ 'type': 'object',
465
+ 'description': 'Salesforce Lead object - uses FIELDS(STANDARD) so all standard fields are returned',
466
+ 'properties': {
467
+ 'Id': {'type': 'string'},
468
+ 'Name': {'type': 'string'},
469
+ 'attributes': {
470
+ 'type': 'object',
471
+ 'properties': {
472
+ 'type': {'type': 'string'},
473
+ 'url': {'type': 'string'},
474
+ },
475
+ },
476
+ },
477
+ 'additionalProperties': True,
478
+ 'x-airbyte-entity-name': 'leads',
479
+ },
480
+ ),
481
+ EntityDefinition(
482
+ name='opportunities',
483
+ actions=[Action.LIST, Action.GET, Action.SEARCH],
484
+ endpoints={
485
+ Action.LIST: EndpointDefinition(
486
+ method='GET',
487
+ path='/query:opportunities',
488
+ path_override=PathOverrideConfig(
489
+ path='/query',
490
+ ),
491
+ action=Action.LIST,
492
+ description='Returns a list of opportunities via SOQL query. Default returns up to 200 records.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\n',
493
+ query_params=['q'],
494
+ query_params_schema={
495
+ 'q': {
496
+ 'type': 'string',
497
+ 'required': True,
498
+ 'default': 'SELECT FIELDS(STANDARD) FROM Opportunity ORDER BY LastModifiedDate DESC LIMIT 200',
499
+ },
500
+ },
501
+ response_schema={
502
+ 'type': 'object',
503
+ 'description': 'SOQL query result for opportunities',
504
+ 'properties': {
505
+ 'totalSize': {'type': 'integer'},
506
+ 'done': {'type': 'boolean'},
507
+ 'nextRecordsUrl': {'type': 'string'},
508
+ 'records': {
509
+ 'type': 'array',
510
+ 'items': {
511
+ 'type': 'object',
512
+ 'description': 'Salesforce Opportunity object - uses FIELDS(STANDARD) so all standard fields are returned',
513
+ 'properties': {
514
+ 'Id': {'type': 'string'},
515
+ 'Name': {'type': 'string'},
516
+ 'attributes': {
517
+ 'type': 'object',
518
+ 'properties': {
519
+ 'type': {'type': 'string'},
520
+ 'url': {'type': 'string'},
521
+ },
522
+ },
523
+ },
524
+ 'additionalProperties': True,
525
+ 'x-airbyte-entity-name': 'opportunities',
526
+ },
527
+ },
528
+ },
529
+ },
530
+ ),
531
+ Action.GET: EndpointDefinition(
532
+ method='GET',
533
+ path='/sobjects/Opportunity/{id}',
534
+ action=Action.GET,
535
+ description='Get a single opportunity by ID. Returns all accessible fields by default.\nUse the `fields` parameter to retrieve only specific fields for better performance.\n',
536
+ query_params=['fields'],
537
+ query_params_schema={
538
+ 'fields': {'type': 'string', 'required': False},
539
+ },
540
+ path_params=['id'],
541
+ path_params_schema={
542
+ 'id': {'type': 'string', 'required': True},
543
+ },
544
+ response_schema={
545
+ 'type': 'object',
546
+ 'description': 'Salesforce Opportunity object - uses FIELDS(STANDARD) so all standard fields are returned',
547
+ 'properties': {
548
+ 'Id': {'type': 'string'},
549
+ 'Name': {'type': 'string'},
550
+ 'attributes': {
551
+ 'type': 'object',
552
+ 'properties': {
553
+ 'type': {'type': 'string'},
554
+ 'url': {'type': 'string'},
555
+ },
556
+ },
557
+ },
558
+ 'additionalProperties': True,
559
+ 'x-airbyte-entity-name': 'opportunities',
560
+ },
561
+ ),
562
+ Action.SEARCH: EndpointDefinition(
563
+ method='GET',
564
+ path='/search:opportunities',
565
+ path_override=PathOverrideConfig(
566
+ path='/search',
567
+ ),
568
+ action=Action.SEARCH,
569
+ description='Search for opportunities using SOSL (Salesforce Object Search Language).\nSOSL is optimized for text-based searches across multiple fields.\n',
570
+ query_params=['q'],
571
+ query_params_schema={
572
+ 'q': {'type': 'string', 'required': True},
573
+ },
574
+ response_schema={
575
+ 'type': 'object',
576
+ 'description': 'SOSL search result',
577
+ 'properties': {
578
+ 'searchRecords': {
579
+ 'type': 'array',
580
+ 'description': 'Array of search result records',
581
+ 'items': {
582
+ 'type': 'object',
583
+ 'properties': {
584
+ 'Id': {'type': 'string'},
585
+ 'attributes': {
586
+ 'type': 'object',
587
+ 'properties': {
588
+ 'type': {'type': 'string'},
589
+ 'url': {'type': 'string'},
590
+ },
591
+ },
592
+ },
593
+ 'additionalProperties': True,
594
+ },
595
+ },
596
+ },
597
+ },
598
+ ),
599
+ },
600
+ entity_schema={
601
+ 'type': 'object',
602
+ 'description': 'Salesforce Opportunity object - uses FIELDS(STANDARD) so all standard fields are returned',
603
+ 'properties': {
604
+ 'Id': {'type': 'string'},
605
+ 'Name': {'type': 'string'},
606
+ 'attributes': {
607
+ 'type': 'object',
608
+ 'properties': {
609
+ 'type': {'type': 'string'},
610
+ 'url': {'type': 'string'},
611
+ },
612
+ },
613
+ },
614
+ 'additionalProperties': True,
615
+ 'x-airbyte-entity-name': 'opportunities',
616
+ },
617
+ ),
618
+ EntityDefinition(
619
+ name='tasks',
620
+ actions=[Action.LIST, Action.GET, Action.SEARCH],
621
+ endpoints={
622
+ Action.LIST: EndpointDefinition(
623
+ method='GET',
624
+ path='/query:tasks',
625
+ path_override=PathOverrideConfig(
626
+ path='/query',
627
+ ),
628
+ action=Action.LIST,
629
+ description='Returns a list of tasks via SOQL query. Default returns up to 200 records.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\n',
630
+ query_params=['q'],
631
+ query_params_schema={
632
+ 'q': {
633
+ 'type': 'string',
634
+ 'required': True,
635
+ 'default': 'SELECT FIELDS(STANDARD) FROM Task ORDER BY LastModifiedDate DESC LIMIT 200',
636
+ },
637
+ },
638
+ response_schema={
639
+ 'type': 'object',
640
+ 'description': 'SOQL query result for tasks',
641
+ 'properties': {
642
+ 'totalSize': {'type': 'integer'},
643
+ 'done': {'type': 'boolean'},
644
+ 'nextRecordsUrl': {'type': 'string'},
645
+ 'records': {
646
+ 'type': 'array',
647
+ 'items': {
648
+ 'type': 'object',
649
+ 'description': 'Salesforce Task object - uses FIELDS(STANDARD) so all standard fields are returned',
650
+ 'properties': {
651
+ 'Id': {'type': 'string'},
652
+ 'Subject': {'type': 'string'},
653
+ 'attributes': {
654
+ 'type': 'object',
655
+ 'properties': {
656
+ 'type': {'type': 'string'},
657
+ 'url': {'type': 'string'},
658
+ },
659
+ },
660
+ },
661
+ 'additionalProperties': True,
662
+ 'x-airbyte-entity-name': 'tasks',
663
+ },
664
+ },
665
+ },
666
+ },
667
+ ),
668
+ Action.GET: EndpointDefinition(
669
+ method='GET',
670
+ path='/sobjects/Task/{id}',
671
+ action=Action.GET,
672
+ description='Get a single task by ID. Returns all accessible fields by default.\nUse the `fields` parameter to retrieve only specific fields for better performance.\n',
673
+ query_params=['fields'],
674
+ query_params_schema={
675
+ 'fields': {'type': 'string', 'required': False},
676
+ },
677
+ path_params=['id'],
678
+ path_params_schema={
679
+ 'id': {'type': 'string', 'required': True},
680
+ },
681
+ response_schema={
682
+ 'type': 'object',
683
+ 'description': 'Salesforce Task object - uses FIELDS(STANDARD) so all standard fields are returned',
684
+ 'properties': {
685
+ 'Id': {'type': 'string'},
686
+ 'Subject': {'type': 'string'},
687
+ 'attributes': {
688
+ 'type': 'object',
689
+ 'properties': {
690
+ 'type': {'type': 'string'},
691
+ 'url': {'type': 'string'},
692
+ },
693
+ },
694
+ },
695
+ 'additionalProperties': True,
696
+ 'x-airbyte-entity-name': 'tasks',
697
+ },
698
+ ),
699
+ Action.SEARCH: EndpointDefinition(
700
+ method='GET',
701
+ path='/search:tasks',
702
+ path_override=PathOverrideConfig(
703
+ path='/search',
704
+ ),
705
+ action=Action.SEARCH,
706
+ description='Search for tasks using SOSL (Salesforce Object Search Language).\nSOSL is optimized for text-based searches across multiple fields.\n',
707
+ query_params=['q'],
708
+ query_params_schema={
709
+ 'q': {'type': 'string', 'required': True},
710
+ },
711
+ response_schema={
712
+ 'type': 'object',
713
+ 'description': 'SOSL search result',
714
+ 'properties': {
715
+ 'searchRecords': {
716
+ 'type': 'array',
717
+ 'description': 'Array of search result records',
718
+ 'items': {
719
+ 'type': 'object',
720
+ 'properties': {
721
+ 'Id': {'type': 'string'},
722
+ 'attributes': {
723
+ 'type': 'object',
724
+ 'properties': {
725
+ 'type': {'type': 'string'},
726
+ 'url': {'type': 'string'},
727
+ },
728
+ },
729
+ },
730
+ 'additionalProperties': True,
731
+ },
732
+ },
733
+ },
734
+ },
735
+ ),
736
+ },
737
+ entity_schema={
738
+ 'type': 'object',
739
+ 'description': 'Salesforce Task object - uses FIELDS(STANDARD) so all standard fields are returned',
740
+ 'properties': {
741
+ 'Id': {'type': 'string'},
742
+ 'Subject': {'type': 'string'},
743
+ 'attributes': {
744
+ 'type': 'object',
745
+ 'properties': {
746
+ 'type': {'type': 'string'},
747
+ 'url': {'type': 'string'},
748
+ },
749
+ },
750
+ },
751
+ 'additionalProperties': True,
752
+ 'x-airbyte-entity-name': 'tasks',
753
+ },
754
+ ),
755
+ EntityDefinition(
756
+ name='events',
757
+ actions=[Action.LIST, Action.GET, Action.SEARCH],
758
+ endpoints={
759
+ Action.LIST: EndpointDefinition(
760
+ method='GET',
761
+ path='/query:events',
762
+ path_override=PathOverrideConfig(
763
+ path='/query',
764
+ ),
765
+ action=Action.LIST,
766
+ description='Returns a list of events via SOQL query. Default returns up to 200 records.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\n',
767
+ query_params=['q'],
768
+ query_params_schema={
769
+ 'q': {
770
+ 'type': 'string',
771
+ 'required': True,
772
+ 'default': 'SELECT FIELDS(STANDARD) FROM Event ORDER BY LastModifiedDate DESC LIMIT 200',
773
+ },
774
+ },
775
+ response_schema={
776
+ 'type': 'object',
777
+ 'description': 'SOQL query result for events',
778
+ 'properties': {
779
+ 'totalSize': {'type': 'integer'},
780
+ 'done': {'type': 'boolean'},
781
+ 'nextRecordsUrl': {'type': 'string'},
782
+ 'records': {
783
+ 'type': 'array',
784
+ 'items': {
785
+ 'type': 'object',
786
+ 'description': 'Salesforce Event object - uses FIELDS(STANDARD) so all standard fields are returned',
787
+ 'properties': {
788
+ 'Id': {'type': 'string'},
789
+ 'Subject': {'type': 'string'},
790
+ 'attributes': {
791
+ 'type': 'object',
792
+ 'properties': {
793
+ 'type': {'type': 'string'},
794
+ 'url': {'type': 'string'},
795
+ },
796
+ },
797
+ },
798
+ 'additionalProperties': True,
799
+ 'x-airbyte-entity-name': 'events',
800
+ },
801
+ },
802
+ },
803
+ },
804
+ ),
805
+ Action.GET: EndpointDefinition(
806
+ method='GET',
807
+ path='/sobjects/Event/{id}',
808
+ action=Action.GET,
809
+ description='Get a single event by ID. Returns all accessible fields by default.\nUse the `fields` parameter to retrieve only specific fields for better performance.\n',
810
+ query_params=['fields'],
811
+ query_params_schema={
812
+ 'fields': {'type': 'string', 'required': False},
813
+ },
814
+ path_params=['id'],
815
+ path_params_schema={
816
+ 'id': {'type': 'string', 'required': True},
817
+ },
818
+ response_schema={
819
+ 'type': 'object',
820
+ 'description': 'Salesforce Event object - uses FIELDS(STANDARD) so all standard fields are returned',
821
+ 'properties': {
822
+ 'Id': {'type': 'string'},
823
+ 'Subject': {'type': 'string'},
824
+ 'attributes': {
825
+ 'type': 'object',
826
+ 'properties': {
827
+ 'type': {'type': 'string'},
828
+ 'url': {'type': 'string'},
829
+ },
830
+ },
831
+ },
832
+ 'additionalProperties': True,
833
+ 'x-airbyte-entity-name': 'events',
834
+ },
835
+ ),
836
+ Action.SEARCH: EndpointDefinition(
837
+ method='GET',
838
+ path='/search:events',
839
+ path_override=PathOverrideConfig(
840
+ path='/search',
841
+ ),
842
+ action=Action.SEARCH,
843
+ description='Search for events using SOSL (Salesforce Object Search Language).\nSOSL is optimized for text-based searches across multiple fields.\n',
844
+ query_params=['q'],
845
+ query_params_schema={
846
+ 'q': {'type': 'string', 'required': True},
847
+ },
848
+ response_schema={
849
+ 'type': 'object',
850
+ 'description': 'SOSL search result',
851
+ 'properties': {
852
+ 'searchRecords': {
853
+ 'type': 'array',
854
+ 'description': 'Array of search result records',
855
+ 'items': {
856
+ 'type': 'object',
857
+ 'properties': {
858
+ 'Id': {'type': 'string'},
859
+ 'attributes': {
860
+ 'type': 'object',
861
+ 'properties': {
862
+ 'type': {'type': 'string'},
863
+ 'url': {'type': 'string'},
864
+ },
865
+ },
866
+ },
867
+ 'additionalProperties': True,
868
+ },
869
+ },
870
+ },
871
+ },
872
+ ),
873
+ },
874
+ entity_schema={
875
+ 'type': 'object',
876
+ 'description': 'Salesforce Event object - uses FIELDS(STANDARD) so all standard fields are returned',
877
+ 'properties': {
878
+ 'Id': {'type': 'string'},
879
+ 'Subject': {'type': 'string'},
880
+ 'attributes': {
881
+ 'type': 'object',
882
+ 'properties': {
883
+ 'type': {'type': 'string'},
884
+ 'url': {'type': 'string'},
885
+ },
886
+ },
887
+ },
888
+ 'additionalProperties': True,
889
+ 'x-airbyte-entity-name': 'events',
890
+ },
891
+ ),
892
+ EntityDefinition(
893
+ name='campaigns',
894
+ actions=[Action.LIST, Action.GET, Action.SEARCH],
895
+ endpoints={
896
+ Action.LIST: EndpointDefinition(
897
+ method='GET',
898
+ path='/query:campaigns',
899
+ path_override=PathOverrideConfig(
900
+ path='/query',
901
+ ),
902
+ action=Action.LIST,
903
+ description='Returns a list of campaigns via SOQL query. Default returns up to 200 records.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\n',
904
+ query_params=['q'],
905
+ query_params_schema={
906
+ 'q': {
907
+ 'type': 'string',
908
+ 'required': True,
909
+ 'default': 'SELECT FIELDS(STANDARD) FROM Campaign ORDER BY LastModifiedDate DESC LIMIT 200',
910
+ },
911
+ },
912
+ response_schema={
913
+ 'type': 'object',
914
+ 'description': 'SOQL query result for campaigns',
915
+ 'properties': {
916
+ 'totalSize': {'type': 'integer'},
917
+ 'done': {'type': 'boolean'},
918
+ 'nextRecordsUrl': {'type': 'string'},
919
+ 'records': {
920
+ 'type': 'array',
921
+ 'items': {
922
+ 'type': 'object',
923
+ 'description': 'Salesforce Campaign object - uses FIELDS(STANDARD) so all standard fields are returned',
924
+ 'properties': {
925
+ 'Id': {'type': 'string'},
926
+ 'Name': {'type': 'string'},
927
+ 'attributes': {
928
+ 'type': 'object',
929
+ 'properties': {
930
+ 'type': {'type': 'string'},
931
+ 'url': {'type': 'string'},
932
+ },
933
+ },
934
+ },
935
+ 'additionalProperties': True,
936
+ 'x-airbyte-entity-name': 'campaigns',
937
+ },
938
+ },
939
+ },
940
+ },
941
+ ),
942
+ Action.GET: EndpointDefinition(
943
+ method='GET',
944
+ path='/sobjects/Campaign/{id}',
945
+ action=Action.GET,
946
+ description='Get a single campaign by ID. Returns all accessible fields by default.\nUse the `fields` parameter to retrieve only specific fields for better performance.\n',
947
+ query_params=['fields'],
948
+ query_params_schema={
949
+ 'fields': {'type': 'string', 'required': False},
950
+ },
951
+ path_params=['id'],
952
+ path_params_schema={
953
+ 'id': {'type': 'string', 'required': True},
954
+ },
955
+ response_schema={
956
+ 'type': 'object',
957
+ 'description': 'Salesforce Campaign object - uses FIELDS(STANDARD) so all standard fields are returned',
958
+ 'properties': {
959
+ 'Id': {'type': 'string'},
960
+ 'Name': {'type': 'string'},
961
+ 'attributes': {
962
+ 'type': 'object',
963
+ 'properties': {
964
+ 'type': {'type': 'string'},
965
+ 'url': {'type': 'string'},
966
+ },
967
+ },
968
+ },
969
+ 'additionalProperties': True,
970
+ 'x-airbyte-entity-name': 'campaigns',
971
+ },
972
+ ),
973
+ Action.SEARCH: EndpointDefinition(
974
+ method='GET',
975
+ path='/search:campaigns',
976
+ path_override=PathOverrideConfig(
977
+ path='/search',
978
+ ),
979
+ action=Action.SEARCH,
980
+ description='Search for campaigns using SOSL (Salesforce Object Search Language).\nSOSL is optimized for text-based searches across multiple fields.\n',
981
+ query_params=['q'],
982
+ query_params_schema={
983
+ 'q': {'type': 'string', 'required': True},
984
+ },
985
+ response_schema={
986
+ 'type': 'object',
987
+ 'description': 'SOSL search result',
988
+ 'properties': {
989
+ 'searchRecords': {
990
+ 'type': 'array',
991
+ 'description': 'Array of search result records',
992
+ 'items': {
993
+ 'type': 'object',
994
+ 'properties': {
995
+ 'Id': {'type': 'string'},
996
+ 'attributes': {
997
+ 'type': 'object',
998
+ 'properties': {
999
+ 'type': {'type': 'string'},
1000
+ 'url': {'type': 'string'},
1001
+ },
1002
+ },
1003
+ },
1004
+ 'additionalProperties': True,
1005
+ },
1006
+ },
1007
+ },
1008
+ },
1009
+ ),
1010
+ },
1011
+ entity_schema={
1012
+ 'type': 'object',
1013
+ 'description': 'Salesforce Campaign object - uses FIELDS(STANDARD) so all standard fields are returned',
1014
+ 'properties': {
1015
+ 'Id': {'type': 'string'},
1016
+ 'Name': {'type': 'string'},
1017
+ 'attributes': {
1018
+ 'type': 'object',
1019
+ 'properties': {
1020
+ 'type': {'type': 'string'},
1021
+ 'url': {'type': 'string'},
1022
+ },
1023
+ },
1024
+ },
1025
+ 'additionalProperties': True,
1026
+ 'x-airbyte-entity-name': 'campaigns',
1027
+ },
1028
+ ),
1029
+ EntityDefinition(
1030
+ name='cases',
1031
+ actions=[Action.LIST, Action.GET, Action.SEARCH],
1032
+ endpoints={
1033
+ Action.LIST: EndpointDefinition(
1034
+ method='GET',
1035
+ path='/query:cases',
1036
+ path_override=PathOverrideConfig(
1037
+ path='/query',
1038
+ ),
1039
+ action=Action.LIST,
1040
+ description='Returns a list of cases via SOQL query. Default returns up to 200 records.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\n',
1041
+ query_params=['q'],
1042
+ query_params_schema={
1043
+ 'q': {
1044
+ 'type': 'string',
1045
+ 'required': True,
1046
+ 'default': 'SELECT FIELDS(STANDARD) FROM Case ORDER BY LastModifiedDate DESC LIMIT 200',
1047
+ },
1048
+ },
1049
+ response_schema={
1050
+ 'type': 'object',
1051
+ 'description': 'SOQL query result for cases',
1052
+ 'properties': {
1053
+ 'totalSize': {'type': 'integer'},
1054
+ 'done': {'type': 'boolean'},
1055
+ 'nextRecordsUrl': {'type': 'string'},
1056
+ 'records': {
1057
+ 'type': 'array',
1058
+ 'items': {
1059
+ 'type': 'object',
1060
+ 'description': 'Salesforce Case object - uses FIELDS(STANDARD) so all standard fields are returned',
1061
+ 'properties': {
1062
+ 'Id': {'type': 'string'},
1063
+ 'CaseNumber': {'type': 'string'},
1064
+ 'Subject': {'type': 'string'},
1065
+ 'attributes': {
1066
+ 'type': 'object',
1067
+ 'properties': {
1068
+ 'type': {'type': 'string'},
1069
+ 'url': {'type': 'string'},
1070
+ },
1071
+ },
1072
+ },
1073
+ 'additionalProperties': True,
1074
+ 'x-airbyte-entity-name': 'cases',
1075
+ },
1076
+ },
1077
+ },
1078
+ },
1079
+ ),
1080
+ Action.GET: EndpointDefinition(
1081
+ method='GET',
1082
+ path='/sobjects/Case/{id}',
1083
+ action=Action.GET,
1084
+ description='Get a single case by ID. Returns all accessible fields by default.\nUse the `fields` parameter to retrieve only specific fields for better performance.\n',
1085
+ query_params=['fields'],
1086
+ query_params_schema={
1087
+ 'fields': {'type': 'string', 'required': False},
1088
+ },
1089
+ path_params=['id'],
1090
+ path_params_schema={
1091
+ 'id': {'type': 'string', 'required': True},
1092
+ },
1093
+ response_schema={
1094
+ 'type': 'object',
1095
+ 'description': 'Salesforce Case object - uses FIELDS(STANDARD) so all standard fields are returned',
1096
+ 'properties': {
1097
+ 'Id': {'type': 'string'},
1098
+ 'CaseNumber': {'type': 'string'},
1099
+ 'Subject': {'type': 'string'},
1100
+ 'attributes': {
1101
+ 'type': 'object',
1102
+ 'properties': {
1103
+ 'type': {'type': 'string'},
1104
+ 'url': {'type': 'string'},
1105
+ },
1106
+ },
1107
+ },
1108
+ 'additionalProperties': True,
1109
+ 'x-airbyte-entity-name': 'cases',
1110
+ },
1111
+ ),
1112
+ Action.SEARCH: EndpointDefinition(
1113
+ method='GET',
1114
+ path='/search:cases',
1115
+ path_override=PathOverrideConfig(
1116
+ path='/search',
1117
+ ),
1118
+ action=Action.SEARCH,
1119
+ description='Search for cases using SOSL (Salesforce Object Search Language).\nSOSL is optimized for text-based searches across multiple fields.\n',
1120
+ query_params=['q'],
1121
+ query_params_schema={
1122
+ 'q': {'type': 'string', 'required': True},
1123
+ },
1124
+ response_schema={
1125
+ 'type': 'object',
1126
+ 'description': 'SOSL search result',
1127
+ 'properties': {
1128
+ 'searchRecords': {
1129
+ 'type': 'array',
1130
+ 'description': 'Array of search result records',
1131
+ 'items': {
1132
+ 'type': 'object',
1133
+ 'properties': {
1134
+ 'Id': {'type': 'string'},
1135
+ 'attributes': {
1136
+ 'type': 'object',
1137
+ 'properties': {
1138
+ 'type': {'type': 'string'},
1139
+ 'url': {'type': 'string'},
1140
+ },
1141
+ },
1142
+ },
1143
+ 'additionalProperties': True,
1144
+ },
1145
+ },
1146
+ },
1147
+ },
1148
+ ),
1149
+ },
1150
+ entity_schema={
1151
+ 'type': 'object',
1152
+ 'description': 'Salesforce Case object - uses FIELDS(STANDARD) so all standard fields are returned',
1153
+ 'properties': {
1154
+ 'Id': {'type': 'string'},
1155
+ 'CaseNumber': {'type': 'string'},
1156
+ 'Subject': {'type': 'string'},
1157
+ 'attributes': {
1158
+ 'type': 'object',
1159
+ 'properties': {
1160
+ 'type': {'type': 'string'},
1161
+ 'url': {'type': 'string'},
1162
+ },
1163
+ },
1164
+ },
1165
+ 'additionalProperties': True,
1166
+ 'x-airbyte-entity-name': 'cases',
1167
+ },
1168
+ ),
1169
+ EntityDefinition(
1170
+ name='notes',
1171
+ actions=[Action.LIST, Action.GET, Action.SEARCH],
1172
+ endpoints={
1173
+ Action.LIST: EndpointDefinition(
1174
+ method='GET',
1175
+ path='/query:notes',
1176
+ path_override=PathOverrideConfig(
1177
+ path='/query',
1178
+ ),
1179
+ action=Action.LIST,
1180
+ description='Returns a list of notes via SOQL query. Default returns up to 200 records.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\n',
1181
+ query_params=['q'],
1182
+ query_params_schema={
1183
+ 'q': {
1184
+ 'type': 'string',
1185
+ 'required': True,
1186
+ 'default': 'SELECT FIELDS(STANDARD) FROM Note ORDER BY LastModifiedDate DESC LIMIT 200',
1187
+ },
1188
+ },
1189
+ response_schema={
1190
+ 'type': 'object',
1191
+ 'description': 'SOQL query result for notes',
1192
+ 'properties': {
1193
+ 'totalSize': {'type': 'integer'},
1194
+ 'done': {'type': 'boolean'},
1195
+ 'nextRecordsUrl': {'type': 'string'},
1196
+ 'records': {
1197
+ 'type': 'array',
1198
+ 'items': {
1199
+ 'type': 'object',
1200
+ 'description': 'Salesforce Note object - uses FIELDS(STANDARD) so all standard fields are returned',
1201
+ 'properties': {
1202
+ 'Id': {'type': 'string'},
1203
+ 'Title': {'type': 'string'},
1204
+ 'attributes': {
1205
+ 'type': 'object',
1206
+ 'properties': {
1207
+ 'type': {'type': 'string'},
1208
+ 'url': {'type': 'string'},
1209
+ },
1210
+ },
1211
+ },
1212
+ 'additionalProperties': True,
1213
+ 'x-airbyte-entity-name': 'notes',
1214
+ },
1215
+ },
1216
+ },
1217
+ },
1218
+ ),
1219
+ Action.GET: EndpointDefinition(
1220
+ method='GET',
1221
+ path='/sobjects/Note/{id}',
1222
+ action=Action.GET,
1223
+ description='Get a single note by ID. Returns all accessible fields by default.\nUse the `fields` parameter to retrieve only specific fields for better performance.\n',
1224
+ query_params=['fields'],
1225
+ query_params_schema={
1226
+ 'fields': {'type': 'string', 'required': False},
1227
+ },
1228
+ path_params=['id'],
1229
+ path_params_schema={
1230
+ 'id': {'type': 'string', 'required': True},
1231
+ },
1232
+ response_schema={
1233
+ 'type': 'object',
1234
+ 'description': 'Salesforce Note object - uses FIELDS(STANDARD) so all standard fields are returned',
1235
+ 'properties': {
1236
+ 'Id': {'type': 'string'},
1237
+ 'Title': {'type': 'string'},
1238
+ 'attributes': {
1239
+ 'type': 'object',
1240
+ 'properties': {
1241
+ 'type': {'type': 'string'},
1242
+ 'url': {'type': 'string'},
1243
+ },
1244
+ },
1245
+ },
1246
+ 'additionalProperties': True,
1247
+ 'x-airbyte-entity-name': 'notes',
1248
+ },
1249
+ ),
1250
+ Action.SEARCH: EndpointDefinition(
1251
+ method='GET',
1252
+ path='/search:notes',
1253
+ path_override=PathOverrideConfig(
1254
+ path='/search',
1255
+ ),
1256
+ action=Action.SEARCH,
1257
+ description='Search for notes using SOSL (Salesforce Object Search Language).\nSOSL is optimized for text-based searches across multiple fields.\n',
1258
+ query_params=['q'],
1259
+ query_params_schema={
1260
+ 'q': {'type': 'string', 'required': True},
1261
+ },
1262
+ response_schema={
1263
+ 'type': 'object',
1264
+ 'description': 'SOSL search result',
1265
+ 'properties': {
1266
+ 'searchRecords': {
1267
+ 'type': 'array',
1268
+ 'description': 'Array of search result records',
1269
+ 'items': {
1270
+ 'type': 'object',
1271
+ 'properties': {
1272
+ 'Id': {'type': 'string'},
1273
+ 'attributes': {
1274
+ 'type': 'object',
1275
+ 'properties': {
1276
+ 'type': {'type': 'string'},
1277
+ 'url': {'type': 'string'},
1278
+ },
1279
+ },
1280
+ },
1281
+ 'additionalProperties': True,
1282
+ },
1283
+ },
1284
+ },
1285
+ },
1286
+ ),
1287
+ },
1288
+ entity_schema={
1289
+ 'type': 'object',
1290
+ 'description': 'Salesforce Note object - uses FIELDS(STANDARD) so all standard fields are returned',
1291
+ 'properties': {
1292
+ 'Id': {'type': 'string'},
1293
+ 'Title': {'type': 'string'},
1294
+ 'attributes': {
1295
+ 'type': 'object',
1296
+ 'properties': {
1297
+ 'type': {'type': 'string'},
1298
+ 'url': {'type': 'string'},
1299
+ },
1300
+ },
1301
+ },
1302
+ 'additionalProperties': True,
1303
+ 'x-airbyte-entity-name': 'notes',
1304
+ },
1305
+ ),
1306
+ EntityDefinition(
1307
+ name='content_versions',
1308
+ actions=[Action.LIST, Action.GET, Action.DOWNLOAD],
1309
+ endpoints={
1310
+ Action.LIST: EndpointDefinition(
1311
+ method='GET',
1312
+ path='/query:content_versions',
1313
+ path_override=PathOverrideConfig(
1314
+ path='/query',
1315
+ ),
1316
+ action=Action.LIST,
1317
+ description='Returns a list of content versions (file metadata) via SOQL query. Default returns up to 200 records.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\nNote: ContentVersion does not support FIELDS(STANDARD), so specific fields must be listed.\n',
1318
+ query_params=['q'],
1319
+ query_params_schema={
1320
+ 'q': {
1321
+ 'type': 'string',
1322
+ 'required': True,
1323
+ 'default': 'SELECT Id, Title, FileExtension, ContentSize, ContentDocumentId, VersionNumber, IsLatest, CreatedDate, LastModifiedDate FROM ContentVersion ORDER BY LastModifiedDate DESC LIMIT 200',
1324
+ },
1325
+ },
1326
+ response_schema={
1327
+ 'type': 'object',
1328
+ 'description': 'SOQL query result for content versions',
1329
+ 'properties': {
1330
+ 'totalSize': {'type': 'integer'},
1331
+ 'done': {'type': 'boolean'},
1332
+ 'nextRecordsUrl': {'type': 'string'},
1333
+ 'records': {
1334
+ 'type': 'array',
1335
+ 'items': {
1336
+ 'type': 'object',
1337
+ 'description': 'Salesforce ContentVersion object - represents a file version in Salesforce Files',
1338
+ 'properties': {
1339
+ 'Id': {'type': 'string', 'description': 'Unique identifier'},
1340
+ 'Title': {'type': 'string', 'description': 'File title/name'},
1341
+ 'FileExtension': {'type': 'string', 'description': 'File extension (e.g., pdf, docx)'},
1342
+ 'ContentSize': {'type': 'integer', 'description': 'File size in bytes'},
1343
+ 'ContentDocumentId': {'type': 'string', 'description': 'ID of the parent ContentDocument'},
1344
+ 'VersionNumber': {'type': 'string', 'description': 'Version number of the file'},
1345
+ 'IsLatest': {'type': 'boolean', 'description': 'Whether this is the latest version'},
1346
+ 'attributes': {
1347
+ 'type': 'object',
1348
+ 'properties': {
1349
+ 'type': {'type': 'string'},
1350
+ 'url': {'type': 'string'},
1351
+ },
1352
+ },
1353
+ },
1354
+ 'additionalProperties': True,
1355
+ 'x-airbyte-entity-name': 'content_versions',
1356
+ },
1357
+ },
1358
+ },
1359
+ },
1360
+ ),
1361
+ Action.GET: EndpointDefinition(
1362
+ method='GET',
1363
+ path='/sobjects/ContentVersion/{id}',
1364
+ action=Action.GET,
1365
+ description="Get a single content version's metadata by ID. Returns file metadata, not the file content.\nUse the download action to retrieve the actual file binary.\n",
1366
+ query_params=['fields'],
1367
+ query_params_schema={
1368
+ 'fields': {'type': 'string', 'required': False},
1369
+ },
1370
+ path_params=['id'],
1371
+ path_params_schema={
1372
+ 'id': {'type': 'string', 'required': True},
1373
+ },
1374
+ response_schema={
1375
+ 'type': 'object',
1376
+ 'description': 'Salesforce ContentVersion object - represents a file version in Salesforce Files',
1377
+ 'properties': {
1378
+ 'Id': {'type': 'string', 'description': 'Unique identifier'},
1379
+ 'Title': {'type': 'string', 'description': 'File title/name'},
1380
+ 'FileExtension': {'type': 'string', 'description': 'File extension (e.g., pdf, docx)'},
1381
+ 'ContentSize': {'type': 'integer', 'description': 'File size in bytes'},
1382
+ 'ContentDocumentId': {'type': 'string', 'description': 'ID of the parent ContentDocument'},
1383
+ 'VersionNumber': {'type': 'string', 'description': 'Version number of the file'},
1384
+ 'IsLatest': {'type': 'boolean', 'description': 'Whether this is the latest version'},
1385
+ 'attributes': {
1386
+ 'type': 'object',
1387
+ 'properties': {
1388
+ 'type': {'type': 'string'},
1389
+ 'url': {'type': 'string'},
1390
+ },
1391
+ },
1392
+ },
1393
+ 'additionalProperties': True,
1394
+ 'x-airbyte-entity-name': 'content_versions',
1395
+ },
1396
+ ),
1397
+ Action.DOWNLOAD: EndpointDefinition(
1398
+ method='GET',
1399
+ path='/sobjects/ContentVersion/{id}/VersionData',
1400
+ action=Action.DOWNLOAD,
1401
+ description='Downloads the binary file content of a content version.\nFirst use the list or get action to retrieve the ContentVersion ID and file metadata (size, type, etc.),\nthen use this action to download the actual file content.\nThe response is the raw binary file data.\n',
1402
+ path_params=['id'],
1403
+ path_params_schema={
1404
+ 'id': {'type': 'string', 'required': True},
1405
+ },
1406
+ ),
1407
+ },
1408
+ entity_schema={
1409
+ 'type': 'object',
1410
+ 'description': 'Salesforce ContentVersion object - represents a file version in Salesforce Files',
1411
+ 'properties': {
1412
+ 'Id': {'type': 'string', 'description': 'Unique identifier'},
1413
+ 'Title': {'type': 'string', 'description': 'File title/name'},
1414
+ 'FileExtension': {'type': 'string', 'description': 'File extension (e.g., pdf, docx)'},
1415
+ 'ContentSize': {'type': 'integer', 'description': 'File size in bytes'},
1416
+ 'ContentDocumentId': {'type': 'string', 'description': 'ID of the parent ContentDocument'},
1417
+ 'VersionNumber': {'type': 'string', 'description': 'Version number of the file'},
1418
+ 'IsLatest': {'type': 'boolean', 'description': 'Whether this is the latest version'},
1419
+ 'attributes': {
1420
+ 'type': 'object',
1421
+ 'properties': {
1422
+ 'type': {'type': 'string'},
1423
+ 'url': {'type': 'string'},
1424
+ },
1425
+ },
1426
+ },
1427
+ 'additionalProperties': True,
1428
+ 'x-airbyte-entity-name': 'content_versions',
1429
+ },
1430
+ ),
1431
+ EntityDefinition(
1432
+ name='attachments',
1433
+ actions=[Action.LIST, Action.GET, Action.DOWNLOAD],
1434
+ endpoints={
1435
+ Action.LIST: EndpointDefinition(
1436
+ method='GET',
1437
+ path='/query:attachments',
1438
+ path_override=PathOverrideConfig(
1439
+ path='/query',
1440
+ ),
1441
+ action=Action.LIST,
1442
+ description='Returns a list of attachments (legacy) via SOQL query. Default returns up to 200 records.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\nNote: Attachments are a legacy feature; consider using ContentVersion (Salesforce Files) for new implementations.\n',
1443
+ query_params=['q'],
1444
+ query_params_schema={
1445
+ 'q': {
1446
+ 'type': 'string',
1447
+ 'required': True,
1448
+ 'default': 'SELECT Id, Name, ContentType, BodyLength, ParentId, CreatedDate, LastModifiedDate FROM Attachment ORDER BY LastModifiedDate DESC LIMIT 200',
1449
+ },
1450
+ },
1451
+ response_schema={
1452
+ 'type': 'object',
1453
+ 'description': 'SOQL query result for attachments',
1454
+ 'properties': {
1455
+ 'totalSize': {'type': 'integer'},
1456
+ 'done': {'type': 'boolean'},
1457
+ 'nextRecordsUrl': {'type': 'string'},
1458
+ 'records': {
1459
+ 'type': 'array',
1460
+ 'items': {
1461
+ 'type': 'object',
1462
+ 'description': 'Salesforce Attachment object - legacy file attachment on a record',
1463
+ 'properties': {
1464
+ 'Id': {'type': 'string', 'description': 'Unique identifier'},
1465
+ 'Name': {'type': 'string', 'description': 'File name'},
1466
+ 'ContentType': {'type': 'string', 'description': 'MIME type of the file'},
1467
+ 'BodyLength': {'type': 'integer', 'description': 'File size in bytes'},
1468
+ 'ParentId': {'type': 'string', 'description': 'ID of the parent record this attachment is attached to'},
1469
+ 'attributes': {
1470
+ 'type': 'object',
1471
+ 'properties': {
1472
+ 'type': {'type': 'string'},
1473
+ 'url': {'type': 'string'},
1474
+ },
1475
+ },
1476
+ },
1477
+ 'additionalProperties': True,
1478
+ 'x-airbyte-entity-name': 'attachments',
1479
+ },
1480
+ },
1481
+ },
1482
+ },
1483
+ ),
1484
+ Action.GET: EndpointDefinition(
1485
+ method='GET',
1486
+ path='/sobjects/Attachment/{id}',
1487
+ action=Action.GET,
1488
+ description="Get a single attachment's metadata by ID. Returns file metadata, not the file content.\nUse the download action to retrieve the actual file binary.\nNote: Attachments are a legacy feature; consider using ContentVersion for new implementations.\n",
1489
+ query_params=['fields'],
1490
+ query_params_schema={
1491
+ 'fields': {'type': 'string', 'required': False},
1492
+ },
1493
+ path_params=['id'],
1494
+ path_params_schema={
1495
+ 'id': {'type': 'string', 'required': True},
1496
+ },
1497
+ response_schema={
1498
+ 'type': 'object',
1499
+ 'description': 'Salesforce Attachment object - legacy file attachment on a record',
1500
+ 'properties': {
1501
+ 'Id': {'type': 'string', 'description': 'Unique identifier'},
1502
+ 'Name': {'type': 'string', 'description': 'File name'},
1503
+ 'ContentType': {'type': 'string', 'description': 'MIME type of the file'},
1504
+ 'BodyLength': {'type': 'integer', 'description': 'File size in bytes'},
1505
+ 'ParentId': {'type': 'string', 'description': 'ID of the parent record this attachment is attached to'},
1506
+ 'attributes': {
1507
+ 'type': 'object',
1508
+ 'properties': {
1509
+ 'type': {'type': 'string'},
1510
+ 'url': {'type': 'string'},
1511
+ },
1512
+ },
1513
+ },
1514
+ 'additionalProperties': True,
1515
+ 'x-airbyte-entity-name': 'attachments',
1516
+ },
1517
+ ),
1518
+ Action.DOWNLOAD: EndpointDefinition(
1519
+ method='GET',
1520
+ path='/sobjects/Attachment/{id}/Body',
1521
+ action=Action.DOWNLOAD,
1522
+ description='Downloads the binary file content of an attachment (legacy).\nFirst use the list or get action to retrieve the Attachment ID and file metadata,\nthen use this action to download the actual file content.\nNote: Attachments are a legacy feature; consider using ContentVersion for new implementations.\n',
1523
+ path_params=['id'],
1524
+ path_params_schema={
1525
+ 'id': {'type': 'string', 'required': True},
1526
+ },
1527
+ ),
1528
+ },
1529
+ entity_schema={
1530
+ 'type': 'object',
1531
+ 'description': 'Salesforce Attachment object - legacy file attachment on a record',
1532
+ 'properties': {
1533
+ 'Id': {'type': 'string', 'description': 'Unique identifier'},
1534
+ 'Name': {'type': 'string', 'description': 'File name'},
1535
+ 'ContentType': {'type': 'string', 'description': 'MIME type of the file'},
1536
+ 'BodyLength': {'type': 'integer', 'description': 'File size in bytes'},
1537
+ 'ParentId': {'type': 'string', 'description': 'ID of the parent record this attachment is attached to'},
1538
+ 'attributes': {
1539
+ 'type': 'object',
1540
+ 'properties': {
1541
+ 'type': {'type': 'string'},
1542
+ 'url': {'type': 'string'},
1543
+ },
1544
+ },
1545
+ },
1546
+ 'additionalProperties': True,
1547
+ 'x-airbyte-entity-name': 'attachments',
1548
+ },
1549
+ ),
1550
+ EntityDefinition(
1551
+ name='query',
1552
+ actions=[Action.LIST],
1553
+ endpoints={
1554
+ Action.LIST: EndpointDefinition(
1555
+ method='GET',
1556
+ path='/query',
1557
+ action=Action.LIST,
1558
+ description='Execute a custom SOQL query and return results. Use this for querying any Salesforce object.\nFor pagination, check the response: if `done` is false, use `nextRecordsUrl` to fetch the next page.\n',
1559
+ query_params=['q'],
1560
+ query_params_schema={
1561
+ 'q': {'type': 'string', 'required': True},
1562
+ },
1563
+ response_schema={
1564
+ 'type': 'object',
1565
+ 'description': 'Generic SOQL query result',
1566
+ 'properties': {
1567
+ 'totalSize': {'type': 'integer', 'description': 'Total number of records matching the query'},
1568
+ 'done': {'type': 'boolean', 'description': 'Whether all records have been returned'},
1569
+ 'nextRecordsUrl': {'type': 'string', 'description': 'URL to fetch next page of results (if done is false)'},
1570
+ 'records': {
1571
+ 'type': 'array',
1572
+ 'description': 'Array of record objects',
1573
+ 'items': {'type': 'object', 'additionalProperties': True},
1574
+ },
1575
+ },
1576
+ 'x-airbyte-entity-name': 'query',
1577
+ },
1578
+ ),
1579
+ },
1580
+ entity_schema={
1581
+ 'type': 'object',
1582
+ 'description': 'Generic SOQL query result',
1583
+ 'properties': {
1584
+ 'totalSize': {'type': 'integer', 'description': 'Total number of records matching the query'},
1585
+ 'done': {'type': 'boolean', 'description': 'Whether all records have been returned'},
1586
+ 'nextRecordsUrl': {'type': 'string', 'description': 'URL to fetch next page of results (if done is false)'},
1587
+ 'records': {
1588
+ 'type': 'array',
1589
+ 'description': 'Array of record objects',
1590
+ 'items': {'type': 'object', 'additionalProperties': True},
1591
+ },
1592
+ },
1593
+ 'x-airbyte-entity-name': 'query',
1594
+ },
1595
+ ),
1596
+ ],
1597
+ )