@poolse/sdk 0.2.0-alpha.3 → 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 +19 -0
- package/dist/index.d.cts +41 -1
- package/dist/index.d.ts +41 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,25 @@ 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
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- `Message.reply_count?: number` — number of replies in the thread
|
|
23
|
+
rooted at this message. Populated by REST list; defaults to 0 over
|
|
24
|
+
realtime (a brand-new message can't have replies yet). Drives the
|
|
25
|
+
thread pill in `<MessageRow>` and increments locally in
|
|
26
|
+
`useMessages` when a reply lands.
|
|
27
|
+
|
|
9
28
|
### Fixed
|
|
10
29
|
|
|
11
30
|
- `RestClient.request` no longer wraps `AbortError` as a `NetworkError`
|
package/dist/index.d.cts
CHANGED
|
@@ -227,6 +227,26 @@ interface Message {
|
|
|
227
227
|
body: string | null;
|
|
228
228
|
reply_to_id: Uuid | null;
|
|
229
229
|
thread_root_id: Uuid | null;
|
|
230
|
+
/**
|
|
231
|
+
* Number of replies in the thread rooted at this message. Server
|
|
232
|
+
* populates on REST list + initial fetch; defaults to 0 for new
|
|
233
|
+
* messages broadcast over realtime. SDK increments locally when a
|
|
234
|
+
* new reply lands so the thread pill ("💬 N replies") updates live.
|
|
235
|
+
*/
|
|
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;
|
|
230
250
|
mentions: Uuid[];
|
|
231
251
|
reactions: Record<string, Uuid[]>;
|
|
232
252
|
/**
|
|
@@ -242,6 +262,19 @@ interface Message {
|
|
|
242
262
|
inserted_at: IsoDateTime;
|
|
243
263
|
updated_at: IsoDateTime;
|
|
244
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
|
+
}
|
|
245
278
|
interface MessageList {
|
|
246
279
|
data: Message[];
|
|
247
280
|
}
|
|
@@ -255,6 +288,13 @@ interface MessageCreateRequest {
|
|
|
255
288
|
body?: string | null;
|
|
256
289
|
type?: MessageType;
|
|
257
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;
|
|
258
298
|
mentions?: Uuid[];
|
|
259
299
|
/**
|
|
260
300
|
* Attach previously-uploaded attachments to this message. Each id
|
|
@@ -833,4 +873,4 @@ declare class AuthError extends ApiError {
|
|
|
833
873
|
|
|
834
874
|
declare const version = "0.0.1";
|
|
835
875
|
|
|
836
|
-
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
|
@@ -227,6 +227,26 @@ interface Message {
|
|
|
227
227
|
body: string | null;
|
|
228
228
|
reply_to_id: Uuid | null;
|
|
229
229
|
thread_root_id: Uuid | null;
|
|
230
|
+
/**
|
|
231
|
+
* Number of replies in the thread rooted at this message. Server
|
|
232
|
+
* populates on REST list + initial fetch; defaults to 0 for new
|
|
233
|
+
* messages broadcast over realtime. SDK increments locally when a
|
|
234
|
+
* new reply lands so the thread pill ("💬 N replies") updates live.
|
|
235
|
+
*/
|
|
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;
|
|
230
250
|
mentions: Uuid[];
|
|
231
251
|
reactions: Record<string, Uuid[]>;
|
|
232
252
|
/**
|
|
@@ -242,6 +262,19 @@ interface Message {
|
|
|
242
262
|
inserted_at: IsoDateTime;
|
|
243
263
|
updated_at: IsoDateTime;
|
|
244
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
|
+
}
|
|
245
278
|
interface MessageList {
|
|
246
279
|
data: Message[];
|
|
247
280
|
}
|
|
@@ -255,6 +288,13 @@ interface MessageCreateRequest {
|
|
|
255
288
|
body?: string | null;
|
|
256
289
|
type?: MessageType;
|
|
257
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;
|
|
258
298
|
mentions?: Uuid[];
|
|
259
299
|
/**
|
|
260
300
|
* Attach previously-uploaded attachments to this message. Each id
|
|
@@ -833,4 +873,4 @@ declare class AuthError extends ApiError {
|
|
|
833
873
|
|
|
834
874
|
declare const version = "0.0.1";
|
|
835
875
|
|
|
836
|
-
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.
|
|
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": [
|