@clxmedia/types 1.0.29 → 1.0.30

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,19 @@ 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
+ allow_multiple: boolean;
154
+ };
155
+ export type CLXContactFormField = CLXContactFormFieldBase & {
156
+ response_type: 'CONTACT';
157
+ allow_multiple: false;
158
+ };
159
+ export type CLXMultipleContactFormField = CLXContactFormFieldBase & {
160
+ response_type: 'CONTACT_ARRAY';
161
+ allow_multiple: true;
162
+ };
137
163
  export type CLXDateFormField = CLXFormField & {
138
164
  type: 'date';
139
165
  response_type: 'DATE';
@@ -189,7 +215,7 @@ export type CLXMultiSelectFormField = CLXSelectableFormField & {
189
215
  max_select?: number;
190
216
  };
191
217
  export type CLXFormQuestionResponseOptions = {
192
- field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXFileFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
218
+ field: CLXTextFormField | CLXNumberFormField | CLXDateFormField | CLXScheduleFormField | CLXContactFormField | CLXMultipleContactFormField | CLXFileFormField | CLXTextAreaFormField | CLXBooleanFormField | CLXSelectFormField | CLXMultiSelectFormField | CLXMultipleTextFormField;
193
219
  has_parent?: boolean;
194
220
  };
195
221
  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.30",
4
4
  "description": "Conversion Logix TypeScript type definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",