@clxmedia/types 1.0.171 → 1.0.173

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.
@@ -4,7 +4,7 @@ export type CLXFormSelectOption = {
4
4
  label: string;
5
5
  };
6
6
  export type CLXFormSelectOptions = CLXFormSelectOption[];
7
- export type CLXFormMode = 'edit' | 'preview' | 'live';
7
+ export type CLXFormMode = "edit" | "preview" | "live";
8
8
  export type CLXFormErrorMsg = string | null;
9
9
  export type CLXFormFormattingResponse = {
10
10
  errorMsg: CLXFormErrorMsg[];
@@ -20,9 +20,9 @@ export type CLXFormState = {
20
20
  mode: CLXFormMode;
21
21
  locked: boolean;
22
22
  };
23
- export type CLXFormSubmitAction = 'lock' | 'reset' | 'snapshot' | 'notify';
24
- export type CLXFormAllowable = 'share' | 'reset';
25
- export type CLXFormSectionFormat = 'tabs' | 'accordion';
23
+ export type CLXFormSubmitAction = "lock" | "reset" | "snapshot" | "notify";
24
+ export type CLXFormAllowable = "share" | "reset";
25
+ export type CLXFormSectionFormat = "tabs" | "accordion";
26
26
  export type CLXFormSettingsDisplay = {
27
27
  sectionFormat: CLXFormSectionFormat;
28
28
  hideNavButtons?: boolean;
@@ -48,9 +48,9 @@ export type CLXForm = {
48
48
  description?: string;
49
49
  settings?: CLXFormSettings;
50
50
  };
51
- export type CLXFormResponseType = 'STRING' | 'NUMBER' | 'STRING_ARRAY' | 'CONTACT' | 'CONTACT_ARRAY' | 'BOOLEAN' | 'FILE' | 'DATE' | 'SCHEDULE' | 'COMPOUND' | 'MULTI_COMPOUND' | 'ANY';
52
- export type CLXFormFieldType = 'text' | 'textarea' | 'boolean' | 'select' | 'multiselect' | 'file' | 'contact' | 'date' | 'schedule' | 'compound';
53
- export type CLXFormSelectType = 'select' | 'radio' | 'checkbox' | 'freeform';
51
+ export type CLXFormResponseType = "STRING" | "NUMBER" | "STRING_ARRAY" | "CONTACT" | "CONTACT_ARRAY" | "BOOLEAN" | "FILE" | "DATE" | "SCHEDULE" | "COMPOUND" | "MULTI_COMPOUND" | "ANY";
52
+ export type CLXFormFieldType = "text" | "textarea" | "credential" | "boolean" | "select" | "multiselect" | "file" | "contact" | "date" | "schedule" | "compound";
53
+ export type CLXFormSelectType = "select" | "radio" | "checkbox" | "freeform";
54
54
  export type CLXFormConditionSubjectEntry = {
55
55
  value: string;
56
56
  label: string;
@@ -85,15 +85,15 @@ export type CLXContactCard = {
85
85
  phone: string | null;
86
86
  };
87
87
  export type CLXFormResponseStringValue = CLXFormResponseValueBase & {
88
- type: 'STRING';
88
+ type: "STRING";
89
89
  value: string;
90
90
  };
91
91
  export type CLXFormResponseDateValue = CLXFormResponseValueBase & {
92
- type: 'DATE';
92
+ type: "DATE";
93
93
  value: CLXFormDateTime;
94
94
  };
95
95
  export type CLXFormResponseScheduleValue = CLXFormResponseValueBase & {
96
- type: 'SCHEDULE';
96
+ type: "SCHEDULE";
97
97
  value: {
98
98
  sunday: CLXFormTimeRange;
99
99
  monday: CLXFormTimeRange;
@@ -105,29 +105,29 @@ export type CLXFormResponseScheduleValue = CLXFormResponseValueBase & {
105
105
  };
106
106
  };
107
107
  export type CLXFormResponseNumberValue = CLXFormResponseValueBase & {
108
- type: 'NUMBER';
108
+ type: "NUMBER";
109
109
  value: number;
110
110
  };
111
111
  export type CLXFormResponseFileValue = CLXFormResponseValueBase & {
112
- type: 'FILE';
112
+ type: "FILE";
113
113
  value: CLXFormsFileDescriptors;
114
114
  };
115
115
  export type CLXFormResponseBooleanValue = CLXFormResponseValueBase & {
116
- type: 'BOOLEAN';
116
+ type: "BOOLEAN";
117
117
  value: boolean;
118
118
  };
119
119
  export type CLXFormResponseStringArrayValue = CLXFormResponseValueBase & {
120
- type: 'STRING_ARRAY';
120
+ type: "STRING_ARRAY";
121
121
  value: string[];
122
122
  };
123
123
  export type CLXFormResponseSingleCompoundValue = CLXFormResponseValueBase & {
124
- type: 'COMPOUND';
124
+ type: "COMPOUND";
125
125
  value: {
126
126
  [innerKey: string]: CLXFormResponseStringValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseBooleanValue;
127
127
  };
128
128
  };
129
129
  export type CLXFormResponseCompoundValue = CLXFormResponseValueBase & {
130
- type: 'MULTI_COMPOUND';
130
+ type: "MULTI_COMPOUND";
131
131
  value: {
132
132
  [outerKey: string]: {
133
133
  [innerKey: string]: CLXFormResponseStringValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseBooleanValue;
@@ -135,15 +135,15 @@ export type CLXFormResponseCompoundValue = CLXFormResponseValueBase & {
135
135
  };
136
136
  };
137
137
  export type CLXFormResponseAnyValue = CLXFormResponseValueBase & {
138
- type: 'ANY';
138
+ type: "ANY";
139
139
  value: any;
140
140
  };
141
141
  export type CLXFormResponseContactValue = CLXFormResponseValueBase & {
142
- type: 'CONTACT';
142
+ type: "CONTACT";
143
143
  value: CLXContactCard;
144
144
  };
145
145
  export type CLXFormResponseContactArrayValue = CLXFormResponseValueBase & {
146
- type: 'CONTACT_ARRAY';
146
+ type: "CONTACT_ARRAY";
147
147
  value: CLXContactCard[];
148
148
  };
149
149
  export type CLXFormResponseValue = CLXFormResponseStringValue | CLXFormResponseStringArrayValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseContactValue | CLXFormResponseContactArrayValue | CLXFormResponseCompoundValue | CLXFormResponseSingleCompoundValue | CLXFormResponseScheduleValue | CLXFormResponseFileValue | CLXFormResponseBooleanValue | CLXFormResponseAnyValue;
@@ -154,109 +154,114 @@ export type CLXFormField = {
154
154
  type: CLXFormFieldType;
155
155
  response_type: CLXFormResponseType;
156
156
  };
157
- export type CLXFieldMasks = 'phone' | 'email' | 'name' | 'number' | 'none' | 'url';
157
+ export type CLXFieldMasks = "phone" | "email" | "name" | "number" | "none" | "url";
158
158
  export type CLXPlainFormFieldBase = CLXFormField & {
159
- type: 'text';
159
+ type: "text";
160
160
  mask: CLXFieldMasks;
161
161
  };
162
162
  export declare enum CLXFormFieldFileTypes {
163
- 'bmp' = "bmp",
164
- 'csv' = "csv",
165
- 'doc' = "doc",
166
- 'docx' = "docx",
167
- 'gif' = "gif",
168
- 'jpeg' = "jpeg",
169
- 'jpg' = "jpg",
170
- 'json' = "json",
171
- 'mp4' = "mp4",
172
- 'pdf' = "pdf",
173
- 'png' = "png",
174
- 'ppt' = "ppt",
175
- 'pptx' = "pptx",
176
- 'rtf' = "rtf",
177
- 'svg' = "svg",
178
- 'tif' = "tif",
179
- 'tiff' = "tiff",
180
- 'txt' = "txt",
181
- 'webm' = "webm",
182
- 'webp' = "webp",
183
- 'xls' = "xls",
184
- 'xlsx' = "xlsx",
185
- 'xml' = "xml",
186
- 'zip' = "zip"
163
+ "bmp" = "bmp",
164
+ "csv" = "csv",
165
+ "doc" = "doc",
166
+ "docx" = "docx",
167
+ "gif" = "gif",
168
+ "jpeg" = "jpeg",
169
+ "jpg" = "jpg",
170
+ "json" = "json",
171
+ "mp4" = "mp4",
172
+ "pdf" = "pdf",
173
+ "png" = "png",
174
+ "ppt" = "ppt",
175
+ "pptx" = "pptx",
176
+ "rtf" = "rtf",
177
+ "svg" = "svg",
178
+ "tif" = "tif",
179
+ "tiff" = "tiff",
180
+ "txt" = "txt",
181
+ "webm" = "webm",
182
+ "webp" = "webp",
183
+ "xls" = "xls",
184
+ "xlsx" = "xlsx",
185
+ "xml" = "xml",
186
+ "zip" = "zip"
187
187
  }
188
188
  export type CLXFileFormField = CLXFormField & {
189
- type: 'file';
190
- response_type: 'FILE';
189
+ type: "file";
190
+ response_type: "FILE";
191
191
  max_files?: number;
192
192
  allowed_file_types?: CLXFormFieldFileTypes[];
193
193
  };
194
+ export type CLXCredentialFormField = CLXFormField & {
195
+ type: "credential";
196
+ response_type: "STRING";
197
+ };
194
198
  export type CLXContactFormFieldBase = CLXFormField & {
195
- type: 'contact';
196
- response_type: 'CONTACT' | 'CONTACT_ARRAY';
199
+ type: "contact";
200
+ response_type: "CONTACT" | "CONTACT_ARRAY";
197
201
  email_required?: boolean;
198
202
  phone_required?: boolean;
199
203
  allow_multiple: boolean;
200
204
  };
201
205
  export type CLXContactFormField = CLXContactFormFieldBase & {
202
- response_type: 'CONTACT';
206
+ response_type: "CONTACT";
203
207
  allow_multiple: false;
204
208
  };
205
209
  export type CLXMultipleContactFormField = CLXContactFormFieldBase & {
206
- response_type: 'CONTACT_ARRAY';
210
+ response_type: "CONTACT_ARRAY";
207
211
  allow_multiple: true;
208
212
  };
209
213
  export type CLXDateFormField = CLXFormField & {
210
- type: 'date';
211
- response_type: 'DATE';
214
+ type: "date";
215
+ response_type: "DATE";
212
216
  include_time: boolean;
213
217
  };
214
218
  export type CLXScheduleFormField = CLXFormField & {
215
- type: 'schedule';
216
- response_type: 'SCHEDULE';
219
+ type: "schedule";
220
+ response_type: "SCHEDULE";
217
221
  };
218
222
  export type CLXTextFormFieldBase = CLXPlainFormFieldBase & {
219
- type: 'text';
220
- mask: 'phone' | 'email' | 'name' | 'url' | 'none';
221
- response_type: 'STRING' | 'STRING_ARRAY';
223
+ type: "text";
224
+ mask: "phone" | "email" | "name" | "url" | "none";
225
+ response_type: "STRING" | "STRING_ARRAY";
222
226
  multiple: boolean;
227
+ character_limit?: number;
223
228
  };
224
229
  export type CLXTextFormField = CLXTextFormFieldBase & {
225
- response_type: 'STRING';
230
+ response_type: "STRING";
226
231
  multiple: false;
227
232
  };
228
233
  export type CLXMultipleTextFormField = CLXTextFormFieldBase & {
229
- response_type: 'STRING_ARRAY';
234
+ response_type: "STRING_ARRAY";
230
235
  multiple: true;
231
236
  };
232
237
  export type CLXNumberFormField = CLXPlainFormFieldBase & {
233
- type: 'text';
234
- mask: 'number';
235
- response_type: 'NUMBER';
238
+ type: "text";
239
+ mask: "number";
240
+ response_type: "NUMBER";
236
241
  rounding?: number;
237
242
  };
238
243
  export type CLXTextAreaFormField = CLXFormField & {
239
- type: 'textarea';
240
- response_type: 'STRING';
244
+ type: "textarea";
245
+ response_type: "STRING";
241
246
  };
242
247
  export type CLXSelectableFormField = CLXFormField & {
243
248
  select_type: CLXFormSelectType;
244
249
  };
245
250
  export type CLXBooleanFormField = CLXSelectableFormField & {
246
- type: 'boolean';
247
- select_type: 'select' | 'radio';
248
- response_type: 'BOOLEAN';
251
+ type: "boolean";
252
+ select_type: "select" | "radio";
253
+ response_type: "BOOLEAN";
249
254
  };
250
255
  export type CLXSelectFormField = CLXSelectableFormField & {
251
- type: 'select';
252
- response_type: 'STRING';
253
- select_type: 'select' | 'radio';
256
+ type: "select";
257
+ response_type: "STRING";
258
+ select_type: "select" | "radio";
254
259
  options: CLXFormSelectOptions;
255
260
  };
256
261
  export type CLXMultiSelectFormField = CLXSelectableFormField & {
257
- type: 'multiselect';
258
- response_type: 'STRING_ARRAY';
259
- select_type: 'checkbox' | 'freeform';
262
+ type: "multiselect";
263
+ response_type: "STRING_ARRAY";
264
+ select_type: "checkbox" | "freeform";
260
265
  options: CLXFormSelectOptions;
261
266
  max_select?: number;
262
267
  };
@@ -266,19 +271,19 @@ export type CLXCompoundableFormField = (CLXTextFormField | CLXNumberFormField |
266
271
  is_required?: boolean;
267
272
  };
268
273
  export type CLXCompoundFormField = CLXSelectableFormField & {
269
- type: 'multiselect';
270
- response_type: 'MULTI_COMPOUND';
274
+ type: "multiselect";
275
+ response_type: "MULTI_COMPOUND";
271
276
  options: CLXFormSelectOptions;
272
277
  compound_fields: CLXCompoundableFormField[];
273
278
  max_select?: number;
274
279
  };
275
280
  export type CLXSingleCompoundFormField = CLXFormField & {
276
- type: 'compound';
277
- response_type: 'COMPOUND';
281
+ type: "compound";
282
+ response_type: "COMPOUND";
278
283
  compound_fields: CLXCompoundableFormField[];
279
284
  };
280
285
  export type CLXFormQuestionResponseOptions = {
281
- field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXContactFormField | CLXMultipleContactFormField | CLXSingleCompoundFormField | CLXFileFormField | CLXCompoundFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
286
+ field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXCredentialFormField | CLXContactFormField | CLXMultipleContactFormField | CLXSingleCompoundFormField | CLXFileFormField | CLXCompoundFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
282
287
  has_parent?: boolean;
283
288
  allow_reset?: boolean;
284
289
  tags?: string[];
@@ -300,7 +305,7 @@ export type CLXFormPortableResponse = {
300
305
  export type CLXFormPortableResponses = {
301
306
  [questionSlug: string]: CLXFormPortableResponse;
302
307
  };
303
- export type CLXRuleComparison = 'stringEquals' | 'stringExists' | 'stringContains' | 'stringStartsWith' | 'stringEndsWith' | 'stringInList' | 'stringNotInList' | 'stringListContainsAll' | 'stringListContainsAny' | 'stringListContainsNone' | 'stringListEntryEquals' | 'stringListEntryContains' | 'stringListEntryStartsWith' | 'stringListEntryEndsWith' | 'dateEquals' | 'dateBefore' | 'dateAfter' | 'booleanEquals' | 'fileExists' | 'numberEquals' | 'numberGreaterThan' | 'numberLessThan';
308
+ export type CLXRuleComparison = "stringEquals" | "stringExists" | "stringContains" | "stringStartsWith" | "stringEndsWith" | "stringInList" | "stringNotInList" | "stringListContainsAll" | "stringListContainsAny" | "stringListContainsNone" | "stringListEntryEquals" | "stringListEntryContains" | "stringListEntryStartsWith" | "stringListEntryEndsWith" | "dateEquals" | "dateBefore" | "dateAfter" | "booleanEquals" | "fileExists" | "numberEquals" | "numberGreaterThan" | "numberLessThan";
304
309
  export type CLXFormRuleDefinition = {
305
310
  subject: string;
306
311
  target: CLXFormResponseValue;
@@ -314,52 +319,52 @@ export type CLXFormRuleInstanceBase = {
314
319
  export type CLXFormRuleStringComparisonInstance = CLXFormRuleInstanceBase & {
315
320
  subject: CLXFormResponseStringValue;
316
321
  target: CLXFormResponseStringValue;
317
- comparisonType: 'stringEquals' | 'stringContains' | 'stringStartsWith' | 'stringEndsWith';
322
+ comparisonType: "stringEquals" | "stringContains" | "stringStartsWith" | "stringEndsWith";
318
323
  };
319
324
  export type CLXFormRuleStringExistsComparisonInstance = CLXFormRuleInstanceBase & {
320
325
  subject: CLXFormResponseStringValue;
321
326
  target: CLXFormResponseBooleanValue;
322
- comparisonType: 'stringExists';
327
+ comparisonType: "stringExists";
323
328
  };
324
329
  export type CLXFormRuleStringListToStringListInstance = CLXFormRuleInstanceBase & {
325
330
  subject: CLXFormResponseStringArrayValue;
326
331
  target: CLXFormResponseStringArrayValue;
327
- comparisonType: 'stringListContainsAll' | 'stringListContainsAny' | 'stringListContainsNone';
332
+ comparisonType: "stringListContainsAll" | "stringListContainsAny" | "stringListContainsNone";
328
333
  };
329
334
  export type CLXFormRuleStringInListInstance = CLXFormRuleInstanceBase & {
330
335
  subject: CLXFormResponseStringValue;
331
336
  target: CLXFormResponseStringArrayValue;
332
- comparisonType: 'stringInList' | 'stringNotInList';
337
+ comparisonType: "stringInList" | "stringNotInList";
333
338
  };
334
339
  export type CLXFormRuleFileExistsInstance = CLXFormRuleInstanceBase & {
335
340
  subject: CLXFormResponseFileValue;
336
341
  target: CLXFormResponseBooleanValue;
337
- comparisonType: 'fileExists';
342
+ comparisonType: "fileExists";
338
343
  };
339
344
  export type CLXFormRuleDateComparisonInstance = CLXFormRuleInstanceBase & {
340
345
  subject: CLXFormResponseDateValue;
341
346
  target: CLXFormResponseDateValue;
342
- comparisonType: 'dateEquals' | 'dateBefore' | 'dateAfter';
347
+ comparisonType: "dateEquals" | "dateBefore" | "dateAfter";
343
348
  };
344
349
  export type CLXFormRuleStringListComparisonInstance = CLXFormRuleInstanceBase & {
345
350
  subject: CLXFormResponseStringArrayValue;
346
351
  target: CLXFormResponseStringValue;
347
- comparisonType: 'stringListEntryEquals' | 'stringListEntryContains' | 'stringListEntryStartsWith' | 'stringListEntryEndsWith';
352
+ comparisonType: "stringListEntryEquals" | "stringListEntryContains" | "stringListEntryStartsWith" | "stringListEntryEndsWith";
348
353
  };
349
354
  export type CLXFormRuleBooleanEqualsInstance = CLXFormRuleInstanceBase & {
350
355
  subject: CLXFormResponseBooleanValue;
351
356
  target: CLXFormResponseBooleanValue;
352
- comparisonType: 'booleanEquals';
357
+ comparisonType: "booleanEquals";
353
358
  };
354
359
  export type CLXFormRuleNumberComparisonInstance = CLXFormRuleInstanceBase & {
355
360
  subject: CLXFormResponseNumberValue;
356
361
  target: CLXFormResponseNumberValue;
357
- comparisonType: 'numberEquals' | 'numberGreaterThan' | 'numberLessThan';
362
+ comparisonType: "numberEquals" | "numberGreaterThan" | "numberLessThan";
358
363
  };
359
364
  export type CLXFormRuleInstance = CLXFormRuleStringComparisonInstance | CLXFormRuleStringExistsComparisonInstance | CLXFormRuleStringInListInstance | CLXFormRuleFileExistsInstance | CLXFormRuleDateComparisonInstance | CLXFormRuleStringListToStringListInstance | CLXFormRuleStringListComparisonInstance | CLXFormRuleBooleanEqualsInstance | CLXFormRuleNumberComparisonInstance;
360
365
  export type CLXFormRuleSet = {
361
366
  rules: (CLXFormRuleDefinition | CLXFormRuleSet)[];
362
- combinator?: 'and' | 'or';
367
+ combinator?: "and" | "or";
363
368
  };
364
369
  export type CLXConditionalOverride = {
365
370
  ruleset: CLXFormRuleSet;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/types",
3
- "version": "1.0.171",
3
+ "version": "1.0.173",
4
4
  "description": "Conversion Logix TypeScript type definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",