@clxmedia/types 1.0.29 → 1.0.31

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' | 'DATE' | 'SCHEDULE' | 'ANY';
24
- export type CLXFormFieldType = 'text' | 'textarea' | 'boolean' | 'select' | 'multiselect' | 'file' | 'date' | 'schedule';
23
+ export type CLXFormResponseType = 'STRING' | 'NUMBER' | 'STRING_ARRAY' | 'CONTACT' | 'CONTACT_ARRAY' | 'BOOLEAN' | 'FILE' | 'DATE' | 'SCHEDULE' | 'ANY';
24
+ export type CLXFormFieldType = 'text' | 'textarea' | 'boolean' | 'select' | 'multiselect' | 'file' | 'contact' | 'date' | 'schedule';
25
25
  export type CLXFormSelectType = 'select' | 'radio' | 'checkbox' | 'freeform';
26
26
  export type CLXFormConditionSubjectEntry = {
27
27
  value: string;
@@ -49,6 +49,11 @@ export type CLXFormDateTime = {
49
49
  iso_date_time: string;
50
50
  zone: string;
51
51
  };
52
+ export type CLXContactCard = {
53
+ name: string | null;
54
+ email: string | null;
55
+ phone: string | null;
56
+ };
52
57
  export type CLXFormResponseStringValue = CLXFormResponseValueBase & {
53
58
  type: 'STRING';
54
59
  value: string;
@@ -89,7 +94,15 @@ export type CLXFormResponseAnyValue = CLXFormResponseValueBase & {
89
94
  type: 'ANY';
90
95
  value: any;
91
96
  };
92
- export type CLXFormResponseValue = CLXFormResponseStringValue | CLXFormResponseStringArrayValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseScheduleValue | CLXFormResponseFileValue | CLXFormResponseBooleanValue | CLXFormResponseAnyValue;
97
+ export type CLXFormResponseContactValue = CLXFormResponseValueBase & {
98
+ type: 'CONTACT';
99
+ value: CLXContactCard;
100
+ };
101
+ export type CLXFormResponseContactArrayValue = CLXFormResponseValueBase & {
102
+ type: 'CONTACT_ARRAY';
103
+ value: CLXContactCard[];
104
+ };
105
+ export type CLXFormResponseValue = CLXFormResponseStringValue | CLXFormResponseStringArrayValue | CLXFormResponseNumberValue | CLXFormResponseDateValue | CLXFormResponseContactValue | CLXFormResponseContactArrayValue | CLXFormResponseScheduleValue | CLXFormResponseFileValue | CLXFormResponseBooleanValue | CLXFormResponseAnyValue;
93
106
  export type CLXFormResponses = {
94
107
  [questionSlug: string]: CLXFormResponseValue;
95
108
  };
@@ -134,6 +147,21 @@ export type CLXFileFormField = CLXFormField & {
134
147
  max_files?: number;
135
148
  allowed_file_types?: CLXFormFieldFileTypes[];
136
149
  };
150
+ export type CLXContactFormFieldBase = CLXFormField & {
151
+ type: 'contact';
152
+ response_type: 'CONTACT' | 'CONTACT_ARRAY';
153
+ email_required?: boolean;
154
+ phone_required?: boolean;
155
+ allow_multiple: boolean;
156
+ };
157
+ export type CLXContactFormField = CLXContactFormFieldBase & {
158
+ response_type: 'CONTACT';
159
+ allow_multiple: false;
160
+ };
161
+ export type CLXMultipleContactFormField = CLXContactFormFieldBase & {
162
+ response_type: 'CONTACT_ARRAY';
163
+ allow_multiple: true;
164
+ };
137
165
  export type CLXDateFormField = CLXFormField & {
138
166
  type: 'date';
139
167
  response_type: 'DATE';
@@ -189,7 +217,7 @@ export type CLXMultiSelectFormField = CLXSelectableFormField & {
189
217
  max_select?: number;
190
218
  };
191
219
  export type CLXFormQuestionResponseOptions = {
192
- field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXFileFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
220
+ field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXContactFormField | CLXMultipleContactFormField | CLXFileFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
193
221
  has_parent?: boolean;
194
222
  };
195
223
  export type CLXFormQuestion = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/types",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "Conversion Logix TypeScript type definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",