@smartico/public-api 0.0.108 → 0.0.110

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.
@@ -60,6 +60,8 @@ export declare enum ClassId {
60
60
  MARK_INBOX_STARRED_RESPONSE = 532,
61
61
  MARK_INBOX_DELETED_REQUEST = 535,
62
62
  MARK_INBOX_DELETED_RESPONSE = 536,
63
+ GET_ACH_CATEGORIES_REQUEST = 537,
64
+ GET_ACH_CATEGORIES_RESPONSE = 538,
63
65
  GET_BONUSES_REQUEST = 600,
64
66
  GET_BONUSES_RESPONSE = 601,
65
67
  CLAIM_BONUS_REQUEST = 602,
@@ -0,0 +1,4 @@
1
+ export interface AchCategoryPublicMeta {
2
+ name?: string;
3
+ order?: number;
4
+ }
@@ -0,0 +1,7 @@
1
+ import { TAchCategory } from "../WSAPI/WSAPITypes";
2
+ import { AchCategoryPublicMeta } from "./AchCategoryPublicMeta";
3
+ export interface AchCategory {
4
+ id?: number;
5
+ publicMeta?: AchCategoryPublicMeta;
6
+ }
7
+ export declare const AchCategoryTransform: (items: AchCategory[]) => TAchCategory[];
@@ -15,4 +15,6 @@ export interface AchievementPublicMeta {
15
15
  custom_section_id?: number;
16
16
  only_in_custom_section?: boolean;
17
17
  hint_text?: string;
18
+ hide_badge_from_ui?: boolean;
19
+ show_badge_first_task_completed?: boolean;
18
20
  }
@@ -0,0 +1,3 @@
1
+ import { ProtocolMessage } from "../Base/ProtocolMessage";
2
+ export interface GetAchCategoriesRequest extends ProtocolMessage {
3
+ }
@@ -0,0 +1,5 @@
1
+ import { ProtocolResponse } from "../Base/ProtocolResponse";
2
+ import { AchCategory } from "./AchievementCategory";
3
+ export interface GetAchCategoriesResponse extends ProtocolResponse {
4
+ categories: AchCategory[];
5
+ }
@@ -26,5 +26,6 @@ export interface UserAchievement {
26
26
  scheduledMissionType?: ScheduledMissionType;
27
27
  related_games?: AchRelatedGame[];
28
28
  active_from_ts?: number;
29
+ ach_categories?: number[];
29
30
  }
30
31
  export declare const UserAchievementTransform: (items: UserAchievement[]) => TMissionOrBadge[];
@@ -11,3 +11,7 @@ export * from "./ReloadAchievementsEvent";
11
11
  export * from "./UserAchievement";
12
12
  export * from "./UserAchievementTask";
13
13
  export * from "./ScheduledMissionType";
14
+ export * from './AchCategoryPublicMeta';
15
+ export * from './AchievementCategory';
16
+ export * from './GetAchCategoriesResponse';
17
+ export * from './GetAchCategoriesRequest';
@@ -6,12 +6,12 @@ import { GetTranslationsResponse, PublicLabelSettings, ResponseIdentify, Transla
6
6
  import { GetLabelInfoResponse } from './Core/GetLabelInfoResponse';
7
7
  import { GetInboxMessagesResponse, InboxMessageBody, MarkInboxMessageDeletedResponse, MarkInboxMessageReadResponse, MarkInboxMessageStarredResponse } from './Inbox';
8
8
  import { BuyStoreItemResponse, GetCategoriesStoreResponse, GetStoreItemsResponse } from './Store';
9
- import { AchievementOptinResponse, GetAchievementMapResponse } from './Missions';
9
+ import { AchievementOptinResponse, GetAchCategoriesResponse, GetAchievementMapResponse } from './Missions';
10
10
  import { GetTournamentInfoResponse, GetTournamentsResponse, TournamentRegisterResponse } from './Tournaments';
11
11
  import { LeaderBoardDetails, LeaderBoardPeriodType } from "./Leaderboard";
12
12
  import { GetLevelMapResponse } from "./Level";
13
13
  import { WSAPI } from "./WSAPI/WSAPI";
14
- import { TInboxMessage, TInboxMessageBody, TLevel, TMiniGameTemplate, TMissionOrBadge, TStoreCategory, TStoreItem, TTournament, TTournamentDetailed } from "./WSAPI/WSAPITypes";
14
+ import { TInboxMessage, TInboxMessageBody, TLevel, TMiniGameTemplate, TMissionOrBadge, TStoreCategory, TAchCategory, TStoreItem, TTournament, TTournamentDetailed } from "./WSAPI/WSAPITypes";
15
15
  interface Tracker {
16
16
  label_api_key: string;
17
17
  userPublicProps: any;
@@ -68,6 +68,8 @@ declare class SmarticoAPI {
68
68
  storeGetCategoriesT(user_ext_id: string): Promise<TStoreCategory[]>;
69
69
  missionsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse>;
70
70
  missionsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]>;
71
+ achGetCategories(user_ext_id: string): Promise<GetAchCategoriesResponse>;
72
+ achGetCategoriesT(user_ext_id: string): Promise<TAchCategory[]>;
71
73
  badgetsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse>;
72
74
  badgetsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]>;
73
75
  tournamentsGetLobby(user_ext_id: string): Promise<GetTournamentsResponse>;
@@ -1,5 +1,5 @@
1
1
  import { SmarticoAPI } from "../SmarticoAPI";
2
- import { InboxMarkMessageAction, TBuyStoreItemResult, TGetTranslations, TInboxMessage, TInboxMessageBody, TLevel, TMiniGamePlayResult, TMiniGameTemplate, TMissionOptInResult, TMissionOrBadge, TStoreItem, TTournament, TTournamentDetailed, TTournamentRegistrationResult, TUserProfile } from "./WSAPITypes";
2
+ import { InboxMarkMessageAction, TAchCategory, TBuyStoreItemResult, TGetTranslations, TInboxMessage, TInboxMessageBody, TLevel, TMiniGamePlayResult, TMiniGameTemplate, TMissionOptInResult, TMissionOrBadge, TStoreCategory, TStoreItem, TTournament, TTournamentDetailed, TTournamentRegistrationResult, TUserProfile } from "./WSAPITypes";
3
3
  /** @group General API */
4
4
  export declare class WSAPI {
5
5
  private api;
@@ -26,7 +26,9 @@ export declare class WSAPI {
26
26
  /** Buy the specific shop item by item_id. Returns the err_code.*/
27
27
  buyStoreItem(item_id: number): Promise<TBuyStoreItemResult>;
28
28
  /** Returns store categories */
29
- getStoreCategories(): Promise<TStoreItem[]>;
29
+ getStoreCategories(): Promise<TStoreCategory[]>;
30
+ /** Returns ach categories */
31
+ getAchCategories(): Promise<TAchCategory[]>;
30
32
  /** Returns the list of mini-games available for user
31
33
  * The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.
32
34
  * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback. */
@@ -317,11 +317,19 @@ export interface TStoreItem {
317
317
  * This indicator is taking into account the segment conditions for the store item, the price of item towards users balance,
318
318
  */
319
319
  can_buy: boolean;
320
- /** The list of IDs of the categories where the store item is assigned, information about categories can be retrievend with getStoreCategories method */
320
+ /** The list of IDs of the categories where the store item is assigned, information about categories can be retrieved with getStoreCategories method */
321
321
  category_ids: number[];
322
322
  /** Number of items in the pool avaliable for the purchase.*/
323
323
  pool?: number;
324
324
  }
325
+ /**
326
+ * TAchCategory describes the badge category item. Each badge item can be assigned to 1 or more categories
327
+ */
328
+ export interface TAchCategory {
329
+ id: number;
330
+ name: string;
331
+ order: number;
332
+ }
325
333
  /**
326
334
  * TMissionOrBadge describes the information of mission or badge defined in the system
327
335
  */
@@ -377,6 +385,8 @@ export interface TMissionOrBadge {
377
385
  tasks: TMissionOrBadgeTask[];
378
386
  /** List of casino games (or other types of entities) related to the mission or badge */
379
387
  related_games?: AchRelatedGame[];
388
+ /** The list of IDs of the categories where the badge item is assigned, information about categories can be retrieved with getAchCategories method */
389
+ category_ids: number[];
380
390
  }
381
391
  export interface AchRelatedGame {
382
392
  /** The ID of the related game */