flock-core 0.4.534__py3-none-any.whl → 0.4.535__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 flock-core might be problematic. Click here for more details.
- flock/tools/zendesk_tools.py +31 -1
- {flock_core-0.4.534.dist-info → flock_core-0.4.535.dist-info}/METADATA +1 -1
- {flock_core-0.4.534.dist-info → flock_core-0.4.535.dist-info}/RECORD +6 -6
- {flock_core-0.4.534.dist-info → flock_core-0.4.535.dist-info}/WHEEL +0 -0
- {flock_core-0.4.534.dist-info → flock_core-0.4.535.dist-info}/entry_points.txt +0 -0
- {flock_core-0.4.534.dist-info → flock_core-0.4.535.dist-info}/licenses/LICENSE +0 -0
flock/tools/zendesk_tools.py
CHANGED
|
@@ -146,7 +146,7 @@ def zendesk_search_articles(query: str) -> list[dict]:
|
|
|
146
146
|
response.raise_for_status()
|
|
147
147
|
return response.json().get("results", [])
|
|
148
148
|
|
|
149
|
-
def zendesk_add_comment_to_ticket(ticket_id: str, comment_body: str, public: bool =
|
|
149
|
+
def zendesk_add_comment_to_ticket(ticket_id: str, comment_body: str, public: bool = False) -> dict:
|
|
150
150
|
"""Add a comment to a Zendesk ticket.
|
|
151
151
|
|
|
152
152
|
Updates the ticket with a new comment via Zendesk Ticketing API:
|
|
@@ -171,6 +171,36 @@ def zendesk_add_comment_to_ticket(ticket_id: str, comment_body: str, public: boo
|
|
|
171
171
|
response.raise_for_status()
|
|
172
172
|
return response.json()["ticket"]
|
|
173
173
|
|
|
174
|
+
def zendesk_set_ticket_custom_field(
|
|
175
|
+
ticket_id: str, custom_field_id: int, category_value: str
|
|
176
|
+
) -> dict:
|
|
177
|
+
"""Set the custom field value of a Zendesk ticket.
|
|
178
|
+
|
|
179
|
+
Uses Zendesk's Update Ticket API to set a custom field value:
|
|
180
|
+
PUT /api/v2/tickets/{ticket_id}.json
|
|
181
|
+
"""
|
|
182
|
+
ZENDESK_SUBDOMAIN = os.getenv("ZENDESK_SUBDOMAIN_TICKET")
|
|
183
|
+
BASE_URL = f"https://{ZENDESK_SUBDOMAIN}.zendesk.com"
|
|
184
|
+
url = f"{BASE_URL}/api/v2/tickets/{ticket_id}.json"
|
|
185
|
+
|
|
186
|
+
payload = {
|
|
187
|
+
"ticket": {
|
|
188
|
+
"custom_fields": [
|
|
189
|
+
{
|
|
190
|
+
"id": custom_field_id,
|
|
191
|
+
"value": category_value,
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
import httpx
|
|
198
|
+
|
|
199
|
+
with httpx.Client(headers=_get_headers(), timeout=30.0) as client:
|
|
200
|
+
response = client.put(url, json=payload)
|
|
201
|
+
response.raise_for_status()
|
|
202
|
+
return response.json()["ticket"]
|
|
203
|
+
|
|
174
204
|
|
|
175
205
|
if __name__ == "__main__":
|
|
176
206
|
transport = os.getenv("ZENDESK_MCP_TRANSPORT", "stdio")
|
|
@@ -488,7 +488,7 @@ flock/tools/markdown_tools.py,sha256=94fjGAJ5DEutoioD0ke-YRbxF6IWJQKuPVBLkNqdBo4
|
|
|
488
488
|
flock/tools/system_tools.py,sha256=IUB8MiSxtQH5ZfTGOck3vl4TKva8m1lfU4-W5D5b-4w,202
|
|
489
489
|
flock/tools/text_tools.py,sha256=mMQ8tkyYDxIorqqzl9ccGyWYjrSynYiYFIeP9qypfdg,22491
|
|
490
490
|
flock/tools/web_tools.py,sha256=h44L5rknxGw1mVnFTYO-z0xwUr5ctOvMiJBIfeq56UE,2555
|
|
491
|
-
flock/tools/zendesk_tools.py,sha256
|
|
491
|
+
flock/tools/zendesk_tools.py,sha256=-PjzrqZ1OIFAfyMLv8wXgTJGy5eGr1026sV5ouThU7g,7053
|
|
492
492
|
flock/webapp/__init__.py,sha256=YtRbbyciN3Z2oMB9fdXZuvM3e49R8m2mY5qHLDoapRA,37
|
|
493
493
|
flock/webapp/run.py,sha256=btKVwIqrFg3FhLRuj2RN_fazwaFat3Ue5yiFiIg60rQ,9054
|
|
494
494
|
flock/webapp/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -563,8 +563,8 @@ flock/workflow/agent_execution_activity.py,sha256=hLqWEWsxwTgjsE9wvBejf3pN2TdIfU
|
|
|
563
563
|
flock/workflow/flock_workflow.py,sha256=iSUF_soFvWar0ffpkzE4irkDZRx0p4HnwmEBi_Ne2sY,9666
|
|
564
564
|
flock/workflow/temporal_config.py,sha256=3_8O7SDEjMsSMXsWJBfnb6XTp0TFaz39uyzSlMTSF_I,3988
|
|
565
565
|
flock/workflow/temporal_setup.py,sha256=YIHnSBntzOchHfMSh8hoLeNXrz3B1UbR14YrR6soM7A,1606
|
|
566
|
-
flock_core-0.4.
|
|
567
|
-
flock_core-0.4.
|
|
568
|
-
flock_core-0.4.
|
|
569
|
-
flock_core-0.4.
|
|
570
|
-
flock_core-0.4.
|
|
566
|
+
flock_core-0.4.535.dist-info/METADATA,sha256=oWvac-NinrJLEPLZCOSOUN6edQRt_PseLxyup1uPZ2U,22800
|
|
567
|
+
flock_core-0.4.535.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
568
|
+
flock_core-0.4.535.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
|
|
569
|
+
flock_core-0.4.535.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
|
|
570
|
+
flock_core-0.4.535.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|