gemcap-be-common 1.5.113 → 1.5.115
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 +2 -8
- package/models/AiJob.model.js +9 -0
- package/models/AiJob.model.ts +12 -8
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/models/AiJob.model.d.ts
CHANGED
|
@@ -33,16 +33,13 @@ import { TTaskStatus } from '../interfaces/task.interface';
|
|
|
33
33
|
export interface IAIJobInputFile {
|
|
34
34
|
storageFileId: string;
|
|
35
35
|
aiStorageFileId: string;
|
|
36
|
+
createdAt: Date;
|
|
36
37
|
}
|
|
37
38
|
export interface IAIJobInputFileLean extends IAIJobInputFile {
|
|
38
39
|
_id: mongoose.Types.ObjectId;
|
|
39
|
-
createdAt: Date;
|
|
40
|
-
updatedAt: Date;
|
|
41
40
|
}
|
|
42
41
|
export interface IAIJobInputFilePlain extends IAIJobInputFile {
|
|
43
42
|
_id: string;
|
|
44
|
-
createdAt: Date;
|
|
45
|
-
updatedAt: Date;
|
|
46
43
|
}
|
|
47
44
|
export interface IAIJobResultFile {
|
|
48
45
|
storageFileId: string;
|
|
@@ -50,16 +47,13 @@ export interface IAIJobResultFile {
|
|
|
50
47
|
filename: string;
|
|
51
48
|
mimeType?: string;
|
|
52
49
|
size?: number;
|
|
50
|
+
createdAt: Date;
|
|
53
51
|
}
|
|
54
52
|
export interface IAIJobResultFileLean extends IAIJobResultFile {
|
|
55
53
|
_id: mongoose.Types.ObjectId;
|
|
56
|
-
createdAt: Date;
|
|
57
|
-
updatedAt: Date;
|
|
58
54
|
}
|
|
59
55
|
export interface IAIJobResultFilePlain extends IAIJobResultFile {
|
|
60
56
|
_id: string;
|
|
61
|
-
createdAt: Date;
|
|
62
|
-
updatedAt: Date;
|
|
63
57
|
}
|
|
64
58
|
export interface IAIJobTarget {
|
|
65
59
|
type: TModelName;
|
package/models/AiJob.model.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.AIJob = exports.AIJobSchema = void 0;
|
|
7
7
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
8
|
const _models_1 = require("./_models");
|
|
9
|
+
const AI_JOBS_FOLDER = 'AI_jobs';
|
|
9
10
|
exports.AIJobSchema = new mongoose_1.default.Schema({
|
|
10
11
|
taskId: {
|
|
11
12
|
type: String,
|
|
@@ -39,6 +40,10 @@ exports.AIJobSchema = new mongoose_1.default.Schema({
|
|
|
39
40
|
type: String,
|
|
40
41
|
required: true,
|
|
41
42
|
},
|
|
43
|
+
createdAt: {
|
|
44
|
+
type: Date,
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
42
47
|
}],
|
|
43
48
|
resultFiles: [{
|
|
44
49
|
storageFileId: {
|
|
@@ -61,6 +66,10 @@ exports.AIJobSchema = new mongoose_1.default.Schema({
|
|
|
61
66
|
type: Number,
|
|
62
67
|
required: true,
|
|
63
68
|
},
|
|
69
|
+
createdAt: {
|
|
70
|
+
type: Date,
|
|
71
|
+
required: true,
|
|
72
|
+
},
|
|
64
73
|
}],
|
|
65
74
|
userPrompt: {
|
|
66
75
|
type: String,
|
package/models/AiJob.model.ts
CHANGED
|
@@ -3,21 +3,20 @@ import mongoose from 'mongoose';
|
|
|
3
3
|
import { MODEL_NAMES, TModelName } from './_models';
|
|
4
4
|
import { TTaskStatus } from '../interfaces/task.interface';
|
|
5
5
|
|
|
6
|
+
const AI_JOBS_FOLDER = 'AI_jobs';
|
|
7
|
+
|
|
6
8
|
export interface IAIJobInputFile {
|
|
7
9
|
storageFileId: string;
|
|
8
10
|
aiStorageFileId: string;
|
|
11
|
+
createdAt: Date;
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
export interface IAIJobInputFileLean extends IAIJobInputFile {
|
|
12
15
|
_id: mongoose.Types.ObjectId;
|
|
13
|
-
createdAt: Date;
|
|
14
|
-
updatedAt: Date;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export interface IAIJobInputFilePlain extends IAIJobInputFile {
|
|
18
19
|
_id: string;
|
|
19
|
-
createdAt: Date;
|
|
20
|
-
updatedAt: Date;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
export interface IAIJobResultFile {
|
|
@@ -26,18 +25,15 @@ export interface IAIJobResultFile {
|
|
|
26
25
|
filename: string;
|
|
27
26
|
mimeType?: string;
|
|
28
27
|
size?: number;
|
|
28
|
+
createdAt: Date;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export interface IAIJobResultFileLean extends IAIJobResultFile {
|
|
32
32
|
_id: mongoose.Types.ObjectId;
|
|
33
|
-
createdAt: Date;
|
|
34
|
-
updatedAt: Date;
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
export interface IAIJobResultFilePlain extends IAIJobResultFile {
|
|
38
36
|
_id: string;
|
|
39
|
-
createdAt: Date;
|
|
40
|
-
updatedAt: Date;
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
export interface IAIJobTarget {
|
|
@@ -130,6 +126,10 @@ export const AIJobSchema = new mongoose.Schema<IAIJob, TAIJobModel>(
|
|
|
130
126
|
type: String,
|
|
131
127
|
required: true,
|
|
132
128
|
},
|
|
129
|
+
createdAt: {
|
|
130
|
+
type: Date,
|
|
131
|
+
required: true,
|
|
132
|
+
},
|
|
133
133
|
}],
|
|
134
134
|
|
|
135
135
|
resultFiles: [{
|
|
@@ -153,6 +153,10 @@ export const AIJobSchema = new mongoose.Schema<IAIJob, TAIJobModel>(
|
|
|
153
153
|
type: Number,
|
|
154
154
|
required: true,
|
|
155
155
|
},
|
|
156
|
+
createdAt: {
|
|
157
|
+
type: Date,
|
|
158
|
+
required: true,
|
|
159
|
+
},
|
|
156
160
|
}],
|
|
157
161
|
|
|
158
162
|
userPrompt: {
|