airbyte-agent-shopify 0.1.9__py3-none-any.whl → 0.1.10__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_shopify/_vendored/connector_sdk/connector_model_loader.py +54 -0
- {airbyte_agent_shopify-0.1.9.dist-info → airbyte_agent_shopify-0.1.10.dist-info}/METADATA +3 -3
- {airbyte_agent_shopify-0.1.9.dist-info → airbyte_agent_shopify-0.1.10.dist-info}/RECORD +4 -4
- {airbyte_agent_shopify-0.1.9.dist-info → airbyte_agent_shopify-0.1.10.dist-info}/WHEEL +0 -0
|
@@ -62,6 +62,53 @@ class TokenExtractValidationError(ConnectorModelLoaderError):
|
|
|
62
62
|
pass
|
|
63
63
|
|
|
64
64
|
|
|
65
|
+
# Expected auth_mapping keys for each auth type.
|
|
66
|
+
# These are the auth parameters that each security scheme expects, NOT the user's credential field names.
|
|
67
|
+
EXPECTED_AUTH_MAPPING_KEYS: dict[AuthType, set[str]] = {
|
|
68
|
+
AuthType.BEARER: {"token"},
|
|
69
|
+
AuthType.BASIC: {"username", "password"},
|
|
70
|
+
AuthType.API_KEY: {"api_key"},
|
|
71
|
+
AuthType.OAUTH2: {"access_token", "refresh_token", "client_id", "client_secret"},
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _validate_auth_mapping_keys(
|
|
76
|
+
auth_type: AuthType,
|
|
77
|
+
auth_config: AirbyteAuthConfig | None,
|
|
78
|
+
scheme_name: str = "default",
|
|
79
|
+
) -> None:
|
|
80
|
+
"""Validate that auth_mapping keys match expected parameters for the auth type.
|
|
81
|
+
|
|
82
|
+
The auth_mapping keys must be the parameters expected by the security scheme
|
|
83
|
+
(e.g., "token" for bearer), not the user's credential field names.
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
auth_type: The authentication type
|
|
87
|
+
auth_config: The x-airbyte-auth-config containing auth_mapping
|
|
88
|
+
scheme_name: Name of the security scheme for error messages
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
InvalidOpenAPIError: If auth_mapping keys don't match expected parameters
|
|
92
|
+
"""
|
|
93
|
+
if auth_config is None or auth_config.auth_mapping is None:
|
|
94
|
+
return # No explicit auth_mapping, will use defaults
|
|
95
|
+
|
|
96
|
+
expected_keys = EXPECTED_AUTH_MAPPING_KEYS.get(auth_type)
|
|
97
|
+
if expected_keys is None:
|
|
98
|
+
return # Unknown auth type, skip validation
|
|
99
|
+
|
|
100
|
+
actual_keys = set(auth_config.auth_mapping.keys())
|
|
101
|
+
invalid_keys = actual_keys - expected_keys
|
|
102
|
+
|
|
103
|
+
if invalid_keys:
|
|
104
|
+
raise InvalidOpenAPIError(
|
|
105
|
+
f"Invalid auth_mapping keys for {auth_type.value} auth in scheme '{scheme_name}': {invalid_keys}. "
|
|
106
|
+
f"Expected keys for {auth_type.value}: {sorted(expected_keys)}. "
|
|
107
|
+
f"Note: auth_mapping keys must be the auth parameters (e.g., 'token' for bearer), "
|
|
108
|
+
f'not your credential field names. Use template syntax to map: token: "${{your_field}}"'
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
65
112
|
def extract_path_params(path: str) -> list[str]:
|
|
66
113
|
"""Extract parameter names from path template.
|
|
67
114
|
|
|
@@ -924,6 +971,9 @@ def _parse_single_security_scheme(scheme: Any) -> AuthConfig:
|
|
|
924
971
|
oauth2_config = _parse_oauth2_config(scheme)
|
|
925
972
|
# Use explicit x-airbyte-auth-config if present, otherwise generate default
|
|
926
973
|
auth_config_obj = scheme.x_airbyte_auth_config or _generate_default_auth_config(AuthType.OAUTH2)
|
|
974
|
+
# Validate auth_mapping keys if explicitly provided
|
|
975
|
+
if scheme.x_airbyte_auth_config:
|
|
976
|
+
_validate_auth_mapping_keys(AuthType.OAUTH2, scheme.x_airbyte_auth_config)
|
|
927
977
|
return AuthConfig(
|
|
928
978
|
type=AuthType.OAUTH2,
|
|
929
979
|
config=oauth2_config,
|
|
@@ -934,6 +984,10 @@ def _parse_single_security_scheme(scheme: Any) -> AuthConfig:
|
|
|
934
984
|
# Use explicit x-airbyte-auth-config if present, otherwise generate default
|
|
935
985
|
auth_config_obj = scheme.x_airbyte_auth_config or _generate_default_auth_config(auth_type)
|
|
936
986
|
|
|
987
|
+
# Validate auth_mapping keys if explicitly provided
|
|
988
|
+
if scheme.x_airbyte_auth_config:
|
|
989
|
+
_validate_auth_mapping_keys(auth_type, scheme.x_airbyte_auth_config)
|
|
990
|
+
|
|
937
991
|
return AuthConfig(
|
|
938
992
|
type=auth_type,
|
|
939
993
|
config=auth_config,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: airbyte-agent-shopify
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.10
|
|
4
4
|
Summary: Airbyte Shopify 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/
|
|
@@ -168,6 +168,6 @@ For the service's official API docs, see the [Shopify API reference](https://sho
|
|
|
168
168
|
|
|
169
169
|
## Version information
|
|
170
170
|
|
|
171
|
-
- **Package version:** 0.1.
|
|
171
|
+
- **Package version:** 0.1.10
|
|
172
172
|
- **Connector version:** 0.1.1
|
|
173
|
-
- **Generated with Connector SDK commit SHA:**
|
|
173
|
+
- **Generated with Connector SDK commit SHA:** b73c71e077aea8d316f7161dbd5014d4fb9f3098
|
|
@@ -7,7 +7,7 @@ airbyte_agent_shopify/_vendored/__init__.py,sha256=ILl7AHXMui__swyrjxrh9yRa4dLiw
|
|
|
7
7
|
airbyte_agent_shopify/_vendored/connector_sdk/__init__.py,sha256=T5o7roU6NSpH-lCAGZ338sE5dlh4ZU6i6IkeG1zpems,1949
|
|
8
8
|
airbyte_agent_shopify/_vendored/connector_sdk/auth_strategies.py,sha256=5Sb9moUp623o67Q2wMa8iZldJH08y4gQdoutoO_75Iw,42088
|
|
9
9
|
airbyte_agent_shopify/_vendored/connector_sdk/auth_template.py,sha256=nju4jqlFC_KI82ILNumNIyiUtRJcy7J94INIZ0QraI4,4454
|
|
10
|
-
airbyte_agent_shopify/_vendored/connector_sdk/connector_model_loader.py,sha256=
|
|
10
|
+
airbyte_agent_shopify/_vendored/connector_sdk/connector_model_loader.py,sha256=VPNu4KKQPDmF9YIDH0qVvvpZ-BACDZ6joNgFQEZbjo8,41828
|
|
11
11
|
airbyte_agent_shopify/_vendored/connector_sdk/constants.py,sha256=AtzOvhDMWbRJgpsQNWl5tkogHD6mWgEY668PgRmgtOY,2737
|
|
12
12
|
airbyte_agent_shopify/_vendored/connector_sdk/exceptions.py,sha256=ss5MGv9eVPmsbLcLWetuu3sDmvturwfo6Pw3M37Oq5k,481
|
|
13
13
|
airbyte_agent_shopify/_vendored/connector_sdk/extensions.py,sha256=XWRRoJOOrwUHSKbuQt5DU7CCu8ePzhd_HuP7c_uD77w,21376
|
|
@@ -52,6 +52,6 @@ airbyte_agent_shopify/_vendored/connector_sdk/telemetry/__init__.py,sha256=RaLgk
|
|
|
52
52
|
airbyte_agent_shopify/_vendored/connector_sdk/telemetry/config.py,sha256=tLmQwAFD0kP1WyBGWBS3ysaudN9H3e-3EopKZi6cGKg,885
|
|
53
53
|
airbyte_agent_shopify/_vendored/connector_sdk/telemetry/events.py,sha256=8Y1NbXiwISX-V_wRofY7PqcwEXD0dLMnntKkY6XFU2s,1328
|
|
54
54
|
airbyte_agent_shopify/_vendored/connector_sdk/telemetry/tracker.py,sha256=Ftrk0_ddfM7dZG8hF9xBuPwhbc9D6JZ7Q9qs5o3LEyA,5579
|
|
55
|
-
airbyte_agent_shopify-0.1.
|
|
56
|
-
airbyte_agent_shopify-0.1.
|
|
57
|
-
airbyte_agent_shopify-0.1.
|
|
55
|
+
airbyte_agent_shopify-0.1.10.dist-info/METADATA,sha256=jzglUzzWlClgpi_Dvn8axko4QX9wgqdkEm3_IuPucas,7838
|
|
56
|
+
airbyte_agent_shopify-0.1.10.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
57
|
+
airbyte_agent_shopify-0.1.10.dist-info/RECORD,,
|
|
File without changes
|