@smartico/public-api 0.0.412 → 0.0.413

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.
@@ -210,6 +210,14 @@ Prize Drop only: when true, the pushed prize requires an explicit claim by the u
210
210
 
211
211
  ***
212
212
 
213
+ ### requires\_manual\_claim?
214
+
215
+ > `optional` **requires\_manual\_claim?**: `boolean`
216
+
217
+ Prize Drop only: when true, the pushed prize requires a manual claim by the user before it is credited. The difference between this and `requires_prize_claim` is that requires_manual_claim gives the user the ability to cancel the claim.
218
+
219
+ ***
220
+
213
221
  ### relative\_period\_timezone?
214
222
 
215
223
  > `optional` **relative\_period\_timezone?**: `number`
@@ -4,7 +4,7 @@
4
4
  - Paginated list of past winners of a specific jackpot template.
5
5
  - Powers the "Recent Winners" / "Win History" tab inside the jackpot
6
6
  detail modal.
7
- - 30 s cache per template.
7
+ - 30 s cache per page (template + `limit`/`offset`).
8
8
  - Gated by the operator's `expose_winners_over_api` flag — but only on
9
9
  the client side. Custom UIs must check this flag before calling.
10
10
 
@@ -59,7 +59,8 @@ client-side using the exchange rate available on the platform.
59
59
 
60
60
  ## Refresh
61
61
 
62
- - 30 s SDK cache per `jp_template_id`.
62
+ - 30 s SDK cache per page — keyed by `jp_template_id` + `limit` +
63
+ `offset`, so each page is cached independently.
63
64
  - Cache clears on jackpot-win push events — when the pot explodes, the
64
65
  new winner row appears on the next call.
65
66
  - Cache also clears on opt-in / opt-out.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.412",
3
+ "version": "0.0.413",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -332,7 +332,9 @@ export class WSAPIJackpots extends WSAPIClans {
332
332
  * user-currency display is needed, the consumer must convert client-side.
333
333
  *
334
334
  * **Refresh**
335
- * - The SDK caches per `jp_template_id` for 30 seconds.
335
+ * - The SDK caches each page separately (per `jp_template_id` +
336
+ * `limit` + `offset`) for 30 seconds, so paging back and forth is
337
+ * served from cache and each page keeps its own fresh copy.
336
338
  * - Caches clear on jackpot-win push events and on opt-in / opt-out.
337
339
  *
338
340
  * **Error handling**
@@ -375,8 +377,11 @@ export class WSAPIJackpots extends WSAPIClans {
375
377
  /** Jackpot template ID (required). */
376
378
  jp_template_id?: number;
377
379
  }): Promise<JackpotWinnerHistory[]> {
380
+ // Cache per (jp_template_id, limit, offset) so paging or switching
381
+ // jackpot within the TTL doesn't return a colliding winners list.
382
+ const cacheKey = `${onUpdateContextKey.JackpotWinners}${jp_template_id}:${limit}:${offset}`;
378
383
  return OCache.use(
379
- onUpdateContextKey.JackpotWinners + jp_template_id,
384
+ cacheKey,
380
385
  ECacheContext.WSAPI,
381
386
  () => this.api.getJackpotWinnersT(this.userExtId, limit, offset, jp_template_id),
382
387
  JACKPOT_WINNERS_CACHE_SEC,