@juki-team/commons 0.2.16 → 0.2.19

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.
Files changed (47) hide show
  1. package/dist/constants/entity.d.ts +3 -3
  2. package/dist/constants/entity.js +1 -1
  3. package/dist/constants/user.d.ts +2 -2
  4. package/dist/dto/class.d.ts +30 -30
  5. package/dist/dto/code.d.ts +1 -1
  6. package/dist/dto/comments.d.ts +7 -7
  7. package/dist/dto/contest.d.ts +43 -39
  8. package/dist/dto/course.d.ts +13 -13
  9. package/dist/dto/entity.d.ts +49 -30
  10. package/dist/dto/excalidraw.d.ts +7 -7
  11. package/dist/dto/file.d.ts +10 -15
  12. package/dist/dto/image.d.ts +1 -1
  13. package/dist/dto/judge.d.ts +3 -3
  14. package/dist/dto/markdown.d.ts +7 -7
  15. package/dist/dto/mermaid.d.ts +7 -7
  16. package/dist/dto/organization.d.ts +18 -14
  17. package/dist/dto/problem.d.ts +19 -26
  18. package/dist/dto/scoreboard.d.ts +8 -18
  19. package/dist/dto/session.d.ts +6 -6
  20. package/dist/dto/socket.d.ts +54 -65
  21. package/dist/dto/statistics.d.ts +7 -7
  22. package/dist/dto/submission.d.ts +20 -19
  23. package/dist/dto/system.d.ts +4 -84
  24. package/dist/dto/url.d.ts +1 -1
  25. package/dist/dto/user.d.ts +19 -25
  26. package/dist/dto/virtualUser.d.ts +2 -23
  27. package/dist/dto/worksheet.d.ts +11 -11
  28. package/dist/dto/worksheetSubmission.d.ts +25 -25
  29. package/dist/helpers/assignment.d.ts +4 -4
  30. package/dist/helpers/entity.d.ts +2 -2
  31. package/dist/helpers/entity.js +1 -1
  32. package/dist/helpers/socket.d.ts +43 -43
  33. package/dist/helpers/socket.js +90 -90
  34. package/dist/types/contest.d.ts +12 -15
  35. package/dist/types/entity.d.ts +0 -6
  36. package/dist/types/file.d.ts +6 -1
  37. package/dist/types/index.d.ts +3 -0
  38. package/dist/types/problem.d.ts +1 -1
  39. package/dist/types/scoreboard.d.ts +11 -0
  40. package/dist/types/scoreboard.js +1 -0
  41. package/dist/types/socket.d.ts +11 -0
  42. package/dist/types/system.d.ts +76 -0
  43. package/dist/types/system.js +1 -0
  44. package/dist/types/text.d.ts +2 -2
  45. package/dist/types/virtualUser.d.ts +22 -0
  46. package/dist/types/virtualUser.js +1 -0
  47. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
- import type { DocumentMembersResponseDTO, EntityMembersResponseDTO } from '../dto/index.js';
2
- export declare const EMPTY_DOCUMENT_MEMBERS: () => DocumentMembersResponseDTO;
3
- export declare const EMPTY_ENTITY_MEMBERS: () => EntityMembersResponseDTO;
1
+ import type { EntityAccessMembersResponseDto, EntityMembersResponseDto } from '../dto/index.js';
2
+ export declare const EMPTY_ENTITY_ACCESS_MEMBERS: () => EntityAccessMembersResponseDto;
3
+ export declare const EMPTY_ENTITY_MEMBERS: () => EntityMembersResponseDto;
@@ -1,5 +1,5 @@
1
1
  import { EntityAccess, EntityMembersRank } from '../enums/index.js';
2
- export const EMPTY_DOCUMENT_MEMBERS = () => ({
2
+ export const EMPTY_ENTITY_ACCESS_MEMBERS = () => ({
3
3
  access: EntityAccess.PRIVATE,
4
4
  managers: {},
5
5
  spectators: {},
@@ -1,4 +1,4 @@
1
- import type { UserPermissionsResponseDTO } from '../dto/index.js';
1
+ import type { UserPermissionsResponseDto } from '../dto/index.js';
2
2
  import { UserRole } from '../enums/index.js';
3
3
  export declare const USER_ROLE: {
4
4
  [Key in UserRole]: {
@@ -7,4 +7,4 @@ export declare const USER_ROLE: {
7
7
  level: number;
8
8
  };
9
9
  };
10
- export declare const EMPTY_USER_PERMISSIONS: UserPermissionsResponseDTO;
10
+ export declare const EMPTY_USER_PERMISSIONS: UserPermissionsResponseDto;
@@ -1,67 +1,67 @@
1
1
  import type { AssignmentClass, EntityState } from '../enums/index.js';
2
2
  import type { AssignmentBasicInfo, ClassBaseDocument, ClassCycleTag } from '../types/index.js';
3
- import type { EntityMembersDTO, EntityMembersResponseDTO } from './entity.js';
4
- import type { UserOrganizationBasicInfoResponseDTO, UserSummaryListResponseDTO } from './user.js';
5
- interface ClassUserResponseDTO {
3
+ import type { EntityMembersDto, EntityMembersResponseDto } from './entity.js';
4
+ import type { UserOrganizationBasicInfoResponseDto, UserSummaryListResponseDto } from './user.js';
5
+ interface ClassUserResponseDto {
6
6
  isOwner: boolean;
7
7
  isManager: boolean;
8
8
  isSpectator: boolean;
9
9
  isParticipant: boolean;
10
10
  isGuest: boolean;
11
11
  }
12
- export interface ClassSummaryListResponseDTO {
12
+ export interface ClassSummaryListResponseDto {
13
13
  key: string;
14
14
  name: string;
15
15
  description: string;
16
16
  state: EntityState;
17
- owner: UserOrganizationBasicInfoResponseDTO;
18
- user: ClassUserResponseDTO;
17
+ owner: UserOrganizationBasicInfoResponseDto;
18
+ user: ClassUserResponseDto;
19
19
  }
20
- export interface ContestAssignmentSessionCycleClassDataResponseDTO extends AssignmentBasicInfo {
20
+ export interface ContestAssignmentSessionCycleClassDataResponseDto extends AssignmentBasicInfo {
21
21
  type: typeof AssignmentClass.CONTEST;
22
22
  contestKey: string;
23
23
  numberProblems: number;
24
24
  }
25
- export interface CourseAssignmentSessionCycleClassDataResponseDTO extends AssignmentBasicInfo {
25
+ export interface CourseAssignmentSessionCycleClassDataResponseDto extends AssignmentBasicInfo {
26
26
  type: typeof AssignmentClass.COURSE;
27
27
  courseKey: string;
28
28
  numberLessons: number;
29
29
  }
30
- export interface WorksheetAssignmentSessionCycleClassDataResponseDTO extends AssignmentBasicInfo {
30
+ export interface WorksheetAssignmentSessionCycleClassDataResponseDto extends AssignmentBasicInfo {
31
31
  type: typeof AssignmentClass.WORKSHEET;
32
32
  worksheetKey: string;
33
33
  numberPages: number;
34
34
  }
35
- export interface NoneAssignmentSessionCycleClassDataResponseDTO extends AssignmentBasicInfo {
35
+ export interface NoneAssignmentSessionCycleClassDataResponseDto extends AssignmentBasicInfo {
36
36
  type: typeof AssignmentClass.NONE;
37
37
  }
38
- export type AssignmentSessionCycleClassDataResponseDTO = ContestAssignmentSessionCycleClassDataResponseDTO | CourseAssignmentSessionCycleClassDataResponseDTO | WorksheetAssignmentSessionCycleClassDataResponseDTO | NoneAssignmentSessionCycleClassDataResponseDTO;
39
- export interface SessionCycleClassDataResponseDTO {
38
+ export type AssignmentSessionCycleClassDataResponseDto = ContestAssignmentSessionCycleClassDataResponseDto | CourseAssignmentSessionCycleClassDataResponseDto | WorksheetAssignmentSessionCycleClassDataResponseDto | NoneAssignmentSessionCycleClassDataResponseDto;
39
+ export interface SessionCycleClassDataResponseDto {
40
40
  id: string;
41
41
  index: number;
42
42
  name: string;
43
43
  assignments: {
44
- [key: string]: AssignmentSessionCycleClassDataResponseDTO;
44
+ [key: string]: AssignmentSessionCycleClassDataResponseDto;
45
45
  };
46
46
  startsAt: number;
47
47
  endsAt: number;
48
48
  state: EntityState;
49
49
  }
50
- export interface CycleClassDataResponseDTO {
50
+ export interface CycleClassDataResponseDto {
51
51
  id: string;
52
52
  index: number;
53
53
  name: string;
54
54
  sessions: {
55
- [key: string]: SessionCycleClassDataResponseDTO;
55
+ [key: string]: SessionCycleClassDataResponseDto;
56
56
  };
57
57
  tags: ClassCycleTag[];
58
58
  startsAt: number;
59
59
  endsAt: number;
60
60
  state: EntityState;
61
61
  }
62
- export interface ClassCycleDataResponseDTO extends ClassSummaryListResponseDTO {
63
- members: EntityMembersResponseDTO;
64
- cycle: CycleClassDataResponseDTO;
62
+ export interface ClassCycleDataResponseDto extends ClassSummaryListResponseDto {
63
+ members: EntityMembersResponseDto;
64
+ cycle: CycleClassDataResponseDto;
65
65
  cycles: {
66
66
  [key: string]: {
67
67
  name: string;
@@ -70,15 +70,15 @@ export interface ClassCycleDataResponseDTO extends ClassSummaryListResponseDTO {
70
70
  };
71
71
  };
72
72
  }
73
- export interface ClassCyclesCycleDataResponseDTO extends Omit<CycleClassDataResponseDTO, 'sessions'> {
73
+ export interface ClassCyclesCycleDataResponseDto extends Omit<CycleClassDataResponseDto, 'sessions'> {
74
74
  sessions: {
75
- [key: string]: Omit<SessionCycleClassDataResponseDTO, 'assignments'>;
75
+ [key: string]: Omit<SessionCycleClassDataResponseDto, 'assignments'>;
76
76
  };
77
77
  }
78
- export interface ClassCyclesDataResponseDTO extends ClassSummaryListResponseDTO {
79
- members: EntityMembersResponseDTO;
78
+ export interface ClassCyclesDataResponseDto extends ClassSummaryListResponseDto {
79
+ members: EntityMembersResponseDto;
80
80
  cycles: {
81
- [key: string]: ClassCyclesCycleDataResponseDTO;
81
+ [key: string]: ClassCyclesCycleDataResponseDto;
82
82
  };
83
83
  }
84
84
  export interface AssignmentContestUpsert extends AssignmentBasicInfo {
@@ -93,14 +93,14 @@ export interface AssignmentWorksheetUpsert extends AssignmentBasicInfo {
93
93
  type: typeof AssignmentClass.WORKSHEET;
94
94
  worksheetKey: string;
95
95
  }
96
- export interface UpsertClassDTO extends Omit<ClassBaseDocument, 'members' | 'key' | 'cycles'> {
97
- members: EntityMembersDTO;
96
+ export interface UpsertClassDto extends Omit<ClassBaseDocument, 'members' | 'key' | 'cycles'> {
97
+ members: EntityMembersDto;
98
98
  }
99
- export interface UpsertClassCycleDTO extends Omit<ClassBaseDocument['cycles'][string], 'sessions' | 'id'> {
99
+ export interface UpsertClassCycleDto extends Omit<ClassBaseDocument['cycles'][string], 'sessions' | 'id'> {
100
100
  }
101
- export interface UpsertClassCycleSessionDTO extends Omit<ClassBaseDocument['cycles'][string]['sessions'][string], 'assignments' | 'id'> {
101
+ export interface UpsertClassCycleSessionDto extends Omit<ClassBaseDocument['cycles'][string]['sessions'][string], 'assignments' | 'id'> {
102
102
  }
103
- export interface UpsertClassCycleSessionAssignmentDTO extends Omit<AssignmentBasicInfo, 'id'> {
103
+ export interface UpsertClassCycleSessionAssignmentDto extends Omit<AssignmentBasicInfo, 'id'> {
104
104
  key: string;
105
105
  }
106
106
  export interface ClassAssignmentBaseDocument {
@@ -108,8 +108,8 @@ export interface ClassAssignmentBaseDocument {
108
108
  assignmentId: string;
109
109
  points: number;
110
110
  }
111
- export interface ClassAssignmentDataResponseDTO {
112
- user: UserSummaryListResponseDTO;
111
+ export interface ClassAssignmentDataResponseDto {
112
+ user: UserSummaryListResponseDto;
113
113
  assignmentId: string;
114
114
  points: number;
115
115
  }
@@ -1,5 +1,5 @@
1
1
  import type { JudgingFile } from '../types/index.js';
2
- export interface CodeRunDTO {
2
+ export interface CodeRunDto {
3
3
  runId: string;
4
4
  timeLimit: number;
5
5
  memoryLimit: number;
@@ -1,21 +1,21 @@
1
- import type { UserOrganizationBasicInfoResponseDTO } from './user.js';
2
- export type ReactionUserResponseData = {
1
+ import type { UserOrganizationBasicInfoResponseDto } from './user.js';
2
+ export type ReactionUserResponseDto = {
3
3
  key: string;
4
- user: UserOrganizationBasicInfoResponseDTO;
4
+ user: UserOrganizationBasicInfoResponseDto;
5
5
  createdAt: number;
6
6
  updatedAt: number;
7
7
  };
8
- export interface CommentDataResponseDTO {
8
+ export interface CommentDataResponseDto {
9
9
  id: string;
10
10
  content: string;
11
- user: UserOrganizationBasicInfoResponseDTO;
11
+ user: UserOrganizationBasicInfoResponseDto;
12
12
  hidden: boolean;
13
13
  reactions: {
14
14
  [key: string]: {
15
- [key: string]: ReactionUserResponseData;
15
+ [key: string]: ReactionUserResponseDto;
16
16
  };
17
17
  };
18
- replies: CommentDataResponseDTO[];
18
+ replies: CommentDataResponseDto[];
19
19
  createdAt: number;
20
20
  updatedAt: number;
21
21
  }
@@ -1,53 +1,46 @@
1
1
  import type { ContestEventAction, ContestProblemBlockedByType, EntityState } from '../enums/index.js';
2
- import type { ContestBaseDocument, ContestClarification, ContestProblem, ContestProblemPrerequisite, ContestSettings, ContestUser, ProblemSettings, ProblemStatement, TextLanguage } from '../types/index.js';
3
- import type { EntityMembersDTO, EntityMembersWithTimestampsResponseDTO } from './entity.js';
4
- import type { EntityOrganizationSummaryListResponseDTO, EntityOrganizationSystemSummaryListResponseDTO, ProblemJudgeSummaryListResponseDTO, ProblemSummaryListResponseDTO } from './problem.js';
5
- import type { EntityOwnerSystemSummaryListResponseDTO, UserOrganizationBasicInfoResponseDTO } from './user.js';
6
- export type UpsertContestProblemPrerequisiteDTO = (Omit<ContestProblemPrerequisite, 'problemId'> & {
2
+ import type { ContestBaseDocument, ContestProblem, ContestProblemPrerequisite, ContestSettings, ContestTimeFlags, ContestUser, ProblemSettings, ProblemStatement, TextLanguage } from '../types/index.js';
3
+ import type { EntityMembersDto, EntityMembersWithTimestampsResponseDto, EntityOrganizationSummaryListResponseDto, EntityOrganizationSystemSummaryListResponseDto, EntityOwnerSystemSummaryListResponseDto } from './entity.js';
4
+ import type { ProblemJudgeSummaryListResponseDto, ProblemSummaryListResponseDto } from './problem.js';
5
+ import type { UserOrganizationBasicInfoResponseDto } from './user.js';
6
+ export type UpsertContestProblemPrerequisiteDto = (Omit<ContestProblemPrerequisite, 'problemId'> & {
7
7
  problemIndex: string;
8
8
  })[];
9
- export interface UpsertContestProblemDTO extends Omit<ContestProblem, 'id' | 'prerequisites'> {
9
+ export interface UpsertContestProblemDto extends Omit<ContestProblem, 'id' | 'prerequisites'> {
10
10
  key: string;
11
- prerequisites: UpsertContestProblemPrerequisiteDTO;
11
+ prerequisites: UpsertContestProblemPrerequisiteDto;
12
12
  }
13
- export interface UpsertContestDTO extends Omit<ContestBaseDocument, 'key' | 'members' | 'problems' | 'settings' | 'events'> {
14
- members: EntityMembersDTO;
13
+ export interface UpsertContestDto extends Omit<ContestBaseDocument, 'key' | 'members' | 'problems' | 'settings' | 'events'> {
14
+ members: EntityMembersDto;
15
15
  problems: {
16
- [key: string]: UpsertContestProblemDTO;
16
+ [key: string]: UpsertContestProblemDto;
17
17
  };
18
18
  settings: Omit<ContestSettings, 'locked'>;
19
19
  }
20
- export interface ContestSummaryListResponseDTO extends Pick<ContestBaseDocument, 'key' | 'name' | 'tags'> {
20
+ export interface ContestSummaryListResponseDto extends Pick<ContestBaseDocument, 'key' | 'name' | 'tags'>, ContestTimeFlags {
21
21
  user: ContestUser;
22
- owner: UserOrganizationBasicInfoResponseDTO;
23
- organization: EntityOrganizationSummaryListResponseDTO;
22
+ owner: UserOrganizationBasicInfoResponseDto;
23
+ organization: EntityOrganizationSummaryListResponseDto;
24
24
  settings: Pick<ContestSettings, 'startsAt' | 'endsAt' | 'frozenAt' | 'silencedAt' | 'penalty' | 'upsolvingEnabled'>;
25
25
  totalContestants: number;
26
- isLive: boolean;
27
- isPast: boolean;
28
- isFuture: boolean;
29
- isEndless: boolean;
30
- isGlobal: boolean;
31
- isFrozenTime: boolean;
32
- isQuietTime: boolean;
33
26
  }
34
- export interface ContestSystemSummaryListResponseDTO extends ContestSummaryListResponseDTO {
27
+ export interface ContestSystemSummaryListResponseDto extends ContestSummaryListResponseDto {
35
28
  state: EntityState;
36
29
  id: string;
37
- owner: EntityOwnerSystemSummaryListResponseDTO;
38
- organization: EntityOrganizationSystemSummaryListResponseDTO;
30
+ owner: EntityOwnerSystemSummaryListResponseDto;
31
+ organization: EntityOrganizationSystemSummaryListResponseDto;
39
32
  createdAt: number;
40
33
  updatedAt: number;
41
34
  }
42
- export interface ContestProblemBasicDataResponseDTO extends Omit<ContestProblem, 'id' | 'prerequisites'> {
35
+ export interface ContestProblemBasicDataResponseDto extends Omit<ContestProblem, 'id' | 'prerequisites'> {
43
36
  name: string;
44
37
  key: string;
45
- prerequisites: UpsertContestProblemPrerequisiteDTO;
46
- judge: ProblemJudgeSummaryListResponseDTO;
38
+ prerequisites: UpsertContestProblemPrerequisiteDto;
39
+ judge: ProblemJudgeSummaryListResponseDto;
47
40
  tags: string[];
48
- organization: EntityOrganizationSummaryListResponseDTO;
41
+ organization: EntityOrganizationSummaryListResponseDto;
49
42
  }
50
- export interface ContestContestProblemDataResponseDTO extends Omit<ProblemSummaryListResponseDTO, 'user'> {
43
+ export interface ContestContestProblemDataResponseDto extends Omit<ProblemSummaryListResponseDto, 'user'> {
51
44
  author: string;
52
45
  shortname: string;
53
46
  statement: ProblemStatement;
@@ -55,7 +48,7 @@ export interface ContestContestProblemDataResponseDTO extends Omit<ProblemSummar
55
48
  settings: ProblemSettings;
56
49
  ownerNickname: string;
57
50
  }
58
- export type ContestProblemDataResponseDTO = ContestProblemBasicDataResponseDTO & ContestContestProblemDataResponseDTO & {
51
+ export type ContestProblemDataResponseDto = ContestProblemBasicDataResponseDto & ContestContestProblemDataResponseDto & {
59
52
  blockedBy: {
60
53
  type: ContestProblemBlockedByType;
61
54
  details: Record<string, unknown>;
@@ -68,22 +61,33 @@ export type ContestProblemDataResponseDTO = ContestProblemBasicDataResponseDTO &
68
61
  myPenalty: number;
69
62
  myIndexAccepted: number;
70
63
  };
71
- export interface ContestEventResponseDTO {
64
+ export interface ContestEventResponseDto {
72
65
  action: ContestEventAction;
73
- user: UserOrganizationBasicInfoResponseDTO;
66
+ user: UserOrganizationBasicInfoResponseDto;
74
67
  timestamp: number;
75
68
  details: Record<string, unknown>;
76
69
  }
77
- export interface ContestDataResponseDTO extends Omit<ContestSummaryListResponseDTO, 'settings'>, Pick<ContestBaseDocument, 'settings' | 'description' | 'groups'> {
78
- problems: Record<string, ContestProblemDataResponseDTO>;
70
+ export interface ContestDataResponseDto extends Omit<ContestSummaryListResponseDto, 'settings'>, Pick<ContestBaseDocument, 'settings' | 'description' | 'groups'> {
71
+ problems: Record<string, ContestProblemDataResponseDto>;
79
72
  state: EntityState;
80
73
  }
81
- export interface ContestMembersResponseDTO {
82
- members: EntityMembersWithTimestampsResponseDTO;
74
+ export interface ContestMembersResponseDto {
75
+ members: EntityMembersWithTimestampsResponseDto;
83
76
  }
84
- export interface ContestClarificationsResponseDTO {
85
- clarifications: ContestClarification[];
77
+ export interface ContestClarificationResponseDto {
78
+ key: string;
79
+ problemJudgeKey: string;
80
+ question: string;
81
+ questionUser: UserOrganizationBasicInfoResponseDto;
82
+ askedAt: number;
83
+ answer: string;
84
+ answeredAt: number;
85
+ answerUser: UserOrganizationBasicInfoResponseDto;
86
+ public: boolean;
87
+ }
88
+ export interface ContestClarificationsResponseDto {
89
+ clarifications: ContestClarificationResponseDto[];
86
90
  }
87
- export interface ContestEventsResponseDTO {
88
- events: ContestEventResponseDTO[];
91
+ export interface ContestEventsResponseDto {
92
+ events: ContestEventResponseDto[];
89
93
  }
@@ -1,34 +1,34 @@
1
1
  import type { CourseBaseDocument } from '../types/index.js';
2
- import type { EntityMembersDTO, EntityMembersResponseDTO } from './entity.js';
3
- import type { UserOrganizationBasicInfoResponseDTO } from './user.js';
4
- import type { WorksheetSummaryListResponseDTO } from './worksheet.js';
5
- export type CourseUserResponseDTO = {
2
+ import type { EntityMembersDto, EntityMembersResponseDto } from './entity.js';
3
+ import type { UserOrganizationBasicInfoResponseDto } from './user.js';
4
+ import type { WorksheetSummaryListResponseDto } from './worksheet.js';
5
+ export type CourseUserResponseDto = {
6
6
  isOwner: boolean;
7
7
  isManager: boolean;
8
8
  isSpectator: boolean;
9
9
  isParticipant: boolean;
10
10
  isGuest: boolean;
11
11
  };
12
- export interface CourseSummaryListResponseDTO {
12
+ export interface CourseSummaryListResponseDto {
13
13
  key: string;
14
14
  title: string;
15
15
  abstract: string;
16
16
  description: string;
17
17
  coverImageUrl: string;
18
- owner: UserOrganizationBasicInfoResponseDTO;
19
- user: CourseUserResponseDTO;
18
+ owner: UserOrganizationBasicInfoResponseDto;
19
+ user: CourseUserResponseDto;
20
20
  }
21
- export interface CourseLessonsWorksheetDataResponseDTO extends Pick<WorksheetSummaryListResponseDTO, 'key' | 'name' | 'content'> {
21
+ export interface CourseLessonsWorksheetDataResponseDto extends Pick<WorksheetSummaryListResponseDto, 'key' | 'name' | 'content'> {
22
22
  }
23
- export interface CourseDataResponseDTO extends CourseSummaryListResponseDTO {
23
+ export interface CourseDataResponseDto extends CourseSummaryListResponseDto {
24
24
  lessons: {
25
- worksheet: CourseLessonsWorksheetDataResponseDTO;
25
+ worksheet: CourseLessonsWorksheetDataResponseDto;
26
26
  }[];
27
- members: EntityMembersResponseDTO;
27
+ members: EntityMembersResponseDto;
28
28
  }
29
- export interface UpsertCourseDTO extends Omit<CourseBaseDocument, 'members' | 'key' | 'lessons' | 'state'> {
29
+ export interface UpsertCourseDto extends Omit<CourseBaseDocument, 'members' | 'key' | 'lessons' | 'state'> {
30
30
  lessons: {
31
31
  worksheetKey: string;
32
32
  }[];
33
- members: EntityMembersDTO;
33
+ members: EntityMembersDto;
34
34
  }
@@ -1,6 +1,7 @@
1
1
  import type { EntityAccess, EntityMembersRank, EntityRole, MemberType, ShareLinkVisibility } from '../enums/index.js';
2
- import type { UserOrganizationBasicInfoResponseDTO } from './user.js';
3
- export interface EntityMembersDTO {
2
+ import type { EntityLogChanges } from '../types/index.js';
3
+ import type { UserOrganizationBasicInfoResponseDto } from './user.js';
4
+ export interface EntityMembersDto {
4
5
  rankAdministrators: EntityMembersRank;
5
6
  administrators: string[];
6
7
  rankManagers: EntityMembersRank;
@@ -12,76 +13,89 @@ export interface EntityMembersDTO {
12
13
  rankParticipants: EntityMembersRank;
13
14
  participants: string[];
14
15
  }
15
- export interface EntityMembersResponseDTO {
16
+ export interface EntityMembersResponseDto {
16
17
  rankAdministrators: EntityMembersRank;
17
18
  administrators: {
18
- [key: string]: DocumentMemberResponseDTO;
19
+ [key: string]: EntityMemberResponseDto;
19
20
  };
20
21
  rankManagers: EntityMembersRank;
21
22
  managers: {
22
- [key: string]: DocumentMemberResponseDTO;
23
+ [key: string]: EntityMemberResponseDto;
23
24
  };
24
25
  rankGuests: EntityMembersRank;
25
26
  guests: {
26
- [key: string]: DocumentMemberResponseDTO;
27
+ [key: string]: EntityMemberResponseDto;
27
28
  };
28
29
  rankSpectators: EntityMembersRank;
29
30
  spectators: {
30
- [key: string]: DocumentMemberResponseDTO;
31
+ [key: string]: EntityMemberResponseDto;
31
32
  };
32
33
  rankParticipants: EntityMembersRank;
33
34
  participants: {
34
- [key: string]: DocumentMemberResponseDTO;
35
+ [key: string]: EntityMemberResponseDto;
35
36
  };
36
37
  }
37
- export interface DocumentUserResponseDTO {
38
+ export interface EntityUserResponseDto {
38
39
  isOwner: boolean;
39
40
  isManager: boolean;
40
41
  isSpectator: boolean;
41
42
  }
42
- export interface DocumentMemberResponseDTO extends UserOrganizationBasicInfoResponseDTO {
43
+ export interface EntityMemberResponseDto extends UserOrganizationBasicInfoResponseDto {
43
44
  type: MemberType;
44
45
  }
45
- export interface DocumentMemberWithTimestampsResponseDTO extends DocumentMemberResponseDTO {
46
+ export interface EntityMemberWithTimestampsResponseDto extends EntityMemberResponseDto {
46
47
  type: MemberType;
47
48
  lastVisitedAt: number;
48
49
  joinedAt: number;
49
50
  }
50
- export interface EntityMembersWithTimestampsResponseDTO {
51
+ export interface EntityMembersWithTimestampsResponseDto {
51
52
  rankAdministrators: EntityMembersRank;
52
53
  administrators: {
53
- [key: string]: DocumentMemberWithTimestampsResponseDTO;
54
+ [key: string]: EntityMemberWithTimestampsResponseDto;
54
55
  };
55
56
  rankManagers: EntityMembersRank;
56
57
  managers: {
57
- [key: string]: DocumentMemberWithTimestampsResponseDTO;
58
+ [key: string]: EntityMemberWithTimestampsResponseDto;
58
59
  };
59
60
  rankGuests: EntityMembersRank;
60
61
  guests: {
61
- [key: string]: DocumentMemberWithTimestampsResponseDTO;
62
+ [key: string]: EntityMemberWithTimestampsResponseDto;
62
63
  };
63
64
  rankSpectators: EntityMembersRank;
64
65
  spectators: {
65
- [key: string]: DocumentMemberWithTimestampsResponseDTO;
66
+ [key: string]: EntityMemberWithTimestampsResponseDto;
66
67
  };
67
68
  rankParticipants: EntityMembersRank;
68
69
  participants: {
69
- [key: string]: DocumentMemberWithTimestampsResponseDTO;
70
+ [key: string]: EntityMemberWithTimestampsResponseDto;
70
71
  };
71
72
  }
72
- export interface DocumentMembersResponseDTO {
73
+ export interface EntityAccessMembersResponseDto {
73
74
  access: EntityAccess;
74
75
  managers: {
75
- [key: string]: DocumentMemberResponseDTO;
76
+ [key: string]: EntityMemberResponseDto;
76
77
  };
77
78
  spectators: {
78
- [key: string]: DocumentMemberResponseDTO;
79
+ [key: string]: EntityMemberResponseDto;
79
80
  };
80
81
  }
81
- export interface DocumentCreateResponseDTO {
82
+ export interface EntityCreateResponseDto {
82
83
  key: string;
83
84
  }
84
- export interface MetadataResponseDTO {
85
+ export interface EntityOrganizationSummaryListResponseDto {
86
+ key: string;
87
+ }
88
+ export interface EntityOrganizationSystemSummaryListResponseDto extends EntityOrganizationSummaryListResponseDto {
89
+ name: string;
90
+ id: string;
91
+ }
92
+ export interface EntityOwnerSystemSummaryListResponseDto {
93
+ id: string;
94
+ nickname: string;
95
+ imageUrl: string;
96
+ organization: EntityOrganizationSummaryListResponseDto;
97
+ }
98
+ export interface MetadataResponseDto {
85
99
  title: string;
86
100
  description: string;
87
101
  cover: string;
@@ -94,10 +108,10 @@ export interface MetadataResponseDTO {
94
108
  * - PUBLIC: wildcard — represents "everyone" (subjectType=PUBLIC, subjectId=0)
95
109
  * - GROUP can be added later when group subjects are surfaced.
96
110
  */
97
- export type EntityGrantSubjectDTO = {
111
+ export type EntityGrantSubjectDto = {
98
112
  type: 'USER';
99
113
  id: string;
100
- user: UserOrganizationBasicInfoResponseDTO;
114
+ user: UserOrganizationBasicInfoResponseDto;
101
115
  } | {
102
116
  type: 'PUBLIC';
103
117
  };
@@ -105,9 +119,9 @@ export type EntityGrantSubjectDTO = {
105
119
  * One ReBAC tuple: (relation, subject) for a single resource.
106
120
  * Pure tuple representation — modal renders user lists by filtering on subject.type.
107
121
  */
108
- export interface EntityGrantDTO {
122
+ export interface EntityGrantDto {
109
123
  role: EntityRole;
110
- subject: EntityGrantSubjectDTO;
124
+ subject: EntityGrantSubjectDto;
111
125
  joinedAt: number;
112
126
  sourceLinkId?: string;
113
127
  }
@@ -115,7 +129,7 @@ export interface EntityGrantDTO {
115
129
  * Summary of a share link, for display in the share modal.
116
130
  * Create / revoke / list links use their own endpoints.
117
131
  */
118
- export interface EntityShareLinkSummaryDTO {
132
+ export interface EntityShareLinkSummaryDto {
119
133
  id: string;
120
134
  token: string;
121
135
  role: EntityRole;
@@ -133,7 +147,12 @@ export interface EntityShareLinkSummaryDTO {
133
147
  * `grants` includes PUBLIC subjects too; the parent `access` field already
134
148
  * encodes the same fact as one of PRIVATE/RESTRICTED/PUBLIC/EXPOSED.
135
149
  */
136
- export interface EntitySharingResponseDTO {
137
- grants: EntityGrantDTO[];
138
- links: EntityShareLinkSummaryDTO[];
150
+ export interface EntitySharingResponseDto {
151
+ grants: EntityGrantDto[];
152
+ links: EntityShareLinkSummaryDto[];
153
+ }
154
+ export interface LogDataResponseDto {
155
+ changes: EntityLogChanges[];
156
+ timestamp: number;
157
+ customerUser: UserOrganizationBasicInfoResponseDto;
139
158
  }
@@ -1,12 +1,12 @@
1
1
  import type { ExcalidrawBaseDocument } from '../types/index.js';
2
- import type { EntityMembersDTO, EntityMembersResponseDTO } from './entity.js';
3
- import type { UserOrganizationBasicInfoResponseDTO } from './user.js';
4
- export interface ExcalidrawResponseDTO extends Omit<ExcalidrawBaseDocument, 'members'> {
5
- owner: UserOrganizationBasicInfoResponseDTO;
6
- members: EntityMembersResponseDTO;
2
+ import type { EntityMembersDto, EntityMembersResponseDto } from './entity.js';
3
+ import type { UserOrganizationBasicInfoResponseDto } from './user.js';
4
+ export interface ExcalidrawResponseDto extends Omit<ExcalidrawBaseDocument, 'members'> {
5
+ owner: UserOrganizationBasicInfoResponseDto;
6
+ members: EntityMembersResponseDto;
7
7
  updatedAt: number;
8
8
  createdAt: number;
9
9
  }
10
- export interface UpsertExcalidrawDTO extends Omit<ExcalidrawBaseDocument, 'key' | 'members'> {
11
- members: EntityMembersDTO;
10
+ export interface UpsertExcalidrawDto extends Omit<ExcalidrawBaseDocument, 'key' | 'members'> {
11
+ members: EntityMembersDto;
12
12
  }
@@ -1,26 +1,21 @@
1
- import type { EntityState, FileMemberRole } from '../enums/index.js';
2
- import type { FileContent, SummaryFileContent, UserBasic } from '../types/index.js';
3
- import type { DocumentMembersResponseDTO, DocumentUserResponseDTO } from './entity.js';
4
- export interface FileBasic {
5
- name: string;
6
- description: string;
7
- state: EntityState;
8
- }
9
- export interface CreateFileDTO extends FileBasic {
1
+ import type { FileMemberRole } from '../enums/index.js';
2
+ import type { FileBasic, FileContent, SummaryFileContent, UserBasic } from '../types/index.js';
3
+ import type { EntityAccessMembersResponseDto, EntityUserResponseDto } from './entity.js';
4
+ export interface CreateFileDto extends FileBasic {
10
5
  folderId: string;
11
6
  content: FileContent;
12
- members: FileMembersDTO;
7
+ members: FileMembersDto;
13
8
  }
14
- export interface FileSummaryListResponseDTO extends FileBasic {
9
+ export interface FileSummaryListResponseDto extends FileBasic {
15
10
  key: string;
16
11
  updatedAt: number;
17
12
  content: SummaryFileContent;
18
- user: DocumentUserResponseDTO;
13
+ user: EntityUserResponseDto;
19
14
  owner: UserBasic;
20
15
  }
21
- export interface FileDataResponseDTO extends FileSummaryListResponseDTO {
16
+ export interface FileDataResponseDto extends FileSummaryListResponseDto {
22
17
  content: FileContent;
23
- members: DocumentMembersResponseDTO;
18
+ members: EntityAccessMembersResponseDto;
24
19
  parentFolders: {
25
20
  name: string;
26
21
  key: string;
@@ -30,6 +25,6 @@ export interface FileDataResponseDTO extends FileSummaryListResponseDTO {
30
25
  isInArchivedFolder: boolean;
31
26
  }[];
32
27
  }
33
- export interface FileMembersDTO {
28
+ export interface FileMembersDto {
34
29
  [key: string]: FileMemberRole;
35
30
  }
@@ -1,4 +1,4 @@
1
- export interface ImageSummaryResponseDTO {
1
+ export interface ImageSummaryResponseDto {
2
2
  imageUrl: string;
3
3
  imageThumbnailUrl: string;
4
4
  updatedAt: number;
@@ -1,9 +1,9 @@
1
1
  import type { JudgeBaseDocument } from '../types/index.js';
2
- export interface JudgeDataResponseDTO extends Omit<JudgeBaseDocument, 'getProblemUrl' | 'getUserSubmissionsUrl' | 'getLoginUrl' | 'getSubmitUrl'> {
2
+ export interface JudgeDataResponseDto extends Omit<JudgeBaseDocument, 'getProblemUrl' | 'getUserSubmissionsUrl' | 'getLoginUrl' | 'getSubmitUrl'> {
3
3
  }
4
- export interface JudgeSummaryListResponseDTO extends Omit<JudgeBaseDocument, 'getProblemUrl' | 'getUserSubmissionsUrl' | 'getSubmissionUrl' | 'getLoginUrl' | 'getProfileUrl' | 'getSubmitUrl'> {
4
+ export interface JudgeSummaryListResponseDto extends Omit<JudgeBaseDocument, 'getProblemUrl' | 'getUserSubmissionsUrl' | 'getSubmissionUrl' | 'getLoginUrl' | 'getProfileUrl' | 'getSubmitUrl'> {
5
5
  }
6
- export interface JudgeSystemSummaryListResponseDTO extends JudgeSummaryListResponseDTO {
6
+ export interface JudgeSystemSummaryListResponseDto extends JudgeSummaryListResponseDto {
7
7
  id: string;
8
8
  createdAt: number;
9
9
  updatedAt: number;