@amityco/ts-sdk-react-native 7.12.1-f6ba70a0.0 → 7.13.0

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 (42) hide show
  1. package/dist/@types/core/events.d.ts +1 -1
  2. package/dist/@types/core/events.d.ts.map +1 -1
  3. package/dist/@types/domains/liveStreamPlayer.d.ts +6 -2
  4. package/dist/@types/domains/liveStreamPlayer.d.ts.map +1 -1
  5. package/dist/@types/domains/room.d.ts +29 -0
  6. package/dist/@types/domains/room.d.ts.map +1 -1
  7. package/dist/client/api/setSessionState.d.ts +1 -1
  8. package/dist/client/api/setSessionState.d.ts.map +1 -1
  9. package/dist/client/events/onSessionStateChange.d.ts +1 -1
  10. package/dist/client/events/onSessionStateChange.d.ts.map +1 -1
  11. package/dist/client/utils/SessionWatcher.d.ts +2 -2
  12. package/dist/client/utils/SessionWatcher.d.ts.map +1 -1
  13. package/dist/core/events.d.ts +1 -1
  14. package/dist/core/events.d.ts.map +1 -1
  15. package/dist/feedRepository/observers/utils.d.ts +1 -1
  16. package/dist/index.cjs.js +433 -90
  17. package/dist/index.esm.js +433 -90
  18. package/dist/index.umd.js +2 -2
  19. package/dist/liveStreamPlayer/utils/cryptoSignatureUtils.d.ts +2 -2
  20. package/dist/liveStreamPlayer/utils/cryptoSignatureUtils.d.ts.map +1 -1
  21. package/dist/postRepository/observers/utils.d.ts +2 -2
  22. package/dist/reactionRepository/events/onReactionAdded.d.ts +1 -1
  23. package/dist/reactionRepository/events/onReactionAdded.d.ts.map +1 -1
  24. package/dist/reactionRepository/events/onReactionRemoved.d.ts +1 -1
  25. package/dist/reactionRepository/events/onReactionRemoved.d.ts.map +1 -1
  26. package/dist/roomRepository/api/analytics/AmityRoomAnalytics.d.ts +30 -0
  27. package/dist/roomRepository/api/analytics/AmityRoomAnalytics.d.ts.map +1 -0
  28. package/dist/roomRepository/api/analytics/WatchSessionStorage.d.ts +38 -0
  29. package/dist/roomRepository/api/analytics/WatchSessionStorage.d.ts.map +1 -0
  30. package/dist/roomRepository/api/analytics/index.d.ts +4 -0
  31. package/dist/roomRepository/api/analytics/index.d.ts.map +1 -0
  32. package/dist/roomRepository/api/analytics/syncWatchSessions.d.ts +6 -0
  33. package/dist/roomRepository/api/analytics/syncWatchSessions.d.ts.map +1 -0
  34. package/dist/roomRepository/api/index.d.ts +1 -0
  35. package/dist/roomRepository/api/index.d.ts.map +1 -1
  36. package/dist/userRepository/relationship/block/api/blockUser.d.ts.map +1 -1
  37. package/dist/utils/event.d.ts +1 -1
  38. package/dist/utils/event.d.ts.map +1 -1
  39. package/dist/utils/linkedObject/roomLinkedObject.d.ts.map +1 -1
  40. package/dist/utils/liveObject.d.ts +1 -1
  41. package/dist/utils/liveObject.d.ts.map +1 -1
  42. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
- export declare function createSignature({ timestamp, streams, }: {
1
+ export declare function createSignature({ timestamp, rooms, }: {
2
2
  timestamp: string;
3
- streams: Amity.UsageDataModel[];
3
+ rooms: Amity.UsageDataModel[];
4
4
  }): Promise<{
5
5
  signature: string;
6
6
  nonceStr: string | number[];
@@ -1 +1 @@
1
- {"version":3,"file":"cryptoSignatureUtils.d.ts","sourceRoot":"","sources":["../../../src/liveStreamPlayer/utils/cryptoSignatureUtils.ts"],"names":[],"mappings":"AA4EA,wBAAsB,eAAe,CAAC,EACpC,SAAS,EACT,OAAO,GACR,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC,cAAc,EAAE,CAAC;CACjC;;;eAwBA"}
1
+ {"version":3,"file":"cryptoSignatureUtils.d.ts","sourceRoot":"","sources":["../../../src/liveStreamPlayer/utils/cryptoSignatureUtils.ts"],"names":[],"mappings":"AA8KA,wBAAsB,eAAe,CAAC,EACpC,SAAS,EACT,KAAK,GACN,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC,cAAc,EAAE,CAAC;CAC/B;;;eAwBA"}
@@ -3,11 +3,11 @@ export declare const generateCommentSubscriptions: ({ cacheKey, resolveId, }: {
3
3
  cacheKey: Amity.CacheKey;
4
4
  resolveId?: ((id: string) => string) | undefined;
5
5
  }) => {
6
- fn: (callback: Amity.Listener<Amity.InternalPost<any>>) => Amity.Unsubscriber;
6
+ fn: (callback: Amity.Listener<Amity.InternalPost<any>, any>) => Amity.Unsubscriber;
7
7
  action: EnumPostActions;
8
8
  }[];
9
9
  export declare const getPostSubscription: (cacheKey: Amity.CacheKey) => {
10
- fn: (callback: Amity.Listener<Amity.InternalPost<any>>) => Amity.Unsubscriber;
10
+ fn: (callback: Amity.Listener<Amity.InternalPost<any>, any>) => Amity.Unsubscriber;
11
11
  action: EnumPostActions;
12
12
  }[];
13
13
  export declare const resolvePostIdsFromRooms: (rooms: Amity.RawRoom[], posts: Amity.RawPost[]) => string[];
@@ -15,5 +15,5 @@
15
15
  *
16
16
  * @category Message Events
17
17
  * */
18
- export declare const onReactionAdded: (referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], callback: Amity.Listener<Amity.InternalComment<any> | Amity.InternalStory | Amity.InternalPost<any> | Amity.InternalMessage<any>>) => Amity.Unsubscriber;
18
+ export declare const onReactionAdded: (referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], callback: Amity.Listener<Amity.InternalComment<any> | Amity.InternalStory | Amity.InternalPost<any> | Amity.InternalMessage<any>, any>) => Amity.Unsubscriber;
19
19
  //# sourceMappingURL=onReactionAdded.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"onReactionAdded.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactionAdded.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,eAAe,kBACX,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,wIAEzC,MAAM,YAuCR,CAAC"}
1
+ {"version":3,"file":"onReactionAdded.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactionAdded.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,eAAe,kBACX,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,6IAEzC,MAAM,YAuCR,CAAC"}
@@ -15,5 +15,5 @@
15
15
  *
16
16
  * @category Message Events
17
17
  * */
18
- export declare const onReactionRemoved: (referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], callback: Amity.Listener<Amity.InternalComment<any> | Amity.InternalStory | Amity.InternalPost<any> | Amity.InternalMessage<any>>) => Amity.Unsubscriber;
18
+ export declare const onReactionRemoved: (referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], callback: Amity.Listener<Amity.InternalComment<any> | Amity.InternalStory | Amity.InternalPost<any> | Amity.InternalMessage<any>, any>) => Amity.Unsubscriber;
19
19
  //# sourceMappingURL=onReactionRemoved.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"onReactionRemoved.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactionRemoved.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,iBAAiB,kBACb,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,wIAEzC,MAAM,YAkCR,CAAC"}
1
+ {"version":3,"file":"onReactionRemoved.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactionRemoved.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,iBAAiB,kBACb,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,6IAEzC,MAAM,YAkCR,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * AmityRoomAnalytics provides analytics capabilities for room watch sessions
3
+ */
4
+ export declare class AmityRoomAnalytics implements Amity.RoomAnalytics {
5
+ private room;
6
+ private storage;
7
+ private client;
8
+ constructor(room: Amity.Room);
9
+ /**
10
+ * Create a new watch session for the current room
11
+ * @param startedAt The timestamp when watching started
12
+ * @returns Promise<string> sessionId unique identifier for this watch session
13
+ * @throws ASCApiError if room is not in watchable state (not LIVE or RECORDED)
14
+ */
15
+ createWatchSession(startedAt: Date): Promise<string>;
16
+ /**
17
+ * Update an existing watch session with duration
18
+ * @param sessionId The unique identifier of the watch session
19
+ * @param duration The total watch duration in seconds
20
+ * @param endedAt The timestamp when this update occurred
21
+ * @returns Promise<void> Completion status
22
+ */
23
+ updateWatchSession(sessionId: string, duration: number, endedAt: Date): Promise<void>;
24
+ /**
25
+ * Sync all pending watch sessions to backend
26
+ * This function uses jitter delay and handles network resilience
27
+ */
28
+ syncPendingWatchSessions(): void;
29
+ }
30
+ //# sourceMappingURL=AmityRoomAnalytics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AmityRoomAnalytics.d.ts","sourceRoot":"","sources":["../../../../src/roomRepository/api/analytics/AmityRoomAnalytics.ts"],"names":[],"mappings":"AAiDA;;GAEG;AACH,qBAAa,kBAAmB,YAAW,KAAK,CAAC,aAAa;IAC5D,OAAO,CAAC,IAAI,CAAa;IAEzB,OAAO,CAAC,OAAO,CAA4B;IAE3C,OAAO,CAAC,MAAM,CAAqB;gBAEvB,IAAI,EAAE,KAAK,CAAC,IAAI;IAI5B;;;;;OAKG;IACG,kBAAkB,CAAC,SAAS,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC;IAgC1D;;;;;;OAMG;IACG,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAc3F;;;OAGG;IACH,wBAAwB,IAAI,IAAI;CAgCjC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * WatchSessionStorage manages watch session data in memory
3
+ * Similar to UsageCollector for stream watch minutes
4
+ */
5
+ export declare class WatchSessionStorage {
6
+ private sessions;
7
+ constructor();
8
+ /**
9
+ * Add a new watch session
10
+ */
11
+ addSession(session: Amity.WatchSessionEntity): void;
12
+ /**
13
+ * Get a watch session by sessionId
14
+ */
15
+ getSession(sessionId: string): Amity.WatchSessionEntity | undefined;
16
+ /**
17
+ * Update a watch session
18
+ */
19
+ updateSession(sessionId: string, updates: Partial<Amity.WatchSessionEntity>): void;
20
+ /**
21
+ * Get all sessions with a specific sync state
22
+ */
23
+ getSessionsByState(state: Amity.SyncState): Amity.WatchSessionEntity[];
24
+ /**
25
+ * Delete a session
26
+ */
27
+ deleteSession(sessionId: string): void;
28
+ /**
29
+ * Get all pending sessions
30
+ */
31
+ getPendingSessions(): Amity.WatchSessionEntity[];
32
+ /**
33
+ * Get all syncing sessions
34
+ */
35
+ getSyncingSessions(): Amity.WatchSessionEntity[];
36
+ }
37
+ export declare const getWatchSessionStorage: () => WatchSessionStorage;
38
+ //# sourceMappingURL=WatchSessionStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WatchSessionStorage.d.ts","sourceRoot":"","sources":["../../../../src/roomRepository/api/analytics/WatchSessionStorage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAwC;;IAMxD;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,kBAAkB,GAAG,IAAI;IAInD;;OAEG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,kBAAkB,GAAG,SAAS;IAInE;;OAEG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,IAAI;IAOlF;;OAEG;IACH,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,kBAAkB,EAAE;IAItE;;OAEG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAItC;;OAEG;IACH,kBAAkB,IAAI,KAAK,CAAC,kBAAkB,EAAE;IAIhD;;OAEG;IACH,kBAAkB,IAAI,KAAK,CAAC,kBAAkB,EAAE;CAGjD;AAKD,eAAO,MAAM,sBAAsB,QAAO,mBAKzC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './AmityRoomAnalytics';
2
+ export * from './WatchSessionStorage';
3
+ export * from './syncWatchSessions';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/roomRepository/api/analytics/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Sync pending watch sessions to backend
3
+ * This function implements the full sync flow with network resilience
4
+ */
5
+ export declare function syncWatchSessions(): Promise<boolean>;
6
+ //# sourceMappingURL=syncWatchSessions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syncWatchSessions.d.ts","sourceRoot":"","sources":["../../../../src/roomRepository/api/analytics/syncWatchSessions.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAiF1D"}
@@ -6,4 +6,5 @@ export * from './getBroadcasterData';
6
6
  export * from './getRecordedUrl';
7
7
  export * from './removeParticipant';
8
8
  export * from './leaveRoom';
9
+ export * from './analytics';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/roomRepository/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/roomRepository/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"blockUser.d.ts","sourceRoot":"","sources":["../../../../../src/userRepository/relationship/block/api/blockUser.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS,WACZ,MAAM,YAAY,CAAC,QAAQ,CAAC,KACnC,QAAQ,MAAM,cAAc,CAsB9B,CAAC"}
1
+ {"version":3,"file":"blockUser.d.ts","sourceRoot":"","sources":["../../../../../src/userRepository/relationship/block/api/blockUser.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS,WACZ,MAAM,YAAY,CAAC,QAAQ,CAAC,KACnC,QAAQ,MAAM,cAAc,CAmC9B,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const convertEventPayload: <SourceModel extends Amity.Model, DestinationDomain extends keyof Amity.Models, DestinationModel extends Amity.Models[DestinationDomain]>(eventHandler: (callback: Amity.Listener<SourceModel>) => Amity.Unsubscriber, sourceModelProp: keyof SourceModel, destinationDomain: DestinationDomain) => (callback: Amity.Listener<DestinationModel>) => Amity.Unsubscriber;
1
+ export declare const convertEventPayload: <SourceModel extends Amity.Model, DestinationDomain extends keyof Amity.Models, DestinationModel extends Amity.Models[DestinationDomain]>(eventHandler: (callback: Amity.Listener<SourceModel, any>) => Amity.Unsubscriber, sourceModelProp: keyof SourceModel, destinationDomain: DestinationDomain) => (callback: Amity.Listener<DestinationModel, any>) => Amity.Unsubscriber;
2
2
  //# sourceMappingURL=event.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/utils/event.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,qMAM6B,MAAM,YAAY,iJAgBzE,CAAC"}
1
+ {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/utils/event.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,0MAM6B,MAAM,YAAY,sJAgBzE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"roomLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/roomLinkedObject.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB,SAAU,MAAM,YAAY,KAAG,MAAM,IAkDjE,CAAC"}
1
+ {"version":3,"file":"roomLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/roomLinkedObject.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB,SAAU,MAAM,YAAY,KAAG,MAAM,IAsDjE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * @deprecated This function will to be deprecated soon.
3
3
  */
4
- export declare const liveObject: <T extends Amity.Model, K extends keyof T, CallbackData extends unknown = any>(id: T[K], callback: Amity.LiveObjectCallback<CallbackData>, key: K, fetcher: (id: T[K]) => Promise<Amity.Cached<T>>, eventHandlers: ((callback: Amity.Listener<T>) => Amity.Unsubscriber)[], options?: Amity.LiveObjectOptions<T, CallbackData> | undefined) => Amity.Unsubscriber;
4
+ export declare const liveObject: <T extends Amity.Model, K extends keyof T, CallbackData extends unknown = any>(id: T[K], callback: Amity.LiveObjectCallback<CallbackData>, key: K, fetcher: (id: T[K]) => Promise<Amity.Cached<T>>, eventHandlers: ((callback: Amity.Listener<T, any>) => Amity.Unsubscriber)[], options?: Amity.LiveObjectOptions<T, CallbackData> | undefined) => Amity.Unsubscriber;
5
5
  //# sourceMappingURL=liveObject.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"liveObject.d.ts","sourceRoot":"","sources":["../../src/utils/liveObject.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,eAAO,MAAM,UAAU,uPASiC,MAAM,YAAY,wEAEvE,MAAM,YAmFR,CAAC"}
1
+ {"version":3,"file":"liveObject.d.ts","sourceRoot":"","sources":["../../src/utils/liveObject.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,eAAO,MAAM,UAAU,4PASiC,MAAM,YAAY,wEAEvE,MAAM,YAmFR,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk-react-native",
3
- "version": "7.12.1-f6ba70a0.0",
3
+ "version": "7.13.0",
4
4
  "license": "CC-BY-ND-4.0",
5
5
  "author": "amity.co <developers@amity.co> (https://amity.co)",
6
6
  "description": "Amity Social Cloud Typescript SDK",
@@ -71,7 +71,7 @@
71
71
  "@react-native-async-storage/async-storage": "^1.17.7",
72
72
  "@react-native-community/netinfo": "^9.4.1",
73
73
  "agentkeepalive": "^4.2.1",
74
- "axios": "^1.2.3",
74
+ "axios": "1.12.0",
75
75
  "debug": "^4.3.4",
76
76
  "hls.js": "^1.4.10",
77
77
  "js-base64": "^3.7.2",