@purpleschool/gptbot 0.5.18 → 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.
- package/build/api/routes.js +17 -7
- package/build/commands/chat/get-my-last-active-chat-command.v2.js +2 -2
- package/build/constants/errors/errors.js +5 -0
- package/build/constants/subscription/enums/index.js +1 -0
- package/build/constants/subscription/enums/user-to-subscription-marks.enum.js +7 -0
- package/build/models/user-to-subscription.schema.js +1 -0
- package/commands/chat/get-my-last-active-chat-command.v2.ts +5 -8
- package/constants/errors/errors.ts +5 -0
- package/constants/subscription/enums/index.ts +1 -0
- package/constants/subscription/enums/user-to-subscription-marks.enum.ts +3 -0
- package/models/user-to-subscription.schema.ts +1 -0
- package/package.json +1 -1
package/build/api/routes.js
CHANGED
|
@@ -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 (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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"));
|
|
@@ -5,10 +5,10 @@ const models_1 = require("../../models");
|
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
var GetLastActiveChatV2Command;
|
|
7
7
|
(function (GetLastActiveChatV2Command) {
|
|
8
|
-
GetLastActiveChatV2Command.RequestQuerySchema =
|
|
8
|
+
GetLastActiveChatV2Command.RequestQuerySchema = models_1.ChatSchema.pick({
|
|
9
9
|
categoryId: true,
|
|
10
10
|
aIModelId: true,
|
|
11
|
-
})
|
|
11
|
+
});
|
|
12
12
|
GetLastActiveChatV2Command.Response = zod_1.z.object({
|
|
13
13
|
data: models_1.ChatSchema.extend({
|
|
14
14
|
messages: zod_1.z.array(models_1.MessageSchema),
|
|
@@ -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(),
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChatSchema, MessageSchema } from '../../models';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
export namespace GetLastActiveChatV2Command {
|
|
5
|
-
export const RequestQuerySchema =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}).partial(),
|
|
10
|
-
AiModelSchema.pick({ contentType: true }).partial(),
|
|
11
|
-
);
|
|
5
|
+
export const RequestQuerySchema = ChatSchema.pick({
|
|
6
|
+
categoryId: true,
|
|
7
|
+
aIModelId: true,
|
|
8
|
+
});
|
|
12
9
|
|
|
13
10
|
export const Response = z.object({
|
|
14
11
|
data: ChatSchema.extend({
|