@clxmedia/types 1.0.23 → 1.0.24

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,8 +104,8 @@ export declare enum CLXFormFieldFileTypes {
84
104
  'doc' = "doc",
85
105
  'docx' = "docx",
86
106
  'gif' = "gif",
107
+ 'jpeg' = "jpeg",
87
108
  'jpg' = "jpg",
88
- 'json' = "json",
89
109
  'mp4' = "mp4",
90
110
  'pdf' = "pdf",
91
111
  'png' = "png",
@@ -94,12 +114,12 @@ export declare enum CLXFormFieldFileTypes {
94
114
  'rtf' = "rtf",
95
115
  'svg' = "svg",
96
116
  'tif' = "tif",
117
+ 'tiff' = "tiff",
97
118
  'txt' = "txt",
98
119
  'webm' = "webm",
99
120
  'webp' = "webp",
100
121
  'xls' = "xls",
101
- 'xlsx' = "xlsx",
102
- 'zip' = "zip"
122
+ 'xlsx' = "xlsx"
103
123
  }
104
124
  export type CLXFileFormField = CLXFormField & {
105
125
  type: 'file';
@@ -107,6 +127,15 @@ export type CLXFileFormField = CLXFormField & {
107
127
  max_files?: number;
108
128
  allowed_file_types?: CLXFormFieldFileTypes[];
109
129
  };
130
+ export type CLXDateFormField = CLXFormField & {
131
+ type: 'date';
132
+ response_type: 'DATE';
133
+ include_time: boolean;
134
+ };
135
+ export type CLXScheduleFormField = CLXFormField & {
136
+ type: 'schedule';
137
+ response_type: 'SCHEDULE';
138
+ };
110
139
  export type CLXTextFormFieldBase = CLXPlainFormFieldBase & {
111
140
  type: 'text';
112
141
  mask: 'phone' | 'email' | 'name' | 'url' | 'none';
@@ -153,7 +182,7 @@ export type CLXMultiSelectFormField = CLXSelectableFormField & {
153
182
  max_select?: number;
154
183
  };
155
184
  export type CLXFormQuestionResponseOptions = {
156
- field: CLXTextFormField | CLXNumberFormField | CLXFileFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
185
+ field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXFileFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
157
186
  has_parent?: boolean;
158
187
  };
159
188
  export type CLXFormQuestion = {
@@ -185,16 +214,16 @@ export type CLXFormRuleStringEqualsInstance = CLXFormRuleInstanceBase & {
185
214
  predicate: CLXFormResponseStringValue;
186
215
  comparisonType: 'stringEquals';
187
216
  };
188
- export type CLXFormRuleFileExistsInstance = CLXFormRuleInstanceBase & {
189
- subject: CLXFormResponseFileValue;
190
- predicate: CLXFormResponseBooleanValue;
191
- comparisonType: 'fileExists';
192
- };
193
217
  export type CLXFormRuleStringInListInstance = CLXFormRuleInstanceBase & {
194
218
  subject: CLXFormResponseStringValue;
195
219
  predicate: CLXFormResponseStringArrayValue;
196
220
  comparisonType: 'stringInList';
197
221
  };
222
+ export type CLXFormRuleFileExistsInstance = CLXFormRuleInstanceBase & {
223
+ subject: CLXFormResponseFileValue;
224
+ predicate: CLXFormResponseBooleanValue;
225
+ comparisonType: 'fileExists';
226
+ };
198
227
  export type CLXFormRuleStringListContainsInstance = CLXFormRuleInstanceBase & {
199
228
  subject: CLXFormResponseStringArrayValue;
200
229
  predicate: CLXFormResponseStringValue;
@@ -8,8 +8,8 @@ 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
- CLXFormFieldFileTypes["json"] = "json";
13
13
  CLXFormFieldFileTypes["mp4"] = "mp4";
14
14
  CLXFormFieldFileTypes["pdf"] = "pdf";
15
15
  CLXFormFieldFileTypes["png"] = "png";
@@ -18,10 +18,10 @@ var CLXFormFieldFileTypes;
18
18
  CLXFormFieldFileTypes["rtf"] = "rtf";
19
19
  CLXFormFieldFileTypes["svg"] = "svg";
20
20
  CLXFormFieldFileTypes["tif"] = "tif";
21
+ CLXFormFieldFileTypes["tiff"] = "tiff";
21
22
  CLXFormFieldFileTypes["txt"] = "txt";
22
23
  CLXFormFieldFileTypes["webm"] = "webm";
23
24
  CLXFormFieldFileTypes["webp"] = "webp";
24
25
  CLXFormFieldFileTypes["xls"] = "xls";
25
26
  CLXFormFieldFileTypes["xlsx"] = "xlsx";
26
- CLXFormFieldFileTypes["zip"] = "zip";
27
27
  })(CLXFormFieldFileTypes || (exports.CLXFormFieldFileTypes = CLXFormFieldFileTypes = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/types",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Conversion Logix TypeScript type definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",