@clxmedia/types 1.0.19 → 1.0.20
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.
|
@@ -20,8 +20,8 @@ export type CLXForm = {
|
|
|
20
20
|
name: string;
|
|
21
21
|
description?: string;
|
|
22
22
|
};
|
|
23
|
-
export type CLXFormResponseType = 'STRING' | 'NUMBER' | 'STRING_ARRAY' | 'BOOLEAN' | 'ANY';
|
|
24
|
-
export type CLXFormFieldType = 'text' | 'textarea' | 'boolean' | 'select' | 'multiselect';
|
|
23
|
+
export type CLXFormResponseType = 'STRING' | 'NUMBER' | 'STRING_ARRAY' | 'BOOLEAN' | 'FILE' | 'ANY';
|
|
24
|
+
export type CLXFormFieldType = 'text' | 'textarea' | 'boolean' | 'select' | 'multiselect' | 'file';
|
|
25
25
|
export type CLXFormSelectType = 'select' | 'radio' | 'checkbox' | 'freeform';
|
|
26
26
|
export type CLXFormConditionSubjectEntry = {
|
|
27
27
|
value: string;
|
|
@@ -33,6 +33,14 @@ export type CLXFormResponseValueBase = {
|
|
|
33
33
|
type: CLXFormResponseType;
|
|
34
34
|
errorMsg?: CLXFormErrorMsg[];
|
|
35
35
|
};
|
|
36
|
+
export type CLXFormsFilesDescriptor = {
|
|
37
|
+
formattedFilename: string;
|
|
38
|
+
mimeType: string;
|
|
39
|
+
isUploadComplete: boolean;
|
|
40
|
+
};
|
|
41
|
+
export type CLXFormsFileDescriptors = {
|
|
42
|
+
[fileGuid: string]: CLXFormsFilesDescriptor;
|
|
43
|
+
};
|
|
36
44
|
export type CLXFormResponseStringValue = CLXFormResponseValueBase & {
|
|
37
45
|
type: 'STRING';
|
|
38
46
|
value: string;
|
|
@@ -41,6 +49,10 @@ export type CLXFormResponseNumberValue = CLXFormResponseValueBase & {
|
|
|
41
49
|
type: 'NUMBER';
|
|
42
50
|
value: number;
|
|
43
51
|
};
|
|
52
|
+
export type CLXFormResponseFileValue = CLXFormResponseValueBase & {
|
|
53
|
+
type: 'FILE';
|
|
54
|
+
value: CLXFormsFileDescriptors;
|
|
55
|
+
};
|
|
44
56
|
export type CLXFormResponseBooleanValue = CLXFormResponseValueBase & {
|
|
45
57
|
type: 'BOOLEAN';
|
|
46
58
|
value: boolean;
|
|
@@ -53,7 +65,7 @@ export type CLXFormResponseAnyValue = CLXFormResponseValueBase & {
|
|
|
53
65
|
type: 'ANY';
|
|
54
66
|
value: any;
|
|
55
67
|
};
|
|
56
|
-
export type CLXFormResponseValue = CLXFormResponseStringValue | CLXFormResponseStringArrayValue | CLXFormResponseNumberValue | CLXFormResponseBooleanValue | CLXFormResponseAnyValue;
|
|
68
|
+
export type CLXFormResponseValue = CLXFormResponseStringValue | CLXFormResponseStringArrayValue | CLXFormResponseNumberValue | CLXFormResponseFileValue | CLXFormResponseBooleanValue | CLXFormResponseAnyValue;
|
|
57
69
|
export type CLXFormResponses = {
|
|
58
70
|
[questionSlug: string]: CLXFormResponseValue;
|
|
59
71
|
};
|
|
@@ -66,6 +78,35 @@ export type CLXPlainFormFieldBase = CLXFormField & {
|
|
|
66
78
|
type: 'text';
|
|
67
79
|
mask: CLXFieldMasks;
|
|
68
80
|
};
|
|
81
|
+
export declare enum CLXFormFieldFileTypes {
|
|
82
|
+
'bmp' = "bmp",
|
|
83
|
+
'csv' = "csv",
|
|
84
|
+
'doc' = "doc",
|
|
85
|
+
'docx' = "docx",
|
|
86
|
+
'gif' = "gif",
|
|
87
|
+
'jpeg' = "jpeg",
|
|
88
|
+
'jpg' = "jpg",
|
|
89
|
+
'mp4' = "mp4",
|
|
90
|
+
'pdf' = "pdf",
|
|
91
|
+
'png' = "png",
|
|
92
|
+
'ppt' = "ppt",
|
|
93
|
+
'pptx' = "pptx",
|
|
94
|
+
'rtf' = "rtf",
|
|
95
|
+
'svg' = "svg",
|
|
96
|
+
'tif' = "tif",
|
|
97
|
+
'tiff' = "tiff",
|
|
98
|
+
'txt' = "txt",
|
|
99
|
+
'webm' = "webm",
|
|
100
|
+
'webp' = "webp",
|
|
101
|
+
'xls' = "xls",
|
|
102
|
+
'xlsx' = "xlsx"
|
|
103
|
+
}
|
|
104
|
+
export type CLXFileFormField = CLXFormField & {
|
|
105
|
+
type: 'file';
|
|
106
|
+
response_type: 'FILE';
|
|
107
|
+
max_files?: number;
|
|
108
|
+
allowed_file_types?: CLXFormFieldFileTypes[];
|
|
109
|
+
};
|
|
69
110
|
export type CLXTextFormFieldBase = CLXPlainFormFieldBase & {
|
|
70
111
|
type: 'text';
|
|
71
112
|
mask: 'phone' | 'email' | 'name' | 'url' | 'none';
|
|
@@ -1,2 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLXFormFieldFileTypes = void 0;
|
|
4
|
+
var CLXFormFieldFileTypes;
|
|
5
|
+
(function (CLXFormFieldFileTypes) {
|
|
6
|
+
CLXFormFieldFileTypes["bmp"] = "bmp";
|
|
7
|
+
CLXFormFieldFileTypes["csv"] = "csv";
|
|
8
|
+
CLXFormFieldFileTypes["doc"] = "doc";
|
|
9
|
+
CLXFormFieldFileTypes["docx"] = "docx";
|
|
10
|
+
CLXFormFieldFileTypes["gif"] = "gif";
|
|
11
|
+
CLXFormFieldFileTypes["jpeg"] = "jpeg";
|
|
12
|
+
CLXFormFieldFileTypes["jpg"] = "jpg";
|
|
13
|
+
CLXFormFieldFileTypes["mp4"] = "mp4";
|
|
14
|
+
CLXFormFieldFileTypes["pdf"] = "pdf";
|
|
15
|
+
CLXFormFieldFileTypes["png"] = "png";
|
|
16
|
+
CLXFormFieldFileTypes["ppt"] = "ppt";
|
|
17
|
+
CLXFormFieldFileTypes["pptx"] = "pptx";
|
|
18
|
+
CLXFormFieldFileTypes["rtf"] = "rtf";
|
|
19
|
+
CLXFormFieldFileTypes["svg"] = "svg";
|
|
20
|
+
CLXFormFieldFileTypes["tif"] = "tif";
|
|
21
|
+
CLXFormFieldFileTypes["tiff"] = "tiff";
|
|
22
|
+
CLXFormFieldFileTypes["txt"] = "txt";
|
|
23
|
+
CLXFormFieldFileTypes["webm"] = "webm";
|
|
24
|
+
CLXFormFieldFileTypes["webp"] = "webp";
|
|
25
|
+
CLXFormFieldFileTypes["xls"] = "xls";
|
|
26
|
+
CLXFormFieldFileTypes["xlsx"] = "xlsx";
|
|
27
|
+
})(CLXFormFieldFileTypes || (exports.CLXFormFieldFileTypes = CLXFormFieldFileTypes = {}));
|