airbyte-agent-asana 0.19.43__tar.gz → 0.19.46__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (61) hide show
  1. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/CHANGELOG.md +15 -0
  2. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/PKG-INFO +3 -3
  3. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/README.md +2 -2
  4. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/__init__.py +10 -26
  5. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/connector_model_loader.py +3 -2
  6. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/schema/base.py +4 -1
  7. airbyte_agent_asana-0.19.46/airbyte_agent_asana/_vendored/connector_sdk/schema/extensions.py +230 -0
  8. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/connector.py +99 -88
  9. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/connector_model.py +2 -0
  10. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/models.py +44 -68
  11. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/pyproject.toml +1 -1
  12. airbyte_agent_asana-0.19.43/airbyte_agent_asana/_vendored/connector_sdk/schema/extensions.py +0 -109
  13. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/.gitignore +0 -0
  14. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/REFERENCE.md +0 -0
  15. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/__init__.py +0 -0
  16. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/__init__.py +0 -0
  17. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/auth_strategies.py +0 -0
  18. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/auth_template.py +0 -0
  19. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/cloud_utils/__init__.py +0 -0
  20. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/cloud_utils/client.py +0 -0
  21. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/constants.py +0 -0
  22. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/exceptions.py +0 -0
  23. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/executor/__init__.py +0 -0
  24. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/executor/hosted_executor.py +0 -0
  25. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/executor/local_executor.py +0 -0
  26. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/executor/models.py +0 -0
  27. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/extensions.py +0 -0
  28. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/http/__init__.py +0 -0
  29. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/http/adapters/__init__.py +0 -0
  30. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/http/adapters/httpx_adapter.py +0 -0
  31. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/http/config.py +0 -0
  32. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/http/exceptions.py +0 -0
  33. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/http/protocols.py +0 -0
  34. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/http/response.py +0 -0
  35. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/http_client.py +0 -0
  36. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/introspection.py +0 -0
  37. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/logging/__init__.py +0 -0
  38. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/logging/logger.py +0 -0
  39. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/logging/types.py +0 -0
  40. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/observability/__init__.py +0 -0
  41. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/observability/config.py +0 -0
  42. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/observability/models.py +0 -0
  43. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/observability/redactor.py +0 -0
  44. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/observability/session.py +0 -0
  45. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/performance/__init__.py +0 -0
  46. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/performance/instrumentation.py +0 -0
  47. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/performance/metrics.py +0 -0
  48. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/schema/__init__.py +0 -0
  49. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/schema/components.py +0 -0
  50. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/schema/connector.py +0 -0
  51. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/schema/operations.py +0 -0
  52. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/schema/security.py +0 -0
  53. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/secrets.py +0 -0
  54. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/telemetry/__init__.py +0 -0
  55. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/telemetry/config.py +0 -0
  56. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/telemetry/events.py +0 -0
  57. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/telemetry/tracker.py +0 -0
  58. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/types.py +0 -0
  59. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/utils.py +0 -0
  60. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/_vendored/connector_sdk/validation.py +0 -0
  61. {airbyte_agent_asana-0.19.43 → airbyte_agent_asana-0.19.46}/airbyte_agent_asana/types.py +0 -0
@@ -1,5 +1,20 @@
1
1
  # Asana changelog
2
2
 
3
+ ## [0.19.46] - 2026-01-15
4
+ - Updated connector definition (YAML version 0.1.6)
5
+ - Source commit: 61a2e822
6
+ - SDK version: 0.1.0
7
+
8
+ ## [0.19.45] - 2026-01-15
9
+ - Updated connector definition (YAML version 0.1.6)
10
+ - Source commit: 35211193
11
+ - SDK version: 0.1.0
12
+
13
+ ## [0.19.44] - 2026-01-15
14
+ - Updated connector definition (YAML version 0.1.6)
15
+ - Source commit: 20b3afd9
16
+ - SDK version: 0.1.0
17
+
3
18
  ## [0.19.43] - 2026-01-15
4
19
  - Updated connector definition (YAML version 0.1.6)
5
20
  - Source commit: b7138b41
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airbyte-agent-asana
3
- Version: 0.19.43
3
+ Version: 0.19.46
4
4
  Summary: Airbyte Asana Connector for AI platforms
5
5
  Project-URL: Homepage, https://github.com/airbytehq/airbyte-agent-connectors
6
6
  Project-URL: Documentation, https://docs.airbyte.com/ai-agents/
@@ -142,6 +142,6 @@ For the service's official API docs, see the [Asana API reference](https://devel
142
142
 
143
143
  ## Version information
144
144
 
145
- - **Package version:** 0.19.43
145
+ - **Package version:** 0.19.46
146
146
  - **Connector version:** 0.1.6
147
- - **Generated with Connector SDK commit SHA:** b7138b411130e18a6ece05c58de092aa28ca0474
147
+ - **Generated with Connector SDK commit SHA:** 61a2e8229a38f13564ef2f85e276dff02f707573
@@ -109,6 +109,6 @@ For the service's official API docs, see the [Asana API reference](https://devel
109
109
 
110
110
  ## Version information
111
111
 
112
- - **Package version:** 0.19.43
112
+ - **Package version:** 0.19.46
113
113
  - **Connector version:** 0.1.6
114
- - **Generated with Connector SDK commit SHA:** b7138b411130e18a6ece05c58de092aa28ca0474
114
+ - **Generated with Connector SDK commit SHA:** 61a2e8229a38f13564ef2f85e276dff02f707573
@@ -14,15 +14,15 @@ from .models import (
14
14
  TasksListNextPage,
15
15
  TasksList,
16
16
  ProjectCompact,
17
- ProjectOwner,
18
- ProjectCurrentStatusAuthor,
17
+ ProjectTeam,
18
+ ProjectMembersItem,
19
+ ProjectCurrentStatusUpdate,
19
20
  ProjectCurrentStatusCreatedBy,
21
+ ProjectCurrentStatusAuthor,
20
22
  ProjectCurrentStatus,
21
- ProjectMembersItem,
22
- ProjectTeam,
23
23
  ProjectWorkspace,
24
+ ProjectOwner,
24
25
  ProjectFollowersItem,
25
- ProjectCurrentStatusUpdate,
26
26
  Project,
27
27
  ProjectResponse,
28
28
  ProjectsListNextPage,
@@ -85,28 +85,20 @@ from .models import (
85
85
  AsanaExecuteResultWithMeta,
86
86
  TasksListResult,
87
87
  ProjectTasksListResult,
88
- TasksGetResult,
89
88
  WorkspaceTaskSearchListResult,
90
89
  ProjectsListResult,
91
- ProjectsGetResult,
92
90
  TaskProjectsListResult,
93
91
  TeamProjectsListResult,
94
92
  WorkspaceProjectsListResult,
95
93
  WorkspacesListResult,
96
- WorkspacesGetResult,
97
94
  UsersListResult,
98
- UsersGetResult,
99
95
  WorkspaceUsersListResult,
100
96
  TeamUsersListResult,
101
- TeamsGetResult,
102
97
  WorkspaceTeamsListResult,
103
98
  UserTeamsListResult,
104
99
  AttachmentsListResult,
105
- AttachmentsGetResult,
106
100
  WorkspaceTagsListResult,
107
- TagsGetResult,
108
101
  ProjectSectionsListResult,
109
- SectionsGetResult,
110
102
  TaskSubtasksListResult,
111
103
  TaskDependenciesListResult,
112
104
  TaskDependentsListResult
@@ -152,15 +144,15 @@ __all__ = [
152
144
  "TasksListNextPage",
153
145
  "TasksList",
154
146
  "ProjectCompact",
155
- "ProjectOwner",
156
- "ProjectCurrentStatusAuthor",
147
+ "ProjectTeam",
148
+ "ProjectMembersItem",
149
+ "ProjectCurrentStatusUpdate",
157
150
  "ProjectCurrentStatusCreatedBy",
151
+ "ProjectCurrentStatusAuthor",
158
152
  "ProjectCurrentStatus",
159
- "ProjectMembersItem",
160
- "ProjectTeam",
161
153
  "ProjectWorkspace",
154
+ "ProjectOwner",
162
155
  "ProjectFollowersItem",
163
- "ProjectCurrentStatusUpdate",
164
156
  "Project",
165
157
  "ProjectResponse",
166
158
  "ProjectsListNextPage",
@@ -223,28 +215,20 @@ __all__ = [
223
215
  "AsanaExecuteResultWithMeta",
224
216
  "TasksListResult",
225
217
  "ProjectTasksListResult",
226
- "TasksGetResult",
227
218
  "WorkspaceTaskSearchListResult",
228
219
  "ProjectsListResult",
229
- "ProjectsGetResult",
230
220
  "TaskProjectsListResult",
231
221
  "TeamProjectsListResult",
232
222
  "WorkspaceProjectsListResult",
233
223
  "WorkspacesListResult",
234
- "WorkspacesGetResult",
235
224
  "UsersListResult",
236
- "UsersGetResult",
237
225
  "WorkspaceUsersListResult",
238
226
  "TeamUsersListResult",
239
- "TeamsGetResult",
240
227
  "WorkspaceTeamsListResult",
241
228
  "UserTeamsListResult",
242
229
  "AttachmentsListResult",
243
- "AttachmentsGetResult",
244
230
  "WorkspaceTagsListResult",
245
- "TagsGetResult",
246
231
  "ProjectSectionsListResult",
247
- "SectionsGetResult",
248
232
  "TaskSubtasksListResult",
249
233
  "TaskDependenciesListResult",
250
234
  "TaskDependentsListResult",
@@ -519,13 +519,14 @@ def _parse_oauth2_config(scheme: Any) -> dict[str, str]:
519
519
  config["refresh_url"] = refresh_url
520
520
 
521
521
  # Extract custom refresh configuration from x-airbyte-token-refresh extension
522
+ # Note: x_token_refresh is a Dict[str, Any], not a Pydantic model, so use .get()
522
523
  x_token_refresh = getattr(scheme, "x_token_refresh", None)
523
524
  if x_token_refresh:
524
- auth_style = getattr(x_token_refresh, "auth_style", None)
525
+ auth_style = x_token_refresh.get("auth_style")
525
526
  if auth_style:
526
527
  config["auth_style"] = auth_style
527
528
 
528
- body_format = getattr(x_token_refresh, "body_format", None)
529
+ body_format = x_token_refresh.get("body_format")
529
530
  if body_format:
530
531
  config["body_format"] = body_format
531
532
 
@@ -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):
@@ -150,6 +152,7 @@ class Server(BaseModel):
150
152
  url: str
151
153
  description: str | None = None
152
154
  variables: Dict[str, ServerVariable] = Field(default_factory=dict)
155
+ x_airbyte_replication_user_config_mapping: Dict[str, str] | None = Field(default=None, alias="x-airbyte-replication-user-config-mapping")
153
156
 
154
157
  @field_validator("url")
155
158
  @classmethod
@@ -0,0 +1,230 @@
1
+ """
2
+ Extension models for future features.
3
+
4
+ These models are defined but NOT yet added to the main schema models.
5
+ They serve as:
6
+ 1. Type hints for future use
7
+ 2. Documentation of planned extensions
8
+ 3. Ready-to-use structures when features are implemented
9
+
10
+ NOTE: These are not currently active in the schema. They will be added
11
+ to Operation, Schema, or other models when their respective features
12
+ are implemented.
13
+ """
14
+
15
+ from typing import Literal
16
+
17
+ from pydantic import BaseModel, ConfigDict, Field
18
+
19
+
20
+ class PaginationConfig(BaseModel):
21
+ """
22
+ Configuration for pagination support.
23
+
24
+ NOT YET USED - Defined for future implementation.
25
+
26
+ When active, will be added to Operation model as:
27
+ x_pagination: Optional[PaginationConfig] = Field(None, alias="x-pagination")
28
+ """
29
+
30
+ model_config = ConfigDict(populate_by_name=True, extra="forbid")
31
+
32
+ style: Literal["cursor", "offset", "page", "link"]
33
+ limit_param: str = "limit"
34
+
35
+ # Cursor-based pagination
36
+ cursor_param: str | None = None
37
+ cursor_source: Literal["body", "headers"] | None = "body"
38
+ cursor_path: str | None = None
39
+
40
+ # Offset-based pagination
41
+ offset_param: str | None = None
42
+
43
+ # Page-based pagination
44
+ page_param: str | None = None
45
+
46
+ # Response parsing
47
+ data_path: str = "data"
48
+ has_more_path: str | None = None
49
+
50
+ # Limits
51
+ max_page_size: int | None = None
52
+ default_page_size: int = 100
53
+
54
+
55
+ class RateLimitConfig(BaseModel):
56
+ """
57
+ Configuration for rate limiting.
58
+
59
+ NOT YET USED - Defined for future implementation.
60
+
61
+ When active, might be added to Server or root OpenAPIConnector as:
62
+ x_rate_limit: Optional[RateLimitConfig] = Field(None, alias="x-rate-limit")
63
+ """
64
+
65
+ model_config = ConfigDict(populate_by_name=True, extra="forbid")
66
+
67
+ max_requests: int
68
+ time_window_seconds: int
69
+ retry_after_header: str | None = "Retry-After"
70
+ respect_retry_after: bool = True
71
+
72
+
73
+ class RetryConfig(BaseModel):
74
+ """
75
+ Configuration for retry strategy with exponential backoff.
76
+
77
+ Used to configure automatic retries for transient errors (429, 5xx, timeouts, network errors).
78
+ Can be specified at the connector level via x-airbyte-retry-config in the OpenAPI spec's info section.
79
+
80
+ By default, retries are enabled with max_attempts=3. To disable retries, set max_attempts=1
81
+ in your connector's x-airbyte-retry-config.
82
+
83
+ Example YAML usage:
84
+ info:
85
+ title: My API
86
+ x-airbyte-retry-config:
87
+ max_attempts: 5
88
+ initial_delay_seconds: 2.0
89
+ retry_after_header: "X-RateLimit-Reset"
90
+ retry_after_format: "unix_timestamp"
91
+ """
92
+
93
+ model_config = ConfigDict(populate_by_name=True, extra="forbid")
94
+
95
+ # Core retry settings (max_attempts=3 enables retries by default)
96
+ max_attempts: int = 3
97
+ initial_delay_seconds: float = 1.0
98
+ max_delay_seconds: float = 60.0
99
+ exponential_base: float = 2.0
100
+ jitter: bool = True
101
+
102
+ # Which errors to retry
103
+ retry_on_status_codes: list[int] = [429, 500, 502, 503, 504]
104
+ retry_on_timeout: bool = True
105
+ retry_on_network_error: bool = True
106
+
107
+ # Header-based delay extraction
108
+ retry_after_header: str = "Retry-After"
109
+ retry_after_format: Literal["seconds", "milliseconds", "unix_timestamp"] = "seconds"
110
+
111
+
112
+ class CacheFieldProperty(BaseModel):
113
+ """
114
+ Nested property definition for object-type cache fields.
115
+
116
+ Supports recursive nesting to represent complex nested schemas in cache field definitions.
117
+ Used when a cache field has type 'object' and needs to define its internal structure.
118
+
119
+ Example YAML usage:
120
+ - name: collaboration
121
+ type: ['null', 'object']
122
+ description: "Collaboration data"
123
+ properties:
124
+ brief:
125
+ type: ['null', 'string']
126
+ comments:
127
+ type: ['null', 'array']
128
+ """
129
+
130
+ model_config = ConfigDict(populate_by_name=True, extra="forbid")
131
+
132
+ type: str | list[str]
133
+ properties: dict[str, "CacheFieldProperty"] | None = None
134
+
135
+
136
+ class CacheFieldConfig(BaseModel):
137
+ """
138
+ Field configuration for cache mapping.
139
+
140
+ Defines a single field in a cache entity, with optional name aliasing
141
+ to map between user-facing field names and cache storage names.
142
+
143
+ For object-type fields, supports nested properties to define the internal structure
144
+ of complex nested schemas.
145
+
146
+ Used in x-airbyte-cache extension for api_search operations.
147
+ """
148
+
149
+ model_config = ConfigDict(populate_by_name=True, extra="forbid")
150
+
151
+ name: str
152
+ x_airbyte_name: str | None = Field(default=None, alias="x-airbyte-name")
153
+ type: str | list[str]
154
+ description: str
155
+ properties: dict[str, CacheFieldProperty] | None = None
156
+
157
+ @property
158
+ def cache_name(self) -> str:
159
+ """Return cache name, falling back to name if alias not specified."""
160
+ return self.x_airbyte_name or self.name
161
+
162
+
163
+ class CacheEntityConfig(BaseModel):
164
+ """
165
+ Entity configuration for cache mapping.
166
+
167
+ Defines a cache-enabled entity with its fields and optional name aliasing
168
+ to map between user-facing entity names and cache storage names.
169
+
170
+ Used in x-airbyte-cache extension for api_search operations.
171
+ """
172
+
173
+ model_config = ConfigDict(populate_by_name=True, extra="forbid")
174
+
175
+ entity: str
176
+ x_airbyte_name: str | None = Field(default=None, alias="x-airbyte-name")
177
+ fields: list[CacheFieldConfig]
178
+
179
+ @property
180
+ def cache_name(self) -> str:
181
+ """Return cache entity name, falling back to entity if alias not specified."""
182
+ return self.x_airbyte_name or self.entity
183
+
184
+
185
+ class CacheConfig(BaseModel):
186
+ """
187
+ Cache configuration extension (x-airbyte-cache).
188
+
189
+ Defines cache-enabled entities and their field mappings for api_search operations.
190
+ Supports optional name aliasing via x-airbyte-name for both entities and fields,
191
+ enabling bidirectional mapping between user-facing names and cache storage names.
192
+
193
+ This extension is added to the Info model and provides field-level mapping for
194
+ search operations that use cached data.
195
+
196
+ Example YAML usage:
197
+ info:
198
+ title: Stripe API
199
+ x-airbyte-cache:
200
+ entities:
201
+ - entity: customers
202
+ stream: customers
203
+ fields:
204
+ - name: email
205
+ type: ["null", "string"]
206
+ description: "Customer email address"
207
+ - name: customer_name
208
+ x-airbyte-name: name
209
+ type: ["null", "string"]
210
+ description: "Customer full name"
211
+ """
212
+
213
+ model_config = ConfigDict(populate_by_name=True, extra="forbid")
214
+
215
+ entities: list[CacheEntityConfig]
216
+
217
+ def get_entity_mapping(self, user_entity: str) -> CacheEntityConfig | None:
218
+ """
219
+ Get entity config by user-facing name.
220
+
221
+ Args:
222
+ user_entity: User-facing entity name to look up
223
+
224
+ Returns:
225
+ CacheEntityConfig if found, None otherwise
226
+ """
227
+ for entity in self.entities:
228
+ if entity.entity == user_entity:
229
+ return entity
230
+ return None