@purpleschool/gptbot 0.8.75 → 0.8.77

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.
@@ -16,10 +16,11 @@ export const COMMUNITY_ROUTES_PRIVATE = {
16
16
  FAVORITE: (uuid: string) => `${uuid}/favorite`,
17
17
 
18
18
  REPORT: (uuid: string) => `report/${uuid}`,
19
- LIKES_COUNT: 'my/count',
19
+ LIKES_COUNT: (userId: string) => `${userId}/likes/count`,
20
20
  } as const;
21
21
 
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
@@ -883,12 +883,15 @@ 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: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.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}`,
890
891
  GET_BY_UUID: (uuid: string) =>
891
892
  `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_BY_UUID(uuid)}`,
893
+ LIKES_COUNT: (userId: string) =>
894
+ `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.LIKES_COUNT(userId)}`,
892
895
  },
893
896
  USER_PROFILE: {
894
897
  GET_PROFILE_INFO: `${ROOT}/${CONTROLLERS.USER_PROFILE_CONTROLLER}/${CONTROLLERS.USER_PROFILE_ROUTES.GET_PROFILE_INFO}`,
@@ -17,9 +17,10 @@ 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: 'my/count',
20
+ LIKES_COUNT: (userId) => `${userId}/likes/count`,
21
21
  };
22
22
  exports.COMMUNITY_ROUTES_PUBLIC = {
23
23
  GET_ALL: '',
24
24
  GET_BY_UUID: (uuid) => `by/uuid/${uuid}`,
25
+ LIKES_COUNT: (userId) => `${userId}/likes/count`,
25
26
  };
@@ -680,11 +680,12 @@ 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}`,
687
687
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_BY_UUID(uuid)}`,
688
+ LIKES_COUNT: (userId) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.LIKES_COUNT(userId)}`,
688
689
  },
689
690
  USER_PROFILE: {
690
691
  GET_PROFILE_INFO: `${exports.ROOT}/${CONTROLLERS.USER_PROFILE_CONTROLLER}/${CONTROLLERS.USER_PROFILE_ROUTES.GET_PROFILE_INFO}`,
@@ -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-my-posts.command"), exports);
29
+ __exportStar(require("./get-count-of-likes-on-user-posts.command"), exports);
@@ -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
  },
@@ -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-my-posts.command';
13
+ export * from './get-count-of-likes-on-user-posts.command';
@@ -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.75",
3
+ "version": "0.8.77",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -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 = {}));
@@ -1,9 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- export namespace GetCountOfLikesOnMyPostsCommand {
4
- export const ResponseSchema = z.object({
5
- data: z.number(),
6
- });
7
-
8
- export type Response = z.infer<typeof ResponseSchema>;
9
- }