@purpleschool/gptbot 0.8.76 → 0.8.78

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.
@@ -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;
@@ -22,4 +22,5 @@ export const COMMUNITY_ROUTES_PRIVATE = {
22
22
  export const COMMUNITY_ROUTES_PUBLIC = {
23
23
  GET_ALL: '',
24
24
  GET_BY_UUID: (uuid: string) => `by/uuid/${uuid}`,
25
+ LIKES_COUNT: (userId: string) => `${userId}/likes/count`,
25
26
  } as const;
package/api/routes.ts CHANGED
@@ -885,11 +885,15 @@ 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}`,
891
893
  GET_BY_UUID: (uuid: string) =>
892
894
  `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_BY_UUID(uuid)}`,
895
+ LIKES_COUNT: (userId: string) =>
896
+ `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.LIKES_COUNT(userId)}`,
893
897
  },
894
898
  USER_PROFILE: {
895
899
  GET_PROFILE_INFO: `${ROOT}/${CONTROLLERS.USER_PROFILE_CONTROLLER}/${CONTROLLERS.USER_PROFILE_ROUTES.GET_PROFILE_INFO}`,
@@ -16,10 +16,12 @@ 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
  };
22
23
  exports.COMMUNITY_ROUTES_PUBLIC = {
23
24
  GET_ALL: '',
24
25
  GET_BY_UUID: (uuid) => `by/uuid/${uuid}`,
26
+ LIKES_COUNT: (userId) => `${userId}/likes/count`,
25
27
  };
@@ -681,10 +681,12 @@ 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}`,
687
688
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_BY_UUID(uuid)}`,
689
+ LIKES_COUNT: (userId) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.LIKES_COUNT(userId)}`,
688
690
  },
689
691
  USER_PROFILE: {
690
692
  GET_PROFILE_INFO: `${exports.ROOT}/${CONTROLLERS.USER_PROFILE_CONTROLLER}/${CONTROLLERS.USER_PROFILE_ROUTES.GET_PROFILE_INFO}`,
@@ -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 __1 = require("../..");
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(__1.COMMUNITY_POST_STATUS),
16
+ }),
17
+ });
18
+ })(SetRejectCommunityPostCommand || (exports.SetRejectCommunityPostCommand = SetRejectCommunityPostCommand = {}));
@@ -2648,7 +2648,7 @@ exports.ERRORS = {
2648
2648
  httpCode: 400,
2649
2649
  },
2650
2650
  COMMUNITY_POST_TRACK_INDEX_OUT_OF_RANGE: {
2651
- code: 'A560',
2651
+ code: 'A540',
2652
2652
  message: 'Индекс трека выходит за пределы допустимого диапазона',
2653
2653
  httpCode: 400,
2654
2654
  },
@@ -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 '../..';
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
+ }
@@ -2656,7 +2656,7 @@ export const ERRORS = {
2656
2656
  httpCode: 400,
2657
2657
  },
2658
2658
  COMMUNITY_POST_TRACK_INDEX_OUT_OF_RANGE: {
2659
- code: 'A560',
2659
+ code: 'A540',
2660
2660
  message: 'Индекс трека выходит за пределы допустимого диапазона',
2661
2661
  httpCode: 400,
2662
2662
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.8.76",
3
+ "version": "0.8.78",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",