airbyte-agent-zendesk-support 0.18.41__py3-none-any.whl → 0.18.43__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.
@@ -53,42 +53,26 @@ from .models import (
53
53
  ZendeskSupportExecuteResult,
54
54
  ZendeskSupportExecuteResultWithMeta,
55
55
  TicketsListResult,
56
- TicketsGetResult,
57
56
  UsersListResult,
58
- UsersGetResult,
59
57
  OrganizationsListResult,
60
- OrganizationsGetResult,
61
58
  GroupsListResult,
62
- GroupsGetResult,
63
59
  TicketCommentsListResult,
64
- AttachmentsGetResult,
65
60
  TicketAuditsListResult,
66
61
  TicketMetricsListResult,
67
62
  TicketFieldsListResult,
68
- TicketFieldsGetResult,
69
63
  BrandsListResult,
70
- BrandsGetResult,
71
64
  ViewsListResult,
72
- ViewsGetResult,
73
65
  MacrosListResult,
74
- MacrosGetResult,
75
66
  TriggersListResult,
76
- TriggersGetResult,
77
67
  AutomationsListResult,
78
- AutomationsGetResult,
79
68
  TagsListResult,
80
69
  SatisfactionRatingsListResult,
81
- SatisfactionRatingsGetResult,
82
70
  GroupMembershipsListResult,
83
71
  OrganizationMembershipsListResult,
84
72
  SlaPoliciesListResult,
85
- SlaPoliciesGetResult,
86
73
  TicketFormsListResult,
87
- TicketFormsGetResult,
88
74
  ArticlesListResult,
89
- ArticlesGetResult,
90
- ArticleAttachmentsListResult,
91
- ArticleAttachmentsGetResult
75
+ ArticleAttachmentsListResult
92
76
  )
93
77
  from .types import (
94
78
  TicketsListParams,
@@ -182,42 +166,26 @@ __all__ = [
182
166
  "ZendeskSupportExecuteResult",
183
167
  "ZendeskSupportExecuteResultWithMeta",
184
168
  "TicketsListResult",
185
- "TicketsGetResult",
186
169
  "UsersListResult",
187
- "UsersGetResult",
188
170
  "OrganizationsListResult",
189
- "OrganizationsGetResult",
190
171
  "GroupsListResult",
191
- "GroupsGetResult",
192
172
  "TicketCommentsListResult",
193
- "AttachmentsGetResult",
194
173
  "TicketAuditsListResult",
195
174
  "TicketMetricsListResult",
196
175
  "TicketFieldsListResult",
197
- "TicketFieldsGetResult",
198
176
  "BrandsListResult",
199
- "BrandsGetResult",
200
177
  "ViewsListResult",
201
- "ViewsGetResult",
202
178
  "MacrosListResult",
203
- "MacrosGetResult",
204
179
  "TriggersListResult",
205
- "TriggersGetResult",
206
180
  "AutomationsListResult",
207
- "AutomationsGetResult",
208
181
  "TagsListResult",
209
182
  "SatisfactionRatingsListResult",
210
- "SatisfactionRatingsGetResult",
211
183
  "GroupMembershipsListResult",
212
184
  "OrganizationMembershipsListResult",
213
185
  "SlaPoliciesListResult",
214
- "SlaPoliciesGetResult",
215
186
  "TicketFormsListResult",
216
- "TicketFormsGetResult",
217
187
  "ArticlesListResult",
218
- "ArticlesGetResult",
219
188
  "ArticleAttachmentsListResult",
220
- "ArticleAttachmentsGetResult",
221
189
  "TicketsListParams",
222
190
  "TicketsGetParams",
223
191
  "UsersListParams",
@@ -13,7 +13,7 @@ from uuid import UUID
13
13
  from pydantic import BaseModel, ConfigDict, Field, field_validator
14
14
  from pydantic_core import Url
15
15
 
16
- from .extensions import RetryConfig
16
+ from .extensions import CacheConfig, RetryConfig
17
17
 
18
18
 
19
19
  class ExampleQuestions(BaseModel):
@@ -105,6 +105,7 @@ class Info(BaseModel):
105
105
  - x-airbyte-external-documentation-urls: List of external documentation URLs (Airbyte extension)
106
106
  - x-airbyte-retry-config: Retry configuration for transient errors (Airbyte extension)
107
107
  - x-airbyte-example-questions: Example questions for AI connector README (Airbyte extension)
108
+ - x-airbyte-cache: Cache configuration for field mapping between API and cache schemas (Airbyte extension)
108
109
  """
109
110
 
110
111
  model_config = ConfigDict(populate_by_name=True, extra="forbid")
@@ -122,6 +123,7 @@ class Info(BaseModel):
122
123
  x_airbyte_external_documentation_urls: list[DocUrl] = Field(..., alias="x-airbyte-external-documentation-urls")
123
124
  x_airbyte_retry_config: RetryConfig | None = Field(None, alias="x-airbyte-retry-config")
124
125
  x_airbyte_example_questions: ExampleQuestions | None = Field(None, alias="x-airbyte-example-questions")
126
+ x_airbyte_cache: CacheConfig | None = Field(None, alias="x-airbyte-cache")
125
127
 
126
128
 
127
129
  class ServerVariable(BaseModel):
@@ -14,7 +14,7 @@ are implemented.
14
14
 
15
15
  from typing import Literal
16
16
 
17
- from pydantic import BaseModel, ConfigDict
17
+ from pydantic import BaseModel, ConfigDict, Field
18
18
 
19
19
 
20
20
  class PaginationConfig(BaseModel):
@@ -107,3 +107,96 @@ class RetryConfig(BaseModel):
107
107
  # Header-based delay extraction
108
108
  retry_after_header: str = "Retry-After"
109
109
  retry_after_format: Literal["seconds", "milliseconds", "unix_timestamp"] = "seconds"
110
+
111
+
112
+ class CacheFieldConfig(BaseModel):
113
+ """
114
+ Field configuration for cache mapping.
115
+
116
+ Defines a single field in a cache entity, with optional name aliasing
117
+ to map between user-facing field names and cache storage names.
118
+
119
+ Used in x-airbyte-cache extension for api_search operations.
120
+ """
121
+
122
+ model_config = ConfigDict(populate_by_name=True, extra="forbid")
123
+
124
+ name: str
125
+ x_airbyte_name: str | None = Field(default=None, alias="x-airbyte-name")
126
+ type: str | list[str]
127
+ description: str
128
+
129
+ @property
130
+ def cache_name(self) -> str:
131
+ """Return cache name, falling back to name if alias not specified."""
132
+ return self.x_airbyte_name or self.name
133
+
134
+
135
+ class CacheEntityConfig(BaseModel):
136
+ """
137
+ Entity configuration for cache mapping.
138
+
139
+ Defines a cache-enabled entity with its fields and optional name aliasing
140
+ to map between user-facing entity names and cache storage names.
141
+
142
+ Used in x-airbyte-cache extension for api_search operations.
143
+ """
144
+
145
+ model_config = ConfigDict(populate_by_name=True, extra="forbid")
146
+
147
+ entity: str
148
+ x_airbyte_name: str | None = Field(default=None, alias="x-airbyte-name")
149
+ fields: list[CacheFieldConfig]
150
+
151
+ @property
152
+ def cache_name(self) -> str:
153
+ """Return cache entity name, falling back to entity if alias not specified."""
154
+ return self.x_airbyte_name or self.entity
155
+
156
+
157
+ class CacheConfig(BaseModel):
158
+ """
159
+ Cache configuration extension (x-airbyte-cache).
160
+
161
+ Defines cache-enabled entities and their field mappings for api_search operations.
162
+ Supports optional name aliasing via x-airbyte-name for both entities and fields,
163
+ enabling bidirectional mapping between user-facing names and cache storage names.
164
+
165
+ This extension is added to the Info model and provides field-level mapping for
166
+ search operations that use cached data.
167
+
168
+ Example YAML usage:
169
+ info:
170
+ title: Stripe API
171
+ x-airbyte-cache:
172
+ entities:
173
+ - entity: customers
174
+ stream: customers
175
+ fields:
176
+ - name: email
177
+ type: ["null", "string"]
178
+ description: "Customer email address"
179
+ - name: customer_name
180
+ x-airbyte-name: name
181
+ type: ["null", "string"]
182
+ description: "Customer full name"
183
+ """
184
+
185
+ model_config = ConfigDict(populate_by_name=True, extra="forbid")
186
+
187
+ entities: list[CacheEntityConfig]
188
+
189
+ def get_entity_mapping(self, user_entity: str) -> CacheEntityConfig | None:
190
+ """
191
+ Get entity config by user-facing name.
192
+
193
+ Args:
194
+ user_entity: User-facing entity name to look up
195
+
196
+ Returns:
197
+ CacheEntityConfig if found, None otherwise
198
+ """
199
+ for entity in self.entities:
200
+ if entity.entity == user_entity:
201
+ return entity
202
+ return None