@cshah18/sdk 3.0.5 → 4.0.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.
@@ -488,7 +488,6 @@ export interface RenderWidgetOptions {
488
488
  */
489
489
  viewAllLink?: {
490
490
  container?: string | HTMLElement;
491
- text?: string;
492
491
  align?: "left" | "center" | "right";
493
492
  className?: string;
494
493
  linkClassName?: string;
@@ -28,7 +28,9 @@ export declare class GroupListModal {
28
28
  private currentSessionId;
29
29
  private onGroupJoined;
30
30
  private onViewProgress;
31
+ private socketListenerRegistered;
31
32
  private readonly escapeHandler;
33
+ private readonly handleGroupMemberJoinedEvent;
32
34
  constructor(groups?: GroupListItem[], liveCount?: number, debug?: boolean, apiClient?: ApiClient | null);
33
35
  /** Set callback for when a group is joined successfully */
34
36
  setOnGroupJoined(callback: (joinData: GroupJoinResponseData) => void): void;
@@ -38,6 +40,14 @@ export declare class GroupListModal {
38
40
  setCurrentJoinedGroup(groupId: string): void;
39
41
  /** Check if a group ID exists in the current groups list */
40
42
  hasGroup(groupId: string): boolean;
43
+ /** Subscribe to socket events for real-time group updates */
44
+ private subscribeToSocketEvents;
45
+ /** Unsubscribe from socket events */
46
+ private unsubscribeFromSocketEvents;
47
+ /** Handle group member joined socket event and update groups list */
48
+ private onGroupMemberJoined;
49
+ /** Update the rendered group card with new data */
50
+ private updateGroupCard;
41
51
  open(productId?: string, sessionId?: string, joinedGroupId?: string): Promise<void>;
42
52
  private fetchAndRenderGroups;
43
53
  private formatTimeRemaining;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cshah18/sdk",
3
- "version": "3.0.5",
3
+ "version": "4.0.0",
4
4
  "description": "CoBuy Embedded SDK for browser JavaScript integration",
5
5
  "type": "module",
6
6
  "main": "dist/cobuy-sdk.umd.js",