@zeniai/client-epic-state 5.0.77-betaAS4 → 5.0.77-betaAS5

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,12 +1,12 @@
1
- import { date, dateLocal } from '../../../zeniDayJS';
1
+ import { dateInUTC, dateLocal } from '../../../zeniDayJS';
2
2
  import { toHistoricEventUpdateDisplayType, toHistoricEventUpdateType, } from './commonHistory';
3
3
  export const toHistoricEvent = (payload, keepTimeInUTC = false) => ({
4
4
  eventText: payload.event_text,
5
5
  eventSubText: payload.event_sub_text ?? [],
6
- // Bills: keep UTC/platform time (date). Other entities: convert to local (dateLocal).
6
+ // Bills: parse as UTC (dateInUTC). Other entities: convert to local (dateLocal).
7
7
  timestamp: payload.timestamp != null
8
8
  ? keepTimeInUTC
9
- ? date(payload.timestamp)
9
+ ? dateInUTC(payload.timestamp)
10
10
  : dateLocal(payload.timestamp)
11
11
  : undefined,
12
12
  updates: payload.updates.map((eventUpdatePayload) => toHistoricEventUpdate(eventUpdatePayload)),
@@ -31,7 +31,7 @@ const commonHistory = createSlice({
31
31
  updateCommonHistory(draft, action) {
32
32
  const { entityId, entityType, historicEventsPayload, keepTimeInUTC } = action.payload;
33
33
  const key = getEntityHistoryDetailKey(entityId, entityType);
34
- // Bills: keepTimeInUTC true. Other entities: undefined → dateLocal in toHistoricEvent.
34
+ // Bills: keepTimeInUTC true → dateInUTC. Other entities: undefined → dateLocal.
35
35
  const historicEvents = historicEventsPayload.map((historicEventPayload) => toHistoricEvent(historicEventPayload, keepTimeInUTC));
36
36
  draft.historyById[key] = {
37
37
  ...initialCommonHistory,
@@ -27,7 +27,7 @@ export const fetchEntityHistoryEpic = (actions$, state$, zeniAPI) => actions$.pi
27
27
  entityId,
28
28
  entityType,
29
29
  historicEventsPayload: response.data.activities,
30
- // Bills: keep UTC/platform time. Other entities: convert to local.
30
+ // Bills: parse timestamps as UTC. Other entities: convert to local.
31
31
  keepTimeInUTC: entityType === 'bill_pay',
32
32
  }));
33
33
  }
@@ -6,10 +6,10 @@ const commonHistory_1 = require("./commonHistory");
6
6
  const toHistoricEvent = (payload, keepTimeInUTC = false) => ({
7
7
  eventText: payload.event_text,
8
8
  eventSubText: payload.event_sub_text ?? [],
9
- // Bills: keep UTC/platform time (date). Other entities: convert to local (dateLocal).
9
+ // Bills: parse as UTC (dateInUTC). Other entities: convert to local (dateLocal).
10
10
  timestamp: payload.timestamp != null
11
11
  ? keepTimeInUTC
12
- ? (0, zeniDayJS_1.date)(payload.timestamp)
12
+ ? (0, zeniDayJS_1.dateInUTC)(payload.timestamp)
13
13
  : (0, zeniDayJS_1.dateLocal)(payload.timestamp)
14
14
  : undefined,
15
15
  updates: payload.updates.map((eventUpdatePayload) => toHistoricEventUpdate(eventUpdatePayload)),
@@ -38,7 +38,7 @@ const commonHistory = (0, toolkit_1.createSlice)({
38
38
  updateCommonHistory(draft, action) {
39
39
  const { entityId, entityType, historicEventsPayload, keepTimeInUTC } = action.payload;
40
40
  const key = (0, commonHistory_1.getEntityHistoryDetailKey)(entityId, entityType);
41
- // Bills: keepTimeInUTC true. Other entities: undefined → dateLocal in toHistoricEvent.
41
+ // Bills: keepTimeInUTC true → dateInUTC. Other entities: undefined → dateLocal.
42
42
  const historicEvents = historicEventsPayload.map((historicEventPayload) => (0, commonHistoryPayload_1.toHistoricEvent)(historicEventPayload, keepTimeInUTC));
43
43
  draft.historyById[key] = {
44
44
  ...commonHistory_1.initialCommonHistory,
@@ -33,7 +33,7 @@ const fetchEntityHistoryEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
33
33
  entityId,
34
34
  entityType,
35
35
  historicEventsPayload: response.data.activities,
36
- // Bills: keep UTC/platform time. Other entities: convert to local.
36
+ // Bills: parse timestamps as UTC. Other entities: convert to local.
37
37
  keepTimeInUTC: entityType === 'bill_pay',
38
38
  }));
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.0.77-betaAS4",
3
+ "version": "5.0.77-betaAS5",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",