@smartico/public-api 0.0.316 → 0.0.318
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/dist/Inbox/GetInboxMessagesRequest.d.ts +2 -0
- package/dist/Inbox/InboxReadStatus.d.ts +4 -0
- package/dist/Inbox/index.d.ts +1 -0
- package/dist/MiniGames/SAWDoSpinResponse.d.ts +1 -0
- package/dist/MiniGames/SAWExposeUserSpinId.d.ts +4 -0
- package/dist/MiniGames/SAWTemplateUI.d.ts +2 -0
- package/dist/MiniGames/index.d.ts +1 -0
- package/dist/SmarticoAPI.d.ts +3 -3
- package/dist/WSAPI/WSAPI.d.ts +6 -2
- package/dist/index.js +22 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +23 -7
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +1 -0
- package/docs/classes/WSAPI.md +4 -1
- package/docs/enums/SAWExposeUserSpinId.md +13 -0
- package/docs/interfaces/SAWDoSpinResponse.md +6 -0
- package/docs/interfaces/SAWTemplateUI.md +6 -0
- package/package.json +1 -1
- package/src/Inbox/GetInboxMessagesRequest.ts +2 -0
- package/src/Inbox/InboxReadStatus.ts +4 -0
- package/src/Inbox/index.ts +1 -0
- package/src/MiniGames/SAWDoSpinResponse.ts +1 -0
- package/src/MiniGames/SAWExposeUserSpinId.ts +4 -0
- package/src/MiniGames/SAWTemplateUI.ts +2 -0
- package/src/MiniGames/index.ts +1 -0
- package/src/SmarticoAPI.ts +5 -1
- package/src/WSAPI/WSAPI.ts +7 -2
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { InboxCategories } from './InboxCategories';
|
|
2
2
|
import { ProtocolMessage } from '../Base/ProtocolMessage';
|
|
3
|
+
import { InboxReadStatus } from './InboxReadStatus';
|
|
3
4
|
export interface GetInboxMessagesRequest extends ProtocolMessage {
|
|
4
5
|
limit?: number;
|
|
5
6
|
offset?: number;
|
|
6
7
|
starred_only?: boolean;
|
|
7
8
|
category_id?: InboxCategories;
|
|
9
|
+
read_status?: InboxReadStatus;
|
|
8
10
|
}
|
package/dist/Inbox/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SAWAskForUsername } from './SAWAskForUsername';
|
|
2
|
+
import { SAWExposeUserSpinId } from './SAWExposeUserSpinId';
|
|
2
3
|
import { SAWGameDifficultyType } from './SAWGameDifficulty';
|
|
3
4
|
import { SAWGameLayout } from './SAWGameLayout';
|
|
4
5
|
import { SAWWheelLayout } from './SAWWheelLayout';
|
|
@@ -42,6 +43,7 @@ export interface SAWTemplateUI {
|
|
|
42
43
|
disable_background_music?: boolean;
|
|
43
44
|
custom_section_id?: number;
|
|
44
45
|
only_in_custom_section?: boolean;
|
|
46
|
+
expose_user_spin_id?: SAWExposeUserSpinId;
|
|
45
47
|
custom_data: any;
|
|
46
48
|
placeholder1?: string;
|
|
47
49
|
placeholder2?: string;
|
package/dist/SmarticoAPI.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ILogger } from './ILogger';
|
|
|
4
4
|
import { SAWDoAknowledgeResponse, SAWDoSpinResponse, SAWPrizesHistory, SAWWinningHistoryResponse } from './MiniGames';
|
|
5
5
|
import { GetTranslationsResponse, PublicLabelSettings, ResponseIdentify, TranslationArea } from './Core';
|
|
6
6
|
import { GetLabelInfoResponse } from './Core/GetLabelInfoResponse';
|
|
7
|
-
import { GetInboxMessagesResponse, InboxMessageBody, MarkInboxMessageDeletedResponse, MarkInboxMessageReadResponse, MarkInboxMessageStarredResponse } from './Inbox';
|
|
7
|
+
import { GetInboxMessagesResponse, InboxMessageBody, InboxReadStatus, MarkInboxMessageDeletedResponse, MarkInboxMessageReadResponse, MarkInboxMessageStarredResponse } from './Inbox';
|
|
8
8
|
import { BuyStoreItemResponse, GetCategoriesStoreResponse, GetStoreHistoryResponse, GetStoreItemsResponse } from './Store';
|
|
9
9
|
import { AchClaimPrizeResponse, AchievementOptinResponse, GetAchCategoriesResponse, GetAchievementMapResponse } from './Missions';
|
|
10
10
|
import { GetTournamentInfoResponse, GetTournamentsResponse, TournamentRegisterResponse } from './Tournaments';
|
|
@@ -134,8 +134,8 @@ declare class SmarticoAPI {
|
|
|
134
134
|
customSectionsGet(user_ext_id: string, force_language?: string): Promise<GetCustomSectionsResponse>;
|
|
135
135
|
customSectionsGetT(user_ext_id: string): Promise<TUICustomSection[]>;
|
|
136
136
|
getTranslationsT(user_ext_id: string, lang_code: string, areas: TranslationArea[], cacheSec?: number): Promise<GetTranslationsResponse>;
|
|
137
|
-
getInboxMessages(user_ext_id: string, limit: number, offset: number, starred_only: boolean, category_id?: InboxCategories): Promise<GetInboxMessagesResponse>;
|
|
138
|
-
getInboxMessagesT(user_ext_id: string, from?: number, to?: number, favoriteOnly?: boolean, categoryId?: InboxCategories): Promise<TInboxMessage[]>;
|
|
137
|
+
getInboxMessages(user_ext_id: string, limit: number, offset: number, starred_only: boolean, category_id?: InboxCategories, read_status?: InboxReadStatus): Promise<GetInboxMessagesResponse>;
|
|
138
|
+
getInboxMessagesT(user_ext_id: string, from?: number, to?: number, favoriteOnly?: boolean, categoryId?: InboxCategories, read_status?: InboxReadStatus): Promise<TInboxMessage[]>;
|
|
139
139
|
getInboxUnreadCountT(user_ext_id: string): Promise<number>;
|
|
140
140
|
getInboxMessageBody(messageGuid: string): Promise<InboxMessageBody>;
|
|
141
141
|
getInboxMessageBodyT(messageGuid: string): Promise<TInboxMessageBody>;
|
package/dist/WSAPI/WSAPI.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { JackpotDetails, JackpotWinnerHistory, JackpotsOptinResponse, JackpotsOp
|
|
|
5
5
|
import { GetRelatedAchTourResponse } from '../Missions/GetRelatedAchTourResponse';
|
|
6
6
|
import { InboxCategories } from '../Inbox/InboxCategories';
|
|
7
7
|
import { TGetJackpotEligibleGamesResponse } from '../Jackpots/GetJackpotEligibleGamesResponse';
|
|
8
|
+
import { InboxReadStatus } from '../Inbox/InboxReadStatus';
|
|
8
9
|
/** @group General API */
|
|
9
10
|
export declare class WSAPI {
|
|
10
11
|
private api;
|
|
@@ -425,7 +426,9 @@ export declare class WSAPI {
|
|
|
425
426
|
*/
|
|
426
427
|
getLeaderBoard(periodType: LeaderBoardPeriodType, getPreviousPeriod?: boolean): Promise<LeaderBoardDetailsT>;
|
|
427
428
|
/** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
|
|
428
|
-
* The maximum number of messages per request is limited to 20.
|
|
429
|
+
* The maximum number of messages per request is limited to 20.
|
|
430
|
+
* An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
|
|
431
|
+
* An indicator "read_status" can be passed to get only messages marked as read or unread.
|
|
429
432
|
* You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
|
|
430
433
|
* This functions return list of messages without the body of the message.
|
|
431
434
|
* To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.
|
|
@@ -436,11 +439,12 @@ export declare class WSAPI {
|
|
|
436
439
|
*
|
|
437
440
|
* @param params
|
|
438
441
|
*/
|
|
439
|
-
getInboxMessages({ from, to, onlyFavorite, categoryId, onUpdate, }?: {
|
|
442
|
+
getInboxMessages({ from, to, onlyFavorite, categoryId, read_status, onUpdate, }?: {
|
|
440
443
|
from?: number;
|
|
441
444
|
to?: number;
|
|
442
445
|
onlyFavorite?: boolean;
|
|
443
446
|
categoryId?: InboxCategories;
|
|
447
|
+
read_status?: InboxReadStatus;
|
|
444
448
|
onUpdate?: (data: TInboxMessage[]) => void;
|
|
445
449
|
}): Promise<TInboxMessage[]>;
|
|
446
450
|
/**
|
package/dist/index.js
CHANGED
|
@@ -595,6 +595,12 @@ var SawGameDifficultyTypeNamed = function SawGameDifficultyTypeNamed(type) {
|
|
|
595
595
|
return (_SAWGameDifficultyTyp = {}, _SAWGameDifficultyTyp[exports.SAWGameDifficultyType.EASY] = exports.SAWGameDifficultyTypeName.EASY, _SAWGameDifficultyTyp[exports.SAWGameDifficultyType.MEDIUM] = exports.SAWGameDifficultyTypeName.MEDIUM, _SAWGameDifficultyTyp[exports.SAWGameDifficultyType.HARD] = exports.SAWGameDifficultyTypeName.HARD, _SAWGameDifficultyTyp)[type];
|
|
596
596
|
};
|
|
597
597
|
|
|
598
|
+
exports.SAWExposeUserSpinId = void 0;
|
|
599
|
+
(function (SAWExposeUserSpinId) {
|
|
600
|
+
SAWExposeUserSpinId[SAWExposeUserSpinId["UserId"] = 1] = "UserId";
|
|
601
|
+
SAWExposeUserSpinId[SAWExposeUserSpinId["SpinId"] = 2] = "SpinId";
|
|
602
|
+
})(exports.SAWExposeUserSpinId || (exports.SAWExposeUserSpinId = {}));
|
|
603
|
+
|
|
598
604
|
var NodeCache = /*#__PURE__*/function () {
|
|
599
605
|
function NodeCache() {
|
|
600
606
|
var _this = this;
|
|
@@ -888,6 +894,12 @@ exports.InboxCategories = void 0;
|
|
|
888
894
|
InboxCategories[InboxCategories["Personal"] = 2] = "Personal";
|
|
889
895
|
})(exports.InboxCategories || (exports.InboxCategories = {}));
|
|
890
896
|
|
|
897
|
+
exports.InboxReadStatus = void 0;
|
|
898
|
+
(function (InboxReadStatus) {
|
|
899
|
+
InboxReadStatus[InboxReadStatus["UnreadOnly"] = 1] = "UnreadOnly";
|
|
900
|
+
InboxReadStatus[InboxReadStatus["ReadOnly"] = 2] = "ReadOnly";
|
|
901
|
+
})(exports.InboxReadStatus || (exports.InboxReadStatus = {}));
|
|
902
|
+
|
|
891
903
|
exports.BuyStoreItemErrorCode = void 0;
|
|
892
904
|
(function (BuyStoreItemErrorCode) {
|
|
893
905
|
/** User don't have enough points on balance */
|
|
@@ -2803,7 +2815,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
2803
2815
|
}
|
|
2804
2816
|
}
|
|
2805
2817
|
/** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
|
|
2806
|
-
* The maximum number of messages per request is limited to 20.
|
|
2818
|
+
* The maximum number of messages per request is limited to 20.
|
|
2819
|
+
* An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
|
|
2820
|
+
* An indicator "read_status" can be passed to get only messages marked as read or unread.
|
|
2807
2821
|
* You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
|
|
2808
2822
|
* This functions return list of messages without the body of the message.
|
|
2809
2823
|
* To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.
|
|
@@ -2821,13 +2835,14 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
2821
2835
|
to = _ref10.to,
|
|
2822
2836
|
onlyFavorite = _ref10.onlyFavorite,
|
|
2823
2837
|
categoryId = _ref10.categoryId,
|
|
2838
|
+
read_status = _ref10.read_status,
|
|
2824
2839
|
onUpdate = _ref10.onUpdate;
|
|
2825
2840
|
try {
|
|
2826
2841
|
var _this28 = this;
|
|
2827
2842
|
if (onUpdate) {
|
|
2828
2843
|
_this28.onUpdateCallback.set(onUpdateContextKey.InboxMessages, onUpdate);
|
|
2829
2844
|
}
|
|
2830
|
-
return Promise.resolve(_this28.api.getInboxMessagesT(null, from, to, onlyFavorite, categoryId));
|
|
2845
|
+
return Promise.resolve(_this28.api.getInboxMessagesT(null, from, to, onlyFavorite, categoryId, read_status));
|
|
2831
2846
|
} catch (e) {
|
|
2832
2847
|
return Promise.reject(e);
|
|
2833
2848
|
}
|
|
@@ -4648,7 +4663,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
4648
4663
|
return Promise.reject(e);
|
|
4649
4664
|
}
|
|
4650
4665
|
};
|
|
4651
|
-
_proto.getInboxMessages = function getInboxMessages(user_ext_id, limit, offset, starred_only, category_id) {
|
|
4666
|
+
_proto.getInboxMessages = function getInboxMessages(user_ext_id, limit, offset, starred_only, category_id, read_status) {
|
|
4652
4667
|
if (limit === void 0) {
|
|
4653
4668
|
limit = 20;
|
|
4654
4669
|
}
|
|
@@ -4661,14 +4676,15 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
4661
4676
|
limit: limit,
|
|
4662
4677
|
offset: offset,
|
|
4663
4678
|
starred_only: starred_only,
|
|
4664
|
-
category_id: category_id
|
|
4679
|
+
category_id: category_id,
|
|
4680
|
+
read_status: read_status
|
|
4665
4681
|
});
|
|
4666
4682
|
return Promise.resolve(_this58.send(message, exports.ClassId.GET_INBOX_MESSAGES_RESPONSE));
|
|
4667
4683
|
} catch (e) {
|
|
4668
4684
|
return Promise.reject(e);
|
|
4669
4685
|
}
|
|
4670
4686
|
};
|
|
4671
|
-
_proto.getInboxMessagesT = function getInboxMessagesT(user_ext_id, from, to, favoriteOnly, categoryId) {
|
|
4687
|
+
_proto.getInboxMessagesT = function getInboxMessagesT(user_ext_id, from, to, favoriteOnly, categoryId, read_status) {
|
|
4672
4688
|
if (from === void 0) {
|
|
4673
4689
|
from = 0;
|
|
4674
4690
|
}
|
|
@@ -4682,7 +4698,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
4682
4698
|
var _this59 = this;
|
|
4683
4699
|
var limit = to - from > 20 ? 20 : to - from;
|
|
4684
4700
|
var offset = from;
|
|
4685
|
-
return Promise.resolve(_this59.getInboxMessages(user_ext_id, limit, offset, favoriteOnly, categoryId)).then(function (_this59$getInboxMessa) {
|
|
4701
|
+
return Promise.resolve(_this59.getInboxMessages(user_ext_id, limit, offset, favoriteOnly, categoryId, read_status)).then(function (_this59$getInboxMessa) {
|
|
4686
4702
|
return InboxMessagesTransform(_this59$getInboxMessa.log);
|
|
4687
4703
|
});
|
|
4688
4704
|
} catch (e) {
|