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.
- airbyte_agent_salesforce/__init__.py +87 -0
- airbyte_agent_salesforce/_vendored/__init__.py +1 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/__init__.py +82 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/auth_strategies.py +1123 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/auth_template.py +135 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/cloud_utils/__init__.py +5 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/cloud_utils/client.py +213 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/connector_model_loader.py +957 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/constants.py +78 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/exceptions.py +23 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/executor/__init__.py +31 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/executor/hosted_executor.py +197 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/executor/local_executor.py +1504 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/executor/models.py +190 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/extensions.py +655 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/http/__init__.py +37 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/http/adapters/__init__.py +9 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/http/adapters/httpx_adapter.py +251 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/http/config.py +98 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/http/exceptions.py +119 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/http/protocols.py +114 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/http/response.py +102 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/http_client.py +686 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/logging/__init__.py +11 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/logging/logger.py +264 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/logging/types.py +92 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/observability/__init__.py +11 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/observability/models.py +19 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/observability/redactor.py +81 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/observability/session.py +94 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/performance/__init__.py +6 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/performance/instrumentation.py +57 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/performance/metrics.py +93 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/schema/__init__.py +75 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/schema/base.py +161 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/schema/components.py +238 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/schema/connector.py +131 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/schema/extensions.py +109 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/schema/operations.py +146 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/schema/security.py +213 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/secrets.py +182 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/telemetry/__init__.py +10 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/telemetry/config.py +32 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/telemetry/events.py +58 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/telemetry/tracker.py +151 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/types.py +241 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/utils.py +60 -0
- airbyte_agent_salesforce/_vendored/connector_sdk/validation.py +822 -0
- airbyte_agent_salesforce/connector.py +1862 -0
- airbyte_agent_salesforce/connector_model.py +1597 -0
- airbyte_agent_salesforce/models.py +365 -0
- airbyte_agent_salesforce/types.py +166 -0
- airbyte_agent_salesforce-0.1.17.dist-info/METADATA +113 -0
- airbyte_agent_salesforce-0.1.17.dist-info/RECORD +55 -0
- airbyte_agent_salesforce-0.1.17.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Pydantic models for salesforce connector.
|
|
3
|
+
|
|
4
|
+
This module contains Pydantic models used for authentication configuration
|
|
5
|
+
and response envelope types.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
11
|
+
from typing import TypeVar, Generic, Union, Any
|
|
12
|
+
|
|
13
|
+
# Authentication configuration
|
|
14
|
+
|
|
15
|
+
class SalesforceAuthConfig(BaseModel):
|
|
16
|
+
"""Salesforce OAuth 2.0"""
|
|
17
|
+
|
|
18
|
+
model_config = ConfigDict(extra="forbid")
|
|
19
|
+
|
|
20
|
+
refresh_token: str
|
|
21
|
+
"""OAuth refresh token for automatic token renewal"""
|
|
22
|
+
client_id: str
|
|
23
|
+
"""Connected App Consumer Key"""
|
|
24
|
+
client_secret: str
|
|
25
|
+
"""Connected App Consumer Secret"""
|
|
26
|
+
|
|
27
|
+
# ===== RESPONSE TYPE DEFINITIONS (PYDANTIC) =====
|
|
28
|
+
|
|
29
|
+
class AccountAttributes(BaseModel):
|
|
30
|
+
"""Nested schema for Account.attributes"""
|
|
31
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
32
|
+
|
|
33
|
+
type: Union[str, Any] = Field(default=None)
|
|
34
|
+
url: Union[str, Any] = Field(default=None)
|
|
35
|
+
|
|
36
|
+
class Account(BaseModel):
|
|
37
|
+
"""Salesforce Account object - uses FIELDS(STANDARD) so all standard fields are returned"""
|
|
38
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
39
|
+
|
|
40
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
41
|
+
name: Union[str, Any] = Field(default=None, alias="Name")
|
|
42
|
+
attributes: Union[AccountAttributes, Any] = Field(default=None)
|
|
43
|
+
|
|
44
|
+
class AccountQueryResult(BaseModel):
|
|
45
|
+
"""SOQL query result for accounts"""
|
|
46
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
47
|
+
|
|
48
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
49
|
+
done: Union[bool, Any] = Field(default=None)
|
|
50
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
51
|
+
records: Union[list[Account], Any] = Field(default=None)
|
|
52
|
+
|
|
53
|
+
class ContactAttributes(BaseModel):
|
|
54
|
+
"""Nested schema for Contact.attributes"""
|
|
55
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
56
|
+
|
|
57
|
+
type: Union[str, Any] = Field(default=None)
|
|
58
|
+
url: Union[str, Any] = Field(default=None)
|
|
59
|
+
|
|
60
|
+
class Contact(BaseModel):
|
|
61
|
+
"""Salesforce Contact object - uses FIELDS(STANDARD) so all standard fields are returned"""
|
|
62
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
63
|
+
|
|
64
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
65
|
+
name: Union[str, Any] = Field(default=None, alias="Name")
|
|
66
|
+
attributes: Union[ContactAttributes, Any] = Field(default=None)
|
|
67
|
+
|
|
68
|
+
class ContactQueryResult(BaseModel):
|
|
69
|
+
"""SOQL query result for contacts"""
|
|
70
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
71
|
+
|
|
72
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
73
|
+
done: Union[bool, Any] = Field(default=None)
|
|
74
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
75
|
+
records: Union[list[Contact], Any] = Field(default=None)
|
|
76
|
+
|
|
77
|
+
class LeadAttributes(BaseModel):
|
|
78
|
+
"""Nested schema for Lead.attributes"""
|
|
79
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
80
|
+
|
|
81
|
+
type: Union[str, Any] = Field(default=None)
|
|
82
|
+
url: Union[str, Any] = Field(default=None)
|
|
83
|
+
|
|
84
|
+
class Lead(BaseModel):
|
|
85
|
+
"""Salesforce Lead object - uses FIELDS(STANDARD) so all standard fields are returned"""
|
|
86
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
87
|
+
|
|
88
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
89
|
+
name: Union[str, Any] = Field(default=None, alias="Name")
|
|
90
|
+
attributes: Union[LeadAttributes, Any] = Field(default=None)
|
|
91
|
+
|
|
92
|
+
class LeadQueryResult(BaseModel):
|
|
93
|
+
"""SOQL query result for leads"""
|
|
94
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
95
|
+
|
|
96
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
97
|
+
done: Union[bool, Any] = Field(default=None)
|
|
98
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
99
|
+
records: Union[list[Lead], Any] = Field(default=None)
|
|
100
|
+
|
|
101
|
+
class OpportunityAttributes(BaseModel):
|
|
102
|
+
"""Nested schema for Opportunity.attributes"""
|
|
103
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
104
|
+
|
|
105
|
+
type: Union[str, Any] = Field(default=None)
|
|
106
|
+
url: Union[str, Any] = Field(default=None)
|
|
107
|
+
|
|
108
|
+
class Opportunity(BaseModel):
|
|
109
|
+
"""Salesforce Opportunity object - uses FIELDS(STANDARD) so all standard fields are returned"""
|
|
110
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
111
|
+
|
|
112
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
113
|
+
name: Union[str, Any] = Field(default=None, alias="Name")
|
|
114
|
+
attributes: Union[OpportunityAttributes, Any] = Field(default=None)
|
|
115
|
+
|
|
116
|
+
class OpportunityQueryResult(BaseModel):
|
|
117
|
+
"""SOQL query result for opportunities"""
|
|
118
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
119
|
+
|
|
120
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
121
|
+
done: Union[bool, Any] = Field(default=None)
|
|
122
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
123
|
+
records: Union[list[Opportunity], Any] = Field(default=None)
|
|
124
|
+
|
|
125
|
+
class TaskAttributes(BaseModel):
|
|
126
|
+
"""Nested schema for Task.attributes"""
|
|
127
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
128
|
+
|
|
129
|
+
type: Union[str, Any] = Field(default=None)
|
|
130
|
+
url: Union[str, Any] = Field(default=None)
|
|
131
|
+
|
|
132
|
+
class Task(BaseModel):
|
|
133
|
+
"""Salesforce Task object - uses FIELDS(STANDARD) so all standard fields are returned"""
|
|
134
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
135
|
+
|
|
136
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
137
|
+
subject: Union[str, Any] = Field(default=None, alias="Subject")
|
|
138
|
+
attributes: Union[TaskAttributes, Any] = Field(default=None)
|
|
139
|
+
|
|
140
|
+
class TaskQueryResult(BaseModel):
|
|
141
|
+
"""SOQL query result for tasks"""
|
|
142
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
143
|
+
|
|
144
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
145
|
+
done: Union[bool, Any] = Field(default=None)
|
|
146
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
147
|
+
records: Union[list[Task], Any] = Field(default=None)
|
|
148
|
+
|
|
149
|
+
class EventAttributes(BaseModel):
|
|
150
|
+
"""Nested schema for Event.attributes"""
|
|
151
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
152
|
+
|
|
153
|
+
type: Union[str, Any] = Field(default=None)
|
|
154
|
+
url: Union[str, Any] = Field(default=None)
|
|
155
|
+
|
|
156
|
+
class Event(BaseModel):
|
|
157
|
+
"""Salesforce Event object - uses FIELDS(STANDARD) so all standard fields are returned"""
|
|
158
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
159
|
+
|
|
160
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
161
|
+
subject: Union[str, Any] = Field(default=None, alias="Subject")
|
|
162
|
+
attributes: Union[EventAttributes, Any] = Field(default=None)
|
|
163
|
+
|
|
164
|
+
class EventQueryResult(BaseModel):
|
|
165
|
+
"""SOQL query result for events"""
|
|
166
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
167
|
+
|
|
168
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
169
|
+
done: Union[bool, Any] = Field(default=None)
|
|
170
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
171
|
+
records: Union[list[Event], Any] = Field(default=None)
|
|
172
|
+
|
|
173
|
+
class CampaignAttributes(BaseModel):
|
|
174
|
+
"""Nested schema for Campaign.attributes"""
|
|
175
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
176
|
+
|
|
177
|
+
type: Union[str, Any] = Field(default=None)
|
|
178
|
+
url: Union[str, Any] = Field(default=None)
|
|
179
|
+
|
|
180
|
+
class Campaign(BaseModel):
|
|
181
|
+
"""Salesforce Campaign object - uses FIELDS(STANDARD) so all standard fields are returned"""
|
|
182
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
183
|
+
|
|
184
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
185
|
+
name: Union[str, Any] = Field(default=None, alias="Name")
|
|
186
|
+
attributes: Union[CampaignAttributes, Any] = Field(default=None)
|
|
187
|
+
|
|
188
|
+
class CampaignQueryResult(BaseModel):
|
|
189
|
+
"""SOQL query result for campaigns"""
|
|
190
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
191
|
+
|
|
192
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
193
|
+
done: Union[bool, Any] = Field(default=None)
|
|
194
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
195
|
+
records: Union[list[Campaign], Any] = Field(default=None)
|
|
196
|
+
|
|
197
|
+
class CaseAttributes(BaseModel):
|
|
198
|
+
"""Nested schema for Case.attributes"""
|
|
199
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
200
|
+
|
|
201
|
+
type: Union[str, Any] = Field(default=None)
|
|
202
|
+
url: Union[str, Any] = Field(default=None)
|
|
203
|
+
|
|
204
|
+
class Case(BaseModel):
|
|
205
|
+
"""Salesforce Case object - uses FIELDS(STANDARD) so all standard fields are returned"""
|
|
206
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
207
|
+
|
|
208
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
209
|
+
case_number: Union[str, Any] = Field(default=None, alias="CaseNumber")
|
|
210
|
+
subject: Union[str, Any] = Field(default=None, alias="Subject")
|
|
211
|
+
attributes: Union[CaseAttributes, Any] = Field(default=None)
|
|
212
|
+
|
|
213
|
+
class CaseQueryResult(BaseModel):
|
|
214
|
+
"""SOQL query result for cases"""
|
|
215
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
216
|
+
|
|
217
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
218
|
+
done: Union[bool, Any] = Field(default=None)
|
|
219
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
220
|
+
records: Union[list[Case], Any] = Field(default=None)
|
|
221
|
+
|
|
222
|
+
class NoteAttributes(BaseModel):
|
|
223
|
+
"""Nested schema for Note.attributes"""
|
|
224
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
225
|
+
|
|
226
|
+
type: Union[str, Any] = Field(default=None)
|
|
227
|
+
url: Union[str, Any] = Field(default=None)
|
|
228
|
+
|
|
229
|
+
class Note(BaseModel):
|
|
230
|
+
"""Salesforce Note object - uses FIELDS(STANDARD) so all standard fields are returned"""
|
|
231
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
232
|
+
|
|
233
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
234
|
+
title: Union[str, Any] = Field(default=None, alias="Title")
|
|
235
|
+
attributes: Union[NoteAttributes, Any] = Field(default=None)
|
|
236
|
+
|
|
237
|
+
class NoteQueryResult(BaseModel):
|
|
238
|
+
"""SOQL query result for notes"""
|
|
239
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
240
|
+
|
|
241
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
242
|
+
done: Union[bool, Any] = Field(default=None)
|
|
243
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
244
|
+
records: Union[list[Note], Any] = Field(default=None)
|
|
245
|
+
|
|
246
|
+
class ContentVersionAttributes(BaseModel):
|
|
247
|
+
"""Nested schema for ContentVersion.attributes"""
|
|
248
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
249
|
+
|
|
250
|
+
type: Union[str, Any] = Field(default=None)
|
|
251
|
+
url: Union[str, Any] = Field(default=None)
|
|
252
|
+
|
|
253
|
+
class ContentVersion(BaseModel):
|
|
254
|
+
"""Salesforce ContentVersion object - represents a file version in Salesforce Files"""
|
|
255
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
256
|
+
|
|
257
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
258
|
+
title: Union[str, Any] = Field(default=None, alias="Title")
|
|
259
|
+
file_extension: Union[str, Any] = Field(default=None, alias="FileExtension")
|
|
260
|
+
content_size: Union[int, Any] = Field(default=None, alias="ContentSize")
|
|
261
|
+
content_document_id: Union[str, Any] = Field(default=None, alias="ContentDocumentId")
|
|
262
|
+
version_number: Union[str, Any] = Field(default=None, alias="VersionNumber")
|
|
263
|
+
is_latest: Union[bool, Any] = Field(default=None, alias="IsLatest")
|
|
264
|
+
attributes: Union[ContentVersionAttributes, Any] = Field(default=None)
|
|
265
|
+
|
|
266
|
+
class ContentVersionQueryResult(BaseModel):
|
|
267
|
+
"""SOQL query result for content versions"""
|
|
268
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
269
|
+
|
|
270
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
271
|
+
done: Union[bool, Any] = Field(default=None)
|
|
272
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
273
|
+
records: Union[list[ContentVersion], Any] = Field(default=None)
|
|
274
|
+
|
|
275
|
+
class AttachmentAttributes(BaseModel):
|
|
276
|
+
"""Nested schema for Attachment.attributes"""
|
|
277
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
278
|
+
|
|
279
|
+
type: Union[str, Any] = Field(default=None)
|
|
280
|
+
url: Union[str, Any] = Field(default=None)
|
|
281
|
+
|
|
282
|
+
class Attachment(BaseModel):
|
|
283
|
+
"""Salesforce Attachment object - legacy file attachment on a record"""
|
|
284
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
285
|
+
|
|
286
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
287
|
+
name: Union[str, Any] = Field(default=None, alias="Name")
|
|
288
|
+
content_type: Union[str, Any] = Field(default=None, alias="ContentType")
|
|
289
|
+
body_length: Union[int, Any] = Field(default=None, alias="BodyLength")
|
|
290
|
+
parent_id: Union[str, Any] = Field(default=None, alias="ParentId")
|
|
291
|
+
attributes: Union[AttachmentAttributes, Any] = Field(default=None)
|
|
292
|
+
|
|
293
|
+
class AttachmentQueryResult(BaseModel):
|
|
294
|
+
"""SOQL query result for attachments"""
|
|
295
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
296
|
+
|
|
297
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
298
|
+
done: Union[bool, Any] = Field(default=None)
|
|
299
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
300
|
+
records: Union[list[Attachment], Any] = Field(default=None)
|
|
301
|
+
|
|
302
|
+
class QueryResult(BaseModel):
|
|
303
|
+
"""Generic SOQL query result"""
|
|
304
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
305
|
+
|
|
306
|
+
total_size: Union[int, Any] = Field(default=None, alias="totalSize")
|
|
307
|
+
done: Union[bool, Any] = Field(default=None)
|
|
308
|
+
next_records_url: Union[str, Any] = Field(default=None, alias="nextRecordsUrl")
|
|
309
|
+
records: Union[list[dict[str, Any]], Any] = Field(default=None)
|
|
310
|
+
|
|
311
|
+
class SearchResultSearchrecordsItemAttributes(BaseModel):
|
|
312
|
+
"""Nested schema for SearchResultSearchrecordsItem.attributes"""
|
|
313
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
314
|
+
|
|
315
|
+
type: Union[str, Any] = Field(default=None)
|
|
316
|
+
url: Union[str, Any] = Field(default=None)
|
|
317
|
+
|
|
318
|
+
class SearchResultSearchrecordsItem(BaseModel):
|
|
319
|
+
"""Nested schema for SearchResult.searchRecords_item"""
|
|
320
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
321
|
+
|
|
322
|
+
id: Union[str, Any] = Field(default=None, alias="Id")
|
|
323
|
+
attributes: Union[SearchResultSearchrecordsItemAttributes, Any] = Field(default=None)
|
|
324
|
+
|
|
325
|
+
class SearchResult(BaseModel):
|
|
326
|
+
"""SOSL search result"""
|
|
327
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
328
|
+
|
|
329
|
+
search_records: Union[list[SearchResultSearchrecordsItem], Any] = Field(default=None, alias="searchRecords")
|
|
330
|
+
|
|
331
|
+
# ===== METADATA TYPE DEFINITIONS (PYDANTIC) =====
|
|
332
|
+
# Meta types for operations that extract metadata (e.g., pagination info)
|
|
333
|
+
|
|
334
|
+
# ===== RESPONSE ENVELOPE MODELS =====
|
|
335
|
+
|
|
336
|
+
# Type variables for generic envelope models
|
|
337
|
+
T = TypeVar('T')
|
|
338
|
+
S = TypeVar('S')
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
class SalesforceExecuteResult(BaseModel, Generic[T]):
|
|
342
|
+
"""Response envelope with data only.
|
|
343
|
+
|
|
344
|
+
Used for actions that return data without metadata.
|
|
345
|
+
"""
|
|
346
|
+
model_config = ConfigDict(extra="forbid")
|
|
347
|
+
|
|
348
|
+
data: T
|
|
349
|
+
"""Response data containing the result of the action."""
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
class SalesforceExecuteResultWithMeta(SalesforceExecuteResult[T], Generic[T, S]):
|
|
353
|
+
"""Response envelope with data and metadata.
|
|
354
|
+
|
|
355
|
+
Used for actions that return both data and metadata (e.g., pagination info).
|
|
356
|
+
"""
|
|
357
|
+
meta: S
|
|
358
|
+
"""Metadata about the response (e.g., pagination cursors, record counts)."""
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
# ===== OPERATION RESULT TYPE ALIASES =====
|
|
362
|
+
|
|
363
|
+
# Concrete type aliases for each operation result.
|
|
364
|
+
# These provide simpler, more readable type annotations than using the generic forms.
|
|
365
|
+
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type definitions for salesforce connector.
|
|
3
|
+
"""
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
# Use typing_extensions.TypedDict for Pydantic compatibility on Python < 3.12
|
|
7
|
+
try:
|
|
8
|
+
from typing_extensions import TypedDict, NotRequired
|
|
9
|
+
except ImportError:
|
|
10
|
+
from typing import TypedDict, NotRequired # type: ignore[attr-defined]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# ===== NESTED PARAM TYPE DEFINITIONS =====
|
|
15
|
+
# Nested parameter schemas discovered during parameter extraction
|
|
16
|
+
|
|
17
|
+
# ===== OPERATION PARAMS TYPE DEFINITIONS =====
|
|
18
|
+
|
|
19
|
+
class AccountsListParams(TypedDict):
|
|
20
|
+
"""Parameters for accounts.list operation"""
|
|
21
|
+
q: str
|
|
22
|
+
|
|
23
|
+
class AccountsGetParams(TypedDict):
|
|
24
|
+
"""Parameters for accounts.get operation"""
|
|
25
|
+
id: str
|
|
26
|
+
fields: NotRequired[str]
|
|
27
|
+
|
|
28
|
+
class AccountsSearchParams(TypedDict):
|
|
29
|
+
"""Parameters for accounts.search operation"""
|
|
30
|
+
q: str
|
|
31
|
+
|
|
32
|
+
class ContactsListParams(TypedDict):
|
|
33
|
+
"""Parameters for contacts.list operation"""
|
|
34
|
+
q: str
|
|
35
|
+
|
|
36
|
+
class ContactsGetParams(TypedDict):
|
|
37
|
+
"""Parameters for contacts.get operation"""
|
|
38
|
+
id: str
|
|
39
|
+
fields: NotRequired[str]
|
|
40
|
+
|
|
41
|
+
class ContactsSearchParams(TypedDict):
|
|
42
|
+
"""Parameters for contacts.search operation"""
|
|
43
|
+
q: str
|
|
44
|
+
|
|
45
|
+
class LeadsListParams(TypedDict):
|
|
46
|
+
"""Parameters for leads.list operation"""
|
|
47
|
+
q: str
|
|
48
|
+
|
|
49
|
+
class LeadsGetParams(TypedDict):
|
|
50
|
+
"""Parameters for leads.get operation"""
|
|
51
|
+
id: str
|
|
52
|
+
fields: NotRequired[str]
|
|
53
|
+
|
|
54
|
+
class LeadsSearchParams(TypedDict):
|
|
55
|
+
"""Parameters for leads.search operation"""
|
|
56
|
+
q: str
|
|
57
|
+
|
|
58
|
+
class OpportunitiesListParams(TypedDict):
|
|
59
|
+
"""Parameters for opportunities.list operation"""
|
|
60
|
+
q: str
|
|
61
|
+
|
|
62
|
+
class OpportunitiesGetParams(TypedDict):
|
|
63
|
+
"""Parameters for opportunities.get operation"""
|
|
64
|
+
id: str
|
|
65
|
+
fields: NotRequired[str]
|
|
66
|
+
|
|
67
|
+
class OpportunitiesSearchParams(TypedDict):
|
|
68
|
+
"""Parameters for opportunities.search operation"""
|
|
69
|
+
q: str
|
|
70
|
+
|
|
71
|
+
class TasksListParams(TypedDict):
|
|
72
|
+
"""Parameters for tasks.list operation"""
|
|
73
|
+
q: str
|
|
74
|
+
|
|
75
|
+
class TasksGetParams(TypedDict):
|
|
76
|
+
"""Parameters for tasks.get operation"""
|
|
77
|
+
id: str
|
|
78
|
+
fields: NotRequired[str]
|
|
79
|
+
|
|
80
|
+
class TasksSearchParams(TypedDict):
|
|
81
|
+
"""Parameters for tasks.search operation"""
|
|
82
|
+
q: str
|
|
83
|
+
|
|
84
|
+
class EventsListParams(TypedDict):
|
|
85
|
+
"""Parameters for events.list operation"""
|
|
86
|
+
q: str
|
|
87
|
+
|
|
88
|
+
class EventsGetParams(TypedDict):
|
|
89
|
+
"""Parameters for events.get operation"""
|
|
90
|
+
id: str
|
|
91
|
+
fields: NotRequired[str]
|
|
92
|
+
|
|
93
|
+
class EventsSearchParams(TypedDict):
|
|
94
|
+
"""Parameters for events.search operation"""
|
|
95
|
+
q: str
|
|
96
|
+
|
|
97
|
+
class CampaignsListParams(TypedDict):
|
|
98
|
+
"""Parameters for campaigns.list operation"""
|
|
99
|
+
q: str
|
|
100
|
+
|
|
101
|
+
class CampaignsGetParams(TypedDict):
|
|
102
|
+
"""Parameters for campaigns.get operation"""
|
|
103
|
+
id: str
|
|
104
|
+
fields: NotRequired[str]
|
|
105
|
+
|
|
106
|
+
class CampaignsSearchParams(TypedDict):
|
|
107
|
+
"""Parameters for campaigns.search operation"""
|
|
108
|
+
q: str
|
|
109
|
+
|
|
110
|
+
class CasesListParams(TypedDict):
|
|
111
|
+
"""Parameters for cases.list operation"""
|
|
112
|
+
q: str
|
|
113
|
+
|
|
114
|
+
class CasesGetParams(TypedDict):
|
|
115
|
+
"""Parameters for cases.get operation"""
|
|
116
|
+
id: str
|
|
117
|
+
fields: NotRequired[str]
|
|
118
|
+
|
|
119
|
+
class CasesSearchParams(TypedDict):
|
|
120
|
+
"""Parameters for cases.search operation"""
|
|
121
|
+
q: str
|
|
122
|
+
|
|
123
|
+
class NotesListParams(TypedDict):
|
|
124
|
+
"""Parameters for notes.list operation"""
|
|
125
|
+
q: str
|
|
126
|
+
|
|
127
|
+
class NotesGetParams(TypedDict):
|
|
128
|
+
"""Parameters for notes.get operation"""
|
|
129
|
+
id: str
|
|
130
|
+
fields: NotRequired[str]
|
|
131
|
+
|
|
132
|
+
class NotesSearchParams(TypedDict):
|
|
133
|
+
"""Parameters for notes.search operation"""
|
|
134
|
+
q: str
|
|
135
|
+
|
|
136
|
+
class ContentVersionsListParams(TypedDict):
|
|
137
|
+
"""Parameters for content_versions.list operation"""
|
|
138
|
+
q: str
|
|
139
|
+
|
|
140
|
+
class ContentVersionsGetParams(TypedDict):
|
|
141
|
+
"""Parameters for content_versions.get operation"""
|
|
142
|
+
id: str
|
|
143
|
+
fields: NotRequired[str]
|
|
144
|
+
|
|
145
|
+
class ContentVersionsDownloadParams(TypedDict):
|
|
146
|
+
"""Parameters for content_versions.download operation"""
|
|
147
|
+
id: str
|
|
148
|
+
range_header: NotRequired[str]
|
|
149
|
+
|
|
150
|
+
class AttachmentsListParams(TypedDict):
|
|
151
|
+
"""Parameters for attachments.list operation"""
|
|
152
|
+
q: str
|
|
153
|
+
|
|
154
|
+
class AttachmentsGetParams(TypedDict):
|
|
155
|
+
"""Parameters for attachments.get operation"""
|
|
156
|
+
id: str
|
|
157
|
+
fields: NotRequired[str]
|
|
158
|
+
|
|
159
|
+
class AttachmentsDownloadParams(TypedDict):
|
|
160
|
+
"""Parameters for attachments.download operation"""
|
|
161
|
+
id: str
|
|
162
|
+
range_header: NotRequired[str]
|
|
163
|
+
|
|
164
|
+
class QueryListParams(TypedDict):
|
|
165
|
+
"""Parameters for query.list operation"""
|
|
166
|
+
q: str
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: airbyte-agent-salesforce
|
|
3
|
+
Version: 0.1.17
|
|
4
|
+
Summary: Airbyte Salesforce Connector for AI platforms
|
|
5
|
+
Project-URL: Homepage, https://github.com/airbytehq/airbyte-embedded
|
|
6
|
+
Project-URL: Documentation, https://github.com/airbytehq/airbyte-embedded/tree/main/integrations
|
|
7
|
+
Project-URL: Repository, https://github.com/airbytehq/airbyte-embedded
|
|
8
|
+
Project-URL: Issues, https://github.com/airbytehq/airbyte-embedded/issues
|
|
9
|
+
Author-email: Airbyte <contact@airbyte.io>
|
|
10
|
+
License: Elastic-2.0
|
|
11
|
+
Keywords: airbyte,api,connector,salesforce
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: Other/Proprietary License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Requires-Dist: httpx>=0.24.0
|
|
24
|
+
Requires-Dist: jinja2>=3.0.0
|
|
25
|
+
Requires-Dist: jsonpath-ng>=1.6.1
|
|
26
|
+
Requires-Dist: jsonref>=1.1.0
|
|
27
|
+
Requires-Dist: opentelemetry-api>=1.37.0
|
|
28
|
+
Requires-Dist: opentelemetry-sdk>=1.37.0
|
|
29
|
+
Requires-Dist: pydantic>=2.0.0
|
|
30
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
31
|
+
Requires-Dist: pyyaml>=6.0
|
|
32
|
+
Requires-Dist: segment-analytics-python>=2.2.0
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# Salesforce agent connector
|
|
36
|
+
|
|
37
|
+
Salesforce is a cloud-based CRM platform that helps businesses manage customer
|
|
38
|
+
relationships, sales pipelines, and business operations. This connector provides
|
|
39
|
+
access to accounts, contacts, leads, opportunities, tasks, events, campaigns, cases,
|
|
40
|
+
notes, and attachments for sales analytics and customer relationship management.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## Example questions
|
|
44
|
+
|
|
45
|
+
- Show me my top 5 opportunities this month
|
|
46
|
+
- List all contacts from [Company] in the last quarter
|
|
47
|
+
- Search for leads in the technology sector with revenue over $10M
|
|
48
|
+
- What trends can you identify in my recent sales pipeline?
|
|
49
|
+
- Summarize the open cases for my key accounts
|
|
50
|
+
- Find upcoming events related to my most important opportunities
|
|
51
|
+
- Analyze the performance of my recent marketing campaigns
|
|
52
|
+
- Identify the highest value opportunities I'm currently tracking
|
|
53
|
+
- Show me the notes and attachments for [customerX]'s account
|
|
54
|
+
|
|
55
|
+
## Unsupported questions
|
|
56
|
+
|
|
57
|
+
- Create a new lead for [personX]
|
|
58
|
+
- Update the status of my sales opportunity
|
|
59
|
+
- Schedule a follow-up meeting with [customerX]
|
|
60
|
+
- Delete this old contact record
|
|
61
|
+
- Send an email to all contacts in this campaign
|
|
62
|
+
|
|
63
|
+
## Installation
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
uv pip install airbyte-agent-salesforce
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Usage
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from airbyte_agent_salesforce import SalesforceConnector, SalesforceAuthConfig
|
|
73
|
+
|
|
74
|
+
connector = SalesforceConnector(
|
|
75
|
+
auth_config=SalesforceAuthConfig(
|
|
76
|
+
refresh_token="...",
|
|
77
|
+
client_id="...",
|
|
78
|
+
client_secret="..."
|
|
79
|
+
)
|
|
80
|
+
)
|
|
81
|
+
result = await connector.accounts.list()
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## Full documentation
|
|
86
|
+
|
|
87
|
+
This connector supports the following entities and actions.
|
|
88
|
+
|
|
89
|
+
| Entity | Actions |
|
|
90
|
+
|--------|---------|
|
|
91
|
+
| Accounts | [List](./REFERENCE.md#accounts-list), [Get](./REFERENCE.md#accounts-get), [Search](./REFERENCE.md#accounts-search) |
|
|
92
|
+
| Contacts | [List](./REFERENCE.md#contacts-list), [Get](./REFERENCE.md#contacts-get), [Search](./REFERENCE.md#contacts-search) |
|
|
93
|
+
| Leads | [List](./REFERENCE.md#leads-list), [Get](./REFERENCE.md#leads-get), [Search](./REFERENCE.md#leads-search) |
|
|
94
|
+
| Opportunities | [List](./REFERENCE.md#opportunities-list), [Get](./REFERENCE.md#opportunities-get), [Search](./REFERENCE.md#opportunities-search) |
|
|
95
|
+
| Tasks | [List](./REFERENCE.md#tasks-list), [Get](./REFERENCE.md#tasks-get), [Search](./REFERENCE.md#tasks-search) |
|
|
96
|
+
| Events | [List](./REFERENCE.md#events-list), [Get](./REFERENCE.md#events-get), [Search](./REFERENCE.md#events-search) |
|
|
97
|
+
| Campaigns | [List](./REFERENCE.md#campaigns-list), [Get](./REFERENCE.md#campaigns-get), [Search](./REFERENCE.md#campaigns-search) |
|
|
98
|
+
| Cases | [List](./REFERENCE.md#cases-list), [Get](./REFERENCE.md#cases-get), [Search](./REFERENCE.md#cases-search) |
|
|
99
|
+
| Notes | [List](./REFERENCE.md#notes-list), [Get](./REFERENCE.md#notes-get), [Search](./REFERENCE.md#notes-search) |
|
|
100
|
+
| Content Versions | [List](./REFERENCE.md#content-versions-list), [Get](./REFERENCE.md#content-versions-get), [Download](./REFERENCE.md#content-versions-download) |
|
|
101
|
+
| Attachments | [List](./REFERENCE.md#attachments-list), [Get](./REFERENCE.md#attachments-get), [Download](./REFERENCE.md#attachments-download) |
|
|
102
|
+
| Query | [List](./REFERENCE.md#query-list) |
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
For detailed documentation on available actions and parameters, see this connector's [full reference documentation](./REFERENCE.md).
|
|
106
|
+
|
|
107
|
+
For the service's official API docs, see the [Salesforce API reference](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest.htm).
|
|
108
|
+
|
|
109
|
+
## Version information
|
|
110
|
+
|
|
111
|
+
- **Package version:** 0.1.17
|
|
112
|
+
- **Connector version:** 1.0.3
|
|
113
|
+
- **Generated with Connector SDK commit SHA:** 12f6b994298f84dfa217940afe7c6b19bec4167b
|