airbyte-agent-zendesk-support 0.18.26__py3-none-any.whl → 0.18.27__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_zendesk_support/_vendored/connector_sdk/executor/local_executor.py +35 -6
- {airbyte_agent_zendesk_support-0.18.26.dist-info → airbyte_agent_zendesk_support-0.18.27.dist-info}/METADATA +3 -3
- {airbyte_agent_zendesk_support-0.18.26.dist-info → airbyte_agent_zendesk_support-0.18.27.dist-info}/RECORD +4 -4
- {airbyte_agent_zendesk_support-0.18.26.dist-info → airbyte_agent_zendesk_support-0.18.27.dist-info}/WHEEL +0 -0
|
@@ -837,7 +837,13 @@ class LocalExecutor:
|
|
|
837
837
|
Request body dict or None if no body needed
|
|
838
838
|
"""
|
|
839
839
|
if endpoint.graphql_body:
|
|
840
|
-
|
|
840
|
+
# Extract defaults from query_params_schema for GraphQL variable interpolation
|
|
841
|
+
param_defaults = {
|
|
842
|
+
name: schema.get("default")
|
|
843
|
+
for name, schema in endpoint.query_params_schema.items()
|
|
844
|
+
if "default" in schema
|
|
845
|
+
}
|
|
846
|
+
return self._build_graphql_body(endpoint.graphql_body, params, param_defaults)
|
|
841
847
|
elif endpoint.body_fields:
|
|
842
848
|
return self._extract_body(endpoint.body_fields, params)
|
|
843
849
|
return None
|
|
@@ -903,12 +909,18 @@ class LocalExecutor:
|
|
|
903
909
|
|
|
904
910
|
return query
|
|
905
911
|
|
|
906
|
-
def _build_graphql_body(
|
|
912
|
+
def _build_graphql_body(
|
|
913
|
+
self,
|
|
914
|
+
graphql_config: dict[str, Any],
|
|
915
|
+
params: dict[str, Any],
|
|
916
|
+
param_defaults: dict[str, Any] | None = None,
|
|
917
|
+
) -> dict[str, Any]:
|
|
907
918
|
"""Build GraphQL request body with variable substitution and field selection.
|
|
908
919
|
|
|
909
920
|
Args:
|
|
910
921
|
graphql_config: GraphQL configuration from x-airbyte-body-type extension
|
|
911
922
|
params: Parameters from execute() call
|
|
923
|
+
param_defaults: Default values for params from query_params_schema
|
|
912
924
|
|
|
913
925
|
Returns:
|
|
914
926
|
GraphQL request body: {"query": "...", "variables": {...}}
|
|
@@ -922,7 +934,9 @@ class LocalExecutor:
|
|
|
922
934
|
|
|
923
935
|
# Substitute variables from params
|
|
924
936
|
if "variables" in graphql_config and graphql_config["variables"]:
|
|
925
|
-
body["variables"] = self._interpolate_variables(
|
|
937
|
+
body["variables"] = self._interpolate_variables(
|
|
938
|
+
graphql_config["variables"], params, param_defaults
|
|
939
|
+
)
|
|
926
940
|
|
|
927
941
|
# Add operation name if specified
|
|
928
942
|
if "operationName" in graphql_config:
|
|
@@ -981,7 +995,12 @@ class LocalExecutor:
|
|
|
981
995
|
fields_str = " ".join(graphql_fields)
|
|
982
996
|
return query.replace("{{ fields }}", fields_str)
|
|
983
997
|
|
|
984
|
-
def _interpolate_variables(
|
|
998
|
+
def _interpolate_variables(
|
|
999
|
+
self,
|
|
1000
|
+
variables: dict[str, Any],
|
|
1001
|
+
params: dict[str, Any],
|
|
1002
|
+
param_defaults: dict[str, Any] | None = None,
|
|
1003
|
+
) -> dict[str, Any]:
|
|
985
1004
|
"""Recursively interpolate variables using params.
|
|
986
1005
|
|
|
987
1006
|
Preserves types (doesn't stringify everything).
|
|
@@ -990,15 +1009,18 @@ class LocalExecutor:
|
|
|
990
1009
|
- Direct replacement: "{{ owner }}" → params["owner"] (preserves type)
|
|
991
1010
|
- Nested objects: {"input": {"name": "{{ name }}"}}
|
|
992
1011
|
- Arrays: [{"id": "{{ id }}"}]
|
|
993
|
-
-
|
|
1012
|
+
- Default values: "{{ per_page }}" → param_defaults["per_page"] if not in params
|
|
1013
|
+
- Unsubstituted placeholders: "{{ states }}" → None (for optional params without defaults)
|
|
994
1014
|
|
|
995
1015
|
Args:
|
|
996
1016
|
variables: Variables dict with template placeholders
|
|
997
1017
|
params: Parameters to substitute
|
|
1018
|
+
param_defaults: Default values for params from query_params_schema
|
|
998
1019
|
|
|
999
1020
|
Returns:
|
|
1000
1021
|
Interpolated variables dict with types preserved
|
|
1001
1022
|
"""
|
|
1023
|
+
defaults = param_defaults or {}
|
|
1002
1024
|
|
|
1003
1025
|
def interpolate_value(value: Any) -> Any:
|
|
1004
1026
|
if isinstance(value, str):
|
|
@@ -1012,8 +1034,15 @@ class LocalExecutor:
|
|
|
1012
1034
|
value = value.replace(placeholder, str(param_value))
|
|
1013
1035
|
|
|
1014
1036
|
# Check if any unsubstituted placeholders remain
|
|
1015
|
-
# If so, return None (treats as "not provided" for optional params)
|
|
1016
1037
|
if re.search(r"\{\{\s*\w+\s*\}\}", value):
|
|
1038
|
+
# Extract placeholder name and check for default value
|
|
1039
|
+
match = re.search(r"\{\{\s*(\w+)\s*\}\}", value)
|
|
1040
|
+
if match:
|
|
1041
|
+
param_name = match.group(1)
|
|
1042
|
+
if param_name in defaults:
|
|
1043
|
+
# Use default value (preserves type)
|
|
1044
|
+
return defaults[param_name]
|
|
1045
|
+
# No default found - return None (for optional params)
|
|
1017
1046
|
return None
|
|
1018
1047
|
|
|
1019
1048
|
return value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: airbyte-agent-zendesk-support
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.27
|
|
4
4
|
Summary: Airbyte Zendesk-Support Connector for AI platforms
|
|
5
5
|
Project-URL: Homepage, https://github.com/airbytehq/airbyte-embedded
|
|
6
6
|
Project-URL: Documentation, https://github.com/airbytehq/airbyte-embedded/tree/main/integrations
|
|
@@ -141,6 +141,6 @@ For the service's official API docs, see the [Zendesk-Support API reference](htt
|
|
|
141
141
|
|
|
142
142
|
## Version information
|
|
143
143
|
|
|
144
|
-
- **Package version:** 0.18.
|
|
144
|
+
- **Package version:** 0.18.27
|
|
145
145
|
- **Connector version:** 0.1.4
|
|
146
|
-
- **Generated with Connector SDK commit SHA:**
|
|
146
|
+
- **Generated with Connector SDK commit SHA:** e0e2f9890347de01530666b6ed5ed7bd22452c62
|
|
@@ -20,7 +20,7 @@ airbyte_agent_zendesk_support/_vendored/connector_sdk/cloud_utils/__init__.py,sh
|
|
|
20
20
|
airbyte_agent_zendesk_support/_vendored/connector_sdk/cloud_utils/client.py,sha256=HoDgZuEgGHj78P-BGwUf6HGPVWynbdKjGOmjb-JDk58,7188
|
|
21
21
|
airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/__init__.py,sha256=EmG9YQNAjSuYCVB4D5VoLm4qpD1KfeiiOf7bpALj8p8,702
|
|
22
22
|
airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/hosted_executor.py,sha256=YQ-qfT7PZh9izNFHHe7SAcETiZOKrWjTU-okVb0_VL8,7079
|
|
23
|
-
airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/local_executor.py,sha256=
|
|
23
|
+
airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/local_executor.py,sha256=Iu7w-HCBuep2p0JHdkKkeXKnrLoQIiK2C5zAc2Ghrck,63098
|
|
24
24
|
airbyte_agent_zendesk_support/_vendored/connector_sdk/executor/models.py,sha256=lYVT_bNcw-PoIks4WHNyl2VY-lJVf2FntzINSOBIheE,5845
|
|
25
25
|
airbyte_agent_zendesk_support/_vendored/connector_sdk/http/__init__.py,sha256=y8fbzZn-3yV9OxtYz8Dy6FFGI5v6TOqADd1G3xHH3Hw,911
|
|
26
26
|
airbyte_agent_zendesk_support/_vendored/connector_sdk/http/config.py,sha256=6J7YIIwHC6sRu9i-yKa5XvArwK2KU60rlnmxzDZq3lw,3283
|
|
@@ -50,6 +50,6 @@ airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/__init__.py,sha2
|
|
|
50
50
|
airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/config.py,sha256=tLmQwAFD0kP1WyBGWBS3ysaudN9H3e-3EopKZi6cGKg,885
|
|
51
51
|
airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/events.py,sha256=NvqjlUbkm6cbGh4ffKxYxtjdwwgzfPF4MKJ2GfgWeFg,1285
|
|
52
52
|
airbyte_agent_zendesk_support/_vendored/connector_sdk/telemetry/tracker.py,sha256=KacNdbHatvPPhnNrycp5YUuD5xpkp56AFcHd-zguBgk,5247
|
|
53
|
-
airbyte_agent_zendesk_support-0.18.
|
|
54
|
-
airbyte_agent_zendesk_support-0.18.
|
|
55
|
-
airbyte_agent_zendesk_support-0.18.
|
|
53
|
+
airbyte_agent_zendesk_support-0.18.27.dist-info/METADATA,sha256=h4uvuTNOv7pKRs-PZP2nMgUQlmANH1UH0zIdpd1Phvw,6257
|
|
54
|
+
airbyte_agent_zendesk_support-0.18.27.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
55
|
+
airbyte_agent_zendesk_support-0.18.27.dist-info/RECORD,,
|
|
File without changes
|