@taiger-common/model 1.0.58 → 1.0.59
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/dist/cjs/api/account.js +35 -0
- package/dist/cjs/api/applications.js +46 -0
- package/dist/cjs/api/audit.js +8 -0
- package/dist/cjs/api/auth.js +19 -0
- package/dist/cjs/api/common.js +32 -0
- package/dist/cjs/api/communications.js +15 -0
- package/dist/cjs/api/courses.js +23 -0
- package/dist/cjs/api/crm.js +87 -0
- package/dist/cjs/api/documentThreads.js +44 -0
- package/dist/cjs/api/documentations.js +33 -0
- package/dist/cjs/api/events.js +22 -0
- package/dist/cjs/api/index.js +41 -0
- package/dist/cjs/api/interviews.js +35 -0
- package/dist/cjs/api/meetings.js +20 -0
- package/dist/cjs/api/notes.js +8 -0
- package/dist/cjs/api/permissions.js +9 -0
- package/dist/cjs/api/portals.js +24 -0
- package/dist/cjs/api/programRequirements.js +26 -0
- package/dist/cjs/api/programs.js +93 -0
- package/dist/cjs/api/search.js +24 -0
- package/dist/cjs/api/serialized.js +50 -0
- package/dist/cjs/api/students.js +29 -0
- package/dist/cjs/api/teams.js +48 -0
- package/dist/cjs/api/tickets.js +21 -0
- package/dist/cjs/api/users.js +42 -0
- package/dist/cjs/api/widgets.js +21 -0
- package/dist/cjs/constants/users.js +12 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/model/Application.js +78 -0
- package/dist/cjs/model/Documentthread.js +2 -4
- package/dist/cjs/model/Program.js +331 -83
- package/dist/cjs/model/User.js +79 -139
- package/dist/cjs/model/index.js +1 -1
- package/dist/cjs/schema/index.js +22 -0
- package/dist/cjs/schema/models.js +523 -0
- package/dist/cjs/schema/serialized.js +202 -0
- package/package.json +1 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RefreshProgramResponseSchema = exports.ReviewProgramChangeRequestsResponseSchema = exports.GetProgramChangeRequestsResponseSchema = exports.GetSameProgramStudentsResponseSchema = exports.UpdateSchoolAttributesResponseSchema = exports.GetDistinctSchoolsResponseSchema = exports.GetSchoolsDistributionResponseSchema = exports.DeleteProgramResponseSchema = exports.UpdateProgramResponseSchema = exports.CreateProgramResponseSchema = exports.GetProgramResponseSchema = exports.GetProgramsOverviewResponseSchema = exports.GetProgramsResponseSchema = exports.ProgramsOverviewDataSchema = exports.RecentlyUpdatedProgramSchema = exports.TopApplicationProgramSchema = exports.SchoolAttributeItemSchema = exports.SchoolDistributionItemSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
var common_1 = require("./common");
|
|
6
|
+
var serialized_1 = require("./serialized");
|
|
7
|
+
// =========== Schemas ===========
|
|
8
|
+
exports.SchoolDistributionItemSchema = zod_1.z.object({
|
|
9
|
+
school: zod_1.z.string().optional(),
|
|
10
|
+
country: zod_1.z.string().optional(),
|
|
11
|
+
city: zod_1.z.string().optional(),
|
|
12
|
+
programCount: zod_1.z.number().optional()
|
|
13
|
+
});
|
|
14
|
+
exports.SchoolAttributeItemSchema = zod_1.z.object({
|
|
15
|
+
school: zod_1.z.string().optional(),
|
|
16
|
+
isPrivateSchool: zod_1.z.boolean().optional(),
|
|
17
|
+
isPartnerSchool: zod_1.z.boolean().optional(),
|
|
18
|
+
schoolType: zod_1.z.string().optional(),
|
|
19
|
+
country: zod_1.z.string().optional(),
|
|
20
|
+
tags: zod_1.z.array(zod_1.z.string()).optional(),
|
|
21
|
+
count: zod_1.z.number().optional()
|
|
22
|
+
});
|
|
23
|
+
exports.TopApplicationProgramSchema = zod_1.z.object({
|
|
24
|
+
programId: zod_1.z.string().optional(),
|
|
25
|
+
school: zod_1.z.string().optional(),
|
|
26
|
+
program_name: zod_1.z.string().optional(),
|
|
27
|
+
degree: zod_1.z.string().optional(),
|
|
28
|
+
semester: zod_1.z.string().optional(),
|
|
29
|
+
country: zod_1.z.string().optional(),
|
|
30
|
+
totalApplications: zod_1.z.number().optional(),
|
|
31
|
+
submittedCount: zod_1.z.number().optional(),
|
|
32
|
+
admittedCount: zod_1.z.number().optional(),
|
|
33
|
+
rejectedCount: zod_1.z.number().optional(),
|
|
34
|
+
pendingCount: zod_1.z.number().optional(),
|
|
35
|
+
admissionRate: zod_1.z.number().optional()
|
|
36
|
+
});
|
|
37
|
+
exports.RecentlyUpdatedProgramSchema = zod_1.z.object({
|
|
38
|
+
school: zod_1.z.string().optional(),
|
|
39
|
+
program_name: zod_1.z.string().optional(),
|
|
40
|
+
degree: zod_1.z.string().optional(),
|
|
41
|
+
semester: zod_1.z.string().optional(),
|
|
42
|
+
updatedAt: zod_1.z.union([zod_1.z.coerce.date(), zod_1.z.string()]).optional(),
|
|
43
|
+
whoupdated: zod_1.z.string().optional()
|
|
44
|
+
});
|
|
45
|
+
exports.ProgramsOverviewDataSchema = zod_1.z.object({
|
|
46
|
+
totalPrograms: zod_1.z.number().optional(),
|
|
47
|
+
totalSchools: zod_1.z.number().optional(),
|
|
48
|
+
byCountry: zod_1.z.array(zod_1.z.object({ country: zod_1.z.string().optional(), count: zod_1.z.number().optional() })).optional(),
|
|
49
|
+
byDegree: zod_1.z.array(zod_1.z.object({ degree: zod_1.z.string().optional(), count: zod_1.z.number().optional() })).optional(),
|
|
50
|
+
byLanguage: zod_1.z.array(zod_1.z.object({ language: zod_1.z.string().optional(), count: zod_1.z.number().optional() })).optional(),
|
|
51
|
+
bySubject: zod_1.z.array(zod_1.z.object({ subject: zod_1.z.string().optional(), count: zod_1.z.number().optional() })).optional(),
|
|
52
|
+
bySchoolType: zod_1.z
|
|
53
|
+
.array(zod_1.z.object({
|
|
54
|
+
schoolType: zod_1.z.string().optional(),
|
|
55
|
+
isPrivateSchool: zod_1.z.boolean().optional(),
|
|
56
|
+
isPartnerSchool: zod_1.z.boolean().optional(),
|
|
57
|
+
count: zod_1.z.number().optional()
|
|
58
|
+
}))
|
|
59
|
+
.optional(),
|
|
60
|
+
topSchools: zod_1.z.array(exports.SchoolDistributionItemSchema).optional(),
|
|
61
|
+
topContributors: zod_1.z
|
|
62
|
+
.array(zod_1.z.object({
|
|
63
|
+
contributor: zod_1.z.string().optional(),
|
|
64
|
+
updateCount: zod_1.z.number().optional(),
|
|
65
|
+
lastUpdate: zod_1.z.union([zod_1.z.coerce.date(), zod_1.z.string()]).optional()
|
|
66
|
+
}))
|
|
67
|
+
.optional(),
|
|
68
|
+
recentlyUpdated: zod_1.z.array(exports.RecentlyUpdatedProgramSchema).optional(),
|
|
69
|
+
topApplicationPrograms: zod_1.z.array(exports.TopApplicationProgramSchema).optional(),
|
|
70
|
+
generatedAt: zod_1.z.coerce.date().optional()
|
|
71
|
+
});
|
|
72
|
+
exports.GetProgramsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.ProgramWithIdSchema));
|
|
73
|
+
exports.GetProgramsOverviewResponseSchema = (0, common_1.createApiResponseSchema)(exports.ProgramsOverviewDataSchema);
|
|
74
|
+
exports.GetProgramResponseSchema = zod_1.z.object({
|
|
75
|
+
success: zod_1.z.boolean(),
|
|
76
|
+
data: serialized_1.ProgramWithIdSchema,
|
|
77
|
+
students: zod_1.z.array(serialized_1.StudentResponseSchema).optional(),
|
|
78
|
+
vc: zod_1.z.union([zod_1.z.record(zod_1.z.unknown()), zod_1.z.array(zod_1.z.unknown()), zod_1.z.null()]).optional()
|
|
79
|
+
});
|
|
80
|
+
exports.CreateProgramResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.ProgramWithIdSchema);
|
|
81
|
+
exports.UpdateProgramResponseSchema = zod_1.z.object({
|
|
82
|
+
success: zod_1.z.boolean(),
|
|
83
|
+
data: serialized_1.ProgramWithIdSchema.optional(),
|
|
84
|
+
vc: zod_1.z.array(zod_1.z.unknown()).optional()
|
|
85
|
+
});
|
|
86
|
+
exports.DeleteProgramResponseSchema = common_1.SuccessResponseSchema;
|
|
87
|
+
exports.GetSchoolsDistributionResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(exports.SchoolDistributionItemSchema));
|
|
88
|
+
exports.GetDistinctSchoolsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(exports.SchoolAttributeItemSchema));
|
|
89
|
+
exports.UpdateSchoolAttributesResponseSchema = common_1.SuccessResponseSchema;
|
|
90
|
+
exports.GetSameProgramStudentsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.StudentResponseSchema));
|
|
91
|
+
exports.GetProgramChangeRequestsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(zod_1.z.unknown()));
|
|
92
|
+
exports.ReviewProgramChangeRequestsResponseSchema = common_1.SuccessResponseSchema;
|
|
93
|
+
exports.RefreshProgramResponseSchema = exports.UpdateProgramResponseSchema;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetQueryStudentResultsResponseSchema = exports.GetQueryStudentsResultsResponseSchema = exports.GetQueryPublicResultsResponseSchema = exports.GetQueryResultsResponseSchema = exports.StudentSearchResultSchema = exports.SearchResultItemSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
var common_1 = require("./common");
|
|
6
|
+
var serialized_1 = require("./serialized");
|
|
7
|
+
// =========== Schemas ===========
|
|
8
|
+
exports.SearchResultItemSchema = zod_1.z
|
|
9
|
+
.object({ score: zod_1.z.number().optional() })
|
|
10
|
+
.catchall(zod_1.z.unknown());
|
|
11
|
+
exports.StudentSearchResultSchema = zod_1.z.object({
|
|
12
|
+
_id: zod_1.z.string().optional(),
|
|
13
|
+
firstname: zod_1.z.string().optional(),
|
|
14
|
+
lastname: zod_1.z.string().optional(),
|
|
15
|
+
firstname_chinese: zod_1.z.string().optional(),
|
|
16
|
+
lastname_chinese: zod_1.z.string().optional(),
|
|
17
|
+
role: zod_1.z.string().optional(),
|
|
18
|
+
email: zod_1.z.string().optional(),
|
|
19
|
+
score: zod_1.z.number().optional()
|
|
20
|
+
});
|
|
21
|
+
exports.GetQueryResultsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(exports.SearchResultItemSchema));
|
|
22
|
+
exports.GetQueryPublicResultsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.DocumentationWithIdSchema));
|
|
23
|
+
exports.GetQueryStudentsResultsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(exports.StudentSearchResultSchema));
|
|
24
|
+
exports.GetQueryStudentResultsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.CommunicationWithIdSchema));
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Serialized "API layer" versions of core model interfaces.
|
|
4
|
+
* All ObjectId refs become strings to match JSON API serialization.
|
|
5
|
+
* Types are inferred from Zod schemas via z.infer<>.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.UserGeneraldocsThreadSchema = exports.UserProfileItemSchema = exports.UserTaigeraiSchema = exports.UserNotificationSchema = exports.UserAttributeSchema = exports.UserApplicationPreferenceSchema = exports.UserAcademicBackgroundLanguageSchema = exports.UserAcademicBackgroundUniversitySchema = exports.BasedocumentationslinkWithIdSchema = exports.TemplateWithIdSchema = exports.SurveyInputWithIdSchema = exports.KeywordsetWithIdSchema = exports.AllCourseWithIdSchema = exports.ProgramrequirementWithIdSchema = exports.InternaldocWithIdSchema = exports.DocspageWithIdSchema = exports.DocumentationWithIdSchema = exports.PermissionWithIdSchema = exports.NoteWithIdSchema = exports.EventWithIdSchema = exports.AuditWithIdSchema = exports.ComplaintWithIdSchema = exports.TicketWithIdSchema = exports.InterviewSurveyResponseWithIdSchema = exports.InterviewWithIdSchema = exports.CommunicationWithIdSchema = exports.DocumentthreadPopulatedSchema = exports.DocumentthreadWithIdSchema = exports.UserWithIdSchema = exports.StudentResponseSchema = exports.ApplicationPopulatedSchema = exports.ApplicationWithIdSchema = exports.EditorWithIdSchema = exports.AgentWithIdSchema = exports.ProgramWithIdSchema = void 0;
|
|
9
|
+
// Re-export all serialized schemas and their inferred types from the schema layer
|
|
10
|
+
var serialized_1 = require("../schema/serialized");
|
|
11
|
+
// Schemas
|
|
12
|
+
Object.defineProperty(exports, "ProgramWithIdSchema", { enumerable: true, get: function () { return serialized_1.ProgramWithIdSchema; } });
|
|
13
|
+
Object.defineProperty(exports, "AgentWithIdSchema", { enumerable: true, get: function () { return serialized_1.AgentWithIdSchema; } });
|
|
14
|
+
Object.defineProperty(exports, "EditorWithIdSchema", { enumerable: true, get: function () { return serialized_1.EditorWithIdSchema; } });
|
|
15
|
+
Object.defineProperty(exports, "ApplicationWithIdSchema", { enumerable: true, get: function () { return serialized_1.ApplicationWithIdSchema; } });
|
|
16
|
+
Object.defineProperty(exports, "ApplicationPopulatedSchema", { enumerable: true, get: function () { return serialized_1.ApplicationPopulatedSchema; } });
|
|
17
|
+
Object.defineProperty(exports, "StudentResponseSchema", { enumerable: true, get: function () { return serialized_1.StudentResponseSchema; } });
|
|
18
|
+
Object.defineProperty(exports, "UserWithIdSchema", { enumerable: true, get: function () { return serialized_1.UserWithIdSchema; } });
|
|
19
|
+
Object.defineProperty(exports, "DocumentthreadWithIdSchema", { enumerable: true, get: function () { return serialized_1.DocumentthreadWithIdSchema; } });
|
|
20
|
+
Object.defineProperty(exports, "DocumentthreadPopulatedSchema", { enumerable: true, get: function () { return serialized_1.DocumentthreadPopulatedSchema; } });
|
|
21
|
+
Object.defineProperty(exports, "CommunicationWithIdSchema", { enumerable: true, get: function () { return serialized_1.CommunicationWithIdSchema; } });
|
|
22
|
+
Object.defineProperty(exports, "InterviewWithIdSchema", { enumerable: true, get: function () { return serialized_1.InterviewWithIdSchema; } });
|
|
23
|
+
Object.defineProperty(exports, "InterviewSurveyResponseWithIdSchema", { enumerable: true, get: function () { return serialized_1.InterviewSurveyResponseWithIdSchema; } });
|
|
24
|
+
Object.defineProperty(exports, "TicketWithIdSchema", { enumerable: true, get: function () { return serialized_1.TicketWithIdSchema; } });
|
|
25
|
+
Object.defineProperty(exports, "ComplaintWithIdSchema", { enumerable: true, get: function () { return serialized_1.ComplaintWithIdSchema; } });
|
|
26
|
+
Object.defineProperty(exports, "AuditWithIdSchema", { enumerable: true, get: function () { return serialized_1.AuditWithIdSchema; } });
|
|
27
|
+
Object.defineProperty(exports, "EventWithIdSchema", { enumerable: true, get: function () { return serialized_1.EventWithIdSchema; } });
|
|
28
|
+
Object.defineProperty(exports, "NoteWithIdSchema", { enumerable: true, get: function () { return serialized_1.NoteWithIdSchema; } });
|
|
29
|
+
Object.defineProperty(exports, "PermissionWithIdSchema", { enumerable: true, get: function () { return serialized_1.PermissionWithIdSchema; } });
|
|
30
|
+
Object.defineProperty(exports, "DocumentationWithIdSchema", { enumerable: true, get: function () { return serialized_1.DocumentationWithIdSchema; } });
|
|
31
|
+
Object.defineProperty(exports, "DocspageWithIdSchema", { enumerable: true, get: function () { return serialized_1.DocspageWithIdSchema; } });
|
|
32
|
+
Object.defineProperty(exports, "InternaldocWithIdSchema", { enumerable: true, get: function () { return serialized_1.InternaldocWithIdSchema; } });
|
|
33
|
+
Object.defineProperty(exports, "ProgramrequirementWithIdSchema", { enumerable: true, get: function () { return serialized_1.ProgramrequirementWithIdSchema; } });
|
|
34
|
+
Object.defineProperty(exports, "AllCourseWithIdSchema", { enumerable: true, get: function () { return serialized_1.AllCourseWithIdSchema; } });
|
|
35
|
+
Object.defineProperty(exports, "KeywordsetWithIdSchema", { enumerable: true, get: function () { return serialized_1.KeywordsetWithIdSchema; } });
|
|
36
|
+
Object.defineProperty(exports, "SurveyInputWithIdSchema", { enumerable: true, get: function () { return serialized_1.SurveyInputWithIdSchema; } });
|
|
37
|
+
Object.defineProperty(exports, "TemplateWithIdSchema", { enumerable: true, get: function () { return serialized_1.TemplateWithIdSchema; } });
|
|
38
|
+
Object.defineProperty(exports, "BasedocumentationslinkWithIdSchema", { enumerable: true, get: function () { return serialized_1.BasedocumentationslinkWithIdSchema; } });
|
|
39
|
+
// Re-export model sub-schemas for use in API files
|
|
40
|
+
// Note: the TypeScript types (IUserAcademicBackgroundUniversity etc.) are already
|
|
41
|
+
// exported from src/model/User.ts — only the Zod schemas are exported here.
|
|
42
|
+
var models_1 = require("../schema/models");
|
|
43
|
+
Object.defineProperty(exports, "UserAcademicBackgroundUniversitySchema", { enumerable: true, get: function () { return models_1.UserAcademicBackgroundUniversitySchema; } });
|
|
44
|
+
Object.defineProperty(exports, "UserAcademicBackgroundLanguageSchema", { enumerable: true, get: function () { return models_1.UserAcademicBackgroundLanguageSchema; } });
|
|
45
|
+
Object.defineProperty(exports, "UserApplicationPreferenceSchema", { enumerable: true, get: function () { return models_1.UserApplicationPreferenceSchema; } });
|
|
46
|
+
Object.defineProperty(exports, "UserAttributeSchema", { enumerable: true, get: function () { return models_1.UserAttributeSchema; } });
|
|
47
|
+
Object.defineProperty(exports, "UserNotificationSchema", { enumerable: true, get: function () { return models_1.UserNotificationSchema; } });
|
|
48
|
+
Object.defineProperty(exports, "UserTaigeraiSchema", { enumerable: true, get: function () { return models_1.UserTaigeraiSchema; } });
|
|
49
|
+
Object.defineProperty(exports, "UserProfileItemSchema", { enumerable: true, get: function () { return models_1.UserProfileItemSchema; } });
|
|
50
|
+
Object.defineProperty(exports, "UserGeneraldocsThreadSchema", { enumerable: true, get: function () { return models_1.UserGeneraldocsThreadSchema; } });
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetStudentUniAssistResponseSchema = exports.UpdateProfileDocStatusResponseSchema = exports.SetUniAssistPaidResponseSchema = exports.SetAsNotNeededResponseSchema = exports.DeleteVPDFileResponseSchema = exports.UploadVPDFileResponseSchema = exports.DeleteStudentFileResponseSchema = exports.UploadStudentFileResponseSchema = exports.UpdateDocumentationHelperLinkResponseSchema = exports.UpdateStudentAttributesResponseSchema = exports.UpdateStudentEditorsResponseSchema = exports.UpdateStudentAgentsResponseSchema = exports.UpdateArchivStudentsResponseSchema = exports.GetStudentsAndDocLinksResponseSchema = exports.GetStudentDocLinksResponseSchema = exports.GetStudentResponseSchema = exports.GetActiveStudentsResponseSchema = exports.GetStudentsResponseSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
var common_1 = require("./common");
|
|
6
|
+
var serialized_1 = require("./serialized");
|
|
7
|
+
// =========== Schemas ===========
|
|
8
|
+
exports.GetStudentsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.StudentResponseSchema));
|
|
9
|
+
exports.GetActiveStudentsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.StudentResponseSchema));
|
|
10
|
+
exports.GetStudentResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
11
|
+
exports.GetStudentDocLinksResponseSchema = zod_1.z.object({
|
|
12
|
+
success: zod_1.z.boolean(),
|
|
13
|
+
data: serialized_1.StudentResponseSchema.optional(),
|
|
14
|
+
basedocumentationlinks: zod_1.z.array(serialized_1.BasedocumentationslinkWithIdSchema).optional()
|
|
15
|
+
});
|
|
16
|
+
exports.GetStudentsAndDocLinksResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.StudentResponseSchema));
|
|
17
|
+
exports.UpdateArchivStudentsResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
18
|
+
exports.UpdateStudentAgentsResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
19
|
+
exports.UpdateStudentEditorsResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
20
|
+
exports.UpdateStudentAttributesResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
21
|
+
exports.UpdateDocumentationHelperLinkResponseSchema = common_1.SuccessResponseSchema;
|
|
22
|
+
exports.UploadStudentFileResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
23
|
+
exports.DeleteStudentFileResponseSchema = common_1.SuccessResponseSchema;
|
|
24
|
+
exports.UploadVPDFileResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
25
|
+
exports.DeleteVPDFileResponseSchema = common_1.SuccessResponseSchema;
|
|
26
|
+
exports.SetAsNotNeededResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
27
|
+
exports.SetUniAssistPaidResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
28
|
+
exports.UpdateProfileDocStatusResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
29
|
+
exports.GetStudentUniAssistResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetEssayWritersTeamsResponseSchema = exports.GetResponseIntervalByStudentResponseSchema = exports.GetAgentProfileResponseSchema = exports.GetIsManagerResponseSchema = exports.GetTasksOverviewResponseSchema = exports.GetStatisticsResponseTimeResponseSchema = exports.GetStatisticsKPIResponseSchema = exports.GetStatisticsAgentsResponseSchema = exports.GetStatisticsOverviewResponseSchema = exports.GetArchivStudentsResponseSchema = exports.GetTeamMembersResponseSchema = exports.TasksOverviewDataSchema = exports.StatisticsResponseTimeDataSchema = exports.StatisticsKPIDataSchema = exports.StatisticsOverviewDataSchema = exports.AgentStudentDistributionItemSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
var common_1 = require("./common");
|
|
6
|
+
var serialized_1 = require("./serialized");
|
|
7
|
+
// =========== Schemas ===========
|
|
8
|
+
exports.AgentStudentDistributionItemSchema = zod_1.z.object({
|
|
9
|
+
agent_id: zod_1.z.string().optional(),
|
|
10
|
+
firstname: zod_1.z.string().optional(),
|
|
11
|
+
lastname: zod_1.z.string().optional(),
|
|
12
|
+
studentCount: zod_1.z.number().optional()
|
|
13
|
+
});
|
|
14
|
+
exports.StatisticsOverviewDataSchema = zod_1.z.object({
|
|
15
|
+
documents: zod_1.z.unknown().optional(),
|
|
16
|
+
agents_data: zod_1.z.array(zod_1.z.unknown()).optional(),
|
|
17
|
+
editors_data: zod_1.z.array(zod_1.z.unknown()).optional(),
|
|
18
|
+
students_years_pair: zod_1.z.array(zod_1.z.unknown()).optional(),
|
|
19
|
+
students_creation_dates: zod_1.z.unknown().optional()
|
|
20
|
+
});
|
|
21
|
+
exports.StatisticsKPIDataSchema = zod_1.z.object({
|
|
22
|
+
finished_docs: zod_1.z.array(zod_1.z.unknown()).optional()
|
|
23
|
+
});
|
|
24
|
+
exports.StatisticsResponseTimeDataSchema = zod_1.z.object({
|
|
25
|
+
agents_data: zod_1.z.array(zod_1.z.unknown()).optional(),
|
|
26
|
+
editors_data: zod_1.z.array(zod_1.z.unknown()).optional(),
|
|
27
|
+
studentAvgResponseTime: zod_1.z.array(zod_1.z.unknown()).optional()
|
|
28
|
+
});
|
|
29
|
+
exports.TasksOverviewDataSchema = zod_1.z.object({
|
|
30
|
+
noAgentsStudents: zod_1.z.number().optional(),
|
|
31
|
+
noEditorsStudents: zod_1.z.number().optional(),
|
|
32
|
+
noTrainerInInterviewsStudents: zod_1.z.number().optional(),
|
|
33
|
+
noEssayWritersEssays: zod_1.z.number().optional()
|
|
34
|
+
});
|
|
35
|
+
exports.GetTeamMembersResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.UserWithIdSchema));
|
|
36
|
+
exports.GetArchivStudentsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.StudentResponseSchema));
|
|
37
|
+
exports.GetStatisticsOverviewResponseSchema = (0, common_1.createApiResponseSchema)(exports.StatisticsOverviewDataSchema);
|
|
38
|
+
exports.GetStatisticsAgentsResponseSchema = zod_1.z.object({
|
|
39
|
+
success: zod_1.z.boolean(),
|
|
40
|
+
agentStudentDistribution: zod_1.z.array(exports.AgentStudentDistributionItemSchema).optional()
|
|
41
|
+
});
|
|
42
|
+
exports.GetStatisticsKPIResponseSchema = (0, common_1.createApiResponseSchema)(exports.StatisticsKPIDataSchema);
|
|
43
|
+
exports.GetStatisticsResponseTimeResponseSchema = (0, common_1.createApiResponseSchema)(exports.StatisticsResponseTimeDataSchema);
|
|
44
|
+
exports.GetTasksOverviewResponseSchema = (0, common_1.createApiResponseSchema)(exports.TasksOverviewDataSchema);
|
|
45
|
+
exports.GetIsManagerResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.object({ isManager: zod_1.z.boolean() }));
|
|
46
|
+
exports.GetAgentProfileResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.UserWithIdSchema);
|
|
47
|
+
exports.GetResponseIntervalByStudentResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.StudentResponseSchema);
|
|
48
|
+
exports.GetEssayWritersTeamsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.UserWithIdSchema));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteComplaintResponseSchema = exports.DeleteMessageInComplaintResponseSchema = exports.PostMessageInComplaintResponseSchema = exports.UpdateComplaintResponseSchema = exports.CreateComplaintResponseSchema = exports.GetComplaintResponseSchema = exports.GetComplaintsResponseSchema = exports.DeleteTicketResponseSchema = exports.UpdateTicketResponseSchema = exports.CreateTicketResponseSchema = exports.GetProgramTicketResponseSchema = exports.GetProgramTicketsResponseSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
var common_1 = require("./common");
|
|
6
|
+
var serialized_1 = require("./serialized");
|
|
7
|
+
// =========== Schemas ===========
|
|
8
|
+
// --- Program Tickets ---
|
|
9
|
+
exports.GetProgramTicketsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.TicketWithIdSchema));
|
|
10
|
+
exports.GetProgramTicketResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.TicketWithIdSchema));
|
|
11
|
+
exports.CreateTicketResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.TicketWithIdSchema);
|
|
12
|
+
exports.UpdateTicketResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.TicketWithIdSchema);
|
|
13
|
+
exports.DeleteTicketResponseSchema = common_1.SuccessResponseSchema;
|
|
14
|
+
// --- Complaints ---
|
|
15
|
+
exports.GetComplaintsResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.ComplaintWithIdSchema));
|
|
16
|
+
exports.GetComplaintResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.ComplaintWithIdSchema);
|
|
17
|
+
exports.CreateComplaintResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.ComplaintWithIdSchema);
|
|
18
|
+
exports.UpdateComplaintResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.ComplaintWithIdSchema);
|
|
19
|
+
exports.PostMessageInComplaintResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.ComplaintWithIdSchema);
|
|
20
|
+
exports.DeleteMessageInComplaintResponseSchema = common_1.SuccessResponseSchema;
|
|
21
|
+
exports.DeleteComplaintResponseSchema = common_1.SuccessResponseSchema;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetEssayWritersResponseSchema = exports.UpdateArchivUserResponseSchema = exports.DeleteUserResponseSchema = exports.UpdateUserResponseSchema = exports.AddUserResponseSchema = exports.GetUserResponseSchema = exports.GetUsersResponseSchema = exports.GetUsersOverviewResponseSchema = exports.UsersOverviewDataSchema = exports.UsersOverviewMetricItemSchema = exports.GetUsersCountResponseSchema = exports.UsersCountDataSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
var common_1 = require("./common");
|
|
6
|
+
var serialized_1 = require("./serialized");
|
|
7
|
+
// =========== Schemas ===========
|
|
8
|
+
exports.UsersCountDataSchema = zod_1.z.object({
|
|
9
|
+
totalUsers: zod_1.z.number().optional(),
|
|
10
|
+
studentCount: zod_1.z.number().optional(),
|
|
11
|
+
agentCount: zod_1.z.number().optional(),
|
|
12
|
+
editorCount: zod_1.z.number().optional(),
|
|
13
|
+
externalCount: zod_1.z.number().optional(),
|
|
14
|
+
adminCount: zod_1.z.number().optional(),
|
|
15
|
+
guestCount: zod_1.z.number().optional()
|
|
16
|
+
});
|
|
17
|
+
exports.GetUsersCountResponseSchema = exports.UsersCountDataSchema.extend({
|
|
18
|
+
success: zod_1.z.boolean().optional()
|
|
19
|
+
}).catchall(zod_1.z.unknown());
|
|
20
|
+
exports.UsersOverviewMetricItemSchema = zod_1.z
|
|
21
|
+
.object({ count: zod_1.z.number() })
|
|
22
|
+
.catchall(zod_1.z.unknown());
|
|
23
|
+
exports.UsersOverviewDataSchema = zod_1.z.object({
|
|
24
|
+
byTargetDegree: zod_1.z.array(exports.UsersOverviewMetricItemSchema).optional(),
|
|
25
|
+
byApplicationSemester: zod_1.z.array(exports.UsersOverviewMetricItemSchema).optional(),
|
|
26
|
+
byTargetField: zod_1.z.array(exports.UsersOverviewMetricItemSchema).optional(),
|
|
27
|
+
byProgramLanguage: zod_1.z.array(exports.UsersOverviewMetricItemSchema).optional(),
|
|
28
|
+
byUniversity: zod_1.z.array(exports.UsersOverviewMetricItemSchema).optional(),
|
|
29
|
+
generatedAt: zod_1.z.coerce.date().optional()
|
|
30
|
+
});
|
|
31
|
+
exports.GetUsersOverviewResponseSchema = (0, common_1.createApiResponseSchema)(exports.UsersOverviewDataSchema);
|
|
32
|
+
exports.GetUsersResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.UserWithIdSchema));
|
|
33
|
+
exports.GetUserResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.UserWithIdSchema);
|
|
34
|
+
exports.AddUserResponseSchema = zod_1.z.object({
|
|
35
|
+
success: zod_1.z.boolean(),
|
|
36
|
+
data: zod_1.z.array(serialized_1.UserWithIdSchema),
|
|
37
|
+
newUser: zod_1.z.string()
|
|
38
|
+
});
|
|
39
|
+
exports.UpdateUserResponseSchema = (0, common_1.createApiResponseSchema)(serialized_1.UserWithIdSchema);
|
|
40
|
+
exports.DeleteUserResponseSchema = common_1.SuccessResponseSchema;
|
|
41
|
+
exports.UpdateArchivUserResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.UserWithIdSchema));
|
|
42
|
+
exports.GetEssayWritersResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.array(serialized_1.UserWithIdSchema));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetExpenseResponseSchema = exports.AnalyzedFileDownloadResponseSchema = exports.TranscriptAnalyserResponseSchema = exports.TaigerChatAssistantResponseSchema = exports.CvmlrlAiResponseSchema = exports.ProcessProgramListResponseSchema = exports.TaigerAiResponseSchema = exports.WidgetExportPDFResponseSchema = exports.WidgetDownloadJsonResponseSchema = exports.WidgetTranscriptResponseSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
var common_1 = require("./common");
|
|
6
|
+
var models_1 = require("../schema/models");
|
|
7
|
+
// =========== Schemas ===========
|
|
8
|
+
exports.WidgetTranscriptResponseSchema = (0, common_1.createApiResponseSchema)(models_1.CourseAnalysisSchema);
|
|
9
|
+
exports.WidgetDownloadJsonResponseSchema = zod_1.z.object({
|
|
10
|
+
success: zod_1.z.boolean(),
|
|
11
|
+
json: zod_1.z.unknown().optional(),
|
|
12
|
+
fileKey: zod_1.z.string().optional()
|
|
13
|
+
});
|
|
14
|
+
exports.WidgetExportPDFResponseSchema = common_1.SuccessResponseSchema;
|
|
15
|
+
exports.TaigerAiResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.string());
|
|
16
|
+
exports.ProcessProgramListResponseSchema = common_1.SuccessResponseSchema;
|
|
17
|
+
exports.CvmlrlAiResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.string());
|
|
18
|
+
exports.TaigerChatAssistantResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.string());
|
|
19
|
+
exports.TranscriptAnalyserResponseSchema = (0, common_1.createApiResponseSchema)(models_1.CourseAnalysisSchema);
|
|
20
|
+
exports.AnalyzedFileDownloadResponseSchema = exports.WidgetDownloadJsonResponseSchema;
|
|
21
|
+
exports.GetExpenseResponseSchema = (0, common_1.createApiResponseSchema)(zod_1.z.unknown());
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Role = void 0;
|
|
4
|
+
exports.Role = {
|
|
5
|
+
Admin: 'Admin',
|
|
6
|
+
Manager: 'Manager',
|
|
7
|
+
External: 'External',
|
|
8
|
+
Guest: 'Guest',
|
|
9
|
+
Agent: 'Agent',
|
|
10
|
+
Editor: 'Editor',
|
|
11
|
+
Student: 'Student'
|
|
12
|
+
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./model"), exports);
|
|
18
|
+
__exportStar(require("./api"), exports);
|
|
19
|
+
__exportStar(require("./schema"), exports);
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
studentId: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' },
|
|
8
|
+
uni_assist: {
|
|
9
|
+
status: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: 'notstarted'
|
|
12
|
+
},
|
|
13
|
+
vpd_file_path: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ''
|
|
16
|
+
},
|
|
17
|
+
vpd_paid_confirmation_file_path: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ''
|
|
20
|
+
},
|
|
21
|
+
vpd_paid_confirmation_file_status: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ''
|
|
24
|
+
},
|
|
25
|
+
isPaid: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
updatedAt: Date
|
|
30
|
+
},
|
|
31
|
+
portal_credentials: {
|
|
32
|
+
application_portal_a: {
|
|
33
|
+
account: { type: String, select: false, trim: true },
|
|
34
|
+
password: { type: String, select: false, trim: true }
|
|
35
|
+
},
|
|
36
|
+
application_portal_b: {
|
|
37
|
+
account: { type: String, select: false, trim: true },
|
|
38
|
+
password: { type: String, select: false, trim: true }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
doc_modification_thread: [
|
|
42
|
+
{
|
|
43
|
+
isFinalVersion: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
latest_message_left_by_id: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: ''
|
|
50
|
+
},
|
|
51
|
+
doc_thread_id: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Documentthread' },
|
|
52
|
+
updatedAt: Date,
|
|
53
|
+
createdAt: Date
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
reject_reason: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: ''
|
|
59
|
+
},
|
|
60
|
+
admission_letter: {
|
|
61
|
+
status: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: 'notstarted'
|
|
64
|
+
},
|
|
65
|
+
admission_file_path: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: ''
|
|
68
|
+
},
|
|
69
|
+
comments: { type: String, default: '' },
|
|
70
|
+
updatedAt: Date
|
|
71
|
+
},
|
|
72
|
+
finalEnrolment: { type: Boolean, default: false },
|
|
73
|
+
decided: { type: String, default: '-' },
|
|
74
|
+
closed: { type: String, default: '-' },
|
|
75
|
+
admission: { type: String, default: '-' },
|
|
76
|
+
application_year: { type: String, default: '' },
|
|
77
|
+
isLocked: { type: Boolean, default: false }
|
|
78
|
+
});
|
|
@@ -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' }],
|
|
@@ -41,9 +42,6 @@ exports.documentThreadsSchema = new mongoose_1.Schema({
|
|
|
41
42
|
ignore_message: Boolean
|
|
42
43
|
}
|
|
43
44
|
],
|
|
44
|
-
|
|
45
|
-
type: Boolean
|
|
46
|
-
},
|
|
47
|
-
essayConsultantIds: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }],
|
|
45
|
+
essayReviewerIds: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }],
|
|
48
46
|
updatedAt: Date
|
|
49
47
|
});
|