airbyte-agent-amazon-ads 0.1.1__py3-none-any.whl → 0.1.6__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.
@@ -634,9 +634,7 @@ class OAuth2AuthStrategy(AuthStrategy):
634
634
  Headers dict with additional headers added
635
635
  """
636
636
  # Build template context with extracted secret values
637
- template_context = {
638
- key: extract_secret_value(value) for key, value in secrets.items()
639
- }
637
+ template_context = {key: extract_secret_value(value) for key, value in secrets.items()}
640
638
 
641
639
  for header_name, value_template in additional_headers.items():
642
640
  # Use Jinja2 templating for variable substitution
@@ -694,9 +694,7 @@ class LocalExecutor:
694
694
  """
695
695
  return {key: value for key, value in params.items() if key in allowed_fields and value is not None}
696
696
 
697
- def _extract_header_params(
698
- self, endpoint: EndpointDefinition, params: dict[str, Any], body: dict[str, Any] | None = None
699
- ) -> dict[str, str]:
697
+ def _extract_header_params(self, endpoint: EndpointDefinition, params: dict[str, Any], body: dict[str, Any] | None = None) -> dict[str, str]:
700
698
  """Extract header parameters from params and schema defaults.
701
699
 
702
700
  Also adds Content-Type header when there's a request body (unless already specified
@@ -140,6 +140,33 @@ class ServerVariable(BaseModel):
140
140
  description: str | None = None
141
141
 
142
142
 
143
+ class EnvironmentMappingTransform(BaseModel):
144
+ """
145
+ Structured transform for environment mapping values.
146
+
147
+ Allows transforming environment values before storing in source_config.
148
+
149
+ Example:
150
+ source: subdomain
151
+ format: "{value}.atlassian.net"
152
+
153
+ The format string uses {value} as a placeholder for the source value.
154
+ """
155
+
156
+ model_config = ConfigDict(populate_by_name=True, extra="forbid")
157
+
158
+ source: str = Field(description="The environment config key to read the value from")
159
+ format: str | None = Field(
160
+ default=None,
161
+ description="Optional format string to transform the value. Use {value} as placeholder.",
162
+ )
163
+
164
+
165
+ # Type alias for environment mapping values: either a simple string (config key)
166
+ # or a structured transform with source and optional transform template
167
+ EnvironmentMappingValue = str | EnvironmentMappingTransform
168
+
169
+
143
170
  class Server(BaseModel):
144
171
  """
145
172
  Server URL and variable definitions.
@@ -152,7 +179,10 @@ class Server(BaseModel):
152
179
  url: str
153
180
  description: str | None = None
154
181
  variables: Dict[str, ServerVariable] = Field(default_factory=dict)
155
- x_airbyte_replication_environment_mapping: Dict[str, str] | None = Field(default=None, alias="x-airbyte-replication-environment-mapping")
182
+ x_airbyte_replication_environment_mapping: Dict[str, EnvironmentMappingValue] | None = Field(
183
+ default=None,
184
+ alias="x-airbyte-replication-environment-mapping",
185
+ )
156
186
  x_airbyte_replication_environment_constants: Dict[str, Any] | None = Field(
157
187
  default=None,
158
188
  alias="x-airbyte-replication-environment-constants",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airbyte-agent-amazon-ads
3
- Version: 0.1.1
3
+ Version: 0.1.6
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/
@@ -67,19 +67,50 @@ uv pip install airbyte-agent-amazon-ads
67
67
 
68
68
  ## Usage
69
69
 
70
+ Connectors can run in open source or hosted mode.
71
+
72
+ ### Open source
73
+
74
+ In open source mode, you provide API credentials directly to the connector.
75
+
70
76
  ```python
71
- from airbyte_agent_amazon_ads import AmazonAdsConnector, AmazonAdsAuthConfig
77
+ from airbyte_agent_amazon-ads import AmazonAdsConnector
78
+ from airbyte_agent_amazon_ads.models import AmazonAdsAuthConfig
72
79
 
73
80
  connector = AmazonAdsConnector(
74
- auth_config=AmazonAdsAuthConfig(
75
- client_id="...",
76
- client_secret="...",
77
- refresh_token="..."
78
- )
81
+ auth_config=AmazonAdsAuthConfig(
82
+ client_id="<The client ID of your Amazon Ads API application>",
83
+ client_secret="<The client secret of your Amazon Ads API application>",
84
+ refresh_token="<The refresh token obtained from the OAuth authorization flow>"
85
+ )
79
86
  )
80
- result = await connector.profiles.list()
87
+
88
+ @agent.tool_plain # assumes you're using Pydantic AI
89
+ @AmazonAdsConnector.describe
90
+ async def amazon-ads_execute(entity: str, action: str, params: dict | None = None):
91
+ return await connector.execute(entity, action, params or {})
81
92
  ```
82
93
 
94
+ ### Hosted
95
+
96
+ In hosted mode, API credentials are stored securely in Airbyte Cloud. You provide your Airbyte credentials instead.
97
+
98
+ This example assumes you've already authenticated your connector with Airbyte. See [Authentication](AUTH.md) to learn more about authenticating. If you need a step-by-step guide, see the [hosted execution tutorial](https://docs.airbyte.com/ai-agents/quickstarts/tutorial-hosted).
99
+
100
+ ```python
101
+ from airbyte_agent_amazon-ads import AmazonAdsConnector
102
+
103
+ connector = AmazonAdsConnector(
104
+ external_user_id="<your-scoped-token>",
105
+ airbyte_client_id="<your-client-id>",
106
+ airbyte_client_secret="<your-client-secret>"
107
+ )
108
+
109
+ @agent.tool_plain # assumes you're using Pydantic AI
110
+ @AmazonAdsConnector.describe
111
+ async def amazon-ads_execute(entity: str, action: str, params: dict | None = None):
112
+ return await connector.execute(entity, action, params or {})
113
+ ```
83
114
 
84
115
  ## Full documentation
85
116
 
@@ -92,12 +123,14 @@ This connector supports the following entities and actions.
92
123
  | Sponsored Product Campaigns | [List](./REFERENCE.md#sponsored-product-campaigns-list), [Get](./REFERENCE.md#sponsored-product-campaigns-get) |
93
124
 
94
125
 
126
+ For all authentication options, see the connector's [authentication documentation](AUTH.md).
127
+
95
128
  For detailed documentation on available actions and parameters, see this connector's [full reference documentation](./REFERENCE.md).
96
129
 
97
130
  For the service's official API docs, see the [Amazon-Ads API reference](https://advertising.amazon.com/API/docs/en-us).
98
131
 
99
132
  ## Version information
100
133
 
101
- - **Package version:** 0.1.1
134
+ - **Package version:** 0.1.6
102
135
  - **Connector version:** 1.0.1
103
- - **Generated with Connector SDK commit SHA:** c713ec4833c2b52dc89926ec68caa343423884cd
136
+ - **Generated with Connector SDK commit SHA:** 416466da4970ae5fd6c7f2c658a68e047e51efd9
@@ -5,7 +5,7 @@ airbyte_agent_amazon_ads/models.py,sha256=373Eq2tb4mroZNrkWCpt-oFY1bZgOZd2sDfaNV
5
5
  airbyte_agent_amazon_ads/types.py,sha256=qe9zmgsEV06BQKQ68In9fwZji2tDqCB2JJXU_6dNwxA,1538
6
6
  airbyte_agent_amazon_ads/_vendored/__init__.py,sha256=ILl7AHXMui__swyrjxrh9yRa4dLiwBvV6axPWFWty80,38
7
7
  airbyte_agent_amazon_ads/_vendored/connector_sdk/__init__.py,sha256=T5o7roU6NSpH-lCAGZ338sE5dlh4ZU6i6IkeG1zpems,1949
8
- airbyte_agent_amazon_ads/_vendored/connector_sdk/auth_strategies.py,sha256=Ve7ObJc_A0N99b8ouuicQzVauDunOvFNG1SRKDfV4ag,42110
8
+ airbyte_agent_amazon_ads/_vendored/connector_sdk/auth_strategies.py,sha256=5Sb9moUp623o67Q2wMa8iZldJH08y4gQdoutoO_75Iw,42088
9
9
  airbyte_agent_amazon_ads/_vendored/connector_sdk/auth_template.py,sha256=nju4jqlFC_KI82ILNumNIyiUtRJcy7J94INIZ0QraI4,4454
10
10
  airbyte_agent_amazon_ads/_vendored/connector_sdk/connector_model_loader.py,sha256=SY_Juqw-cap156MsdgrMfe5MAuFdX0vUcSbH5LUYNK0,36295
11
11
  airbyte_agent_amazon_ads/_vendored/connector_sdk/constants.py,sha256=AtzOvhDMWbRJgpsQNWl5tkogHD6mWgEY668PgRmgtOY,2737
@@ -21,7 +21,7 @@ airbyte_agent_amazon_ads/_vendored/connector_sdk/cloud_utils/__init__.py,sha256=
21
21
  airbyte_agent_amazon_ads/_vendored/connector_sdk/cloud_utils/client.py,sha256=YxdRpQr9XjDzih6csSseBVGn9kfMtaqbOCXP0TPuzFY,7189
22
22
  airbyte_agent_amazon_ads/_vendored/connector_sdk/executor/__init__.py,sha256=EmG9YQNAjSuYCVB4D5VoLm4qpD1KfeiiOf7bpALj8p8,702
23
23
  airbyte_agent_amazon_ads/_vendored/connector_sdk/executor/hosted_executor.py,sha256=ydHcG-biRS1ITT5ELwPShdJW-KYpvK--Fos1ipNgHho,6995
24
- airbyte_agent_amazon_ads/_vendored/connector_sdk/executor/local_executor.py,sha256=AgBQBlYIra7kyWcZtRRWSJLqrPbuDq38j13hoVoWJJA,73863
24
+ airbyte_agent_amazon_ads/_vendored/connector_sdk/executor/local_executor.py,sha256=Vg4rPk0sbgXEdYLx2n2Spgj9XrDUWykD2E2o7sWloRM,73849
25
25
  airbyte_agent_amazon_ads/_vendored/connector_sdk/executor/models.py,sha256=lYVT_bNcw-PoIks4WHNyl2VY-lJVf2FntzINSOBIheE,5845
26
26
  airbyte_agent_amazon_ads/_vendored/connector_sdk/http/__init__.py,sha256=y8fbzZn-3yV9OxtYz8Dy6FFGI5v6TOqADd1G3xHH3Hw,911
27
27
  airbyte_agent_amazon_ads/_vendored/connector_sdk/http/config.py,sha256=6J7YIIwHC6sRu9i-yKa5XvArwK2KU60rlnmxzDZq3lw,3283
@@ -42,7 +42,7 @@ airbyte_agent_amazon_ads/_vendored/connector_sdk/performance/__init__.py,sha256=
42
42
  airbyte_agent_amazon_ads/_vendored/connector_sdk/performance/instrumentation.py,sha256=_dXvNiqdndIBwDjeDKNViWzn_M5FkSUsMmJtFldrmsM,1504
43
43
  airbyte_agent_amazon_ads/_vendored/connector_sdk/performance/metrics.py,sha256=FRff7dKt4iwt_A7pxV5n9kAGBR756PC7q8-weWygPSM,2817
44
44
  airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/__init__.py,sha256=Uymu-QuzGJuMxexBagIvUxpVAigIuIhz3KeBl_Vu4Ko,1638
45
- airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/base.py,sha256=zBW5svQohGCdn46Snc8DG4PsqfmZDovp693vRgugDFE,5374
45
+ airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/base.py,sha256=KX3OUSnWu_M6yq-IMTH4dI420x-VRSvKc7uery6gFUU,6303
46
46
  airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/components.py,sha256=x3YCM1p2n_xHi50fMeOX0mXUiPqjGlLHs3Go8jXokb0,7895
47
47
  airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/connector.py,sha256=mSZk1wr2YSdRj9tTRsPAuIlCzd_xZLw-Bzl1sMwE0rE,3731
48
48
  airbyte_agent_amazon_ads/_vendored/connector_sdk/schema/extensions.py,sha256=f7VhHrcIYxaPOJHMc4g0lpy04pZTbx5nlroNzAu5B9Q,7135
@@ -52,6 +52,6 @@ airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/__init__.py,sha256=Ra
52
52
  airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/config.py,sha256=tLmQwAFD0kP1WyBGWBS3ysaudN9H3e-3EopKZi6cGKg,885
53
53
  airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/events.py,sha256=8Y1NbXiwISX-V_wRofY7PqcwEXD0dLMnntKkY6XFU2s,1328
54
54
  airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/tracker.py,sha256=Ftrk0_ddfM7dZG8hF9xBuPwhbc9D6JZ7Q9qs5o3LEyA,5579
55
- airbyte_agent_amazon_ads-0.1.1.dist-info/METADATA,sha256=SPpbByLuPB_FNeSM-Teps1O786Bn-IYE8AjdKYxqAv0,3623
56
- airbyte_agent_amazon_ads-0.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
57
- airbyte_agent_amazon_ads-0.1.1.dist-info/RECORD,,
55
+ airbyte_agent_amazon_ads-0.1.6.dist-info/METADATA,sha256=1fIq0thyfKkVulSJkgVW5tqo4YgoSr5YwFK82aAUt4c,5152
56
+ airbyte_agent_amazon_ads-0.1.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
57
+ airbyte_agent_amazon_ads-0.1.6.dist-info/RECORD,,