@amityco/ts-sdk 7.12.1-501d118.0 → 7.12.1-5cb139d3.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.
@@ -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"}
@@ -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,CA4B9B,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk",
3
- "version": "7.12.1-501d118.0",
3
+ "version": "7.12.1-5cb139d3.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",