mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-10 07:31:27 -07:00
add api/objectives/v1/updateobjective endpoint even though it does not work right now
This commit is contained in:
@@ -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') })
|
||||
|
||||
Reference in New Issue
Block a user