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

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 (34) hide show
  1. package/README.md +4 -2
  2. package/dist/cjs/index.browser.js +600 -1539
  3. package/dist/cjs/index.browser.js.map +2 -2
  4. package/dist/cjs/index.node.js +600 -1539
  5. package/dist/cjs/index.node.js.map +2 -2
  6. package/dist/esm/index.mjs +600 -1539
  7. package/dist/esm/index.mjs.map +2 -2
  8. package/dist/types/api-client.d.ts +9 -5
  9. package/dist/types/channel.d.ts +33 -16
  10. package/dist/types/client.d.ts +19 -18
  11. package/dist/types/gen/chat/ChatApi.d.ts +122 -104
  12. package/dist/types/gen/models/index.d.ts +314 -9
  13. package/dist/types/gen/moderation/ModerationApi.d.ts +15 -13
  14. package/dist/types/reminders/ReminderManager.d.ts +5 -4
  15. package/dist/types/types.d.ts +7 -24
  16. package/package.json +1 -1
  17. package/src/api-client.ts +27 -4
  18. package/src/channel.ts +55 -30
  19. package/src/client.ts +44 -55
  20. package/src/connection/wsConnection/StableWSConnection.ts +2 -19
  21. package/src/gen/chat/ChannelApi.ts +46 -36
  22. package/src/gen/chat/ChatApi.ts +443 -1531
  23. package/src/gen/models/index.ts +327 -9
  24. package/src/gen/moderation/ModerationApi.ts +87 -371
  25. package/src/messageOperations/createMessageOperations.ts +4 -6
  26. package/src/messageOperations/optimistic.ts +4 -1
  27. package/src/offline-support/offline_support_api.ts +1 -1
  28. package/src/offline-support/queueableOperations.ts +8 -1
  29. package/src/pagination/paginators/MessageIntervalPaginator.ts +7 -6
  30. package/src/pagination/paginators/ReminderPaginator.ts +3 -2
  31. package/src/poll.ts +30 -32
  32. package/src/reminders/ReminderManager.ts +12 -17
  33. package/src/thread.ts +20 -4
  34. package/src/types.ts +11 -28
package/README.md CHANGED
@@ -60,10 +60,12 @@ const channel = client.channel('messaging', 'test-channel', {
60
60
  await channel.create();
61
61
 
62
62
  // send message
63
- const { message } = await channel.sendMessage({ text: 'This is a test message' });
63
+ const { message } = await channel.sendMessage({
64
+ message: { text: 'This is a test message' },
65
+ });
64
66
 
65
67
  // send reaction
66
- await channel.sendReaction(message.id, { type: 'love', user: { id: 'vishal-1' } });
68
+ await channel.sendReaction({ id: message.id }, { reaction: { type: 'love' } });
67
69
  ```
68
70
 
69
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: