@purpleschool/gptbot 0.3.8 → 0.4.0

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.
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CancelSubscriptionCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var CancelSubscriptionCommand;
6
+ (function (CancelSubscriptionCommand) {
7
+ CancelSubscriptionCommand.RequestParamSchema = zod_1.z.object({
8
+ uuidSiteUserToSubscription: zod_1.z.string(),
9
+ });
10
+ CancelSubscriptionCommand.RequestSchema = zod_1.z.object({
11
+ text: zod_1.z.string(),
12
+ });
13
+ CancelSubscriptionCommand.ResponseSchema = zod_1.z.object({
14
+ isSuccess: zod_1.z.boolean(),
15
+ });
16
+ })(CancelSubscriptionCommand || (exports.CancelSubscriptionCommand = CancelSubscriptionCommand = {}));
@@ -18,3 +18,4 @@ __exportStar(require("./update-subscription.command"), exports);
18
18
  __exportStar(require("./delete-subscription.command"), exports);
19
19
  __exportStar(require("./create-subscription.command"), exports);
20
20
  __exportStar(require("./find-subscription.command"), exports);
21
+ __exportStar(require("./cancel-subscription.command"), exports);
@@ -420,4 +420,9 @@ exports.ERRORS = {
420
420
  message: 'Не удалось подтвердить почту',
421
421
  httpCode: 500,
422
422
  },
423
+ VALIDATE_EMAIL_ERROR: {
424
+ code: 'A098',
425
+ message: 'Не удалось валидировать почту',
426
+ httpCode: 500,
427
+ },
423
428
  };
@@ -9,6 +9,7 @@ exports.AiModelSchema = zod_1.z.object({
9
9
  model: zod_1.z.string(),
10
10
  isPremium: zod_1.z.boolean(),
11
11
  tokenMultiplicator: zod_1.z.number(),
12
+ order: zod_1.z.number(),
12
13
  canUse: zod_1.z.optional(zod_1.z.boolean()),
13
14
  createdAt: zod_1.z.date(),
14
15
  updatedAt: zod_1.z.date(),
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace CancelSubscriptionCommand {
4
+ export const RequestParamSchema = z.object({
5
+ uuidSiteUserToSubscription: z.string(),
6
+ });
7
+
8
+ export type RequestParam = z.infer<typeof RequestParamSchema>;
9
+
10
+ export const RequestSchema = z.object({
11
+ text: z.string(),
12
+ });
13
+
14
+ export type Request = z.infer<typeof RequestSchema>;
15
+
16
+ export const ResponseSchema = z.object({
17
+ isSuccess: z.boolean(),
18
+ });
19
+
20
+ export type Response = z.infer<typeof ResponseSchema>;
21
+ }
@@ -2,3 +2,4 @@ export * from './update-subscription.command';
2
2
  export * from './delete-subscription.command';
3
3
  export * from './create-subscription.command';
4
4
  export * from './find-subscription.command';
5
+ export * from './cancel-subscription.command';
@@ -419,4 +419,9 @@ export const ERRORS = {
419
419
  message: 'Не удалось подтвердить почту',
420
420
  httpCode: 500,
421
421
  },
422
+ VALIDATE_EMAIL_ERROR: {
423
+ code: 'A098',
424
+ message: 'Не удалось валидировать почту',
425
+ httpCode: 500,
426
+ },
422
427
  };
@@ -7,6 +7,7 @@ export const AiModelSchema = z.object({
7
7
  model: z.string(),
8
8
  isPremium: z.boolean(),
9
9
  tokenMultiplicator: z.number(),
10
+ order: z.number(),
10
11
  canUse: z.optional(z.boolean()),
11
12
 
12
13
  createdAt: z.date(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.3.8",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {