@abyss-project/form 1.0.0 → 1.0.2
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/.eslintrc.js +33 -33
- package/README.md +2 -2
- package/dist/api/form-code-block.admin.api.d.ts +7 -0
- package/dist/api/form-code-block.admin.api.js +28 -0
- package/dist/api/form-code-block.api.d.ts +7 -0
- package/dist/api/form-code-block.api.js +28 -0
- package/dist/api/form-document.admin.api.d.ts +2 -1
- package/dist/api/form-document.admin.api.js +5 -1
- package/dist/api/form-document.api.d.ts +2 -1
- package/dist/api/form-document.api.js +5 -1
- package/dist/api/form-submission.admin.api.d.ts +5 -0
- package/dist/api/form-submission.admin.api.js +20 -0
- package/dist/api/form-submission.api.d.ts +5 -0
- package/dist/api/form-submission.api.js +20 -0
- package/dist/api/form-webhook-history.admin.api.d.ts +3 -0
- package/dist/api/form-webhook-history.admin.api.js +12 -0
- package/dist/api/form-webhook-history.api.d.ts +3 -0
- package/dist/api/form-webhook-history.api.js +12 -0
- package/dist/api/form-webhook.admin.api.d.ts +7 -0
- package/dist/api/form-webhook.admin.api.js +28 -0
- package/dist/api/form-webhook.api.d.ts +7 -0
- package/dist/api/form-webhook.api.js +28 -0
- package/dist/api/form.admin.api.d.ts +4 -3
- package/dist/api/form.admin.api.js +10 -6
- package/dist/api/form.api.d.ts +4 -1
- package/dist/api/form.api.js +18 -2
- package/dist/api/form.public.api.d.ts +10 -2
- package/dist/api/form.public.api.js +35 -3
- package/dist/api/index.d.ts +8 -0
- package/dist/api/index.js +8 -0
- package/dist/api/user.api.d.ts +2 -1
- package/dist/api/user.api.js +6 -3
- package/dist/constants/form.constant.d.ts +8 -4
- package/dist/constants/form.constant.js +9 -5
- package/dist/types/enum/api-error.enum.d.ts +3 -1
- package/dist/types/enum/api-error.enum.js +2 -0
- package/dist/types/enum/cannot-start-submission-reason.enum.d.ts +12 -0
- package/dist/types/enum/cannot-start-submission-reason.enum.js +16 -0
- package/dist/types/enum/form-content-question-type.enum.d.ts +9 -0
- package/dist/types/enum/form-content-question-type.enum.js +13 -0
- package/dist/types/enum/form-document-source.enum.d.ts +4 -0
- package/dist/types/enum/form-document-source.enum.js +8 -0
- package/dist/types/enum/index.d.ts +3 -0
- package/dist/types/enum/index.js +3 -0
- package/dist/types/interface/api/index.d.ts +18 -2
- package/dist/types/interface/api/index.js +18 -2
- package/dist/types/interface/api/requests/form-code-block.admin.request.d.ts +33 -0
- package/dist/types/interface/api/requests/form-code-block.request.d.ts +38 -0
- package/dist/types/interface/api/requests/form-document.admin.request.d.ts +5 -4
- package/dist/types/interface/api/requests/form-document.request.d.ts +10 -13
- package/dist/types/interface/api/requests/form-submission.admin.request.d.ts +16 -0
- package/dist/types/interface/api/requests/form-submission.admin.request.js +2 -0
- package/dist/types/interface/api/requests/form-submission.request.d.ts +20 -0
- package/dist/types/interface/api/requests/form-submission.request.js +2 -0
- package/dist/types/interface/api/requests/form-webhook-history.admin.request.d.ts +14 -0
- package/dist/types/interface/api/requests/form-webhook-history.admin.request.js +2 -0
- package/dist/types/interface/api/requests/form-webhook-history.request.d.ts +17 -0
- package/dist/types/interface/api/requests/form-webhook-history.request.js +2 -0
- package/dist/types/interface/api/requests/form-webhook.admin.request.d.ts +38 -0
- package/dist/types/interface/api/requests/form-webhook.admin.request.js +2 -0
- package/dist/types/interface/api/requests/form-webhook.request.d.ts +44 -0
- package/dist/types/interface/api/requests/form-webhook.request.js +2 -0
- package/dist/types/interface/api/requests/form.admin.request.d.ts +18 -11
- package/dist/types/interface/api/requests/form.public.request.d.ts +64 -0
- package/dist/types/interface/api/requests/form.public.request.js +2 -0
- package/dist/types/interface/api/requests/form.request.d.ts +31 -12
- package/dist/types/interface/api/requests/user.admin.request.d.ts +3 -4
- package/dist/types/interface/api/responses/form-code-block.admin.response.d.ts +21 -0
- package/dist/types/interface/api/responses/form-code-block.admin.response.js +2 -0
- package/dist/types/interface/api/responses/form-code-block.response.d.ts +21 -0
- package/dist/types/interface/api/responses/form-code-block.response.js +2 -0
- package/dist/types/interface/api/responses/form-document.admin.response.d.ts +4 -0
- package/dist/types/interface/api/responses/form-document.response.d.ts +4 -0
- package/dist/types/interface/api/responses/form-submission.admin.response.d.ts +14 -0
- package/dist/types/interface/api/responses/form-submission.admin.response.js +2 -0
- package/dist/types/interface/api/responses/form-submission.response.d.ts +14 -0
- package/dist/types/interface/api/responses/form-submission.response.js +2 -0
- package/dist/types/interface/api/responses/form-webhook-history.admin.response.d.ts +7 -0
- package/dist/types/interface/api/responses/form-webhook-history.admin.response.js +2 -0
- package/dist/types/interface/api/responses/form-webhook-history.response.d.ts +7 -0
- package/dist/types/interface/api/responses/form-webhook-history.response.js +2 -0
- package/dist/types/interface/api/responses/form-webhook.admin.response.d.ts +21 -0
- package/dist/types/interface/api/responses/form-webhook.admin.response.js +2 -0
- package/dist/types/interface/api/responses/form-webhook.response.d.ts +21 -0
- package/dist/types/interface/api/responses/form-webhook.response.js +2 -0
- package/dist/types/interface/api/responses/form.admin.response.d.ts +4 -0
- package/dist/types/interface/api/responses/form.public.response.d.ts +57 -0
- package/dist/types/interface/api/responses/form.public.response.js +2 -0
- package/dist/types/interface/api/responses/form.response.d.ts +43 -0
- package/dist/types/interface/api/responses/user.response.d.ts +13 -0
- package/dist/types/interface/dto/form.dto.d.ts +95 -6
- package/dist/types/interface/index.d.ts +1 -0
- package/dist/types/interface/index.js +1 -0
- package/dist/types/interface/models/form-code-block.model.d.ts +12 -0
- package/dist/types/interface/models/form-code-block.model.js +2 -0
- package/dist/types/interface/models/form-document.model.d.ts +6 -3
- package/dist/types/interface/models/form-submission.model.d.ts +7 -2
- package/dist/types/interface/models/form.model.d.ts +3 -1
- package/dist/utils/form.utils.d.ts +5 -0
- package/dist/utils/form.utils.js +103 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +1 -1
- package/tsconfig.json +105 -105
- package/dist/types/interface/api/requests/project.public.request.d.ts +0 -25
- package/dist/types/interface/api/responses/project.public.response.d.ts +0 -15
- /package/dist/types/interface/api/requests/{project.public.request.js → form-code-block.admin.request.js} +0 -0
- /package/dist/types/interface/api/{responses/project.public.response.js → requests/form-code-block.request.js} +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { FormStatus } from '../../../enum';
|
|
2
|
+
import { QueryPaginate } from '..';
|
|
3
|
+
import { FormResponseDTO } from '../../dto';
|
|
4
|
+
export interface IGetPublishedFormPublicParams {
|
|
5
|
+
formId: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IGetPublishedFormPublicQuery {
|
|
8
|
+
formSubmissionId?: string | null;
|
|
9
|
+
}
|
|
10
|
+
export type IPaginatePublishedFormPublicQuery = {
|
|
11
|
+
title?: string;
|
|
12
|
+
tags?: string[];
|
|
13
|
+
userId?: string;
|
|
14
|
+
status?: FormStatus[];
|
|
15
|
+
} & QueryPaginate;
|
|
16
|
+
export interface ICheckCanStartSubmissionPublishedFormPublicParams {
|
|
17
|
+
formId: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ICheckCanStartSubmissionPublishedFormPublicQuery {
|
|
20
|
+
emailVerificationToken?: string;
|
|
21
|
+
formSubmissionId?: string | null;
|
|
22
|
+
}
|
|
23
|
+
export interface IStartSubmissionPublishedFormPublicParams {
|
|
24
|
+
formId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IStartSubmissionPublishedFormPublicBody {
|
|
27
|
+
password?: string;
|
|
28
|
+
emailVerificationToken?: string;
|
|
29
|
+
formSubmissionId?: string | null;
|
|
30
|
+
}
|
|
31
|
+
export interface ICheckPasswordFormPublicParams {
|
|
32
|
+
formId: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ICheckPasswordFormPublicBody {
|
|
35
|
+
password: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ISendSubmissionPublishedFormPublicParams {
|
|
38
|
+
formId: string;
|
|
39
|
+
formSubmissionId: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ISendSubmissionPublishedFormPublicBody {
|
|
42
|
+
password?: string;
|
|
43
|
+
emailVerificationToken?: string;
|
|
44
|
+
response: FormResponseDTO;
|
|
45
|
+
}
|
|
46
|
+
export interface IGetPreSignerUrlFormPublicParams {
|
|
47
|
+
formSubmissionId: string;
|
|
48
|
+
}
|
|
49
|
+
export interface IGetPreSignerUrlFormPublicBody {
|
|
50
|
+
name: string;
|
|
51
|
+
}
|
|
52
|
+
export interface IImportFromCloudFormPublicParams {
|
|
53
|
+
formSubmissionId: string;
|
|
54
|
+
}
|
|
55
|
+
export interface IImportFromCloudFormPublicBody {
|
|
56
|
+
formDocument: {
|
|
57
|
+
fileId: string;
|
|
58
|
+
name: string;
|
|
59
|
+
}[];
|
|
60
|
+
}
|
|
61
|
+
export interface IFindIdFormPublicParams {
|
|
62
|
+
formSubmissionId: string;
|
|
63
|
+
externalId: string;
|
|
64
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormStatus } from '../../../enum';
|
|
2
2
|
import { QueryPaginate } from '..';
|
|
3
|
-
import
|
|
3
|
+
import { FormContentDTO } from '../../dto';
|
|
4
4
|
export interface IUpdateFormParams {
|
|
5
5
|
formId: string;
|
|
6
6
|
}
|
|
@@ -8,7 +8,7 @@ export interface IUpdateFormBody {
|
|
|
8
8
|
title?: string;
|
|
9
9
|
description?: string;
|
|
10
10
|
tags?: string[];
|
|
11
|
-
content?:
|
|
11
|
+
content?: FormContentDTO;
|
|
12
12
|
status?: FormStatus;
|
|
13
13
|
startDate?: Date | null;
|
|
14
14
|
endDate?: Date | null;
|
|
@@ -29,7 +29,7 @@ export interface ICreateFormBody {
|
|
|
29
29
|
title: string;
|
|
30
30
|
description: string;
|
|
31
31
|
tags: string[];
|
|
32
|
-
content:
|
|
32
|
+
content: FormContentDTO;
|
|
33
33
|
abyssSpotlightProjectId: string | null;
|
|
34
34
|
abyssProjectId: string | null;
|
|
35
35
|
abyssProjectApplicationId: string | null;
|
|
@@ -37,21 +37,22 @@ export interface ICreateFormBody {
|
|
|
37
37
|
startDate: Date | null;
|
|
38
38
|
endDate: Date | null;
|
|
39
39
|
}
|
|
40
|
-
export interface IGetFormParams
|
|
40
|
+
export interface IGetFormParams {
|
|
41
41
|
formId: string;
|
|
42
42
|
}
|
|
43
|
-
export interface IListByAbyssProjectIdFormParams
|
|
43
|
+
export interface IListByAbyssProjectIdFormParams {
|
|
44
44
|
abyssProjectId: string;
|
|
45
45
|
}
|
|
46
|
-
export interface IDeleteFormParams
|
|
46
|
+
export interface IDeleteFormParams {
|
|
47
47
|
formId: string;
|
|
48
48
|
}
|
|
49
49
|
export type IPaginateFormQuery = {
|
|
50
50
|
title?: string;
|
|
51
51
|
tags?: string[];
|
|
52
52
|
status?: FormStatus[];
|
|
53
|
+
abyssProjectId?: string;
|
|
53
54
|
} & QueryPaginate;
|
|
54
|
-
export interface ITransferFormParams
|
|
55
|
+
export interface ITransferFormParams {
|
|
55
56
|
formId: string;
|
|
56
57
|
}
|
|
57
58
|
export interface ITransferFormBody {
|
|
@@ -63,12 +64,30 @@ export interface IUpdateConfigurationFormParams {
|
|
|
63
64
|
export interface IUpdateConfigurationFormBody {
|
|
64
65
|
requireAbyssAuthentication?: boolean;
|
|
65
66
|
requireEmailVerification?: boolean;
|
|
66
|
-
|
|
67
|
-
maskFormContent?: boolean;
|
|
67
|
+
maxSubmissionPerUniqUser?: number | null;
|
|
68
68
|
password?: string | null;
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
emailNotificationOnSubmission?: boolean;
|
|
70
|
+
delayBetweenSubmissionInMinutes?: number | null;
|
|
71
|
+
maskFormContent?: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface IGetConfigurationFormParams {
|
|
74
|
+
formId: string;
|
|
75
|
+
}
|
|
76
|
+
export interface ILinkPresentationFormParams {
|
|
77
|
+
formId: string;
|
|
71
78
|
}
|
|
72
|
-
export interface
|
|
79
|
+
export interface ILinkPresentationFormBody {
|
|
80
|
+
abyssSpotlightProjectId: string | null;
|
|
81
|
+
}
|
|
82
|
+
export type IGetMainMetricsFormQuery = {
|
|
83
|
+
title?: string;
|
|
84
|
+
tags?: string[];
|
|
85
|
+
status?: FormStatus[];
|
|
86
|
+
abyssProjectId?: string;
|
|
87
|
+
};
|
|
88
|
+
export interface IGetMetricsFormParams {
|
|
73
89
|
formId: string;
|
|
74
90
|
}
|
|
91
|
+
export type IGetMetricsFormQuery = {
|
|
92
|
+
ignoreArchived?: boolean;
|
|
93
|
+
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { QueryPaginate } from '..';
|
|
2
|
-
|
|
3
|
-
export interface IGetUserAdminParams extends core.ParamsDictionary {
|
|
2
|
+
export interface IGetUserAdminParams {
|
|
4
3
|
userId: string;
|
|
5
4
|
}
|
|
6
|
-
export interface IResetApiKeyUserAdminParams
|
|
5
|
+
export interface IResetApiKeyUserAdminParams {
|
|
7
6
|
userId: string;
|
|
8
7
|
}
|
|
9
8
|
export type IPaginateUserAdminQuery = QueryPaginate;
|
|
10
|
-
export interface IUpdateUserAdminParams
|
|
9
|
+
export interface IUpdateUserAdminParams {
|
|
11
10
|
userId: string;
|
|
12
11
|
}
|
|
13
12
|
export interface IUpdateUserAdminBody {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BasePaginate, IFormCodeBlock, IResponse } from '../..';
|
|
2
|
+
export interface IGetFormCodeBlockAdminData {
|
|
3
|
+
formCodeBlock: IFormCodeBlock;
|
|
4
|
+
}
|
|
5
|
+
export type IGetFormCodeBlockAdminResponse = IResponse<IGetFormCodeBlockAdminData>;
|
|
6
|
+
export type IPaginateFormCodeBlockAdminResponse = IResponse<BasePaginate<IFormCodeBlock>>;
|
|
7
|
+
export interface IUpdateFormCodeBlockAdminData {
|
|
8
|
+
formCodeBlock: IFormCodeBlock;
|
|
9
|
+
}
|
|
10
|
+
export type IUpdateFormCodeBlockAdminResponse = IResponse<IUpdateFormCodeBlockAdminData>;
|
|
11
|
+
export interface ICreateFormCodeBlockAdminData {
|
|
12
|
+
formCodeBlock: IFormCodeBlock;
|
|
13
|
+
}
|
|
14
|
+
export type ICreateFormCodeBlockAdminResponse = IResponse<ICreateFormCodeBlockAdminData>;
|
|
15
|
+
export interface IDeleteFormCodeBlockAdminData {
|
|
16
|
+
}
|
|
17
|
+
export type IDeleteFormCodeBlockAdminResponse = IResponse<IDeleteFormCodeBlockAdminData>;
|
|
18
|
+
export interface IListFormCodeBlockAdminData {
|
|
19
|
+
formCodeBlocks: IFormCodeBlock[];
|
|
20
|
+
}
|
|
21
|
+
export type IListFormCodeBlockAdminResponse = IResponse<IListFormCodeBlockAdminData>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BasePaginate, IFormCodeBlock, IResponse } from '../..';
|
|
2
|
+
export interface IGetFormCodeBlockData {
|
|
3
|
+
formCodeBlock: IFormCodeBlock;
|
|
4
|
+
}
|
|
5
|
+
export type IGetFormCodeBlockResponse = IResponse<IGetFormCodeBlockData>;
|
|
6
|
+
export type IPaginateFormCodeBlockResponse = IResponse<BasePaginate<IFormCodeBlock>>;
|
|
7
|
+
export interface IUpdateFormCodeBlockData {
|
|
8
|
+
formCodeBlock: IFormCodeBlock;
|
|
9
|
+
}
|
|
10
|
+
export type IUpdateFormCodeBlockResponse = IResponse<IUpdateFormCodeBlockData>;
|
|
11
|
+
export interface ICreateFormCodeBlockData {
|
|
12
|
+
formCodeBlock: IFormCodeBlock;
|
|
13
|
+
}
|
|
14
|
+
export type ICreateFormCodeBlockResponse = IResponse<ICreateFormCodeBlockData>;
|
|
15
|
+
export interface IDeleteFormCodeBlockData {
|
|
16
|
+
}
|
|
17
|
+
export type IDeleteFormCodeBlockResponse = IResponse<IDeleteFormCodeBlockData>;
|
|
18
|
+
export interface IListFormCodeBlockData {
|
|
19
|
+
formCodeBlocks: IFormCodeBlock[];
|
|
20
|
+
}
|
|
21
|
+
export type IListFormCodeBlockResponse = IResponse<IListFormCodeBlockData>;
|
|
@@ -7,3 +7,7 @@ export type IPaginateFormDocumentAdminResponse = IResponse<BasePaginate<IFormDoc
|
|
|
7
7
|
export interface IDeleteFormDocumentAdminData {
|
|
8
8
|
}
|
|
9
9
|
export type IDeleteFormDocumentAdminResponse = IResponse<IDeleteFormDocumentAdminData>;
|
|
10
|
+
export interface IListFormDocumentAdminData {
|
|
11
|
+
formDocument: IFormDocument[];
|
|
12
|
+
}
|
|
13
|
+
export type IListFormDocumentAdminResponse = IResponse<IListFormDocumentAdminData>;
|
|
@@ -15,3 +15,7 @@ export type IImportFromCollectionFormDocumentResponse = IResponse<IImportFromCol
|
|
|
15
15
|
export interface IDeleteFormDocumentData {
|
|
16
16
|
}
|
|
17
17
|
export type IDeleteFormDocumentResponse = IResponse<IDeleteFormDocumentData>;
|
|
18
|
+
export interface IListFormDocumentData {
|
|
19
|
+
formDocument: IFormDocument[];
|
|
20
|
+
}
|
|
21
|
+
export type IListFormDocumentResponse = IResponse<IListFormDocumentData>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BasePaginate, IFormSubmission, IResponse } from '../..';
|
|
2
|
+
export interface IGetFormSubmissionAdminData {
|
|
3
|
+
formSubmission: IFormSubmission;
|
|
4
|
+
}
|
|
5
|
+
export type IGetFormSubmissionAdminResponse = IResponse<IGetFormSubmissionAdminData>;
|
|
6
|
+
export type IPaginateFormSubmissionAdminResponse = IResponse<BasePaginate<IFormSubmission>>;
|
|
7
|
+
export interface IUpdateFormSubmissionAdminData {
|
|
8
|
+
formSubmission: IFormSubmission;
|
|
9
|
+
}
|
|
10
|
+
export type IUpdateFormSubmissionAdminResponse = IResponse<IUpdateFormSubmissionAdminData>;
|
|
11
|
+
export interface IArchiveFormSubmissionAdminData {
|
|
12
|
+
formSubmission: IFormSubmission;
|
|
13
|
+
}
|
|
14
|
+
export type IArchiveFormSubmissionAdminResponse = IResponse<IArchiveFormSubmissionAdminData>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BasePaginate, IFormSubmission, IResponse } from '../..';
|
|
2
|
+
export interface IGetFormSubmissionData {
|
|
3
|
+
formSubmission: IFormSubmission;
|
|
4
|
+
}
|
|
5
|
+
export type IGetFormSubmissionResponse = IResponse<IGetFormSubmissionData>;
|
|
6
|
+
export type IPaginateFormSubmissionResponse = IResponse<BasePaginate<IFormSubmission>>;
|
|
7
|
+
export interface IUpdateFormSubmissionData {
|
|
8
|
+
formSubmission: IFormSubmission;
|
|
9
|
+
}
|
|
10
|
+
export type IUpdateFormSubmissionResponse = IResponse<IUpdateFormSubmissionData>;
|
|
11
|
+
export interface IArchiveFormSubmissionData {
|
|
12
|
+
formSubmission: IFormSubmission;
|
|
13
|
+
}
|
|
14
|
+
export type IArchiveFormSubmissionResponse = IResponse<IArchiveFormSubmissionData>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BasePaginate, IResponse } from '..';
|
|
2
|
+
import { IFormWebhookHistory } from '../../models/form-webhook-history.model';
|
|
3
|
+
export type IPaginateFormWebhookHistoryAdminResponse = IResponse<BasePaginate<IFormWebhookHistory>>;
|
|
4
|
+
export interface IGetFormWebhookHistoryAdminData {
|
|
5
|
+
formWebhookHistory: IFormWebhookHistory;
|
|
6
|
+
}
|
|
7
|
+
export type IGetFormWebhookHistoryAdminResponse = IResponse<IGetFormWebhookHistoryAdminData>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BasePaginate, IResponse } from '..';
|
|
2
|
+
import { IFormWebhookHistory } from '../../models/form-webhook-history.model';
|
|
3
|
+
export type IPaginateFormWebhookHistoryResponse = IResponse<BasePaginate<IFormWebhookHistory>>;
|
|
4
|
+
export interface IGetFormWebhookHistoryData {
|
|
5
|
+
formWebhookHistory: IFormWebhookHistory;
|
|
6
|
+
}
|
|
7
|
+
export type IGetFormWebhookHistoryResponse = IResponse<IGetFormWebhookHistoryData>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BasePaginate, IFormWebhook, IResponse } from '../..';
|
|
2
|
+
export interface IGetFormWebhookAdminData {
|
|
3
|
+
formWebhook: IFormWebhook;
|
|
4
|
+
}
|
|
5
|
+
export type IGetFormWebhookAdminResponse = IResponse<IGetFormWebhookAdminData>;
|
|
6
|
+
export type IPaginateFormWebhookAdminResponse = IResponse<BasePaginate<IFormWebhook>>;
|
|
7
|
+
export interface IUpdateFormWebhookAdminData {
|
|
8
|
+
formWebhook: IFormWebhook;
|
|
9
|
+
}
|
|
10
|
+
export type IUpdateFormWebhookAdminResponse = IResponse<IUpdateFormWebhookAdminData>;
|
|
11
|
+
export interface ICreateFormWebhookAdminData {
|
|
12
|
+
formWebhook: IFormWebhook;
|
|
13
|
+
}
|
|
14
|
+
export type ICreateFormWebhookAdminResponse = IResponse<ICreateFormWebhookAdminData>;
|
|
15
|
+
export interface IDeleteFormWebhookAdminData {
|
|
16
|
+
}
|
|
17
|
+
export type IDeleteFormWebhookAdminResponse = IResponse<IDeleteFormWebhookAdminData>;
|
|
18
|
+
export interface IResetSecretFormWebhookAdminData {
|
|
19
|
+
formWebhook: IFormWebhook;
|
|
20
|
+
}
|
|
21
|
+
export type IResetSecretFormWebhookAdminResponse = IResponse<IResetSecretFormWebhookAdminData>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BasePaginate, IFormWebhook, IResponse } from '../..';
|
|
2
|
+
export interface IGetFormWebhookData {
|
|
3
|
+
formWebhook: IFormWebhook;
|
|
4
|
+
}
|
|
5
|
+
export type IGetFormWebhookResponse = IResponse<IGetFormWebhookData>;
|
|
6
|
+
export type IPaginateFormWebhookResponse = IResponse<BasePaginate<IFormWebhook>>;
|
|
7
|
+
export interface IUpdateFormWebhookData {
|
|
8
|
+
formWebhook: IFormWebhook;
|
|
9
|
+
}
|
|
10
|
+
export type IUpdateFormWebhookResponse = IResponse<IUpdateFormWebhookData>;
|
|
11
|
+
export interface ICreateFormWebhookData {
|
|
12
|
+
formWebhook: IFormWebhook;
|
|
13
|
+
}
|
|
14
|
+
export type ICreateFormWebhookResponse = IResponse<ICreateFormWebhookData>;
|
|
15
|
+
export interface IDeleteFormWebhookData {
|
|
16
|
+
}
|
|
17
|
+
export type IDeleteFormWebhookResponse = IResponse<IDeleteFormWebhookData>;
|
|
18
|
+
export interface IResetSecretFormWebhookData {
|
|
19
|
+
formWebhook: IFormWebhook;
|
|
20
|
+
}
|
|
21
|
+
export type IResetSecretFormWebhookResponse = IResponse<IResetSecretFormWebhookData>;
|
|
@@ -39,3 +39,7 @@ export interface IGetConfigurationFormAdminData {
|
|
|
39
39
|
formConfiguration: IFormConfiguration;
|
|
40
40
|
}
|
|
41
41
|
export type IGetConfigurationFormAdminResponse = IResponse<IGetConfigurationFormAdminData>;
|
|
42
|
+
export interface ILinkPresentationFormAdminData {
|
|
43
|
+
form: IForm;
|
|
44
|
+
}
|
|
45
|
+
export type ILinkPresentationFormAdminResponse = IResponse<ILinkPresentationFormAdminData>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { BasePaginate, IFormCodeBlock, IFormDocument, IResponse } from '../..';
|
|
2
|
+
import { CannotStartSubmissionReason } from '../../../enum';
|
|
3
|
+
import { FormContentDTO, PublicFormDTO } from '../../dto/form.dto';
|
|
4
|
+
export interface IGetPublishedFormPublicData {
|
|
5
|
+
form: PublicFormDTO;
|
|
6
|
+
canStartSubmission: boolean;
|
|
7
|
+
cannotStartSubmissionReasons: CannotStartSubmissionReason[];
|
|
8
|
+
}
|
|
9
|
+
export type IGetPublishedFormPublicResponse = IResponse<IGetPublishedFormPublicData>;
|
|
10
|
+
export interface ICheckCanStartSubmissionPublishedFormPublicData {
|
|
11
|
+
form: PublicFormDTO;
|
|
12
|
+
canStartSubmission: boolean;
|
|
13
|
+
cannotStartSubmissionReasons: CannotStartSubmissionReason[];
|
|
14
|
+
}
|
|
15
|
+
export type ICheckCanStartSubmissionPublishedFormPublicResponse = IResponse<ICheckCanStartSubmissionPublishedFormPublicData>;
|
|
16
|
+
export interface IStartSubmissionPublishedFormPublicData {
|
|
17
|
+
formSubmissionId: string;
|
|
18
|
+
formSubmissionStartDate: Date;
|
|
19
|
+
form: PublicFormDTO;
|
|
20
|
+
content: FormContentDTO;
|
|
21
|
+
formDocuments: IFormDocument[];
|
|
22
|
+
formCodeBlocks: IFormCodeBlock[];
|
|
23
|
+
configuration: {
|
|
24
|
+
allowFileUpload: boolean;
|
|
25
|
+
maxDocumentSizeMo: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export type IStartSubmissionPublishedFormPublicResponse = IResponse<IStartSubmissionPublishedFormPublicData>;
|
|
29
|
+
export type IPaginatePublishedFormPublicResponse = IResponse<BasePaginate<PublicFormDTO>>;
|
|
30
|
+
export interface IGetPopularFormPublicData {
|
|
31
|
+
tags: {
|
|
32
|
+
tag: string;
|
|
33
|
+
count: number;
|
|
34
|
+
}[];
|
|
35
|
+
countForms: number;
|
|
36
|
+
countSubmissions: number;
|
|
37
|
+
}
|
|
38
|
+
export type IGetPopularFormPublicResponse = IResponse<IGetPopularFormPublicData>;
|
|
39
|
+
export interface ICheckPasswordFormPublicData {
|
|
40
|
+
isPasswordValid: boolean;
|
|
41
|
+
}
|
|
42
|
+
export type ICheckPasswordFormPublicResponse = IResponse<ICheckPasswordFormPublicData>;
|
|
43
|
+
export interface ISendSubmissionPublishedFormPublicData {
|
|
44
|
+
}
|
|
45
|
+
export type ISendSubmissionPublishedFormPublicResponse = IResponse<ISendSubmissionPublishedFormPublicData>;
|
|
46
|
+
export interface IGetPreSignerUrlFormPublicData {
|
|
47
|
+
preSignedUrl: string;
|
|
48
|
+
}
|
|
49
|
+
export type IGetPreSignerUrlFormPublicResponse = IResponse<IGetPreSignerUrlFormPublicData>;
|
|
50
|
+
export type IImportFromCloudFormPublicData = {
|
|
51
|
+
formDocuments: IFormDocument[];
|
|
52
|
+
};
|
|
53
|
+
export type IImportFromCloudFormPublicResponse = IResponse<IImportFromCloudFormPublicData>;
|
|
54
|
+
export type IFindIdFormPublicData = {
|
|
55
|
+
formDocumentId: string;
|
|
56
|
+
};
|
|
57
|
+
export type IFindIdFormPublicResponse = IResponse<IFindIdFormPublicData>;
|
|
@@ -39,3 +39,46 @@ export interface IGetConfigurationFormData {
|
|
|
39
39
|
formConfiguration: IFormConfiguration;
|
|
40
40
|
}
|
|
41
41
|
export type IGetConfigurationFormResponse = IResponse<IGetConfigurationFormData>;
|
|
42
|
+
export interface ILinkPresentationFormData {
|
|
43
|
+
form: IForm;
|
|
44
|
+
}
|
|
45
|
+
export type ILinkPresentationFormResponse = IResponse<ILinkPresentationFormData>;
|
|
46
|
+
export interface IGetMainMetricsFormData {
|
|
47
|
+
submissionPerDay: {
|
|
48
|
+
date: string;
|
|
49
|
+
count: number;
|
|
50
|
+
}[];
|
|
51
|
+
pendingSubmissionPerDay: {
|
|
52
|
+
date: string;
|
|
53
|
+
count: number;
|
|
54
|
+
}[];
|
|
55
|
+
submissionPerForm: Record<string, {
|
|
56
|
+
data: {
|
|
57
|
+
count: number;
|
|
58
|
+
date: string;
|
|
59
|
+
}[];
|
|
60
|
+
title: string;
|
|
61
|
+
}>;
|
|
62
|
+
}
|
|
63
|
+
export type IGetMainMetricsFormResponse = IResponse<IGetMainMetricsFormData>;
|
|
64
|
+
export interface IGetMetricsFormData {
|
|
65
|
+
submissionPerDay: {
|
|
66
|
+
date: string;
|
|
67
|
+
count: number;
|
|
68
|
+
}[];
|
|
69
|
+
pendingSubmissionPerDay: {
|
|
70
|
+
date: string;
|
|
71
|
+
count: number;
|
|
72
|
+
}[];
|
|
73
|
+
archivedSubmissionPerDay: {
|
|
74
|
+
date: string;
|
|
75
|
+
count: number;
|
|
76
|
+
}[];
|
|
77
|
+
totalSubmission: number;
|
|
78
|
+
totalPendingSubmission: number;
|
|
79
|
+
totalArchivedSubmission: number;
|
|
80
|
+
averageRestart: number;
|
|
81
|
+
averageCompletionTime: number;
|
|
82
|
+
totalDocument: number;
|
|
83
|
+
}
|
|
84
|
+
export type IGetMetricsFormResponse = IResponse<IGetMetricsFormData>;
|
|
@@ -11,3 +11,16 @@ export interface IUpdateUserData {
|
|
|
11
11
|
user: IUser;
|
|
12
12
|
}
|
|
13
13
|
export type IUpdateUserResponse = IResponse<IUpdateUserData>;
|
|
14
|
+
export interface IGetDetailsUserData {
|
|
15
|
+
tags: {
|
|
16
|
+
tag: string;
|
|
17
|
+
count: number;
|
|
18
|
+
}[];
|
|
19
|
+
statuses: {
|
|
20
|
+
status: string;
|
|
21
|
+
count: number;
|
|
22
|
+
}[];
|
|
23
|
+
countForms: number;
|
|
24
|
+
countSubmissions: number;
|
|
25
|
+
}
|
|
26
|
+
export type IGetDetailsUserResponse = IResponse<IGetDetailsUserData>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { FormStatus } from '../../enum';
|
|
1
|
+
import { FormContentQuestionType, FormStatus } from '../../enum';
|
|
2
2
|
import { IFormWebhook } from '../models/form-webhook.model';
|
|
3
3
|
export interface FormDTO {
|
|
4
4
|
id: string;
|
|
5
5
|
title: string;
|
|
6
6
|
description: string;
|
|
7
|
-
publicAccessIdentifier: string | null;
|
|
8
7
|
content: FormContentDTO | null;
|
|
9
8
|
startDate: Date | null;
|
|
10
9
|
endDate: Date | null;
|
|
@@ -28,13 +27,14 @@ export interface PublicFormDTO {
|
|
|
28
27
|
id: string;
|
|
29
28
|
title: string;
|
|
30
29
|
description: string;
|
|
31
|
-
publicAccessIdentifier: string | null;
|
|
32
30
|
content: FormContentDTO | null;
|
|
33
31
|
startDate: Date | null;
|
|
34
32
|
endDate: Date | null;
|
|
35
33
|
tags: string[];
|
|
36
34
|
status: FormStatus;
|
|
37
35
|
abyssSpotlightProjectId: string | null;
|
|
36
|
+
userId: string | null;
|
|
37
|
+
abyssProjectId: string | null;
|
|
38
38
|
createdAt: Date;
|
|
39
39
|
updatedAt: Date;
|
|
40
40
|
formConfiguration?: {
|
|
@@ -46,7 +46,96 @@ export interface PublicFormDTO {
|
|
|
46
46
|
delayBetweenSubmissionInMinutes: number | null;
|
|
47
47
|
} | null;
|
|
48
48
|
}
|
|
49
|
-
export
|
|
50
|
-
|
|
49
|
+
export type FormContentQuestionAnswerDTO = {
|
|
50
|
+
id: string;
|
|
51
|
+
content: string;
|
|
52
|
+
formCodeBlockIds: string[];
|
|
53
|
+
};
|
|
54
|
+
export type FormContentQuestionRateAnswerDTO = FormContentQuestionAnswerDTO & {
|
|
55
|
+
minValue: number;
|
|
56
|
+
maxValue: number;
|
|
57
|
+
allowDecimal: boolean;
|
|
58
|
+
};
|
|
59
|
+
export type FormContentQuestionBaseOptionsDTO = {
|
|
60
|
+
id: string;
|
|
51
61
|
ask: string;
|
|
52
|
-
|
|
62
|
+
isRequired: boolean;
|
|
63
|
+
allowFileUpload: boolean;
|
|
64
|
+
formDocumentIds: string[] | null;
|
|
65
|
+
formCodeBlockIds: string[];
|
|
66
|
+
description: string | null;
|
|
67
|
+
};
|
|
68
|
+
export type FormContentQuestionDateOptionsDTO = FormContentQuestionBaseOptionsDTO & {
|
|
69
|
+
type: FormContentQuestionType.DATE;
|
|
70
|
+
minDate: Date | null;
|
|
71
|
+
maxDate: Date | null;
|
|
72
|
+
dateOnly: boolean;
|
|
73
|
+
onlyFuture: boolean;
|
|
74
|
+
onlyPast: boolean;
|
|
75
|
+
};
|
|
76
|
+
export type FormContentQuestionPeriodOptionsDTO = FormContentQuestionBaseOptionsDTO & {
|
|
77
|
+
type: FormContentQuestionType.PERIOD;
|
|
78
|
+
minDate: Date | null;
|
|
79
|
+
maxDate: Date | null;
|
|
80
|
+
dateOnly: boolean;
|
|
81
|
+
onlyFuture: boolean;
|
|
82
|
+
onlyPast: boolean;
|
|
83
|
+
};
|
|
84
|
+
export type FormContentQuestionRateOptionsDTO = FormContentQuestionBaseOptionsDTO & {
|
|
85
|
+
type: FormContentQuestionType.RATE;
|
|
86
|
+
display: 'slider' | 'star';
|
|
87
|
+
answers: FormContentQuestionRateAnswerDTO[];
|
|
88
|
+
};
|
|
89
|
+
export type FormContentQuestionNumberOptionsDTO = FormContentQuestionBaseOptionsDTO & {
|
|
90
|
+
type: FormContentQuestionType.NUMBER;
|
|
91
|
+
minValue: number | null;
|
|
92
|
+
maxValue: number | null;
|
|
93
|
+
allowDecimal: boolean;
|
|
94
|
+
};
|
|
95
|
+
export type FormContentQuestionFreeTextOptionsDTO = FormContentQuestionBaseOptionsDTO & {
|
|
96
|
+
type: FormContentQuestionType.FREE_TEXT;
|
|
97
|
+
allowCodeBlock: boolean;
|
|
98
|
+
};
|
|
99
|
+
export type FormContentQuestionCardOrSelectOptionsDTO = FormContentQuestionBaseOptionsDTO & {
|
|
100
|
+
type: FormContentQuestionType.SELECT | FormContentQuestionType.CARD;
|
|
101
|
+
allowMultipleAnswers: boolean;
|
|
102
|
+
allowFreeText: boolean;
|
|
103
|
+
answers: FormContentQuestionAnswerDTO[];
|
|
104
|
+
};
|
|
105
|
+
export type FormContentQuestionDTO = FormContentQuestionPeriodOptionsDTO | FormContentQuestionDateOptionsDTO | FormContentQuestionNumberOptionsDTO | FormContentQuestionFreeTextOptionsDTO | FormContentQuestionCardOrSelectOptionsDTO | FormContentQuestionRateOptionsDTO;
|
|
106
|
+
export type FormContentPageDTO = {
|
|
107
|
+
id: string;
|
|
108
|
+
title: string;
|
|
109
|
+
description: string | null;
|
|
110
|
+
questions: FormContentQuestionDTO[];
|
|
111
|
+
formDocumentIds?: string[] | null;
|
|
112
|
+
formCodeBlockIds?: string[] | null;
|
|
113
|
+
};
|
|
114
|
+
export type FormContentDTO = {
|
|
115
|
+
pages: FormContentPageDTO[];
|
|
116
|
+
formDocumentIds?: string[] | null;
|
|
117
|
+
formCodeBlockIds?: string[] | null;
|
|
118
|
+
};
|
|
119
|
+
export type FormResponseQuestionDTO = {
|
|
120
|
+
questionId: string;
|
|
121
|
+
value?: number | null;
|
|
122
|
+
date?: Date | null;
|
|
123
|
+
startDate?: Date | null;
|
|
124
|
+
endDate?: Date | null;
|
|
125
|
+
freeText?: string | null;
|
|
126
|
+
answers?: string[] | null;
|
|
127
|
+
rateAnswers?: {
|
|
128
|
+
content: string;
|
|
129
|
+
rate: number;
|
|
130
|
+
}[] | null;
|
|
131
|
+
formDocumentIds?: string[] | null;
|
|
132
|
+
codeBlock?: {
|
|
133
|
+
title: string;
|
|
134
|
+
description: string;
|
|
135
|
+
language: string;
|
|
136
|
+
content: string;
|
|
137
|
+
} | null;
|
|
138
|
+
};
|
|
139
|
+
export type FormResponseDTO = {
|
|
140
|
+
questions: Record<string, FormResponseQuestionDTO>;
|
|
141
|
+
};
|
|
@@ -5,5 +5,6 @@ export * from './models/form-submission.model';
|
|
|
5
5
|
export * from './models/form-document.model';
|
|
6
6
|
export * from './models/form-webhook.model';
|
|
7
7
|
export * from './models/form-webhook-history.model';
|
|
8
|
+
export * from './models/form-code-block.model';
|
|
8
9
|
export * from './api';
|
|
9
10
|
export * from './dto';
|
|
@@ -21,5 +21,6 @@ __exportStar(require("./models/form-submission.model"), exports);
|
|
|
21
21
|
__exportStar(require("./models/form-document.model"), exports);
|
|
22
22
|
__exportStar(require("./models/form-webhook.model"), exports);
|
|
23
23
|
__exportStar(require("./models/form-webhook-history.model"), exports);
|
|
24
|
+
__exportStar(require("./models/form-code-block.model"), exports);
|
|
24
25
|
__exportStar(require("./api"), exports);
|
|
25
26
|
__exportStar(require("./dto"), exports);
|