diff --git a/examples/typescript/src/App.tsx b/examples/typescript/src/App.tsx index 4bb8e4c9a..91bb6e0b7 100644 --- a/examples/typescript/src/App.tsx +++ b/examples/typescript/src/App.tsx @@ -13,9 +13,13 @@ import { import './App.css'; +const params = (new Proxy(new URLSearchParams(window.location.search), { + get: (searchParams, property) => searchParams.get(property as string), +}) as unknown) as Record; + const apiKey = process.env.REACT_APP_STREAM_KEY as string; -const userId = process.env.REACT_APP_USER_ID as string; -const userToken = process.env.REACT_APP_USER_TOKEN as string; +const userId = params.uid || (process.env.REACT_APP_USER_ID as string); +const userToken = params.ut || (process.env.REACT_APP_USER_TOKEN as string); const filters: ChannelFilters = { type: 'messaging', members: { $in: [userId] } }; const options: ChannelOptions = { state: true, presence: true, limit: 10 }; diff --git a/examples/vite/src/App.tsx b/examples/vite/src/App.tsx index 3811b65bb..e72385cbb 100644 --- a/examples/vite/src/App.tsx +++ b/examples/vite/src/App.tsx @@ -32,6 +32,8 @@ type LocalChannelType = Record; type LocalCommandType = string; type LocalEventType = Record; type LocalMessageType = Record; +type LocalPollOptionType = Record; +type LocalPollType = Record; type LocalReactionType = Record; type LocalUserType = Record; @@ -41,6 +43,8 @@ type StreamChatGenerics = { commandType: LocalCommandType; eventType: LocalEventType; messageType: LocalMessageType; + pollOptionType: LocalPollOptionType; + pollType: LocalPollType; reactionType: LocalReactionType; userType: LocalUserType; }; diff --git a/package.json b/package.json index 5d86ec1c0..b401280c1 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "emoji-mart": "^5.4.0", "react": "^18.0.0 || ^17.0.0 || ^16.8.0", "react-dom": "^18.0.0 || ^17.0.0 || ^16.8.0", - "stream-chat": "^8.30.0" + "stream-chat": "^8.33.1" }, "peerDependenciesMeta": { "emoji-mart": { @@ -226,7 +226,7 @@ "rollup-plugin-url": "^3.0.1", "rollup-plugin-visualizer": "^4.2.0", "semantic-release": "^19.0.5", - "stream-chat": "^8.30.0", + "stream-chat": "^8.33.1", "style-loader": "^2.0.0", "ts-jest": "^28.0.8", "typescript": "^4.7.4", diff --git a/yarn.lock b/yarn.lock index d934bbdf2..14ad5e510 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13322,10 +13322,10 @@ stream-browserify@^2.0.1: inherits "~2.0.1" readable-stream "^2.0.2" -stream-chat@^8.30.0: - version "8.30.0" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.30.0.tgz#47cd05adee04ff7f7b170cac55698474e2819eb4" - integrity sha512-UNdCC9P9wM9DBn6hgVby1rSQuAwTovRpoZL5PdvUS3AEIpXCU4tj2zlwCbz2GFA/M9spDfyQsT/c+vbbr7eCAg== +stream-chat@^8.33.1: + version "8.33.1" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.33.1.tgz#d4e7f3bb10ac4564572431922c97e7c4eda7fe3b" + integrity sha512-r4vUjjsBTtCER2wEFYJzbgSY7eipPkM9gyQNV5VVdZhegY/NggeinwY1bYpBXBpQ5JIEvNFIWWRPOFYkMae3MQ== dependencies: "@babel/runtime" "^7.16.3" "@types/jsonwebtoken" "~9.0.0"