@edifice.io/collect-client-rest-rn 0.1.0-develop-pedago.0.20260120100257
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/collection.client.d.ts +11 -0
- package/clients/collection.client.js +34 -0
- package/clients/collection.client.js.map +1 -0
- package/clients/index.d.ts +2 -0
- package/clients/index.js +3 -0
- package/clients/index.js.map +1 -0
- package/clients/submission.client.d.ts +11 -0
- package/clients/submission.client.js +36 -0
- package/clients/submission.client.js.map +1 -0
- package/dtos/attachment.dto.d.ts +24 -0
- package/dtos/attachment.dto.js +127 -0
- package/dtos/attachment.dto.js.map +1 -0
- package/dtos/base.dto.d.ts +19 -0
- package/dtos/base.dto.js +89 -0
- package/dtos/base.dto.js.map +1 -0
- package/dtos/collection.dto.d.ts +33 -0
- package/dtos/collection.dto.js +202 -0
- package/dtos/collection.dto.js.map +1 -0
- package/dtos/index.d.ts +7 -0
- package/dtos/index.js +8 -0
- package/dtos/index.js.map +1 -0
- package/dtos/recipient.dto.d.ts +9 -0
- package/dtos/recipient.dto.js +46 -0
- package/dtos/recipient.dto.js.map +1 -0
- package/dtos/sharing.dto.d.ts +17 -0
- package/dtos/sharing.dto.js +85 -0
- package/dtos/sharing.dto.js.map +1 -0
- package/dtos/submission.dto.d.ts +49 -0
- package/dtos/submission.dto.js +213 -0
- package/dtos/submission.dto.js.map +1 -0
- package/dtos/user.dto.d.ts +6 -0
- package/dtos/user.dto.js +46 -0
- package/dtos/user.dto.js.map +1 -0
- package/index.d.ts +3 -0
- package/index.js +4 -0
- package/index.js.map +1 -0
- package/package.json +15 -0
- package/tsconfig.browser.tsbuildinfo +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +2 -0
- package/utils/index.js.map +1 -0
- package/utils/rights.utils.d.ts +4 -0
- package/utils/rights.utils.js +5 -0
- package/utils/rights.utils.js.map +1 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
11
|
+
import { IsEnum } from "class-validator";
|
|
12
|
+
export var RecipientType;
|
|
13
|
+
(function (RecipientType) {
|
|
14
|
+
RecipientType["USER"] = "user";
|
|
15
|
+
RecipientType["GROUP"] = "group";
|
|
16
|
+
})(RecipientType || (RecipientType = {}));
|
|
17
|
+
export class RecipientDto {
|
|
18
|
+
id;
|
|
19
|
+
entId;
|
|
20
|
+
type;
|
|
21
|
+
}
|
|
22
|
+
__decorate([
|
|
23
|
+
ApiProperty({
|
|
24
|
+
description: "Recipient identifier",
|
|
25
|
+
example: 3,
|
|
26
|
+
}),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], RecipientDto.prototype, "id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
ApiProperty({
|
|
31
|
+
format: "uuid",
|
|
32
|
+
description: "Recipient identifier in the ENT system",
|
|
33
|
+
example: "e4767e9f-238f-40b7-9e4d-fca885be2a73",
|
|
34
|
+
}),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], RecipientDto.prototype, "entId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
ApiProperty({
|
|
39
|
+
enum: RecipientType,
|
|
40
|
+
description: "Type of entity the collection is shared to",
|
|
41
|
+
example: "group",
|
|
42
|
+
}),
|
|
43
|
+
IsEnum(RecipientType),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], RecipientDto.prototype, "type", void 0);
|
|
46
|
+
//# sourceMappingURL=recipient.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipient.dto.js","sourceRoot":"","sources":["../../../src/dtos/recipient.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,gCAAe,CAAA;AACjB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED,MAAM,OAAO,YAAY;IAKvB,EAAE,CAAS;IAOX,KAAK,CAAS;IAQd,IAAI,CAAgB;CACrB;AAhBC;IAJC,WAAW,CAAC;QACX,WAAW,EAAE,sBAAsB;QACnC,OAAO,EAAE,CAAC;KACX,CAAC;;wCACS;AAOX;IALC,WAAW,CAAC;QACX,MAAM,EAAE,MAAM;QACd,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,sCAAsC;KAChD,CAAC;;2CACY;AAQd;IANC,WAAW,CAAC;QACX,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,OAAO;KACjB,CAAC;IACD,MAAM,CAAC,aAAa,CAAC;;0CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RecipientDto, RecipientType } from "./recipient.dto";
|
|
2
|
+
export declare enum SharingPermission {
|
|
3
|
+
CONTRIB = "contrib",
|
|
4
|
+
MANAGE = "manage",
|
|
5
|
+
VIEW = "view"
|
|
6
|
+
}
|
|
7
|
+
export declare class CreateSharingDto {
|
|
8
|
+
recipientId: string;
|
|
9
|
+
recipientType: RecipientType;
|
|
10
|
+
permission: SharingPermission;
|
|
11
|
+
}
|
|
12
|
+
export declare class SharingDto {
|
|
13
|
+
id: number;
|
|
14
|
+
recipient: RecipientDto;
|
|
15
|
+
permission: SharingPermission;
|
|
16
|
+
collectionId: number;
|
|
17
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
11
|
+
import { IsEnum, IsUUID } from "class-validator";
|
|
12
|
+
import { RecipientDto, RecipientType } from "./recipient.dto";
|
|
13
|
+
export var SharingPermission;
|
|
14
|
+
(function (SharingPermission) {
|
|
15
|
+
SharingPermission["CONTRIB"] = "contrib";
|
|
16
|
+
SharingPermission["MANAGE"] = "manage";
|
|
17
|
+
SharingPermission["VIEW"] = "view";
|
|
18
|
+
})(SharingPermission || (SharingPermission = {}));
|
|
19
|
+
export class CreateSharingDto {
|
|
20
|
+
recipientId;
|
|
21
|
+
recipientType;
|
|
22
|
+
permission;
|
|
23
|
+
}
|
|
24
|
+
__decorate([
|
|
25
|
+
ApiProperty({
|
|
26
|
+
format: "uuid",
|
|
27
|
+
description: "Recipient identifier in the ENT system",
|
|
28
|
+
example: "e4767e9f-238f-40b7-9e4d-fca885be2a73",
|
|
29
|
+
}),
|
|
30
|
+
IsUUID(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CreateSharingDto.prototype, "recipientId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
ApiProperty({
|
|
35
|
+
enum: RecipientType,
|
|
36
|
+
description: "Type of entity the collection is shared to",
|
|
37
|
+
example: "group",
|
|
38
|
+
}),
|
|
39
|
+
IsEnum(RecipientType),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], CreateSharingDto.prototype, "recipientType", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
ApiProperty({
|
|
44
|
+
enum: SharingPermission,
|
|
45
|
+
description: "Type of sharing",
|
|
46
|
+
example: "contrib",
|
|
47
|
+
}),
|
|
48
|
+
IsEnum(SharingPermission),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], CreateSharingDto.prototype, "permission", void 0);
|
|
51
|
+
export class SharingDto {
|
|
52
|
+
id;
|
|
53
|
+
recipient;
|
|
54
|
+
permission;
|
|
55
|
+
collectionId;
|
|
56
|
+
}
|
|
57
|
+
__decorate([
|
|
58
|
+
ApiProperty({
|
|
59
|
+
description: "Sharing identifier",
|
|
60
|
+
example: 42,
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], SharingDto.prototype, "id", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
ApiProperty({
|
|
66
|
+
description: "Sharing recipient",
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", RecipientDto)
|
|
69
|
+
], SharingDto.prototype, "recipient", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
ApiProperty({
|
|
72
|
+
enum: SharingPermission,
|
|
73
|
+
description: "Type of sharing",
|
|
74
|
+
example: "contrib",
|
|
75
|
+
}),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], SharingDto.prototype, "permission", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
ApiProperty({
|
|
80
|
+
description: "Identifier of the shared collection",
|
|
81
|
+
example: 66,
|
|
82
|
+
}),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], SharingDto.prototype, "collectionId", void 0);
|
|
85
|
+
//# sourceMappingURL=sharing.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharing.dto.js","sourceRoot":"","sources":["../../../src/dtos/sharing.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE9D,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,sCAAiB,CAAA;IACjB,kCAAa,CAAA;AACf,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AAED,MAAM,OAAO,gBAAgB;IAO3B,WAAW,CAAS;IAQpB,aAAa,CAAgB;IAQ7B,UAAU,CAAoB;CAC/B;AAjBC;IANC,WAAW,CAAC;QACX,MAAM,EAAE,MAAM;QACd,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,sCAAsC;KAChD,CAAC;IACD,MAAM,EAAE;;qDACW;AAQpB;IANC,WAAW,CAAC;QACX,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,OAAO;KACjB,CAAC;IACD,MAAM,CAAC,aAAa,CAAC;;uDACO;AAQ7B;IANC,WAAW,CAAC;QACX,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,iBAAiB;QAC9B,OAAO,EAAE,SAAS;KACnB,CAAC;IACD,MAAM,CAAC,iBAAiB,CAAC;;oDACI;AAGhC,MAAM,OAAO,UAAU;IAKrB,EAAE,CAAS;IAKX,SAAS,CAAe;IAOxB,UAAU,CAAoB;IAM9B,YAAY,CAAS;CACtB;AAnBC;IAJC,WAAW,CAAC;QACX,WAAW,EAAE,oBAAoB;QACjC,OAAO,EAAE,EAAE;KACZ,CAAC;;sCACS;AAKX;IAHC,WAAW,CAAC;QACX,WAAW,EAAE,mBAAmB;KACjC,CAAC;8BACS,YAAY;6CAAC;AAOxB;IALC,WAAW,CAAC;QACX,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,iBAAiB;QAC9B,OAAO,EAAE,SAAS;KACnB,CAAC;;8CAC4B;AAM9B;IAJC,WAAW,CAAC;QACX,WAAW,EAAE,qCAAqC;QAClD,OAAO,EAAE,EAAE;KACZ,CAAC;;gDACmB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AttachmentDto, CreateAttachmentDto } from "./attachment.dto";
|
|
2
|
+
import { UserDto } from "./user.dto";
|
|
3
|
+
import { PageMetadataDto, PaginationQueryDto, SortDirection } from "./base.dto";
|
|
4
|
+
export declare enum SubmissionStatus {
|
|
5
|
+
EMPTY = "empty",
|
|
6
|
+
DRAFT = "draft",
|
|
7
|
+
SUBMITTED = "submitted",
|
|
8
|
+
VERIFIED = "verified"
|
|
9
|
+
}
|
|
10
|
+
export declare enum ContribSubmissionStatus {
|
|
11
|
+
DRAFT = "draft",
|
|
12
|
+
SUBMITTED = "submitted"
|
|
13
|
+
}
|
|
14
|
+
export declare enum ManagerSubmissionStatus {
|
|
15
|
+
SUBMITTED = "submitted",
|
|
16
|
+
VERIFIED = "verified"
|
|
17
|
+
}
|
|
18
|
+
export declare class CreateSubmissionDto {
|
|
19
|
+
content: string;
|
|
20
|
+
status: ContribSubmissionStatus;
|
|
21
|
+
attachments: CreateAttachmentDto[];
|
|
22
|
+
}
|
|
23
|
+
export declare class UpdateSubmissionStatusDto {
|
|
24
|
+
status: ManagerSubmissionStatus;
|
|
25
|
+
}
|
|
26
|
+
export declare enum SubmissionSortField {
|
|
27
|
+
SUBMISSION_DATE = "submissionDate",
|
|
28
|
+
MODIFICATION_DATE = "modificationDate"
|
|
29
|
+
}
|
|
30
|
+
export declare class SearchSubmissionDto extends PaginationQueryDto {
|
|
31
|
+
status?: SubmissionStatus;
|
|
32
|
+
sortBy?: SubmissionSortField;
|
|
33
|
+
sortDirection?: SortDirection;
|
|
34
|
+
}
|
|
35
|
+
export declare class SearchSubmissionResponseDto {
|
|
36
|
+
items: SubmissionDto[];
|
|
37
|
+
meta: PageMetadataDto;
|
|
38
|
+
}
|
|
39
|
+
export declare class SubmissionDto {
|
|
40
|
+
id: number;
|
|
41
|
+
collectionId: number;
|
|
42
|
+
createdBy: UserDto;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
updatedAt?: Date;
|
|
45
|
+
submittedAt?: Date;
|
|
46
|
+
status: SubmissionStatus;
|
|
47
|
+
content?: string;
|
|
48
|
+
attachments?: AttachmentDto[];
|
|
49
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsOptional, IsEnum, IsArray } from "class-validator";
|
|
11
|
+
import { CreateAttachmentDto } from "./attachment.dto";
|
|
12
|
+
import { UserDto } from "./user.dto";
|
|
13
|
+
import { PageMetadataDto, PaginationQueryDto, SortDirection } from "./base.dto";
|
|
14
|
+
import { ApiProperty, ApiPropertyOptional } from "@edifice.io/rest-client-base/react-native";
|
|
15
|
+
import { Expose, Type } from "class-transformer";
|
|
16
|
+
export var SubmissionStatus;
|
|
17
|
+
(function (SubmissionStatus) {
|
|
18
|
+
SubmissionStatus["EMPTY"] = "empty";
|
|
19
|
+
SubmissionStatus["DRAFT"] = "draft";
|
|
20
|
+
SubmissionStatus["SUBMITTED"] = "submitted";
|
|
21
|
+
SubmissionStatus["VERIFIED"] = "verified";
|
|
22
|
+
})(SubmissionStatus || (SubmissionStatus = {}));
|
|
23
|
+
export var ContribSubmissionStatus;
|
|
24
|
+
(function (ContribSubmissionStatus) {
|
|
25
|
+
ContribSubmissionStatus["DRAFT"] = "draft";
|
|
26
|
+
ContribSubmissionStatus["SUBMITTED"] = "submitted";
|
|
27
|
+
})(ContribSubmissionStatus || (ContribSubmissionStatus = {}));
|
|
28
|
+
export var ManagerSubmissionStatus;
|
|
29
|
+
(function (ManagerSubmissionStatus) {
|
|
30
|
+
ManagerSubmissionStatus["SUBMITTED"] = "submitted";
|
|
31
|
+
ManagerSubmissionStatus["VERIFIED"] = "verified";
|
|
32
|
+
})(ManagerSubmissionStatus || (ManagerSubmissionStatus = {}));
|
|
33
|
+
export class CreateSubmissionDto {
|
|
34
|
+
content;
|
|
35
|
+
status;
|
|
36
|
+
attachments;
|
|
37
|
+
}
|
|
38
|
+
__decorate([
|
|
39
|
+
ApiProperty({
|
|
40
|
+
description: "Submission body",
|
|
41
|
+
example: "lorem ipsum",
|
|
42
|
+
}),
|
|
43
|
+
IsString(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], CreateSubmissionDto.prototype, "content", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
ApiProperty({
|
|
48
|
+
enum: ContribSubmissionStatus,
|
|
49
|
+
description: "Submission status for contributor (empty or verified not allowed)",
|
|
50
|
+
example: "draft",
|
|
51
|
+
}),
|
|
52
|
+
IsEnum(ContribSubmissionStatus),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], CreateSubmissionDto.prototype, "status", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
ApiProperty({
|
|
57
|
+
type: [CreateAttachmentDto],
|
|
58
|
+
description: "List of attached media",
|
|
59
|
+
}),
|
|
60
|
+
IsArray(),
|
|
61
|
+
Type(() => CreateAttachmentDto),
|
|
62
|
+
__metadata("design:type", Array)
|
|
63
|
+
], CreateSubmissionDto.prototype, "attachments", void 0);
|
|
64
|
+
export class UpdateSubmissionStatusDto {
|
|
65
|
+
status;
|
|
66
|
+
}
|
|
67
|
+
__decorate([
|
|
68
|
+
ApiProperty({
|
|
69
|
+
enum: ManagerSubmissionStatus,
|
|
70
|
+
description: "Submission status for manager (empty or draft not allowed)",
|
|
71
|
+
example: "verified",
|
|
72
|
+
}),
|
|
73
|
+
IsEnum(ManagerSubmissionStatus),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], UpdateSubmissionStatusDto.prototype, "status", void 0);
|
|
76
|
+
export var SubmissionSortField;
|
|
77
|
+
(function (SubmissionSortField) {
|
|
78
|
+
SubmissionSortField["SUBMISSION_DATE"] = "submissionDate";
|
|
79
|
+
SubmissionSortField["MODIFICATION_DATE"] = "modificationDate";
|
|
80
|
+
})(SubmissionSortField || (SubmissionSortField = {}));
|
|
81
|
+
export class SearchSubmissionDto extends PaginationQueryDto {
|
|
82
|
+
status;
|
|
83
|
+
sortBy;
|
|
84
|
+
sortDirection;
|
|
85
|
+
}
|
|
86
|
+
__decorate([
|
|
87
|
+
ApiPropertyOptional({
|
|
88
|
+
description: "Filter by submission status",
|
|
89
|
+
}),
|
|
90
|
+
IsEnum(SubmissionStatus),
|
|
91
|
+
IsOptional(),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], SearchSubmissionDto.prototype, "status", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
ApiPropertyOptional({
|
|
96
|
+
description: "Sort field",
|
|
97
|
+
enum: SubmissionSortField,
|
|
98
|
+
default: SubmissionSortField.SUBMISSION_DATE,
|
|
99
|
+
}),
|
|
100
|
+
IsOptional(),
|
|
101
|
+
IsEnum(SubmissionSortField),
|
|
102
|
+
Expose({ name: "sortBy" }),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], SearchSubmissionDto.prototype, "sortBy", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
ApiPropertyOptional({
|
|
107
|
+
description: "Sort direction",
|
|
108
|
+
enum: SortDirection,
|
|
109
|
+
default: SortDirection.DESC,
|
|
110
|
+
}),
|
|
111
|
+
IsOptional(),
|
|
112
|
+
IsEnum(SortDirection),
|
|
113
|
+
Expose({ name: "sortDirection" }),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], SearchSubmissionDto.prototype, "sortDirection", void 0);
|
|
116
|
+
export class SearchSubmissionResponseDto {
|
|
117
|
+
items;
|
|
118
|
+
meta;
|
|
119
|
+
}
|
|
120
|
+
__decorate([
|
|
121
|
+
ApiProperty({
|
|
122
|
+
description: "List of submissions matching the search criteria",
|
|
123
|
+
isArray: true,
|
|
124
|
+
type: () => SubmissionDto,
|
|
125
|
+
}),
|
|
126
|
+
__metadata("design:type", Array)
|
|
127
|
+
], SearchSubmissionResponseDto.prototype, "items", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
ApiProperty({
|
|
130
|
+
description: "Metadata about the pagination",
|
|
131
|
+
}),
|
|
132
|
+
__metadata("design:type", PageMetadataDto)
|
|
133
|
+
], SearchSubmissionResponseDto.prototype, "meta", void 0);
|
|
134
|
+
export class SubmissionDto {
|
|
135
|
+
id;
|
|
136
|
+
collectionId;
|
|
137
|
+
createdBy;
|
|
138
|
+
createdAt;
|
|
139
|
+
updatedAt;
|
|
140
|
+
submittedAt;
|
|
141
|
+
status;
|
|
142
|
+
content;
|
|
143
|
+
attachments;
|
|
144
|
+
}
|
|
145
|
+
__decorate([
|
|
146
|
+
ApiProperty({
|
|
147
|
+
description: "Submission identifier",
|
|
148
|
+
example: 22,
|
|
149
|
+
}),
|
|
150
|
+
__metadata("design:type", Number)
|
|
151
|
+
], SubmissionDto.prototype, "id", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
ApiProperty({
|
|
154
|
+
description: "Identifier of the collection",
|
|
155
|
+
example: 543,
|
|
156
|
+
}),
|
|
157
|
+
__metadata("design:type", Number)
|
|
158
|
+
], SubmissionDto.prototype, "collectionId", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
ApiProperty({
|
|
161
|
+
description: "Submission creator",
|
|
162
|
+
}),
|
|
163
|
+
__metadata("design:type", UserDto)
|
|
164
|
+
], SubmissionDto.prototype, "createdBy", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
ApiProperty({
|
|
167
|
+
type: String,
|
|
168
|
+
format: "date-time",
|
|
169
|
+
description: "Creation time (UTC)",
|
|
170
|
+
example: "2026-01-18T12:32:28Z",
|
|
171
|
+
}),
|
|
172
|
+
__metadata("design:type", Date)
|
|
173
|
+
], SubmissionDto.prototype, "createdAt", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
ApiProperty({
|
|
176
|
+
type: String,
|
|
177
|
+
format: "date-time",
|
|
178
|
+
description: "Update time (UTC)",
|
|
179
|
+
example: "2026-01-18T15:32:28Z",
|
|
180
|
+
}),
|
|
181
|
+
__metadata("design:type", Date)
|
|
182
|
+
], SubmissionDto.prototype, "updatedAt", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
ApiProperty({
|
|
185
|
+
type: String,
|
|
186
|
+
format: "date-time",
|
|
187
|
+
description: "Final submission time (UTC)",
|
|
188
|
+
example: "2026-01-18T17:32:28Z",
|
|
189
|
+
}),
|
|
190
|
+
__metadata("design:type", Date)
|
|
191
|
+
], SubmissionDto.prototype, "submittedAt", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
ApiProperty({
|
|
194
|
+
enum: SubmissionStatus,
|
|
195
|
+
description: "State of the submission",
|
|
196
|
+
example: "submitted",
|
|
197
|
+
}),
|
|
198
|
+
__metadata("design:type", String)
|
|
199
|
+
], SubmissionDto.prototype, "status", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
ApiProperty({
|
|
202
|
+
description: "Content of the submission",
|
|
203
|
+
example: "lorem ipsum",
|
|
204
|
+
}),
|
|
205
|
+
__metadata("design:type", String)
|
|
206
|
+
], SubmissionDto.prototype, "content", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
ApiProperty({
|
|
209
|
+
description: "List of attachments for the submission",
|
|
210
|
+
}),
|
|
211
|
+
__metadata("design:type", Array)
|
|
212
|
+
], SubmissionDto.prototype, "attachments", void 0);
|
|
213
|
+
//# sourceMappingURL=submission.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submission.dto.js","sourceRoot":"","sources":["../../../src/dtos/submission.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAiB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,mCAAe,CAAA;IACf,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;AACvB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAED,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,0CAAe,CAAA;IACf,kDAAuB,CAAA;AACzB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B;IAHC,WAAW,CAAC;QACX,WAAW,EAAE,oBAAoB;KAClC,CAAC;8BACS,OAAO;gDAAC;AAQnB;IANC,WAAW,CAAC;QACX,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,WAAW;QACnB,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE,sBAAsB;KAChC,CAAC;8BACS,IAAI;gDAAC;AAQhB;IANC,WAAW,CAAC;QACX,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,WAAW;QACnB,WAAW,EAAE,mBAAmB;QAChC,OAAO,EAAE,sBAAsB;KAChC,CAAC;8BACU,IAAI;gDAAC;AAQjB;IANC,WAAW,CAAC;QACX,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,WAAW;QACnB,WAAW,EAAE,6BAA6B;QAC1C,OAAO,EAAE,sBAAsB;KAChC,CAAC;8BACY,IAAI;kDAAC;AAOnB;IALC,WAAW,CAAC;QACX,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,WAAW;KACrB,CAAC;;6CACuB;AAMzB;IAJC,WAAW,CAAC;QACX,WAAW,EAAE,2BAA2B;QACxC,OAAO,EAAE,aAAa;KACvB,CAAC;;8CACe;AAKjB;IAHC,WAAW,CAAC;QACX,WAAW,EAAE,wCAAwC;KACtD,CAAC;;kDAC4B"}
|
package/dtos/user.dto.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
11
|
+
export class UserDto {
|
|
12
|
+
id;
|
|
13
|
+
entId;
|
|
14
|
+
displayName;
|
|
15
|
+
deleted;
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
ApiProperty({
|
|
19
|
+
description: "User identifier",
|
|
20
|
+
example: 123,
|
|
21
|
+
}),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], UserDto.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
ApiProperty({
|
|
26
|
+
format: "uuid",
|
|
27
|
+
description: "User identifier in the ENTsystem",
|
|
28
|
+
example: "8f01aa26-b840-4177-a8c8-03d2676dd9a2",
|
|
29
|
+
}),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], UserDto.prototype, "entId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
ApiProperty({
|
|
34
|
+
description: "User display name",
|
|
35
|
+
example: "Dummy User",
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], UserDto.prototype, "displayName", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
ApiProperty({
|
|
41
|
+
description: "True if the user was deleted",
|
|
42
|
+
example: false,
|
|
43
|
+
}),
|
|
44
|
+
__metadata("design:type", Boolean)
|
|
45
|
+
], UserDto.prototype, "deleted", void 0);
|
|
46
|
+
//# sourceMappingURL=user.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.dto.js","sourceRoot":"","sources":["../../../src/dtos/user.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,OAAO,OAAO;IAKlB,EAAE,CAAS;IAOX,KAAK,CAAS;IAMd,WAAW,CAAS;IAMpB,OAAO,CAAU;CAClB;AApBC;IAJC,WAAW,CAAC;QACX,WAAW,EAAE,iBAAiB;QAC9B,OAAO,EAAE,GAAG;KACb,CAAC;;mCACS;AAOX;IALC,WAAW,CAAC;QACX,MAAM,EAAE,MAAM;QACd,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,sCAAsC;KAChD,CAAC;;sCACY;AAMd;IAJC,WAAW,CAAC;QACX,WAAW,EAAE,mBAAmB;QAChC,OAAO,EAAE,YAAY;KACtB,CAAC;;4CACkB;AAMpB;IAJC,WAAW,CAAC;QACX,WAAW,EAAE,8BAA8B;QAC3C,OAAO,EAAE,KAAK;KACf,CAAC;;wCACe"}
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@edifice.io/collect-client-rest-rn",
|
|
3
|
+
"version": "0.1.0-develop-pedago.0.20260120100257",
|
|
4
|
+
"description": "React Native compatible version of collect-client-rest",
|
|
5
|
+
"author": "",
|
|
6
|
+
"private": false,
|
|
7
|
+
"license": "UNLICENSED",
|
|
8
|
+
"main": "index.js",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"uuid": "11.1.0",
|
|
11
|
+
"@edifice.io/rest-client-base": "develop-pedago",
|
|
12
|
+
"class-transformer": "0.5.1",
|
|
13
|
+
"class-validator": "0.14.2"
|
|
14
|
+
}
|
|
15
|
+
}
|