@mitumba/sdk 1.31.0 → 1.32.1

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/README.md CHANGED
@@ -42,7 +42,7 @@ mitumba.setToken('eyJhbGciOiJIUzI1...', 'my-refresh-token-hex')
42
42
 
43
43
  ## API Overview
44
44
 
45
- The SDK is split into 5 core modules representing the marketplace domains.
45
+ The SDK exposes typed domain modules for the complete marketplace API.
46
46
 
47
47
  ### 1. Auth Module (`mitumba.auth`)
48
48
 
@@ -153,6 +153,26 @@ const feed = await mitumba.vazi.getFeed({ limit: 10, offset: 0 })
153
153
  const { outfits } = await mitumba.vazi.completeOutfit('lst_123')
154
154
  ```
155
155
 
156
+ ### Messaging (`mitumba.messages`)
157
+
158
+ Use explicit buyer/store perspectives and stable commerce-thread IDs:
159
+
160
+ ```typescript
161
+ const perspective = { kind: 'buyer' } as const
162
+ const resolved = await mitumba.messages.resolveThread(
163
+ perspective,
164
+ { kind: 'listing', store_id: 'store_123', listing_id: 'listing_456' },
165
+ { idempotencyKey: 'listing-456' },
166
+ )
167
+
168
+ await mitumba.messages.sendThreadMessage(perspective, resolved.thread.id, {
169
+ client_message_id: crypto.randomUUID(),
170
+ body: 'Is this available?',
171
+ })
172
+ ```
173
+
174
+ Managed realtime uses short-lived one-use tickets and supports an injected `webSocketFactory` for non-browser runtimes. Private attachments are capability-gated. See [the Messaging v2 migration guide](./MESSAGING_V2_MIGRATION.md) and [API reference](./API_REFERENCE.md#messages-module-notify).
175
+
156
176
  ## Error Handling
157
177
 
158
178
  All API errors are wrapped in a standard `APIError` object.