stream-chat 10.0.0-rc.18 → 10.0.0-rc.19

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.
Files changed (43) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/index.browser.js +711 -531
  3. package/dist/cjs/index.browser.js.map +4 -4
  4. package/dist/cjs/index.node.js +711 -531
  5. package/dist/cjs/index.node.js.map +4 -4
  6. package/dist/esm/index.mjs +711 -531
  7. package/dist/esm/index.mjs.map +4 -4
  8. package/dist/types/channel.d.ts +4 -60
  9. package/dist/types/client.d.ts +7 -21
  10. package/dist/types/errors.d.ts +5 -1
  11. package/dist/types/messageOperations/FailedSendCache.d.ts +34 -0
  12. package/dist/types/messageOperations/MessageOperationStatePolicy.d.ts +2 -2
  13. package/dist/types/messageOperations/MessageOperations.d.ts +37 -31
  14. package/dist/types/messageOperations/createMessageOperations.d.ts +1 -1
  15. package/dist/types/messageOperations/index.d.ts +1 -5
  16. package/dist/types/messageOperations/types.d.ts +14 -4
  17. package/dist/types/offline-support/queueableOperations.d.ts +21 -1
  18. package/dist/types/offline-support/types.d.ts +7 -7
  19. package/dist/types/poll.d.ts +21 -3
  20. package/dist/types/poll_optimistic_votes.d.ts +61 -0
  21. package/dist/types/thread.d.ts +1 -18
  22. package/package.json +1 -1
  23. package/src/channel.ts +23 -126
  24. package/src/client.ts +6 -42
  25. package/src/errors.ts +11 -1
  26. package/src/messageComposer/messageComposer.ts +2 -2
  27. package/src/messageOperations/FailedSendCache.ts +90 -0
  28. package/src/messageOperations/MessageOperationStatePolicy.ts +85 -68
  29. package/src/messageOperations/MessageOperations.ts +173 -198
  30. package/src/messageOperations/createMessageOperations.ts +104 -49
  31. package/src/messageOperations/index.ts +1 -15
  32. package/src/messageOperations/types.ts +18 -3
  33. package/src/offline-support/queueableOperations.ts +55 -10
  34. package/src/offline-support/types.ts +7 -7
  35. package/src/poll.ts +85 -71
  36. package/src/poll_optimistic_votes.ts +335 -0
  37. package/src/thread.ts +2 -2
  38. package/dist/types/messageOperations/WithMessageOperations.d.ts +0 -35
  39. package/dist/types/messageOperations/optimistic.d.ts +0 -118
  40. package/dist/types/messageOperations/persistence.d.ts +0 -21
  41. package/src/messageOperations/WithMessageOperations.ts +0 -60
  42. package/src/messageOperations/optimistic.ts +0 -260
  43. package/src/messageOperations/persistence.ts +0 -40
package/README.md CHANGED
@@ -65,7 +65,7 @@ const { message } = await channel.sendMessage({
65
65
  });
66
66
 
67
67
  // send reaction
68
- await channel.sendReaction({ id: message.id }, { reaction: { type: 'love' } });
68
+ await client.sendReaction({ id: message.id }, { reaction: { type: 'love' } });
69
69
  ```
70
70
 
71
71
  The `StreamChat` client is set up to allow extension of the base types through use of module augmentation, custom types will carry through to all client returns and provide code-completion to queries (if supported). To extend Stream's entities with custom data you'll have to create a declaration file and make sure it's loaded by TypeScript, [see the list of extendable interfaces](https://github.com/GetStream/stream-chat-js/blob/master/src/custom_types.ts) and the example bellow using two of the most common ones: