add api/objectives/v1/updateobjective endpoint even though it does not work right now

This commit is contained in:
Devin Zuczek
2026-08-09 22:51:13 -04:00
parent 3d846ef2ad
commit c6ec993e2d
3 changed files with 90 additions and 0 deletions
+25
View File
@@ -112,6 +112,17 @@ export const ChallengeProgressResponse = z.object({
Complete: z.boolean().describe('Always false — no challenge-progress store yet'),
})
/**
* `POST /api/objectives/v1/updateobjective` — the group the objective belongs to, after
* the update. camelCase, unlike the PascalCase body the client posts and the PascalCase
* `ObjectiveGroups` entries `myprogress` serves — three spellings of the same group.
*/
export const UpdateObjectiveResponse = z.object({
group: z.int().describe('Echoed back from the request'),
isCompleted: z.boolean().describe('Always false — no objectives store yet'),
clearedAt: z.string().describe('When the group was cleared — now, since nothing persists'),
})
/**
* `POST /api/storefronts/v2/buyItem` — the purchase result. `Balance` is the CHANGE
* applied (the negated price), not the resulting total; the client reads its new total
@@ -198,6 +209,20 @@ export const ChallengeProgressRequest = z.object({
Config: z.string().optional().describe('The client-evaluated rule tree'),
})
/**
* `POST /api/objectives/v1/updateobjective` JSON body — one objective's state as the
* client now sees it. `Index`/`Group` identify it within `myprogress`; the rest is the
* progress it wants persisted.
*/
export const UpdateObjectiveRequest = z.object({
Index: z.int().describe('Which objective within the group'),
Group: z.int().describe('Which objective group'),
Progress: z.int().optional(),
VisualProgress: z.int().optional().describe('What the client animates towards'),
IsCompleted: z.boolean().optional(),
HasClaimedReward: z.boolean().optional(),
})
/** `POST /api/avatar/v3/saved/set` JSON body — an outfit with a target `Slot`. */
export const SaveOutfitRequest = z
.object({ Slot: z.int().describe('Which slot to overwrite; a non-integer is 400') })