@poolse/sdk 0.2.0-alpha.4 → 0.2.0-alpha.6

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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,17 @@ All notable changes to `@poolse/sdk` are documented here. Format follows
6
6
 
7
7
  ## [0.2.0] — 2026-06-01
8
8
 
9
+ ### Added — quote replies (WhatsApp-style)
10
+
11
+ - `Message.quoted_message_id?: Uuid | null` + `Message.quoted_message?:
12
+ QuotedMessagePreview` — server preloads on REST list + realtime
13
+ broadcast so the SDK can render the inline quote card without a
14
+ per-message lookup. Body truncated to ~200 chars server-side.
15
+ - `MessageCreateRequest.quoted_message_id?: Uuid` — quote a message
16
+ on send. Stays in the main feed (independent of `reply_to_id`,
17
+ which still drives thread promotion).
18
+ - New `QuotedMessagePreview` type exported from the package root.
19
+
9
20
  ### Added
10
21
 
11
22
  - `Message.reply_count?: number` — number of replies in the thread
package/dist/index.d.cts CHANGED
@@ -234,6 +234,19 @@ interface Message {
234
234
  * new reply lands so the thread pill ("💬 N replies") updates live.
235
235
  */
236
236
  reply_count?: number;
237
+ /**
238
+ * Quote reply (WhatsApp-style): id of the message being quoted.
239
+ * Independent of `reply_to_id` (which drives thread promotion).
240
+ * Quoted replies stay in the main feed, NOT in a thread side-pane.
241
+ */
242
+ quoted_message_id?: Uuid | null;
243
+ /**
244
+ * Trimmed preview of the quoted message — server preloads on
245
+ * REST list + realtime broadcast so the SDK can render the inline
246
+ * quote card without a per-message lookup. `body` is truncated
247
+ * to ~200 chars; null when the quoted message was deleted post-quote.
248
+ */
249
+ quoted_message?: QuotedMessagePreview | null;
237
250
  mentions: Uuid[];
238
251
  reactions: Record<string, Uuid[]>;
239
252
  /**
@@ -249,6 +262,19 @@ interface Message {
249
262
  inserted_at: IsoDateTime;
250
263
  updated_at: IsoDateTime;
251
264
  }
265
+ /**
266
+ * Compact preview of a quoted message, embedded on the quoting
267
+ * message when `Message.quoted_message_id` is set. Just enough for
268
+ * the UI to render the inline quote card.
269
+ */
270
+ interface QuotedMessagePreview {
271
+ id: Uuid;
272
+ sender_id: Uuid | null;
273
+ /** Truncated to ~200 chars server-side; null when the original was deleted. */
274
+ body: string | null;
275
+ deleted_at: IsoDateTime | null;
276
+ inserted_at: IsoDateTime;
277
+ }
252
278
  interface MessageList {
253
279
  data: Message[];
254
280
  }
@@ -262,6 +288,13 @@ interface MessageCreateRequest {
262
288
  body?: string | null;
263
289
  type?: MessageType;
264
290
  reply_to_id?: Uuid;
291
+ /**
292
+ * Quote-reply target. The new message keeps `thread_root_id` null
293
+ * (no thread promotion) and is delivered alongside other top-level
294
+ * messages, with a preview card pointing at this id. Must reference
295
+ * a message in the same conversation.
296
+ */
297
+ quoted_message_id?: Uuid;
265
298
  mentions?: Uuid[];
266
299
  /**
267
300
  * Attach previously-uploaded attachments to this message. Each id
@@ -840,4 +873,4 @@ declare class AuthError extends ApiError {
840
873
 
841
874
  declare const version = "0.0.1";
842
875
 
843
- export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, ConversationsResource, type ErrorEnvelope, type IsoDateTime, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PresenceSnapshot, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadRequest, type RealtimeStatus, type TypingEvent, type Unsubscribe, UserChannel, type Uuid, version };
876
+ export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, ConversationsResource, type ErrorEnvelope, type IsoDateTime, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PresenceSnapshot, type QuotedMessagePreview, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadRequest, type RealtimeStatus, type TypingEvent, type Unsubscribe, UserChannel, type Uuid, version };
package/dist/index.d.ts CHANGED
@@ -234,6 +234,19 @@ interface Message {
234
234
  * new reply lands so the thread pill ("💬 N replies") updates live.
235
235
  */
236
236
  reply_count?: number;
237
+ /**
238
+ * Quote reply (WhatsApp-style): id of the message being quoted.
239
+ * Independent of `reply_to_id` (which drives thread promotion).
240
+ * Quoted replies stay in the main feed, NOT in a thread side-pane.
241
+ */
242
+ quoted_message_id?: Uuid | null;
243
+ /**
244
+ * Trimmed preview of the quoted message — server preloads on
245
+ * REST list + realtime broadcast so the SDK can render the inline
246
+ * quote card without a per-message lookup. `body` is truncated
247
+ * to ~200 chars; null when the quoted message was deleted post-quote.
248
+ */
249
+ quoted_message?: QuotedMessagePreview | null;
237
250
  mentions: Uuid[];
238
251
  reactions: Record<string, Uuid[]>;
239
252
  /**
@@ -249,6 +262,19 @@ interface Message {
249
262
  inserted_at: IsoDateTime;
250
263
  updated_at: IsoDateTime;
251
264
  }
265
+ /**
266
+ * Compact preview of a quoted message, embedded on the quoting
267
+ * message when `Message.quoted_message_id` is set. Just enough for
268
+ * the UI to render the inline quote card.
269
+ */
270
+ interface QuotedMessagePreview {
271
+ id: Uuid;
272
+ sender_id: Uuid | null;
273
+ /** Truncated to ~200 chars server-side; null when the original was deleted. */
274
+ body: string | null;
275
+ deleted_at: IsoDateTime | null;
276
+ inserted_at: IsoDateTime;
277
+ }
252
278
  interface MessageList {
253
279
  data: Message[];
254
280
  }
@@ -262,6 +288,13 @@ interface MessageCreateRequest {
262
288
  body?: string | null;
263
289
  type?: MessageType;
264
290
  reply_to_id?: Uuid;
291
+ /**
292
+ * Quote-reply target. The new message keeps `thread_root_id` null
293
+ * (no thread promotion) and is delivered alongside other top-level
294
+ * messages, with a preview card pointing at this id. Must reference
295
+ * a message in the same conversation.
296
+ */
297
+ quoted_message_id?: Uuid;
265
298
  mentions?: Uuid[];
266
299
  /**
267
300
  * Attach previously-uploaded attachments to this message. Each id
@@ -840,4 +873,4 @@ declare class AuthError extends ApiError {
840
873
 
841
874
  declare const version = "0.0.1";
842
875
 
843
- export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, ConversationsResource, type ErrorEnvelope, type IsoDateTime, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PresenceSnapshot, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadRequest, type RealtimeStatus, type TypingEvent, type Unsubscribe, UserChannel, type Uuid, version };
876
+ export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, ConversationsResource, type ErrorEnvelope, type IsoDateTime, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PresenceSnapshot, type QuotedMessagePreview, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadRequest, type RealtimeStatus, type TypingEvent, type Unsubscribe, UserChannel, type Uuid, version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poolse/sdk",
3
- "version": "0.2.0-alpha.4",
3
+ "version": "0.2.0-alpha.6",
4
4
  "description": "Headless TypeScript SDK for poolse — realtime chat infrastructure. REST + WebSocket, framework-agnostic. Use directly, or via @poolse/react.",
5
5
  "license": "MIT",
6
6
  "keywords": [