@juki-team/commons 0.1.43 → 0.1.45
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/index.cjs +410 -543
- package/dist/esm/index.js +320 -489
- package/dist/types/constants/entity.d.ts +3 -3
- package/dist/types/constants/index.d.ts +1 -1
- package/dist/types/constants/organization.d.ts +9 -0
- package/dist/types/constants/websocket.d.ts +5 -18
- package/dist/types/dto/class.d.ts +34 -34
- package/dist/types/dto/code.d.ts +1 -1
- package/dist/types/dto/comments.d.ts +9 -9
- package/dist/types/dto/contest.d.ts +46 -42
- package/dist/types/dto/course.d.ts +13 -13
- package/dist/types/dto/entity.d.ts +30 -25
- package/dist/types/dto/excalidraw.d.ts +7 -7
- package/dist/types/dto/file.d.ts +10 -15
- package/dist/types/dto/image.d.ts +2 -2
- package/dist/types/dto/index.d.ts +1 -1
- package/dist/types/dto/judge.d.ts +5 -5
- package/dist/types/dto/markdown.d.ts +7 -7
- package/dist/types/dto/mermaid.d.ts +7 -7
- package/dist/types/dto/{company.d.ts → organization.d.ts} +16 -16
- package/dist/types/dto/problem.d.ts +22 -22
- package/dist/types/dto/scoreboard.d.ts +8 -18
- package/dist/types/dto/session.d.ts +9 -9
- package/dist/types/dto/socket.d.ts +43 -126
- package/dist/types/dto/statistics.d.ts +7 -7
- package/dist/types/dto/submission.d.ts +22 -22
- package/dist/types/dto/system.d.ts +7 -82
- package/dist/types/dto/url.d.ts +1 -1
- package/dist/types/dto/user.d.ts +22 -22
- package/dist/types/dto/virtual-user.d.ts +3 -25
- package/dist/types/dto/worksheet-submissions.d.ts +22 -22
- package/dist/types/dto/worksheet.d.ts +12 -12
- package/dist/types/helpers/class.d.ts +4 -4
- package/dist/types/helpers/comments.d.ts +1 -1
- package/dist/types/helpers/contest.d.ts +4 -4
- package/dist/types/helpers/date.d.ts +68 -0
- package/dist/types/helpers/document.d.ts +2 -2
- package/dist/types/helpers/index.d.ts +3 -0
- package/dist/types/helpers/number.d.ts +2 -0
- package/dist/types/helpers/responses.d.ts +1 -1
- package/dist/types/helpers/socket.d.ts +37 -50
- package/dist/types/helpers/time.d.ts +0 -11
- package/dist/types/helpers/user.d.ts +2 -2
- package/dist/types/index.d.ts +0 -1
- package/dist/types/types/class.d.ts +6 -6
- package/dist/types/types/comments.d.ts +2 -2
- package/dist/types/types/contest.d.ts +20 -23
- package/dist/types/types/entity.d.ts +13 -19
- package/dist/types/types/file.d.ts +6 -0
- package/dist/types/types/index.d.ts +3 -1
- package/dist/types/types/{company.d.ts → organization.d.ts} +2 -2
- package/dist/types/types/prisma.d.ts +2 -2
- package/dist/types/types/problems.d.ts +1 -1
- package/dist/types/types/scoreboard.d.ts +11 -0
- package/dist/types/types/sheet.d.ts +1 -1
- package/dist/types/types/socket.d.ts +12 -16
- package/dist/types/types/system.d.ts +76 -0
- package/dist/types/types/teams.d.ts +8 -8
- package/dist/types/types/virtual-user.d.ts +22 -0
- package/package.json +1 -1
- package/dist/types/constants/company.d.ts +0 -9
- package/dist/types/prototypes/Date.d.ts +0 -62
- package/dist/types/prototypes/Number.d.ts +0 -7
- package/dist/types/prototypes/index.d.ts +0 -3
- /package/dist/types/{prototypes/Error.d.ts → helpers/errors.d.ts} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const EMPTY_DOCUMENT_MEMBERS: () =>
|
|
3
|
-
export declare const EMPTY_ENTITY_MEMBERS: () =>
|
|
1
|
+
import { DocumentMembersResponseDto, EntityMembersResponseDto } from '../dto';
|
|
2
|
+
export declare const EMPTY_DOCUMENT_MEMBERS: () => DocumentMembersResponseDto;
|
|
3
|
+
export declare const EMPTY_ENTITY_MEMBERS: () => EntityMembersResponseDto;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OrganizationPlan } from '../types/organization';
|
|
2
|
+
export declare const JUKI_APP_ORGANIZATION_KEY = "juki-app";
|
|
3
|
+
export declare const ORGANIZATION_PLAN: {
|
|
4
|
+
[key in OrganizationPlan]: {
|
|
5
|
+
value: OrganizationPlan;
|
|
6
|
+
label: string;
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/**
|
|
3
|
-
export declare const CHANNEL_PUBLISH_SUBSCRIPTIONS = "pub:subscriptions";
|
|
4
|
-
/** @deprecated not used, the events arrive by the TOPIC channels */
|
|
5
|
-
export declare const CHANNEL_SUBSCRIBE_NOTIFICATIONS = "sub:notifications";
|
|
6
|
-
/** @deprecated the events arrive by the TOPIC channels */
|
|
7
|
-
export declare const CHANNEL_SUBSCRIBE_CLIENT: (clientId: ClientId) => string;
|
|
8
|
-
/** messages from the clients to the backend (chat completions, client track screenshots) */
|
|
9
|
-
export declare const CHANNEL_PUBLISH_MESSAGES = "pub:messages";
|
|
10
|
-
/** @deprecated global presence channel (limited to 200 members by Ably), replaced by CHANNEL_COMPANY_PRESENCE */
|
|
11
|
-
export declare const CHANNEL_PRESENCE_CLIENT = "pre:client";
|
|
12
|
-
/** private: events of one session (code runs, requested data, client track commands) */
|
|
1
|
+
import { ContestChannelRole } from '../types';
|
|
2
|
+
/** private: events of one session (code runs, requested data) */
|
|
13
3
|
export declare const CHANNEL_SESSION: (sessionId: string) => string;
|
|
14
4
|
/** private: events of one user (own submissions while the contest is frozen, notifications) */
|
|
15
5
|
export declare const CHANNEL_USER: (userId: string) => string;
|
|
@@ -19,19 +9,16 @@ export declare const CHANNEL_SUBMISSION: (submitId: string) => string;
|
|
|
19
9
|
export declare const CHANNEL_PROBLEM: (problemKey: string) => string;
|
|
20
10
|
/** per role: events of a contest for one role (and the roles above it, see `ContestChannelRole`) */
|
|
21
11
|
export declare const CHANNEL_CONTEST: (contestKey: string, role: ContestChannelRole) => string;
|
|
22
|
-
/** system administrators only: data sent by a tracked client (screenshots, location, device) */
|
|
23
|
-
export declare const CHANNEL_CLIENT_TRACK: (trackedClientId: ClientId) => string;
|
|
24
12
|
/**
|
|
25
|
-
* presence of the clients (tabs) of the logged users of a
|
|
26
|
-
* The clients only enter (capability `presence`), only the administrators of the
|
|
13
|
+
* presence of the clients (tabs) of the logged users of a organization (by its key), data: `UserPresenceData`.
|
|
14
|
+
* The clients only enter (capability `presence`), only the administrators of the organization receive it
|
|
27
15
|
* (capability `presence-subscribe`). Ably limits the presence members per channel (200 by default,
|
|
28
16
|
* more with server-side batching enabled on the `presence` namespace).
|
|
29
17
|
* The identity of a member is its `clientId` (`sessionId|uiId`, verified by Ably), never its data.
|
|
30
18
|
*/
|
|
31
|
-
export declare const
|
|
19
|
+
export declare const CHANNEL_ORGANIZATION_PRESENCE: (organizationKey: string) => string;
|
|
32
20
|
export declare const CHANNEL_SUBMISSION_ALL = "submission:*";
|
|
33
21
|
export declare const CHANNEL_PROBLEM_ALL = "problem:*";
|
|
34
|
-
export declare const CHANNEL_CLIENT_TRACK_ALL = "client-track:*";
|
|
35
22
|
/**
|
|
36
23
|
* Returns the contest and role of a `CHANNEL_CONTEST` channel name, or null if it is not one.
|
|
37
24
|
*/
|
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
import { AssignmentBasicInfo, AssignmentClass, ClassBaseDocument, ClassCycleTag, EntityState } from '../types';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
interface
|
|
2
|
+
import { EntityMembersDto, EntityMembersResponseDto } from './entity';
|
|
3
|
+
import { UserOrganizationBasicInfoResponseDto, UserSummaryListResponseDto } from './user';
|
|
4
|
+
interface ClassUserResponseDto {
|
|
5
5
|
isOwner: boolean;
|
|
6
6
|
isManager: boolean;
|
|
7
7
|
isSpectator: boolean;
|
|
8
8
|
isParticipant: boolean;
|
|
9
9
|
isGuest: boolean;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface ClassSummaryListResponseDto {
|
|
12
12
|
key: string;
|
|
13
13
|
name: string;
|
|
14
14
|
description: string;
|
|
15
15
|
state: EntityState;
|
|
16
|
-
owner:
|
|
17
|
-
user:
|
|
16
|
+
owner: UserOrganizationBasicInfoResponseDto;
|
|
17
|
+
user: ClassUserResponseDto;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface ContestAssignmentSessionCycleClassDataResponseDto extends AssignmentBasicInfo {
|
|
20
20
|
type: AssignmentClass.CONTEST;
|
|
21
21
|
contestKey: string;
|
|
22
22
|
numberProblems: number;
|
|
23
23
|
}
|
|
24
|
-
export interface
|
|
24
|
+
export interface CourseAssignmentSessionCycleClassDataResponseDto extends AssignmentBasicInfo {
|
|
25
25
|
type: AssignmentClass.COURSE;
|
|
26
26
|
courseKey: string;
|
|
27
27
|
numberLessons: number;
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface WorksheetAssignmentSessionCycleClassDataResponseDto extends AssignmentBasicInfo {
|
|
30
30
|
type: AssignmentClass.WORKSHEET;
|
|
31
31
|
worksheetKey: string;
|
|
32
32
|
numberPages: number;
|
|
33
33
|
}
|
|
34
|
-
export interface
|
|
34
|
+
export interface NoneAssignmentSessionCycleClassDataResponseDto extends AssignmentBasicInfo {
|
|
35
35
|
type: AssignmentClass.NONE;
|
|
36
36
|
}
|
|
37
|
-
export type
|
|
38
|
-
export interface
|
|
37
|
+
export type AssignmentSessionCycleClassDataResponseDto = ContestAssignmentSessionCycleClassDataResponseDto | CourseAssignmentSessionCycleClassDataResponseDto | WorksheetAssignmentSessionCycleClassDataResponseDto | NoneAssignmentSessionCycleClassDataResponseDto;
|
|
38
|
+
export interface SessionCycleClassDataResponseDto {
|
|
39
39
|
id: string;
|
|
40
40
|
index: number;
|
|
41
41
|
name: string;
|
|
42
42
|
assignments: {
|
|
43
|
-
[key: string]:
|
|
43
|
+
[key: string]: AssignmentSessionCycleClassDataResponseDto;
|
|
44
44
|
};
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
startsAt: number;
|
|
46
|
+
endsAt: number;
|
|
47
47
|
state: EntityState;
|
|
48
48
|
}
|
|
49
|
-
export interface
|
|
49
|
+
export interface CycleClassDataResponseDto {
|
|
50
50
|
id: string;
|
|
51
51
|
index: number;
|
|
52
52
|
name: string;
|
|
53
53
|
sessions: {
|
|
54
|
-
[key: string]:
|
|
54
|
+
[key: string]: SessionCycleClassDataResponseDto;
|
|
55
55
|
};
|
|
56
56
|
tags: ClassCycleTag[];
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
startsAt: number;
|
|
58
|
+
endsAt: number;
|
|
59
59
|
state: EntityState;
|
|
60
60
|
}
|
|
61
|
-
export interface
|
|
62
|
-
members:
|
|
63
|
-
cycle:
|
|
61
|
+
export interface ClassCycleDataResponseDto extends ClassSummaryListResponseDto {
|
|
62
|
+
members: EntityMembersResponseDto;
|
|
63
|
+
cycle: CycleClassDataResponseDto;
|
|
64
64
|
cycles: {
|
|
65
65
|
[key: string]: {
|
|
66
66
|
name: string;
|
|
@@ -69,15 +69,15 @@ export interface ClassCycleDataResponseDTO extends ClassSummaryListResponseDTO {
|
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
export interface
|
|
72
|
+
export interface ClassCyclesCycleDataResponseDto extends Omit<CycleClassDataResponseDto, 'sessions'> {
|
|
73
73
|
sessions: {
|
|
74
|
-
[key: string]: Omit<
|
|
74
|
+
[key: string]: Omit<SessionCycleClassDataResponseDto, 'assignments'>;
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
export interface
|
|
78
|
-
members:
|
|
77
|
+
export interface ClassCyclesDataResponseDto extends ClassSummaryListResponseDto {
|
|
78
|
+
members: EntityMembersResponseDto;
|
|
79
79
|
cycles: {
|
|
80
|
-
[key: string]:
|
|
80
|
+
[key: string]: ClassCyclesCycleDataResponseDto;
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
export interface AssignmentContestUpsert extends AssignmentBasicInfo {
|
|
@@ -92,14 +92,14 @@ export interface AssignmentWorksheetUpsert extends AssignmentBasicInfo {
|
|
|
92
92
|
type: AssignmentClass.WORKSHEET;
|
|
93
93
|
worksheetKey: string;
|
|
94
94
|
}
|
|
95
|
-
export interface
|
|
96
|
-
members:
|
|
95
|
+
export interface UpsertClassDto extends Omit<ClassBaseDocument, 'members' | 'key' | 'cycles'> {
|
|
96
|
+
members: EntityMembersDto;
|
|
97
97
|
}
|
|
98
|
-
export interface
|
|
98
|
+
export interface UpsertClassCycleDto extends Omit<ClassBaseDocument['cycles'][string], 'sessions' | 'id'> {
|
|
99
99
|
}
|
|
100
|
-
export interface
|
|
100
|
+
export interface UpsertClassCycleSessionDto extends Omit<ClassBaseDocument['cycles'][string]['sessions'][string], 'assignments' | 'id'> {
|
|
101
101
|
}
|
|
102
|
-
export interface
|
|
102
|
+
export interface UpsertClassCycleSessionAssignmentDto extends Omit<AssignmentBasicInfo, 'id'> {
|
|
103
103
|
key: string;
|
|
104
104
|
}
|
|
105
105
|
export interface ClassAssignmentBaseDocument {
|
|
@@ -107,8 +107,8 @@ export interface ClassAssignmentBaseDocument {
|
|
|
107
107
|
assignmentId: string;
|
|
108
108
|
points: number;
|
|
109
109
|
}
|
|
110
|
-
export interface
|
|
111
|
-
user:
|
|
110
|
+
export interface ClassAssignmentDataResponseDto {
|
|
111
|
+
user: UserSummaryListResponseDto;
|
|
112
112
|
assignmentId: string;
|
|
113
113
|
points: number;
|
|
114
114
|
}
|
package/dist/types/dto/code.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UserOrganizationBasicInfoResponseDto } from './user';
|
|
2
2
|
export type ReactionUserResponseData = {
|
|
3
3
|
key: string;
|
|
4
|
-
user:
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
user: UserOrganizationBasicInfoResponseDto;
|
|
5
|
+
createdAt: number;
|
|
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
15
|
[key: string]: ReactionUserResponseData;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
replies:
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
replies: CommentDataResponseDto[];
|
|
19
|
+
createdAt: number;
|
|
20
|
+
updatedAt: number;
|
|
21
21
|
}
|
|
@@ -1,52 +1,45 @@
|
|
|
1
|
-
import { ContestBaseDocument,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export type
|
|
1
|
+
import { ContestBaseDocument, ContestEventAction, ContestProblemPrerequisite, ContestProblem, ContestSettings, ContestTimeFlags, ContestUser, EntityState, ProblemSettings, ProblemStatement, TextLanguage } from '../types';
|
|
2
|
+
import { EntityMembersDto, EntityMembersWithTimestampsResponseDto } from './entity';
|
|
3
|
+
import { EntityOrganizationSummaryListResponseDto, EntityOrganizationSystemSummaryListResponseDto, ProblemJudgeSummaryListResponseDto, ProblemSummaryListResponseDto } from './problem';
|
|
4
|
+
import { EntityOwnerSystemSummaryListResponseDto, UserOrganizationBasicInfoResponseDto } from './user';
|
|
5
|
+
export type UpsertContestProblemPrerequisiteDto = (Omit<ContestProblemPrerequisite, 'problemId'> & {
|
|
6
6
|
problemIndex: string;
|
|
7
7
|
})[];
|
|
8
|
-
export interface
|
|
8
|
+
export interface UpsertContestProblemDto extends Omit<ContestProblem, 'id' | 'prerequisites'> {
|
|
9
9
|
key: string;
|
|
10
|
-
prerequisites:
|
|
10
|
+
prerequisites: UpsertContestProblemPrerequisiteDto;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
13
|
-
members:
|
|
12
|
+
export interface UpsertContestDto extends Omit<ContestBaseDocument, 'key' | 'members' | 'problems' | 'settings' | 'events'> {
|
|
13
|
+
members: EntityMembersDto;
|
|
14
14
|
problems: {
|
|
15
|
-
[key: string]:
|
|
15
|
+
[key: string]: UpsertContestProblemDto;
|
|
16
16
|
};
|
|
17
17
|
settings: Omit<ContestSettings, 'locked'>;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface ContestSummaryListResponseDto extends Pick<ContestBaseDocument, 'key' | 'name' | 'tags'>, ContestTimeFlags {
|
|
20
20
|
user: ContestUser;
|
|
21
|
-
owner:
|
|
22
|
-
|
|
23
|
-
settings: Pick<ContestSettings, '
|
|
21
|
+
owner: UserOrganizationBasicInfoResponseDto;
|
|
22
|
+
organization: EntityOrganizationSummaryListResponseDto;
|
|
23
|
+
settings: Pick<ContestSettings, 'startsAt' | 'endsAt' | 'frozenAt' | 'silencedAt' | 'penalty' | 'upsolvingEnabled'>;
|
|
24
24
|
totalContestants: number;
|
|
25
|
-
isLive: boolean;
|
|
26
|
-
isPast: boolean;
|
|
27
|
-
isFuture: boolean;
|
|
28
|
-
isEndless: boolean;
|
|
29
|
-
isGlobal: boolean;
|
|
30
|
-
isFrozenTime: boolean;
|
|
31
|
-
isQuietTime: boolean;
|
|
32
25
|
}
|
|
33
|
-
export interface
|
|
26
|
+
export interface ContestSystemSummaryListResponseDto extends ContestSummaryListResponseDto {
|
|
34
27
|
state: EntityState;
|
|
35
28
|
id: string;
|
|
36
|
-
owner:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
owner: EntityOwnerSystemSummaryListResponseDto;
|
|
30
|
+
organization: EntityOrganizationSystemSummaryListResponseDto;
|
|
31
|
+
createdAt: number;
|
|
32
|
+
updatedAt: number;
|
|
40
33
|
}
|
|
41
|
-
export interface
|
|
34
|
+
export interface ContestProblemBasicDataResponseDto extends Omit<ContestProblem, 'id' | 'prerequisites'> {
|
|
42
35
|
name: string;
|
|
43
36
|
key: string;
|
|
44
|
-
prerequisites:
|
|
45
|
-
judge:
|
|
37
|
+
prerequisites: UpsertContestProblemPrerequisiteDto;
|
|
38
|
+
judge: ProblemJudgeSummaryListResponseDto;
|
|
46
39
|
tags: string[];
|
|
47
|
-
|
|
40
|
+
organization: EntityOrganizationSummaryListResponseDto;
|
|
48
41
|
}
|
|
49
|
-
export interface
|
|
42
|
+
export interface ContestContestProblemDataResponseDto extends Omit<ProblemSummaryListResponseDto, 'user'> {
|
|
50
43
|
author: string;
|
|
51
44
|
shortname: string;
|
|
52
45
|
statement: ProblemStatement;
|
|
@@ -60,7 +53,7 @@ export declare enum ContestProblemBlockedByType {
|
|
|
60
53
|
START_TIME_IN_THE_FUTURE = "START_TIME_IN_THE_FUTURE",
|
|
61
54
|
END_TIME_IN_THE_PAST = "END_TIME_IN_THE_PAST"
|
|
62
55
|
}
|
|
63
|
-
export type
|
|
56
|
+
export type ContestProblemDataResponseDto = ContestProblemBasicDataResponseDto & ContestContestProblemDataResponseDto & {
|
|
64
57
|
blockedBy: {
|
|
65
58
|
type: ContestProblemBlockedByType;
|
|
66
59
|
details: Record<string, any>;
|
|
@@ -73,22 +66,33 @@ export type ContestProblemDataResponseDTO = ContestProblemBasicDataResponseDTO &
|
|
|
73
66
|
myPenalty: number;
|
|
74
67
|
myIndexAccepted: number;
|
|
75
68
|
};
|
|
76
|
-
export interface
|
|
69
|
+
export interface ContestEventResponseDto {
|
|
77
70
|
action: ContestEventAction;
|
|
78
|
-
user:
|
|
71
|
+
user: UserOrganizationBasicInfoResponseDto;
|
|
79
72
|
timestamp: number;
|
|
80
73
|
details: Record<string, any>;
|
|
81
74
|
}
|
|
82
|
-
export interface
|
|
83
|
-
problems: Record<string,
|
|
75
|
+
export interface ContestDataResponseDto extends Omit<ContestSummaryListResponseDto, 'settings'>, Pick<ContestBaseDocument, 'settings' | 'description' | 'groups'> {
|
|
76
|
+
problems: Record<string, ContestProblemDataResponseDto>;
|
|
84
77
|
state: EntityState;
|
|
85
78
|
}
|
|
86
|
-
export interface
|
|
87
|
-
members:
|
|
79
|
+
export interface ContestMembersResponseDto {
|
|
80
|
+
members: EntityMembersWithTimestampsResponseDto;
|
|
88
81
|
}
|
|
89
|
-
export interface
|
|
90
|
-
clarifications:
|
|
82
|
+
export interface ContestClarificationsResponseDto {
|
|
83
|
+
clarifications: ContestClarificationResponseDto[];
|
|
91
84
|
}
|
|
92
|
-
export interface
|
|
93
|
-
events:
|
|
85
|
+
export interface ContestEventsResponseDto {
|
|
86
|
+
events: ContestEventResponseDto[];
|
|
94
87
|
}
|
|
88
|
+
export type ContestClarificationResponseDto = {
|
|
89
|
+
key: string;
|
|
90
|
+
problemJudgeKey: string;
|
|
91
|
+
question: string;
|
|
92
|
+
questionUser: UserOrganizationBasicInfoResponseDto;
|
|
93
|
+
askedAt: number;
|
|
94
|
+
answer: string;
|
|
95
|
+
answeredAt: number;
|
|
96
|
+
answerUser: UserOrganizationBasicInfoResponseDto;
|
|
97
|
+
public: boolean;
|
|
98
|
+
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { CourseBaseDocument } from '../types';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export type
|
|
2
|
+
import { EntityMembersDto, EntityMembersResponseDto } from './entity';
|
|
3
|
+
import { UserOrganizationBasicInfoResponseDto } from './user';
|
|
4
|
+
import { WorksheetSummaryListResponseDto } from './worksheet';
|
|
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
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EntityAccess, EntityMembersRank } from '../types';
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
1
|
+
import { EntityAccess, EntityLogChanges, EntityMembersRank } from '../types';
|
|
2
|
+
import { UserOrganizationBasicInfoResponseDto } from './user';
|
|
3
|
+
export interface EntityMembersDto {
|
|
4
4
|
rankAdministrators: EntityMembersRank;
|
|
5
5
|
administrators: string[];
|
|
6
6
|
rankManagers: EntityMembersRank;
|
|
@@ -12,29 +12,29 @@ export interface EntityMembersDTO {
|
|
|
12
12
|
rankParticipants: EntityMembersRank;
|
|
13
13
|
participants: string[];
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface EntityMembersResponseDto {
|
|
16
16
|
rankAdministrators: EntityMembersRank;
|
|
17
17
|
administrators: {
|
|
18
|
-
[key: string]:
|
|
18
|
+
[key: string]: DocumentMemberResponseDto;
|
|
19
19
|
};
|
|
20
20
|
rankManagers: EntityMembersRank;
|
|
21
21
|
managers: {
|
|
22
|
-
[key: string]:
|
|
22
|
+
[key: string]: DocumentMemberResponseDto;
|
|
23
23
|
};
|
|
24
24
|
rankGuests: EntityMembersRank;
|
|
25
25
|
guests: {
|
|
26
|
-
[key: string]:
|
|
26
|
+
[key: string]: DocumentMemberResponseDto;
|
|
27
27
|
};
|
|
28
28
|
rankSpectators: EntityMembersRank;
|
|
29
29
|
spectators: {
|
|
30
|
-
[key: string]:
|
|
30
|
+
[key: string]: DocumentMemberResponseDto;
|
|
31
31
|
};
|
|
32
32
|
rankParticipants: EntityMembersRank;
|
|
33
33
|
participants: {
|
|
34
|
-
[key: string]:
|
|
34
|
+
[key: string]: DocumentMemberResponseDto;
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
export interface
|
|
37
|
+
export interface DocumentUserResponseDto {
|
|
38
38
|
isOwner: boolean;
|
|
39
39
|
isManager: boolean;
|
|
40
40
|
isSpectator: boolean;
|
|
@@ -43,50 +43,55 @@ export declare enum MemberType {
|
|
|
43
43
|
USER = "USER",
|
|
44
44
|
TEAM = "TEAM"
|
|
45
45
|
}
|
|
46
|
-
export interface
|
|
46
|
+
export interface DocumentMemberResponseDto extends UserOrganizationBasicInfoResponseDto {
|
|
47
47
|
type: MemberType;
|
|
48
48
|
}
|
|
49
|
-
export interface
|
|
49
|
+
export interface DocumentMemberWithTimestampsResponseDto extends DocumentMemberResponseDto {
|
|
50
50
|
type: MemberType;
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
lastVisitedAt: number;
|
|
52
|
+
joinedAt: number;
|
|
53
53
|
}
|
|
54
|
-
export interface
|
|
54
|
+
export interface EntityMembersWithTimestampsResponseDto {
|
|
55
55
|
rankAdministrators: EntityMembersRank;
|
|
56
56
|
administrators: {
|
|
57
|
-
[key: string]:
|
|
57
|
+
[key: string]: DocumentMemberWithTimestampsResponseDto;
|
|
58
58
|
};
|
|
59
59
|
rankManagers: EntityMembersRank;
|
|
60
60
|
managers: {
|
|
61
|
-
[key: string]:
|
|
61
|
+
[key: string]: DocumentMemberWithTimestampsResponseDto;
|
|
62
62
|
};
|
|
63
63
|
rankGuests: EntityMembersRank;
|
|
64
64
|
guests: {
|
|
65
|
-
[key: string]:
|
|
65
|
+
[key: string]: DocumentMemberWithTimestampsResponseDto;
|
|
66
66
|
};
|
|
67
67
|
rankSpectators: EntityMembersRank;
|
|
68
68
|
spectators: {
|
|
69
|
-
[key: string]:
|
|
69
|
+
[key: string]: DocumentMemberWithTimestampsResponseDto;
|
|
70
70
|
};
|
|
71
71
|
rankParticipants: EntityMembersRank;
|
|
72
72
|
participants: {
|
|
73
|
-
[key: string]:
|
|
73
|
+
[key: string]: DocumentMemberWithTimestampsResponseDto;
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
export interface
|
|
76
|
+
export interface DocumentMembersResponseDto {
|
|
77
77
|
access: EntityAccess;
|
|
78
78
|
managers: {
|
|
79
|
-
[key: string]:
|
|
79
|
+
[key: string]: DocumentMemberResponseDto;
|
|
80
80
|
};
|
|
81
81
|
spectators: {
|
|
82
|
-
[key: string]:
|
|
82
|
+
[key: string]: DocumentMemberResponseDto;
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
export interface
|
|
85
|
+
export interface DocumentCreateResponseDto {
|
|
86
86
|
key: string;
|
|
87
87
|
}
|
|
88
|
-
export interface
|
|
88
|
+
export interface MetadataResponseDto {
|
|
89
89
|
title: string;
|
|
90
90
|
description: string;
|
|
91
91
|
cover: string;
|
|
92
92
|
}
|
|
93
|
+
export interface LogDataResponseDto {
|
|
94
|
+
changes: EntityLogChanges[];
|
|
95
|
+
timestamp: number;
|
|
96
|
+
customerUser: UserOrganizationBasicInfoResponseDto;
|
|
97
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ExcalidrawBaseDocument } from '../types';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export interface
|
|
5
|
-
owner:
|
|
6
|
-
members:
|
|
2
|
+
import { EntityMembersDto, EntityMembersResponseDto } from './entity';
|
|
3
|
+
import { UserOrganizationBasicInfoResponseDto } from './user';
|
|
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/types/dto/file.d.ts
CHANGED
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export interface FileBasic {
|
|
4
|
-
name: string;
|
|
5
|
-
description: string;
|
|
6
|
-
state: EntityState;
|
|
7
|
-
}
|
|
8
|
-
export interface CreateFileDTO extends FileBasic {
|
|
1
|
+
import { FileBasic, FileContent, FileMemberRole, SummaryFileContent, UserBasic } from '../types';
|
|
2
|
+
import { DocumentMembersResponseDto, DocumentUserResponseDto } from './entity';
|
|
3
|
+
export interface CreateFileDto extends FileBasic {
|
|
9
4
|
folderId: string;
|
|
10
5
|
content: FileContent;
|
|
11
|
-
members:
|
|
6
|
+
members: FileMembersDto;
|
|
12
7
|
}
|
|
13
|
-
export interface
|
|
8
|
+
export interface FileSummaryListResponseDto extends FileBasic {
|
|
14
9
|
key: string;
|
|
15
|
-
updatedAt:
|
|
10
|
+
updatedAt: number;
|
|
16
11
|
content: SummaryFileContent;
|
|
17
|
-
user:
|
|
12
|
+
user: DocumentUserResponseDto;
|
|
18
13
|
owner: UserBasic;
|
|
19
14
|
}
|
|
20
|
-
export interface
|
|
15
|
+
export interface FileDataResponseDto extends FileSummaryListResponseDto {
|
|
21
16
|
content: FileContent;
|
|
22
|
-
members:
|
|
17
|
+
members: DocumentMembersResponseDto;
|
|
23
18
|
parentFolders: {
|
|
24
19
|
name: string;
|
|
25
20
|
key: string;
|
|
@@ -29,6 +24,6 @@ export interface FileDataResponseDTO extends FileSummaryListResponseDTO {
|
|
|
29
24
|
isInArchivedFolder: boolean;
|
|
30
25
|
}[];
|
|
31
26
|
}
|
|
32
|
-
export interface
|
|
27
|
+
export interface FileMembersDto {
|
|
33
28
|
[key: string]: FileMemberRole;
|
|
34
29
|
}
|