@smartico/public-api 0.0.106 → 0.0.108
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/GetInboxMessagesResponse.d.ts +2 -0
- package/dist/Inbox/InboxMessage.d.ts +15 -12
- package/dist/Inbox/MarkInboxMessageDeletedResponse.d.ts +1 -0
- package/dist/Inbox/MarkInboxMessageReadResponse.d.ts +1 -0
- package/dist/Inbox/MarkInboxMessageStarredResponse.d.ts +1 -0
- package/dist/SmarticoAPI.d.ts +14 -3
- package/dist/Store/BuyStoreItemErrorCode.d.ts +2 -1
- package/dist/Store/StoreItem.d.ts +1 -0
- package/dist/WSAPI/WSAPI.d.ts +31 -2
- package/dist/WSAPI/WSAPITypes.d.ts +41 -1
- package/dist/index.js +325 -40
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +193 -17
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +3 -0
- package/docs/classes/WSAPI.md +118 -1
- package/docs/enums/BuyStoreItemErrorCode.md +6 -0
- package/docs/interfaces/InboxMarkMessageAction.md +17 -0
- package/docs/interfaces/TInboxMessage.md +33 -0
- package/docs/interfaces/TInboxMessageBody.md +52 -0
- package/docs/interfaces/TMissionOrBadge.md +1 -1
- package/docs/interfaces/TStoreItem.md +8 -0
- package/package.json +1 -1
- package/src/Inbox/GetInboxMessagesResponse.ts +14 -0
- package/src/Inbox/InboxMessage.ts +35 -9
- package/src/Inbox/MarkInboxMessageDeletedResponse.ts +1 -0
- package/src/Inbox/MarkInboxMessageReadResponse.ts +1 -0
- package/src/Inbox/MarkInboxMessageStarredResponse.ts +1 -0
- package/src/SmarticoAPI.ts +94 -3
- package/src/Store/BuyStoreItemErrorCode.ts +2 -1
- package/src/Store/StoreItem.ts +3 -1
- package/src/WSAPI/WSAPI.ts +82 -2
- package/src/WSAPI/WSAPITypes.ts +44 -1
package/src/WSAPI/WSAPITypes.ts
CHANGED
|
@@ -366,6 +366,8 @@ export interface TStoreItem {
|
|
|
366
366
|
can_buy: boolean;
|
|
367
367
|
/** The list of IDs of the categories where the store item is assigned, information about categories can be retrievend with getStoreCategories method */
|
|
368
368
|
category_ids: number[];
|
|
369
|
+
/** Number of items in the pool avaliable for the purchase.*/
|
|
370
|
+
pool?: number;
|
|
369
371
|
}
|
|
370
372
|
|
|
371
373
|
/**
|
|
@@ -404,7 +406,7 @@ export interface TMissionOrBadge {
|
|
|
404
406
|
progress: number;
|
|
405
407
|
/**
|
|
406
408
|
* The action that should be performed when user clicks on the mission or badge
|
|
407
|
-
* Can be URL or deep link, e.g. 'dp:deposit'. The most safe to execute CTA is to pass it to _smartico.
|
|
409
|
+
* Can be URL or deep link, e.g. 'dp:deposit'. The most safe to execute CTA is to pass it to _smartico.dp(cta_action);
|
|
408
410
|
* The 'dp' function will handle the CTA and will execute it in the most safe way
|
|
409
411
|
*/
|
|
410
412
|
cta_action: string,
|
|
@@ -489,4 +491,45 @@ export interface TBuyStoreItemResult {
|
|
|
489
491
|
|
|
490
492
|
export interface TGetTranslations {
|
|
491
493
|
translations: {[key: string]: string};
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
export interface TInboxMessage {
|
|
497
|
+
/** Uniq identifier of the message. It is needed to request the message body, mark the message as read/deleted/favorite. */
|
|
498
|
+
message_guid: string;
|
|
499
|
+
/** Date when the message was sent */
|
|
500
|
+
sent_date: string;
|
|
501
|
+
/** Indicator if a message is read */
|
|
502
|
+
read: boolean;
|
|
503
|
+
/** Indicator if a message is added to favorites */
|
|
504
|
+
favorite: boolean;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
export interface TInboxMessageBody {
|
|
508
|
+
/** Message title */
|
|
509
|
+
title: string
|
|
510
|
+
/** Short preview body of the message */
|
|
511
|
+
preview_body: string,
|
|
512
|
+
/** Message icon */
|
|
513
|
+
icon: string,
|
|
514
|
+
/** The action that should be performed when user clicks on the message.
|
|
515
|
+
* Can be URL or deep link, e.g. 'dp:deposit'. The most safe to execute CTA is to pass it to _smartico.dp(cta_action);
|
|
516
|
+
* The 'dp' function will handle the CTA and will execute it in the most safe way.
|
|
517
|
+
* If the message has a rich html body - the action will always be 'dp:inbox' which will open the inbox widget when triggered. */
|
|
518
|
+
action: string,
|
|
519
|
+
/** Rich HTML body of the message. */
|
|
520
|
+
html_body?: string,
|
|
521
|
+
/** Optional additional buttons to show in the message, available only if message has rich HTML body. Max count - 2. */
|
|
522
|
+
buttons?: {
|
|
523
|
+
/** The action that should be performed when user clicks on the button. The logic is the same as for message actions */
|
|
524
|
+
action: string,
|
|
525
|
+
/** Button text */
|
|
526
|
+
text: string
|
|
527
|
+
}[];
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export interface InboxMarkMessageAction {
|
|
531
|
+
/** An error code representing the result of marking a message as deleted, favorite or read. Successful marking action if err_code is 0 */
|
|
532
|
+
err_code: number;
|
|
533
|
+
/** Optional error message */
|
|
534
|
+
err_message: string;
|
|
492
535
|
}
|