@juki-team/commons 0.2.17 → 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.
- package/dist/constants/entity.d.ts +3 -3
- package/dist/constants/entity.js +1 -1
- package/dist/constants/user.d.ts +2 -2
- package/dist/dto/class.d.ts +30 -30
- package/dist/dto/code.d.ts +1 -1
- package/dist/dto/comments.d.ts +7 -7
- package/dist/dto/contest.d.ts +43 -39
- package/dist/dto/course.d.ts +13 -13
- package/dist/dto/entity.d.ts +49 -30
- package/dist/dto/excalidraw.d.ts +7 -7
- package/dist/dto/file.d.ts +10 -15
- package/dist/dto/image.d.ts +1 -1
- package/dist/dto/judge.d.ts +3 -3
- package/dist/dto/markdown.d.ts +7 -7
- package/dist/dto/mermaid.d.ts +7 -7
- package/dist/dto/organization.d.ts +18 -14
- package/dist/dto/problem.d.ts +19 -26
- package/dist/dto/scoreboard.d.ts +8 -18
- package/dist/dto/session.d.ts +6 -6
- package/dist/dto/socket.d.ts +54 -65
- package/dist/dto/statistics.d.ts +7 -7
- package/dist/dto/submission.d.ts +20 -19
- package/dist/dto/system.d.ts +4 -84
- package/dist/dto/url.d.ts +1 -1
- package/dist/dto/user.d.ts +19 -25
- package/dist/dto/virtualUser.d.ts +2 -23
- package/dist/dto/worksheet.d.ts +11 -11
- package/dist/dto/worksheetSubmission.d.ts +25 -25
- package/dist/helpers/assignment.d.ts +4 -4
- package/dist/helpers/entity.d.ts +2 -2
- package/dist/helpers/entity.js +1 -1
- package/dist/helpers/socket.d.ts +43 -43
- package/dist/helpers/socket.js +90 -90
- package/dist/types/contest.d.ts +12 -15
- package/dist/types/entity.d.ts +0 -6
- package/dist/types/file.d.ts +6 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/problem.d.ts +1 -1
- package/dist/types/scoreboard.d.ts +11 -0
- package/dist/types/scoreboard.js +1 -0
- package/dist/types/socket.d.ts +11 -0
- package/dist/types/system.d.ts +76 -0
- package/dist/types/system.js +1 -0
- package/dist/types/virtualUser.d.ts +22 -0
- package/dist/types/virtualUser.js +1 -0
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const EMPTY_ENTITY_MEMBERS: () =>
|
|
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;
|
package/dist/constants/entity.js
CHANGED
package/dist/constants/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
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:
|
|
10
|
+
export declare const EMPTY_USER_PERMISSIONS: UserPermissionsResponseDto;
|
package/dist/dto/class.d.ts
CHANGED
|
@@ -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 {
|
|
4
|
-
import type {
|
|
5
|
-
interface
|
|
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
|
|
12
|
+
export interface ClassSummaryListResponseDto {
|
|
13
13
|
key: string;
|
|
14
14
|
name: string;
|
|
15
15
|
description: string;
|
|
16
16
|
state: EntityState;
|
|
17
|
-
owner:
|
|
18
|
-
user:
|
|
17
|
+
owner: UserOrganizationBasicInfoResponseDto;
|
|
18
|
+
user: ClassUserResponseDto;
|
|
19
19
|
}
|
|
20
|
-
export interface
|
|
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
|
|
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
|
|
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
|
|
35
|
+
export interface NoneAssignmentSessionCycleClassDataResponseDto extends AssignmentBasicInfo {
|
|
36
36
|
type: typeof AssignmentClass.NONE;
|
|
37
37
|
}
|
|
38
|
-
export type
|
|
39
|
-
export interface
|
|
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]:
|
|
44
|
+
[key: string]: AssignmentSessionCycleClassDataResponseDto;
|
|
45
45
|
};
|
|
46
46
|
startsAt: number;
|
|
47
47
|
endsAt: number;
|
|
48
48
|
state: EntityState;
|
|
49
49
|
}
|
|
50
|
-
export interface
|
|
50
|
+
export interface CycleClassDataResponseDto {
|
|
51
51
|
id: string;
|
|
52
52
|
index: number;
|
|
53
53
|
name: string;
|
|
54
54
|
sessions: {
|
|
55
|
-
[key: string]:
|
|
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
|
|
63
|
-
members:
|
|
64
|
-
cycle:
|
|
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
|
|
73
|
+
export interface ClassCyclesCycleDataResponseDto extends Omit<CycleClassDataResponseDto, 'sessions'> {
|
|
74
74
|
sessions: {
|
|
75
|
-
[key: string]: Omit<
|
|
75
|
+
[key: string]: Omit<SessionCycleClassDataResponseDto, 'assignments'>;
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
export interface
|
|
79
|
-
members:
|
|
78
|
+
export interface ClassCyclesDataResponseDto extends ClassSummaryListResponseDto {
|
|
79
|
+
members: EntityMembersResponseDto;
|
|
80
80
|
cycles: {
|
|
81
|
-
[key: string]:
|
|
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
|
|
97
|
-
members:
|
|
96
|
+
export interface UpsertClassDto extends Omit<ClassBaseDocument, 'members' | 'key' | 'cycles'> {
|
|
97
|
+
members: EntityMembersDto;
|
|
98
98
|
}
|
|
99
|
-
export interface
|
|
99
|
+
export interface UpsertClassCycleDto extends Omit<ClassBaseDocument['cycles'][string], 'sessions' | 'id'> {
|
|
100
100
|
}
|
|
101
|
-
export interface
|
|
101
|
+
export interface UpsertClassCycleSessionDto extends Omit<ClassBaseDocument['cycles'][string]['sessions'][string], 'assignments' | 'id'> {
|
|
102
102
|
}
|
|
103
|
-
export interface
|
|
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
|
|
112
|
-
user:
|
|
111
|
+
export interface ClassAssignmentDataResponseDto {
|
|
112
|
+
user: UserSummaryListResponseDto;
|
|
113
113
|
assignmentId: string;
|
|
114
114
|
points: number;
|
|
115
115
|
}
|
package/dist/dto/code.d.ts
CHANGED
package/dist/dto/comments.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type
|
|
1
|
+
import type { UserOrganizationBasicInfoResponseDto } from './user.js';
|
|
2
|
+
export type ReactionUserResponseDto = {
|
|
3
3
|
key: string;
|
|
4
|
-
user:
|
|
4
|
+
user: UserOrganizationBasicInfoResponseDto;
|
|
5
5
|
createdAt: number;
|
|
6
6
|
updatedAt: number;
|
|
7
7
|
};
|
|
8
|
-
export interface
|
|
8
|
+
export interface CommentDataResponseDto {
|
|
9
9
|
id: string;
|
|
10
10
|
content: string;
|
|
11
|
-
user:
|
|
11
|
+
user: UserOrganizationBasicInfoResponseDto;
|
|
12
12
|
hidden: boolean;
|
|
13
13
|
reactions: {
|
|
14
14
|
[key: string]: {
|
|
15
|
-
[key: string]:
|
|
15
|
+
[key: string]: ReactionUserResponseDto;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
replies:
|
|
18
|
+
replies: CommentDataResponseDto[];
|
|
19
19
|
createdAt: number;
|
|
20
20
|
updatedAt: number;
|
|
21
21
|
}
|
package/dist/dto/contest.d.ts
CHANGED
|
@@ -1,53 +1,46 @@
|
|
|
1
1
|
import type { ContestEventAction, ContestProblemBlockedByType, EntityState } from '../enums/index.js';
|
|
2
|
-
import type { ContestBaseDocument,
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
export type
|
|
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
|
|
9
|
+
export interface UpsertContestProblemDto extends Omit<ContestProblem, 'id' | 'prerequisites'> {
|
|
10
10
|
key: string;
|
|
11
|
-
prerequisites:
|
|
11
|
+
prerequisites: UpsertContestProblemPrerequisiteDto;
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
14
|
-
members:
|
|
13
|
+
export interface UpsertContestDto extends Omit<ContestBaseDocument, 'key' | 'members' | 'problems' | 'settings' | 'events'> {
|
|
14
|
+
members: EntityMembersDto;
|
|
15
15
|
problems: {
|
|
16
|
-
[key: string]:
|
|
16
|
+
[key: string]: UpsertContestProblemDto;
|
|
17
17
|
};
|
|
18
18
|
settings: Omit<ContestSettings, 'locked'>;
|
|
19
19
|
}
|
|
20
|
-
export interface
|
|
20
|
+
export interface ContestSummaryListResponseDto extends Pick<ContestBaseDocument, 'key' | 'name' | 'tags'>, ContestTimeFlags {
|
|
21
21
|
user: ContestUser;
|
|
22
|
-
owner:
|
|
23
|
-
organization:
|
|
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
|
|
27
|
+
export interface ContestSystemSummaryListResponseDto extends ContestSummaryListResponseDto {
|
|
35
28
|
state: EntityState;
|
|
36
29
|
id: string;
|
|
37
|
-
owner:
|
|
38
|
-
organization:
|
|
30
|
+
owner: EntityOwnerSystemSummaryListResponseDto;
|
|
31
|
+
organization: EntityOrganizationSystemSummaryListResponseDto;
|
|
39
32
|
createdAt: number;
|
|
40
33
|
updatedAt: number;
|
|
41
34
|
}
|
|
42
|
-
export interface
|
|
35
|
+
export interface ContestProblemBasicDataResponseDto extends Omit<ContestProblem, 'id' | 'prerequisites'> {
|
|
43
36
|
name: string;
|
|
44
37
|
key: string;
|
|
45
|
-
prerequisites:
|
|
46
|
-
judge:
|
|
38
|
+
prerequisites: UpsertContestProblemPrerequisiteDto;
|
|
39
|
+
judge: ProblemJudgeSummaryListResponseDto;
|
|
47
40
|
tags: string[];
|
|
48
|
-
organization:
|
|
41
|
+
organization: EntityOrganizationSummaryListResponseDto;
|
|
49
42
|
}
|
|
50
|
-
export interface
|
|
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
|
|
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
|
|
64
|
+
export interface ContestEventResponseDto {
|
|
72
65
|
action: ContestEventAction;
|
|
73
|
-
user:
|
|
66
|
+
user: UserOrganizationBasicInfoResponseDto;
|
|
74
67
|
timestamp: number;
|
|
75
68
|
details: Record<string, unknown>;
|
|
76
69
|
}
|
|
77
|
-
export interface
|
|
78
|
-
problems: Record<string,
|
|
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
|
|
82
|
-
members:
|
|
74
|
+
export interface ContestMembersResponseDto {
|
|
75
|
+
members: EntityMembersWithTimestampsResponseDto;
|
|
83
76
|
}
|
|
84
|
-
export interface
|
|
85
|
-
|
|
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
|
|
88
|
-
events:
|
|
91
|
+
export interface ContestEventsResponseDto {
|
|
92
|
+
events: ContestEventResponseDto[];
|
|
89
93
|
}
|
package/dist/dto/course.d.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import type { CourseBaseDocument } from '../types/index.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
export type
|
|
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
|
|
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:
|
|
19
|
-
user:
|
|
18
|
+
owner: UserOrganizationBasicInfoResponseDto;
|
|
19
|
+
user: CourseUserResponseDto;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface CourseLessonsWorksheetDataResponseDto extends Pick<WorksheetSummaryListResponseDto, 'key' | 'name' | 'content'> {
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
23
|
+
export interface CourseDataResponseDto extends CourseSummaryListResponseDto {
|
|
24
24
|
lessons: {
|
|
25
|
-
worksheet:
|
|
25
|
+
worksheet: CourseLessonsWorksheetDataResponseDto;
|
|
26
26
|
}[];
|
|
27
|
-
members:
|
|
27
|
+
members: EntityMembersResponseDto;
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface UpsertCourseDto extends Omit<CourseBaseDocument, 'members' | 'key' | 'lessons' | 'state'> {
|
|
30
30
|
lessons: {
|
|
31
31
|
worksheetKey: string;
|
|
32
32
|
}[];
|
|
33
|
-
members:
|
|
33
|
+
members: EntityMembersDto;
|
|
34
34
|
}
|
package/dist/dto/entity.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { EntityAccess, EntityMembersRank, EntityRole, MemberType, ShareLinkVisibility } from '../enums/index.js';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
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
|
|
16
|
+
export interface EntityMembersResponseDto {
|
|
16
17
|
rankAdministrators: EntityMembersRank;
|
|
17
18
|
administrators: {
|
|
18
|
-
[key: string]:
|
|
19
|
+
[key: string]: EntityMemberResponseDto;
|
|
19
20
|
};
|
|
20
21
|
rankManagers: EntityMembersRank;
|
|
21
22
|
managers: {
|
|
22
|
-
[key: string]:
|
|
23
|
+
[key: string]: EntityMemberResponseDto;
|
|
23
24
|
};
|
|
24
25
|
rankGuests: EntityMembersRank;
|
|
25
26
|
guests: {
|
|
26
|
-
[key: string]:
|
|
27
|
+
[key: string]: EntityMemberResponseDto;
|
|
27
28
|
};
|
|
28
29
|
rankSpectators: EntityMembersRank;
|
|
29
30
|
spectators: {
|
|
30
|
-
[key: string]:
|
|
31
|
+
[key: string]: EntityMemberResponseDto;
|
|
31
32
|
};
|
|
32
33
|
rankParticipants: EntityMembersRank;
|
|
33
34
|
participants: {
|
|
34
|
-
[key: string]:
|
|
35
|
+
[key: string]: EntityMemberResponseDto;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
export interface
|
|
38
|
+
export interface EntityUserResponseDto {
|
|
38
39
|
isOwner: boolean;
|
|
39
40
|
isManager: boolean;
|
|
40
41
|
isSpectator: boolean;
|
|
41
42
|
}
|
|
42
|
-
export interface
|
|
43
|
+
export interface EntityMemberResponseDto extends UserOrganizationBasicInfoResponseDto {
|
|
43
44
|
type: MemberType;
|
|
44
45
|
}
|
|
45
|
-
export interface
|
|
46
|
+
export interface EntityMemberWithTimestampsResponseDto extends EntityMemberResponseDto {
|
|
46
47
|
type: MemberType;
|
|
47
48
|
lastVisitedAt: number;
|
|
48
49
|
joinedAt: number;
|
|
49
50
|
}
|
|
50
|
-
export interface
|
|
51
|
+
export interface EntityMembersWithTimestampsResponseDto {
|
|
51
52
|
rankAdministrators: EntityMembersRank;
|
|
52
53
|
administrators: {
|
|
53
|
-
[key: string]:
|
|
54
|
+
[key: string]: EntityMemberWithTimestampsResponseDto;
|
|
54
55
|
};
|
|
55
56
|
rankManagers: EntityMembersRank;
|
|
56
57
|
managers: {
|
|
57
|
-
[key: string]:
|
|
58
|
+
[key: string]: EntityMemberWithTimestampsResponseDto;
|
|
58
59
|
};
|
|
59
60
|
rankGuests: EntityMembersRank;
|
|
60
61
|
guests: {
|
|
61
|
-
[key: string]:
|
|
62
|
+
[key: string]: EntityMemberWithTimestampsResponseDto;
|
|
62
63
|
};
|
|
63
64
|
rankSpectators: EntityMembersRank;
|
|
64
65
|
spectators: {
|
|
65
|
-
[key: string]:
|
|
66
|
+
[key: string]: EntityMemberWithTimestampsResponseDto;
|
|
66
67
|
};
|
|
67
68
|
rankParticipants: EntityMembersRank;
|
|
68
69
|
participants: {
|
|
69
|
-
[key: string]:
|
|
70
|
+
[key: string]: EntityMemberWithTimestampsResponseDto;
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
|
-
export interface
|
|
73
|
+
export interface EntityAccessMembersResponseDto {
|
|
73
74
|
access: EntityAccess;
|
|
74
75
|
managers: {
|
|
75
|
-
[key: string]:
|
|
76
|
+
[key: string]: EntityMemberResponseDto;
|
|
76
77
|
};
|
|
77
78
|
spectators: {
|
|
78
|
-
[key: string]:
|
|
79
|
+
[key: string]: EntityMemberResponseDto;
|
|
79
80
|
};
|
|
80
81
|
}
|
|
81
|
-
export interface
|
|
82
|
+
export interface EntityCreateResponseDto {
|
|
82
83
|
key: string;
|
|
83
84
|
}
|
|
84
|
-
export interface
|
|
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
|
|
111
|
+
export type EntityGrantSubjectDto = {
|
|
98
112
|
type: 'USER';
|
|
99
113
|
id: string;
|
|
100
|
-
user:
|
|
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
|
|
122
|
+
export interface EntityGrantDto {
|
|
109
123
|
role: EntityRole;
|
|
110
|
-
subject:
|
|
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
|
|
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
|
|
137
|
-
grants:
|
|
138
|
-
links:
|
|
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
|
}
|
package/dist/dto/excalidraw.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ExcalidrawBaseDocument } from '../types/index.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
export interface
|
|
5
|
-
owner:
|
|
6
|
-
members:
|
|
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
|
|
11
|
-
members:
|
|
10
|
+
export interface UpsertExcalidrawDto extends Omit<ExcalidrawBaseDocument, 'key' | 'members'> {
|
|
11
|
+
members: EntityMembersDto;
|
|
12
12
|
}
|
package/dist/dto/file.d.ts
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { FileContent, SummaryFileContent, UserBasic } from '../types/index.js';
|
|
3
|
-
import type {
|
|
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:
|
|
7
|
+
members: FileMembersDto;
|
|
13
8
|
}
|
|
14
|
-
export interface
|
|
9
|
+
export interface FileSummaryListResponseDto extends FileBasic {
|
|
15
10
|
key: string;
|
|
16
11
|
updatedAt: number;
|
|
17
12
|
content: SummaryFileContent;
|
|
18
|
-
user:
|
|
13
|
+
user: EntityUserResponseDto;
|
|
19
14
|
owner: UserBasic;
|
|
20
15
|
}
|
|
21
|
-
export interface
|
|
16
|
+
export interface FileDataResponseDto extends FileSummaryListResponseDto {
|
|
22
17
|
content: FileContent;
|
|
23
|
-
members:
|
|
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
|
|
28
|
+
export interface FileMembersDto {
|
|
34
29
|
[key: string]: FileMemberRole;
|
|
35
30
|
}
|
package/dist/dto/image.d.ts
CHANGED
package/dist/dto/judge.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { JudgeBaseDocument } from '../types/index.js';
|
|
2
|
-
export interface
|
|
2
|
+
export interface JudgeDataResponseDto extends Omit<JudgeBaseDocument, 'getProblemUrl' | 'getUserSubmissionsUrl' | 'getLoginUrl' | 'getSubmitUrl'> {
|
|
3
3
|
}
|
|
4
|
-
export interface
|
|
4
|
+
export interface JudgeSummaryListResponseDto extends Omit<JudgeBaseDocument, 'getProblemUrl' | 'getUserSubmissionsUrl' | 'getSubmissionUrl' | 'getLoginUrl' | 'getProfileUrl' | 'getSubmitUrl'> {
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface JudgeSystemSummaryListResponseDto extends JudgeSummaryListResponseDto {
|
|
7
7
|
id: string;
|
|
8
8
|
createdAt: number;
|
|
9
9
|
updatedAt: number;
|