@streamscloud/streams-api-client 4.0.0-beta.3 → 4.0.0-beta.5

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.
@@ -20,7 +20,8 @@ const getFilter = (dataType, dynamicLoadingConfig) => {
20
20
  }
21
21
  if (dataType === DataType.ShortVideo && dynamicLoadingConfig.posts.enabled) {
22
22
  return {
23
- categoryId: dynamicLoadingConfig.posts.categoryId ?? undefined
23
+ categoryId: dynamicLoadingConfig.posts.categoryId ?? undefined,
24
+ types: dynamicLoadingConfig.posts.types ?? undefined
24
25
  };
25
26
  }
26
27
  return undefined;
@@ -36,5 +36,6 @@ export type DynamicLoadingConfig = {
36
36
  posts: {
37
37
  enabled: boolean;
38
38
  categoryId?: string;
39
+ types?: string[];
39
40
  };
40
41
  };
@@ -21,7 +21,8 @@ const mapToSiteShortVideoModels = (posts) => {
21
21
  };
22
22
  const mapToFilter = (filter) => {
23
23
  return {
24
- categoryId: filter.categoryId,
24
+ categoryId: Array.isArray(filter.categoryId) ? undefined : filter.categoryId,
25
+ types: Array.isArray(filter.types) ? filter.types : undefined,
25
26
  };
26
27
  };
27
28
 
@@ -10,4 +10,5 @@ export interface ShortVideoModel {
10
10
  }
11
11
  export type ShortVideosFilter = {
12
12
  categoryId?: string;
13
+ types?: string[];
13
14
  };
@@ -3,5 +3,5 @@ export interface DataLoader<T> {
3
3
  loadBatch: (limit: number, filter: Filter, excludeIds?: string[]) => Promise<T[]>;
4
4
  }
5
5
  export type Filter = {
6
- [key: string]: string | undefined;
6
+ [key: string]: string | string[] | undefined;
7
7
  };
@@ -160,6 +160,7 @@ export type StreamsFilter = {
160
160
  export type PostsFilter = {
161
161
  categoryId?: string;
162
162
  excludeIds?: string[];
163
+ types?: string[];
163
164
  };
164
165
  export type Post = {
165
166
  ad?: Ad;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/streams-api-client",
3
- "version": "4.0.0-beta.3",
3
+ "version": "4.0.0-beta.5",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",