airbyte-agent-zendesk-chat 0.1.11__py3-none-any.whl → 0.1.14__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.

Potentially problematic release.


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

@@ -14,9 +14,9 @@ from .models import (
14
14
  AgentRoles,
15
15
  AgentTimeline,
16
16
  Ban,
17
+ ChatConversion,
17
18
  WebpathItem,
18
19
  ChatHistoryItem,
19
- ChatConversion,
20
20
  ChatEngagement,
21
21
  Chat,
22
22
  Visitor,
@@ -109,9 +109,9 @@ __all__ = [
109
109
  "AgentRoles",
110
110
  "AgentTimeline",
111
111
  "Ban",
112
+ "ChatConversion",
112
113
  "WebpathItem",
113
114
  "ChatHistoryItem",
114
- "ChatConversion",
115
115
  "ChatEngagement",
116
116
  "Chat",
117
117
  "Visitor",
@@ -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,
@@ -132,6 +132,16 @@ class Ban(BaseModel):
132
132
  reason: Union[str | None, Any] = Field(default=None)
133
133
  created_at: Union[str | None, Any] = Field(default=None)
134
134
 
135
+ class ChatConversion(BaseModel):
136
+ """ChatConversion type definition"""
137
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
138
+
139
+ id: Union[str | None, Any] = Field(default=None)
140
+ goal_id: Union[int | None, Any] = Field(default=None)
141
+ goal_name: Union[str | None, Any] = Field(default=None)
142
+ timestamp: Union[str | None, Any] = Field(default=None)
143
+ attribution: Union[Any, Any] = Field(default=None)
144
+
135
145
  class WebpathItem(BaseModel):
136
146
  """WebpathItem type definition"""
137
147
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -158,16 +168,6 @@ class ChatHistoryItem(BaseModel):
158
168
  new_tags: Union[list[str] | None, Any] = Field(default=None)
159
169
  options: Union[str | None, Any] = Field(default=None)
160
170
 
161
- class ChatConversion(BaseModel):
162
- """ChatConversion type definition"""
163
- model_config = ConfigDict(extra="allow", populate_by_name=True)
164
-
165
- id: Union[str | None, Any] = Field(default=None)
166
- goal_id: Union[int | None, Any] = Field(default=None)
167
- goal_name: Union[str | None, Any] = Field(default=None)
168
- timestamp: Union[str | None, Any] = Field(default=None)
169
- attribution: Union[Any, Any] = Field(default=None)
170
-
171
171
  class ChatEngagement(BaseModel):
172
172
  """ChatEngagement type definition"""
173
173
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airbyte-agent-zendesk-chat
3
- Version: 0.1.11
3
+ Version: 0.1.14
4
4
  Summary: Airbyte Zendesk-Chat 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/
@@ -119,7 +119,7 @@ This example assumes you've already authenticated your connector with Airbyte. S
119
119
  from airbyte_agent_zendesk-chat import ZendeskChatConnector
120
120
 
121
121
  connector = ZendeskChatConnector(
122
- external_user_id="<your-scoped-token>",
122
+ external_user_id="<your_external_user_id>",
123
123
  airbyte_client_id="<your-client-id>",
124
124
  airbyte_client_secret="<your-client-secret>"
125
125
  )
@@ -162,6 +162,6 @@ For the service's official API docs, see the [Zendesk-Chat API reference](https:
162
162
 
163
163
  ## Version information
164
164
 
165
- - **Package version:** 0.1.11
165
+ - **Package version:** 0.1.14
166
166
  - **Connector version:** 0.1.4
167
- - **Generated with Connector SDK commit SHA:** 609c1d86c76b36ff699b57123a5a8c2050d958c3
167
+ - **Generated with Connector SDK commit SHA:** 4bded58d3cabff3ac257c30c425ccab118f6ed87
@@ -1,13 +1,13 @@
1
- airbyte_agent_zendesk_chat/__init__.py,sha256=ca45IFjyP9cCDoJcdAKiVWLQKviM2sTzGOla63CPO_s,4292
1
+ airbyte_agent_zendesk_chat/__init__.py,sha256=ZnKvI-0KdSc5Kf6IDTqh9Fz7Y6x8T0Oap73oyPggN6I,4292
2
2
  airbyte_agent_zendesk_chat/connector.py,sha256=R_JDuiJ0kpk4_xNfgUPg1LNHlrcpYLx56Vkq8z8HesI,45365
3
3
  airbyte_agent_zendesk_chat/connector_model.py,sha256=phL6Mh98faJyMEC9KshDl8vtJrV6cWctRvgBOoKB4Sg,122093
4
- airbyte_agent_zendesk_chat/models.py,sha256=zCgNKE7xJ5OWch2fMprtInihzsk6k-rzu0myoHV2rng,23905
4
+ airbyte_agent_zendesk_chat/models.py,sha256=daD_L8bL04iOmLCOPNimrtIEtnsOsn7nmRMRNPvEYN8,23905
5
5
  airbyte_agent_zendesk_chat/types.py,sha256=C5laH7V__abYm0F1Jck49Az6SCJQdnXLgtahxponDgM,28925
6
6
  airbyte_agent_zendesk_chat/_vendored/__init__.py,sha256=ILl7AHXMui__swyrjxrh9yRa4dLiwBvV6axPWFWty80,38
7
7
  airbyte_agent_zendesk_chat/_vendored/connector_sdk/__init__.py,sha256=T5o7roU6NSpH-lCAGZ338sE5dlh4ZU6i6IkeG1zpems,1949
8
8
  airbyte_agent_zendesk_chat/_vendored/connector_sdk/auth_strategies.py,sha256=5Sb9moUp623o67Q2wMa8iZldJH08y4gQdoutoO_75Iw,42088
9
9
  airbyte_agent_zendesk_chat/_vendored/connector_sdk/auth_template.py,sha256=nju4jqlFC_KI82ILNumNIyiUtRJcy7J94INIZ0QraI4,4454
10
- airbyte_agent_zendesk_chat/_vendored/connector_sdk/connector_model_loader.py,sha256=nCu6oym6LoKrS94NTivU1vyQE_qnU-rhx8ExpuOX_LU,39544
10
+ airbyte_agent_zendesk_chat/_vendored/connector_sdk/connector_model_loader.py,sha256=VPNu4KKQPDmF9YIDH0qVvvpZ-BACDZ6joNgFQEZbjo8,41828
11
11
  airbyte_agent_zendesk_chat/_vendored/connector_sdk/constants.py,sha256=AtzOvhDMWbRJgpsQNWl5tkogHD6mWgEY668PgRmgtOY,2737
12
12
  airbyte_agent_zendesk_chat/_vendored/connector_sdk/exceptions.py,sha256=ss5MGv9eVPmsbLcLWetuu3sDmvturwfo6Pw3M37Oq5k,481
13
13
  airbyte_agent_zendesk_chat/_vendored/connector_sdk/extensions.py,sha256=XWRRoJOOrwUHSKbuQt5DU7CCu8ePzhd_HuP7c_uD77w,21376
@@ -52,6 +52,6 @@ airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/__init__.py,sha256=
52
52
  airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/config.py,sha256=tLmQwAFD0kP1WyBGWBS3ysaudN9H3e-3EopKZi6cGKg,885
53
53
  airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/events.py,sha256=8Y1NbXiwISX-V_wRofY7PqcwEXD0dLMnntKkY6XFU2s,1328
54
54
  airbyte_agent_zendesk_chat/_vendored/connector_sdk/telemetry/tracker.py,sha256=Ftrk0_ddfM7dZG8hF9xBuPwhbc9D6JZ7Q9qs5o3LEyA,5579
55
- airbyte_agent_zendesk_chat-0.1.11.dist-info/METADATA,sha256=S4acOSQYD6WwXfYnRoQG4jN4eZmQE15QryY4DiefAp8,6606
56
- airbyte_agent_zendesk_chat-0.1.11.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
57
- airbyte_agent_zendesk_chat-0.1.11.dist-info/RECORD,,
55
+ airbyte_agent_zendesk_chat-0.1.14.dist-info/METADATA,sha256=4CmpJ8x7tmDzomQBrhNrlq63at9pAoqELpq50h1VTyc,6610
56
+ airbyte_agent_zendesk_chat-0.1.14.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
57
+ airbyte_agent_zendesk_chat-0.1.14.dist-info/RECORD,,