@uniteverses/shared 1.0.9 → 1.0.11

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.
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from "./politicians/community/residents/explore/types";
2
+ export * from "./politicians/community/residents/explore/constants";
package/dist/index.js CHANGED
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./politicians/community/residents/explore/types"), exports);
18
+ __exportStar(require("./politicians/community/residents/explore/constants"), exports);
@@ -0,0 +1,6 @@
1
+ export declare const POSTS_PAGE_SIZE = 20;
2
+ export declare const FOOD_GROUP_NESTING_DEPTH = 3;
3
+ export declare const TOPIC_NESTING_DEPTH = 3;
4
+ export declare const COMMENT_MAX_REPLY_DEPTH = 2;
5
+ export declare const COMMENT_INDENT_PX = 16;
6
+ export declare const COMMENT_MAX_INDENT_PX = 48;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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
+ // Pagination
5
+ exports.POSTS_PAGE_SIZE = 20;
6
+ // Food group recursive query depth
7
+ exports.FOOD_GROUP_NESTING_DEPTH = 3;
8
+ // Topic nesting depth
9
+ exports.TOPIC_NESTING_DEPTH = 3;
10
+ // Comment reply nesting
11
+ exports.COMMENT_MAX_REPLY_DEPTH = 2;
12
+ exports.COMMENT_INDENT_PX = 16;
13
+ exports.COMMENT_MAX_INDENT_PX = 48;
@@ -95,6 +95,27 @@ 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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniteverses/shared",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [