@edifice.io/community-client-rest-rn 1.0.0-develop-pedago.19 → 1.0.0-develop.20251203154647
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/clients/adapters/fetch-adapter.js +3 -7
- package/clients/adapters/fetch-adapter.js.map +1 -1
- package/clients/adapters/http-adapter.js +1 -2
- package/clients/adapters/http-service-adapter.js +1 -5
- package/clients/adapters/http-service-adapter.js.map +1 -1
- package/clients/announcement.client.js +2 -6
- package/clients/announcement.client.js.map +1 -1
- package/clients/base-api.client.js +5 -9
- package/clients/base-api.client.js.map +1 -1
- package/clients/community.client.js +8 -12
- package/clients/community.client.js.map +1 -1
- package/clients/discussion.client.js +2 -6
- package/clients/discussion.client.js.map +1 -1
- package/clients/errors/api-error.js +1 -5
- package/clients/errors/api-error.js.map +1 -1
- package/clients/folder.client.js +2 -6
- package/clients/folder.client.js.map +1 -1
- package/clients/index.js +11 -27
- package/clients/index.js.map +1 -1
- package/clients/invitation.client.js +11 -15
- package/clients/invitation.client.js.map +1 -1
- package/clients/membership.client.js +2 -6
- package/clients/membership.client.js.map +1 -1
- package/clients/resource.client.js +2 -6
- package/clients/resource.client.js.map +1 -1
- package/clients/wiki.client.js +2 -6
- package/clients/wiki.client.js.map +1 -1
- package/decorators/custom-type.decorator.browser.js +3 -8
- package/decorators/custom-type.decorator.browser.js.map +1 -1
- package/dtos/announcement.js +71 -82
- package/dtos/announcement.js.map +1 -1
- package/dtos/base.js +31 -38
- package/dtos/base.js.map +1 -1
- package/dtos/community.js +139 -150
- package/dtos/community.js.map +1 -1
- package/dtos/discussion.js +31 -41
- package/dtos/discussion.js.map +1 -1
- package/dtos/folder.js +56 -66
- package/dtos/folder.js.map +1 -1
- package/dtos/index.js +9 -25
- package/dtos/index.js.map +1 -1
- package/dtos/invitation.js +149 -168
- package/dtos/invitation.js.map +1 -1
- package/dtos/membership.js +66 -80
- package/dtos/membership.js.map +1 -1
- package/dtos/resource.js +106 -116
- package/dtos/resource.js.map +1 -1
- package/dtos/wiki.js +15 -22
- package/dtos/wiki.js.map +1 -1
- package/index.js +5 -23
- package/index.js.map +1 -1
- package/mocks/index.js +1 -17
- package/mocks/index.js.map +1 -1
- package/mocks/search-community-response.mock.js +16 -25
- package/mocks/search-community-response.mock.js.map +1 -1
- package/package.json +5 -5
- package/tsconfig.browser.tsbuildinfo +1 -1
- package/utils/background-images.constants.d.ts +1 -1
- package/utils/background-images.constants.js +2 -5
- package/utils/background-images.constants.js.map +1 -1
- package/utils/community-image.types.js +1 -2
- package/utils/community-image.util.js +13 -26
- package/utils/community-image.util.js.map +1 -1
- package/utils/community-image.util.test.js +136 -138
- package/utils/community-image.util.test.js.map +1 -1
- package/utils/index.js +5 -21
- package/utils/index.js.map +1 -1
- package/utils/resource-url.util.js +12 -15
- package/utils/resource-url.util.js.map +1 -1
- package/utils/rights.utils.js +1 -4
- package/utils/rights.utils.js.map +1 -1
package/dtos/invitation.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,17 +7,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const class_transformer_1 = require("class-transformer");
|
|
21
|
-
var InvitationStatus;
|
|
10
|
+
import { ApiProperty, ApiPropertyOptional, } from "../decorators/custom-type.decorator.browser";
|
|
11
|
+
import { ArrayMinSize, IsArray, IsBoolean, IsDate, IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString, ValidateIf, ValidateNested, } from "class-validator";
|
|
12
|
+
import { SortDirection, UserDto } from "./base";
|
|
13
|
+
import { PageMetadataDto, PaginationQueryDto } from "./base";
|
|
14
|
+
import { Type } from "../decorators/custom-type.decorator.browser";
|
|
15
|
+
import { MembershipRole } from "./membership";
|
|
16
|
+
import { CommunityStatsDto, CommunityType } from "./community";
|
|
17
|
+
import { Expose, Transform } from "class-transformer";
|
|
18
|
+
export var InvitationStatus;
|
|
22
19
|
(function (InvitationStatus) {
|
|
23
20
|
InvitationStatus["PENDING"] = "PENDING";
|
|
24
21
|
InvitationStatus["REQUEST"] = "REQUEST";
|
|
@@ -26,37 +23,35 @@ var InvitationStatus;
|
|
|
26
23
|
InvitationStatus["REJECTED"] = "REJECTED";
|
|
27
24
|
InvitationStatus["REQUEST_ACCEPTED"] = "REQUEST_ACCEPTED";
|
|
28
25
|
InvitationStatus["REQUEST_REJECTED"] = "REQUEST_REJECTED";
|
|
29
|
-
})(InvitationStatus || (
|
|
30
|
-
class InvitedUserDto {
|
|
26
|
+
})(InvitationStatus || (InvitationStatus = {}));
|
|
27
|
+
export class InvitedUserDto {
|
|
31
28
|
userId;
|
|
32
29
|
role;
|
|
33
30
|
}
|
|
34
|
-
exports.InvitedUserDto = InvitedUserDto;
|
|
35
31
|
__decorate([
|
|
36
|
-
|
|
32
|
+
ApiProperty({
|
|
37
33
|
description: "User ID to invite",
|
|
38
34
|
example: "b9ea566a-c3d4-41ef-9806-65d6beb3bddb",
|
|
39
35
|
}),
|
|
40
|
-
|
|
36
|
+
IsNotEmpty(),
|
|
41
37
|
__metadata("design:type", String)
|
|
42
38
|
], InvitedUserDto.prototype, "userId", void 0);
|
|
43
39
|
__decorate([
|
|
44
|
-
|
|
40
|
+
ApiProperty({
|
|
45
41
|
description: "Role to assign to the user",
|
|
46
|
-
enum:
|
|
47
|
-
example:
|
|
48
|
-
default:
|
|
42
|
+
enum: MembershipRole,
|
|
43
|
+
example: MembershipRole.MEMBER,
|
|
44
|
+
default: MembershipRole.MEMBER,
|
|
49
45
|
}),
|
|
50
|
-
|
|
46
|
+
IsEnum(MembershipRole),
|
|
51
47
|
__metadata("design:type", String)
|
|
52
48
|
], InvitedUserDto.prototype, "role", void 0);
|
|
53
|
-
class CreateInvitationDto {
|
|
49
|
+
export class CreateInvitationDto {
|
|
54
50
|
users;
|
|
55
51
|
message;
|
|
56
52
|
}
|
|
57
|
-
exports.CreateInvitationDto = CreateInvitationDto;
|
|
58
53
|
__decorate([
|
|
59
|
-
|
|
54
|
+
ApiProperty({
|
|
60
55
|
description: "List of users to invite with their roles",
|
|
61
56
|
example: [
|
|
62
57
|
{
|
|
@@ -70,38 +65,36 @@ __decorate([
|
|
|
70
65
|
],
|
|
71
66
|
type: [InvitedUserDto],
|
|
72
67
|
}),
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
ValidateNested({ each: true }),
|
|
69
|
+
Type(() => InvitedUserDto),
|
|
75
70
|
__metadata("design:type", Array)
|
|
76
71
|
], CreateInvitationDto.prototype, "users", void 0);
|
|
77
72
|
__decorate([
|
|
78
|
-
|
|
73
|
+
ApiPropertyOptional({
|
|
79
74
|
description: "Optional message to include with invitation",
|
|
80
75
|
}),
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
IsOptional(),
|
|
77
|
+
IsString(),
|
|
83
78
|
__metadata("design:type", String)
|
|
84
79
|
], CreateInvitationDto.prototype, "message", void 0);
|
|
85
|
-
class UpdateInvitationStatusDto {
|
|
80
|
+
export class UpdateInvitationStatusDto {
|
|
86
81
|
status;
|
|
87
82
|
}
|
|
88
|
-
exports.UpdateInvitationStatusDto = UpdateInvitationStatusDto;
|
|
89
83
|
__decorate([
|
|
90
|
-
|
|
84
|
+
ApiProperty({
|
|
91
85
|
description: "New status for the invitation",
|
|
92
86
|
enum: [InvitationStatus.ACCEPTED, InvitationStatus.REJECTED],
|
|
93
87
|
example: InvitationStatus.ACCEPTED,
|
|
94
88
|
}),
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
IsEnum(InvitationStatus),
|
|
90
|
+
ValidateIf((o) => [InvitationStatus.ACCEPTED, InvitationStatus.REJECTED].includes(o.status)),
|
|
97
91
|
__metadata("design:type", String)
|
|
98
92
|
], UpdateInvitationStatusDto.prototype, "status", void 0);
|
|
99
|
-
class UpdateRequestStatusDto {
|
|
93
|
+
export class UpdateRequestStatusDto {
|
|
100
94
|
status;
|
|
101
95
|
}
|
|
102
|
-
exports.UpdateRequestStatusDto = UpdateRequestStatusDto;
|
|
103
96
|
__decorate([
|
|
104
|
-
|
|
97
|
+
ApiProperty({
|
|
105
98
|
description: "New status for the join request",
|
|
106
99
|
enum: [
|
|
107
100
|
InvitationStatus.REQUEST_ACCEPTED,
|
|
@@ -109,14 +102,14 @@ __decorate([
|
|
|
109
102
|
],
|
|
110
103
|
example: InvitationStatus.REQUEST_ACCEPTED,
|
|
111
104
|
}),
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
IsEnum(InvitationStatus),
|
|
106
|
+
ValidateIf((o) => [
|
|
114
107
|
InvitationStatus.REQUEST_ACCEPTED,
|
|
115
108
|
InvitationStatus.REQUEST_REJECTED,
|
|
116
109
|
].includes(o.status)),
|
|
117
110
|
__metadata("design:type", String)
|
|
118
111
|
], UpdateRequestStatusDto.prototype, "status", void 0);
|
|
119
|
-
class SearchInvitationDto extends
|
|
112
|
+
export class SearchInvitationDto extends PaginationQueryDto {
|
|
120
113
|
status;
|
|
121
114
|
sentAfter;
|
|
122
115
|
seeLater;
|
|
@@ -124,37 +117,36 @@ class SearchInvitationDto extends base_2.PaginationQueryDto {
|
|
|
124
117
|
communityType;
|
|
125
118
|
fields;
|
|
126
119
|
}
|
|
127
|
-
exports.SearchInvitationDto = SearchInvitationDto;
|
|
128
120
|
__decorate([
|
|
129
|
-
|
|
121
|
+
ApiPropertyOptional({
|
|
130
122
|
description: "Filter by status",
|
|
131
123
|
enum: InvitationStatus,
|
|
132
124
|
}),
|
|
133
|
-
|
|
134
|
-
|
|
125
|
+
IsOptional(),
|
|
126
|
+
IsEnum(InvitationStatus),
|
|
135
127
|
__metadata("design:type", String)
|
|
136
128
|
], SearchInvitationDto.prototype, "status", void 0);
|
|
137
129
|
__decorate([
|
|
138
|
-
|
|
130
|
+
ApiPropertyOptional({
|
|
139
131
|
description: "Filter invitations sent after this date",
|
|
140
132
|
}),
|
|
141
|
-
|
|
142
|
-
|
|
133
|
+
IsOptional(),
|
|
134
|
+
Transform(({ obj }) => {
|
|
143
135
|
const tmp = obj && (obj.sentAfter || obj.sentafter);
|
|
144
136
|
return tmp ? new Date(tmp) : undefined;
|
|
145
137
|
}),
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
138
|
+
Type(() => Date),
|
|
139
|
+
IsDate(),
|
|
140
|
+
Expose({ name: "sentafter" }),
|
|
149
141
|
__metadata("design:type", Date)
|
|
150
142
|
], SearchInvitationDto.prototype, "sentAfter", void 0);
|
|
151
143
|
__decorate([
|
|
152
|
-
|
|
144
|
+
ApiPropertyOptional({
|
|
153
145
|
description: "Filter by see-later flag (true/false)",
|
|
154
146
|
type: Boolean,
|
|
155
147
|
}),
|
|
156
|
-
|
|
157
|
-
|
|
148
|
+
IsOptional(),
|
|
149
|
+
Transform(({ obj }) => {
|
|
158
150
|
const value = obj.seelater;
|
|
159
151
|
if (value === "true")
|
|
160
152
|
return true;
|
|
@@ -164,35 +156,35 @@ __decorate([
|
|
|
164
156
|
return value;
|
|
165
157
|
return undefined;
|
|
166
158
|
}),
|
|
167
|
-
|
|
159
|
+
Expose({ name: "seelater" }),
|
|
168
160
|
__metadata("design:type", Boolean)
|
|
169
161
|
], SearchInvitationDto.prototype, "seeLater", void 0);
|
|
170
162
|
__decorate([
|
|
171
|
-
|
|
163
|
+
ApiPropertyOptional({
|
|
172
164
|
description: "Filter by community ID",
|
|
173
165
|
}),
|
|
174
|
-
|
|
175
|
-
|
|
166
|
+
IsOptional(),
|
|
167
|
+
Expose({ name: "communityid" }),
|
|
176
168
|
__metadata("design:type", Number)
|
|
177
169
|
], SearchInvitationDto.prototype, "communityId", void 0);
|
|
178
170
|
__decorate([
|
|
179
|
-
|
|
171
|
+
ApiPropertyOptional({
|
|
180
172
|
description: "Filter by community type",
|
|
181
173
|
}),
|
|
182
|
-
|
|
183
|
-
|
|
174
|
+
IsOptional(),
|
|
175
|
+
Expose({ name: "communitytype" }),
|
|
184
176
|
__metadata("design:type", String)
|
|
185
177
|
], SearchInvitationDto.prototype, "communityType", void 0);
|
|
186
178
|
__decorate([
|
|
187
|
-
|
|
179
|
+
ApiPropertyOptional({
|
|
188
180
|
description: "Fields to include in the response",
|
|
189
181
|
example: ["basic", "community", "stats"],
|
|
190
182
|
isArray: true,
|
|
191
183
|
enum: ["basic", "community", "stats"],
|
|
192
184
|
}),
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
185
|
+
IsOptional(),
|
|
186
|
+
IsArray(),
|
|
187
|
+
Transform(({ value }) => {
|
|
196
188
|
if (Array.isArray(value))
|
|
197
189
|
return value;
|
|
198
190
|
if (typeof value === "string")
|
|
@@ -201,7 +193,7 @@ __decorate([
|
|
|
201
193
|
}),
|
|
202
194
|
__metadata("design:type", Array)
|
|
203
195
|
], SearchInvitationDto.prototype, "fields", void 0);
|
|
204
|
-
class CommunitySummaryDto {
|
|
196
|
+
export class CommunitySummaryDto {
|
|
205
197
|
id;
|
|
206
198
|
title;
|
|
207
199
|
image;
|
|
@@ -213,48 +205,47 @@ class CommunitySummaryDto {
|
|
|
213
205
|
schoolYearEnd;
|
|
214
206
|
creator;
|
|
215
207
|
}
|
|
216
|
-
exports.CommunitySummaryDto = CommunitySummaryDto;
|
|
217
208
|
__decorate([
|
|
218
|
-
|
|
209
|
+
ApiProperty(),
|
|
219
210
|
__metadata("design:type", Number)
|
|
220
211
|
], CommunitySummaryDto.prototype, "id", void 0);
|
|
221
212
|
__decorate([
|
|
222
|
-
|
|
213
|
+
ApiProperty(),
|
|
223
214
|
__metadata("design:type", String)
|
|
224
215
|
], CommunitySummaryDto.prototype, "title", void 0);
|
|
225
216
|
__decorate([
|
|
226
|
-
|
|
217
|
+
ApiPropertyOptional(),
|
|
227
218
|
__metadata("design:type", String)
|
|
228
219
|
], CommunitySummaryDto.prototype, "image", void 0);
|
|
229
220
|
__decorate([
|
|
230
|
-
|
|
221
|
+
ApiPropertyOptional(),
|
|
231
222
|
__metadata("design:type", String)
|
|
232
223
|
], CommunitySummaryDto.prototype, "colour", void 0);
|
|
233
224
|
__decorate([
|
|
234
|
-
|
|
225
|
+
ApiProperty({ enum: CommunityType }),
|
|
235
226
|
__metadata("design:type", String)
|
|
236
227
|
], CommunitySummaryDto.prototype, "type", void 0);
|
|
237
228
|
__decorate([
|
|
238
|
-
|
|
229
|
+
ApiProperty(),
|
|
239
230
|
__metadata("design:type", Date)
|
|
240
231
|
], CommunitySummaryDto.prototype, "creationDate", void 0);
|
|
241
232
|
__decorate([
|
|
242
|
-
|
|
233
|
+
ApiPropertyOptional(),
|
|
243
234
|
__metadata("design:type", String)
|
|
244
235
|
], CommunitySummaryDto.prototype, "welcomeNote", void 0);
|
|
245
236
|
__decorate([
|
|
246
|
-
|
|
237
|
+
ApiPropertyOptional(),
|
|
247
238
|
__metadata("design:type", Number)
|
|
248
239
|
], CommunitySummaryDto.prototype, "schoolYearStart", void 0);
|
|
249
240
|
__decorate([
|
|
250
|
-
|
|
241
|
+
ApiPropertyOptional(),
|
|
251
242
|
__metadata("design:type", Number)
|
|
252
243
|
], CommunitySummaryDto.prototype, "schoolYearEnd", void 0);
|
|
253
244
|
__decorate([
|
|
254
|
-
|
|
255
|
-
__metadata("design:type",
|
|
245
|
+
ApiProperty(),
|
|
246
|
+
__metadata("design:type", UserDto)
|
|
256
247
|
], CommunitySummaryDto.prototype, "creator", void 0);
|
|
257
|
-
class InvitationResponseDto {
|
|
248
|
+
export class InvitationResponseDto {
|
|
258
249
|
id;
|
|
259
250
|
invitationDate;
|
|
260
251
|
status;
|
|
@@ -267,65 +258,64 @@ class InvitationResponseDto {
|
|
|
267
258
|
communityStats;
|
|
268
259
|
seeLater;
|
|
269
260
|
}
|
|
270
|
-
exports.InvitationResponseDto = InvitationResponseDto;
|
|
271
261
|
__decorate([
|
|
272
|
-
|
|
262
|
+
ApiProperty(),
|
|
273
263
|
__metadata("design:type", Number)
|
|
274
264
|
], InvitationResponseDto.prototype, "id", void 0);
|
|
275
265
|
__decorate([
|
|
276
|
-
|
|
266
|
+
ApiProperty(),
|
|
277
267
|
__metadata("design:type", Date)
|
|
278
268
|
], InvitationResponseDto.prototype, "invitationDate", void 0);
|
|
279
269
|
__decorate([
|
|
280
|
-
|
|
270
|
+
ApiProperty({ enum: InvitationStatus }),
|
|
281
271
|
__metadata("design:type", String)
|
|
282
272
|
], InvitationResponseDto.prototype, "status", void 0);
|
|
283
273
|
__decorate([
|
|
284
|
-
|
|
274
|
+
ApiProperty(),
|
|
285
275
|
__metadata("design:type", Number)
|
|
286
276
|
], InvitationResponseDto.prototype, "communityId", void 0);
|
|
287
277
|
__decorate([
|
|
288
|
-
|
|
289
|
-
__metadata("design:type",
|
|
278
|
+
ApiProperty(),
|
|
279
|
+
__metadata("design:type", UserDto)
|
|
290
280
|
], InvitationResponseDto.prototype, "sentBy", void 0);
|
|
291
281
|
__decorate([
|
|
292
|
-
|
|
282
|
+
ApiPropertyOptional(),
|
|
293
283
|
__metadata("design:type", String)
|
|
294
284
|
], InvitationResponseDto.prototype, "message", void 0);
|
|
295
285
|
__decorate([
|
|
296
|
-
|
|
297
|
-
__metadata("design:type",
|
|
286
|
+
ApiProperty(),
|
|
287
|
+
__metadata("design:type", UserDto)
|
|
298
288
|
], InvitationResponseDto.prototype, "receiver", void 0);
|
|
299
289
|
__decorate([
|
|
300
|
-
|
|
290
|
+
ApiProperty({
|
|
301
291
|
description: "User role in the community",
|
|
302
|
-
enum:
|
|
292
|
+
enum: MembershipRole,
|
|
303
293
|
}),
|
|
304
294
|
__metadata("design:type", String)
|
|
305
295
|
], InvitationResponseDto.prototype, "role", void 0);
|
|
306
296
|
__decorate([
|
|
307
|
-
|
|
297
|
+
ApiPropertyOptional({
|
|
308
298
|
description: "Community details (included when includeCommunity=true)",
|
|
309
299
|
type: () => CommunitySummaryDto,
|
|
310
300
|
}),
|
|
311
301
|
__metadata("design:type", CommunitySummaryDto)
|
|
312
302
|
], InvitationResponseDto.prototype, "community", void 0);
|
|
313
303
|
__decorate([
|
|
314
|
-
|
|
304
|
+
ApiPropertyOptional({
|
|
315
305
|
description: "Community statistics",
|
|
316
|
-
type: () =>
|
|
306
|
+
type: () => CommunityStatsDto,
|
|
317
307
|
}),
|
|
318
|
-
__metadata("design:type",
|
|
308
|
+
__metadata("design:type", CommunityStatsDto)
|
|
319
309
|
], InvitationResponseDto.prototype, "communityStats", void 0);
|
|
320
310
|
__decorate([
|
|
321
|
-
|
|
311
|
+
ApiPropertyOptional({
|
|
322
312
|
description: "Flag to mark an invitation to be viewed later",
|
|
323
313
|
type: Boolean,
|
|
324
314
|
default: false,
|
|
325
315
|
}),
|
|
326
316
|
__metadata("design:type", Boolean)
|
|
327
317
|
], InvitationResponseDto.prototype, "seeLater", void 0);
|
|
328
|
-
class InvitationOrMemberDto extends InvitationResponseDto {
|
|
318
|
+
export class InvitationOrMemberDto extends InvitationResponseDto {
|
|
329
319
|
joinDate;
|
|
330
320
|
user;
|
|
331
321
|
lastVisitAnnouncementsDate;
|
|
@@ -336,95 +326,92 @@ class InvitationOrMemberDto extends InvitationResponseDto {
|
|
|
336
326
|
invitationId;
|
|
337
327
|
memberId;
|
|
338
328
|
}
|
|
339
|
-
exports.InvitationOrMemberDto = InvitationOrMemberDto;
|
|
340
329
|
__decorate([
|
|
341
|
-
|
|
330
|
+
ApiPropertyOptional({
|
|
342
331
|
description: "Date when the user joined the community (only for accepted invitations)",
|
|
343
332
|
type: Date,
|
|
344
333
|
}),
|
|
345
334
|
__metadata("design:type", Date)
|
|
346
335
|
], InvitationOrMemberDto.prototype, "joinDate", void 0);
|
|
347
336
|
__decorate([
|
|
348
|
-
|
|
349
|
-
__metadata("design:type",
|
|
337
|
+
ApiProperty(),
|
|
338
|
+
__metadata("design:type", UserDto)
|
|
350
339
|
], InvitationOrMemberDto.prototype, "user", void 0);
|
|
351
340
|
__decorate([
|
|
352
|
-
|
|
341
|
+
ApiPropertyOptional({
|
|
353
342
|
description: "Date of last visit to the announcements section",
|
|
354
343
|
type: Date,
|
|
355
344
|
}),
|
|
356
345
|
__metadata("design:type", Date)
|
|
357
346
|
], InvitationOrMemberDto.prototype, "lastVisitAnnouncementsDate", void 0);
|
|
358
347
|
__decorate([
|
|
359
|
-
|
|
348
|
+
ApiPropertyOptional({
|
|
360
349
|
description: "Date of last visit to the resources section",
|
|
361
350
|
type: Date,
|
|
362
351
|
}),
|
|
363
352
|
__metadata("design:type", Date)
|
|
364
353
|
], InvitationOrMemberDto.prototype, "lastVisitResourcesDate", void 0);
|
|
365
354
|
__decorate([
|
|
366
|
-
|
|
355
|
+
ApiPropertyOptional({
|
|
367
356
|
description: "Date of last visit to the wiki section",
|
|
368
357
|
type: Date,
|
|
369
358
|
}),
|
|
370
359
|
__metadata("design:type", Date)
|
|
371
360
|
], InvitationOrMemberDto.prototype, "lastVisitWikiDate", void 0);
|
|
372
361
|
__decorate([
|
|
373
|
-
|
|
362
|
+
ApiPropertyOptional({
|
|
374
363
|
description: "Date of last visit to the discussions section",
|
|
375
364
|
type: Date,
|
|
376
365
|
}),
|
|
377
366
|
__metadata("design:type", Date)
|
|
378
367
|
], InvitationOrMemberDto.prototype, "lastVisitDiscussionsDate", void 0);
|
|
379
368
|
__decorate([
|
|
380
|
-
|
|
369
|
+
ApiPropertyOptional({
|
|
381
370
|
description: "Most recent visit date across all sections",
|
|
382
371
|
type: Date,
|
|
383
372
|
}),
|
|
384
373
|
__metadata("design:type", Date)
|
|
385
374
|
], InvitationOrMemberDto.prototype, "lastVisit", void 0);
|
|
386
375
|
__decorate([
|
|
387
|
-
|
|
376
|
+
ApiProperty({
|
|
388
377
|
description: "Invitation ID related to this user",
|
|
389
378
|
}),
|
|
390
379
|
__metadata("design:type", Number)
|
|
391
380
|
], InvitationOrMemberDto.prototype, "invitationId", void 0);
|
|
392
381
|
__decorate([
|
|
393
|
-
|
|
382
|
+
ApiPropertyOptional({
|
|
394
383
|
description: "Member ID if this is a member",
|
|
395
384
|
}),
|
|
396
385
|
__metadata("design:type", Number)
|
|
397
386
|
], InvitationOrMemberDto.prototype, "memberId", void 0);
|
|
398
|
-
class InvitationStatsDto {
|
|
387
|
+
export class InvitationStatsDto {
|
|
399
388
|
total;
|
|
400
389
|
accepted;
|
|
401
390
|
pending;
|
|
402
391
|
rejected;
|
|
403
392
|
}
|
|
404
|
-
exports.InvitationStatsDto = InvitationStatsDto;
|
|
405
393
|
__decorate([
|
|
406
|
-
|
|
394
|
+
ApiProperty(),
|
|
407
395
|
__metadata("design:type", Number)
|
|
408
396
|
], InvitationStatsDto.prototype, "total", void 0);
|
|
409
397
|
__decorate([
|
|
410
|
-
|
|
398
|
+
ApiProperty(),
|
|
411
399
|
__metadata("design:type", Number)
|
|
412
400
|
], InvitationStatsDto.prototype, "accepted", void 0);
|
|
413
401
|
__decorate([
|
|
414
|
-
|
|
402
|
+
ApiProperty(),
|
|
415
403
|
__metadata("design:type", Number)
|
|
416
404
|
], InvitationStatsDto.prototype, "pending", void 0);
|
|
417
405
|
__decorate([
|
|
418
|
-
|
|
406
|
+
ApiProperty(),
|
|
419
407
|
__metadata("design:type", Number)
|
|
420
408
|
], InvitationStatsDto.prototype, "rejected", void 0);
|
|
421
|
-
class SearchInvitationResponseDto {
|
|
409
|
+
export class SearchInvitationResponseDto {
|
|
422
410
|
items;
|
|
423
411
|
meta;
|
|
424
412
|
}
|
|
425
|
-
exports.SearchInvitationResponseDto = SearchInvitationResponseDto;
|
|
426
413
|
__decorate([
|
|
427
|
-
|
|
414
|
+
ApiPropertyOptional({
|
|
428
415
|
description: "List of invitations matching the search criteria",
|
|
429
416
|
isArray: true,
|
|
430
417
|
type: () => InvitationResponseDto,
|
|
@@ -432,16 +419,15 @@ __decorate([
|
|
|
432
419
|
__metadata("design:type", Array)
|
|
433
420
|
], SearchInvitationResponseDto.prototype, "items", void 0);
|
|
434
421
|
__decorate([
|
|
435
|
-
|
|
436
|
-
__metadata("design:type",
|
|
422
|
+
ApiPropertyOptional(),
|
|
423
|
+
__metadata("design:type", PageMetadataDto)
|
|
437
424
|
], SearchInvitationResponseDto.prototype, "meta", void 0);
|
|
438
|
-
class SearchInvitationAndMembersResponseDto {
|
|
425
|
+
export class SearchInvitationAndMembersResponseDto {
|
|
439
426
|
items;
|
|
440
427
|
meta;
|
|
441
428
|
}
|
|
442
|
-
exports.SearchInvitationAndMembersResponseDto = SearchInvitationAndMembersResponseDto;
|
|
443
429
|
__decorate([
|
|
444
|
-
|
|
430
|
+
ApiPropertyOptional({
|
|
445
431
|
description: "List of invitations and members matching the search criteria",
|
|
446
432
|
isArray: true,
|
|
447
433
|
type: () => InvitationOrMemberDto,
|
|
@@ -449,93 +435,90 @@ __decorate([
|
|
|
449
435
|
__metadata("design:type", Array)
|
|
450
436
|
], SearchInvitationAndMembersResponseDto.prototype, "items", void 0);
|
|
451
437
|
__decorate([
|
|
452
|
-
|
|
453
|
-
__metadata("design:type",
|
|
438
|
+
ApiPropertyOptional(),
|
|
439
|
+
__metadata("design:type", PageMetadataDto)
|
|
454
440
|
], SearchInvitationAndMembersResponseDto.prototype, "meta", void 0);
|
|
455
|
-
class CountInvitationsQueryDto {
|
|
441
|
+
export class CountInvitationsQueryDto {
|
|
456
442
|
sentAfter;
|
|
457
443
|
}
|
|
458
|
-
exports.CountInvitationsQueryDto = CountInvitationsQueryDto;
|
|
459
444
|
__decorate([
|
|
460
|
-
|
|
445
|
+
ApiProperty({
|
|
461
446
|
description: "Date to count invitations sent after (ISO format)",
|
|
462
447
|
example: "2025-01-01T00:00:00Z",
|
|
463
448
|
}),
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
449
|
+
IsNotEmpty(),
|
|
450
|
+
Type(() => Date),
|
|
451
|
+
IsDate(),
|
|
452
|
+
Expose({ name: "sentafter" }),
|
|
468
453
|
__metadata("design:type", String)
|
|
469
454
|
], CountInvitationsQueryDto.prototype, "sentAfter", void 0);
|
|
470
|
-
class InvitationStatsQueryDto {
|
|
455
|
+
export class InvitationStatsQueryDto {
|
|
471
456
|
}
|
|
472
|
-
|
|
473
|
-
var InvitationSortField;
|
|
457
|
+
export var InvitationSortField;
|
|
474
458
|
(function (InvitationSortField) {
|
|
475
459
|
InvitationSortField["STATUS"] = "status";
|
|
476
460
|
InvitationSortField["LAST_VISIT"] = "lastVisit";
|
|
477
461
|
InvitationSortField["ROLE"] = "currentRole";
|
|
478
462
|
InvitationSortField["USER_NAME"] = "userName";
|
|
479
|
-
})(InvitationSortField || (
|
|
480
|
-
class ListCommunityInvitationsQueryDto extends
|
|
463
|
+
})(InvitationSortField || (InvitationSortField = {}));
|
|
464
|
+
export class ListCommunityInvitationsQueryDto extends PaginationQueryDto {
|
|
481
465
|
status;
|
|
482
466
|
searchTerm;
|
|
483
467
|
sortBy;
|
|
484
468
|
sortDirection;
|
|
485
469
|
fields;
|
|
486
470
|
}
|
|
487
|
-
exports.ListCommunityInvitationsQueryDto = ListCommunityInvitationsQueryDto;
|
|
488
471
|
__decorate([
|
|
489
|
-
|
|
472
|
+
ApiPropertyOptional({
|
|
490
473
|
description: "Filter by invitation status",
|
|
491
474
|
enum: InvitationStatus,
|
|
492
475
|
}),
|
|
493
|
-
|
|
494
|
-
|
|
476
|
+
IsOptional(),
|
|
477
|
+
IsEnum(InvitationStatus),
|
|
495
478
|
__metadata("design:type", String)
|
|
496
479
|
], ListCommunityInvitationsQueryDto.prototype, "status", void 0);
|
|
497
480
|
__decorate([
|
|
498
|
-
|
|
481
|
+
ApiPropertyOptional({
|
|
499
482
|
description: "Search for users by name (case insensitive partial match)",
|
|
500
483
|
example: "jean",
|
|
501
484
|
}),
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
485
|
+
IsOptional(),
|
|
486
|
+
IsString(),
|
|
487
|
+
Expose({ name: "searchterm" }),
|
|
505
488
|
__metadata("design:type", String)
|
|
506
489
|
], ListCommunityInvitationsQueryDto.prototype, "searchTerm", void 0);
|
|
507
490
|
__decorate([
|
|
508
|
-
|
|
491
|
+
ApiPropertyOptional({
|
|
509
492
|
description: "Field to sort by",
|
|
510
493
|
enum: InvitationSortField,
|
|
511
494
|
default: InvitationSortField.USER_NAME,
|
|
512
495
|
}),
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
496
|
+
IsOptional(),
|
|
497
|
+
IsEnum(InvitationSortField),
|
|
498
|
+
Expose({ name: "sortby" }),
|
|
516
499
|
__metadata("design:type", String)
|
|
517
500
|
], ListCommunityInvitationsQueryDto.prototype, "sortBy", void 0);
|
|
518
501
|
__decorate([
|
|
519
|
-
|
|
502
|
+
ApiPropertyOptional({
|
|
520
503
|
description: "Sort direction",
|
|
521
|
-
enum:
|
|
522
|
-
default:
|
|
504
|
+
enum: SortDirection,
|
|
505
|
+
default: SortDirection.ASC,
|
|
523
506
|
}),
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
507
|
+
IsOptional(),
|
|
508
|
+
IsEnum(SortDirection),
|
|
509
|
+
Expose({ name: "sortdirection" }),
|
|
527
510
|
__metadata("design:type", String)
|
|
528
511
|
], ListCommunityInvitationsQueryDto.prototype, "sortDirection", void 0);
|
|
529
512
|
__decorate([
|
|
530
|
-
|
|
513
|
+
ApiPropertyOptional({
|
|
531
514
|
description: "Fields to include in the response",
|
|
532
515
|
example: ["basic", "community", "stats"],
|
|
533
516
|
isArray: true,
|
|
534
517
|
enum: ["basic", "community", "stats"],
|
|
535
518
|
}),
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
519
|
+
IsOptional(),
|
|
520
|
+
IsArray(),
|
|
521
|
+
Transform(({ value }) => {
|
|
539
522
|
if (Array.isArray(value))
|
|
540
523
|
return value;
|
|
541
524
|
if (typeof value === "string")
|
|
@@ -544,32 +527,30 @@ __decorate([
|
|
|
544
527
|
}),
|
|
545
528
|
__metadata("design:type", Array)
|
|
546
529
|
], ListCommunityInvitationsQueryDto.prototype, "fields", void 0);
|
|
547
|
-
class DeleteInvitationsDto {
|
|
530
|
+
export class DeleteInvitationsDto {
|
|
548
531
|
invitationIds;
|
|
549
532
|
}
|
|
550
|
-
exports.DeleteInvitationsDto = DeleteInvitationsDto;
|
|
551
533
|
__decorate([
|
|
552
|
-
|
|
534
|
+
ApiProperty({
|
|
553
535
|
description: "Array of invitation IDs to delete",
|
|
554
536
|
type: [Number],
|
|
555
537
|
example: [1, 2, 3],
|
|
556
538
|
}),
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
539
|
+
IsArray(),
|
|
540
|
+
ArrayMinSize(1),
|
|
541
|
+
IsNumber({}, { each: true }),
|
|
560
542
|
__metadata("design:type", Array)
|
|
561
543
|
], DeleteInvitationsDto.prototype, "invitationIds", void 0);
|
|
562
|
-
class UpdateSeeLaterDto {
|
|
544
|
+
export class UpdateSeeLaterDto {
|
|
563
545
|
seeLater;
|
|
564
546
|
}
|
|
565
|
-
exports.UpdateSeeLaterDto = UpdateSeeLaterDto;
|
|
566
547
|
__decorate([
|
|
567
|
-
|
|
548
|
+
ApiProperty({
|
|
568
549
|
description: "Flag to mark an invitation to be viewed later",
|
|
569
550
|
type: Boolean,
|
|
570
551
|
example: true,
|
|
571
552
|
}),
|
|
572
|
-
|
|
553
|
+
IsBoolean(),
|
|
573
554
|
__metadata("design:type", Boolean)
|
|
574
555
|
], UpdateSeeLaterDto.prototype, "seeLater", void 0);
|
|
575
556
|
//# sourceMappingURL=invitation.js.map
|