fix(tasks): send recurrency/reminder as flat top-level params (v1.1.1)

FiZ Ai() encoder does not support nested objects — recurrencyDescriptor
and reminder fields must be top-level params (recurrency=WEEKLY, not
recurrencyDescriptor={recurrency:WEEKLY}). Same fix for reminder fields.
SPEC.md and CLAUDE.md updated to document the flat encoding.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-17 21:18:58 +02:00
parent f5eb0a46c8
commit 08ee5fb84a
5 changed files with 45 additions and 49 deletions
+15 -19
View File
@@ -1027,32 +1027,28 @@ def update_task(
if list_id is not None:
params["taskListId"] = list_id
recurrency_descriptor: dict[str, Any] = {}
# The FiZ Ai() encoder serialises all fields flat at the top level of the
# request body — nested objects are NOT supported. recurrencyDescriptor and
# reminder fields must therefore be sent as plain top-level parameters.
if clear_recurrency:
recurrency_descriptor["recurrency"] = "NONE"
params["recurrency"] = "NONE"
elif recurrency is not None:
recurrency_descriptor["recurrency"] = recurrency
params["recurrency"] = recurrency
if recurrency_interval is not None:
recurrency_descriptor["recurrencyInterval"] = recurrency_interval
params["recurrencyInterval"] = recurrency_interval
if rrule is not None:
recurrency_descriptor["rrule"] = rrule
if recurrency_descriptor:
params["recurrencyDescriptor"] = recurrency_descriptor
params["rrule"] = rrule
if clear_reminder:
params["reminder"] = {
"reminderUnit": "",
"reminderValue": 0,
"reminderType": "SNOOZE",
"localId": 0,
}
params["reminderUnit"] = ""
params["reminderValue"] = 0
params["reminderType"] = "SNOOZE"
params["localId"] = 0
elif reminder_unit is not None and reminder_value is not None:
params["reminder"] = {
"reminderUnit": reminder_unit,
"reminderValue": reminder_value,
"reminderType": "SNOOZE",
"localId": 0,
}
params["reminderUnit"] = reminder_unit
params["reminderValue"] = reminder_value
params["reminderType"] = "SNOOZE"
params["localId"] = 0
try:
_authenticated_call("taskupdate2", params)