@livetiles/reach-plugin-types 0.5.0-preview.1026 → 0.5.0-preview.1028

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 (2) hide show
  1. package/lib/index.d.ts +22 -10
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -436,10 +436,11 @@ declare module "libs/shared/util/common/src/avatarUtil" {
436
436
  export function getAvatarBackgroundColor(initials: string): string;
437
437
  }
438
438
  declare module "libs/shared/util/common/src/dateUtils" {
439
- export function getDateOrNow(value?: string): Date;
440
- export function ensureDate(value: string | Date): Date;
441
- export function isDateToday(value: string | Date): boolean;
442
- export function isSameOrAfter(date: Date, dateToCompare: Date): boolean;
439
+ export const getDateOrNow: (value?: string) => Date;
440
+ export const ensureDate: (value: string | Date) => Date;
441
+ export const isDateToday: (value: string | Date) => boolean;
442
+ export const isSameOrAfter: (date: Date, dateToCompare: Date) => boolean;
443
+ export const toTimezone: (date: Date) => Date;
443
444
  }
444
445
  declare module "libs/shared/util/common/src/debouncePromise" {
445
446
  type Awaited<T> = T extends PromiseLike<infer U> ? U : T;
@@ -7444,11 +7445,23 @@ declare module "libs/reach/feature/content/src/pages/usePagesApi" {
7444
7445
  };
7445
7446
  }
7446
7447
  declare module "libs/reach/feature/content/src/posts/utils" {
7447
- import { Account, BannerInfo, BaseItem, Comment, CurrentUser, ItemStatistics, ItemWithAttachments, Keyword, PaginatedList } from "libs/reach/util/common/src/index";
7448
+ import { Account, BaseItem, Comment, CurrentUser, ItemStatistics, ItemWithAttachments, Keyword, PaginatedList } from "libs/reach/util/common/src/index";
7448
7449
  import { FilterWithLogicalOperator } from "libs/reach/feature/content/src/filter/BaseFilterDefinition";
7450
+ export enum CoverType {
7451
+ Image = 0,
7452
+ Video = 1
7453
+ }
7454
+ export interface CoverInfo {
7455
+ cropData?: {
7456
+ leftPct: number;
7457
+ topPct: number;
7458
+ };
7459
+ id: string;
7460
+ type: CoverType;
7461
+ }
7449
7462
  export interface Post extends BaseItem, ItemWithAttachments {
7450
7463
  id: string;
7451
- bannerInfo?: BannerInfo;
7464
+ coverInfo?: CoverInfo;
7452
7465
  comments?: PaginatedList<Comment>;
7453
7466
  groupId: string;
7454
7467
  content: string;
@@ -7477,19 +7490,18 @@ declare module "libs/reach/feature/content/src/posts/utils" {
7477
7490
  export function getPostsHashtagFilterRoute(post: Post, user: CurrentUser, hashtag: string): string;
7478
7491
  }
7479
7492
  declare module "libs/reach/feature/content/src/posts/usePostsApi" {
7480
- import { BannerInfo } from "libs/reach/util/common/src/index";
7481
7493
  import { PaginatedList } from "libs/reach/util/common/src/index";
7482
7494
  import { Attachment } from "libs/reach/util/common/src/index";
7483
7495
  import { Keyword } from "libs/reach/util/common/src/index";
7484
7496
  import { Account } from "libs/reach/util/common/src/index";
7485
- import { Post, PostFilterDefinition } from "libs/reach/feature/content/src/posts/utils";
7497
+ import { CoverInfo, Post, PostFilterDefinition } from "libs/reach/feature/content/src/posts/utils";
7486
7498
  export function usePostsApi(): {
7487
7499
  createPost: (post: Partial<Post>) => Promise<Post>;
7488
7500
  togglePostLike: (postId: string, isLiked: boolean) => Promise<unknown>;
7489
7501
  getPosts: (filter?: Partial<PostFilterDefinition>, ...groupIds: string[]) => Promise<PaginatedList<Post>>;
7490
7502
  updatePost: (postId: string, content: string, attachments: Attachment[], keywords?: {
7491
7503
  [key: string]: Keyword[];
7492
- }, bannerInfo?: BannerInfo) => Promise<Post>;
7504
+ }, coverInfo?: CoverInfo) => Promise<Post>;
7493
7505
  deletePost: (postId: string) => Promise<unknown>;
7494
7506
  getPost: (postId: string, commentCount?: number) => Promise<Post>;
7495
7507
  getPostThread: (postId: string, threadId: string) => Promise<Post>;
@@ -10678,7 +10690,7 @@ declare module "libs/reach/feature/content/src/stream/streamUtils" {
10678
10690
  postComments?: PaginatedList<StreamPostComment>;
10679
10691
  hasMoreUnreadComments: boolean;
10680
10692
  id: string;
10681
- bannerInfo?: import("@livetiles/reach/util/common").BannerInfo;
10693
+ coverInfo?: import("libs/reach/feature/content/src/posts").CoverInfo;
10682
10694
  comments?: PaginatedList<Comment>;
10683
10695
  groupId: string;
10684
10696
  content: string;
package/package.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "main": "",
5
5
  "types": "./index.d.ts",
6
6
  "license": "ISC",
7
- "version": "0.5.0-preview.1026",
7
+ "version": "0.5.0-preview.1028",
8
8
  "dependencies": {}
9
9
  }