@purpleschool/gptbot 0.8.57 → 0.8.58

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.
@@ -2,18 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SubmitBalanceTopUpFormCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
5
6
  var SubmitBalanceTopUpFormCommand;
6
7
  (function (SubmitBalanceTopUpFormCommand) {
7
8
  SubmitBalanceTopUpFormCommand.BodySchema = zod_1.z.object({
9
+ organizationType: zod_1.z.nativeEnum(constants_1.ORGANIZATION_TYPE),
10
+ tin: zod_1.z.string().regex(/^\d{10}$|^\d{12}$/, 'ИНН должен быть длинной в 10 или 12 цифр'),
11
+ telegram: zod_1.z.string(),
8
12
  amount: zod_1.z.number().int().min(10000, {
9
13
  message: 'Minimum top-up amount is 10000',
10
14
  }),
11
- description: zod_1.z.string().optional(),
12
15
  });
13
16
  SubmitBalanceTopUpFormCommand.ResponseSchema = zod_1.z.object({
14
17
  data: zod_1.z.object({
15
- uuid: zod_1.z.string().uuid(),
16
- createdAt: zod_1.z.date(),
18
+ isSuccess: zod_1.z.boolean(),
17
19
  }),
18
20
  });
19
21
  })(SubmitBalanceTopUpFormCommand || (exports.SubmitBalanceTopUpFormCommand = SubmitBalanceTopUpFormCommand = {}));
@@ -1,17 +1,19 @@
1
1
  import { z } from 'zod';
2
+ import { ORGANIZATION_TYPE } from '../../constants';
2
3
 
3
4
  export namespace SubmitBalanceTopUpFormCommand {
4
5
  export const BodySchema = z.object({
6
+ organizationType: z.nativeEnum(ORGANIZATION_TYPE),
7
+ tin: z.string().regex(/^\d{10}$|^\d{12}$/, 'ИНН должен быть длинной в 10 или 12 цифр'),
8
+ telegram: z.string(),
5
9
  amount: z.number().int().min(10000, {
6
10
  message: 'Minimum top-up amount is 10000',
7
11
  }),
8
- description: z.string().optional(),
9
12
  });
10
13
 
11
14
  export const ResponseSchema = z.object({
12
15
  data: z.object({
13
- uuid: z.string().uuid(),
14
- createdAt: z.date(),
16
+ isSuccess: z.boolean(),
15
17
  }),
16
18
  });
17
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.8.57",
3
+ "version": "0.8.58",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",