@purpleschool/gptbot 0.5.19 → 0.5.20

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.
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.REST_API = exports.ROOT = void 0;
27
37
  const CONTROLLERS = __importStar(require("./controllers"));
@@ -620,4 +620,9 @@ exports.ERRORS = {
620
620
  message: 'Курс не найден',
621
621
  httpCode: 404,
622
622
  },
623
+ SUBSCRIPTION_NO_AUTO_RENEWAL: {
624
+ code: 'A138',
625
+ message: 'Подписка не поддерживает автопродление',
626
+ httpCode: 400,
627
+ },
623
628
  };
@@ -19,3 +19,4 @@ __exportStar(require("./subscription-plan.enum"), exports);
19
19
  __exportStar(require("./subscription-status.enum"), exports);
20
20
  __exportStar(require("./subscription-type.enum"), exports);
21
21
  __exportStar(require("./user-to-subscription-type.enum"), exports);
22
+ __exportStar(require("./user-to-subscription-marks.enum"), exports);
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USER_TO_SUBSCRIPTION_MARKS = void 0;
4
+ var USER_TO_SUBSCRIPTION_MARKS;
5
+ (function (USER_TO_SUBSCRIPTION_MARKS) {
6
+ USER_TO_SUBSCRIPTION_MARKS["WITHOUT_AUTO_RENEWAL"] = "WITHOUT_AUTO_RENEWAL";
7
+ })(USER_TO_SUBSCRIPTION_MARKS || (exports.USER_TO_SUBSCRIPTION_MARKS = USER_TO_SUBSCRIPTION_MARKS = {}));
@@ -12,6 +12,7 @@ exports.UserToSubscriptionSchema = zod_1.z.object({
12
12
  tokenBalance: zod_1.z.number(),
13
13
  status: zod_1.z.string(),
14
14
  endDate: zod_1.z.date().nullable(),
15
+ marks: zod_1.z.array(zod_1.z.string()),
15
16
  intervalEndDate: zod_1.z.date().nullable(),
16
17
  createdAt: zod_1.z.date(),
17
18
  updatedAt: zod_1.z.date(),
@@ -620,4 +620,9 @@ export const ERRORS = {
620
620
  message: 'Курс не найден',
621
621
  httpCode: 404,
622
622
  },
623
+ SUBSCRIPTION_NO_AUTO_RENEWAL: {
624
+ code: 'A138',
625
+ message: 'Подписка не поддерживает автопродление',
626
+ httpCode: 400,
627
+ },
623
628
  };
@@ -3,3 +3,4 @@ export * from './subscription-plan.enum';
3
3
  export * from './subscription-status.enum';
4
4
  export * from './subscription-type.enum';
5
5
  export * from './user-to-subscription-type.enum';
6
+ export * from './user-to-subscription-marks.enum';
@@ -0,0 +1,3 @@
1
+ export enum USER_TO_SUBSCRIPTION_MARKS {
2
+ WITHOUT_AUTO_RENEWAL = 'WITHOUT_AUTO_RENEWAL',
3
+ }
@@ -10,6 +10,7 @@ export const UserToSubscriptionSchema = z.object({
10
10
  tokenBalance: z.number(),
11
11
  status: z.string(),
12
12
  endDate: z.date().nullable(),
13
+ marks: z.array(z.string()),
13
14
  intervalEndDate: z.date().nullable(),
14
15
  createdAt: z.date(),
15
16
  updatedAt: z.date(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.5.19",
3
+ "version": "0.5.20",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {