@clxmedia/types 1.0.172 → 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' | 'credential' | '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,113 +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
194
  export type CLXCredentialFormField = CLXFormField & {
195
- type: 'credential';
196
- response_type: 'STRING';
195
+ type: "credential";
196
+ response_type: "STRING";
197
197
  };
198
198
  export type CLXContactFormFieldBase = CLXFormField & {
199
- type: 'contact';
200
- response_type: 'CONTACT' | 'CONTACT_ARRAY';
199
+ type: "contact";
200
+ response_type: "CONTACT" | "CONTACT_ARRAY";
201
201
  email_required?: boolean;
202
202
  phone_required?: boolean;
203
203
  allow_multiple: boolean;
204
204
  };
205
205
  export type CLXContactFormField = CLXContactFormFieldBase & {
206
- response_type: 'CONTACT';
206
+ response_type: "CONTACT";
207
207
  allow_multiple: false;
208
208
  };
209
209
  export type CLXMultipleContactFormField = CLXContactFormFieldBase & {
210
- response_type: 'CONTACT_ARRAY';
210
+ response_type: "CONTACT_ARRAY";
211
211
  allow_multiple: true;
212
212
  };
213
213
  export type CLXDateFormField = CLXFormField & {
214
- type: 'date';
215
- response_type: 'DATE';
214
+ type: "date";
215
+ response_type: "DATE";
216
216
  include_time: boolean;
217
217
  };
218
218
  export type CLXScheduleFormField = CLXFormField & {
219
- type: 'schedule';
220
- response_type: 'SCHEDULE';
219
+ type: "schedule";
220
+ response_type: "SCHEDULE";
221
221
  };
222
222
  export type CLXTextFormFieldBase = CLXPlainFormFieldBase & {
223
- type: 'text';
224
- mask: 'phone' | 'email' | 'name' | 'url' | 'none';
225
- response_type: 'STRING' | 'STRING_ARRAY';
223
+ type: "text";
224
+ mask: "phone" | "email" | "name" | "url" | "none";
225
+ response_type: "STRING" | "STRING_ARRAY";
226
226
  multiple: boolean;
227
+ character_limit?: number;
227
228
  };
228
229
  export type CLXTextFormField = CLXTextFormFieldBase & {
229
- response_type: 'STRING';
230
+ response_type: "STRING";
230
231
  multiple: false;
231
232
  };
232
233
  export type CLXMultipleTextFormField = CLXTextFormFieldBase & {
233
- response_type: 'STRING_ARRAY';
234
+ response_type: "STRING_ARRAY";
234
235
  multiple: true;
235
236
  };
236
237
  export type CLXNumberFormField = CLXPlainFormFieldBase & {
237
- type: 'text';
238
- mask: 'number';
239
- response_type: 'NUMBER';
238
+ type: "text";
239
+ mask: "number";
240
+ response_type: "NUMBER";
240
241
  rounding?: number;
241
242
  };
242
243
  export type CLXTextAreaFormField = CLXFormField & {
243
- type: 'textarea';
244
- response_type: 'STRING';
244
+ type: "textarea";
245
+ response_type: "STRING";
245
246
  };
246
247
  export type CLXSelectableFormField = CLXFormField & {
247
248
  select_type: CLXFormSelectType;
248
249
  };
249
250
  export type CLXBooleanFormField = CLXSelectableFormField & {
250
- type: 'boolean';
251
- select_type: 'select' | 'radio';
252
- response_type: 'BOOLEAN';
251
+ type: "boolean";
252
+ select_type: "select" | "radio";
253
+ response_type: "BOOLEAN";
253
254
  };
254
255
  export type CLXSelectFormField = CLXSelectableFormField & {
255
- type: 'select';
256
- response_type: 'STRING';
257
- select_type: 'select' | 'radio';
256
+ type: "select";
257
+ response_type: "STRING";
258
+ select_type: "select" | "radio";
258
259
  options: CLXFormSelectOptions;
259
260
  };
260
261
  export type CLXMultiSelectFormField = CLXSelectableFormField & {
261
- type: 'multiselect';
262
- response_type: 'STRING_ARRAY';
263
- select_type: 'checkbox' | 'freeform';
262
+ type: "multiselect";
263
+ response_type: "STRING_ARRAY";
264
+ select_type: "checkbox" | "freeform";
264
265
  options: CLXFormSelectOptions;
265
266
  max_select?: number;
266
267
  };
@@ -270,15 +271,15 @@ export type CLXCompoundableFormField = (CLXTextFormField | CLXNumberFormField |
270
271
  is_required?: boolean;
271
272
  };
272
273
  export type CLXCompoundFormField = CLXSelectableFormField & {
273
- type: 'multiselect';
274
- response_type: 'MULTI_COMPOUND';
274
+ type: "multiselect";
275
+ response_type: "MULTI_COMPOUND";
275
276
  options: CLXFormSelectOptions;
276
277
  compound_fields: CLXCompoundableFormField[];
277
278
  max_select?: number;
278
279
  };
279
280
  export type CLXSingleCompoundFormField = CLXFormField & {
280
- type: 'compound';
281
- response_type: 'COMPOUND';
281
+ type: "compound";
282
+ response_type: "COMPOUND";
282
283
  compound_fields: CLXCompoundableFormField[];
283
284
  };
284
285
  export type CLXFormQuestionResponseOptions = {
@@ -304,7 +305,7 @@ export type CLXFormPortableResponse = {
304
305
  export type CLXFormPortableResponses = {
305
306
  [questionSlug: string]: CLXFormPortableResponse;
306
307
  };
307
- 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";
308
309
  export type CLXFormRuleDefinition = {
309
310
  subject: string;
310
311
  target: CLXFormResponseValue;
@@ -318,52 +319,52 @@ export type CLXFormRuleInstanceBase = {
318
319
  export type CLXFormRuleStringComparisonInstance = CLXFormRuleInstanceBase & {
319
320
  subject: CLXFormResponseStringValue;
320
321
  target: CLXFormResponseStringValue;
321
- comparisonType: 'stringEquals' | 'stringContains' | 'stringStartsWith' | 'stringEndsWith';
322
+ comparisonType: "stringEquals" | "stringContains" | "stringStartsWith" | "stringEndsWith";
322
323
  };
323
324
  export type CLXFormRuleStringExistsComparisonInstance = CLXFormRuleInstanceBase & {
324
325
  subject: CLXFormResponseStringValue;
325
326
  target: CLXFormResponseBooleanValue;
326
- comparisonType: 'stringExists';
327
+ comparisonType: "stringExists";
327
328
  };
328
329
  export type CLXFormRuleStringListToStringListInstance = CLXFormRuleInstanceBase & {
329
330
  subject: CLXFormResponseStringArrayValue;
330
331
  target: CLXFormResponseStringArrayValue;
331
- comparisonType: 'stringListContainsAll' | 'stringListContainsAny' | 'stringListContainsNone';
332
+ comparisonType: "stringListContainsAll" | "stringListContainsAny" | "stringListContainsNone";
332
333
  };
333
334
  export type CLXFormRuleStringInListInstance = CLXFormRuleInstanceBase & {
334
335
  subject: CLXFormResponseStringValue;
335
336
  target: CLXFormResponseStringArrayValue;
336
- comparisonType: 'stringInList' | 'stringNotInList';
337
+ comparisonType: "stringInList" | "stringNotInList";
337
338
  };
338
339
  export type CLXFormRuleFileExistsInstance = CLXFormRuleInstanceBase & {
339
340
  subject: CLXFormResponseFileValue;
340
341
  target: CLXFormResponseBooleanValue;
341
- comparisonType: 'fileExists';
342
+ comparisonType: "fileExists";
342
343
  };
343
344
  export type CLXFormRuleDateComparisonInstance = CLXFormRuleInstanceBase & {
344
345
  subject: CLXFormResponseDateValue;
345
346
  target: CLXFormResponseDateValue;
346
- comparisonType: 'dateEquals' | 'dateBefore' | 'dateAfter';
347
+ comparisonType: "dateEquals" | "dateBefore" | "dateAfter";
347
348
  };
348
349
  export type CLXFormRuleStringListComparisonInstance = CLXFormRuleInstanceBase & {
349
350
  subject: CLXFormResponseStringArrayValue;
350
351
  target: CLXFormResponseStringValue;
351
- comparisonType: 'stringListEntryEquals' | 'stringListEntryContains' | 'stringListEntryStartsWith' | 'stringListEntryEndsWith';
352
+ comparisonType: "stringListEntryEquals" | "stringListEntryContains" | "stringListEntryStartsWith" | "stringListEntryEndsWith";
352
353
  };
353
354
  export type CLXFormRuleBooleanEqualsInstance = CLXFormRuleInstanceBase & {
354
355
  subject: CLXFormResponseBooleanValue;
355
356
  target: CLXFormResponseBooleanValue;
356
- comparisonType: 'booleanEquals';
357
+ comparisonType: "booleanEquals";
357
358
  };
358
359
  export type CLXFormRuleNumberComparisonInstance = CLXFormRuleInstanceBase & {
359
360
  subject: CLXFormResponseNumberValue;
360
361
  target: CLXFormResponseNumberValue;
361
- comparisonType: 'numberEquals' | 'numberGreaterThan' | 'numberLessThan';
362
+ comparisonType: "numberEquals" | "numberGreaterThan" | "numberLessThan";
362
363
  };
363
364
  export type CLXFormRuleInstance = CLXFormRuleStringComparisonInstance | CLXFormRuleStringExistsComparisonInstance | CLXFormRuleStringInListInstance | CLXFormRuleFileExistsInstance | CLXFormRuleDateComparisonInstance | CLXFormRuleStringListToStringListInstance | CLXFormRuleStringListComparisonInstance | CLXFormRuleBooleanEqualsInstance | CLXFormRuleNumberComparisonInstance;
364
365
  export type CLXFormRuleSet = {
365
366
  rules: (CLXFormRuleDefinition | CLXFormRuleSet)[];
366
- combinator?: 'and' | 'or';
367
+ combinator?: "and" | "or";
367
368
  };
368
369
  export type CLXConditionalOverride = {
369
370
  ruleset: CLXFormRuleSet;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/types",
3
- "version": "1.0.172",
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",