@clxmedia/types 1.0.38 → 1.0.40
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' | 'CONTACT' | 'CONTACT_ARRAY' | 'BOOLEAN' | 'FILE' | 'DATE' | 'SCHEDULE' | 'COMPOUND' | 'ANY';
|
|
24
|
-
export type CLXFormFieldType = 'text' | 'textarea' | 'boolean' | 'select' | 'multiselect' | 'file' | 'contact' | 'date' | 'schedule';
|
|
23
|
+
export type CLXFormResponseType = 'STRING' | 'NUMBER' | 'STRING_ARRAY' | 'CONTACT' | 'CONTACT_ARRAY' | 'BOOLEAN' | 'FILE' | 'DATE' | 'SCHEDULE' | 'COMPOUND' | 'MULTI_COMPOUND' | 'ANY';
|
|
24
|
+
export type CLXFormFieldType = 'text' | 'textarea' | 'boolean' | 'select' | 'multiselect' | 'file' | 'contact' | 'date' | 'schedule' | 'compound';
|
|
25
25
|
export type CLXFormSelectType = 'select' | 'radio' | 'checkbox' | 'freeform';
|
|
26
26
|
export type CLXFormConditionSubjectEntry = {
|
|
27
27
|
value: string;
|
|
@@ -90,10 +90,16 @@ export type CLXFormResponseStringArrayValue = CLXFormResponseValueBase & {
|
|
|
90
90
|
type: 'STRING_ARRAY';
|
|
91
91
|
value: string[];
|
|
92
92
|
};
|
|
93
|
-
export type
|
|
93
|
+
export type CLXFormResponseSingleCompoundValue = CLXFormResponseValueBase & {
|
|
94
94
|
type: 'COMPOUND';
|
|
95
95
|
value: {
|
|
96
|
-
[
|
|
96
|
+
[innerKey: string]: CLXFormResponseStringValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseBooleanValue;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
export type CLXFormResponseCompoundValue = CLXFormResponseValueBase & {
|
|
100
|
+
type: 'MULTI_COMPOUND';
|
|
101
|
+
value: {
|
|
102
|
+
[outerKey: string]: {
|
|
97
103
|
[innerKey: string]: CLXFormResponseStringValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseBooleanValue;
|
|
98
104
|
};
|
|
99
105
|
};
|
|
@@ -110,7 +116,7 @@ export type CLXFormResponseContactArrayValue = CLXFormResponseValueBase & {
|
|
|
110
116
|
type: 'CONTACT_ARRAY';
|
|
111
117
|
value: CLXContactCard[];
|
|
112
118
|
};
|
|
113
|
-
export type CLXFormResponseValue = CLXFormResponseStringValue | CLXFormResponseStringArrayValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseContactValue | CLXFormResponseContactArrayValue | CLXFormResponseCompoundValue | CLXFormResponseScheduleValue | CLXFormResponseFileValue | CLXFormResponseBooleanValue | CLXFormResponseAnyValue;
|
|
119
|
+
export type CLXFormResponseValue = CLXFormResponseStringValue | CLXFormResponseStringArrayValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseContactValue | CLXFormResponseContactArrayValue | CLXFormResponseCompoundValue | CLXFormResponseSingleCompoundValue | CLXFormResponseScheduleValue | CLXFormResponseFileValue | CLXFormResponseBooleanValue | CLXFormResponseAnyValue;
|
|
114
120
|
export type CLXFormResponses = {
|
|
115
121
|
[questionSlug: string]: CLXFormResponseValue;
|
|
116
122
|
};
|
|
@@ -231,13 +237,18 @@ export type CLXCompoundableFormField = (CLXTextFormField | CLXNumberFormField |
|
|
|
231
237
|
};
|
|
232
238
|
export type CLXCompoundFormField = CLXSelectableFormField & {
|
|
233
239
|
type: 'multiselect';
|
|
234
|
-
response_type: '
|
|
240
|
+
response_type: 'MULTI_COMPOUND';
|
|
235
241
|
options: CLXFormSelectOptions;
|
|
236
242
|
compound_fields: CLXCompoundableFormField[];
|
|
237
243
|
max_select?: number;
|
|
238
244
|
};
|
|
245
|
+
export type CLXSingleCompoundFormField = CLXFormField & {
|
|
246
|
+
type: 'compound';
|
|
247
|
+
response_type: 'COMPOUND';
|
|
248
|
+
compound_fields: CLXCompoundableFormField[];
|
|
249
|
+
};
|
|
239
250
|
export type CLXFormQuestionResponseOptions = {
|
|
240
|
-
field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXContactFormField | CLXMultipleContactFormField | CLXFileFormField | CLXCompoundFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
|
|
251
|
+
field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXContactFormField | CLXMultipleContactFormField | CLXSingleCompoundFormField | CLXFileFormField | CLXCompoundFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
|
|
241
252
|
has_parent?: boolean;
|
|
242
253
|
};
|
|
243
254
|
export type CLXFormQuestion = {
|
|
@@ -338,6 +349,7 @@ export type CLXFormStep = {
|
|
|
338
349
|
id: number;
|
|
339
350
|
name: string;
|
|
340
351
|
description: string;
|
|
352
|
+
is_gate: boolean;
|
|
341
353
|
sections: CLXFormSection[];
|
|
342
354
|
conditions?: CLXFormRuleSet;
|
|
343
355
|
};
|