gemcap-be-common 1.5.111 → 1.5.113

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.
@@ -34,6 +34,16 @@ export interface IAIJobInputFile {
34
34
  storageFileId: string;
35
35
  aiStorageFileId: string;
36
36
  }
37
+ export interface IAIJobInputFileLean extends IAIJobInputFile {
38
+ _id: mongoose.Types.ObjectId;
39
+ createdAt: Date;
40
+ updatedAt: Date;
41
+ }
42
+ export interface IAIJobInputFilePlain extends IAIJobInputFile {
43
+ _id: string;
44
+ createdAt: Date;
45
+ updatedAt: Date;
46
+ }
37
47
  export interface IAIJobResultFile {
38
48
  storageFileId: string;
39
49
  aiStorageFileId: string;
@@ -41,14 +51,25 @@ export interface IAIJobResultFile {
41
51
  mimeType?: string;
42
52
  size?: number;
43
53
  }
54
+ export interface IAIJobResultFileLean extends IAIJobResultFile {
55
+ _id: mongoose.Types.ObjectId;
56
+ createdAt: Date;
57
+ updatedAt: Date;
58
+ }
59
+ export interface IAIJobResultFilePlain extends IAIJobResultFile {
60
+ _id: string;
61
+ createdAt: Date;
62
+ updatedAt: Date;
63
+ }
64
+ export interface IAIJobTarget {
65
+ type: TModelName;
66
+ id: string;
67
+ }
44
68
  export interface IAIJob {
45
69
  taskId: string;
46
70
  userId: string;
47
71
  status: TTaskStatus;
48
- target: {
49
- type: TModelName;
50
- id: string;
51
- };
72
+ target: IAIJobTarget;
52
73
  context: unknown;
53
74
  inputFiles?: Array<IAIJobInputFile>;
54
75
  resultFiles?: Array<IAIJobResultFile>;
@@ -67,11 +88,15 @@ export interface IAIJobLean extends IAIJob {
67
88
  _id: mongoose.Types.ObjectId;
68
89
  createdAt: Date;
69
90
  updatedAt: Date;
91
+ inputFiles: Array<IAIJobInputFileLean>;
92
+ resultFiles: Array<IAIJobResultFileLean>;
70
93
  }
71
94
  export interface IAIJobPlain extends IAIJob {
72
95
  _id: string;
73
96
  createdAt: Date;
74
97
  updatedAt: Date;
98
+ inputFiles: Array<IAIJobInputFilePlain>;
99
+ resultFiles: Array<IAIJobResultFilePlain>;
75
100
  }
76
101
  export type TAIJobModel = mongoose.Model<IAIJob>;
77
102
  export declare const AIJobSchema: mongoose.Schema<IAIJob, TAIJobModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IAIJob, mongoose.Document<unknown, {}, mongoose.FlatRecord<IAIJob>> & mongoose.FlatRecord<IAIJob> & {
@@ -8,6 +8,18 @@ export interface IAIJobInputFile {
8
8
  aiStorageFileId: string;
9
9
  }
10
10
 
11
+ export interface IAIJobInputFileLean extends IAIJobInputFile {
12
+ _id: mongoose.Types.ObjectId;
13
+ createdAt: Date;
14
+ updatedAt: Date;
15
+ }
16
+
17
+ export interface IAIJobInputFilePlain extends IAIJobInputFile {
18
+ _id: string;
19
+ createdAt: Date;
20
+ updatedAt: Date;
21
+ }
22
+
11
23
  export interface IAIJobResultFile {
12
24
  storageFileId: string;
13
25
  aiStorageFileId: string;
@@ -16,16 +28,30 @@ export interface IAIJobResultFile {
16
28
  size?: number;
17
29
  }
18
30
 
31
+ export interface IAIJobResultFileLean extends IAIJobResultFile {
32
+ _id: mongoose.Types.ObjectId;
33
+ createdAt: Date;
34
+ updatedAt: Date;
35
+ }
36
+
37
+ export interface IAIJobResultFilePlain extends IAIJobResultFile {
38
+ _id: string;
39
+ createdAt: Date;
40
+ updatedAt: Date;
41
+ }
42
+
43
+ export interface IAIJobTarget {
44
+ type: TModelName;
45
+ id: string;
46
+ }
47
+
19
48
  export interface IAIJob {
20
49
  taskId: string;
21
50
  userId: string;
22
51
 
23
52
  status: TTaskStatus;
24
53
 
25
- target: {
26
- type: TModelName;
27
- id: string;
28
- }
54
+ target: IAIJobTarget;
29
55
 
30
56
  context: unknown;
31
57
 
@@ -53,12 +79,16 @@ export interface IAIJobLean extends IAIJob {
53
79
  _id: mongoose.Types.ObjectId;
54
80
  createdAt: Date;
55
81
  updatedAt: Date;
82
+ inputFiles: Array<IAIJobInputFileLean>;
83
+ resultFiles: Array<IAIJobResultFileLean>;
56
84
  }
57
85
 
58
86
  export interface IAIJobPlain extends IAIJob {
59
87
  _id: string;
60
88
  createdAt: Date;
61
89
  updatedAt: Date;
90
+ inputFiles: Array<IAIJobInputFilePlain>;
91
+ resultFiles: Array<IAIJobResultFilePlain>;
62
92
  }
63
93
 
64
94
  export type TAIJobModel = mongoose.Model<IAIJob>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.111",
3
+ "version": "1.5.113",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {