@stream-io/feeds-client 0.1.9 → 0.1.10

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 (38) hide show
  1. package/@react-bindings/hooks/search-state-hooks/index.ts +3 -0
  2. package/@react-bindings/index.ts +5 -0
  3. package/CHANGELOG.md +7 -0
  4. package/dist/@react-bindings/contexts/StreamSearchContext.d.ts +12 -0
  5. package/dist/@react-bindings/contexts/StreamSearchResultsContext.d.ts +12 -0
  6. package/dist/@react-bindings/hooks/search-state-hooks/index.d.ts +3 -0
  7. package/dist/@react-bindings/hooks/search-state-hooks/useSearchQuery.d.ts +4 -0
  8. package/dist/@react-bindings/hooks/search-state-hooks/useSearchResult.d.ts +8 -0
  9. package/dist/@react-bindings/hooks/search-state-hooks/useSearchSources.d.ts +4 -0
  10. package/dist/@react-bindings/index.d.ts +5 -0
  11. package/dist/@react-bindings/wrappers/StreamSearch.d.ts +12 -0
  12. package/dist/@react-bindings/wrappers/StreamSearchResults.d.ts +12 -0
  13. package/dist/index-react-bindings.browser.cjs +85 -16
  14. package/dist/index-react-bindings.browser.cjs.map +1 -1
  15. package/dist/index-react-bindings.browser.js +77 -17
  16. package/dist/index-react-bindings.browser.js.map +1 -1
  17. package/dist/index-react-bindings.node.cjs +85 -16
  18. package/dist/index-react-bindings.node.cjs.map +1 -1
  19. package/dist/index-react-bindings.node.js +77 -17
  20. package/dist/index-react-bindings.node.js.map +1 -1
  21. package/dist/index.browser.cjs +26 -125
  22. package/dist/index.browser.cjs.map +1 -1
  23. package/dist/index.browser.js +26 -125
  24. package/dist/index.browser.js.map +1 -1
  25. package/dist/index.node.cjs +26 -125
  26. package/dist/index.node.cjs.map +1 -1
  27. package/dist/index.node.js +26 -125
  28. package/dist/index.node.js.map +1 -1
  29. package/dist/src/common/BaseSearchSource.d.ts +3 -1
  30. package/dist/src/common/FeedSearchSource.d.ts +5 -1
  31. package/dist/src/common/SearchController.d.ts +2 -0
  32. package/dist/tsconfig.tsbuildinfo +1 -1
  33. package/package.json +1 -1
  34. package/src/common/ActivitySearchSource.ts +5 -15
  35. package/src/common/BaseSearchSource.ts +9 -9
  36. package/src/common/FeedSearchSource.ts +20 -65
  37. package/src/common/SearchController.ts +2 -0
  38. package/src/common/UserSearchSource.ts +9 -61
@@ -1,6 +1,6 @@
1
1
  import { StateStore } from './StateStore';
2
2
  import { type DebouncedFunc } from './utils';
3
- export type SearchSourceType = 'channels' | 'users' | 'messages' | (string & {});
3
+ export type SearchSourceType = 'activity' | 'user' | 'feed' | (string & {});
4
4
  export type QueryReturnValue<T> = {
5
5
  items: T[];
6
6
  next?: string | null;
@@ -44,10 +44,12 @@ export type SearchSourceOptions = {
44
44
  /** The number of milliseconds to debounce the search query. The default interval is 300ms. */
45
45
  debounceMs?: number;
46
46
  pageSize?: number;
47
+ allowEmptySearchString?: boolean;
47
48
  };
48
49
  export declare abstract class BaseSearchSource<T> implements SearchSource<T> {
49
50
  state: StateStore<SearchSourceState<T>>;
50
51
  protected pageSize: number;
52
+ protected allowEmptySearchString: boolean;
51
53
  abstract readonly type: SearchSourceType;
52
54
  protected searchDebounced: DebouncedExecQueryFunction;
53
55
  protected constructor(options?: SearchSourceOptions);
@@ -2,10 +2,14 @@ import { BaseSearchSource } from './BaseSearchSource';
2
2
  import type { SearchSourceOptions } from './BaseSearchSource';
3
3
  import { FeedsClient } from '../FeedsClient';
4
4
  import { Feed } from '../Feed';
5
+ export type FeedSearchSourceOptions = SearchSourceOptions & {
6
+ groupId?: string;
7
+ };
5
8
  export declare class FeedSearchSource extends BaseSearchSource<Feed> {
6
9
  readonly type: "feed";
7
10
  private readonly client;
8
- constructor(client: FeedsClient, options?: SearchSourceOptions);
11
+ private readonly feedGroupId?;
12
+ constructor(client: FeedsClient, options?: FeedSearchSourceOptions);
9
13
  protected query(searchQuery: string): Promise<{
10
14
  items: never[];
11
15
  next?: undefined;
@@ -17,6 +17,8 @@ export declare class SearchController {
17
17
  /**
18
18
  * Not intended for direct use by integrators, might be removed without notice resulting in
19
19
  * broken integrations.
20
+ *
21
+ * @internal
20
22
  */
21
23
  _internalState: StateStore<InternalSearchControllerState>;
22
24
  state: StateStore<SearchControllerState>;