@replyke/core 7.0.0-beta.36 → 7.0.0-beta.37

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.
@@ -47,3 +47,4 @@ export { validateSortBy, validateMetadataPropertyName, validateSortType, } from
47
47
  export type { TimeFrame } from "./interfaces/TimeFrame";
48
48
  export type { Connection, EstablishedConnection, PendingConnection, ConnectionsResponse, PendingConnectionsResponse, PendingConnectionListResponse, ConnectionRequestParams, ConnectionActionResponse, ConnectionWithdrawResponse, ConnectionCountResponse, RemoveConnectionByUserIdResponse, ConnectionStatusResponse, ConnectionStatus, } from "./interfaces/models/Connection";
49
49
  export type { Image, ImageVariant, UploadImageOptions, } from "./interfaces/models/Image";
50
+ export type { File } from "./interfaces/models/File";
@@ -2,6 +2,7 @@ import { Mention } from "./Mention";
2
2
  import { User } from "./User";
3
3
  import { Space } from "./Space";
4
4
  import { ReactionCounts, ReactionType } from "./Reaction";
5
+ import { File } from "./File";
5
6
  export interface TopComment {
6
7
  id: string;
7
8
  user: User;
@@ -9,44 +10,7 @@ export interface TopComment {
9
10
  content: string;
10
11
  createdAt: string;
11
12
  }
12
- export interface EntityImageVariant {
13
- path: string;
14
- publicPath: string;
15
- width: number;
16
- height: number;
17
- size: number;
18
- format: string;
19
- }
20
- export interface EntityImage {
21
- fileId: string;
22
- originalWidth: number;
23
- originalHeight: number;
24
- variants: Record<string, EntityImageVariant>;
25
- processingStatus: "completed" | "failed";
26
- processingError: string | null;
27
- format: string;
28
- quality: number;
29
- exifStripped: boolean;
30
- createdAt: string;
31
- updatedAt: string;
32
- }
33
- export interface EntityFile {
34
- id: string;
35
- projectId: string;
36
- userId: string | null;
37
- entityId: string | null;
38
- commentId: string | null;
39
- spaceId: string | null;
40
- type: "image" | "video" | "document" | "other";
41
- originalPath: string;
42
- originalSize: number;
43
- originalMimeType: string;
44
- position: number;
45
- metadata: Record<string, any>;
46
- image?: EntityImage;
47
- createdAt: string;
48
- updatedAt: string;
49
- }
13
+ export type EntityFile = File;
50
14
  export interface Entity {
51
15
  id: string;
52
16
  foreignId: string | null;
@@ -0,0 +1,38 @@
1
+ export interface FileImageVariant {
2
+ path: string;
3
+ publicPath: string;
4
+ width: number;
5
+ height: number;
6
+ size: number;
7
+ format: string;
8
+ }
9
+ export interface FileImage {
10
+ fileId: string;
11
+ originalWidth: number;
12
+ originalHeight: number;
13
+ variants: Record<string, FileImageVariant>;
14
+ processingStatus: "completed" | "failed";
15
+ processingError: string | null;
16
+ format: string;
17
+ quality: number;
18
+ exifStripped: boolean;
19
+ createdAt: Date;
20
+ updatedAt: Date;
21
+ }
22
+ export interface File {
23
+ id: string;
24
+ projectId: string;
25
+ userId: string | null;
26
+ entityId: string | null;
27
+ commentId: string | null;
28
+ spaceId: string | null;
29
+ type: "image" | "video" | "document" | "other";
30
+ originalPath: string;
31
+ originalSize: number;
32
+ originalMimeType: string;
33
+ position: number;
34
+ metadata: Record<string, any>;
35
+ image?: FileImage;
36
+ createdAt: Date;
37
+ updatedAt: Date;
38
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=File.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"File.js","sourceRoot":"","sources":["../../../../src/interfaces/models/File.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  import { PaginatedResponse, PaginationMetadata } from "../IPaginatedResponse";
2
+ import { File } from "./File";
2
3
  export type ReadingPermission = "anyone" | "members";
3
4
  export type PostingPermission = "anyone" | "members" | "admins";
4
5
  export type SpaceMemberRole = "admin" | "moderator" | "member";
@@ -18,10 +19,11 @@ export interface SpacePreview {
18
19
  shortId: string;
19
20
  name: string;
20
21
  slug: string | null;
21
- avatar: string | null;
22
+ avatarFileId: string | null;
22
23
  readingPermission?: ReadingPermission;
23
24
  parentSpaceId?: string | null;
24
25
  depth?: number;
26
+ avatarFile?: File;
25
27
  }
26
28
  export interface Space {
27
29
  id: string;
@@ -30,8 +32,8 @@ export interface Space {
30
32
  slug: string | null;
31
33
  name: string;
32
34
  description: string | null;
33
- avatar: string | null;
34
- banner: string | null;
35
+ avatarFileId: string | null;
36
+ bannerFileId: string | null;
35
37
  userId: string;
36
38
  readingPermission: ReadingPermission;
37
39
  postingPermission: PostingPermission;
@@ -45,6 +47,8 @@ export interface Space {
45
47
  membersCount: number;
46
48
  childSpacesCount: number;
47
49
  isMember?: boolean;
50
+ avatarFile?: File;
51
+ bannerFile?: File;
48
52
  }
49
53
  export interface SpaceDetailed extends Space {
50
54
  memberPermissions: SpaceMemberPermissions | null;