@purpleschool/gptbot 0.3.5 → 0.3.7

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.
@@ -3,4 +3,5 @@ export const USER_CONTROLLER = 'users' as const;
3
3
  export const USER_ROUTES = {
4
4
  GET: 'me',
5
5
  POST: 'up-balance',
6
+ CHECK_EMAIL: 'check-email',
6
7
  } as const;
package/api/routes.ts CHANGED
@@ -14,6 +14,7 @@ export const REST_API = {
14
14
  USERS: {
15
15
  GET: `${ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.GET}`,
16
16
  POST: `${ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.POST}`,
17
+ CHECK_EMAIL: `${ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.CHECK_EMAIL}`,
17
18
  },
18
19
  PAGE: {
19
20
  GET: `${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.GET_ALL}`,
@@ -5,4 +5,5 @@ exports.USER_CONTROLLER = 'users';
5
5
  exports.USER_ROUTES = {
6
6
  GET: 'me',
7
7
  POST: 'up-balance',
8
+ CHECK_EMAIL: 'check-email',
8
9
  };
@@ -38,6 +38,7 @@ exports.REST_API = {
38
38
  USERS: {
39
39
  GET: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.GET}`,
40
40
  POST: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.POST}`,
41
+ CHECK_EMAIL: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.CHECK_EMAIL}`,
41
42
  },
42
43
  PAGE: {
43
44
  GET: `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.GET_ALL}`,
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CheckEmailCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var CheckEmailCommand;
6
+ (function (CheckEmailCommand) {
7
+ CheckEmailCommand.RequestSchema = zod_1.z.object({
8
+ email: zod_1.z.string().email(),
9
+ });
10
+ })(CheckEmailCommand || (exports.CheckEmailCommand = CheckEmailCommand = {}));
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./find-user.command"), exports);
18
18
  __exportStar(require("./up-token-bonus-balance.command"), exports);
19
+ __exportStar(require("./check-email.command"), exports);
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmailEndpoint = void 0;
4
+ exports.EmailEndpoint = 'https://api.beta.rusender.ru/api/v1/external-mails/send';
@@ -11,4 +11,6 @@ export namespace FindPostByUUIDCommand {
11
11
  export const ResponseByUUIDSchema = z.object({
12
12
  data: PostSchema,
13
13
  });
14
+
15
+ export type Response = z.infer<typeof ResponseByUUIDSchema>;
14
16
  }
@@ -8,10 +8,9 @@ export namespace CreateChatCommand {
8
8
 
9
9
  export type RequestByParam = z.infer<typeof RequestSchemaByParam>;
10
10
 
11
-
12
11
  export const RequestSchema = z.object({
13
12
  aiModelUUID: z.string(),
14
- })
13
+ });
15
14
  export const ResponseSchema = z.object({
16
15
  data: ChatSchema.extend({
17
16
  messages: z.array(MessageSchema),
@@ -8,7 +8,7 @@ export namespace BuySubscriptionCommand {
8
8
 
9
9
  export const RequestSchema = z.object({
10
10
  useDiscount: z.boolean(),
11
- })
11
+ });
12
12
 
13
13
  export type Request = z.infer<typeof RequestSchema>;
14
14
  export const RequestFastSchema = z.object({
@@ -67,5 +67,4 @@ export namespace BuySubscriptionCommand {
67
67
  });
68
68
 
69
69
  export type ResponseFast = z.infer<typeof ResponseFastSchema>;
70
-
71
70
  }
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace CheckEmailCommand {
4
+ export const RequestSchema = z.object({
5
+ email: z.string().email(),
6
+ });
7
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './find-user.command';
2
2
  export * from './up-token-bonus-balance.command';
3
+ export * from './check-email.command';
@@ -0,0 +1 @@
1
+ export const EmailEndpoint = 'https://api.beta.rusender.ru/api/v1/external-mails/send';
@@ -229,9 +229,9 @@ export const ERRORS = {
229
229
  httpCode: 404,
230
230
  },
231
231
  SUBSCRIPTION_BUY_ERROR: {
232
- code: 'A097',
233
- message: 'Подписка не была куплена',
234
- httpCode: 500,
232
+ code: 'A097',
233
+ message: 'Подписка не была куплена',
234
+ httpCode: 500,
235
235
  },
236
236
  SUBSCRIPTION_UPDATE_ERROR: {
237
237
  code: 'A055',
@@ -1 +1 @@
1
- export const USER_PUBLIC = 'public'
1
+ export const USER_PUBLIC = 'public';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {