@stream-io/feeds-client 0.1.1 → 0.1.2
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/@react-bindings/index.ts +13 -1
- package/CHANGELOG.md +18 -0
- package/dist/@react-bindings/contexts/StreamFeedsContext.d.ts +15 -0
- package/dist/@react-bindings/hooks/clientStateHooks.d.ts +10 -0
- package/dist/@react-bindings/hooks/useCreateFeedsClient.d.ts +13 -0
- package/dist/@react-bindings/hooks/useStateStore.d.ts +1 -1
- package/dist/@react-bindings/index.d.ts +4 -0
- package/dist/@react-bindings/wrappers/StreamFeeds.d.ts +6 -0
- package/dist/index-react-bindings.browser.cjs +5388 -12
- package/dist/index-react-bindings.browser.cjs.map +1 -1
- package/dist/index-react-bindings.browser.js +5384 -14
- package/dist/index-react-bindings.browser.js.map +1 -1
- package/dist/index-react-bindings.node.cjs +5388 -12
- package/dist/index-react-bindings.node.cjs.map +1 -1
- package/dist/index-react-bindings.node.js +5384 -14
- package/dist/index-react-bindings.node.js.map +1 -1
- package/dist/index.browser.cjs +97 -31
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +97 -31
- package/dist/index.browser.js.map +1 -1
- package/dist/index.node.cjs +97 -31
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.js +97 -31
- package/dist/index.node.js.map +1 -1
- package/dist/src/Feed.d.ts +2 -2
- package/dist/src/FeedsClient.d.ts +8 -5
- package/dist/src/common/StateStore.d.ts +1 -0
- package/dist/src/common/real-time/StableWSConnection.d.ts +3 -3
- package/dist/src/gen/feeds/FeedsApi.d.ts +7 -1
- package/dist/src/gen/models/index.d.ts +41 -0
- package/dist/src/types.d.ts +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -6
- package/src/Feed.ts +19 -12
- package/src/FeedsClient.ts +24 -17
- package/src/common/StateStore.ts +30 -12
- package/src/common/utils.ts +1 -1
- package/src/gen/feeds/FeedsApi.ts +51 -0
- package/src/gen/model-decoders/decoders.ts +29 -0
- package/src/gen/model-decoders/event-decoder-mapping.ts +6 -0
- package/src/gen/models/index.ts +60 -0
- package/src/types.ts +4 -0
package/@react-bindings/index.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
// Hooks
|
|
2
|
+
|
|
1
3
|
export * from './hooks/useComments';
|
|
2
4
|
export * from './hooks/useStateStore';
|
|
3
|
-
export * from './hooks/useOwnCapabilities';
|
|
5
|
+
export * from './hooks/useOwnCapabilities';
|
|
6
|
+
export * from './hooks/clientStateHooks';
|
|
7
|
+
export * from './hooks/useCreateFeedsClient';
|
|
8
|
+
|
|
9
|
+
// Contexts
|
|
10
|
+
|
|
11
|
+
export * from './contexts/StreamFeedsContext';
|
|
12
|
+
|
|
13
|
+
// Wrappers
|
|
14
|
+
|
|
15
|
+
export * from './wrappers/StreamFeeds';
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.1.2](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.1.1...@stream-io/feeds-client-0.1.2) (2025-07-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
* run CI actions on PRs for main, and on main ([#47](https://github.com/GetStream/stream-feeds-js/issues/47)) ([1a2c35b](https://github.com/GetStream/stream-feeds-js/commit/1a2c35bb1425d6e9f897a153024fdafce7a5e9df))
|
|
9
|
+
* Run tests on Node ([#50](https://github.com/GetStream/stream-feeds-js/issues/50)) ([8669bd6](https://github.com/GetStream/stream-feeds-js/commit/8669bd60be696fb40c77d5ba180c605edb660df4))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* client creation hooks, StreamFeeds wrapper, contexts ([#49](https://github.com/GetStream/stream-feeds-js/issues/49)) ([f5c6059](https://github.com/GetStream/stream-feeds-js/commit/f5c6059e83e0cd1a0ca142d5a4d9871c53b0e88d))
|
|
15
|
+
* **gen:** bookmark folder stuff ([#51](https://github.com/GetStream/stream-feeds-js/issues/51)) ([eb5c5be](https://github.com/GetStream/stream-feeds-js/commit/eb5c5be1ce3302e74b0ebaf76d7050f93056d413))
|
|
16
|
+
* Update to latest open API spec ([#53](https://github.com/GetStream/stream-feeds-js/issues/53)) ([e7c3f49](https://github.com/GetStream/stream-feeds-js/commit/e7c3f49f12ed19c522dede04dfa8fea8a6cf1d05))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* update source feed on `feeds.follow.created` ([#52](https://github.com/GetStream/stream-feeds-js/issues/52)) ([e2bed97](https://github.com/GetStream/stream-feeds-js/commit/e2bed97d3b3e8b106e193d2d435468e5654c7381))
|
|
22
|
+
|
|
5
23
|
## [0.1.1](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.1.0...@stream-io/feeds-client-0.1.1) (2025-07-09)
|
|
6
24
|
|
|
7
25
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FeedsClient } from '../../src/FeedsClient';
|
|
2
|
+
export declare const StreamFeedsContext: import("react").Context<FeedsClient | undefined>;
|
|
3
|
+
/**
|
|
4
|
+
* The props for the StreamFeedsProvider component.
|
|
5
|
+
*/
|
|
6
|
+
export type StreamFeedsContextProps = {
|
|
7
|
+
/**
|
|
8
|
+
* The client instance to provide to the component tree.
|
|
9
|
+
*/
|
|
10
|
+
client: FeedsClient;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Hook to access the nearest FeedsClient instance.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useFeedsClient: () => FeedsClient | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A React hook that returns the currently connected user on a `FeedsClient` instance and null otherwise.
|
|
3
|
+
*/
|
|
4
|
+
export declare const useClientConnectedUser: () => import("../..").OwnUser | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* A React hook that returns the websocket connection state of `FeedsClient`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useWsConnectionState: () => {
|
|
9
|
+
isHealthy: boolean | undefined;
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FeedsClient } from '../../src/FeedsClient';
|
|
2
|
+
import type { UserRequest } from '../../src/gen/models';
|
|
3
|
+
import type { TokenOrProvider } from '../../src/types';
|
|
4
|
+
import type { FeedsClientOptions } from '../../src/common/types';
|
|
5
|
+
/**
|
|
6
|
+
* A React hook to create, connect and return an instance of `FeedsClient`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useCreateFeedsClient: ({ apiKey, tokenOrProvider, userData, options, }: {
|
|
9
|
+
apiKey: string;
|
|
10
|
+
tokenOrProvider: TokenOrProvider;
|
|
11
|
+
userData: UserRequest;
|
|
12
|
+
options?: FeedsClientOptions;
|
|
13
|
+
}) => FeedsClient | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StateStore } from '../../src/common/StateStore';
|
|
2
2
|
export declare function useStateStore<T extends Record<string, unknown>, O extends Readonly<Record<string, unknown> | readonly unknown[]>>(store: StateStore<T>, selector: (v: T) => O): O;
|
|
3
3
|
export declare function useStateStore<T extends Record<string, unknown>, O extends Readonly<Record<string, unknown> | readonly unknown[]>>(store: StateStore<T> | undefined, selector: (v: T) => O): O | undefined;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export * from './hooks/useComments';
|
|
2
2
|
export * from './hooks/useStateStore';
|
|
3
3
|
export * from './hooks/useOwnCapabilities';
|
|
4
|
+
export * from './hooks/clientStateHooks';
|
|
5
|
+
export * from './hooks/useCreateFeedsClient';
|
|
6
|
+
export * from './contexts/StreamFeedsContext';
|
|
7
|
+
export * from './wrappers/StreamFeeds';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import type { StreamFeedsContextProps } from '../contexts/StreamFeedsContext';
|
|
3
|
+
export declare const StreamFeeds: {
|
|
4
|
+
({ client, children }: PropsWithChildren<StreamFeedsContextProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|