airbyte-agent-amazon-ads 0.1.25__tar.gz → 0.1.27__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.
Files changed (62) hide show
  1. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/AUTH.md +57 -4
  2. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/CHANGELOG.md +10 -0
  3. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/PKG-INFO +4 -4
  4. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/README.md +3 -3
  5. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/executor/local_executor.py +15 -10
  6. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/base.py +32 -1
  7. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/extensions.py +19 -1
  8. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/operations.py +3 -2
  9. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/security.py +37 -0
  10. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/types.py +1 -1
  11. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/validation.py +1 -1
  12. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/connector.py +1 -1
  13. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/connector_model.py +2 -2
  14. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/models.py +3 -2
  15. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/pyproject.toml +1 -1
  16. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/.gitignore +0 -0
  17. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/REFERENCE.md +0 -0
  18. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/__init__.py +0 -0
  19. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/__init__.py +0 -0
  20. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/__init__.py +0 -0
  21. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/auth_strategies.py +0 -0
  22. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/auth_template.py +0 -0
  23. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/cloud_utils/__init__.py +0 -0
  24. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/cloud_utils/client.py +0 -0
  25. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/connector_model_loader.py +0 -0
  26. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/constants.py +0 -0
  27. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/exceptions.py +0 -0
  28. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/executor/__init__.py +0 -0
  29. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/executor/hosted_executor.py +0 -0
  30. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/executor/models.py +0 -0
  31. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/extensions.py +0 -0
  32. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/http/__init__.py +0 -0
  33. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/http/adapters/__init__.py +0 -0
  34. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/http/adapters/httpx_adapter.py +0 -0
  35. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/http/config.py +0 -0
  36. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/http/exceptions.py +0 -0
  37. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/http/protocols.py +0 -0
  38. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/http/response.py +0 -0
  39. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/http_client.py +0 -0
  40. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/introspection.py +0 -0
  41. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/logging/__init__.py +0 -0
  42. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/logging/logger.py +0 -0
  43. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/logging/types.py +0 -0
  44. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/observability/__init__.py +0 -0
  45. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/observability/config.py +0 -0
  46. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/observability/models.py +0 -0
  47. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/observability/redactor.py +0 -0
  48. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/observability/session.py +0 -0
  49. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/performance/__init__.py +0 -0
  50. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/performance/instrumentation.py +0 -0
  51. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/performance/metrics.py +0 -0
  52. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/__init__.py +0 -0
  53. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/components.py +0 -0
  54. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/connector.py +0 -0
  55. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/secrets.py +0 -0
  56. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/__init__.py +0 -0
  57. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/config.py +0 -0
  58. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/events.py +0 -0
  59. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/tracker.py +0 -0
  60. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/utils.py +0 -0
  61. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/_vendored/connector_sdk/validation_replication.py +0 -0
  62. {airbyte_agent_amazon_ads-0.1.25 → airbyte_agent_amazon_ads-0.1.27}/airbyte_agent_amazon_ads/types.py +0 -0
@@ -15,8 +15,8 @@ In open source mode, you provide API credentials directly to the connector.
15
15
 
16
16
  | Field Name | Type | Required | Description |
17
17
  |------------|------|----------|-------------|
18
- | `client_id` | `str` | Yes | The client ID of your Amazon Ads API application |
19
- | `client_secret` | `str` | Yes | The client secret of your Amazon Ads API application |
18
+ | `client_id` | `str` | No | The client ID of your Amazon Ads API application |
19
+ | `client_secret` | `str` | No | The client secret of your Amazon Ads API application |
20
20
  | `refresh_token` | `str` | Yes | The refresh token obtained from the OAuth authorization flow |
21
21
 
22
22
  Example request:
@@ -49,8 +49,8 @@ Create a connector with OAuth credentials.
49
49
 
50
50
  | Field Name | Type | Required | Description |
51
51
  |------------|------|----------|-------------|
52
- | `client_id` | `str` | Yes | The client ID of your Amazon Ads API application |
53
- | `client_secret` | `str` | Yes | The client secret of your Amazon Ads API application |
52
+ | `client_id` | `str` | No | The client ID of your Amazon Ads API application |
53
+ | `client_secret` | `str` | No | The client secret of your Amazon Ads API application |
54
54
  | `refresh_token` | `str` | Yes | The refresh token obtained from the OAuth authorization flow |
55
55
 
56
56
  Example request:
@@ -71,6 +71,59 @@ curl -X POST "https://api.airbyte.ai/v1/integrations/connectors" \
71
71
  }'
72
72
  ```
73
73
 
74
+
75
+
76
+ #### Bring your own OAuth flow
77
+ To implement your own OAuth flow, use Airbyte's server-side OAuth API endpoints. For a complete guide, see [Implement your own OAuth flow](https://docs.airbyte.com/ai-agents/quickstarts/tutorial-server-side-oauth).
78
+
79
+ **Step 1: Initiate the OAuth flow**
80
+
81
+ Request a consent URL for your user.
82
+
83
+ | Field Name | Type | Required | Description |
84
+ |------------|------|----------|-------------|
85
+ | `external_user_id` | `string` | Yes | Your unique identifier for the end user |
86
+ | `connector_type` | `string` | Yes | The connector type (e.g., "Amazon-Ads") |
87
+ | `redirect_url` | `string` | Yes | URL to redirect to after OAuth authorization |
88
+
89
+ Example request:
90
+
91
+ ```bash
92
+ curl -X POST "https://api.airbyte.ai/v1/integrations/connectors/oauth/initiate" \
93
+ -H "Authorization: Bearer <BEARER_TOKEN>" \
94
+ -H "Content-Type: application/json" \
95
+ -d '{
96
+ "external_user_id": "<EXTERNAL_USER_ID>",
97
+ "connector_type": "Amazon-Ads",
98
+ "redirect_url": "https://yourapp.com/oauth/callback"
99
+ }'
100
+ ```
101
+
102
+ Redirect your user to the `consent_url` from the response. After they authorize, they'll be redirected back to your app with a `secret_id` query parameter.
103
+
104
+ **Step 2: Create a connector with the secret ID**
105
+
106
+ | Field Name | Type | Required | Description |
107
+ |------------|------|----------|-------------|
108
+ | `external_user_id` | `string` | Yes | Your unique identifier for the end user |
109
+ | `connector_type` | `string` | Yes | The connector type (e.g., "Amazon-Ads") |
110
+ | `name` | `string` | Yes | A name for this connector instance |
111
+ | `server_side_oauth_secret_id` | `string` | Yes | The secret_id from the OAuth callback |
112
+
113
+ Example request:
114
+
115
+ ```bash
116
+ curl -X POST "https://api.airbyte.ai/v1/integrations/connectors" \
117
+ -H "Authorization: Bearer <BEARER_TOKEN>" \
118
+ -H "Content-Type: application/json" \
119
+ -d '{
120
+ "external_user_id": "<EXTERNAL_USER_ID>",
121
+ "connector_type": "Amazon-Ads",
122
+ "name": "My Amazon-Ads Connector",
123
+ "server_side_oauth_secret_id": "<secret_id_from_callback>"
124
+ }'
125
+ ```
126
+
74
127
  #### Token
75
128
  This authentication method isn't available for this connector.
76
129
 
@@ -1,5 +1,15 @@
1
1
  # Amazon Ads changelog
2
2
 
3
+ ## [0.1.27] - 2026-02-03
4
+ - Updated connector definition (YAML version 1.0.6)
5
+ - Source commit: 888d0538
6
+ - SDK version: 0.1.0
7
+
8
+ ## [0.1.26] - 2026-02-02
9
+ - Updated connector definition (YAML version 1.0.5)
10
+ - Source commit: 94024675
11
+ - SDK version: 0.1.0
12
+
3
13
  ## [0.1.25] - 2026-02-02
4
14
  - Updated connector definition (YAML version 1.0.5)
5
15
  - Source commit: 9d9866b0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airbyte-agent-amazon-ads
3
- Version: 0.1.25
3
+ Version: 0.1.27
4
4
  Summary: Airbyte Amazon-Ads 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/
@@ -135,7 +135,7 @@ See the official [Amazon-Ads API reference](https://advertising.amazon.com/API/d
135
135
 
136
136
  ## Version information
137
137
 
138
- - **Package version:** 0.1.25
139
- - **Connector version:** 1.0.5
140
- - **Generated with Connector SDK commit SHA:** 9d9866b0aae8c3494d04d34e193b9bd860bfc1c6
138
+ - **Package version:** 0.1.27
139
+ - **Connector version:** 1.0.6
140
+ - **Generated with Connector SDK commit SHA:** 888d0538a17d95c6769f63dbad90e713de97c89b
141
141
  - **Changelog:** [View changelog](https://github.com/airbytehq/airbyte-agent-connectors/blob/main/connectors/amazon-ads/CHANGELOG.md)
@@ -102,7 +102,7 @@ See the official [Amazon-Ads API reference](https://advertising.amazon.com/API/d
102
102
 
103
103
  ## Version information
104
104
 
105
- - **Package version:** 0.1.25
106
- - **Connector version:** 1.0.5
107
- - **Generated with Connector SDK commit SHA:** 9d9866b0aae8c3494d04d34e193b9bd860bfc1c6
105
+ - **Package version:** 0.1.27
106
+ - **Connector version:** 1.0.6
107
+ - **Generated with Connector SDK commit SHA:** 888d0538a17d95c6769f63dbad90e713de97c89b
108
108
  - **Changelog:** [View changelog](https://github.com/airbytehq/airbyte-agent-connectors/blob/main/connectors/amazon-ads/CHANGELOG.md)
@@ -546,23 +546,25 @@ class LocalExecutor:
546
546
  return ExecutionResult(success=False, data={}, error=str(e))
547
547
 
548
548
  async def check(self) -> ExecutionResult:
549
- """Perform a health check by running a lightweight list operation.
549
+ """Perform a health check by running a lightweight operation.
550
550
 
551
551
  Finds the operation marked with preferred_for_check=True, or falls back
552
- to the first list operation. Executes it with limit=1 to verify
553
- connectivity and credentials.
552
+ to the first list operation. Executes it to verify connectivity and credentials.
553
+ For list operations, uses limit=1 to minimize data transfer.
554
554
 
555
555
  Returns:
556
556
  ExecutionResult with data containing status, error, and checked operation details.
557
557
  """
558
558
  check_entity = None
559
559
  check_endpoint = None
560
+ check_action = None
560
561
 
561
- # Look for preferred check operation
562
+ # Look for preferred check operation (can be any action type)
562
563
  for (ent_name, op_action), endpoint in self._operation_index.items():
563
564
  if getattr(endpoint, "preferred_for_check", False):
564
565
  check_entity = ent_name
565
566
  check_endpoint = endpoint
567
+ check_action = op_action
566
568
  break
567
569
 
568
570
  # Fallback to first list operation
@@ -571,18 +573,19 @@ class LocalExecutor:
571
573
  if op_action == Action.LIST:
572
574
  check_entity = ent_name
573
575
  check_endpoint = endpoint
576
+ check_action = op_action
574
577
  break
575
578
 
576
- if check_endpoint is None or check_entity is None:
579
+ if check_endpoint is None or check_entity is None or check_action is None:
577
580
  return ExecutionResult(
578
581
  success=True,
579
582
  data={
580
583
  "status": "skipped",
581
- "error": "No list operation available for health check",
584
+ "error": "No operation available for health check",
582
585
  },
583
586
  )
584
587
 
585
- # Find the standard handler to execute the list operation
588
+ # Find the standard handler to execute the operation
586
589
  standard_handler = next(
587
590
  (h for h in self._operation_handlers if isinstance(h, _StandardOperationHandler)),
588
591
  None,
@@ -598,13 +601,15 @@ class LocalExecutor:
598
601
  )
599
602
 
600
603
  try:
601
- await standard_handler.execute_operation(check_entity, Action.LIST, {"limit": 1})
604
+ # Use limit=1 for list operations to minimize data transfer
605
+ params = {"limit": 1} if check_action == Action.LIST else {}
606
+ await standard_handler.execute_operation(check_entity, check_action, params)
602
607
  return ExecutionResult(
603
608
  success=True,
604
609
  data={
605
610
  "status": "healthy",
606
611
  "checked_entity": check_entity,
607
- "checked_action": "list",
612
+ "checked_action": check_action.value,
608
613
  },
609
614
  )
610
615
  except Exception as e:
@@ -614,7 +619,7 @@ class LocalExecutor:
614
619
  "status": "unhealthy",
615
620
  "error": str(e),
616
621
  "checked_entity": check_entity,
617
- "checked_action": "list",
622
+ "checked_action": check_action.value,
618
623
  },
619
624
  error=str(e),
620
625
  )
@@ -10,7 +10,7 @@ from enum import StrEnum
10
10
  from typing import Any, Dict
11
11
  from uuid import UUID
12
12
 
13
- from pydantic import BaseModel, ConfigDict, Field, field_validator
13
+ from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
14
14
  from pydantic_core import Url
15
15
 
16
16
  from .extensions import CacheConfig, ReplicationConfig, RetryConfig
@@ -210,3 +210,34 @@ class Server(BaseModel):
210
210
  raise ValueError("Server URL cannot be empty")
211
211
  # Allow both absolute URLs and relative paths
212
212
  return v
213
+
214
+ @model_validator(mode="after")
215
+ def validate_replication_environment_mapping(self) -> "Server":
216
+ """Validate that x-airbyte-replication-environment-mapping sources exist in variables.
217
+
218
+ For simple mappings like {"subdomain": "subdomain"}, the key is the source variable.
219
+ For transform mappings like {"domain": {"source": "subdomain", "format": "..."}},
220
+ the "source" field is the source variable.
221
+ """
222
+ env_mapping = self.x_airbyte_replication_environment_mapping
223
+ if not env_mapping or not self.variables:
224
+ return self
225
+
226
+ variable_names = set(self.variables.keys())
227
+
228
+ for env_key, mapping_value in env_mapping.items():
229
+ if isinstance(mapping_value, str):
230
+ source_var = env_key
231
+ elif isinstance(mapping_value, EnvironmentMappingTransform):
232
+ source_var = mapping_value.source
233
+ else:
234
+ continue
235
+
236
+ if source_var not in variable_names:
237
+ available = ", ".join(sorted(variable_names)) if variable_names else "(none)"
238
+ raise ValueError(
239
+ f"x-airbyte-replication-environment-mapping: source variable '{source_var}' "
240
+ f"not found in server variables. Available: {available}"
241
+ )
242
+
243
+ return self
@@ -14,7 +14,7 @@ are implemented.
14
14
 
15
15
  from typing import Literal
16
16
 
17
- from pydantic import BaseModel, ConfigDict, Field
17
+ from pydantic import BaseModel, ConfigDict, Field, model_validator
18
18
 
19
19
 
20
20
  class PaginationConfig(BaseModel):
@@ -252,6 +252,24 @@ class ReplicationConfig(BaseModel):
252
252
  description="Mapping from replication_config field names to source_config field names",
253
253
  )
254
254
 
255
+ @model_validator(mode="after")
256
+ def validate_replication_config_key_mapping(self) -> "ReplicationConfig":
257
+ """Validate that replication_config_key_mapping keys exist in properties.
258
+
259
+ The mapping is: {local_key: airbyte_path}
260
+ We validate that local_key exists in our properties.
261
+ """
262
+ if self.replication_config_key_mapping and self.properties:
263
+ property_names = set(self.properties.keys())
264
+ for local_key, airbyte_path in self.replication_config_key_mapping.items():
265
+ if local_key not in property_names:
266
+ available = ", ".join(sorted(property_names)) if property_names else "(none)"
267
+ raise ValueError(
268
+ f"replication_config_key_mapping: local key '{local_key}' "
269
+ f"(mapped to '{airbyte_path}') not found in properties. Available: {available}"
270
+ )
271
+ return self
272
+
255
273
 
256
274
  class CacheConfig(BaseModel):
257
275
  """
@@ -90,9 +90,10 @@ class Operation(BaseModel):
90
90
  None,
91
91
  alias="x-airbyte-preferred-for-check",
92
92
  description=(
93
- "Mark this list operation as the preferred operation for health checks. "
93
+ "Mark this operation as the preferred operation for health checks. "
94
94
  "When the CHECK action is executed, this operation will be used instead of "
95
- "falling back to the first available list operation. Choose a lightweight, "
95
+ "falling back to the first available list operation. The operation's actual "
96
+ "action type (get, list, etc.) will be respected. Choose a lightweight, "
96
97
  "always-available endpoint (e.g., users, accounts)."
97
98
  ),
98
99
  )
@@ -81,6 +81,21 @@ class AuthConfigOption(BaseModel):
81
81
  description="Mapping from source config paths (e.g., 'credentials.api_key') to auth config keys for direct connectors",
82
82
  )
83
83
 
84
+ @model_validator(mode="after")
85
+ def validate_replication_auth_key_mapping(self) -> "AuthConfigOption":
86
+ """Validate that replication_auth_key_mapping target keys exist in properties."""
87
+ if self.replication_auth_key_mapping and self.properties:
88
+ property_names = set(self.properties.keys())
89
+ for airbyte_path, our_key in self.replication_auth_key_mapping.items():
90
+ if our_key not in property_names:
91
+ option_context = f"oneOf option '{self.title}'" if self.title else "oneOf option"
92
+ available = ", ".join(sorted(property_names)) if property_names else "(none)"
93
+ raise ValueError(
94
+ f"replication_auth_key_mapping in {option_context}: target key '{our_key}' "
95
+ f"(mapped from '{airbyte_path}') not found in properties. Available: {available}"
96
+ )
97
+ return self
98
+
84
99
 
85
100
  class AirbyteAuthConfig(BaseModel):
86
101
  """
@@ -146,8 +161,30 @@ class AirbyteAuthConfig(BaseModel):
146
161
  if not self.auth_mapping:
147
162
  raise ValueError("Single auth option must have auth_mapping")
148
163
 
164
+ # Validate replication_auth_key_mapping targets exist in properties
165
+ if self.replication_auth_key_mapping and self.properties:
166
+ self._validate_replication_auth_key_mapping(self.replication_auth_key_mapping, self.properties, context="x-airbyte-auth-config")
167
+
149
168
  return self
150
169
 
170
+ @staticmethod
171
+ def _validate_replication_auth_key_mapping(mapping: Dict[str, str], properties: Dict[str, AuthConfigFieldSpec], context: str) -> None:
172
+ """Validate that replication_auth_key_mapping target keys exist in properties.
173
+
174
+ Args:
175
+ mapping: The replication_auth_key_mapping dict (airbyte_path -> our_key)
176
+ properties: The properties dict from x-airbyte-auth-config
177
+ context: Context string for error messages
178
+ """
179
+ property_names = set(properties.keys())
180
+ for airbyte_path, our_key in mapping.items():
181
+ if our_key not in property_names:
182
+ available = ", ".join(sorted(property_names)) if property_names else "(none)"
183
+ raise ValueError(
184
+ f"replication_auth_key_mapping in {context}: target key '{our_key}' "
185
+ f"(mapped from '{airbyte_path}') not found in properties. Available: {available}"
186
+ )
187
+
151
188
 
152
189
  class SecurityScheme(BaseModel):
153
190
  """
@@ -239,7 +239,7 @@ class EndpointDefinition(BaseModel):
239
239
  # Health check support (Airbyte extension)
240
240
  preferred_for_check: bool = Field(
241
241
  False,
242
- description="Mark this list operation as preferred for health checks (from x-airbyte-preferred-for-check extension)",
242
+ description="Mark this operation as preferred for health checks (from x-airbyte-preferred-for-check extension)",
243
243
  )
244
244
 
245
245
 
@@ -959,7 +959,7 @@ def validate_connector_readiness(connector_dir: str | Path) -> Dict[str, Any]:
959
959
  if not has_preferred_check:
960
960
  readiness_warnings.append(
961
961
  "No operation has x-airbyte-preferred-for-check: true. "
962
- "Add this extension to a lightweight list operation (e.g., users.list) "
962
+ "Add this extension to a lightweight operation (e.g., users.list or accounts.get) "
963
963
  "to enable reliable health checks."
964
964
  )
965
965
 
@@ -93,7 +93,7 @@ class AmazonAdsConnector:
93
93
  """
94
94
 
95
95
  connector_name = "amazon-ads"
96
- connector_version = "1.0.5"
96
+ connector_version = "1.0.6"
97
97
  vendored_sdk_version = "0.1.0" # Version of vendored connector-sdk
98
98
 
99
99
  # Map of (entity, action) -> needs_envelope for envelope wrapping decision
@@ -26,7 +26,7 @@ from uuid import (
26
26
  AmazonAdsConnectorModel: ConnectorModel = ConnectorModel(
27
27
  id=UUID('c6b0a29e-1da9-4512-9002-7bfd0cba2246'),
28
28
  name='amazon-ads',
29
- version='1.0.5',
29
+ version='1.0.6',
30
30
  base_url='{region}',
31
31
  auth=AuthConfig(
32
32
  type=AuthType.OAUTH2,
@@ -39,7 +39,7 @@ AmazonAdsConnectorModel: ConnectorModel = ConnectorModel(
39
39
  user_config_spec=AirbyteAuthConfig(
40
40
  title='OAuth2 Authentication',
41
41
  type='object',
42
- required=['client_id', 'client_secret', 'refresh_token'],
42
+ required=['refresh_token'],
43
43
  properties={
44
44
  'client_id': AuthConfigFieldSpec(
45
45
  title='Client ID',
@@ -9,6 +9,7 @@ from __future__ import annotations
9
9
 
10
10
  from pydantic import BaseModel, ConfigDict, Field
11
11
  from typing import TypeVar, Generic, Union, Any
12
+ from typing import Optional
12
13
 
13
14
  # Authentication configuration
14
15
 
@@ -17,9 +18,9 @@ class AmazonAdsAuthConfig(BaseModel):
17
18
 
18
19
  model_config = ConfigDict(extra="forbid")
19
20
 
20
- client_id: str
21
+ client_id: Optional[str] = None
21
22
  """The client ID of your Amazon Ads API application"""
22
- client_secret: str
23
+ client_secret: Optional[str] = None
23
24
  """The client secret of your Amazon Ads API application"""
24
25
  refresh_token: str
25
26
  """The refresh token obtained from the OAuth authorization flow"""
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "airbyte-agent-amazon-ads"
3
- version = "0.1.25"
3
+ version = "0.1.27"
4
4
  description = "Airbyte Amazon-Ads Connector for AI platforms"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"