@taiger-common/model 1.0.53 → 1.0.54
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 +33 -0
- package/dist/cjs/api/applications.js +44 -0
- package/dist/cjs/api/audit.js +6 -0
- package/dist/cjs/api/auth.js +17 -0
- package/dist/cjs/api/common.js +28 -1
- package/dist/cjs/api/communications.js +13 -0
- package/dist/cjs/api/courses.js +21 -0
- package/dist/cjs/api/crm.js +85 -0
- package/dist/cjs/api/documentThreads.js +42 -0
- package/dist/cjs/api/documentations.js +31 -0
- package/dist/cjs/api/events.js +20 -0
- package/dist/cjs/api/interviews.js +33 -0
- package/dist/cjs/api/meetings.js +18 -0
- package/dist/cjs/api/notes.js +6 -0
- package/dist/cjs/api/permissions.js +7 -0
- package/dist/cjs/api/portals.js +22 -0
- package/dist/cjs/api/programRequirements.js +24 -0
- package/dist/cjs/api/programs.js +91 -0
- package/dist/cjs/api/search.js +22 -0
- package/dist/cjs/api/serialized.js +44 -0
- package/dist/cjs/api/students.js +27 -0
- package/dist/cjs/api/teams.js +46 -0
- package/dist/cjs/api/tickets.js +19 -0
- package/dist/cjs/api/users.js +40 -0
- package/dist/cjs/api/widgets.js +19 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/schema/index.js +22 -0
- package/dist/cjs/schema/models.js +518 -0
- package/dist/cjs/schema/serialized.js +202 -0
- package/dist/esm/api/account.js +32 -1
- package/dist/esm/api/applications.js +43 -1
- package/dist/esm/api/audit.js +5 -1
- package/dist/esm/api/auth.js +16 -1
- package/dist/esm/api/common.js +24 -1
- package/dist/esm/api/communications.js +12 -1
- package/dist/esm/api/courses.js +20 -1
- package/dist/esm/api/crm.js +84 -1
- package/dist/esm/api/documentThreads.js +41 -1
- package/dist/esm/api/documentations.js +30 -1
- package/dist/esm/api/events.js +19 -1
- package/dist/esm/api/interviews.js +32 -1
- package/dist/esm/api/meetings.js +17 -1
- package/dist/esm/api/notes.js +5 -1
- package/dist/esm/api/permissions.js +6 -1
- package/dist/esm/api/portals.js +21 -1
- package/dist/esm/api/programRequirements.js +23 -1
- package/dist/esm/api/programs.js +90 -1
- package/dist/esm/api/search.js +21 -1
- package/dist/esm/api/serialized.js +9 -1
- package/dist/esm/api/students.js +26 -1
- package/dist/esm/api/teams.js +45 -1
- package/dist/esm/api/tickets.js +18 -1
- package/dist/esm/api/users.js +39 -1
- package/dist/esm/api/widgets.js +18 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/schema/index.js +6 -0
- package/dist/esm/schema/models.js +515 -0
- package/dist/esm/schema/serialized.js +199 -0
- package/dist/types/api/account.d.ts +485 -30
- package/dist/types/api/applications.d.ts +3392 -39
- package/dist/types/api/audit.d.ts +88 -3
- package/dist/types/api/auth.d.ts +3402 -14
- package/dist/types/api/common.d.ts +68 -8
- package/dist/types/api/communications.d.ts +609 -10
- package/dist/types/api/courses.d.ts +781 -15
- package/dist/types/api/crm.d.ts +1091 -85
- package/dist/types/api/documentThreads.d.ts +38228 -39
- package/dist/types/api/documentations.d.ts +913 -24
- package/dist/types/api/events.d.ts +7191 -17
- package/dist/types/api/interviews.d.ts +785 -30
- package/dist/types/api/meetings.d.ts +45 -16
- package/dist/types/api/notes.d.ts +83 -4
- package/dist/types/api/permissions.d.ts +193 -4
- package/dist/types/api/portals.d.ts +764 -17
- package/dist/types/api/programRequirements.d.ts +2675 -19
- package/dist/types/api/programs.d.ts +3019 -96
- package/dist/types/api/search.d.ts +286 -20
- package/dist/types/api/serialized.d.ts +3 -152
- package/dist/types/api/students.d.ts +289 -24
- package/dist/types/api/teams.d.ts +3652 -45
- package/dist/types/api/tickets.d.ts +948 -14
- package/dist/types/api/users.d.ts +6948 -39
- package/dist/types/api/widgets.d.ts +221 -16
- package/dist/types/index.d.ts +1 -0
- package/dist/types/schema/index.d.ts +6 -0
- package/dist/types/schema/models.d.ts +2028 -0
- package/dist/types/schema/serialized.d.ts +8813 -0
- package/dist/umd/index.js +1 -1
- package/package.json +4 -2
|
@@ -1 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SuccessResponseSchema, createApiResponseSchema } from './common';
|
|
3
|
+
import { ProgramrequirementWithIdSchema, ProgramWithIdSchema, KeywordsetWithIdSchema } from './serialized';
|
|
4
|
+
// =========== Schemas ===========
|
|
5
|
+
export var ProgramsAndKeywordsDataSchema = z.object({
|
|
6
|
+
distinctPrograms: z.array(ProgramWithIdSchema).optional(),
|
|
7
|
+
keywordsets: z.array(KeywordsetWithIdSchema).optional()
|
|
8
|
+
});
|
|
9
|
+
export var GetProgramRequirementsResponseSchema = createApiResponseSchema(z.array(ProgramrequirementWithIdSchema));
|
|
10
|
+
export var GetProgramRequirementResponseSchema = z.object({
|
|
11
|
+
success: z.boolean(),
|
|
12
|
+
data: z
|
|
13
|
+
.object({
|
|
14
|
+
requirement: ProgramrequirementWithIdSchema,
|
|
15
|
+
distinctPrograms: z.array(ProgramWithIdSchema).optional(),
|
|
16
|
+
keywordsets: z.array(KeywordsetWithIdSchema).optional()
|
|
17
|
+
})
|
|
18
|
+
.optional()
|
|
19
|
+
});
|
|
20
|
+
export var GetProgramsAndKeywordSetsResponseSchema = createApiResponseSchema(ProgramsAndKeywordsDataSchema);
|
|
21
|
+
export var CreateProgramRequirementResponseSchema = createApiResponseSchema(ProgramrequirementWithIdSchema);
|
|
22
|
+
export var UpdateProgramRequirementResponseSchema = createApiResponseSchema(ProgramrequirementWithIdSchema);
|
|
23
|
+
export var DeleteProgramRequirementResponseSchema = SuccessResponseSchema;
|
package/dist/esm/api/programs.js
CHANGED
|
@@ -1 +1,90 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SuccessResponseSchema, createApiResponseSchema } from './common';
|
|
3
|
+
import { ProgramWithIdSchema, StudentResponseSchema } from './serialized';
|
|
4
|
+
// =========== Schemas ===========
|
|
5
|
+
export var SchoolDistributionItemSchema = z.object({
|
|
6
|
+
school: z.string().optional(),
|
|
7
|
+
country: z.string().optional(),
|
|
8
|
+
city: z.string().optional(),
|
|
9
|
+
programCount: z.number().optional()
|
|
10
|
+
});
|
|
11
|
+
export var SchoolAttributeItemSchema = z.object({
|
|
12
|
+
school: z.string().optional(),
|
|
13
|
+
isPrivateSchool: z.boolean().optional(),
|
|
14
|
+
isPartnerSchool: z.boolean().optional(),
|
|
15
|
+
schoolType: z.string().optional(),
|
|
16
|
+
country: z.string().optional(),
|
|
17
|
+
tags: z.array(z.string()).optional(),
|
|
18
|
+
count: z.number().optional()
|
|
19
|
+
});
|
|
20
|
+
export var TopApplicationProgramSchema = z.object({
|
|
21
|
+
programId: z.string().optional(),
|
|
22
|
+
school: z.string().optional(),
|
|
23
|
+
program_name: z.string().optional(),
|
|
24
|
+
degree: z.string().optional(),
|
|
25
|
+
semester: z.string().optional(),
|
|
26
|
+
country: z.string().optional(),
|
|
27
|
+
totalApplications: z.number().optional(),
|
|
28
|
+
submittedCount: z.number().optional(),
|
|
29
|
+
admittedCount: z.number().optional(),
|
|
30
|
+
rejectedCount: z.number().optional(),
|
|
31
|
+
pendingCount: z.number().optional(),
|
|
32
|
+
admissionRate: z.number().optional()
|
|
33
|
+
});
|
|
34
|
+
export var RecentlyUpdatedProgramSchema = z.object({
|
|
35
|
+
school: z.string().optional(),
|
|
36
|
+
program_name: z.string().optional(),
|
|
37
|
+
degree: z.string().optional(),
|
|
38
|
+
semester: z.string().optional(),
|
|
39
|
+
updatedAt: z.union([z.coerce.date(), z.string()]).optional(),
|
|
40
|
+
whoupdated: z.string().optional()
|
|
41
|
+
});
|
|
42
|
+
export var ProgramsOverviewDataSchema = z.object({
|
|
43
|
+
totalPrograms: z.number().optional(),
|
|
44
|
+
totalSchools: z.number().optional(),
|
|
45
|
+
byCountry: z.array(z.object({ country: z.string().optional(), count: z.number().optional() })).optional(),
|
|
46
|
+
byDegree: z.array(z.object({ degree: z.string().optional(), count: z.number().optional() })).optional(),
|
|
47
|
+
byLanguage: z.array(z.object({ language: z.string().optional(), count: z.number().optional() })).optional(),
|
|
48
|
+
bySubject: z.array(z.object({ subject: z.string().optional(), count: z.number().optional() })).optional(),
|
|
49
|
+
bySchoolType: z
|
|
50
|
+
.array(z.object({
|
|
51
|
+
schoolType: z.string().optional(),
|
|
52
|
+
isPrivateSchool: z.boolean().optional(),
|
|
53
|
+
isPartnerSchool: z.boolean().optional(),
|
|
54
|
+
count: z.number().optional()
|
|
55
|
+
}))
|
|
56
|
+
.optional(),
|
|
57
|
+
topSchools: z.array(SchoolDistributionItemSchema).optional(),
|
|
58
|
+
topContributors: z
|
|
59
|
+
.array(z.object({
|
|
60
|
+
contributor: z.string().optional(),
|
|
61
|
+
updateCount: z.number().optional(),
|
|
62
|
+
lastUpdate: z.union([z.coerce.date(), z.string()]).optional()
|
|
63
|
+
}))
|
|
64
|
+
.optional(),
|
|
65
|
+
recentlyUpdated: z.array(RecentlyUpdatedProgramSchema).optional(),
|
|
66
|
+
topApplicationPrograms: z.array(TopApplicationProgramSchema).optional(),
|
|
67
|
+
generatedAt: z.coerce.date().optional()
|
|
68
|
+
});
|
|
69
|
+
export var GetProgramsResponseSchema = createApiResponseSchema(z.array(ProgramWithIdSchema));
|
|
70
|
+
export var GetProgramsOverviewResponseSchema = createApiResponseSchema(ProgramsOverviewDataSchema);
|
|
71
|
+
export var GetProgramResponseSchema = z.object({
|
|
72
|
+
success: z.boolean(),
|
|
73
|
+
data: ProgramWithIdSchema,
|
|
74
|
+
students: z.array(StudentResponseSchema).optional(),
|
|
75
|
+
vc: z.array(z.unknown()).optional()
|
|
76
|
+
});
|
|
77
|
+
export var CreateProgramResponseSchema = createApiResponseSchema(ProgramWithIdSchema);
|
|
78
|
+
export var UpdateProgramResponseSchema = z.object({
|
|
79
|
+
success: z.boolean(),
|
|
80
|
+
data: ProgramWithIdSchema.optional(),
|
|
81
|
+
vc: z.array(z.unknown()).optional()
|
|
82
|
+
});
|
|
83
|
+
export var DeleteProgramResponseSchema = SuccessResponseSchema;
|
|
84
|
+
export var GetSchoolsDistributionResponseSchema = createApiResponseSchema(z.array(SchoolDistributionItemSchema));
|
|
85
|
+
export var GetDistinctSchoolsResponseSchema = createApiResponseSchema(z.array(SchoolAttributeItemSchema));
|
|
86
|
+
export var UpdateSchoolAttributesResponseSchema = SuccessResponseSchema;
|
|
87
|
+
export var GetSameProgramStudentsResponseSchema = createApiResponseSchema(z.array(StudentResponseSchema));
|
|
88
|
+
export var GetProgramChangeRequestsResponseSchema = createApiResponseSchema(z.array(z.unknown()));
|
|
89
|
+
export var ReviewProgramChangeRequestsResponseSchema = SuccessResponseSchema;
|
|
90
|
+
export var RefreshProgramResponseSchema = UpdateProgramResponseSchema;
|
package/dist/esm/api/search.js
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createApiResponseSchema } from './common';
|
|
3
|
+
import { DocumentationWithIdSchema, CommunicationWithIdSchema } from './serialized';
|
|
4
|
+
// =========== Schemas ===========
|
|
5
|
+
export var SearchResultItemSchema = z
|
|
6
|
+
.object({ score: z.number().optional() })
|
|
7
|
+
.catchall(z.unknown());
|
|
8
|
+
export var StudentSearchResultSchema = z.object({
|
|
9
|
+
_id: z.string().optional(),
|
|
10
|
+
firstname: z.string().optional(),
|
|
11
|
+
lastname: z.string().optional(),
|
|
12
|
+
firstname_chinese: z.string().optional(),
|
|
13
|
+
lastname_chinese: z.string().optional(),
|
|
14
|
+
role: z.string().optional(),
|
|
15
|
+
email: z.string().optional(),
|
|
16
|
+
score: z.number().optional()
|
|
17
|
+
});
|
|
18
|
+
export var GetQueryResultsResponseSchema = createApiResponseSchema(z.array(SearchResultItemSchema));
|
|
19
|
+
export var GetQueryPublicResultsResponseSchema = createApiResponseSchema(z.array(DocumentationWithIdSchema));
|
|
20
|
+
export var GetQueryStudentsResultsResponseSchema = createApiResponseSchema(z.array(StudentSearchResultSchema));
|
|
21
|
+
export var GetQueryStudentResultsResponseSchema = createApiResponseSchema(z.array(CommunicationWithIdSchema));
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Serialized "API layer" versions of core model interfaces.
|
|
3
3
|
* All ObjectId refs become strings to match JSON API serialization.
|
|
4
|
+
* Types are inferred from Zod schemas via z.infer<>.
|
|
4
5
|
*/
|
|
5
|
-
export
|
|
6
|
+
// Re-export all serialized schemas and their inferred types from the schema layer
|
|
7
|
+
export {
|
|
8
|
+
// Schemas
|
|
9
|
+
ProgramWithIdSchema, AgentWithIdSchema, EditorWithIdSchema, ApplicationWithIdSchema, ApplicationPopulatedSchema, StudentResponseSchema, UserWithIdSchema, DocumentthreadWithIdSchema, DocumentthreadPopulatedSchema, CommunicationWithIdSchema, InterviewWithIdSchema, InterviewSurveyResponseWithIdSchema, TicketWithIdSchema, ComplaintWithIdSchema, AuditWithIdSchema, EventWithIdSchema, NoteWithIdSchema, PermissionWithIdSchema, DocumentationWithIdSchema, DocspageWithIdSchema, InternaldocWithIdSchema, ProgramrequirementWithIdSchema, AllCourseWithIdSchema, KeywordsetWithIdSchema, SurveyInputWithIdSchema, TemplateWithIdSchema, BasedocumentationslinkWithIdSchema } from '../schema/serialized';
|
|
10
|
+
// Re-export model sub-schemas for use in API files
|
|
11
|
+
// Note: the TypeScript types (IUserAcademicBackgroundUniversity etc.) are already
|
|
12
|
+
// exported from src/model/User.ts — only the Zod schemas are exported here.
|
|
13
|
+
export { UserAcademicBackgroundUniversitySchema, UserAcademicBackgroundLanguageSchema, UserApplicationPreferenceSchema, UserAttributeSchema, UserNotificationSchema, UserTaigeraiSchema, UserProfileItemSchema, UserGeneraldocsThreadSchema } from '../schema/models';
|
package/dist/esm/api/students.js
CHANGED
|
@@ -1 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SuccessResponseSchema, createApiResponseSchema } from './common';
|
|
3
|
+
import { StudentResponseSchema, BasedocumentationslinkWithIdSchema } from './serialized';
|
|
4
|
+
// =========== Schemas ===========
|
|
5
|
+
export var GetStudentsResponseSchema = createApiResponseSchema(z.array(StudentResponseSchema));
|
|
6
|
+
export var GetActiveStudentsResponseSchema = createApiResponseSchema(z.array(StudentResponseSchema));
|
|
7
|
+
export var GetStudentResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
|
8
|
+
export var GetStudentDocLinksResponseSchema = z.object({
|
|
9
|
+
success: z.boolean(),
|
|
10
|
+
data: StudentResponseSchema.optional(),
|
|
11
|
+
basedocumentationlinks: z.array(BasedocumentationslinkWithIdSchema).optional()
|
|
12
|
+
});
|
|
13
|
+
export var GetStudentsAndDocLinksResponseSchema = createApiResponseSchema(z.array(StudentResponseSchema));
|
|
14
|
+
export var UpdateArchivStudentsResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
|
15
|
+
export var UpdateStudentAgentsResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
|
16
|
+
export var UpdateStudentEditorsResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
|
17
|
+
export var UpdateStudentAttributesResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
|
18
|
+
export var UpdateDocumentationHelperLinkResponseSchema = SuccessResponseSchema;
|
|
19
|
+
export var UploadStudentFileResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
|
20
|
+
export var DeleteStudentFileResponseSchema = SuccessResponseSchema;
|
|
21
|
+
export var UploadVPDFileResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
|
22
|
+
export var DeleteVPDFileResponseSchema = SuccessResponseSchema;
|
|
23
|
+
export var SetAsNotNeededResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
|
24
|
+
export var SetUniAssistPaidResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
|
25
|
+
export var UpdateProfileDocStatusResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
|
26
|
+
export var GetStudentUniAssistResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
package/dist/esm/api/teams.js
CHANGED
|
@@ -1 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createApiResponseSchema } from './common';
|
|
3
|
+
import { UserWithIdSchema, StudentResponseSchema } from './serialized';
|
|
4
|
+
// =========== Schemas ===========
|
|
5
|
+
export var AgentStudentDistributionItemSchema = z.object({
|
|
6
|
+
agent_id: z.string().optional(),
|
|
7
|
+
firstname: z.string().optional(),
|
|
8
|
+
lastname: z.string().optional(),
|
|
9
|
+
studentCount: z.number().optional()
|
|
10
|
+
});
|
|
11
|
+
export var StatisticsOverviewDataSchema = z.object({
|
|
12
|
+
documents: z.unknown().optional(),
|
|
13
|
+
agents_data: z.array(z.unknown()).optional(),
|
|
14
|
+
editors_data: z.array(z.unknown()).optional(),
|
|
15
|
+
students_years_pair: z.array(z.unknown()).optional(),
|
|
16
|
+
students_creation_dates: z.unknown().optional()
|
|
17
|
+
});
|
|
18
|
+
export var StatisticsKPIDataSchema = z.object({
|
|
19
|
+
finished_docs: z.array(z.unknown()).optional()
|
|
20
|
+
});
|
|
21
|
+
export var StatisticsResponseTimeDataSchema = z.object({
|
|
22
|
+
agents_data: z.array(z.unknown()).optional(),
|
|
23
|
+
editors_data: z.array(z.unknown()).optional(),
|
|
24
|
+
studentAvgResponseTime: z.array(z.unknown()).optional()
|
|
25
|
+
});
|
|
26
|
+
export var TasksOverviewDataSchema = z.object({
|
|
27
|
+
noAgentsStudents: z.number().optional(),
|
|
28
|
+
noEditorsStudents: z.number().optional(),
|
|
29
|
+
noTrainerInInterviewsStudents: z.number().optional(),
|
|
30
|
+
noEssayWritersEssays: z.number().optional()
|
|
31
|
+
});
|
|
32
|
+
export var GetTeamMembersResponseSchema = createApiResponseSchema(z.array(UserWithIdSchema));
|
|
33
|
+
export var GetArchivStudentsResponseSchema = createApiResponseSchema(z.array(StudentResponseSchema));
|
|
34
|
+
export var GetStatisticsOverviewResponseSchema = createApiResponseSchema(StatisticsOverviewDataSchema);
|
|
35
|
+
export var GetStatisticsAgentsResponseSchema = z.object({
|
|
36
|
+
success: z.boolean(),
|
|
37
|
+
agentStudentDistribution: z.array(AgentStudentDistributionItemSchema).optional()
|
|
38
|
+
});
|
|
39
|
+
export var GetStatisticsKPIResponseSchema = createApiResponseSchema(StatisticsKPIDataSchema);
|
|
40
|
+
export var GetStatisticsResponseTimeResponseSchema = createApiResponseSchema(StatisticsResponseTimeDataSchema);
|
|
41
|
+
export var GetTasksOverviewResponseSchema = createApiResponseSchema(TasksOverviewDataSchema);
|
|
42
|
+
export var GetIsManagerResponseSchema = createApiResponseSchema(z.object({ isManager: z.boolean() }));
|
|
43
|
+
export var GetAgentProfileResponseSchema = createApiResponseSchema(UserWithIdSchema);
|
|
44
|
+
export var GetResponseIntervalByStudentResponseSchema = createApiResponseSchema(StudentResponseSchema);
|
|
45
|
+
export var GetEssayWritersTeamsResponseSchema = createApiResponseSchema(z.array(UserWithIdSchema));
|
package/dist/esm/api/tickets.js
CHANGED
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SuccessResponseSchema, createApiResponseSchema } from './common';
|
|
3
|
+
import { TicketWithIdSchema, ComplaintWithIdSchema } from './serialized';
|
|
4
|
+
// =========== Schemas ===========
|
|
5
|
+
// --- Program Tickets ---
|
|
6
|
+
export var GetProgramTicketsResponseSchema = createApiResponseSchema(z.array(TicketWithIdSchema));
|
|
7
|
+
export var GetProgramTicketResponseSchema = createApiResponseSchema(z.array(TicketWithIdSchema));
|
|
8
|
+
export var CreateTicketResponseSchema = createApiResponseSchema(TicketWithIdSchema);
|
|
9
|
+
export var UpdateTicketResponseSchema = createApiResponseSchema(TicketWithIdSchema);
|
|
10
|
+
export var DeleteTicketResponseSchema = SuccessResponseSchema;
|
|
11
|
+
// --- Complaints ---
|
|
12
|
+
export var GetComplaintsResponseSchema = createApiResponseSchema(z.array(ComplaintWithIdSchema));
|
|
13
|
+
export var GetComplaintResponseSchema = createApiResponseSchema(ComplaintWithIdSchema);
|
|
14
|
+
export var CreateComplaintResponseSchema = createApiResponseSchema(ComplaintWithIdSchema);
|
|
15
|
+
export var UpdateComplaintResponseSchema = createApiResponseSchema(ComplaintWithIdSchema);
|
|
16
|
+
export var PostMessageInComplaintResponseSchema = createApiResponseSchema(ComplaintWithIdSchema);
|
|
17
|
+
export var DeleteMessageInComplaintResponseSchema = SuccessResponseSchema;
|
|
18
|
+
export var DeleteComplaintResponseSchema = SuccessResponseSchema;
|
package/dist/esm/api/users.js
CHANGED
|
@@ -1 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SuccessResponseSchema, createApiResponseSchema } from './common';
|
|
3
|
+
import { UserWithIdSchema } from './serialized';
|
|
4
|
+
// =========== Schemas ===========
|
|
5
|
+
export var UsersCountDataSchema = z.object({
|
|
6
|
+
totalUsers: z.number().optional(),
|
|
7
|
+
studentCount: z.number().optional(),
|
|
8
|
+
agentCount: z.number().optional(),
|
|
9
|
+
editorCount: z.number().optional(),
|
|
10
|
+
externalCount: z.number().optional(),
|
|
11
|
+
adminCount: z.number().optional(),
|
|
12
|
+
guestCount: z.number().optional()
|
|
13
|
+
});
|
|
14
|
+
export var GetUsersCountResponseSchema = UsersCountDataSchema.extend({
|
|
15
|
+
success: z.boolean().optional()
|
|
16
|
+
}).catchall(z.unknown());
|
|
17
|
+
export var UsersOverviewMetricItemSchema = z
|
|
18
|
+
.object({ count: z.number() })
|
|
19
|
+
.catchall(z.unknown());
|
|
20
|
+
export var UsersOverviewDataSchema = z.object({
|
|
21
|
+
byTargetDegree: z.array(UsersOverviewMetricItemSchema).optional(),
|
|
22
|
+
byApplicationSemester: z.array(UsersOverviewMetricItemSchema).optional(),
|
|
23
|
+
byTargetField: z.array(UsersOverviewMetricItemSchema).optional(),
|
|
24
|
+
byProgramLanguage: z.array(UsersOverviewMetricItemSchema).optional(),
|
|
25
|
+
byUniversity: z.array(UsersOverviewMetricItemSchema).optional(),
|
|
26
|
+
generatedAt: z.coerce.date().optional()
|
|
27
|
+
});
|
|
28
|
+
export var GetUsersOverviewResponseSchema = createApiResponseSchema(UsersOverviewDataSchema);
|
|
29
|
+
export var GetUsersResponseSchema = createApiResponseSchema(z.array(UserWithIdSchema));
|
|
30
|
+
export var GetUserResponseSchema = createApiResponseSchema(UserWithIdSchema);
|
|
31
|
+
export var AddUserResponseSchema = z.object({
|
|
32
|
+
success: z.boolean(),
|
|
33
|
+
data: z.array(UserWithIdSchema),
|
|
34
|
+
newUser: z.string()
|
|
35
|
+
});
|
|
36
|
+
export var UpdateUserResponseSchema = createApiResponseSchema(UserWithIdSchema);
|
|
37
|
+
export var DeleteUserResponseSchema = SuccessResponseSchema;
|
|
38
|
+
export var UpdateArchivUserResponseSchema = createApiResponseSchema(z.array(UserWithIdSchema));
|
|
39
|
+
export var GetEssayWritersResponseSchema = createApiResponseSchema(z.array(UserWithIdSchema));
|
package/dist/esm/api/widgets.js
CHANGED
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SuccessResponseSchema, createApiResponseSchema } from './common';
|
|
3
|
+
import { CourseAnalysisSchema } from '../schema/models';
|
|
4
|
+
// =========== Schemas ===========
|
|
5
|
+
export var WidgetTranscriptResponseSchema = createApiResponseSchema(CourseAnalysisSchema);
|
|
6
|
+
export var WidgetDownloadJsonResponseSchema = z.object({
|
|
7
|
+
success: z.boolean(),
|
|
8
|
+
json: z.unknown().optional(),
|
|
9
|
+
fileKey: z.string().optional()
|
|
10
|
+
});
|
|
11
|
+
export var WidgetExportPDFResponseSchema = SuccessResponseSchema;
|
|
12
|
+
export var TaigerAiResponseSchema = createApiResponseSchema(z.string());
|
|
13
|
+
export var ProcessProgramListResponseSchema = SuccessResponseSchema;
|
|
14
|
+
export var CvmlrlAiResponseSchema = createApiResponseSchema(z.string());
|
|
15
|
+
export var TaigerChatAssistantResponseSchema = createApiResponseSchema(z.string());
|
|
16
|
+
export var TranscriptAnalyserResponseSchema = createApiResponseSchema(CourseAnalysisSchema);
|
|
17
|
+
export var AnalyzedFileDownloadResponseSchema = WidgetDownloadJsonResponseSchema;
|
|
18
|
+
export var GetExpenseResponseSchema = createApiResponseSchema(z.unknown());
|
package/dist/esm/index.js
CHANGED