gemcap-be-common 1.5.151 → 1.5.152

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.
@@ -30,10 +30,21 @@ export type TFileMetadataItem = {
30
30
  role: string;
31
31
  source: 'uploaded' | 'existing';
32
32
  };
33
- export type TFileUploadContext = {
33
+ type TFileUploadContext = {
34
+ type: 'analysis';
34
35
  userId: string;
35
- source: string;
36
36
  taskId: string;
37
+ } | {
38
+ type: 'prospect';
39
+ userId: string;
40
+ prospectId: string;
41
+ } | {
42
+ type: 'borrower';
43
+ userId: string;
44
+ borrowerId: string;
45
+ } | {
46
+ type: 'temporary';
47
+ userId: string;
37
48
  };
38
49
  export type TUploadedFile = {
39
50
  fieldname: string;
@@ -102,3 +113,4 @@ export declare const FileSchema: mongoose.Schema<IFile, TFileModel, {}, {}, {},
102
113
  _id: mongoose.Types.ObjectId;
103
114
  }>;
104
115
  export declare const File: TFileModel;
116
+ export {};
@@ -9,11 +9,11 @@ export type TFileMetadataItem = {
9
9
  source: 'uploaded' | 'existing';
10
10
  };
11
11
 
12
- export type TFileUploadContext = {
13
- userId: string;
14
- source: string;
15
- taskId: string;
16
- };
12
+ type TFileUploadContext =
13
+ | { type: 'analysis'; userId: string; taskId: string }
14
+ | { type: 'prospect'; userId: string; prospectId: string }
15
+ | { type: 'borrower'; userId: string; borrowerId: string }
16
+ | { type: 'temporary'; userId: string };
17
17
 
18
18
  export type TUploadedFile = {
19
19
  fieldname: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.151",
3
+ "version": "1.5.152",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {