gemcap-be-common 1.5.112 → 1.5.114
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/models/AiJob.model.d.ts +18 -0
- package/models/AiJob.model.js +8 -0
- package/models/AiJob.model.ts +30 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/models/AiJob.model.d.ts
CHANGED
|
@@ -33,6 +33,13 @@ import { TTaskStatus } from '../interfaces/task.interface';
|
|
|
33
33
|
export interface IAIJobInputFile {
|
|
34
34
|
storageFileId: string;
|
|
35
35
|
aiStorageFileId: string;
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
}
|
|
38
|
+
export interface IAIJobInputFileLean extends IAIJobInputFile {
|
|
39
|
+
_id: mongoose.Types.ObjectId;
|
|
40
|
+
}
|
|
41
|
+
export interface IAIJobInputFilePlain extends IAIJobInputFile {
|
|
42
|
+
_id: string;
|
|
36
43
|
}
|
|
37
44
|
export interface IAIJobResultFile {
|
|
38
45
|
storageFileId: string;
|
|
@@ -40,6 +47,13 @@ export interface IAIJobResultFile {
|
|
|
40
47
|
filename: string;
|
|
41
48
|
mimeType?: string;
|
|
42
49
|
size?: number;
|
|
50
|
+
createdAt: Date;
|
|
51
|
+
}
|
|
52
|
+
export interface IAIJobResultFileLean extends IAIJobResultFile {
|
|
53
|
+
_id: mongoose.Types.ObjectId;
|
|
54
|
+
}
|
|
55
|
+
export interface IAIJobResultFilePlain extends IAIJobResultFile {
|
|
56
|
+
_id: string;
|
|
43
57
|
}
|
|
44
58
|
export interface IAIJobTarget {
|
|
45
59
|
type: TModelName;
|
|
@@ -68,11 +82,15 @@ export interface IAIJobLean extends IAIJob {
|
|
|
68
82
|
_id: mongoose.Types.ObjectId;
|
|
69
83
|
createdAt: Date;
|
|
70
84
|
updatedAt: Date;
|
|
85
|
+
inputFiles: Array<IAIJobInputFileLean>;
|
|
86
|
+
resultFiles: Array<IAIJobResultFileLean>;
|
|
71
87
|
}
|
|
72
88
|
export interface IAIJobPlain extends IAIJob {
|
|
73
89
|
_id: string;
|
|
74
90
|
createdAt: Date;
|
|
75
91
|
updatedAt: Date;
|
|
92
|
+
inputFiles: Array<IAIJobInputFilePlain>;
|
|
93
|
+
resultFiles: Array<IAIJobResultFilePlain>;
|
|
76
94
|
}
|
|
77
95
|
export type TAIJobModel = mongoose.Model<IAIJob>;
|
|
78
96
|
export declare const AIJobSchema: mongoose.Schema<IAIJob, TAIJobModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IAIJob, mongoose.Document<unknown, {}, mongoose.FlatRecord<IAIJob>> & mongoose.FlatRecord<IAIJob> & {
|
package/models/AiJob.model.js
CHANGED
|
@@ -39,6 +39,10 @@ exports.AIJobSchema = new mongoose_1.default.Schema({
|
|
|
39
39
|
type: String,
|
|
40
40
|
required: true,
|
|
41
41
|
},
|
|
42
|
+
createdAt: {
|
|
43
|
+
type: Date,
|
|
44
|
+
required: true,
|
|
45
|
+
},
|
|
42
46
|
}],
|
|
43
47
|
resultFiles: [{
|
|
44
48
|
storageFileId: {
|
|
@@ -61,6 +65,10 @@ exports.AIJobSchema = new mongoose_1.default.Schema({
|
|
|
61
65
|
type: Number,
|
|
62
66
|
required: true,
|
|
63
67
|
},
|
|
68
|
+
createdAt: {
|
|
69
|
+
type: Date,
|
|
70
|
+
required: true,
|
|
71
|
+
},
|
|
64
72
|
}],
|
|
65
73
|
userPrompt: {
|
|
66
74
|
type: String,
|
package/models/AiJob.model.ts
CHANGED
|
@@ -6,6 +6,15 @@ import { TTaskStatus } from '../interfaces/task.interface';
|
|
|
6
6
|
export interface IAIJobInputFile {
|
|
7
7
|
storageFileId: string;
|
|
8
8
|
aiStorageFileId: string;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface IAIJobInputFileLean extends IAIJobInputFile {
|
|
13
|
+
_id: mongoose.Types.ObjectId;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface IAIJobInputFilePlain extends IAIJobInputFile {
|
|
17
|
+
_id: string;
|
|
9
18
|
}
|
|
10
19
|
|
|
11
20
|
export interface IAIJobResultFile {
|
|
@@ -14,6 +23,15 @@ export interface IAIJobResultFile {
|
|
|
14
23
|
filename: string;
|
|
15
24
|
mimeType?: string;
|
|
16
25
|
size?: number;
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface IAIJobResultFileLean extends IAIJobResultFile {
|
|
30
|
+
_id: mongoose.Types.ObjectId;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface IAIJobResultFilePlain extends IAIJobResultFile {
|
|
34
|
+
_id: string;
|
|
17
35
|
}
|
|
18
36
|
|
|
19
37
|
export interface IAIJobTarget {
|
|
@@ -55,12 +73,16 @@ export interface IAIJobLean extends IAIJob {
|
|
|
55
73
|
_id: mongoose.Types.ObjectId;
|
|
56
74
|
createdAt: Date;
|
|
57
75
|
updatedAt: Date;
|
|
76
|
+
inputFiles: Array<IAIJobInputFileLean>;
|
|
77
|
+
resultFiles: Array<IAIJobResultFileLean>;
|
|
58
78
|
}
|
|
59
79
|
|
|
60
80
|
export interface IAIJobPlain extends IAIJob {
|
|
61
81
|
_id: string;
|
|
62
82
|
createdAt: Date;
|
|
63
83
|
updatedAt: Date;
|
|
84
|
+
inputFiles: Array<IAIJobInputFilePlain>;
|
|
85
|
+
resultFiles: Array<IAIJobResultFilePlain>;
|
|
64
86
|
}
|
|
65
87
|
|
|
66
88
|
export type TAIJobModel = mongoose.Model<IAIJob>;
|
|
@@ -102,6 +124,10 @@ export const AIJobSchema = new mongoose.Schema<IAIJob, TAIJobModel>(
|
|
|
102
124
|
type: String,
|
|
103
125
|
required: true,
|
|
104
126
|
},
|
|
127
|
+
createdAt: {
|
|
128
|
+
type: Date,
|
|
129
|
+
required: true,
|
|
130
|
+
},
|
|
105
131
|
}],
|
|
106
132
|
|
|
107
133
|
resultFiles: [{
|
|
@@ -125,6 +151,10 @@ export const AIJobSchema = new mongoose.Schema<IAIJob, TAIJobModel>(
|
|
|
125
151
|
type: Number,
|
|
126
152
|
required: true,
|
|
127
153
|
},
|
|
154
|
+
createdAt: {
|
|
155
|
+
type: Date,
|
|
156
|
+
required: true,
|
|
157
|
+
},
|
|
128
158
|
}],
|
|
129
159
|
|
|
130
160
|
userPrompt: {
|