@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,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./common"), exports);
|
|
18
|
+
__exportStar(require("./serialized"), exports);
|
|
19
|
+
__exportStar(require("./auth"), exports);
|
|
20
|
+
__exportStar(require("./users"), exports);
|
|
21
|
+
__exportStar(require("./students"), exports);
|
|
22
|
+
__exportStar(require("./programs"), exports);
|
|
23
|
+
__exportStar(require("./applications"), exports);
|
|
24
|
+
__exportStar(require("./communications"), exports);
|
|
25
|
+
__exportStar(require("./documentThreads"), exports);
|
|
26
|
+
__exportStar(require("./interviews"), exports);
|
|
27
|
+
__exportStar(require("./meetings"), exports);
|
|
28
|
+
__exportStar(require("./tickets"), exports);
|
|
29
|
+
__exportStar(require("./events"), exports);
|
|
30
|
+
__exportStar(require("./teams"), exports);
|
|
31
|
+
__exportStar(require("./documentations"), exports);
|
|
32
|
+
__exportStar(require("./programRequirements"), exports);
|
|
33
|
+
__exportStar(require("./courses"), exports);
|
|
34
|
+
__exportStar(require("./crm"), exports);
|
|
35
|
+
__exportStar(require("./account"), exports);
|
|
36
|
+
__exportStar(require("./audit"), exports);
|
|
37
|
+
__exportStar(require("./search"), exports);
|
|
38
|
+
__exportStar(require("./portals"), exports);
|
|
39
|
+
__exportStar(require("./notes"), exports);
|
|
40
|
+
__exportStar(require("./permissions"), exports);
|
|
41
|
+
__exportStar(require("./widgets"), exports);
|
package/dist/cjs/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/index.js
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { IStudentResponse, IUserAcademicBackgroundUniversity, IUserAcademicBackgroundLanguage, IUserApplicationPreference } from './serialized';
|
|
3
|
+
/** POST /api/account/credentials */
|
|
4
|
+
export type UpdateCredentialsResponse = SuccessResponse;
|
|
5
|
+
/** POST /api/account/student/notifications */
|
|
6
|
+
export type UpdateBannerResponse = SuccessResponse;
|
|
7
|
+
/** POST /api/account/agent/notifications */
|
|
8
|
+
export type UpdateAgentBannerResponse = SuccessResponse;
|
|
9
|
+
/** Personal data subset returned after profile update */
|
|
10
|
+
export interface PersonalDataSubset {
|
|
11
|
+
firstname?: string;
|
|
12
|
+
firstname_chinese?: string;
|
|
13
|
+
lastname?: string;
|
|
14
|
+
lastname_chinese?: string;
|
|
15
|
+
birthday?: string;
|
|
16
|
+
linkedIn?: string;
|
|
17
|
+
lineId?: string;
|
|
18
|
+
}
|
|
19
|
+
/** POST /api/account/profile/:user_id */
|
|
20
|
+
export type UpdatePersonalDataResponse = ApiResponse<PersonalDataSubset>;
|
|
21
|
+
/**
|
|
22
|
+
* POST /api/account/survey/university/:student_id
|
|
23
|
+
* Non-standard: returns data (university obj) + profile side-effect
|
|
24
|
+
*/
|
|
25
|
+
export interface UpdateAcademicBackgroundResponse {
|
|
26
|
+
success: boolean;
|
|
27
|
+
data?: IUserAcademicBackgroundUniversity;
|
|
28
|
+
profile?: unknown;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* POST /api/account/survey/language/:student_id
|
|
32
|
+
* Non-standard: returns data (language obj) + profile side-effect
|
|
33
|
+
*/
|
|
34
|
+
export interface UpdateLanguageSkillResponse {
|
|
35
|
+
success: boolean;
|
|
36
|
+
data?: IUserAcademicBackgroundLanguage;
|
|
37
|
+
profile?: unknown;
|
|
38
|
+
}
|
|
39
|
+
/** POST /api/account/survey/preferences/:student_id */
|
|
40
|
+
export type UpdateApplicationPreferenceResponse = ApiResponse<IUserApplicationPreference>;
|
|
41
|
+
/** GET /api/account/survey */
|
|
42
|
+
export type GetMyAcademicBackgroundResponse = ApiResponse<IStudentResponse>;
|
|
43
|
+
/** GET /api/account/files/template */
|
|
44
|
+
export type GetTemplatesResponse = ApiResponse<unknown[]>;
|
|
45
|
+
/** POST /api/account/files/template/:category */
|
|
46
|
+
export type UploadTemplateResponse = SuccessResponse;
|
|
47
|
+
/** DELETE /api/account/files/template/:category */
|
|
48
|
+
export type DeleteTemplateFileResponse = SuccessResponse;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { IApplicationWithId, IStudentResponse, IUserWithId, IProgramWithId } from './serialized';
|
|
3
|
+
/** Per-program count used in admissions response */
|
|
4
|
+
export interface ProgramCountItem {
|
|
5
|
+
program_id?: string;
|
|
6
|
+
count?: number;
|
|
7
|
+
}
|
|
8
|
+
/** GET /api/applications */
|
|
9
|
+
export type GetApplicationsResponse = ApiResponse<IApplicationWithId[]>;
|
|
10
|
+
/**
|
|
11
|
+
* GET /api/applications/taiger-user/:userId
|
|
12
|
+
* Non-standard: data is an object, not an array
|
|
13
|
+
*/
|
|
14
|
+
export interface GetMyStudentsApplicationsResponse {
|
|
15
|
+
success: boolean;
|
|
16
|
+
data?: {
|
|
17
|
+
applications: IApplicationWithId[];
|
|
18
|
+
user: IUserWithId;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** GET /api/applications/all/active/applications */
|
|
22
|
+
export type GetActiveStudentsApplicationsResponse = ApiResponse<IApplicationWithId[]>;
|
|
23
|
+
/** GET /api/applications/student/:studentId */
|
|
24
|
+
export type GetStudentApplicationsResponse = ApiResponse<IStudentResponse>;
|
|
25
|
+
/** POST /api/applications/student/:studentId */
|
|
26
|
+
export type CreateApplicationResponse = ApiResponse<IApplicationWithId[]>;
|
|
27
|
+
/** PUT /api/applications/student/:studentId */
|
|
28
|
+
export type UpdateStudentApplicationsResponse = ApiResponse<IStudentResponse>;
|
|
29
|
+
/** PUT /api/applications/student/:studentId/:application_id */
|
|
30
|
+
export type UpdateApplicationResponse = ApiResponse<IApplicationWithId>;
|
|
31
|
+
/** DELETE /api/applications/application/:applicationId */
|
|
32
|
+
export type DeleteApplicationResponse = SuccessResponse;
|
|
33
|
+
/** POST /api/applications/:applicationId/refresh */
|
|
34
|
+
export type RefreshApplicationResponse = ApiResponse<IApplicationWithId>;
|
|
35
|
+
/** Admission result summary from GET /api/admissions/overview */
|
|
36
|
+
export interface AdmissionsOverviewData {
|
|
37
|
+
admission?: number;
|
|
38
|
+
rejection?: number;
|
|
39
|
+
pending?: number;
|
|
40
|
+
notYetSubmitted?: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* GET /api/admissions
|
|
44
|
+
* Non-standard: also returns `result` (per-program counts) alongside `data`
|
|
45
|
+
*/
|
|
46
|
+
export interface GetAdmissionsResponse {
|
|
47
|
+
success: boolean;
|
|
48
|
+
data?: IApplicationWithId[];
|
|
49
|
+
result?: ProgramCountItem[];
|
|
50
|
+
}
|
|
51
|
+
/** GET /api/admissions/overview */
|
|
52
|
+
export type GetAdmissionsOverviewResponse = ApiResponse<AdmissionsOverviewData>;
|
|
53
|
+
/** GET /api/student-applications/conflicts */
|
|
54
|
+
export type GetApplicationConflictsResponse = ApiResponse<unknown>;
|
|
55
|
+
/**
|
|
56
|
+
* GET /api/student-applications/deltas
|
|
57
|
+
* Returns per-program student delta arrays
|
|
58
|
+
*/
|
|
59
|
+
export type GetApplicationTaskDeltasResponse = ApiResponse<Array<{
|
|
60
|
+
program: IProgramWithId;
|
|
61
|
+
students: unknown[];
|
|
62
|
+
}>>;
|
|
63
|
+
/** POST /api/account/applications/result/:studentId/:applicationId/:programId/:result */
|
|
64
|
+
export type UpdateStudentApplicationResultResponse = ApiResponse<IApplicationWithId>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { IUserWithId } from './serialized';
|
|
3
|
+
/** GET /auth/verify */
|
|
4
|
+
export interface AuthVerifyResponse {
|
|
5
|
+
success: boolean;
|
|
6
|
+
data?: IUserWithId;
|
|
7
|
+
}
|
|
8
|
+
/** POST /auth/login */
|
|
9
|
+
export type AuthLoginResponse = ApiResponse<IUserWithId>;
|
|
10
|
+
/** POST /auth/oauth/google/callback */
|
|
11
|
+
export type AuthOAuthCallbackResponse = ApiResponse<IUserWithId>;
|
|
12
|
+
/** POST /auth/signup */
|
|
13
|
+
export type AuthRegisterResponse = SuccessResponse;
|
|
14
|
+
/** POST /auth/forgot-password */
|
|
15
|
+
export type ForgotPasswordResponse = SuccessResponse;
|
|
16
|
+
/** POST /auth/reset-password */
|
|
17
|
+
export type ResetPasswordResponse = SuccessResponse;
|
|
18
|
+
/** POST /auth/activation */
|
|
19
|
+
export type ActivationResponse = SuccessResponse;
|
|
20
|
+
/** POST /auth/resend-activation */
|
|
21
|
+
export type ResendActivationResponse = SuccessResponse;
|
|
22
|
+
/** GET /auth/logout */
|
|
23
|
+
export type LogoutResponse = SuccessResponse;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common API response types shared across all domains.
|
|
3
|
+
*/
|
|
4
|
+
/** Base response for mutation endpoints that return no data payload */
|
|
5
|
+
export interface SuccessResponse {
|
|
6
|
+
success: boolean;
|
|
7
|
+
message?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Generic API response wrapper used by most backend endpoints */
|
|
10
|
+
export interface ApiResponse<T = unknown> extends SuccessResponse {
|
|
11
|
+
data?: T;
|
|
12
|
+
}
|
|
13
|
+
/** Paginated list response */
|
|
14
|
+
export interface PaginatedResponse<T> extends ApiResponse<T[]> {
|
|
15
|
+
total?: number;
|
|
16
|
+
}
|
|
17
|
+
export type StudentId = string;
|
|
18
|
+
export type ApplicationId = string;
|
|
19
|
+
export type UserId = string;
|
|
20
|
+
export type ProgramId = string;
|
|
21
|
+
export type DocumentThreadId = string;
|
|
22
|
+
export type MessageId = string;
|
|
23
|
+
export type SurveyId = string;
|
|
24
|
+
export type EventId = string;
|
|
25
|
+
export type TicketId = string;
|
|
26
|
+
export type MeetingId = string;
|
|
27
|
+
export type InterviewId = string;
|
|
28
|
+
export type LeadId = string;
|
|
29
|
+
export type CourseId = string;
|
|
30
|
+
export type KeywordsSetId = string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { ICommunicationWithId } from './serialized';
|
|
3
|
+
/** GET /api/communications/:studentId */
|
|
4
|
+
export type GetCommunicationThreadResponse = ApiResponse<ICommunicationWithId[]>;
|
|
5
|
+
/** GET /api/communications/all */
|
|
6
|
+
export type GetMyCommunicationThreadResponse = ApiResponse<ICommunicationWithId[]>;
|
|
7
|
+
/** GET /api/communications/ping/all */
|
|
8
|
+
export type GetCommunicationUnreadNumberResponse = ApiResponse<number>;
|
|
9
|
+
/** POST /api/communications/:studentId */
|
|
10
|
+
export type PostCommunicationResponse = ApiResponse<ICommunicationWithId>;
|
|
11
|
+
/** GET /api/communications/:studentId/pages/:pageNumber */
|
|
12
|
+
export type LoadCommunicationThreadResponse = ApiResponse<ICommunicationWithId[]>;
|
|
13
|
+
/** PUT /api/communications/:communication_id/:communication_messageId */
|
|
14
|
+
export type UpdateCommunicationMessageResponse = ApiResponse<ICommunicationWithId>;
|
|
15
|
+
/** DELETE /api/communications/:student_id/:communication_messageId */
|
|
16
|
+
export type DeleteCommunicationMessageResponse = SuccessResponse;
|
|
17
|
+
/** PUT /api/communications/:student_id/:communication_messageId/:ignoreMessageState/ignore */
|
|
18
|
+
export type IgnoreCommunicationMessageResponse = ApiResponse<ICommunicationWithId>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
import type { IAllCourseWithId, IKeywordsetWithId } from './serialized';
|
|
3
|
+
import type { ICourse } from '../model/Course';
|
|
4
|
+
/** GET /api/all-courses */
|
|
5
|
+
export type GetAllCoursesResponse = ApiResponse<IAllCourseWithId[]>;
|
|
6
|
+
/** GET /api/all-courses/:courseId */
|
|
7
|
+
export type GetAllCourseResponse = ApiResponse<IAllCourseWithId>;
|
|
8
|
+
/** POST /api/all-courses */
|
|
9
|
+
export type CreateAllCourseResponse = ApiResponse<IAllCourseWithId>;
|
|
10
|
+
/** PUT /api/all-courses/:courseId */
|
|
11
|
+
export type UpdateAllCourseResponse = ApiResponse<IAllCourseWithId>;
|
|
12
|
+
/** DELETE /api/all-courses/:courseId */
|
|
13
|
+
export type DeleteAllCourseResponse = SuccessResponse;
|
|
14
|
+
/** GET /api/course-keywords */
|
|
15
|
+
export type GetCourseKeywordsetsResponse = ApiResponse<IKeywordsetWithId[]>;
|
|
16
|
+
/** GET /api/course-keywords/:keywordsSetId */
|
|
17
|
+
export type GetCourseKeywordsetResponse = ApiResponse<IKeywordsetWithId>;
|
|
18
|
+
/** POST /api/course-keywords/new */
|
|
19
|
+
export type CreateKeywordsetResponse = ApiResponse<IKeywordsetWithId>;
|
|
20
|
+
/** PUT /api/course-keywords/:keywordsSetId */
|
|
21
|
+
export type UpdateKeywordsetResponse = ApiResponse<IKeywordsetWithId>;
|
|
22
|
+
/** DELETE /api/course-keywords/:keywordsSetId */
|
|
23
|
+
export type DeleteKeywordsetResponse = SuccessResponse;
|
|
24
|
+
/** GET /api/courses/:student_id */
|
|
25
|
+
export type GetStudentCoursesResponse = ApiResponse<ICourse>;
|
|
26
|
+
/** PUT /api/courses/:student_id */
|
|
27
|
+
export type UpdateStudentCoursesResponse = ApiResponse<ICourse>;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { ApiResponse, SuccessResponse } from './common';
|
|
2
|
+
/**
|
|
3
|
+
* CRM-specific types.
|
|
4
|
+
* The CRM module uses a relational database (PostgreSQL), not MongoDB,
|
|
5
|
+
* so all types are defined purely from the API response shape.
|
|
6
|
+
*/
|
|
7
|
+
/** A CRM lead record */
|
|
8
|
+
export interface CRMLeadItem {
|
|
9
|
+
id?: string;
|
|
10
|
+
fullName?: string;
|
|
11
|
+
source?: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
phone?: string;
|
|
14
|
+
status?: string;
|
|
15
|
+
closeLikelihood?: string | number;
|
|
16
|
+
intendedStartTime?: string;
|
|
17
|
+
intendedProgramLevel?: string;
|
|
18
|
+
intendedDirection?: string;
|
|
19
|
+
salesRep?: string;
|
|
20
|
+
salesNote?: string;
|
|
21
|
+
meetingCount?: number;
|
|
22
|
+
createdAt?: string | Date;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
/** A CRM lead with its associated meetings */
|
|
26
|
+
export interface CRMLeadWithMeetings extends CRMLeadItem {
|
|
27
|
+
meetings?: CRMMeetingItem[];
|
|
28
|
+
}
|
|
29
|
+
/** A CRM meeting record */
|
|
30
|
+
export interface CRMMeetingItem {
|
|
31
|
+
id?: string;
|
|
32
|
+
leadId?: string;
|
|
33
|
+
leadFullName?: string;
|
|
34
|
+
dateTime?: string | Date;
|
|
35
|
+
summary?: string;
|
|
36
|
+
meetingLink?: string;
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
}
|
|
39
|
+
/** A CRM deal record */
|
|
40
|
+
export interface CRMDealItem {
|
|
41
|
+
id?: string;
|
|
42
|
+
dealDataCols?: unknown;
|
|
43
|
+
leadFullName?: string;
|
|
44
|
+
salesLabel?: string;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
/** A CRM sales representative */
|
|
48
|
+
export interface CRMSalesRep {
|
|
49
|
+
id?: string;
|
|
50
|
+
name?: string;
|
|
51
|
+
email?: string;
|
|
52
|
+
[key: string]: unknown;
|
|
53
|
+
}
|
|
54
|
+
/** CRM statistics summary */
|
|
55
|
+
export interface CRMStatsData {
|
|
56
|
+
totalLeadCount?: number;
|
|
57
|
+
recentLeadCount?: number;
|
|
58
|
+
convertedLeadCount?: number;
|
|
59
|
+
totalMeetingCount?: number;
|
|
60
|
+
recentMeetingCount?: number;
|
|
61
|
+
avgResponseTimeDays?: number;
|
|
62
|
+
p50ResponseTimeDays?: number;
|
|
63
|
+
p95ResponseTimeDays?: number;
|
|
64
|
+
avgSalesCycleDays?: number;
|
|
65
|
+
p50SalesCycleDays?: number;
|
|
66
|
+
p95SalesCycleDays?: number;
|
|
67
|
+
leadsCountByDate?: unknown[];
|
|
68
|
+
meetingCountByDate?: unknown[];
|
|
69
|
+
totalLeadsWithMeeting?: number;
|
|
70
|
+
totalLeadsWithFollowUp?: number;
|
|
71
|
+
}
|
|
72
|
+
/** GET /api/crm/stats */
|
|
73
|
+
export type GetCRMStatsResponse = ApiResponse<CRMStatsData>;
|
|
74
|
+
/** GET /api/crm/leads */
|
|
75
|
+
export type GetCRMLeadsResponse = ApiResponse<CRMLeadItem[]>;
|
|
76
|
+
/** GET /api/crm/leads/:leadId */
|
|
77
|
+
export type GetCRMLeadResponse = ApiResponse<CRMLeadWithMeetings>;
|
|
78
|
+
/** GET /api/crm/students/:userId/lead */
|
|
79
|
+
export type GetLeadIdByUserIdResponse = ApiResponse<{
|
|
80
|
+
id: string;
|
|
81
|
+
}>;
|
|
82
|
+
/**
|
|
83
|
+
* POST /api/crm/students/:userId/lead
|
|
84
|
+
* Non-standard: includes matchingMeetingCounts alongside data
|
|
85
|
+
*/
|
|
86
|
+
export interface CreateLeadFromStudentResponse {
|
|
87
|
+
success: boolean;
|
|
88
|
+
message?: string;
|
|
89
|
+
matchingMeetingCounts?: number;
|
|
90
|
+
data?: CRMLeadItem;
|
|
91
|
+
}
|
|
92
|
+
/** GET /api/crm/meetings */
|
|
93
|
+
export type GetCRMMeetingsResponse = ApiResponse<CRMMeetingItem[]>;
|
|
94
|
+
/** GET /api/crm/meetings/:meetingId */
|
|
95
|
+
export type GetCRMMeetingResponse = ApiResponse<CRMMeetingItem>;
|
|
96
|
+
/** PUT /api/crm/meetings/:meetingId */
|
|
97
|
+
export type UpdateCRMMeetingResponse = ApiResponse<CRMMeetingItem>;
|
|
98
|
+
/** GET /api/crm/deals */
|
|
99
|
+
export type GetCRMDealsResponse = ApiResponse<CRMDealItem[]>;
|
|
100
|
+
/** POST /api/crm/deals */
|
|
101
|
+
export type CreateCRMDealResponse = ApiResponse<CRMDealItem>;
|
|
102
|
+
/** PUT /api/crm/deals/:dealId */
|
|
103
|
+
export type UpdateCRMDealResponse = ApiResponse<CRMDealItem>;
|
|
104
|
+
/** GET /api/crm/sales-reps */
|
|
105
|
+
export type GetCRMSalesRepsResponse = ApiResponse<CRMSalesRep[]>;
|
|
106
|
+
/** POST /api/crm/instant-invite */
|
|
107
|
+
export type InstantInviteResponse = SuccessResponse;
|