Files
yetone 28881086c5 zcode: the daily claim is tested on #503's real marketing/touch reply
kongbai01203 posted the real GET /api/v1/marketing/touch?seq=0 reply
(10-30 22:11 +08:00, comment 6526694290) for the account that claimed
ZCODE WEEKEND BUILD. It is in packages/zcode/testdata/touch-1030-wk.json
as their bytes. Their paste was cut inside
success_popup.description.content's HTML (2510 of 2628 characters), so
only the closing `"}}}}]}}` is added and their trailing "…" taken off.

0.1.39's parser handles it as it is; no change to index.mjs, no version
bump (the package's published files are unchanged):
- checkin: the one claim_zcode_plan button is claimed once with
  {"plan_id":"zcode-v3-start-plan-1030-wk"}, named ZCODE WEEKEND BUILD;
  the close button ("args": null) and the success popup's navigate and
  copy_text buttons claim nothing, and nothing goes to touch/action.
- the same delivery with its claim button taken out is inactive, though
  its background and success popup still carry the zcode_plan.
- after the claim, deliveries is empty (their second finding, count
  theirs, bytes the real reply's top level): inactive, not failed.
- the card's claim line from the real feed: "1 · ZCODE WEEKEND BUILD".

What the real reply has that the 0.1.39 hand-made fixture didn't:
button text as {format, content}, a close button's args null, a bundle
background, resource_position and priority, and a success_popup inside
the banner repeating the zcode_plan.

Run on mote: HOME=$(mktemp -d) bun test (3880 pass, 0 fail) and bun
scripts/check.mjs (exit 0). Broken by hand: claiming a zcode_plan's
plan_id with no claim button turns "the real delivery without its claim
button" red (the hand-made closeOnly case stayed green); naming a plan
from a later zcode_plan when the first is the same turned the two
real-feed tests red. Not tried: a complete, uncut touch reply (the
reporter will post one at the next window), and a real claim through
the plugin.
2026-10-31 00:05:27 +08:00

1 line
2.5 KiB
JSON

{"code":0,"msg":"","data":{"server_time":1793369478,"language":"zh-CN","deliveries":[{"campaign_id":"2101141259813175296","resource_position":"banner","priority":50,"banner":{"buttons":[{"text":{"format":"","content":""},"action":{"type":"close","args":null}},{"text":{"format":"","content":""},"action":{"type":"claim_zcode_plan","args":{"plan_id":"zcode-v3-start-plan-1030-wk"}}}],"background":{"type":"bundle","bundle":{"bundle":{"src":"https://cdn-zcode.z.ai/marketing/touch/assets/2104840819634155520/weekend-banner-3.1.2.zip","sha256":"570aac77453f535288183e70a9c0478ad0cafec8db1c75433b5e741271fb5f35"},"entry":"index.html"},"args":{"zcode_plan":{"plan_id":"zcode-v3-start-plan-1030-wk","name":"ZCODE WEEKEND BUILD","priority":101,"starts_at":1793358000,"ends_at":1793581200,"entitlements":[{"entitlement_id":"ent-zcode-v3-start-plan-1030-wk-1","show_name":"GLM-5.3-Flash","meter":"model_usage","unit_type":"token","capabilities":["model:glm-5.3-flash"],"grant_units":500000000,"period":"one_time","effective_at":1793372400,"priority":101}]}}},"success_popup":{"buttons":[{"text":{"format":"plaintext","content":"模型设置"},"action":{"type":"navigate","args":{"page":"settings","section":"models"}}},{"text":{"format":"plaintext","content":"复制分享"},"theme":{"variant":"secondary"},"action":{"type":"copy_text","args":{"text":"我在 ZCode 领取了 GLM-5.3-Flash 500000000 Tokens。邀请你也来下载安装即可领取。\nhttps://zcode.z.ai"}}}],"hero":{"type":"bundle","bundle":{"bundle":{"src":"https://cdn-zcode.z.ai/marketing/touch/assets/2101141874404540416/weekend-plan-hero-v5.zip","sha256":"d5f34e2cf6d7289294f1138bd0dfe6eb791518588885ecb6dfa0d34e9dd6c8e1"},"entry":"index.html"},"args":{"zcode_plan":{"plan_id":"zcode-v3-start-plan-1030-wk","name":"ZCODE WEEKEND BUILD","priority":101,"starts_at":1793358000,"ends_at":1793581200,"entitlements":[{"entitlement_id":"ent-zcode-v3-start-plan-1030-wk-1","show_name":"GLM-5.3-Flash","meter":"model_usage","unit_type":"token","capabilities":["model:glm-5.3-flash"],"grant_units":500000000,"period":"one_time","effective_at":1793372400,"priority":101}]}}},"title":{"format":"plaintext","content":"ZCODE WEEKEND BUILD 领取成功"},"description":{"format":"html","content":" \n \n \u003cp class=\"text-center text-ui-base/relaxed text-foreground-subtle\"\u003e\u003cb class=\"font-semibold text-foreground\"\u003eGLM-5.3-Flash\u003c/b\u003e 将于 \u003cspan class=\"whitespace-nowrap font-semibold text-foreground underline decoration-foreground-subtle decoration-dashed underline-offset-4\"\u003e"}}}}]}}