maxpool 1.24.82 → 1.24.83
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.
package/package.json
CHANGED
|
@@ -238,8 +238,11 @@ export async function claimResetGrant(accessToken, grantId, { signal, requestId,
|
|
|
238
238
|
signal,
|
|
239
239
|
});
|
|
240
240
|
const data = await res.json().catch(() => null);
|
|
241
|
-
// Success shapes observed: {success:true}
|
|
242
|
-
|
|
241
|
+
// Success shapes observed: {success:true}, result:"already_used" (idempotent),
|
|
242
|
+
// or result:"reset" with reset:true (measured live 2026-11-10: the claim POST
|
|
243
|
+
// returns the consumed grant — resets_left:0, cleared:[...], cooldown_until).
|
|
244
|
+
const okFlag = data?.success === true || data?.result === 'already_used'
|
|
245
|
+
|| (data?.result === 'reset' && data?.reset === true);
|
|
243
246
|
if (okFlag) return { ok: true, grantId, alreadyUsed: data?.result === 'already_used' };
|
|
244
247
|
// 403/404 on the org path: the cached org no longer belongs to this login —
|
|
245
248
|
// drop it so the next claim re-reads the profile.
|