gemcap-be-common 1.5.106 → 1.5.107
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 +6 -0
- package/models/AiJob.model.js +11 -0
- package/models/AiJob.model.ts +21 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/models/AiJob.model.d.ts
CHANGED
|
@@ -28,11 +28,17 @@
|
|
|
28
28
|
/// <reference types="mongoose/types/virtuals" />
|
|
29
29
|
/// <reference types="mongoose/types/inferschematype" />
|
|
30
30
|
import mongoose from 'mongoose';
|
|
31
|
+
import { MODEL_NAMES } from './_models';
|
|
31
32
|
import { TTaskStatus } from '../interfaces/task.interface';
|
|
32
33
|
export interface IAIJob {
|
|
33
34
|
taskId: string;
|
|
34
35
|
userId: string;
|
|
35
36
|
status: TTaskStatus;
|
|
37
|
+
target: {
|
|
38
|
+
type: keyof typeof MODEL_NAMES;
|
|
39
|
+
id: string;
|
|
40
|
+
};
|
|
41
|
+
context: unknown;
|
|
36
42
|
inputFiles?: Array<{
|
|
37
43
|
fileId: string;
|
|
38
44
|
aiFileId: string;
|
package/models/AiJob.model.js
CHANGED
|
@@ -19,6 +19,17 @@ exports.AIJobSchema = new mongoose_1.default.Schema({
|
|
|
19
19
|
type: String,
|
|
20
20
|
required: true,
|
|
21
21
|
},
|
|
22
|
+
target: {
|
|
23
|
+
type: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
id: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
context: mongoose_1.default.Schema.Types.Mixed,
|
|
22
33
|
inputFiles: [{
|
|
23
34
|
fileId: {
|
|
24
35
|
type: String,
|
package/models/AiJob.model.ts
CHANGED
|
@@ -9,6 +9,13 @@ export interface IAIJob {
|
|
|
9
9
|
|
|
10
10
|
status: TTaskStatus;
|
|
11
11
|
|
|
12
|
+
target: {
|
|
13
|
+
type: keyof typeof MODEL_NAMES;
|
|
14
|
+
id: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
context: unknown;
|
|
18
|
+
|
|
12
19
|
inputFiles?: Array<{
|
|
13
20
|
fileId: string;
|
|
14
21
|
aiFileId: string;
|
|
@@ -66,6 +73,20 @@ export const AIJobSchema = new mongoose.Schema<IAIJob, TAIJobModel>(
|
|
|
66
73
|
type: String,
|
|
67
74
|
required: true,
|
|
68
75
|
},
|
|
76
|
+
|
|
77
|
+
target: {
|
|
78
|
+
type: {
|
|
79
|
+
type: String,
|
|
80
|
+
required: true,
|
|
81
|
+
},
|
|
82
|
+
id: {
|
|
83
|
+
type: String,
|
|
84
|
+
required: true,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
context: mongoose.Schema.Types.Mixed,
|
|
89
|
+
|
|
69
90
|
inputFiles: [{
|
|
70
91
|
fileId: {
|
|
71
92
|
type: String,
|