@purpleschool/gptbot 0.5.27 → 0.5.29

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.
@@ -17,5 +17,6 @@ export * from './question';
17
17
  export * from './subscription';
18
18
  export * from './task';
19
19
  export * from './unregistered-user';
20
- export * from './user-to-task';
20
+ export * from './user-to-task-public';
21
+ export * from './user-to-task-private';
21
22
  export * from './user';
@@ -0,0 +1,7 @@
1
+ export const USER_TO_TASK_PRIVATE_CONTROLLER = 'user-to-task/private' as const;
2
+
3
+ export const USER_TO_TASK_PRIVATE_ROUTES = {
4
+ MY: 'my',
5
+ START: (uuid: string) => `${uuid}/start`,
6
+ REWARDS: 'rewards',
7
+ } as const;
@@ -0,0 +1,5 @@
1
+ export const USER_TO_TASK_PUBLIC_CONTROLLER = 'user-to-task/public' as const;
2
+
3
+ export const USER_TO_TASK_PUBLIC_ROUTES = {
4
+ REWARDS: 'rewards',
5
+ } as const;
@@ -33,5 +33,6 @@ __exportStar(require("./question"), exports);
33
33
  __exportStar(require("./subscription"), exports);
34
34
  __exportStar(require("./task"), exports);
35
35
  __exportStar(require("./unregistered-user"), exports);
36
- __exportStar(require("./user-to-task"), exports);
36
+ __exportStar(require("./user-to-task-public"), exports);
37
+ __exportStar(require("./user-to-task-private"), exports);
37
38
  __exportStar(require("./user"), exports);
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USER_TO_TASK_PRIVATE_ROUTES = exports.USER_TO_TASK_PRIVATE_CONTROLLER = void 0;
4
+ exports.USER_TO_TASK_PRIVATE_CONTROLLER = 'user-to-task/private';
5
+ exports.USER_TO_TASK_PRIVATE_ROUTES = {
6
+ MY: 'my',
7
+ START: (uuid) => `${uuid}/start`,
8
+ REWARDS: 'rewards',
9
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USER_TO_TASK_PUBLIC_ROUTES = exports.USER_TO_TASK_PUBLIC_CONTROLLER = void 0;
4
+ exports.USER_TO_TASK_PUBLIC_CONTROLLER = 'user-to-task/public';
5
+ exports.USER_TO_TASK_PUBLIC_ROUTES = {
6
+ REWARDS: 'rewards',
7
+ };
@@ -7,7 +7,6 @@ var CheckLimitV2Command;
7
7
  CheckLimitV2Command.ResponseSchema = zod_1.z.object({
8
8
  data: zod_1.z.object({
9
9
  totalTokenBalance: zod_1.z.number(),
10
- potentialTasksRewards: zod_1.z.number(),
11
10
  }),
12
11
  });
13
12
  })(CheckLimitV2Command || (exports.CheckLimitV2Command = CheckLimitV2Command = {}));
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetPotentialTasksRewardsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var GetPotentialTasksRewardsCommand;
6
+ (function (GetPotentialTasksRewardsCommand) {
7
+ GetPotentialTasksRewardsCommand.ResponseSchema = zod_1.z.object({
8
+ data: zod_1.z.object({
9
+ potentialTasksRewards: zod_1.z.number(),
10
+ registrationReward: zod_1.z.number(),
11
+ }),
12
+ });
13
+ })(GetPotentialTasksRewardsCommand || (exports.GetPotentialTasksRewardsCommand = GetPotentialTasksRewardsCommand = {}));
@@ -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("./find-all-active-tasks.command"), exports);
18
+ __exportStar(require("./get-potential-tasks-rewards.command"), exports);
@@ -715,4 +715,9 @@ exports.ERRORS = {
715
715
  message: 'Произовшла ошибка при расчете баланса пользователя',
716
716
  httpCode: 500,
717
717
  },
718
+ TASK_REQUIRES_VERIFICATION: {
719
+ code: 'A157',
720
+ message: 'Для доступа к задачам необходимо подтвердить электронную почту',
721
+ httpCode: 401,
722
+ },
718
723
  };
@@ -9,7 +9,7 @@ exports.UserTaskSchema = zod_1.z.object({
9
9
  reward: zod_1.z.number(),
10
10
  icon: zod_1.z.string(),
11
11
  type: zod_1.z.nativeEnum(constants_1.TASK_TYPE),
12
+ status: zod_1.z.nativeEnum(constants_1.USER_TO_TASK_STATUS),
12
13
  content: zod_1.z.string().nullable().optional(),
13
14
  description: zod_1.z.string().nullable(),
14
- status: zod_1.z.nativeEnum(constants_1.USER_TO_TASK_STATUS),
15
15
  });
@@ -4,7 +4,6 @@ export namespace CheckLimitV2Command {
4
4
  export const ResponseSchema = z.object({
5
5
  data: z.object({
6
6
  totalTokenBalance: z.number(),
7
- potentialTasksRewards: z.number(),
8
7
  }),
9
8
  });
10
9
  export type Response = z.infer<typeof ResponseSchema>;
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace GetPotentialTasksRewardsCommand {
4
+ export const ResponseSchema = z.object({
5
+ data: z.object({
6
+ potentialTasksRewards: z.number(),
7
+ registrationReward: z.number(),
8
+ }),
9
+ });
10
+
11
+ export type Response = z.infer<typeof ResponseSchema>;
12
+ }
@@ -1 +1,2 @@
1
1
  export * from './find-all-active-tasks.command';
2
+ export * from './get-potential-tasks-rewards.command';
@@ -715,4 +715,9 @@ export const ERRORS = {
715
715
  message: 'Произовшла ошибка при расчете баланса пользователя',
716
716
  httpCode: 500,
717
717
  },
718
+ TASK_REQUIRES_VERIFICATION: {
719
+ code: 'A157',
720
+ message: 'Для доступа к задачам необходимо подтвердить электронную почту',
721
+ httpCode: 401,
722
+ },
718
723
  };
@@ -6,7 +6,7 @@ export const UserTaskSchema = z.object({
6
6
  reward: z.number(),
7
7
  icon: z.string(),
8
8
  type: z.nativeEnum(TASK_TYPE),
9
+ status: z.nativeEnum(USER_TO_TASK_STATUS),
9
10
  content: z.string().nullable().optional(),
10
11
  description: z.string().nullable(),
11
- status: z.nativeEnum(USER_TO_TASK_STATUS),
12
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.5.27",
3
+ "version": "0.5.29",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,7 +0,0 @@
1
- export const USER_TO_TASK_CONTROLLER = 'user-to-task' as const;
2
-
3
- export const USER_TO_TASK_ROUTES = {
4
- MY: 'my',
5
- START: (uuid: string) => `${uuid}/start`,
6
- CLAIM_REWARD: (uuid: string) => `${uuid}/claim-reward`,
7
- } as const;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.USER_TO_TASK_ROUTES = exports.USER_TO_TASK_CONTROLLER = void 0;
4
- exports.USER_TO_TASK_CONTROLLER = 'user-to-task';
5
- exports.USER_TO_TASK_ROUTES = {
6
- MY: 'my',
7
- START: (uuid) => `${uuid}/start`,
8
- CLAIM_REWARD: (uuid) => `${uuid}/claim-reward`,
9
- };