@taiger-common/model 1.0.25 → 1.0.27

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/README.md CHANGED
@@ -18,4 +18,7 @@ npm version patch # or minor/major
18
18
  git push origin main --tags
19
19
 
20
20
  # Publish to npm
21
- npm publish
21
+ npm publish
22
+
23
+ # Concat command for powershell (please modify the commit message)
24
+ git add .; git commit -m "fix: copy applications to new collection"; git push origin main; npm run build; npm version patch; git push origin main --tags; npm publish
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.applicationSchema = void 0;
4
+ var mongoose_1 = require("mongoose");
5
+ exports.applicationSchema = new mongoose_1.Schema({
6
+ programId: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Program' },
7
+ uni_assist: {
8
+ status: {
9
+ type: String,
10
+ default: 'notstarted'
11
+ },
12
+ vpd_file_path: {
13
+ type: String,
14
+ default: ''
15
+ },
16
+ vpd_paid_confirmation_file_path: {
17
+ type: String,
18
+ default: ''
19
+ },
20
+ vpd_paid_confirmation_file_status: {
21
+ type: String,
22
+ default: ''
23
+ },
24
+ isPaid: {
25
+ type: Boolean,
26
+ default: false
27
+ },
28
+ updatedAt: Date
29
+ },
30
+ portal_credentials: {
31
+ application_portal_a: {
32
+ account: { type: String, select: false, trim: true },
33
+ password: { type: String, select: false, trim: true }
34
+ },
35
+ application_portal_b: {
36
+ account: { type: String, select: false, trim: true },
37
+ password: { type: String, select: false, trim: true }
38
+ }
39
+ },
40
+ doc_modification_thread: [
41
+ {
42
+ isFinalVersion: {
43
+ type: Boolean,
44
+ default: false
45
+ },
46
+ latest_message_left_by_id: {
47
+ type: String,
48
+ default: ''
49
+ },
50
+ doc_thread_id: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Documentthread' },
51
+ updatedAt: Date,
52
+ createdAt: Date
53
+ }
54
+ ],
55
+ reject_reason: {
56
+ type: String,
57
+ default: ''
58
+ },
59
+ admission_letter: {
60
+ status: {
61
+ type: String,
62
+ default: 'notstarted'
63
+ },
64
+ admission_file_path: {
65
+ type: String,
66
+ default: ''
67
+ },
68
+ comments: { type: String, default: '' },
69
+ updatedAt: Date
70
+ },
71
+ finalEnrolment: { type: Boolean, default: false },
72
+ decided: { type: String, default: '-' },
73
+ closed: { type: String, default: '-' },
74
+ admission: { type: String, default: '-' },
75
+ application_year: { type: String, default: '' }
76
+ });
@@ -5,6 +5,7 @@ var mongoose_1 = require("mongoose");
5
5
  exports.documentThreadsSchema = new mongoose_1.Schema({
6
6
  student_id: { type: mongoose_1.Schema.Types.ObjectId, require: true, ref: 'User' },
7
7
  program_id: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Program' },
8
+ application_id: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Application' },
8
9
  outsourced_user_id: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }],
9
10
  pin_by_user_id: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }],
10
11
  flag_by_user_id: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }],
@@ -12,10 +12,6 @@ exports.interviewsSchema = new mongoose_1.Schema({
12
12
  type: String,
13
13
  default: ''
14
14
  },
15
- status: {
16
- type: String,
17
- default: 'Unscheduled'
18
- },
19
15
  interviewer: {
20
16
  type: String,
21
17
  default: ''
@@ -429,7 +429,8 @@ var applicationSchema = new mongoose_1.Schema({
429
429
  finalEnrolment: { type: Boolean, default: false },
430
430
  decided: { type: String, default: '-' },
431
431
  closed: { type: String, default: '-' },
432
- admission: { type: String, default: '-' }
432
+ admission: { type: String, default: '-' },
433
+ application_year: { type: String, default: '' }
433
434
  });
434
435
  var studentSchema = new mongoose_1.Schema({
435
436
  agents: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Agent' }],
@@ -0,0 +1,73 @@
1
+ import { Schema } from 'mongoose';
2
+ export var applicationSchema = new Schema({
3
+ programId: { type: Schema.Types.ObjectId, ref: 'Program' },
4
+ uni_assist: {
5
+ status: {
6
+ type: String,
7
+ default: 'notstarted'
8
+ },
9
+ vpd_file_path: {
10
+ type: String,
11
+ default: ''
12
+ },
13
+ vpd_paid_confirmation_file_path: {
14
+ type: String,
15
+ default: ''
16
+ },
17
+ vpd_paid_confirmation_file_status: {
18
+ type: String,
19
+ default: ''
20
+ },
21
+ isPaid: {
22
+ type: Boolean,
23
+ default: false
24
+ },
25
+ updatedAt: Date
26
+ },
27
+ portal_credentials: {
28
+ application_portal_a: {
29
+ account: { type: String, select: false, trim: true },
30
+ password: { type: String, select: false, trim: true }
31
+ },
32
+ application_portal_b: {
33
+ account: { type: String, select: false, trim: true },
34
+ password: { type: String, select: false, trim: true }
35
+ }
36
+ },
37
+ doc_modification_thread: [
38
+ {
39
+ isFinalVersion: {
40
+ type: Boolean,
41
+ default: false
42
+ },
43
+ latest_message_left_by_id: {
44
+ type: String,
45
+ default: ''
46
+ },
47
+ doc_thread_id: { type: Schema.Types.ObjectId, ref: 'Documentthread' },
48
+ updatedAt: Date,
49
+ createdAt: Date
50
+ }
51
+ ],
52
+ reject_reason: {
53
+ type: String,
54
+ default: ''
55
+ },
56
+ admission_letter: {
57
+ status: {
58
+ type: String,
59
+ default: 'notstarted'
60
+ },
61
+ admission_file_path: {
62
+ type: String,
63
+ default: ''
64
+ },
65
+ comments: { type: String, default: '' },
66
+ updatedAt: Date
67
+ },
68
+ finalEnrolment: { type: Boolean, default: false },
69
+ decided: { type: String, default: '-' },
70
+ closed: { type: String, default: '-' },
71
+ admission: { type: String, default: '-' },
72
+ application_year: { type: String, default: '' }
73
+ });
@@ -2,6 +2,7 @@ import { Schema } from 'mongoose';
2
2
  export var documentThreadsSchema = new Schema({
3
3
  student_id: { type: Schema.Types.ObjectId, require: true, ref: 'User' },
4
4
  program_id: { type: Schema.Types.ObjectId, ref: 'Program' },
5
+ application_id: { type: Schema.Types.ObjectId, ref: 'Application' },
5
6
  outsourced_user_id: [{ type: Schema.Types.ObjectId, ref: 'User' }],
6
7
  pin_by_user_id: [{ type: Schema.Types.ObjectId, ref: 'User' }],
7
8
  flag_by_user_id: [{ type: Schema.Types.ObjectId, ref: 'User' }],
@@ -9,10 +9,6 @@ export var interviewsSchema = new Schema({
9
9
  type: String,
10
10
  default: ''
11
11
  },
12
- status: {
13
- type: String,
14
- default: 'Unscheduled'
15
- },
16
12
  interviewer: {
17
13
  type: String,
18
14
  default: ''
@@ -424,7 +424,8 @@ var applicationSchema = new Schema({
424
424
  finalEnrolment: { type: Boolean, default: false },
425
425
  decided: { type: String, default: '-' },
426
426
  closed: { type: String, default: '-' },
427
- admission: { type: String, default: '-' }
427
+ admission: { type: String, default: '-' },
428
+ application_year: { type: String, default: '' }
428
429
  });
429
430
  var studentSchema = new Schema({
430
431
  agents: [{ type: Schema.Types.ObjectId, ref: 'Agent' }],
@@ -0,0 +1,184 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ /// <reference types="mongoose/types/inferrawdoctype" />
26
+ import { Schema } from 'mongoose';
27
+ export declare const applicationSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
28
+ doc_modification_thread: import("mongoose").Types.DocumentArray<{
29
+ isFinalVersion: boolean;
30
+ latest_message_left_by_id: string;
31
+ createdAt?: NativeDate | null | undefined;
32
+ updatedAt?: NativeDate | null | undefined;
33
+ doc_thread_id?: import("mongoose").Types.ObjectId | null | undefined;
34
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
35
+ isFinalVersion: boolean;
36
+ latest_message_left_by_id: string;
37
+ createdAt?: NativeDate | null | undefined;
38
+ updatedAt?: NativeDate | null | undefined;
39
+ doc_thread_id?: import("mongoose").Types.ObjectId | null | undefined;
40
+ }> & {
41
+ isFinalVersion: boolean;
42
+ latest_message_left_by_id: string;
43
+ createdAt?: NativeDate | null | undefined;
44
+ updatedAt?: NativeDate | null | undefined;
45
+ doc_thread_id?: import("mongoose").Types.ObjectId | null | undefined;
46
+ }>;
47
+ reject_reason: string;
48
+ finalEnrolment: boolean;
49
+ decided: string;
50
+ closed: string;
51
+ admission: string;
52
+ application_year: string;
53
+ uni_assist?: {
54
+ status: string;
55
+ vpd_file_path: string;
56
+ vpd_paid_confirmation_file_path: string;
57
+ vpd_paid_confirmation_file_status: string;
58
+ isPaid: boolean;
59
+ updatedAt?: NativeDate | null | undefined;
60
+ } | null | undefined;
61
+ programId?: import("mongoose").Types.ObjectId | null | undefined;
62
+ portal_credentials?: {
63
+ application_portal_a?: {
64
+ password?: string | null | undefined;
65
+ account?: string | null | undefined;
66
+ } | null | undefined;
67
+ application_portal_b?: {
68
+ password?: string | null | undefined;
69
+ account?: string | null | undefined;
70
+ } | null | undefined;
71
+ } | null | undefined;
72
+ admission_letter?: {
73
+ status: string;
74
+ comments: string;
75
+ admission_file_path: string;
76
+ updatedAt?: NativeDate | null | undefined;
77
+ } | null | undefined;
78
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
79
+ doc_modification_thread: import("mongoose").Types.DocumentArray<{
80
+ isFinalVersion: boolean;
81
+ latest_message_left_by_id: string;
82
+ createdAt?: NativeDate | null | undefined;
83
+ updatedAt?: NativeDate | null | undefined;
84
+ doc_thread_id?: import("mongoose").Types.ObjectId | null | undefined;
85
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
86
+ isFinalVersion: boolean;
87
+ latest_message_left_by_id: string;
88
+ createdAt?: NativeDate | null | undefined;
89
+ updatedAt?: NativeDate | null | undefined;
90
+ doc_thread_id?: import("mongoose").Types.ObjectId | null | undefined;
91
+ }> & {
92
+ isFinalVersion: boolean;
93
+ latest_message_left_by_id: string;
94
+ createdAt?: NativeDate | null | undefined;
95
+ updatedAt?: NativeDate | null | undefined;
96
+ doc_thread_id?: import("mongoose").Types.ObjectId | null | undefined;
97
+ }>;
98
+ reject_reason: string;
99
+ finalEnrolment: boolean;
100
+ decided: string;
101
+ closed: string;
102
+ admission: string;
103
+ application_year: string;
104
+ uni_assist?: {
105
+ status: string;
106
+ vpd_file_path: string;
107
+ vpd_paid_confirmation_file_path: string;
108
+ vpd_paid_confirmation_file_status: string;
109
+ isPaid: boolean;
110
+ updatedAt?: NativeDate | null | undefined;
111
+ } | null | undefined;
112
+ programId?: import("mongoose").Types.ObjectId | null | undefined;
113
+ portal_credentials?: {
114
+ application_portal_a?: {
115
+ password?: string | null | undefined;
116
+ account?: string | null | undefined;
117
+ } | null | undefined;
118
+ application_portal_b?: {
119
+ password?: string | null | undefined;
120
+ account?: string | null | undefined;
121
+ } | null | undefined;
122
+ } | null | undefined;
123
+ admission_letter?: {
124
+ status: string;
125
+ comments: string;
126
+ admission_file_path: string;
127
+ updatedAt?: NativeDate | null | undefined;
128
+ } | null | undefined;
129
+ }>> & import("mongoose").FlatRecord<{
130
+ doc_modification_thread: import("mongoose").Types.DocumentArray<{
131
+ isFinalVersion: boolean;
132
+ latest_message_left_by_id: string;
133
+ createdAt?: NativeDate | null | undefined;
134
+ updatedAt?: NativeDate | null | undefined;
135
+ doc_thread_id?: import("mongoose").Types.ObjectId | null | undefined;
136
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
137
+ isFinalVersion: boolean;
138
+ latest_message_left_by_id: string;
139
+ createdAt?: NativeDate | null | undefined;
140
+ updatedAt?: NativeDate | null | undefined;
141
+ doc_thread_id?: import("mongoose").Types.ObjectId | null | undefined;
142
+ }> & {
143
+ isFinalVersion: boolean;
144
+ latest_message_left_by_id: string;
145
+ createdAt?: NativeDate | null | undefined;
146
+ updatedAt?: NativeDate | null | undefined;
147
+ doc_thread_id?: import("mongoose").Types.ObjectId | null | undefined;
148
+ }>;
149
+ reject_reason: string;
150
+ finalEnrolment: boolean;
151
+ decided: string;
152
+ closed: string;
153
+ admission: string;
154
+ application_year: string;
155
+ uni_assist?: {
156
+ status: string;
157
+ vpd_file_path: string;
158
+ vpd_paid_confirmation_file_path: string;
159
+ vpd_paid_confirmation_file_status: string;
160
+ isPaid: boolean;
161
+ updatedAt?: NativeDate | null | undefined;
162
+ } | null | undefined;
163
+ programId?: import("mongoose").Types.ObjectId | null | undefined;
164
+ portal_credentials?: {
165
+ application_portal_a?: {
166
+ password?: string | null | undefined;
167
+ account?: string | null | undefined;
168
+ } | null | undefined;
169
+ application_portal_b?: {
170
+ password?: string | null | undefined;
171
+ account?: string | null | undefined;
172
+ } | null | undefined;
173
+ } | null | undefined;
174
+ admission_letter?: {
175
+ status: string;
176
+ comments: string;
177
+ admission_file_path: string;
178
+ updatedAt?: NativeDate | null | undefined;
179
+ } | null | undefined;
180
+ }> & {
181
+ _id: import("mongoose").Types.ObjectId;
182
+ } & {
183
+ __v: number;
184
+ }>;
@@ -81,6 +81,7 @@ export declare const documentThreadsSchema: Schema<any, import("mongoose").Model
81
81
  student_id?: import("mongoose").Types.ObjectId | null | undefined;
82
82
  isOriginAuthorDeclarationConfirmedByStudentTimestamp?: NativeDate | null | undefined;
83
83
  program_id?: import("mongoose").Types.ObjectId | null | undefined;
84
+ application_id?: import("mongoose").Types.ObjectId | null | undefined;
84
85
  file_type?: string | null | undefined;
85
86
  isEssayConsultantNeeded?: boolean | null | undefined;
86
87
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
@@ -140,6 +141,7 @@ export declare const documentThreadsSchema: Schema<any, import("mongoose").Model
140
141
  student_id?: import("mongoose").Types.ObjectId | null | undefined;
141
142
  isOriginAuthorDeclarationConfirmedByStudentTimestamp?: NativeDate | null | undefined;
142
143
  program_id?: import("mongoose").Types.ObjectId | null | undefined;
144
+ application_id?: import("mongoose").Types.ObjectId | null | undefined;
143
145
  file_type?: string | null | undefined;
144
146
  isEssayConsultantNeeded?: boolean | null | undefined;
145
147
  }>> & import("mongoose").FlatRecord<{
@@ -199,6 +201,7 @@ export declare const documentThreadsSchema: Schema<any, import("mongoose").Model
199
201
  student_id?: import("mongoose").Types.ObjectId | null | undefined;
200
202
  isOriginAuthorDeclarationConfirmedByStudentTimestamp?: NativeDate | null | undefined;
201
203
  program_id?: import("mongoose").Types.ObjectId | null | undefined;
204
+ application_id?: import("mongoose").Types.ObjectId | null | undefined;
202
205
  file_type?: string | null | undefined;
203
206
  isEssayConsultantNeeded?: boolean | null | undefined;
204
207
  }> & {
@@ -30,7 +30,6 @@ export declare const interviewsSchema: Schema<any, import("mongoose").Model<any,
30
30
  createdAt: NativeDate;
31
31
  updatedAt: NativeDate;
32
32
  } & {
33
- status: string;
34
33
  trainer_id: import("mongoose").Types.ObjectId[];
35
34
  interview_description: string;
36
35
  interviewer: string;
@@ -47,7 +46,6 @@ export declare const interviewsSchema: Schema<any, import("mongoose").Model<any,
47
46
  createdAt: NativeDate;
48
47
  updatedAt: NativeDate;
49
48
  } & {
50
- status: string;
51
49
  trainer_id: import("mongoose").Types.ObjectId[];
52
50
  interview_description: string;
53
51
  interviewer: string;
@@ -64,7 +62,6 @@ export declare const interviewsSchema: Schema<any, import("mongoose").Model<any,
64
62
  createdAt: NativeDate;
65
63
  updatedAt: NativeDate;
66
64
  } & {
67
- status: string;
68
65
  trainer_id: import("mongoose").Types.ObjectId[];
69
66
  interview_description: string;
70
67
  interviewer: string;