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