@edifice.io/communities-tests 1.0.0-develop-pedago.9.20250731094830 → 1.1.3
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/it/scenarios/api-announcements.spec.ts +270 -0
- package/it/scenarios/api-community-role-check.spec.ts +1 -1
- package/it/scenarios/api-folders.spec.ts +306 -0
- package/it/scenarios/api-invitations-search-sort.spec.ts +1 -1
- package/it/scenarios/api-invitations.spec.ts +33 -13
- package/it/scenarios/api-membership.spec.ts +26 -24
- package/it/scenarios/api-permission-check.spec.ts +1 -1
- package/it/scenarios/api-resources-search-sort.spec.ts +64 -12
- package/it/scenarios/api-resources.spec.ts +2 -7
- package/it/scenarios/utils/_announcements-api.utils.ts +195 -0
- package/it/scenarios/utils/_folders-api.utils.ts +199 -0
- package/it/scenarios/utils/_http-response.utils.ts +46 -0
- package/it/scenarios/utils/_invitation-api.utils.ts +19 -21
- package/it/scenarios/utils/_resource-api.utils.ts +14 -7
- package/it/scenarios/utils/_role.utils.ts +11 -3
- package/package.json +2 -10
- package/types/generated/announcement.ts +73 -0
- package/types/generated/base.ts +32 -0
- package/types/generated/community.ts +97 -0
- package/types/generated/discussion.ts +47 -0
- package/types/generated/folder.ts +49 -0
- package/types/generated/index.ts +12 -0
- package/types/generated/invitation.ts +135 -0
- package/types/generated/membership.ts +74 -0
- package/types/generated/resource.ts +94 -0
- package/types/generated/wiki.ts +24 -0
- /package/loadtest/{index.ts → scenarios/index.ts} +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// Types automatically generated from DTOs using TypeScript Compiler API
|
|
2
|
+
// Category: invitation
|
|
3
|
+
// Generated on: 2025-12-02T09:34:02.436Z
|
|
4
|
+
|
|
5
|
+
import { MembershipRole } from "./membership";
|
|
6
|
+
import {
|
|
7
|
+
PageMetadataDto,
|
|
8
|
+
PaginationQueryDto,
|
|
9
|
+
SortDirection,
|
|
10
|
+
UserDto,
|
|
11
|
+
} from "./base";
|
|
12
|
+
import { CommunityStatsDto, CommunityType } from "./community";
|
|
13
|
+
|
|
14
|
+
export enum InvitationStatus {
|
|
15
|
+
PENDING = "PENDING",
|
|
16
|
+
REQUEST = "REQUEST",
|
|
17
|
+
ACCEPTED = "ACCEPTED",
|
|
18
|
+
REJECTED = "REJECTED",
|
|
19
|
+
REQUEST_ACCEPTED = "REQUEST_ACCEPTED",
|
|
20
|
+
REQUEST_REJECTED = "REQUEST_REJECTED",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export enum InvitationSortField {
|
|
24
|
+
STATUS = "status",
|
|
25
|
+
LAST_VISIT = "lastVisit",
|
|
26
|
+
ROLE = "currentRole",
|
|
27
|
+
USER_NAME = "userName",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface InvitedUserDto {
|
|
31
|
+
userId: string;
|
|
32
|
+
role: MembershipRole;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface CreateInvitationDto {
|
|
36
|
+
users: InvitedUserDto[];
|
|
37
|
+
message?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface UpdateInvitationStatusDto {
|
|
41
|
+
status: InvitationStatus.ACCEPTED | InvitationStatus.REJECTED;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface UpdateRequestStatusDto {
|
|
45
|
+
status: InvitationStatus.REQUEST_ACCEPTED | InvitationStatus.REQUEST_REJECTED;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface SearchInvitationDto extends PaginationQueryDto {
|
|
49
|
+
status?: InvitationStatus;
|
|
50
|
+
sentAfter?: Date;
|
|
51
|
+
seeLater?: boolean;
|
|
52
|
+
communityId?: number;
|
|
53
|
+
communityType?: CommunityType;
|
|
54
|
+
fields?: InvitationFields[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface CommunitySummaryDto {
|
|
58
|
+
id: number;
|
|
59
|
+
title: string;
|
|
60
|
+
image?: string;
|
|
61
|
+
colour?: string;
|
|
62
|
+
type: CommunityType;
|
|
63
|
+
creationDate: Date;
|
|
64
|
+
welcomeNote?: string;
|
|
65
|
+
schoolYearStart?: number;
|
|
66
|
+
schoolYearEnd?: number;
|
|
67
|
+
creator: UserDto;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface InvitationResponseDto {
|
|
71
|
+
id: number;
|
|
72
|
+
invitationDate: Date;
|
|
73
|
+
status: InvitationStatus;
|
|
74
|
+
communityId: number;
|
|
75
|
+
sentBy: UserDto;
|
|
76
|
+
message?: string;
|
|
77
|
+
receiver: UserDto;
|
|
78
|
+
role: MembershipRole;
|
|
79
|
+
community?: CommunitySummaryDto;
|
|
80
|
+
communityStats?: CommunityStatsDto;
|
|
81
|
+
seeLater?: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface InvitationOrMemberDto extends InvitationResponseDto {
|
|
85
|
+
joinDate?: Date;
|
|
86
|
+
user: UserDto;
|
|
87
|
+
lastVisitAnnouncementsDate?: Date;
|
|
88
|
+
lastVisitResourcesDate?: Date;
|
|
89
|
+
lastVisitWikiDate?: Date;
|
|
90
|
+
lastVisitDiscussionsDate?: Date;
|
|
91
|
+
lastVisit?: Date;
|
|
92
|
+
invitationId?: number;
|
|
93
|
+
memberId?: number;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface InvitationStatsDto {
|
|
97
|
+
total: number;
|
|
98
|
+
accepted: number;
|
|
99
|
+
pending: number;
|
|
100
|
+
rejected: number;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface SearchInvitationResponseDto {
|
|
104
|
+
items: InvitationResponseDto[];
|
|
105
|
+
meta: PageMetadataDto;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface SearchInvitationAndMembersResponseDto {
|
|
109
|
+
items: InvitationOrMemberDto[];
|
|
110
|
+
meta: PageMetadataDto;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface CountInvitationsQueryDto {
|
|
114
|
+
sentAfter: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface InvitationStatsQueryDto {}
|
|
118
|
+
|
|
119
|
+
export interface ListCommunityInvitationsQueryDto extends PaginationQueryDto {
|
|
120
|
+
status?: InvitationStatus;
|
|
121
|
+
searchTerm?: string;
|
|
122
|
+
sortBy?: InvitationSortField;
|
|
123
|
+
sortDirection?: SortDirection;
|
|
124
|
+
fields?: InvitationFields[];
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface DeleteInvitationsDto {
|
|
128
|
+
invitationIds: number[];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface UpdateSeeLaterDto {
|
|
132
|
+
seeLater: boolean;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type InvitationFields = "basic" | "community" | "stats";
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// Types automatically generated from DTOs using TypeScript Compiler API
|
|
2
|
+
// Category: membership
|
|
3
|
+
// Generated on: 2025-12-02T09:34:02.436Z
|
|
4
|
+
|
|
5
|
+
import { PageMetadataDto, PaginationQueryDto, UserDto } from "./base";
|
|
6
|
+
|
|
7
|
+
export enum MembershipRole {
|
|
8
|
+
ADMIN = "ADMIN",
|
|
9
|
+
MEMBER = "MEMBER",
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum CommunitySection {
|
|
13
|
+
ANNOUNCEMENTS = "ANNOUNCEMENTS",
|
|
14
|
+
RESOURCES = "RESOURCES",
|
|
15
|
+
WIKI = "WIKI",
|
|
16
|
+
DISCUSSIONS = "DISCUSSIONS",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface JoinCommunityDto {
|
|
20
|
+
secretCode: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CreateMembershipDto {
|
|
24
|
+
userId: string;
|
|
25
|
+
role: MembershipRole;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface UpdateMembershipDto {
|
|
29
|
+
role?: MembershipRole;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface MembershipResponseDto {
|
|
33
|
+
id: number;
|
|
34
|
+
joinDate: Date;
|
|
35
|
+
role: MembershipRole;
|
|
36
|
+
lastVisitAnnouncementsDate?: Date;
|
|
37
|
+
lastVisitResourcesDate?: Date;
|
|
38
|
+
lastVisitWikiDate?: Date;
|
|
39
|
+
lastVisitDiscussionsDate?: Date;
|
|
40
|
+
communityId: number;
|
|
41
|
+
user: UserDto;
|
|
42
|
+
inviter?: UserDto;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface UpdateLastVisitDto {
|
|
46
|
+
section: CommunitySection;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface LeaveCommunityOptionsDto {
|
|
50
|
+
removeSharedResources: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface SearchMembershipResponseDto {
|
|
54
|
+
items: MembershipResponseDto[];
|
|
55
|
+
meta: PageMetadataDto;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface CreateMembershipBatchDto {
|
|
59
|
+
members: CreateMembershipDto[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface DeleteMembersDto {
|
|
63
|
+
userIds: number[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface DeleteMembersResponseDto {
|
|
67
|
+
numberOfMembersRemoved: number;
|
|
68
|
+
numberOfInvitationsRemoved: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface SearchMembershipQueryDto extends PaginationQueryDto {
|
|
72
|
+
userEntId?: string;
|
|
73
|
+
searchTerm?: string;
|
|
74
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// Types automatically generated from DTOs using TypeScript Compiler API
|
|
2
|
+
// Category: resource
|
|
3
|
+
// Generated on: 2025-12-02T09:34:02.436Z
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
PageMetadataDto,
|
|
7
|
+
PaginationQueryDto,
|
|
8
|
+
SortDirection,
|
|
9
|
+
UserDto,
|
|
10
|
+
} from "./base";
|
|
11
|
+
|
|
12
|
+
export enum AppName {
|
|
13
|
+
WORKSPACE = "workspace",
|
|
14
|
+
BLOG = "blog",
|
|
15
|
+
TIMELINEGENERATOR = "timelinegenerator",
|
|
16
|
+
SCRAPBOOK = "scrapbook",
|
|
17
|
+
MINDMAP = "mindmap",
|
|
18
|
+
WIKI = "wiki",
|
|
19
|
+
EXERCIZER = "exercizer",
|
|
20
|
+
FORM = "form",
|
|
21
|
+
COLLABORATIVEWALL = "collaborativewall",
|
|
22
|
+
COLLABORATIVEDITOR = "collaborativeeditor",
|
|
23
|
+
EXTERNAL_LINK = "external_link",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export enum ResourceType {
|
|
27
|
+
IMAGE = "IMAGE",
|
|
28
|
+
VIDEO = "VIDEO",
|
|
29
|
+
SOUND = "SOUND",
|
|
30
|
+
ENT = "ENT",
|
|
31
|
+
EXTERNAL_LINK = "EXTERNAL_LINK",
|
|
32
|
+
FILE = "FILE",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ResourceDto {
|
|
36
|
+
id: number;
|
|
37
|
+
url: string;
|
|
38
|
+
title: string;
|
|
39
|
+
addedDate: Date;
|
|
40
|
+
addedBy?: UserDto;
|
|
41
|
+
openInNewTab?: boolean;
|
|
42
|
+
appName: AppName;
|
|
43
|
+
type: ResourceType;
|
|
44
|
+
thumbnail?: string;
|
|
45
|
+
updatedAt: Date;
|
|
46
|
+
updatedBy?: UserDto;
|
|
47
|
+
markedForDeletion: boolean;
|
|
48
|
+
author: UserDto;
|
|
49
|
+
communityId: number;
|
|
50
|
+
folderId?: number;
|
|
51
|
+
resourceEntId: string;
|
|
52
|
+
allowContribution: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface CountResourceDto {
|
|
56
|
+
count: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface CreateResourceDto {
|
|
60
|
+
resourceEntId?: string;
|
|
61
|
+
resourceUrl?: string;
|
|
62
|
+
title?: string;
|
|
63
|
+
openInNewTab?: boolean;
|
|
64
|
+
appName: AppName;
|
|
65
|
+
type: ResourceType;
|
|
66
|
+
folderId?: number;
|
|
67
|
+
allowContribution?: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface SearchResourceDto extends PaginationQueryDto {
|
|
71
|
+
type?: ResourceType;
|
|
72
|
+
addedAfter?: Date;
|
|
73
|
+
search?: string;
|
|
74
|
+
sortBy?: ResourceSortField;
|
|
75
|
+
sortDirection?: SortDirection;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface SearchResourceResponseDto {
|
|
79
|
+
items: ResourceDto[];
|
|
80
|
+
meta: PageMetadataDto;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface UpdateResourceDto {
|
|
84
|
+
title?: string;
|
|
85
|
+
openInNewTab?: boolean;
|
|
86
|
+
resourceUrl?: string;
|
|
87
|
+
allowContribution?: boolean;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface CountResourceQueryDto {
|
|
91
|
+
addedAfter?: Date;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export type ResourceSortField = "title" | "addedDate";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Types automatically generated from DTOs using TypeScript Compiler API
|
|
2
|
+
// Category: wiki
|
|
3
|
+
// Generated on: 2025-12-02T09:34:02.437Z
|
|
4
|
+
|
|
5
|
+
import { PageMetadataDto } from "./base";
|
|
6
|
+
|
|
7
|
+
export interface CountWikiPagesDto {
|
|
8
|
+
count: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface WikiPageDto {}
|
|
12
|
+
|
|
13
|
+
export interface SearchWikiPagesDto {
|
|
14
|
+
page?: number;
|
|
15
|
+
size?: number;
|
|
16
|
+
sortBy?: string;
|
|
17
|
+
sortDirection?: string;
|
|
18
|
+
search?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface SearchWikiPagesResponseDto {
|
|
22
|
+
items: WikiPageDto[];
|
|
23
|
+
meta: PageMetadataDto;
|
|
24
|
+
}
|
|
File without changes
|