@purpleschool/gptbot 0.8.75 → 0.8.76
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/api/controllers/http/community.ts +1 -1
- package/api/routes.ts +2 -1
- package/build/api/controllers/http/community.js +1 -1
- package/build/api/routes.js +1 -1
- package/build/commands/community/get-count-of-likes-on-user-posts.command.js +13 -0
- package/build/commands/community/index.js +1 -1
- package/commands/community/get-count-of-likes-on-user-posts.command.ts +14 -0
- package/commands/community/index.ts +1 -1
- package/package.json +1 -1
- package/build/commands/community/get-count-of-likes-on-my-posts.command.js +0 -10
- package/commands/community/get-count-of-likes-on-my-posts.command.ts +0 -9
|
@@ -16,7 +16,7 @@ export const COMMUNITY_ROUTES_PRIVATE = {
|
|
|
16
16
|
FAVORITE: (uuid: string) => `${uuid}/favorite`,
|
|
17
17
|
|
|
18
18
|
REPORT: (uuid: string) => `report/${uuid}`,
|
|
19
|
-
LIKES_COUNT:
|
|
19
|
+
LIKES_COUNT: (userId: string) => `${userId}/likes/count`,
|
|
20
20
|
} as const;
|
|
21
21
|
|
|
22
22
|
export const COMMUNITY_ROUTES_PUBLIC = {
|
package/api/routes.ts
CHANGED
|
@@ -883,7 +883,8 @@ export const REST_API = {
|
|
|
883
883
|
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.FAVORITE(uuid)}`,
|
|
884
884
|
REPORT: (uuid: string) =>
|
|
885
885
|
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.REPORT(uuid)}`,
|
|
886
|
-
LIKES_COUNT:
|
|
886
|
+
LIKES_COUNT: (userId: string) =>
|
|
887
|
+
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKES_COUNT(userId)}`,
|
|
887
888
|
},
|
|
888
889
|
COMMUNITY_PUBLIC: {
|
|
889
890
|
GET_ALL: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_ALL}`,
|
|
@@ -17,7 +17,7 @@ exports.COMMUNITY_ROUTES_PRIVATE = {
|
|
|
17
17
|
LIKE: (uuid) => `${uuid}/like`,
|
|
18
18
|
FAVORITE: (uuid) => `${uuid}/favorite`,
|
|
19
19
|
REPORT: (uuid) => `report/${uuid}`,
|
|
20
|
-
LIKES_COUNT:
|
|
20
|
+
LIKES_COUNT: (userId) => `${userId}/likes/count`,
|
|
21
21
|
};
|
|
22
22
|
exports.COMMUNITY_ROUTES_PUBLIC = {
|
|
23
23
|
GET_ALL: '',
|
package/build/api/routes.js
CHANGED
|
@@ -680,7 +680,7 @@ exports.REST_API = {
|
|
|
680
680
|
LIKE: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKE(uuid)}`,
|
|
681
681
|
FAVORITE: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.FAVORITE(uuid)}`,
|
|
682
682
|
REPORT: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.REPORT(uuid)}`,
|
|
683
|
-
LIKES_COUNT: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKES_COUNT}`,
|
|
683
|
+
LIKES_COUNT: (userId) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKES_COUNT(userId)}`,
|
|
684
684
|
},
|
|
685
685
|
COMMUNITY_PUBLIC: {
|
|
686
686
|
GET_ALL: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_ALL}`,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetCountOfLikesOnUserPostsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var GetCountOfLikesOnUserPostsCommand;
|
|
6
|
+
(function (GetCountOfLikesOnUserPostsCommand) {
|
|
7
|
+
GetCountOfLikesOnUserPostsCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
userId: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
GetCountOfLikesOnUserPostsCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.number(),
|
|
12
|
+
});
|
|
13
|
+
})(GetCountOfLikesOnUserPostsCommand || (exports.GetCountOfLikesOnUserPostsCommand = GetCountOfLikesOnUserPostsCommand = {}));
|
|
@@ -26,4 +26,4 @@ __exportStar(require("./share-my-community-post.command"), exports);
|
|
|
26
26
|
__exportStar(require("./get-my-likes-community-posts.command"), exports);
|
|
27
27
|
__exportStar(require("./get-my-favorite-community-posts.command"), exports);
|
|
28
28
|
__exportStar(require("./send-report-to-community-post.command"), exports);
|
|
29
|
-
__exportStar(require("./get-count-of-likes-on-
|
|
29
|
+
__exportStar(require("./get-count-of-likes-on-user-posts.command"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace GetCountOfLikesOnUserPostsCommand {
|
|
4
|
+
export const RequestSchema = z.object({
|
|
5
|
+
userId: z.string().uuid(),
|
|
6
|
+
});
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = z.object({
|
|
10
|
+
data: z.number(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
14
|
+
}
|
|
@@ -10,4 +10,4 @@ export * from './share-my-community-post.command';
|
|
|
10
10
|
export * from './get-my-likes-community-posts.command';
|
|
11
11
|
export * from './get-my-favorite-community-posts.command';
|
|
12
12
|
export * from './send-report-to-community-post.command';
|
|
13
|
-
export * from './get-count-of-likes-on-
|
|
13
|
+
export * from './get-count-of-likes-on-user-posts.command';
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetCountOfLikesOnMyPostsCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
var GetCountOfLikesOnMyPostsCommand;
|
|
6
|
-
(function (GetCountOfLikesOnMyPostsCommand) {
|
|
7
|
-
GetCountOfLikesOnMyPostsCommand.ResponseSchema = zod_1.z.object({
|
|
8
|
-
data: zod_1.z.number(),
|
|
9
|
-
});
|
|
10
|
-
})(GetCountOfLikesOnMyPostsCommand || (exports.GetCountOfLikesOnMyPostsCommand = GetCountOfLikesOnMyPostsCommand = {}));
|