@uniteverses/shared 1.0.10 → 1.0.12
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const POSTS_PAGE_SIZE = 20;
|
|
2
2
|
export declare const FOOD_GROUP_NESTING_DEPTH = 3;
|
|
3
|
+
export declare const TOPIC_NESTING_DEPTH = 3;
|
|
3
4
|
export declare const COMMENT_MAX_REPLY_DEPTH = 2;
|
|
4
5
|
export declare const COMMENT_INDENT_PX = 16;
|
|
5
6
|
export declare const COMMENT_MAX_INDENT_PX = 48;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.COMMENT_MAX_INDENT_PX = exports.COMMENT_INDENT_PX = exports.COMMENT_MAX_REPLY_DEPTH = exports.FOOD_GROUP_NESTING_DEPTH = exports.POSTS_PAGE_SIZE = void 0;
|
|
3
|
+
exports.COMMENT_MAX_INDENT_PX = exports.COMMENT_INDENT_PX = exports.COMMENT_MAX_REPLY_DEPTH = exports.TOPIC_NESTING_DEPTH = exports.FOOD_GROUP_NESTING_DEPTH = exports.POSTS_PAGE_SIZE = void 0;
|
|
4
4
|
// Pagination
|
|
5
5
|
exports.POSTS_PAGE_SIZE = 20;
|
|
6
6
|
// Food group recursive query depth
|
|
7
7
|
exports.FOOD_GROUP_NESTING_DEPTH = 3;
|
|
8
|
+
// Topic nesting depth
|
|
9
|
+
exports.TOPIC_NESTING_DEPTH = 3;
|
|
8
10
|
// Comment reply nesting
|
|
9
11
|
exports.COMMENT_MAX_REPLY_DEPTH = 2;
|
|
10
12
|
exports.COMMENT_INDENT_PX = 16;
|
|
@@ -95,9 +95,31 @@ export interface UpdateOrganizationInput {
|
|
|
95
95
|
addresses?: Omit<OrganizationAddress, "id" | "organizationId" | "createdAt">[];
|
|
96
96
|
phones?: Omit<OrganizationPhone, "id" | "organizationId" | "createdAt">[];
|
|
97
97
|
}
|
|
98
|
+
export interface Topic {
|
|
99
|
+
id: string;
|
|
100
|
+
name: string;
|
|
101
|
+
parentTopicId: string | null;
|
|
102
|
+
createdAt: string | Date;
|
|
103
|
+
_count?: {
|
|
104
|
+
childTopics: number;
|
|
105
|
+
posts: number;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export interface TopicWithChildren {
|
|
109
|
+
id: string;
|
|
110
|
+
name: string;
|
|
111
|
+
parentTopicId: string | null;
|
|
112
|
+
createdAt: string | Date;
|
|
113
|
+
childTopics: TopicWithChildren[];
|
|
114
|
+
_count?: {
|
|
115
|
+
childTopics: number;
|
|
116
|
+
posts: number;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
98
119
|
export interface CreatePostInput {
|
|
99
120
|
title: string;
|
|
100
121
|
body: string;
|
|
122
|
+
topicId?: string;
|
|
101
123
|
}
|
|
102
124
|
export interface UpdatePostInput {
|
|
103
125
|
title: string;
|
|
@@ -114,9 +136,11 @@ export interface PostVersion {
|
|
|
114
136
|
export interface Post {
|
|
115
137
|
id: string;
|
|
116
138
|
userId: string;
|
|
139
|
+
topicId: string | null;
|
|
117
140
|
createdAt: string | Date;
|
|
118
141
|
deletedAt: string | Date | null;
|
|
119
142
|
user: User;
|
|
143
|
+
topic?: Topic | null;
|
|
120
144
|
versions: PostVersion[];
|
|
121
145
|
comments?: Comment[];
|
|
122
146
|
_count?: {
|