@smartico/public-api 0.0.419 → 0.0.421

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.
Files changed (133) hide show
  1. package/dist/ActivityLog/ActivityLogActivities.d.ts +1 -1
  2. package/dist/ActivityLog/ActivityLogEntry.d.ts +35 -17
  3. package/dist/ActivityLog/ActivityLogMeta.d.ts +31 -0
  4. package/dist/ActivityLog/GetActivityLogRequest.d.ts +3 -1
  5. package/dist/ActivityLog/GetActivityLogResponse.d.ts +1 -2
  6. package/dist/ActivityLog/PointChangeSourceType.d.ts +1 -0
  7. package/dist/Jackpots/JackPotWinPushWinner.d.ts +34 -0
  8. package/dist/Jackpots/JackPotWinner.d.ts +3 -1
  9. package/dist/Jackpots/JackpotContributionRule.d.ts +23 -0
  10. package/dist/Jackpots/JackpotDetails.d.ts +8 -0
  11. package/dist/Jackpots/JackpotPot.d.ts +4 -2
  12. package/dist/Jackpots/JackpotPublicMeta.d.ts +6 -2
  13. package/dist/Jackpots/JackpotWinPush.d.ts +14 -2
  14. package/dist/Jackpots/index.d.ts +2 -0
  15. package/dist/SmarticoAPI.d.ts +3 -5
  16. package/dist/WSAPI/WSAPIBase.d.ts +0 -1
  17. package/dist/WSAPI/WSAPIJackpots.d.ts +2 -0
  18. package/dist/WSAPI/WSAPITypes.d.ts +17 -17
  19. package/dist/WSAPI/WSAPIUser.d.ts +24 -35
  20. package/dist/index.js +61 -131
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.modern.mjs +58 -102
  23. package/dist/index.modern.mjs.map +1 -1
  24. package/docs/Callbacks.md +1 -1
  25. package/docs/api/README.md +4 -4
  26. package/docs/api/classes/WSAPIJackpots.md +2 -0
  27. package/docs/api/classes/WSAPIUser.md +30 -59
  28. package/docs/api/documents/Callbacks.md +1 -1
  29. package/docs/api/enumerations/ActivityLogActivities.md +1 -1
  30. package/docs/api/enumerations/PointChangeSourceType.md +6 -0
  31. package/docs/api/interfaces/ActivityLogEntry.md +124 -0
  32. package/docs/api/interfaces/ActivityLogMeta.md +100 -0
  33. package/docs/api/interfaces/JackPotWinPushWinner.md +103 -0
  34. package/docs/api/interfaces/JackPotWinner.md +9 -1
  35. package/docs/api/interfaces/JackpotContributionRule.md +49 -0
  36. package/docs/api/interfaces/JackpotDetails.md +24 -0
  37. package/docs/api/interfaces/JackpotPot.md +9 -1
  38. package/docs/api/interfaces/JackpotPublicMeta.md +12 -2
  39. package/docs/api/interfaces/JackpotWinPush.md +14 -1
  40. package/docs/api/interfaces/TActivityLog.md +70 -2
  41. package/docs/api/type-aliases/TActivityLogEntry.md +7 -0
  42. package/docs/capabilities/_responses/gamePickGetActiveRound.json +37 -37
  43. package/docs/capabilities/_responses/gamePickGetActiveRounds.json +37 -131
  44. package/docs/capabilities/_responses/gamePickGetBoard.json +25 -14
  45. package/docs/capabilities/_responses/gamePickGetGameInfo.json +93 -79
  46. package/docs/capabilities/_responses/gamePickGetHistory.json +37 -131
  47. package/docs/capabilities/_responses/gamePickGetUserInfo.json +5 -5
  48. package/docs/capabilities/_responses/getActivityLog.json +106 -1
  49. package/docs/capabilities/_responses/getAvatarsCustomized.json +4 -4
  50. package/docs/capabilities/_responses/getAvatarsList.json +2 -2
  51. package/docs/capabilities/_responses/getBadges.json +27 -29
  52. package/docs/capabilities/_responses/getBonuses.json +1 -18
  53. package/docs/capabilities/_responses/getClanInfo.json +13 -13
  54. package/docs/capabilities/_responses/getClans.json +6 -6
  55. package/docs/capabilities/_responses/getCurrentLevel.json +12 -12
  56. package/docs/capabilities/_responses/getInboxMessageBody.json +2 -2
  57. package/docs/capabilities/_responses/getInboxMessages.json +6 -6
  58. package/docs/capabilities/_responses/getInboxUnreadCount.json +1 -1
  59. package/docs/capabilities/_responses/getJackpotWinners.json +14 -14
  60. package/docs/capabilities/_responses/getLeaderBoard.json +8 -8
  61. package/docs/capabilities/_responses/getMiniGames.json +92 -90
  62. package/docs/capabilities/_responses/getMiniGamesHistory.json +874 -1
  63. package/docs/capabilities/_responses/getMissions.json +2 -2
  64. package/docs/capabilities/_responses/getRaffleDrawRun.json +7 -7
  65. package/docs/capabilities/_responses/getRaffleDrawRunsHistory.json +6 -6
  66. package/docs/capabilities/_responses/getRaffles.json +14 -14
  67. package/docs/capabilities/_responses/getStorePurchasedItems.json +5 -5
  68. package/docs/capabilities/_responses/getTournamentInstanceInfo.json +100 -53
  69. package/docs/capabilities/_responses/getTournamentsList.json +12 -12
  70. package/docs/capabilities/_responses/getTranslations.json +1 -1
  71. package/docs/capabilities/_responses/getUserProfile.json +10 -10
  72. package/docs/capabilities/_responses/jackpotGet.json +33 -34
  73. package/docs/capabilities/gamePickGetActiveRound.md +22 -23
  74. package/docs/capabilities/gamePickGetActiveRounds.md +22 -23
  75. package/docs/capabilities/gamePickGetBoard.md +14 -14
  76. package/docs/capabilities/gamePickGetGameInfo.md +24 -44
  77. package/docs/capabilities/gamePickGetHistory.md +22 -23
  78. package/docs/capabilities/gamePickGetUserInfo.md +5 -5
  79. package/docs/capabilities/getActivityLog.md +69 -9
  80. package/docs/capabilities/getAvatarsCustomized.md +3 -3
  81. package/docs/capabilities/getBadges.md +13 -14
  82. package/docs/capabilities/getBonuses.md +2 -17
  83. package/docs/capabilities/getClanInfo.md +8 -8
  84. package/docs/capabilities/getClans.md +4 -4
  85. package/docs/capabilities/getCurrentLevel.md +12 -12
  86. package/docs/capabilities/getInboxMessageBody.md +2 -2
  87. package/docs/capabilities/getInboxMessages.md +3 -3
  88. package/docs/capabilities/getInboxUnreadCount.md +6 -0
  89. package/docs/capabilities/getJackpotWinners.md +9 -8
  90. package/docs/capabilities/getLeaderBoard.md +5 -5
  91. package/docs/capabilities/getMiniGames.md +35 -37
  92. package/docs/capabilities/getMiniGamesHistory.md +83 -2
  93. package/docs/capabilities/getMissions.md +1 -1
  94. package/docs/capabilities/getRaffleDrawRun.md +7 -7
  95. package/docs/capabilities/getRaffleDrawRunsHistory.md +3 -3
  96. package/docs/capabilities/getRaffles.md +8 -8
  97. package/docs/capabilities/getStorePurchasedItems.md +2 -2
  98. package/docs/capabilities/getTournamentInstanceInfo.md +45 -37
  99. package/docs/capabilities/getTournamentsList.md +6 -6
  100. package/docs/capabilities/getTranslations.md +1 -1
  101. package/docs/capabilities/getUserProfile.md +10 -10
  102. package/docs/capabilities/jackpotGet.md +56 -28
  103. package/docs/capabilities/jackpotOptIn.md +2 -0
  104. package/docs/capabilities/smarticoCallbacks.md +1 -1
  105. package/docs/native/PROTOCOL.md +141 -18
  106. package/docs/ui/jackpots/UIGuide_jackpotGet.md +1 -1
  107. package/docs/ui/user/UIGuide_getActivityLog.md +4 -2
  108. package/package.json +4 -3
  109. package/scripts/capture-responses-browser.mjs +8 -1
  110. package/src/ActivityLog/ActivityLogActivities.ts +1 -1
  111. package/src/ActivityLog/ActivityLogEntry.ts +33 -21
  112. package/src/ActivityLog/ActivityLogMeta.ts +31 -0
  113. package/src/ActivityLog/GetActivityLogRequest.ts +3 -3
  114. package/src/ActivityLog/GetActivityLogResponse.ts +23 -49
  115. package/src/ActivityLog/PointChangeSourceType.ts +1 -0
  116. package/src/Jackpots/JackPotWinPushWinner.ts +35 -0
  117. package/src/Jackpots/JackPotWinner.ts +3 -1
  118. package/src/Jackpots/JackpotContributionRule.ts +25 -0
  119. package/src/Jackpots/JackpotDetails.ts +8 -0
  120. package/src/Jackpots/JackpotPot.ts +4 -2
  121. package/src/Jackpots/JackpotPublicMeta.ts +6 -2
  122. package/src/Jackpots/JackpotWinPush.ts +14 -2
  123. package/src/Jackpots/index.ts +2 -0
  124. package/src/SmarticoAPI.ts +6 -40
  125. package/src/WSAPI/WSAPIBase.ts +0 -1
  126. package/src/WSAPI/WSAPIJackpots.ts +2 -0
  127. package/src/WSAPI/WSAPITypes.ts +18 -18
  128. package/src/WSAPI/WSAPIUser.ts +38 -55
  129. package/docs/api/interfaces/GemsDiamondsLog.md +0 -45
  130. package/docs/api/interfaces/PointsLog.md +0 -45
  131. package/docs/api/interfaces/TActivityLogEntry.md +0 -100
  132. package/docs/api/type-aliases/ActivityLogEntry.md +0 -3
  133. package/docs/capabilities/getActivityLogV2.md +0 -62
@@ -2,7 +2,6 @@ import { CoreUtils } from '../Core';
2
2
  import { ECacheContext, OCache } from '../OCache';
3
3
  import {
4
4
  TActivityLog,
5
- TActivityLogEntry,
6
5
  TLevel,
7
6
  TLevelCurrent,
8
7
  TSegmentCheckResult,
@@ -514,15 +513,16 @@ export class WSAPIUser extends WSAPIBase {
514
513
  }
515
514
 
516
515
  /**
517
- * Returns the user's unified balance-change history — every points, gems, and
518
- * diamonds transaction within the requested time window, ordered newest-first.
519
- * Use to power an "Activity" / "History" tab showing wins, claims, purchases,
520
- * level-up rewards, and operator adjustments.
516
+ * Returns the user's activity history within the requested time window,
517
+ * ordered newest-first. Today that is primarily wallet changes (points /
518
+ * gems / diamonds); when the server starts returning richer activity rows
519
+ * (missions, badges, levels, …), the same method surfaces them via optional
520
+ * fields on {@link TActivityLog} — no separate call, same wire CID.
521
521
  *
522
- * The returned shape is the same regardless of currency type — `type` (see
523
- * {@link UserBalanceType}) distinguishes points / gems / diamonds and
524
- * `source_type_id` (see {@link PointChangeSourceType}) names the originating
525
- * event.
522
+ * Existing wallet fields (`type`, `amount`, `balance`, `source_type_id`, …)
523
+ * stay stable. Clients that only read those keep working; clients that want
524
+ * the fuller feed can also read `activity_type_id`, `meta`,
525
+ * `source_entity_*`, and `is_wallet_entry` when present.
526
526
  *
527
527
  * @remarks
528
528
  * **Preconditions**
@@ -535,13 +535,18 @@ export class WSAPIUser extends WSAPIBase {
535
535
  * `from` by 50 between calls. Both `startTimeSeconds` and `endTimeSeconds`
536
536
  * are epoch seconds bounding the window the server scans.
537
537
  *
538
+ * **Filtering** — optional server-side filters:
539
+ * - `types` — {@link ActivityLogActivities} / `type_id` values (e.g. Points=3, Gems=1)
540
+ * - `src_types` — {@link PointChangeSourceType} / `source_type_id` values
541
+ * Omit both for an unfiltered window.
542
+ *
538
543
  * **Subscription model (`onUpdate`)**
539
544
  * The callback fires when the user's `ach_points_balance`,
540
545
  * `ach_gems_balance`, or `ach_diamonds_balance` changes (i.e. whenever a
541
546
  * wallet event lands). The pushed payload is a FIXED re-fetch of the
542
547
  * **last 10 minutes / first 50 entries** — it does NOT honor the original
543
- * call's `startTimeSeconds` / `endTimeSeconds` / `from` / `to`. Consumers
544
- * maintaining a long historical view must re-call `getActivityLog` with
548
+ * call's `startTimeSeconds` / `endTimeSeconds` / `from` / `to` / filters.
549
+ * Consumers maintaining a long historical view must re-call `getActivityLog` with
545
550
  * their own params after receiving an `onUpdate` notification.
546
551
  *
547
552
  * **Refresh**
@@ -565,6 +570,8 @@ export class WSAPIUser extends WSAPIBase {
565
570
  * endTimeSeconds: now,
566
571
  * from: 0,
567
572
  * to: 50,
573
+ * types: [1], // Gems only (ActivityLogActivities.Gems)
574
+ * src_types: [11], // Tournament wins only (PointChangeSourceType.Tournament)
568
575
  * onUpdate: (refreshed) => {
569
576
  * console.log('[smartico] wallet changed — refreshed payload is last 10 min / 50 entries:', refreshed.length, 'rows');
570
577
  * // If the consumer is showing a full 30-day view, re-call getActivityLog with the original params here.
@@ -582,6 +589,8 @@ export class WSAPIUser extends WSAPIBase {
582
589
  endTimeSeconds,
583
590
  from,
584
591
  to,
592
+ types,
593
+ src_types,
585
594
  onUpdate,
586
595
  }: {
587
596
  /** Window start in epoch seconds. */
@@ -592,30 +601,41 @@ export class WSAPIUser extends WSAPIBase {
592
601
  from: number;
593
602
  /** Pagination ceiling (exclusive); server caps `to - from` at 50. */
594
603
  to: number;
604
+ /** Optional — filter by {@link ActivityLogActivities} / `type_id`. */
605
+ types?: number[];
606
+ /** Optional — filter by {@link PointChangeSourceType} / `source_type_id`. */
607
+ src_types?: number[];
595
608
  /** Optional push callback; payload is a fixed 10-min / 50-entry refresh on every wallet change (see Subscription model). */
596
609
  onUpdate?: (data: TActivityLog[]) => void;
597
610
  }): Promise<TActivityLog[]> {
598
611
 
599
- const cacheKey = `${onUpdateContextKey.ActivityLog}:${startTimeSeconds}:${endTimeSeconds}:${from}:${to}`;
612
+ const cacheKey = `${onUpdateContextKey.ActivityLog}:${startTimeSeconds}:${endTimeSeconds}:${from}:${to}:${types?.join(',') ?? ''}:${src_types?.join(',') ?? ''}`;
600
613
 
601
614
  if (typeof onUpdate === 'function') {
602
615
  this.onUpdateCallback.set(onUpdateContextKey.ActivityLog, onUpdate);
603
616
  // Remember the requested window so a push refresh re-fetches THIS window
604
617
  // and writes the matching composite cache key (see notifyActivityLogUpdate).
605
- this.activityLogOnUpdateParams = { startTimeSeconds, endTimeSeconds, from, to };
618
+ this.activityLogOnUpdateParams = { startTimeSeconds, endTimeSeconds, from, to, types, src_types };
606
619
  }
607
620
 
608
621
  return await OCache.use(
609
622
  cacheKey,
610
623
  ECacheContext.WSAPI,
611
- () => this.api.getActivityLogT(this.userExtId, startTimeSeconds, endTimeSeconds, from, to),
624
+ () => this.api.getActivityLogT(this.userExtId, startTimeSeconds, endTimeSeconds, from, to, types, src_types),
612
625
  CACHE_DATA_SEC,
613
626
  );
614
627
  }
615
628
 
616
629
  /** @hidden Last window passed to `getActivityLog` with an `onUpdate`, so a push
617
630
  * refresh re-fetches the same window and updates its matching composite cache key. */
618
- private activityLogOnUpdateParams: { startTimeSeconds: number; endTimeSeconds: number; from: number; to: number } | undefined;
631
+ private activityLogOnUpdateParams: {
632
+ startTimeSeconds: number;
633
+ endTimeSeconds: number;
634
+ from: number;
635
+ to: number;
636
+ types?: number[];
637
+ src_types?: number[];
638
+ } | undefined;
619
639
 
620
640
  protected async notifyActivityLogUpdate() {
621
641
  const params = this.activityLogOnUpdateParams;
@@ -630,8 +650,10 @@ export class WSAPIUser extends WSAPIBase {
630
650
  params.endTimeSeconds,
631
651
  params.from,
632
652
  params.to,
653
+ params.types,
654
+ params.src_types,
633
655
  );
634
- const cacheKey = `${onUpdateContextKey.ActivityLog}:${params.startTimeSeconds}:${params.endTimeSeconds}:${params.from}:${params.to}`;
656
+ const cacheKey = `${onUpdateContextKey.ActivityLog}:${params.startTimeSeconds}:${params.endTimeSeconds}:${params.from}:${params.to}:${params.types?.join(',') ?? ''}:${params.src_types?.join(',') ?? ''}`;
635
657
 
636
658
  OCache.set(cacheKey, payload, ECacheContext.WSAPI);
637
659
 
@@ -640,43 +662,4 @@ export class WSAPIUser extends WSAPIBase {
640
662
  onUpdate(payload);
641
663
  }
642
664
  }
643
-
644
- /**
645
- * Returns the full activity log (v2) — wallet changes **and** non-wallet
646
- * activities (missions, badges, levels, tournaments, avatars, …).
647
- *
648
- * **Backwards compatibility**: existing integrations should keep using
649
- * {@link getActivityLog}, which returns wallet-only {@link TActivityLog}
650
- * rows with the original field contract unchanged.
651
- *
652
- * **Pagination** — same `from` / `to` offset model as {@link getActivityLog}
653
- * (server caps a single response at 50 entries).
654
- *
655
- * **Filtering** — pass `types` with {@link ActivityLogActivities} values to
656
- * request a server-side subset (e.g. missions only). Omit for all activity types.
657
- *
658
- * @returns Array of {@link TActivityLogEntry} ordered newest-first.
659
- */
660
- public async getActivityLogV2({
661
- startTimeSeconds,
662
- endTimeSeconds,
663
- from,
664
- to,
665
- types,
666
- }: {
667
- startTimeSeconds: number;
668
- endTimeSeconds: number;
669
- from: number;
670
- to: number;
671
- types?: number[];
672
- }): Promise<TActivityLogEntry[]> {
673
- const cacheKey = `${onUpdateContextKey.ActivityLogV2}:${startTimeSeconds}:${endTimeSeconds}:${from}:${to}:${types?.join(',') ?? ''}`;
674
-
675
- return await OCache.use(
676
- cacheKey,
677
- ECacheContext.WSAPI,
678
- () => this.api.getActivityLogV2T(this.userExtId, startTimeSeconds, endTimeSeconds, from, to, types),
679
- CACHE_DATA_SEC,
680
- );
681
- }
682
665
  }
@@ -1,45 +0,0 @@
1
- # Interface: GemsDiamondsLog
2
-
3
- ## Properties
4
-
5
- ### create\_date
6
-
7
- > **create\_date**: `number`
8
-
9
- Epoch timestamp in SECONDS (not ms — unlike most SDK timestamps).
10
-
11
- ***
12
-
13
- ### user\_ext\_id
14
-
15
- > **user\_ext\_id**: `string`
16
-
17
- ***
18
-
19
- ### crm\_brand\_id
20
-
21
- > **crm\_brand\_id**: `number`
22
-
23
- ***
24
-
25
- ### type
26
-
27
- > **type**: [`UserBalanceType`](../enumerations/UserBalanceType.md)
28
-
29
- ***
30
-
31
- ### amount
32
-
33
- > **amount**: `number`
34
-
35
- ***
36
-
37
- ### balance
38
-
39
- > **balance**: `number`
40
-
41
- ***
42
-
43
- ### source\_type\_id
44
-
45
- > **source\_type\_id**: [`PointChangeSourceType`](../enumerations/PointChangeSourceType.md)
@@ -1,45 +0,0 @@
1
- # Interface: PointsLog
2
-
3
- ## Properties
4
-
5
- ### create\_date
6
-
7
- > **create\_date**: `number`
8
-
9
- Epoch timestamp in SECONDS (not ms — unlike most SDK timestamps).
10
-
11
- ***
12
-
13
- ### user\_ext\_id
14
-
15
- > **user\_ext\_id**: `string`
16
-
17
- ***
18
-
19
- ### crm\_brand\_id
20
-
21
- > **crm\_brand\_id**: `number`
22
-
23
- ***
24
-
25
- ### points\_collected
26
-
27
- > **points\_collected**: `number`
28
-
29
- ***
30
-
31
- ### user\_points\_ever
32
-
33
- > **user\_points\_ever**: `number`
34
-
35
- ***
36
-
37
- ### user\_points\_balance
38
-
39
- > **user\_points\_balance**: `number`
40
-
41
- ***
42
-
43
- ### source\_type\_id
44
-
45
- > **source\_type\_id**: [`PointChangeSourceType`](../enumerations/PointChangeSourceType.md)
@@ -1,100 +0,0 @@
1
- # Interface: TActivityLogEntry
2
-
3
- Full activity-log row returned by [WSAPIUser.getActivityLogV2](../classes/WSAPIUser.md#getactivitylogv2).
4
- Includes wallet changes and non-wallet activities (missions, badges, levels, …).
5
-
6
- ## Properties
7
-
8
- ### create\_date
9
-
10
- > **create\_date**: `number`
11
-
12
- ***
13
-
14
- ### user\_ext\_id
15
-
16
- > **user\_ext\_id**: `string`
17
-
18
- ***
19
-
20
- ### crm\_brand\_id
21
-
22
- > **crm\_brand\_id**: `number`
23
-
24
- ***
25
-
26
- ### type
27
-
28
- > **type**: [`UserBalanceType`](../enumerations/UserBalanceType.md)
29
-
30
- ***
31
-
32
- ### amount
33
-
34
- > **amount**: `number`
35
-
36
- ***
37
-
38
- ### balance
39
-
40
- > **balance**: `number`
41
-
42
- ***
43
-
44
- ### total\_ever?
45
-
46
- > `optional` **total\_ever?**: `number`
47
-
48
- ***
49
-
50
- ### source\_type\_id
51
-
52
- > **source\_type\_id**: [`PointChangeSourceType`](../enumerations/PointChangeSourceType.md)
53
-
54
- ***
55
-
56
- ### activity\_type\_id?
57
-
58
- > `optional` **activity\_type\_id?**: [`ActivityLogActivities`](../enumerations/ActivityLogActivities.md)
59
-
60
- ***
61
-
62
- ### context\_value\_1?
63
-
64
- > `optional` **context\_value\_1?**: `number`
65
-
66
- ***
67
-
68
- ### meta?
69
-
70
- > `optional` **meta?**: [`ActivityLogMeta`](ActivityLogMeta.md)
71
-
72
- ***
73
-
74
- ### source\_entity\_name?
75
-
76
- > `optional` **source\_entity\_name?**: `string`
77
-
78
- ***
79
-
80
- ### source\_entity\_id?
81
-
82
- > `optional` **source\_entity\_id?**: `number`
83
-
84
- ***
85
-
86
- ### source\_reference\_id?
87
-
88
- > `optional` **source\_reference\_id?**: `number`
89
-
90
- ***
91
-
92
- ### source\_root\_id?
93
-
94
- > `optional` **source\_root\_id?**: `number`
95
-
96
- ***
97
-
98
- ### is\_wallet\_entry
99
-
100
- > **is\_wallet\_entry**: `boolean`
@@ -1,3 +0,0 @@
1
- # Type Alias: ActivityLogEntry
2
-
3
- > **ActivityLogEntry** = [`PointsLog`](../interfaces/PointsLog.md) \| [`GemsDiamondsLog`](../interfaces/GemsDiamondsLog.md)
@@ -1,62 +0,0 @@
1
- # getActivityLogV2 — API (TActivityLogEntry)
2
-
3
- > Returns the full activity log (v2) — wallet changes **and** non-wallet activities (missions, badges, levels, tournaments, avatars, …).
4
- > Import: `import { TActivityLogEntry } from '@smartico/public-api'`
5
- > Search terms: getActivityLogV2, user, TActivityLogEntry, UserBalanceType, PointChangeSourceType, ActivityLogActivities, ActivityLogMeta
6
-
7
- ## Signature
8
- ```ts
9
- _smartico.api.getActivityLogV2({
10
- startTimeSeconds,
11
- endTimeSeconds,
12
- from,
13
- to,
14
- types,
15
- }: {
16
- startTimeSeconds: number;
17
- endTimeSeconds: number;
18
- from: number;
19
- to: number;
20
- types?: number[];
21
- }): Promise<TActivityLogEntry[]>
22
- ```
23
-
24
- ## Parameters
25
- _None._
26
-
27
- ## Returns — `Promise<TActivityLogEntry[]>`
28
- Array of `TActivityLogEntry`. Each item:
29
- - `create_date` (number)
30
- - `user_ext_id` (string)
31
- - `crm_brand_id` (number)
32
- - `type` (UserBalanceType)
33
- - `amount` (number)
34
- - `balance` (number)
35
- - `total_ever` (number)
36
- - `source_type_id` (PointChangeSourceType)
37
- - `activity_type_id` (ActivityLogActivities)
38
- - `context_value_1` (number)
39
- - `meta` (ActivityLogMeta)
40
- - `name` (string)
41
- - `image_url` (string)
42
- - `position` (number)
43
- - `user_points_balance_before` (number)
44
- - `points_requested` (number)
45
- - `user_points_ever` (number)
46
- - `source_entity_name` (string)
47
- - `source_entity_id` (number)
48
- - `source_reference_id` (number)
49
- - `source_root_id` (number)
50
- - `is_wallet_entry` (boolean)
51
-
52
- ## Behavioral contract
53
- See the [UI guide](../ui/user/UIGuide_getActivityLogV2.md) if present.
54
-
55
- ## Errors
56
- See this method's TSDoc / the mutation pages for `err_code` handling.
57
-
58
- ## Related
59
- - `getActivityLog`
60
- - `TActivityLog`
61
- - `ActivityLogActivities`
62
- - `TActivityLogEntry`