@clxmedia/types 1.0.23 → 1.0.25
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' | 'FILE' | 'ANY';
|
|
24
|
-
export type CLXFormFieldType = 'text' | 'textarea' | 'boolean' | 'select' | 'multiselect' | 'file';
|
|
23
|
+
export type CLXFormResponseType = 'STRING' | 'NUMBER' | 'STRING_ARRAY' | 'BOOLEAN' | 'FILE' | 'DATE' | 'SCHEDULE' | 'ANY';
|
|
24
|
+
export type CLXFormFieldType = 'text' | 'textarea' | 'boolean' | 'select' | 'multiselect' | 'file' | 'date' | 'schedule';
|
|
25
25
|
export type CLXFormSelectType = 'select' | 'radio' | 'checkbox' | 'freeform';
|
|
26
26
|
export type CLXFormConditionSubjectEntry = {
|
|
27
27
|
value: string;
|
|
@@ -41,10 +41,30 @@ export type CLXFormsFilesDescriptor = {
|
|
|
41
41
|
export type CLXFormsFileDescriptors = {
|
|
42
42
|
[fileGuid: string]: CLXFormsFilesDescriptor;
|
|
43
43
|
};
|
|
44
|
+
export type CLXFormTimeRange = boolean | {
|
|
45
|
+
start: number;
|
|
46
|
+
end: number;
|
|
47
|
+
};
|
|
44
48
|
export type CLXFormResponseStringValue = CLXFormResponseValueBase & {
|
|
45
49
|
type: 'STRING';
|
|
46
50
|
value: string;
|
|
47
51
|
};
|
|
52
|
+
export type CLXFormResponseDateValue = CLXFormResponseValueBase & {
|
|
53
|
+
type: 'DATE';
|
|
54
|
+
value: string;
|
|
55
|
+
};
|
|
56
|
+
export type CLXFormResponseScheduleValue = CLXFormResponseValueBase & {
|
|
57
|
+
type: 'SCHEDULE';
|
|
58
|
+
value: {
|
|
59
|
+
sunday: CLXFormTimeRange;
|
|
60
|
+
monday: CLXFormTimeRange;
|
|
61
|
+
tuesday: CLXFormTimeRange;
|
|
62
|
+
wednesday: CLXFormTimeRange;
|
|
63
|
+
thursday: CLXFormTimeRange;
|
|
64
|
+
friday: CLXFormTimeRange;
|
|
65
|
+
saturday: CLXFormTimeRange;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
48
68
|
export type CLXFormResponseNumberValue = CLXFormResponseValueBase & {
|
|
49
69
|
type: 'NUMBER';
|
|
50
70
|
value: number;
|
|
@@ -65,7 +85,7 @@ export type CLXFormResponseAnyValue = CLXFormResponseValueBase & {
|
|
|
65
85
|
type: 'ANY';
|
|
66
86
|
value: any;
|
|
67
87
|
};
|
|
68
|
-
export type CLXFormResponseValue = CLXFormResponseStringValue | CLXFormResponseStringArrayValue | CLXFormResponseNumberValue | CLXFormResponseFileValue | CLXFormResponseBooleanValue | CLXFormResponseAnyValue;
|
|
88
|
+
export type CLXFormResponseValue = CLXFormResponseStringValue | CLXFormResponseStringArrayValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseScheduleValue | CLXFormResponseFileValue | CLXFormResponseBooleanValue | CLXFormResponseAnyValue;
|
|
69
89
|
export type CLXFormResponses = {
|
|
70
90
|
[questionSlug: string]: CLXFormResponseValue;
|
|
71
91
|
};
|
|
@@ -84,6 +104,7 @@ export declare enum CLXFormFieldFileTypes {
|
|
|
84
104
|
'doc' = "doc",
|
|
85
105
|
'docx' = "docx",
|
|
86
106
|
'gif' = "gif",
|
|
107
|
+
'jpeg' = "jpeg",
|
|
87
108
|
'jpg' = "jpg",
|
|
88
109
|
'json' = "json",
|
|
89
110
|
'mp4' = "mp4",
|
|
@@ -94,11 +115,13 @@ export declare enum CLXFormFieldFileTypes {
|
|
|
94
115
|
'rtf' = "rtf",
|
|
95
116
|
'svg' = "svg",
|
|
96
117
|
'tif' = "tif",
|
|
118
|
+
'tiff' = "tiff",
|
|
97
119
|
'txt' = "txt",
|
|
98
120
|
'webm' = "webm",
|
|
99
121
|
'webp' = "webp",
|
|
100
122
|
'xls' = "xls",
|
|
101
123
|
'xlsx' = "xlsx",
|
|
124
|
+
'xml' = "xml",
|
|
102
125
|
'zip' = "zip"
|
|
103
126
|
}
|
|
104
127
|
export type CLXFileFormField = CLXFormField & {
|
|
@@ -107,6 +130,15 @@ export type CLXFileFormField = CLXFormField & {
|
|
|
107
130
|
max_files?: number;
|
|
108
131
|
allowed_file_types?: CLXFormFieldFileTypes[];
|
|
109
132
|
};
|
|
133
|
+
export type CLXDateFormField = CLXFormField & {
|
|
134
|
+
type: 'date';
|
|
135
|
+
response_type: 'DATE';
|
|
136
|
+
include_time: boolean;
|
|
137
|
+
};
|
|
138
|
+
export type CLXScheduleFormField = CLXFormField & {
|
|
139
|
+
type: 'schedule';
|
|
140
|
+
response_type: 'SCHEDULE';
|
|
141
|
+
};
|
|
110
142
|
export type CLXTextFormFieldBase = CLXPlainFormFieldBase & {
|
|
111
143
|
type: 'text';
|
|
112
144
|
mask: 'phone' | 'email' | 'name' | 'url' | 'none';
|
|
@@ -153,7 +185,7 @@ export type CLXMultiSelectFormField = CLXSelectableFormField & {
|
|
|
153
185
|
max_select?: number;
|
|
154
186
|
};
|
|
155
187
|
export type CLXFormQuestionResponseOptions = {
|
|
156
|
-
field: CLXTextFormField | CLXNumberFormField | CLXFileFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
|
|
188
|
+
field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXFileFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
|
|
157
189
|
has_parent?: boolean;
|
|
158
190
|
};
|
|
159
191
|
export type CLXFormQuestion = {
|
|
@@ -185,16 +217,16 @@ export type CLXFormRuleStringEqualsInstance = CLXFormRuleInstanceBase & {
|
|
|
185
217
|
predicate: CLXFormResponseStringValue;
|
|
186
218
|
comparisonType: 'stringEquals';
|
|
187
219
|
};
|
|
188
|
-
export type CLXFormRuleFileExistsInstance = CLXFormRuleInstanceBase & {
|
|
189
|
-
subject: CLXFormResponseFileValue;
|
|
190
|
-
predicate: CLXFormResponseBooleanValue;
|
|
191
|
-
comparisonType: 'fileExists';
|
|
192
|
-
};
|
|
193
220
|
export type CLXFormRuleStringInListInstance = CLXFormRuleInstanceBase & {
|
|
194
221
|
subject: CLXFormResponseStringValue;
|
|
195
222
|
predicate: CLXFormResponseStringArrayValue;
|
|
196
223
|
comparisonType: 'stringInList';
|
|
197
224
|
};
|
|
225
|
+
export type CLXFormRuleFileExistsInstance = CLXFormRuleInstanceBase & {
|
|
226
|
+
subject: CLXFormResponseFileValue;
|
|
227
|
+
predicate: CLXFormResponseBooleanValue;
|
|
228
|
+
comparisonType: 'fileExists';
|
|
229
|
+
};
|
|
198
230
|
export type CLXFormRuleStringListContainsInstance = CLXFormRuleInstanceBase & {
|
|
199
231
|
subject: CLXFormResponseStringArrayValue;
|
|
200
232
|
predicate: CLXFormResponseStringValue;
|
|
@@ -8,6 +8,7 @@ var CLXFormFieldFileTypes;
|
|
|
8
8
|
CLXFormFieldFileTypes["doc"] = "doc";
|
|
9
9
|
CLXFormFieldFileTypes["docx"] = "docx";
|
|
10
10
|
CLXFormFieldFileTypes["gif"] = "gif";
|
|
11
|
+
CLXFormFieldFileTypes["jpeg"] = "jpeg";
|
|
11
12
|
CLXFormFieldFileTypes["jpg"] = "jpg";
|
|
12
13
|
CLXFormFieldFileTypes["json"] = "json";
|
|
13
14
|
CLXFormFieldFileTypes["mp4"] = "mp4";
|
|
@@ -18,10 +19,12 @@ var CLXFormFieldFileTypes;
|
|
|
18
19
|
CLXFormFieldFileTypes["rtf"] = "rtf";
|
|
19
20
|
CLXFormFieldFileTypes["svg"] = "svg";
|
|
20
21
|
CLXFormFieldFileTypes["tif"] = "tif";
|
|
22
|
+
CLXFormFieldFileTypes["tiff"] = "tiff";
|
|
21
23
|
CLXFormFieldFileTypes["txt"] = "txt";
|
|
22
24
|
CLXFormFieldFileTypes["webm"] = "webm";
|
|
23
25
|
CLXFormFieldFileTypes["webp"] = "webp";
|
|
24
26
|
CLXFormFieldFileTypes["xls"] = "xls";
|
|
25
27
|
CLXFormFieldFileTypes["xlsx"] = "xlsx";
|
|
28
|
+
CLXFormFieldFileTypes["xml"] = "xml";
|
|
26
29
|
CLXFormFieldFileTypes["zip"] = "zip";
|
|
27
30
|
})(CLXFormFieldFileTypes || (exports.CLXFormFieldFileTypes = CLXFormFieldFileTypes = {}));
|