@purpleschool/gptbot 0.8.77 → 0.8.79
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 -0
- package/build/api/controllers/http/community.js +1 -0
- package/build/api/routes.js +1 -0
- package/build/commands/community/index.js +1 -0
- package/build/commands/community/set-reject-community-post.command.js +18 -0
- package/commands/community/index.ts +1 -0
- package/commands/community/set-reject-community-post.command.ts +19 -0
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ export const COMMUNITY_ROUTES_PRIVATE = {
|
|
|
14
14
|
ARCHIVE: (uuid: string) => `${uuid}/archive`,
|
|
15
15
|
LIKE: (uuid: string) => `${uuid}/like`,
|
|
16
16
|
FAVORITE: (uuid: string) => `${uuid}/favorite`,
|
|
17
|
-
|
|
17
|
+
REJECT: (uuid: string) => `${uuid}/reject`,
|
|
18
18
|
REPORT: (uuid: string) => `report/${uuid}`,
|
|
19
19
|
LIKES_COUNT: (userId: string) => `${userId}/likes/count`,
|
|
20
20
|
} as const;
|
package/api/routes.ts
CHANGED
|
@@ -885,6 +885,8 @@ export const REST_API = {
|
|
|
885
885
|
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.REPORT(uuid)}`,
|
|
886
886
|
LIKES_COUNT: (userId: string) =>
|
|
887
887
|
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKES_COUNT(userId)}`,
|
|
888
|
+
REJECT: (uuid: string) =>
|
|
889
|
+
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.REJECT(uuid)}`,
|
|
888
890
|
},
|
|
889
891
|
COMMUNITY_PUBLIC: {
|
|
890
892
|
GET_ALL: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_ALL}`,
|
|
@@ -16,6 +16,7 @@ exports.COMMUNITY_ROUTES_PRIVATE = {
|
|
|
16
16
|
ARCHIVE: (uuid) => `${uuid}/archive`,
|
|
17
17
|
LIKE: (uuid) => `${uuid}/like`,
|
|
18
18
|
FAVORITE: (uuid) => `${uuid}/favorite`,
|
|
19
|
+
REJECT: (uuid) => `${uuid}/reject`,
|
|
19
20
|
REPORT: (uuid) => `report/${uuid}`,
|
|
20
21
|
LIKES_COUNT: (userId) => `${userId}/likes/count`,
|
|
21
22
|
};
|
package/build/api/routes.js
CHANGED
|
@@ -681,6 +681,7 @@ exports.REST_API = {
|
|
|
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
683
|
LIKES_COUNT: (userId) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKES_COUNT(userId)}`,
|
|
684
|
+
REJECT: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.REJECT(uuid)}`,
|
|
684
685
|
},
|
|
685
686
|
COMMUNITY_PUBLIC: {
|
|
686
687
|
GET_ALL: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_ALL}`,
|
|
@@ -27,3 +27,4 @@ __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
29
|
__exportStar(require("./get-count-of-likes-on-user-posts.command"), exports);
|
|
30
|
+
__exportStar(require("./set-reject-community-post.command"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetRejectCommunityPostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
var SetRejectCommunityPostCommand;
|
|
7
|
+
(function (SetRejectCommunityPostCommand) {
|
|
8
|
+
SetRejectCommunityPostCommand.HTTP_METHOD = 'PATCH';
|
|
9
|
+
SetRejectCommunityPostCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
});
|
|
12
|
+
SetRejectCommunityPostCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
data: zod_1.z.object({
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
15
|
+
status: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_STATUS),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
})(SetRejectCommunityPostCommand || (exports.SetRejectCommunityPostCommand = SetRejectCommunityPostCommand = {}));
|
|
@@ -11,3 +11,4 @@ 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
13
|
export * from './get-count-of-likes-on-user-posts.command';
|
|
14
|
+
export * from './set-reject-community-post.command';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { COMMUNITY_POST_STATUS } from '../../constants';
|
|
3
|
+
|
|
4
|
+
export namespace SetRejectCommunityPostCommand {
|
|
5
|
+
export const HTTP_METHOD = 'PATCH' as const;
|
|
6
|
+
|
|
7
|
+
export const RequestSchema = z.object({
|
|
8
|
+
uuid: z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
11
|
+
|
|
12
|
+
export const ResponseSchema = z.object({
|
|
13
|
+
data: z.object({
|
|
14
|
+
uuid: z.string().uuid(),
|
|
15
|
+
status: z.nativeEnum(COMMUNITY_POST_STATUS),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
+
}
|