@smartico/public-api 0.0.126 → 0.0.128

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.
@@ -1,4 +1,5 @@
1
1
  import { ProtocolMessage } from "../Base/ProtocolMessage";
2
2
  export interface GetJackpotsRequest extends ProtocolMessage {
3
3
  related_game_id?: string;
4
+ jp_template_id?: number;
4
5
  }
@@ -1,5 +1,5 @@
1
1
  import { ProtocolResponse } from "../Base/ProtocolResponse";
2
2
  import { JackpotDetails } from "./JackpotDetails";
3
3
  export interface GetJackpotsResponse extends ProtocolResponse {
4
- jackpots: JackpotDetails[];
4
+ items: JackpotDetails[];
5
5
  }
@@ -0,0 +1,5 @@
1
+ interface JackpotHtmlTemplate {
2
+ id: string;
3
+ content: string;
4
+ }
5
+ export { JackpotHtmlTemplate };
@@ -1,6 +1,9 @@
1
+ import { JackpotHtmlTemplate } from './JackpotHtmlTemplate';
1
2
  interface JackpotPublicMeta {
2
3
  name: string;
3
4
  description: string;
4
5
  image_url: string;
6
+ winner_template: JackpotHtmlTemplate;
7
+ not_winner_template: JackpotHtmlTemplate;
5
8
  }
6
9
  export { JackpotPublicMeta };
@@ -13,3 +13,4 @@ export * from './JackpotsOptinRequest';
13
13
  export * from './JackpotsOptinResponse';
14
14
  export * from './JackpotsOptoutRequest';
15
15
  export * from './JackpotsOptoutResponse';
16
+ export * from './JackpotHtmlTemplate';
@@ -4,6 +4,7 @@ declare class NodeCache {
4
4
  constructor();
5
5
  get(key: string): any;
6
6
  set(key: string, value: any, ttlSeconds?: number): void;
7
+ remove(key: string): void;
7
8
  flushAll(): void;
8
9
  }
9
10
  export { NodeCache };
package/dist/OCache.d.ts CHANGED
@@ -9,5 +9,6 @@ export declare class OCache {
9
9
  static get<T>(oKey: any, cacheContext: ECacheContext): T | undefined;
10
10
  static set(oKey: any, o: any, cacheContext: ECacheContext, ttlSeconds?: number): void;
11
11
  static use<T>(oKey: any, cacheContext: ECacheContext, f: () => Promise<T>, ttlSeconds?: number): Promise<T>;
12
- static clear(cacheContext: ECacheContext): Promise<void>;
12
+ static clear(cacheContext: ECacheContext, oKey: any): Promise<void>;
13
+ static clearContext(cacheContext: ECacheContext): Promise<void>;
13
14
  }
@@ -13,6 +13,7 @@ import { GetLevelMapResponse } from "./Level";
13
13
  import { WSAPI } from "./WSAPI/WSAPI";
14
14
  import { TInboxMessage, TInboxMessageBody, TLevel, TMiniGameTemplate, TMissionOrBadge, TStoreCategory, TAchCategory, TStoreItem, TTournament, TTournamentDetailed, LeaderBoardDetailsT, UserLevelExtraCountersT, TSegmentCheckResult } from "./WSAPI/WSAPITypes";
15
15
  import { GetAchievementsUserInfoResponse } from "./Core/GetAchievementsUserInfoResponse";
16
+ import { JackpotDetails, JackpotPot, JackpotsOptinResponse, JackpotsOptoutResponse } from "./Jackpots";
16
17
  interface Tracker {
17
18
  label_api_key: string;
18
19
  userPublicProps: any;
@@ -56,6 +57,19 @@ declare class SmarticoAPI {
56
57
  public_username_custom: string;
57
58
  }>;
58
59
  coreCheckSegments(user_ext_id: string, segment_id: number[]): Promise<TSegmentCheckResult[]>;
60
+ jackpotGet(user_ext_id: string, filter?: {
61
+ related_game_id?: string;
62
+ jp_template_id?: number;
63
+ }): Promise<JackpotDetails[]>;
64
+ potGet(user_ext_id: string, filter: {
65
+ jp_template_ids: number[];
66
+ }): Promise<JackpotPot[]>;
67
+ jackpotOptIn(user_ext_id: string, payload: {
68
+ jp_template_id: number;
69
+ }): Promise<JackpotsOptinResponse>;
70
+ jackpotOptOut(user_ext_id: string, payload: {
71
+ jp_template_id: number;
72
+ }): Promise<JackpotsOptoutResponse>;
59
73
  sawGetTemplates(user_ext_id: string, lang?: string, is_visitor_mode?: boolean): Promise<SAWGetTemplatesResponse>;
60
74
  sawGetTemplatesT(user_ext_id: string): Promise<TMiniGameTemplate[]>;
61
75
  doAcknowledgeRequest(user_ext_id: string, request_id: string): Promise<SAWDoAknowledgeResponse>;