@streamscloud/streams-api-client 2.4.0 → 3.0.0

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.
@@ -5,8 +5,9 @@ const mapToSiteShortVideoModels = (posts) => {
5
5
  displayDate: post.displayDate,
6
6
  authorName: post.authorProfile.name,
7
7
  authorImage: post.authorProfile.image ?? '',
8
- publisherName: post.publisherProfile?.name,
9
- publisherImage: post.publisherProfile?.image,
8
+ ownerName: post.ownerProfile.name,
9
+ ownerImage: post.ownerProfile.image ?? '',
10
+ ownerType: post.ownerProfile.type,
10
11
  authorType: post.authorProfile.type,
11
12
  viewsCount: post.viewsCount ?? 0,
12
13
  reactionsCount: post.social?.reactions.total ?? 0,
@@ -5,8 +5,9 @@ export interface ShortVideoModel {
5
5
  authorName: string;
6
6
  authorImage: string;
7
7
  authorType: string;
8
- publisherName?: string;
9
- publisherImage?: string;
8
+ ownerName: string;
9
+ ownerImage: string;
10
+ ownerType: string;
10
11
  displayDate: string;
11
12
  viewsCount: number;
12
13
  reactionsCount: number;
@@ -4,8 +4,9 @@ const mapToStreamModels = (streams) => {
4
4
  id: s.id,
5
5
  cover: s.cover.url,
6
6
  categories: s.categories.map(c => ({ name: c.name })),
7
- publisherName: s.publisherProfile?.name,
8
- publisherImage: s.publisherProfile?.image,
7
+ ownerName: s.ownerProfile.name,
8
+ ownerImage: s.ownerProfile.image ?? '',
9
+ ownerType: s.ownerProfile.type,
9
10
  pagesCount: s.pagesCount,
10
11
  title: s.title,
11
12
  subTitle: s.subTitle,
@@ -2,8 +2,9 @@ export interface StreamModel {
2
2
  id: string;
3
3
  cover: string;
4
4
  categories: Category[];
5
- publisherName?: string;
6
- publisherImage?: string;
5
+ ownerName: string;
6
+ ownerImage: string;
7
+ ownerType: string;
7
8
  pagesCount: number;
8
9
  title: string;
9
10
  subTitle: string;
@@ -1,3 +1,3 @@
1
- var EmbedPostsQuery = "query EmbedPosts($input: EmbedPostsInput!) {\n embedPosts(input: $input) {\n items {\n id\n postData {\n shortVideoData {\n text\n }\n media {\n type\n url\n thumbnailUrl\n }\n }\n authorProfile {\n name\n image\n type\n }\n publisherProfile {\n image\n name\n }\n displayDate\n viewsCount\n social {\n reactions {\n total\n }\n commentsCount\n sharesCount\n }\n allProducts {\n id\n link\n media {\n thumbnailUrl\n type\n url\n }\n title\n shortDescription\n priceAndAvailability {\n price\n productSalePrices {\n salePrice\n salePriceEffectiveDateFrom\n salePriceEffectiveDateTo\n }\n currency\n }\n }\n }\n }\n}";
1
+ var EmbedPostsQuery = "query EmbedPosts($input: EmbedPostsInput!) {\n embedPosts(input: $input) {\n items {\n id\n postData {\n shortVideoData {\n text\n }\n media {\n type\n url\n thumbnailUrl\n }\n }\n authorProfile {\n name\n image\n type\n }\n ownerProfile {\n image\n name\n type\n }\n displayDate\n viewsCount\n social {\n reactions {\n total\n }\n commentsCount\n sharesCount\n }\n allProducts {\n id\n link\n media {\n thumbnailUrl\n type\n url\n }\n title\n shortDescription\n priceAndAvailability {\n price\n productSalePrices {\n salePrice\n salePriceEffectiveDateFrom\n salePriceEffectiveDateTo\n }\n currency\n }\n }\n }\n }\n}";
2
2
 
3
3
  export { EmbedPostsQuery as default };
@@ -1,3 +1,3 @@
1
- var EmbedStreamsQuery = "query EmbedStreams($input: EmbedStreamsInput!) {\n embedStreams(input: $input) {\n items {\n id\n cover {\n url\n }\n categories {\n name\n }\n publisherProfile {\n image\n name\n }\n pagesCount\n title\n subTitle\n status\n publishedAt\n }\n continuationToken\n }\n}";
1
+ var EmbedStreamsQuery = "query EmbedStreams($input: EmbedStreamsInput!) {\n embedStreams(input: $input) {\n items {\n id\n cover {\n url\n }\n categories {\n name\n }\n ownerProfile {\n image\n name\n type\n }\n pagesCount\n title\n subTitle\n status\n publishedAt\n }\n continuationToken\n }\n}";
2
2
 
3
3
  export { EmbedStreamsQuery as default };
@@ -305,8 +305,8 @@ export declare enum Status {
305
305
  export type Stream = {
306
306
  id: string;
307
307
  cover: MediaItem;
308
+ ownerProfile: Profile;
308
309
  categories: StreamCategory[];
309
- publisherProfile?: Profile;
310
310
  pagesCount: number;
311
311
  publishedAt: any;
312
312
  status: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/streams-api-client",
3
- "version": "2.4.0",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",