@taiger-common/model 1.0.50 → 1.0.51
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 +2 -0
- package/dist/cjs/api/applications.js +2 -0
- package/dist/cjs/api/audit.js +2 -0
- package/dist/cjs/api/auth.js +2 -0
- package/dist/cjs/api/common.js +5 -0
- package/dist/cjs/api/communications.js +2 -0
- package/dist/cjs/api/courses.js +2 -0
- package/dist/cjs/api/crm.js +2 -0
- package/dist/cjs/api/documentThreads.js +2 -0
- package/dist/cjs/api/documentations.js +2 -0
- package/dist/cjs/api/events.js +2 -0
- package/dist/cjs/api/index.js +41 -0
- package/dist/cjs/api/interviews.js +2 -0
- package/dist/cjs/api/meetings.js +2 -0
- package/dist/cjs/api/notes.js +2 -0
- package/dist/cjs/api/permissions.js +2 -0
- package/dist/cjs/api/portals.js +2 -0
- package/dist/cjs/api/programRequirements.js +2 -0
- package/dist/cjs/api/programs.js +2 -0
- package/dist/cjs/api/search.js +2 -0
- package/dist/cjs/api/serialized.js +6 -0
- package/dist/cjs/api/students.js +2 -0
- package/dist/cjs/api/teams.js +2 -0
- package/dist/cjs/api/tickets.js +2 -0
- package/dist/cjs/api/users.js +2 -0
- package/dist/cjs/api/widgets.js +2 -0
- package/dist/cjs/index.js +1 -0
- package/dist/esm/api/account.js +1 -0
- package/dist/esm/api/applications.js +1 -0
- package/dist/esm/api/audit.js +1 -0
- package/dist/esm/api/auth.js +1 -0
- package/dist/esm/api/common.js +4 -0
- package/dist/esm/api/communications.js +1 -0
- package/dist/esm/api/courses.js +1 -0
- package/dist/esm/api/crm.js +1 -0
- package/dist/esm/api/documentThreads.js +1 -0
- package/dist/esm/api/documentations.js +1 -0
- package/dist/esm/api/events.js +1 -0
- package/dist/esm/api/index.js +25 -0
- package/dist/esm/api/interviews.js +1 -0
- package/dist/esm/api/meetings.js +1 -0
- package/dist/esm/api/notes.js +1 -0
- package/dist/esm/api/permissions.js +1 -0
- package/dist/esm/api/portals.js +1 -0
- package/dist/esm/api/programRequirements.js +1 -0
- package/dist/esm/api/programs.js +1 -0
- package/dist/esm/api/search.js +1 -0
- package/dist/esm/api/serialized.js +5 -0
- package/dist/esm/api/students.js +1 -0
- package/dist/esm/api/teams.js +1 -0
- package/dist/esm/api/tickets.js +1 -0
- package/dist/esm/api/users.js +1 -0
- package/dist/esm/api/widgets.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/types/api/account.d.ts +48 -0
- package/dist/types/api/applications.d.ts +64 -0
- package/dist/types/api/audit.d.ts +4 -0
- package/dist/types/api/auth.d.ts +23 -0
- package/dist/types/api/common.d.ts +30 -0
- package/dist/types/api/communications.d.ts +18 -0
- package/dist/types/api/courses.d.ts +27 -0
- package/dist/types/api/crm.d.ts +107 -0
- package/dist/types/api/documentThreads.d.ts +68 -0
- package/dist/types/api/documentations.d.ts +44 -0
- package/dist/types/api/events.d.ts +35 -0
- package/dist/types/api/index.d.ts +25 -0
- package/dist/types/api/interviews.d.ts +47 -0
- package/dist/types/api/meetings.d.ts +31 -0
- package/dist/types/api/notes.d.ts +6 -0
- package/dist/types/api/permissions.d.ts +6 -0
- package/dist/types/api/portals.d.ts +23 -0
- package/dist/types/api/programRequirements.d.ts +29 -0
- package/dist/types/api/programs.d.ts +123 -0
- package/dist/types/api/search.d.ts +26 -0
- package/dist/types/api/serialized.d.ts +130 -0
- package/dist/types/api/students.d.ts +42 -0
- package/dist/types/api/teams.d.ts +66 -0
- package/dist/types/api/tickets.d.ts +26 -0
- package/dist/types/api/users.d.ts +51 -0
- package/dist/types/api/widgets.d.ts +29 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/umd/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { IDocumentthreadWithId, ISurveyInputWithId, IUserWithId, IAuditWithId } from './serialized';
|
|
3
|
+
/** Favorite toggle result */
|
|
4
|
+
export interface ThreadFavoriteData {
|
|
5
|
+
isFlagged: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* GET /api/document-threads/:documentsthreadId
|
|
9
|
+
* Non-standard: returns multiple top-level fields
|
|
10
|
+
*/
|
|
11
|
+
export interface GetMessagesThreadResponse {
|
|
12
|
+
success: boolean;
|
|
13
|
+
data?: IDocumentthreadWithId;
|
|
14
|
+
similarThreads?: IDocumentthreadWithId[];
|
|
15
|
+
agents?: IUserWithId[];
|
|
16
|
+
editors?: IUserWithId[];
|
|
17
|
+
threadAuditLog?: IAuditWithId[];
|
|
18
|
+
deadline?: unknown;
|
|
19
|
+
conflict_list?: unknown[];
|
|
20
|
+
}
|
|
21
|
+
/** GET /api/document-threads/overview/all */
|
|
22
|
+
export type GetActiveThreadsResponse = ApiResponse<IDocumentthreadWithId[]>;
|
|
23
|
+
/** GET /api/document-threads/student-threads/:studentId */
|
|
24
|
+
export type GetThreadsByStudentResponse = ApiResponse<IDocumentthreadWithId[]>;
|
|
25
|
+
/**
|
|
26
|
+
* GET /api/document-threads/overview/taiger-user/:userId
|
|
27
|
+
* Non-standard: data is an object with threads + user
|
|
28
|
+
*/
|
|
29
|
+
export type GetMyStudentThreadsResponse = ApiResponse<{
|
|
30
|
+
threads: IDocumentthreadWithId[];
|
|
31
|
+
user: IUserWithId;
|
|
32
|
+
}>;
|
|
33
|
+
/** GET /api/document-threads/overview/my-student-metrics */
|
|
34
|
+
export type GetMyStudentThreadMetricsResponse = ApiResponse<unknown>;
|
|
35
|
+
/** PUT /api/document-threads/:documentsthreadId/favorite */
|
|
36
|
+
export type PutThreadFavoriteResponse = ApiResponse<ThreadFavoriteData>;
|
|
37
|
+
/** PUT /api/document-threads/:documentsthreadId/:studentId (set as final) */
|
|
38
|
+
export type SetFileFinalResponse = ApiResponse<IDocumentthreadWithId>;
|
|
39
|
+
/** POST /api/document-threads/init/general/:studentId/:document_catgory */
|
|
40
|
+
export type InitGeneralThreadResponse = ApiResponse<IDocumentthreadWithId>;
|
|
41
|
+
/** POST /api/document-threads/init/application/:studentId/:applicationId/:document_catgory */
|
|
42
|
+
export type InitApplicationThreadResponse = ApiResponse<IDocumentthreadWithId>;
|
|
43
|
+
/** POST /api/document-threads/:documentsthreadId/:studentId (submit message) */
|
|
44
|
+
export type SubmitMessageResponse = ApiResponse<IDocumentthreadWithId>;
|
|
45
|
+
/** DELETE /api/document-threads/:documentsthreadId/:studentId */
|
|
46
|
+
export type DeleteGeneralFileThreadResponse = SuccessResponse;
|
|
47
|
+
/** DELETE /api/document-threads/:documentsthreadId/:application_id/:studentId */
|
|
48
|
+
export type DeleteProgramSpecificFileThreadResponse = SuccessResponse;
|
|
49
|
+
/** DELETE /api/document-threads/delete/:documentsthreadId/:messageId */
|
|
50
|
+
export type DeleteMessageInThreadResponse = SuccessResponse;
|
|
51
|
+
/** POST /api/document-threads/:documentsthreadId/essay */
|
|
52
|
+
export type UpdateEssayWriterResponse = ApiResponse<IDocumentthreadWithId>;
|
|
53
|
+
/** POST /api/document-threads/image/:documentsthreadId/:studentId */
|
|
54
|
+
export type UploadDocumentThreadImageResponse = ApiResponse<IDocumentthreadWithId>;
|
|
55
|
+
/** PUT /api/document-threads/:documentsthreadId/:studentId/origin-author */
|
|
56
|
+
export type PutOriginAuthorConfirmedResponse = ApiResponse<IDocumentthreadWithId>;
|
|
57
|
+
/** PUT /api/document-threads/:documentThreadId/:documentsthreadMessageId/:ignoreMessageState/ignored */
|
|
58
|
+
export type IgnoreMessageThreadResponse = ApiResponse<IDocumentthreadWithId>;
|
|
59
|
+
/** GET /api/document-threads/pattern/check/:thread_id/:file_type */
|
|
60
|
+
export type GetCheckDocumentPatternResponse = ApiResponse<unknown>;
|
|
61
|
+
/** GET /api/document-threads/:documentsthreadId/survey-inputs */
|
|
62
|
+
export type GetSurveyInputsResponse = ApiResponse<ISurveyInputWithId>;
|
|
63
|
+
/** POST /api/document-threads/survey-input/ */
|
|
64
|
+
export type PostSurveyInputResponse = ApiResponse<ISurveyInputWithId>;
|
|
65
|
+
/** PUT /api/document-threads/survey-input/:surveyId */
|
|
66
|
+
export type PutSurveyInputResponse = ApiResponse<ISurveyInputWithId>;
|
|
67
|
+
/** DELETE /api/document-threads/survey-input/:surveyId */
|
|
68
|
+
export type DeleteSurveyInputResponse = SuccessResponse;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { IDocumentationWithId, IDocspageWithId, IInternaldocWithId } from './serialized';
|
|
3
|
+
/** GET /api/docs/:category */
|
|
4
|
+
export type GetCategorizedDocumentationResponse = ApiResponse<IDocumentationWithId[]>;
|
|
5
|
+
/** GET /api/docs/all */
|
|
6
|
+
export type GetAllDocumentationsResponse = ApiResponse<IDocumentationWithId[]>;
|
|
7
|
+
/** GET /api/docs/search/:doc_id */
|
|
8
|
+
export type GetDocumentationResponse = ApiResponse<IDocumentationWithId>;
|
|
9
|
+
/** POST /api/docs */
|
|
10
|
+
export type CreateDocumentationResponse = ApiResponse<IDocumentationWithId>;
|
|
11
|
+
/** PUT /api/docs/:doc_id */
|
|
12
|
+
export type UpdateDocumentationResponse = ApiResponse<IDocumentationWithId>;
|
|
13
|
+
/** DELETE /api/docs/:doc_id */
|
|
14
|
+
export type DeleteDocumentationResponse = SuccessResponse;
|
|
15
|
+
/** GET /api/docs/pages/:category */
|
|
16
|
+
export type GetDocspageResponse = ApiResponse<IDocspageWithId | Record<string, never>>;
|
|
17
|
+
/** PUT /api/docs/pages/:category */
|
|
18
|
+
export type UpdateDocspageResponse = ApiResponse<IDocspageWithId>;
|
|
19
|
+
/** GET /api/docs/internal/all */
|
|
20
|
+
export type GetAllInternalDocumentationsResponse = ApiResponse<IInternaldocWithId[]>;
|
|
21
|
+
/** GET /api/docs/internal/search/:doc_id */
|
|
22
|
+
export type GetInternaldocResponse = ApiResponse<IInternaldocWithId>;
|
|
23
|
+
/** GET /api/docs/taiger/internal/confidential */
|
|
24
|
+
export type GetInternalDocumentationPageResponse = ApiResponse<IDocspageWithId | Record<string, never>>;
|
|
25
|
+
/** PUT /api/docs/taiger/internal/confidential */
|
|
26
|
+
export type UpdateInternalDocumentationPageResponse = ApiResponse<IDocspageWithId>;
|
|
27
|
+
/** POST /api/docs/internal */
|
|
28
|
+
export type CreateInternaldocResponse = ApiResponse<IInternaldocWithId>;
|
|
29
|
+
/** PUT /api/docs/internal/:doc_id */
|
|
30
|
+
export type UpdateInternaldocResponse = ApiResponse<IInternaldocWithId>;
|
|
31
|
+
/** DELETE /api/docs/internal/:doc_id */
|
|
32
|
+
export type DeleteInternaldocResponse = SuccessResponse;
|
|
33
|
+
/** POST /api/docs/upload/image — returns image URL */
|
|
34
|
+
export type UploadDocImageResponse = ApiResponse<string>;
|
|
35
|
+
/**
|
|
36
|
+
* POST /api/docs/upload/docs
|
|
37
|
+
* Non-standard: returns url, title, extension alongside success
|
|
38
|
+
*/
|
|
39
|
+
export interface UploadDocDocsResponse {
|
|
40
|
+
success: boolean;
|
|
41
|
+
url?: string;
|
|
42
|
+
title?: string;
|
|
43
|
+
extension?: string;
|
|
44
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { IEventWithId, IUserWithId } from './serialized';
|
|
3
|
+
/**
|
|
4
|
+
* GET /api/events
|
|
5
|
+
* Non-standard: returns agents/editors alongside event data
|
|
6
|
+
*/
|
|
7
|
+
export interface GetEventsResponse {
|
|
8
|
+
success: boolean;
|
|
9
|
+
agents?: IUserWithId[];
|
|
10
|
+
editors?: IUserWithId[];
|
|
11
|
+
data?: IEventWithId[];
|
|
12
|
+
hasEvents?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** GET /api/events/booked */
|
|
15
|
+
export type GetBookedEventsResponse = ApiResponse<IEventWithId[]>;
|
|
16
|
+
/** GET /api/events/ping */
|
|
17
|
+
export type GetActiveEventsNumberResponse = ApiResponse<number>;
|
|
18
|
+
/**
|
|
19
|
+
* POST /api/events
|
|
20
|
+
* Same shape as GetEventsResponse
|
|
21
|
+
*/
|
|
22
|
+
export type PostEventResponse = GetEventsResponse;
|
|
23
|
+
/** GET (single event) */
|
|
24
|
+
export type GetEventResponse = ApiResponse<IEventWithId>;
|
|
25
|
+
/** PUT /api/events/:event_id/confirm */
|
|
26
|
+
export type ConfirmEventResponse = ApiResponse<IEventWithId>;
|
|
27
|
+
/** PUT /api/events/:event_id */
|
|
28
|
+
export type UpdateEventResponse = ApiResponse<IEventWithId>;
|
|
29
|
+
/**
|
|
30
|
+
* DELETE /api/events/:event_id
|
|
31
|
+
* Returns updated events list
|
|
32
|
+
*/
|
|
33
|
+
export type DeleteEventResponse = GetEventsResponse;
|
|
34
|
+
/** PUT /api/account/profile/officehours/:user_id */
|
|
35
|
+
export type UpdateOfficehoursResponse = SuccessResponse;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from './common';
|
|
2
|
+
export * from './serialized';
|
|
3
|
+
export * from './auth';
|
|
4
|
+
export * from './users';
|
|
5
|
+
export * from './students';
|
|
6
|
+
export * from './programs';
|
|
7
|
+
export * from './applications';
|
|
8
|
+
export * from './communications';
|
|
9
|
+
export * from './documentThreads';
|
|
10
|
+
export * from './interviews';
|
|
11
|
+
export * from './meetings';
|
|
12
|
+
export * from './tickets';
|
|
13
|
+
export * from './events';
|
|
14
|
+
export * from './teams';
|
|
15
|
+
export * from './documentations';
|
|
16
|
+
export * from './programRequirements';
|
|
17
|
+
export * from './courses';
|
|
18
|
+
export * from './crm';
|
|
19
|
+
export * from './account';
|
|
20
|
+
export * from './audit';
|
|
21
|
+
export * from './search';
|
|
22
|
+
export * from './portals';
|
|
23
|
+
export * from './notes';
|
|
24
|
+
export * from './permissions';
|
|
25
|
+
export * from './widgets';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { IInterviewWithId, IInterviewSurveyResponseWithId, IStudentResponse, IAuditWithId } from './serialized';
|
|
3
|
+
/** GET /api/interviews, GET /api/interviews/open */
|
|
4
|
+
export type GetInterviewsResponse = ApiResponse<IInterviewWithId[]>;
|
|
5
|
+
/**
|
|
6
|
+
* GET /api/interviews/:interview_id
|
|
7
|
+
* Non-standard: also returns interviewAuditLog
|
|
8
|
+
*/
|
|
9
|
+
export interface GetInterviewResponse {
|
|
10
|
+
success: boolean;
|
|
11
|
+
data?: IInterviewWithId;
|
|
12
|
+
interviewAuditLog?: IAuditWithId[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* GET /api/interviews/my-interviews
|
|
16
|
+
* Non-standard: returns students or student alongside data
|
|
17
|
+
*/
|
|
18
|
+
export interface GetMyInterviewsResponse {
|
|
19
|
+
success: boolean;
|
|
20
|
+
data?: IInterviewWithId[];
|
|
21
|
+
students?: IStudentResponse[];
|
|
22
|
+
student?: IStudentResponse;
|
|
23
|
+
}
|
|
24
|
+
/** GET /api/interviews/interview/:program_id */
|
|
25
|
+
export interface GetInterviewsByProgramIdResponse {
|
|
26
|
+
success: boolean;
|
|
27
|
+
data?: IInterviewWithId[];
|
|
28
|
+
count?: number;
|
|
29
|
+
}
|
|
30
|
+
/** GET /api/interviews/interviews/:student_id */
|
|
31
|
+
export interface GetInterviewsByStudentIdResponse {
|
|
32
|
+
success: boolean;
|
|
33
|
+
data?: IInterviewWithId[];
|
|
34
|
+
count?: number;
|
|
35
|
+
}
|
|
36
|
+
/** GET /api/interviews/:interview_id/survey */
|
|
37
|
+
export type GetInterviewSurveyResponse = ApiResponse<IInterviewSurveyResponseWithId>;
|
|
38
|
+
/** PUT /api/interviews/:interview_id/survey */
|
|
39
|
+
export type UpdateInterviewSurveyResponse = ApiResponse<IInterviewSurveyResponseWithId>;
|
|
40
|
+
/** POST /api/interviews/create/:program_id/:student_id */
|
|
41
|
+
export type CreateInterviewResponse = SuccessResponse;
|
|
42
|
+
/** DELETE /api/interviews/:interview_id */
|
|
43
|
+
export type DeleteInterviewResponse = SuccessResponse;
|
|
44
|
+
/** PUT /api/interviews/:interview_id */
|
|
45
|
+
export type UpdateInterviewResponse = ApiResponse<IInterviewWithId>;
|
|
46
|
+
/** POST /api/interviews/time/:interview_id */
|
|
47
|
+
export type AddInterviewTrainingDateTimeResponse = SuccessResponse;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
/**
|
|
3
|
+
* Student meeting — no dedicated Mongoose model.
|
|
4
|
+
* Represents a scheduled meeting between a student and a TaiGer staff member.
|
|
5
|
+
*/
|
|
6
|
+
export interface IMeeting {
|
|
7
|
+
_id: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
dateTime?: string | Date;
|
|
10
|
+
location?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
notes?: string;
|
|
13
|
+
isConfirmed?: boolean;
|
|
14
|
+
isConfirmedReceiver?: boolean;
|
|
15
|
+
isConfirmedRequester?: boolean;
|
|
16
|
+
attended?: boolean;
|
|
17
|
+
meetingLink?: string;
|
|
18
|
+
requester_id?: string[];
|
|
19
|
+
receiver_id?: string[];
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
/** GET /api/students/:studentId/meetings */
|
|
23
|
+
export type GetStudentMeetingsResponse = ApiResponse<IMeeting[]>;
|
|
24
|
+
/** GET /api/students/:studentId/meetings/:meetingId */
|
|
25
|
+
export type GetStudentMeetingResponse = ApiResponse<IMeeting>;
|
|
26
|
+
/** POST /api/students/:studentId/meetings */
|
|
27
|
+
export type CreateStudentMeetingResponse = ApiResponse<IMeeting>;
|
|
28
|
+
/** PUT /api/students/:studentId/meetings/:meetingId */
|
|
29
|
+
export type UpdateStudentMeetingResponse = ApiResponse<IMeeting>;
|
|
30
|
+
/** DELETE /api/students/:studentId/meetings/:meetingId */
|
|
31
|
+
export type DeleteStudentMeetingResponse = SuccessResponse;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ApiResponse } from './common';
|
|
2
|
+
import type { INoteWithId } from './serialized';
|
|
3
|
+
/** GET /api/notes/:student_id */
|
|
4
|
+
export type GetStudentNotesResponse = ApiResponse<INoteWithId>;
|
|
5
|
+
/** PUT /api/notes/:student_id */
|
|
6
|
+
export type UpdateStudentNotesResponse = ApiResponse<INoteWithId>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ApiResponse } from './common';
|
|
2
|
+
import type { IPermissionWithId } from './serialized';
|
|
3
|
+
/** GET /api/permissions (all permissions) */
|
|
4
|
+
export type GetUserPermissionsResponse = ApiResponse<IPermissionWithId[]>;
|
|
5
|
+
/** POST /api/permissions/:taiger_user_id */
|
|
6
|
+
export type UpdateUserPermissionResponse = ApiResponse<IPermissionWithId>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ApiResponse } from './common';
|
|
2
|
+
import type { IApplicationWithId } from './serialized';
|
|
3
|
+
/** Student summary shape nested inside portal credentials response */
|
|
4
|
+
export interface PortalCredentialsStudent {
|
|
5
|
+
_id?: string;
|
|
6
|
+
firstname?: string;
|
|
7
|
+
lastname?: string;
|
|
8
|
+
agents?: unknown[];
|
|
9
|
+
editors?: unknown[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* GET /api/portal-informations/:student_id
|
|
13
|
+
* Non-standard: data is an object, not a single document
|
|
14
|
+
*/
|
|
15
|
+
export interface GetPortalCredentialsResponse {
|
|
16
|
+
success: boolean;
|
|
17
|
+
data?: {
|
|
18
|
+
applications: IApplicationWithId[];
|
|
19
|
+
student: PortalCredentialsStudent;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** POST /api/portal-informations/:student_id/:applicationId */
|
|
23
|
+
export type CreatePortalCredentialsResponse = ApiResponse<IApplicationWithId>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { IProgramrequirementWithId, IProgramWithId, IKeywordsetWithId } from './serialized';
|
|
3
|
+
/** Payload returned by GET /api/program-requirements/programs-and-keywords */
|
|
4
|
+
export interface ProgramsAndKeywordsData {
|
|
5
|
+
distinctPrograms?: IProgramWithId[];
|
|
6
|
+
keywordsets?: IKeywordsetWithId[];
|
|
7
|
+
}
|
|
8
|
+
/** GET /api/program-requirements */
|
|
9
|
+
export type GetProgramRequirementsResponse = ApiResponse<IProgramrequirementWithId[]>;
|
|
10
|
+
/**
|
|
11
|
+
* GET /api/program-requirements/:programRequirementId
|
|
12
|
+
* Non-standard: data wraps requirement + supporting lists
|
|
13
|
+
*/
|
|
14
|
+
export interface GetProgramRequirementResponse {
|
|
15
|
+
success: boolean;
|
|
16
|
+
data?: {
|
|
17
|
+
requirement: IProgramrequirementWithId;
|
|
18
|
+
distinctPrograms?: IProgramWithId[];
|
|
19
|
+
keywordsets?: IKeywordsetWithId[];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** GET /api/program-requirements/programs-and-keywords */
|
|
23
|
+
export type GetProgramsAndKeywordSetsResponse = ApiResponse<ProgramsAndKeywordsData>;
|
|
24
|
+
/** POST /api/program-requirements/new */
|
|
25
|
+
export type CreateProgramRequirementResponse = ApiResponse<IProgramrequirementWithId>;
|
|
26
|
+
/** PUT /api/program-requirements/:programRequirementId */
|
|
27
|
+
export type UpdateProgramRequirementResponse = ApiResponse<IProgramrequirementWithId>;
|
|
28
|
+
/** DELETE /api/program-requirements/:programRequirementId */
|
|
29
|
+
export type DeleteProgramRequirementResponse = SuccessResponse;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { IProgramWithId, IStudentResponse } from './serialized';
|
|
3
|
+
/** { school, country, city, programCount } */
|
|
4
|
+
export interface SchoolDistributionItem {
|
|
5
|
+
school?: string;
|
|
6
|
+
country?: string;
|
|
7
|
+
city?: string;
|
|
8
|
+
programCount?: number;
|
|
9
|
+
}
|
|
10
|
+
/** School attribute item from GET /api/programs/schools */
|
|
11
|
+
export interface SchoolAttributeItem {
|
|
12
|
+
school?: string;
|
|
13
|
+
isPrivateSchool?: boolean;
|
|
14
|
+
isPartnerSchool?: boolean;
|
|
15
|
+
schoolType?: string;
|
|
16
|
+
country?: string;
|
|
17
|
+
tags?: string[];
|
|
18
|
+
count?: number;
|
|
19
|
+
}
|
|
20
|
+
/** Top-applying program in the programs overview */
|
|
21
|
+
export interface TopApplicationProgram {
|
|
22
|
+
programId?: string;
|
|
23
|
+
school?: string;
|
|
24
|
+
program_name?: string;
|
|
25
|
+
degree?: string;
|
|
26
|
+
semester?: string;
|
|
27
|
+
country?: string;
|
|
28
|
+
totalApplications?: number;
|
|
29
|
+
submittedCount?: number;
|
|
30
|
+
admittedCount?: number;
|
|
31
|
+
rejectedCount?: number;
|
|
32
|
+
pendingCount?: number;
|
|
33
|
+
admissionRate?: number;
|
|
34
|
+
}
|
|
35
|
+
/** Recently updated program entry */
|
|
36
|
+
export interface RecentlyUpdatedProgram {
|
|
37
|
+
school?: string;
|
|
38
|
+
program_name?: string;
|
|
39
|
+
degree?: string;
|
|
40
|
+
semester?: string;
|
|
41
|
+
updatedAt?: Date | string;
|
|
42
|
+
whoupdated?: string;
|
|
43
|
+
}
|
|
44
|
+
/** Full programs overview payload */
|
|
45
|
+
export interface ProgramsOverviewData {
|
|
46
|
+
totalPrograms?: number;
|
|
47
|
+
totalSchools?: number;
|
|
48
|
+
byCountry?: Array<{
|
|
49
|
+
country?: string;
|
|
50
|
+
count?: number;
|
|
51
|
+
}>;
|
|
52
|
+
byDegree?: Array<{
|
|
53
|
+
degree?: string;
|
|
54
|
+
count?: number;
|
|
55
|
+
}>;
|
|
56
|
+
byLanguage?: Array<{
|
|
57
|
+
language?: string;
|
|
58
|
+
count?: number;
|
|
59
|
+
}>;
|
|
60
|
+
bySubject?: Array<{
|
|
61
|
+
subject?: string;
|
|
62
|
+
count?: number;
|
|
63
|
+
}>;
|
|
64
|
+
bySchoolType?: Array<{
|
|
65
|
+
schoolType?: string;
|
|
66
|
+
isPrivateSchool?: boolean;
|
|
67
|
+
isPartnerSchool?: boolean;
|
|
68
|
+
count?: number;
|
|
69
|
+
}>;
|
|
70
|
+
topSchools?: SchoolDistributionItem[];
|
|
71
|
+
topContributors?: Array<{
|
|
72
|
+
contributor?: string;
|
|
73
|
+
updateCount?: number;
|
|
74
|
+
lastUpdate?: Date | string;
|
|
75
|
+
}>;
|
|
76
|
+
recentlyUpdated?: RecentlyUpdatedProgram[];
|
|
77
|
+
topApplicationPrograms?: TopApplicationProgram[];
|
|
78
|
+
generatedAt?: Date;
|
|
79
|
+
}
|
|
80
|
+
/** GET /api/programs */
|
|
81
|
+
export type GetProgramsResponse = ApiResponse<IProgramWithId[]>;
|
|
82
|
+
/** GET /api/programs/overview */
|
|
83
|
+
export type GetProgramsOverviewResponse = ApiResponse<ProgramsOverviewData>;
|
|
84
|
+
/**
|
|
85
|
+
* GET /api/programs/:programId
|
|
86
|
+
* Non-standard: has extra top-level fields beyond `data`
|
|
87
|
+
*/
|
|
88
|
+
export interface GetProgramResponse {
|
|
89
|
+
success: boolean;
|
|
90
|
+
data: IProgramWithId;
|
|
91
|
+
students?: IStudentResponse[];
|
|
92
|
+
vc?: unknown[];
|
|
93
|
+
}
|
|
94
|
+
/** POST /api/programs */
|
|
95
|
+
export type CreateProgramResponse = ApiResponse<IProgramWithId>;
|
|
96
|
+
/**
|
|
97
|
+
* PUT /api/programs/:id
|
|
98
|
+
* Non-standard: also returns vc (version control)
|
|
99
|
+
*/
|
|
100
|
+
export interface UpdateProgramResponse {
|
|
101
|
+
success: boolean;
|
|
102
|
+
data?: IProgramWithId;
|
|
103
|
+
vc?: unknown[];
|
|
104
|
+
}
|
|
105
|
+
/** DELETE /api/programs/:program_id */
|
|
106
|
+
export type DeleteProgramResponse = SuccessResponse;
|
|
107
|
+
/** GET /api/programs/schools-distribution */
|
|
108
|
+
export type GetSchoolsDistributionResponse = ApiResponse<SchoolDistributionItem[]>;
|
|
109
|
+
/** GET /api/programs/schools */
|
|
110
|
+
export type GetDistinctSchoolsResponse = ApiResponse<SchoolAttributeItem[]>;
|
|
111
|
+
/** PUT /api/programs/schools */
|
|
112
|
+
export type UpdateSchoolAttributesResponse = SuccessResponse;
|
|
113
|
+
/** GET /api/programs/same-program-students/:programId */
|
|
114
|
+
export type GetSameProgramStudentsResponse = ApiResponse<IStudentResponse[]>;
|
|
115
|
+
/** GET /api/programs/:programId/change-requests */
|
|
116
|
+
export type GetProgramChangeRequestsResponse = ApiResponse<unknown[]>;
|
|
117
|
+
/** POST /api/programs/review-changes/:requestId */
|
|
118
|
+
export type ReviewProgramChangeRequestsResponse = SuccessResponse;
|
|
119
|
+
/**
|
|
120
|
+
* POST /api/programs/:programId/refresh
|
|
121
|
+
* Same shape as UpdateProgramResponse
|
|
122
|
+
*/
|
|
123
|
+
export type RefreshProgramResponse = UpdateProgramResponse;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ApiResponse } from './common';
|
|
2
|
+
import type { IDocumentationWithId, ICommunicationWithId } from './serialized';
|
|
3
|
+
/** A mixed search result item (may be a student, doc, program, etc.) */
|
|
4
|
+
export interface SearchResultItem {
|
|
5
|
+
score?: number;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
/** A student search result with basic identity fields */
|
|
9
|
+
export interface StudentSearchResult {
|
|
10
|
+
_id?: string;
|
|
11
|
+
firstname?: string;
|
|
12
|
+
lastname?: string;
|
|
13
|
+
firstname_chinese?: string;
|
|
14
|
+
lastname_chinese?: string;
|
|
15
|
+
role?: string;
|
|
16
|
+
email?: string;
|
|
17
|
+
score?: number;
|
|
18
|
+
}
|
|
19
|
+
/** GET /api/search?q= */
|
|
20
|
+
export type GetQueryResultsResponse = ApiResponse<SearchResultItem[]>;
|
|
21
|
+
/** GET /api/search/public?q= */
|
|
22
|
+
export type GetQueryPublicResultsResponse = ApiResponse<IDocumentationWithId[]>;
|
|
23
|
+
/** GET /api/search/students?q= */
|
|
24
|
+
export type GetQueryStudentsResultsResponse = ApiResponse<StudentSearchResult[]>;
|
|
25
|
+
/** GET /api/communications?q= (student-side search) */
|
|
26
|
+
export type GetQueryStudentResultsResponse = ApiResponse<ICommunicationWithId[]>;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serialized "API layer" versions of core model interfaces.
|
|
3
|
+
* All ObjectId refs become strings to match JSON API serialization.
|
|
4
|
+
*/
|
|
5
|
+
import type { IStudent, IUserGeneraldocsThread, IUserAcademicBackgroundUniversity, IUserAcademicBackgroundLanguage, IUserApplicationPreference, IUserAttribute, IUserNotification, IUserTaigerai, IUserProfileItem } from '../model/User';
|
|
6
|
+
import type { IProgram } from '../model/Program';
|
|
7
|
+
import type { IApplication } from '../model/Application';
|
|
8
|
+
import type { ICourse } from '../model/Course';
|
|
9
|
+
import type { IDocumentthread } from '../model/Documentthread';
|
|
10
|
+
import type { ICommunication } from '../model/Communication';
|
|
11
|
+
import type { IInterview } from '../model/Interview';
|
|
12
|
+
import type { IInterviewSurveyResponse } from '../model/InterviewSurveyResponse';
|
|
13
|
+
import type { ITicket } from '../model/Ticket';
|
|
14
|
+
import type { IComplaint } from '../model/Complaint';
|
|
15
|
+
import type { IAudit } from '../model/Audit';
|
|
16
|
+
import type { IEvent } from '../model/Event';
|
|
17
|
+
import type { INote } from '../model/Note';
|
|
18
|
+
import type { IPermission } from '../model/Permission';
|
|
19
|
+
import type { IDocumentation } from '../model/Documentation';
|
|
20
|
+
import type { IDocspage } from '../model/Docspage';
|
|
21
|
+
import type { IInternaldoc } from '../model/Internaldoc';
|
|
22
|
+
import type { IProgramrequirement } from '../model/Programrequirement';
|
|
23
|
+
import type { IAllCourse } from '../model/Allcourse';
|
|
24
|
+
import type { IKeywordset } from '../model/Keywordset';
|
|
25
|
+
import type { ISurveyInput } from '../model/SurveyInput';
|
|
26
|
+
import type { ITemplate } from '../model/Template';
|
|
27
|
+
import type { IBasedocumentationslink } from '../model/Basedocumentationslink';
|
|
28
|
+
export type { IUserAcademicBackgroundUniversity, IUserAcademicBackgroundLanguage, IUserApplicationPreference, IUserAttribute, IUserNotification, IUserTaigerai, IUserProfileItem, IUserGeneraldocsThread };
|
|
29
|
+
/** Frontend-friendly User/Student with string _id (no nested ObjectId refs) */
|
|
30
|
+
export interface IUserWithId extends Omit<IStudent, 'agents' | 'editors' | 'profile'> {
|
|
31
|
+
_id: string;
|
|
32
|
+
courses?: ICourse;
|
|
33
|
+
}
|
|
34
|
+
/** Frontend-friendly Program with string _id */
|
|
35
|
+
export interface IProgramWithId extends Omit<IProgram, 'vcId'> {
|
|
36
|
+
_id: string;
|
|
37
|
+
vcId?: string;
|
|
38
|
+
}
|
|
39
|
+
/** Frontend-friendly Application with string _id */
|
|
40
|
+
export interface IApplicationWithId extends IApplication {
|
|
41
|
+
_id: string;
|
|
42
|
+
}
|
|
43
|
+
/** Student as returned by the API with populated agents, editors, applications */
|
|
44
|
+
export interface IStudentResponse extends IStudent {
|
|
45
|
+
applying_program_count?: number;
|
|
46
|
+
applications?: IApplicationWithId[];
|
|
47
|
+
agents?: IUserWithId[];
|
|
48
|
+
editors?: IUserWithId[];
|
|
49
|
+
generaldocs_threads?: IUserGeneraldocsThread[];
|
|
50
|
+
}
|
|
51
|
+
/** Document thread with string _id */
|
|
52
|
+
export interface IDocumentthreadWithId extends IDocumentthread {
|
|
53
|
+
_id: string;
|
|
54
|
+
}
|
|
55
|
+
/** Communication message with string _id */
|
|
56
|
+
export interface ICommunicationWithId extends ICommunication {
|
|
57
|
+
_id: string;
|
|
58
|
+
}
|
|
59
|
+
/** Interview with string _id */
|
|
60
|
+
export interface IInterviewWithId extends IInterview {
|
|
61
|
+
_id: string;
|
|
62
|
+
}
|
|
63
|
+
/** Interview survey response with string _id */
|
|
64
|
+
export interface IInterviewSurveyResponseWithId extends IInterviewSurveyResponse {
|
|
65
|
+
_id: string;
|
|
66
|
+
}
|
|
67
|
+
/** Ticket with string _id */
|
|
68
|
+
export interface ITicketWithId extends ITicket {
|
|
69
|
+
_id: string;
|
|
70
|
+
createdAt?: Date;
|
|
71
|
+
}
|
|
72
|
+
/** Complaint with string _id */
|
|
73
|
+
export interface IComplaintWithId extends IComplaint {
|
|
74
|
+
_id: string;
|
|
75
|
+
createdAt?: Date;
|
|
76
|
+
}
|
|
77
|
+
/** Audit record with string _id */
|
|
78
|
+
export interface IAuditWithId extends IAudit {
|
|
79
|
+
_id: string;
|
|
80
|
+
createdAt?: Date;
|
|
81
|
+
}
|
|
82
|
+
/** Event with string _id */
|
|
83
|
+
export interface IEventWithId extends IEvent {
|
|
84
|
+
_id: string;
|
|
85
|
+
createdAt?: Date;
|
|
86
|
+
}
|
|
87
|
+
/** Note with string _id */
|
|
88
|
+
export interface INoteWithId extends INote {
|
|
89
|
+
_id: string;
|
|
90
|
+
}
|
|
91
|
+
/** Permission record with string _id */
|
|
92
|
+
export interface IPermissionWithId extends IPermission {
|
|
93
|
+
_id: string;
|
|
94
|
+
}
|
|
95
|
+
/** Documentation article with string _id */
|
|
96
|
+
export interface IDocumentationWithId extends IDocumentation {
|
|
97
|
+
_id: string;
|
|
98
|
+
}
|
|
99
|
+
/** Docs page with string _id */
|
|
100
|
+
export interface IDocspageWithId extends IDocspage {
|
|
101
|
+
_id: string;
|
|
102
|
+
}
|
|
103
|
+
/** Internal doc with string _id */
|
|
104
|
+
export interface IInternaldocWithId extends IInternaldoc {
|
|
105
|
+
_id: string;
|
|
106
|
+
}
|
|
107
|
+
/** Program requirement with string _id */
|
|
108
|
+
export interface IProgramrequirementWithId extends IProgramrequirement {
|
|
109
|
+
_id: string;
|
|
110
|
+
}
|
|
111
|
+
/** All-course entry with string _id */
|
|
112
|
+
export interface IAllCourseWithId extends IAllCourse {
|
|
113
|
+
_id: string;
|
|
114
|
+
}
|
|
115
|
+
/** Keyword set with string _id */
|
|
116
|
+
export interface IKeywordsetWithId extends IKeywordset {
|
|
117
|
+
_id: string;
|
|
118
|
+
}
|
|
119
|
+
/** Survey input with string _id */
|
|
120
|
+
export interface ISurveyInputWithId extends ISurveyInput {
|
|
121
|
+
_id: string;
|
|
122
|
+
}
|
|
123
|
+
/** Template with string _id */
|
|
124
|
+
export interface ITemplateWithId extends ITemplate {
|
|
125
|
+
_id: string;
|
|
126
|
+
}
|
|
127
|
+
/** Base documentation link with string _id */
|
|
128
|
+
export interface IBasedocumentationslinkWithId extends IBasedocumentationslink {
|
|
129
|
+
_id: string;
|
|
130
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { IStudentResponse, IBasedocumentationslinkWithId } from './serialized';
|
|
3
|
+
/** GET /api/students, GET /api/students/v3 */
|
|
4
|
+
export type GetStudentsResponse = ApiResponse<IStudentResponse[]>;
|
|
5
|
+
/** GET /api/students/active */
|
|
6
|
+
export type GetActiveStudentsResponse = ApiResponse<IStudentResponse[]>;
|
|
7
|
+
/** GET /api/students/:studentId */
|
|
8
|
+
export type GetStudentResponse = ApiResponse<IStudentResponse>;
|
|
9
|
+
/** GET /api/students/doc-links/:studentId */
|
|
10
|
+
export interface GetStudentDocLinksResponse {
|
|
11
|
+
success: boolean;
|
|
12
|
+
data?: IStudentResponse;
|
|
13
|
+
basedocumentationlinks?: IBasedocumentationslinkWithId[];
|
|
14
|
+
}
|
|
15
|
+
/** GET /api/students/doc-links */
|
|
16
|
+
export type GetStudentsAndDocLinksResponse = ApiResponse<IStudentResponse[]>;
|
|
17
|
+
/** POST /api/students/archiv/:studentId */
|
|
18
|
+
export type UpdateArchivStudentsResponse = ApiResponse<IStudentResponse>;
|
|
19
|
+
/** POST /api/students/:studentId/agents */
|
|
20
|
+
export type UpdateStudentAgentsResponse = ApiResponse<IStudentResponse>;
|
|
21
|
+
/** POST /api/students/:studentId/editors */
|
|
22
|
+
export type UpdateStudentEditorsResponse = ApiResponse<IStudentResponse>;
|
|
23
|
+
/** POST /api/students/:studentId/attributes */
|
|
24
|
+
export type UpdateStudentAttributesResponse = ApiResponse<IStudentResponse>;
|
|
25
|
+
/** POST /api/students/doc-links */
|
|
26
|
+
export type UpdateDocumentationHelperLinkResponse = SuccessResponse;
|
|
27
|
+
/** POST /api/students/:studentId/files/:category */
|
|
28
|
+
export type UploadStudentFileResponse = ApiResponse<IStudentResponse>;
|
|
29
|
+
/** DELETE /api/students/:studentId/files/:category */
|
|
30
|
+
export type DeleteStudentFileResponse = SuccessResponse;
|
|
31
|
+
/** POST /api/students/:studentId/vpd/:applicationId/:fileType */
|
|
32
|
+
export type UploadVPDFileResponse = ApiResponse<IStudentResponse>;
|
|
33
|
+
/** DELETE /api/students/:studentId/vpd/:applicationId/:fileType */
|
|
34
|
+
export type DeleteVPDFileResponse = SuccessResponse;
|
|
35
|
+
/** PUT /api/students/:studentId/vpd/:applicationId/VPD */
|
|
36
|
+
export type SetAsNotNeededResponse = ApiResponse<IStudentResponse>;
|
|
37
|
+
/** POST /api/students/:studentId/vpd/:applicationId/payments */
|
|
38
|
+
export type SetUniAssistPaidResponse = ApiResponse<IStudentResponse>;
|
|
39
|
+
/** POST /api/students/:studentId/:category/status */
|
|
40
|
+
export type UpdateProfileDocStatusResponse = ApiResponse<IStudentResponse>;
|
|
41
|
+
/** GET /api/uniassist/:studentId */
|
|
42
|
+
export type GetStudentUniAssistResponse = ApiResponse<IStudentResponse>;
|