@common_ch/common 1.0.279 → 1.0.281
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AiOptionNamesEnum } from "../../../enums/ai";
|
|
1
2
|
import { ToolsChatgpt, TypePayEnum } from "../../../enums/plan";
|
|
2
3
|
import { AiDoc } from "../../../models/app/ai";
|
|
3
4
|
import { Subjects } from "../../subjects";
|
|
@@ -20,6 +21,7 @@ export interface PlanCreateEvent {
|
|
|
20
21
|
tools: {
|
|
21
22
|
chatgpt?: ToolsChatgpt[];
|
|
22
23
|
};
|
|
24
|
+
models: AiOptionNamesEnum[];
|
|
23
25
|
userOwn?: string;
|
|
24
26
|
};
|
|
25
27
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AiOptionNamesEnum } from "../../../enums/ai";
|
|
1
2
|
import { ToolsChatgpt, TypePayEnum } from "../../../enums/plan";
|
|
2
3
|
import { AiDoc } from "../../../models/app/ai";
|
|
3
4
|
import { Subjects } from "../../subjects";
|
|
@@ -20,6 +21,7 @@ export interface PlanUpdateEvent {
|
|
|
20
21
|
tools: {
|
|
21
22
|
chatgpt?: ToolsChatgpt[];
|
|
22
23
|
};
|
|
24
|
+
models: AiOptionNamesEnum[];
|
|
23
25
|
typePay: TypePayEnum;
|
|
24
26
|
};
|
|
25
27
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import mongoose from 'mongoose';
|
|
2
2
|
import { AiDoc } from './ai';
|
|
3
3
|
import { PlanTypeEnum } from '../../events/types_/plan';
|
|
4
|
-
import { PlanStatusEnum, TypePayEnum } from '../../enums/plan';
|
|
4
|
+
import { PlanStatusEnum, ToolsChatgpt, TypePayEnum } from '../../enums/plan';
|
|
5
|
+
import { AiOptionNamesEnum } from '../../enums/ai';
|
|
5
6
|
export interface PlanAttrs {
|
|
6
7
|
_id?: string;
|
|
7
8
|
price: string;
|
|
@@ -10,6 +11,10 @@ export interface PlanAttrs {
|
|
|
10
11
|
limitOfRequest: number;
|
|
11
12
|
limitUploadFiles: number;
|
|
12
13
|
ais: AiDoc[];
|
|
14
|
+
tools: {
|
|
15
|
+
chatgpt: ToolsChatgpt[];
|
|
16
|
+
};
|
|
17
|
+
models: AiOptionNamesEnum[];
|
|
13
18
|
description?: string;
|
|
14
19
|
descriptionArray?: string[];
|
|
15
20
|
status?: PlanStatusEnum;
|
|
@@ -29,6 +34,10 @@ export interface PlanDoc extends mongoose.Document {
|
|
|
29
34
|
type: PlanTypeEnum;
|
|
30
35
|
limitOfRequest: number;
|
|
31
36
|
limitUploadFiles: number;
|
|
37
|
+
tools: {
|
|
38
|
+
chatgpt: ToolsChatgpt[];
|
|
39
|
+
};
|
|
40
|
+
models: AiOptionNamesEnum[];
|
|
32
41
|
ais: string[] | AiDoc[];
|
|
33
42
|
description?: string;
|
|
34
43
|
descriptionArray?: string[];
|
package/build/models/app/plan.js
CHANGED
|
@@ -8,6 +8,7 @@ const mongoose_1 = __importDefault(require("mongoose"));
|
|
|
8
8
|
const mongoose_update_if_current_1 = require("mongoose-update-if-current");
|
|
9
9
|
const plan_1 = require("../../events/types_/plan");
|
|
10
10
|
const plan_2 = require("../../enums/plan");
|
|
11
|
+
const ai_1 = require("../../enums/ai");
|
|
11
12
|
const planSchema = new mongoose_1.default.Schema({
|
|
12
13
|
price: {
|
|
13
14
|
type: String,
|
|
@@ -21,6 +22,22 @@ const planSchema = new mongoose_1.default.Schema({
|
|
|
21
22
|
type: Number,
|
|
22
23
|
required: true,
|
|
23
24
|
},
|
|
25
|
+
tools: {
|
|
26
|
+
chatgpt: [
|
|
27
|
+
{
|
|
28
|
+
type: String,
|
|
29
|
+
required: false,
|
|
30
|
+
enum: plan_2.ToolsChatgpt,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
models: [
|
|
35
|
+
{
|
|
36
|
+
type: String,
|
|
37
|
+
enum: ai_1.AiOptionNamesEnum,
|
|
38
|
+
required: true,
|
|
39
|
+
}
|
|
40
|
+
],
|
|
24
41
|
limitUploadFiles: {
|
|
25
42
|
type: Number,
|
|
26
43
|
required: true,
|