@codingfactory/messenger-client 0.1.3 → 0.1.5

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.
@@ -12,6 +12,6 @@ export interface MessagingHttpClient {
12
12
  data: any;
13
13
  }>;
14
14
  }
15
- export declare let api: MessagingHttpClient;
15
+ export declare function getApi(): MessagingHttpClient;
16
16
  export declare function setMessagingApiClient(client: MessagingHttpClient): void;
17
17
  export declare function resetMessagingApiClient(): void;
@@ -8,6 +8,6 @@ export interface MessagingAuthStore {
8
8
  currentUser: MessagingCurrentUser | null;
9
9
  }
10
10
  export type UseMessagingAuthStore = () => MessagingAuthStore;
11
- export declare let useAuthStore: UseMessagingAuthStore;
11
+ export declare function getAuthStore(): UseMessagingAuthStore;
12
12
  export declare function setMessagingAuthStoreResolver(resolver: UseMessagingAuthStore): void;
13
13
  export declare function resetMessagingAuthStoreResolver(): void;
@@ -123,6 +123,11 @@ export interface TypingUser {
123
123
  name: string;
124
124
  avatar?: string;
125
125
  }
126
+ interface ParticipantReadStatePayload {
127
+ conversation_id: string;
128
+ user_id: string;
129
+ message_id: string;
130
+ }
126
131
  interface MessagingState {
127
132
  conversations: Conversation[];
128
133
  requests: Conversation[];
@@ -3731,6 +3736,7 @@ export declare const useMessagingStore: import("pinia").StoreDefinition<"messagi
3731
3736
  createGroupConversation(title: string, userIds: string[]): Promise<Conversation>;
3732
3737
  addParticipants(conversationId: string, userIds: string[]): Promise<void>;
3733
3738
  removeParticipant(conversationId: string, userId: string): Promise<void>;
3739
+ applyParticipantReadState(payload: ParticipantReadStatePayload): void;
3734
3740
  addMessage(rawMessage: Omit<Message, "attachments"> & {
3735
3741
  attachments: RawAttachment[] | Attachment[];
3736
3742
  }): void;
@@ -5,6 +5,6 @@ export interface Logger {
5
5
  error(...args: unknown[]): void;
6
6
  }
7
7
  export type CreateLogger = (context: string) => Logger;
8
- export declare let createLogger: CreateLogger;
8
+ export declare function getLoggerFactory(): CreateLogger;
9
9
  export declare function setLoggerFactory(factory: CreateLogger): void;
10
10
  export declare function resetLoggerFactory(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingfactory/messenger-client",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Shared messaging frontend state, API helpers, and realtime composables.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",