@claspo/editor 1.0.6 → 1.0.8

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.
package/src/types.d.ts CHANGED
@@ -1,37 +1,8 @@
1
- import { ClBaseComponentI as CommonBaseComponentI, ClDocumentI as CommonDocumentI, ClDocumentSharedI as CommonDocumentSharedI } from '@claspo/common/document/Document.interface';
1
+ import { ClPropertyPaneManifestModelName } from '@claspo/common/component-manifest/ComponentManifest.interface';
2
+ import { ClBaseComponentI, ClComponentType, ClDocumentActionType, ClDocumentI as CommonDocumentI, ClDocumentSharedI as CommonDocumentSharedI } from '@claspo/common/document/Document.interface';
2
3
  import { PrizePoolModelI, PrizePoolOptionI } from '@claspo/common/PrizePool.interface';
3
4
  import LayoutFactory from '@claspo/document-connector/layouts/LayoutFactory';
4
5
  import { Observable } from 'rxjs';
5
-
6
- declare enum MessageMediaType {
7
- EMAIL = "EMAIL",
8
- SMS = "SMS",
9
- VIBER = "VIBER",
10
- WEB_PUSH = "WEB_PUSH",
11
- MOBILE_PUSH = "MOBILE_PUSH",
12
- PULL = "PULL",// deprecated. use APP_INBOX
13
- APP_INBOX = "APP_INBOX",
14
- WIDGET = "WIDGET",
15
- IN_APP = "INAPP",
16
- TELEGRAM_BOT = "TELEGRAM_BOT"
17
- }
18
- export interface TagI<T = any> {
19
- id: number | string;
20
- name: string;
21
- dynamicData?: T;
22
- messages?: number;
23
- callouts?: number;
24
- workflows?: number;
25
- groups?: number;
26
- deletable?: boolean;
27
- }
28
- export interface MediaChannelContactsCountI {
29
- id: any;
30
- uuid: string;
31
- name: string;
32
- mediaType: MessageMediaType;
33
- contactsCount: number;
34
- }
35
6
  declare enum BaseListSortOption {
36
7
  ID = "ID",
37
8
  CREATED_DATE = "CREATED_DATE",
@@ -60,60 +31,6 @@ declare enum BaseListOrderOption {
60
31
  ASC = "ASC",
61
32
  DESC = "DESC"
62
33
  }
63
- export interface GroupI extends BaseGroupI {
64
- description: string;
65
- isActive: boolean;
66
- isSystemGenerated: boolean;
67
- tags: TagI[];
68
- updatedDate: number | string;
69
- cachedDate: number | string;
70
- contactsCount: number;
71
- createdById: number;
72
- createdDate: number | string;
73
- filterId: number;
74
- categoryId: number;
75
- fillingState: FillingStateType | null;
76
- workflows: LinkedWorkflowI[] | null;
77
- validationStatus: GroupValidationStatus;
78
- contacts?: GroupContactsI;
79
- strategies?: TagI[];
80
- isContactsCountRecalculating?: boolean;
81
- isContactsCountRecalculationError?: boolean;
82
- className?: string | null;
83
- }
84
- declare enum FillingStateType {
85
- STARTED = "STARTED",
86
- FAILED = "FAILED"
87
- }
88
- export interface BaseGroupI {
89
- id: number;
90
- type: GroupType;
91
- name: string;
92
- }
93
- declare enum GroupValidationStatus {
94
- VALID = "VALID",
95
- EMPTY_SEGMENT = "EMPTY_SEGMENT",
96
- DELETED = "DELETED"
97
- }
98
- declare enum GroupType {
99
- STATIC = "STATIC",
100
- DYNAMIC = "DYNAMIC",
101
- COMBINED = "COMBINED",
102
- PARAMETRIC = "PARAMETRIC"
103
- }
104
- export interface GroupContactsI {
105
- count: GroupContactsCountI;
106
- }
107
- export interface GroupContactsCountI {
108
- total: number;
109
- mediaChannels: MediaChannelContactsCountI[];
110
- }
111
- export interface LinkedWorkflowI {
112
- id: number;
113
- name: string;
114
- paused?: boolean;
115
- updatedDate?: number;
116
- }
117
34
  export interface MessageLanguageLocalisationI {
118
35
  native: string;
119
36
  en: string;
@@ -121,74 +38,10 @@ export interface MessageLanguageLocalisationI {
121
38
  uk: string;
122
39
  [key: string]: string;
123
40
  }
124
- declare enum InAppLayoutType {
125
- FULL = "FULL",
126
- SLIDE_UP = "SLIDE_UP",
127
- BOTTOM_BAR = "BOTTOM_BAR",
128
- POP_UP = "POP_UP"
129
- }
130
41
  export interface ClDocumentI extends CommonDocumentI {
131
- views: ClBaseComponentI[];
132
42
  shared: ClDocumentSharedI;
133
- inAppConfig?: ClInAppConfigI;
134
- }
135
- export interface ClInAppConfigI {
136
- layoutType: InAppLayoutType;
137
- }
138
- export interface ClBaseComponentI extends CommonBaseComponentI {
139
- type: ClComponentType;
140
- children?: ClBaseComponentI[];
141
- focusParentOnClick?: boolean;
142
- preventDraggable?: boolean;
143
- recursiveRemove?: boolean;
144
- canStack?: boolean;
145
- }
146
- declare enum ClComponentType {
147
- VIEW = "VIEW",
148
- CONTAINER = "CONTAINER",
149
- TEXT = "TEXT",
150
- INPUT = "INPUT",
151
- BUTTON = "BUTTON",
152
- IMAGE = "IMAGE",
153
- CONSENT = "CONSENT",
154
- COUNTDOWN_TIMER = "COUNTDOWN_TIMER",
155
- PROMO_CODE = "PROMO_CODE",
156
- MULTIPLE_INPUT = "MULTIPLE_INPUT",
157
- VIDEO = "VIDEO",
158
- SLIDER = "SLIDER",
159
- SLIDE = "SLIDE",
160
- SOCIAL = "SOCIAL",
161
- COLUMNS = "COLUMNS",
162
- COLUMN = "COLUMN",
163
- PRIZE_BASED_GAMING = "PRIZE_BASED_GAMING"
164
- }
165
- export declare enum ClDocumentActionType {
166
- SHOW_WIDGET = "SHOW_WIDGET",
167
- OPEN_LINK = "OPEN_LINK",
168
- SUBSCRIBE_CONTACT = "SUBSCRIBE_CONTACT",
169
- REQUEST = "REQUEST",
170
- CLOSE_WIDGET = "CLOSE_WIDGET",
171
- GO_TO_VIEW = "GO_TO_VIEW",
172
- GO_TO_PREVIOUS_VIEW = "GO_TO_PREVIOUS_VIEW",
173
- GO_TO_NEXT_VIEW = "GO_TO_NEXT_VIEW",
174
- CLICK = "CLICK"
175
43
  }
176
44
  export interface ClDocumentSharedI extends CommonDocumentSharedI {
177
- slideUp?: ClSlideUpParamsI;
178
- }
179
- export interface ClSlideUpParamsI {
180
- desktop: ClSlideUpEnvironmentParamsI;
181
- mobile: ClSlideUpEnvironmentParamsI;
182
- }
183
- export interface ClSlideUpEnvironmentParamsI {
184
- position: ClWidgetVerticalPosition;
185
- leftAndRightOffset: string;
186
- verticalOffset: string;
187
- }
188
- declare enum ClWidgetVerticalPosition {
189
- TOP = "TOP",
190
- CENTER = "CENTER",
191
- BOTTOM = "BOTTOM"
192
45
  }
193
46
  export declare enum ClPreviewEnvironment {
194
47
  DESKTOP = "DESKTOP",
@@ -213,67 +66,6 @@ export interface ClComponentSyncMapI {
213
66
  syncState: ClComponentSyncState | null;
214
67
  env?: ClPreviewEnvironment;
215
68
  }
216
- declare enum ClPropertyPaneManifestModelName {
217
- SIZE = "SIZE",
218
- INDENTATION = "INDENTATION",
219
- ALIGNMENT = "ALIGNMENT",
220
- BACKGROUND = "BACKGROUND",
221
- BACKDROP_FILTER = "BACKDROP_FILTER",
222
- BACKGROUND_MARKER_SELECTED = "BACKGROUND_MARKER_SELECTED",
223
- BORDERS = "BORDERS",
224
- BOX_SHADOW = "BOX_SHADOW",
225
- BORDER_RADIUS = "BORDER_RADIUS",
226
- TEXT_PARAMS = "TEXT_PARAMS",
227
- TEXT_INPUT = "TEXT_INPUT",
228
- SWITCH = "SWITCH",
229
- SWITCH_WITH_INPUT = "SWITCH_WITH_INPUT",
230
- INPUT_VALIDATION = "INPUT_VALIDATION",
231
- INPUT_LABEL = "INPUT_LABEL",
232
- TEXT_COLOR = "TEXT_COLOR",
233
- SELECT = "SELECT",
234
- RADIO_BUTTONS = "RADIO_BUTTONS",
235
- IMAGE_SOURCES = "IMAGE_SOURCES",
236
- COUNTRY_PHONE_SELECT = "COUNTRY_PHONE_SELECT",
237
- HOVER_ANIMATION = "HOVER_ANIMATION",
238
- ACTIONS = "ACTIONS",
239
- NPS_ACTIONS = "NPS_ACTIONS",
240
- DATEPICKER = "DATEPICKER",
241
- DATEPICKER_COUNTDOWN_TIMER = "DATEPICKER_COUNTDOWN_TIMER",
242
- DISPLAY = "DISPLAY",
243
- COMPONENT_OPTIONS = "COMPONENT_OPTIONS",
244
- COLOR_SELECT = "COLOR_SELECT",
245
- FLOATING_COMPONENT_POSITION = "FLOATING_COMPONENT_POSITION",
246
- LOOP_ANIMATION = "LOOP_ANIMATION",
247
- VIDEO_URL = "VIDEO_URL",
248
- VIDEO_CUSTOM_COVER = "VIDEO_CUSTOM_COVER",
249
- WIDGET_LAYOUT_SELECT = "WIDGET_LAYOUT_SELECT",
250
- MULTIPLE_INPUT_SIZE = "MULTIPLE_INPUT_SIZE",
251
- DATE_FORMAT = "DATE_FORMAT",
252
- ICON = "ICON",
253
- PROMOCODE_ICON = "PROMOCODE_ICON",
254
- ICON_SELECT = "ICON_SELECT",
255
- TEXT_VISIBILITY = "TEXT_VISIBILITY",
256
- SLIDER_SETTINGS = "SLIDER_SETTINGS",
257
- SLIDER_MANAGE_SLIDES = "SLIDER_MANAGE_SLIDES",
258
- SLIDER_MODES = "SLIDER_MODES",
259
- SLIDER_NAVIGATION_BUTTONS = "SLIDER_NAVIGATION_BUTTONS",
260
- SLIDER_INDICATION = "SLIDER_INDICATION",
261
- SLIDER_SLIDESHOW_ANIMATION = "SLIDER_SLIDESHOW_ANIMATION",
262
- INTEGRATION_FIELD_MAPPING = "INTEGRATION_FIELD_MAPPING",
263
- SUPPORTED_LANGUAGES = "SUPPORTED_LANGUAGES",
264
- LIST_POSITION = "LIST_POSITION",
265
- SOCIAL_ICON_SIZE = "SOCIAL_ICON_SIZE",
266
- SOCIAL_TYPE_AND_ICON_SELECT = "SOCIAL_TYPE_AND_ICON_SELECT",
267
- COLUMNS = "COLUMNS",
268
- INSERT_BLOCK = "INSERT_BLOCK",
269
- NUMBER_INPUT = "NUMBER_INPUT",
270
- PRIZE_SETTINGS = "PRIZE_SETTINGS",
271
- ROOT_COMPONENT_SELECT = "ROOT_COMPONENT_SELECT",
272
- FEEDBACK_TYPE = "FEEDBACK_TYPE",
273
- FEEDBACK_ICONS_SELECT = "FEEDBACK_ICONS_SELECT",
274
- FEEDBACK_ACTIONS = "FEEDBACK_ACTIONS",
275
- FLOATING_BOX_POSITION = "FLOATING_BOX_POSITION"
276
- }
277
69
  declare enum PlacementInsertType {
278
70
  BEFORE_BEGIN = "BEFORE_BEGIN",
279
71
  AFTER_BEGIN = "AFTER_BEGIN",
@@ -281,14 +73,6 @@ declare enum PlacementInsertType {
281
73
  AFTER_END = "AFTER_END",
282
74
  REPLACE = "REPLACE"
283
75
  }
284
- export interface ScheduleSpecificTimeI {
285
- from: ScheduleTimeI;
286
- to: ScheduleTimeI;
287
- }
288
- export interface ScheduleTimeI {
289
- hours: string;
290
- minutes: string;
291
- }
292
76
  export interface EsAdditionalFieldI {
293
77
  id: number;
294
78
  name: string;
@@ -409,312 +193,20 @@ export interface EsFormBrandingI {
409
193
  export interface EsFormVariantI {
410
194
  formId: number;
411
195
  id: number;
412
- description: string;
413
- draft: boolean;
414
- weight: number | null;
415
- fullyConfigured: boolean;
416
196
  config: EsFormVariantConfigI;
417
- integration: EsFormVariantIntegrationV2I | null;
418
197
  appearances: EsFormVariantAppearanceI[];
419
- main: boolean;
420
198
  linkedToVariantId: number;
421
199
  type: EsWidgetType;
422
- templateId?: number;
423
200
  revision?: string;
424
201
  publishedRevision?: string;
425
202
  }
426
203
  export interface EsFormVariantConfigI {
427
204
  type: EsWidgetLayoutType;
428
- fields: EsFormField[] | EsFormFieldIntegrationI[];
429
- asyncRules: EsFormVariantConfigAsyncRulesI;
430
- rules?: EsFormRulesI;
431
- tracking?: FormVariantTrackingI;
432
- placement?: EsFormVariantPlacementI;
433
205
  placements?: EsFormVariantPlacementI[];
434
206
  prizePoolIds?: string[];
435
207
  }
436
- declare enum EsFormVariantConfigAsyncRuleKey {
437
- HIDE_FOR_SUBSCRIBERS = "HIDE_FOR_SUBSCRIBERS",
438
- SHOW_IF_SEGMENT_MEMBER = "SHOW_IF_SEGMENT_MEMBER"
439
- }
440
- export interface EsFormVariantConfigAsyncRulesI {
441
- [EsFormVariantConfigAsyncRuleKey.HIDE_FOR_SUBSCRIBERS]?: EsFormVariantConfigHideForSubscribersAsyncRuleI;
442
- [EsFormVariantConfigAsyncRuleKey.SHOW_IF_SEGMENT_MEMBER]?: EsFormVariantConfigInSegmentAsyncRuleI;
443
- }
444
- export interface EsFormVariantConfigHideForSubscribersAsyncRuleI {
445
- enabled: boolean;
446
- checkThisWidgetOnly?: boolean;
447
- }
448
- export interface EsFormVariantConfigInSegmentAsyncRuleI {
449
- enabled: boolean;
450
- segmentId?: number;
451
- }
452
- export interface EsFormRulesI {
453
- CUSTOM_CODE: EsFormRulesCustomCodeI;
454
- FREQUENCY: EsFormRulesFrequencyI;
455
- TARGETING: EsFormRulesTargetingI;
456
- SCHEDULE: EsFormRulesScheduleI;
457
- SELECTOR: EsFormRulesSelectorI;
458
- HIDE?: EsFormRulesHideI;
459
- ANNOYANCE?: EsFormRulesAnnoyanceI;
460
- TEASER?: EsFormRulesTeaserI;
461
- }
462
- export interface EsFormRulesTeaserI {
463
- displayMode: EsTeaserDisplayMode;
464
- }
465
- declare enum EsTeaserDisplayMode {
466
- BEFORE_WIDGET_DISPLAYED_AND_AFTER_WIDGET_CLOSED = "BEFORE_WIDGET_DISPLAYED_AND_AFTER_WIDGET_CLOSED",
467
- BEFORE_WIDGET_DISPLAYED = "BEFORE_WIDGET_DISPLAYED",
468
- AFTER_WIDGET_CLOSED = "AFTER_WIDGET_CLOSED",
469
- ONLY_BY_TEASER = "ONLY_BY_TEASER"
470
- }
471
208
  export interface EsFormFieldIntegrationI {
472
209
  }
473
- declare enum EsFormRulesRelationType {
474
- AND = "AND",
475
- OR = "OR"
476
- }
477
- declare enum EsFormOperandType {
478
- DEVICE_TYPE = "DEVICE_TYPE",
479
- VISITOR = "VISITOR",
480
- URL = "URL",
481
- HTML_ELEMENT = "HTML_ELEMENT",
482
- URL_SEARCH_PARAM = "URL_SEARCH_PARAM",
483
- HIDE_FOR_THOSE_WHO_CLOSED_WIDGET = "HIDE_FOR_THOSE_WHO_CLOSED_WIDGET",
484
- COUNTRY = "COUNTRY",
485
- REGION = "REGION",
486
- CITY = "CITY",
487
- DATA_LAYER_EVENT = "DATA_LAYER_EVENT",
488
- LOCAL_STORAGE = "LOCAL_STORAGE",
489
- COOKIE_STORAGE = "COOKIE_STORAGE",
490
- JS_VARIABLE = "JS_VARIABLE"
491
- }
492
- export interface EsFormOperandI {
493
- name: EsFormOperandType;
494
- value?: string;
495
- }
496
- declare enum EsFormStringOperatorType {
497
- CONTAINS = "CONTAINS",
498
- STARTS_WITH = "STARTS_WITH",
499
- EQUALS = "EQUALS",
500
- ENDS_WITH = "ENDS_WITH",
501
- CONTAINS_ONE_OF = "CONTAINS_ONE_OF",
502
- REG_EX = "REG_EX",
503
- MATCHES = "MATCHES",
504
- EXISTS = "EXISTS"
505
- }
506
- declare enum EsFormFloatOperatorType {
507
- LESS_THAN = "LESS_THAN",
508
- GREATER_THAN = "GREATER_THAN"
509
- }
510
- declare enum EsFormVoidOperatorType {
511
- USER_LEAVES_PAGE = "USER_LEAVES_PAGE",
512
- USER_ALREADY_SUBSCRIBED_FOR_THE_CURRENT_FORM = "USER_ALREADY_SUBSCRIBED_FOR_THE_CURRENT_FORM",
513
- USER_NOT_HOVER_WIDGET = "USER_NOT_HOVER_WIDGET",
514
- NEW_VISITORS = "NEW_VISITORS",
515
- RETURNED_USERS = "RETURNED_USERS",
516
- USER_PLAYED_GAME = "USER_PLAYED_GAME",
517
- USER_DID_TARGET_ACTION = "USER_DID_TARGET_ACTION"
518
- }
519
- declare enum EsFormTimeOperatorType {
520
- TIME_SPENT_ON_PAGE = "TIME_SPENT_ON_PAGE",
521
- TIME_SPENT_ON_SITE = "TIME_SPENT_ON_SITE",
522
- UN_ACTIVE_TIME = "UN_ACTIVE_TIME",
523
- USER_LEAVES_PAGE = "USER_LEAVES_PAGE"
524
- }
525
- declare enum EsFormIntegerOperatorType {
526
- PAGE_READ_PERCENT = "PAGE_READ_PERCENT",
527
- PAGES_VIEWED = "PAGES_VIEWED",
528
- CLICKS_ON_ELEMENT = "CLICKS_ON_ELEMENT"
529
- }
530
- declare enum EsFormHTMLElementOperatorType {
531
- MATCHES = "MATCHES"
532
- }
533
- export interface EsFormTimeValueI {
534
- unit: EsFormTimeUnitType;
535
- amount: string;
536
- }
537
- export type OperatorType = EsFormStringOperatorType | EsFormFloatOperatorType | EsFormVoidOperatorType | EsFormTimeOperatorType | EsFormIntegerOperatorType | EsFormHTMLElementOperatorType;
538
- export interface EsFormRegularConditionI {
539
- operand: EsFormOperandI;
540
- operator?: OperatorType;
541
- value?: string | EsFormTimeValueI;
542
- }
543
- export interface EsFormEventConditionI {
544
- operand: EsFormOperandI;
545
- value: EsFormEventConditionValueI;
546
- }
547
- export interface EsFormEventConditionValueI {
548
- event: string;
549
- operator: EsFormEventOperator;
550
- parameters: EsFormEventConditionParametersI;
551
- }
552
- declare enum EsFormEventOperator {
553
- EVENT_EXISTS_AND_MATCH_PARAMETERS = "EVENT_EXISTS_AND_MATCH_PARAMETERS",
554
- EVENT_EXISTS = "EVENT_EXISTS"
555
- }
556
- export interface EsFormEventConditionParametersI {
557
- relation: EsFormRulesRelationType;
558
- values: EsFormEventConditionParameterValueI[];
559
- }
560
- export interface EsFormEventConditionParameterValueI {
561
- name: string;
562
- operator: OperatorType;
563
- value: string;
564
- }
565
- declare enum EsFormRulesGroupType {
566
- "SYSTEM_RULES" = "SYSTEM_RULES"
567
- }
568
- declare enum EsFormRulesGroupSource {
569
- MERGE_TAG = "MERGE_TAG"
570
- }
571
- export interface EsFormRulesGroupI {
572
- relation: EsFormRulesRelationType;
573
- conditions: EsFormConditionI[];
574
- type?: EsFormRulesGroupType;
575
- source?: EsFormRulesGroupSource;
576
- }
577
- export type EsFormConditionI = EsFormRegularConditionI | EsFormEventConditionI;
578
- export interface EsFormGroupsWithRelationI {
579
- relation: EsFormRulesRelationType;
580
- groups: EsFormRulesGroupI[];
581
- }
582
- export interface EsFormRulesAnnoyanceI {
583
- type: EsFormAnnoyanceType;
584
- }
585
- export interface EsFormTargetingSchemaI {
586
- include: EsFormGroupsWithRelationI;
587
- exclude: EsFormGroupsWithRelationI;
588
- }
589
- export interface EsFormRulesTargetingI {
590
- enabled: boolean;
591
- type: EsFormRulesType.TARGETING;
592
- schema: EsFormTargetingSchemaI;
593
- }
594
- export interface EsFormRulesSelectorI {
595
- enabled: boolean;
596
- selector: string;
597
- selectors?: string[] | null;
598
- }
599
- export interface EsFormRulesCustomCodeI {
600
- enabled: boolean;
601
- selector?: string;
602
- }
603
- export interface EsFormRulesFrequencyI {
604
- enabled: boolean;
605
- type: EsFormRulesType.FREQUENCY;
606
- predicates: EsFormRulesFrequencyPredicateI[];
607
- }
608
- export interface EsFormRulesFrequencyPredicateI {
609
- name: EsFormRulesFrequencyPredicateType;
610
- isActive: boolean;
611
- params?: EsFormRulesFrequencyPredicateParamsI;
612
- }
613
- export interface EsFormRulesFrequencyPredicateParamsI {
614
- unit: EsFormTimeUnitType;
615
- amount: number;
616
- }
617
- declare enum EsFormTimeUnitType {
618
- SECOND = "SECOND",
619
- MINUTE = "MINUTE",
620
- HOUR = "HOUR",
621
- DAY = "DAY",
622
- WEEK = "WEEK"
623
- }
624
- declare enum EsFormAnnoyanceType {
625
- SHOW_REGARDLESS_OF_THE_DISPLAY_OF_WIDGETS = "SHOW_REGARDLESS_OF_THE_DISPLAY_OF_WIDGETS",
626
- SHOW_IN_INTERVAL = "SHOW_IN_INTERVAL",
627
- SHOW_IF_THERE_ARE_NO_FLOATING_WIDGETS_DISPLAYED = "SHOW_IF_THERE_ARE_NO_FLOATING_WIDGETS_DISPLAYED"
628
- }
629
- declare enum EsFormRulesFrequencyPredicateType {
630
- NO_LIMIT = "NO_LIMIT",
631
- ONCE_PER_SITE = "ONCE_PER_SITE",
632
- ONCE_PER_SESSION = "ONCE_PER_SESSION",
633
- MIN_INTERVAL = "MIN_INTERVAL"
634
- }
635
- declare enum EsFormRulesType {
636
- FREQUENCY = "FREQUENCY",
637
- TARGETING = "TARGETING",
638
- SCHEDULE = "SCHEDULE",
639
- HIDE = "HIDE"
640
- }
641
- export interface EsFormRulesScheduleI {
642
- enabled: boolean;
643
- type: EsFormRulesType.SCHEDULE;
644
- predicates: EsFormRulesSchedulePredicateI[];
645
- }
646
- export interface EsFormRulesSchedulePredicateI {
647
- name: EsFormRulesSchedulePredicateType;
648
- isActive: boolean;
649
- params?: EsFormRulesSchedulePredicateParamsI | EsFormRulesScheduleSpecificDaysAndTimeParamsPredicateParamsI | FormRulesRelativeTimerSchedulePredicateParamsI;
650
- }
651
- declare enum EsFormRulesSchedulePredicateType {
652
- SHOW_AFTER = "SHOW_AFTER",
653
- HIDE_AFTER = "HIDE_AFTER",
654
- HIDE_AFTER_RELATIVE_TIMER_FOR_AMOUNT_OF_TIME = "HIDE_AFTER_RELATIVE_TIMER_FOR_AMOUNT_OF_TIME",
655
- SPECIFIC_DAYS_AND_TIME = "SPECIFIC_DAYS_AND_TIME"
656
- }
657
- export interface EsFormRulesScheduleSpecificDaysAndTimeParamsPredicateParamsI {
658
- timeZone: string | null;
659
- days: string[];
660
- time: ScheduleSpecificTimeI | null;
661
- }
662
- export interface EsFormRulesSchedulePredicateParamsI {
663
- date: string;
664
- timeZone: string | null;
665
- }
666
- export interface FormRulesRelativeTimerSchedulePredicateParamsI extends EsFormRulesSchedulePredicateParamsI {
667
- mode: TimerModes;
668
- lengthFromTheStart: string;
669
- isShowAgainAllowed: boolean;
670
- showAgainMode: RelativeTimerShowAgainModes;
671
- showAgainAmount: number;
672
- showAgainUnit: RelativeTimerShowAgainUnits;
673
- }
674
- declare enum TimerModes {
675
- UNTIL_THE_EXPIRATION_DATE = "UNTIL_THE_EXPIRATION_DATE",
676
- FROM_THE_START_OF_DISPLAYING = "FROM_THE_START_OF_DISPLAYING"
677
- }
678
- declare enum RelativeTimerShowAgainModes {
679
- NEXT_SESSION = "NEXT_SESSION",
680
- AFTER_FIXED_PERIOD = "AFTER_FIXED_PERIOD"
681
- }
682
- declare enum RelativeTimerShowAgainUnits {
683
- DAYS = "DAYS",
684
- HOURS = "HOURS",
685
- MINUTES = "MINUTES"
686
- }
687
- export interface EsFormRulesHideI {
688
- enabled: boolean;
689
- type: EsFormRulesType.HIDE;
690
- relation: EsFormRulesRelationType;
691
- hideFor: EsFormRulesHideForI | null;
692
- conditions: EsFormRulesHideConditionI[];
693
- }
694
- export interface EsFormRulesHideForI {
695
- unit: EsFormHideRulesUnit;
696
- amount: string;
697
- }
698
- export interface EsFormRulesHideConditionI {
699
- name: EsFormRulesHideConditionType;
700
- isActive: boolean;
701
- params?: EsFormRulesHideConditionParamsI;
702
- }
703
- declare enum EsFormRulesHideConditionType {
704
- WIDGET_CLOSED = "WIDGET_CLOSED"
705
- }
706
- export interface EsFormRulesHideConditionParamsI {
707
- unit: EsFormHideRulesUnit;
708
- amount: number;
709
- }
710
- declare enum EsFormHideRulesUnit {
711
- SECOND = "SECOND",
712
- MINUTE = "MINUTE",
713
- HOUR = "HOUR",
714
- DAY = "DAY",
715
- WEEK = "WEEK",
716
- COUNT = "COUNT"
717
- }
718
210
  export declare enum EsWidgetLayoutType {
719
211
  BUILT_IN = "BUILT_IN",
720
212
  DETACHED = "DETACHED",
@@ -738,12 +230,6 @@ export interface EsFormVariantPlacementI {
738
230
  selector: string | null;
739
231
  insertType: PlacementInsertType | null;
740
232
  }
741
- declare enum EsFormField {
742
- EMAIL = "email",
743
- PHONE = "phone",
744
- FIRST_NAME = "first_name",
745
- LAST_NAME = "last_name"
746
- }
747
233
  declare enum EsFormFieldType {
748
234
  CHECKBOX_LIST = "CHECKBOX_LIST",
749
235
  DROPDOWN = "DROPDOWN",
@@ -855,75 +341,26 @@ export interface FormLanguageI {
855
341
  export interface FormVariantI {
856
342
  formId: number;
857
343
  id: number;
858
- description: string;
859
- draft: boolean;
860
- weight: number | null;
861
- fullyConfigured: boolean;
862
344
  config: FormVariantConfigI;
863
- integration: FormVariantIntegrationI;
864
345
  appearances: EsFormVariantAppearanceI[];
865
- main: boolean | null;
866
346
  linkedToVariantId: number | null;
867
347
  type: EsWidgetType;
868
348
  revision: string | null;
869
349
  publishedRevision: string | null;
870
- templateId?: number;
871
- createdFromSiteTemplate?: boolean;
872
- restrictions?: EsFormRestrictionI;
873
- }
874
- export interface FormVariantTrackingI {
875
- trackers: FormVariantTrackerI[];
876
- }
877
- export interface FormVariantTrackerI {
878
- name: string;
879
350
  }
880
351
  export interface FormVariantConfigI {
881
352
  type: EsWidgetLayoutType;
882
353
  placements: EsFormVariantPlacementI[];
883
- fields: EsFormField[] | EsFormFieldIntegrationI[];
884
- hideForSubscribers: boolean;
885
- checkThisWidgetOnly?: boolean;
886
- showForSegment: boolean;
887
- segment?: GroupI;
888
- rules?: EsFormRulesI;
889
- tracking?: FormVariantTrackingI;
890
- copiedFromWidgetId?: number;
891
354
  prizePoolIds?: string[];
892
355
  }
893
- export interface FormVariantIntegrationI {
894
- uuid: string;
895
- name: string;
896
- webhookUrl: string;
897
- type: string;
898
- contactCollectingType: EsFormIntegrationContactCollectingType;
899
- hideForSubscribers: boolean;
900
- doubleOptIn: boolean;
901
- actions: EsFormIntegrationActionsI;
902
- mapping: IntegrationMappingI;
903
- errors?: EsFormVariantIntegrationErrorI[];
904
- integrationType?: string;
905
- consumers?: string[];
906
- revenueCalculation?: boolean;
907
- subscriptionNotificationEmails?: string[];
908
- }
909
356
  export interface BaseListDtoI<T> {
910
357
  totalCount: number;
911
358
  items: T[];
912
359
  }
913
- export interface UserInfoDtoI {
360
+ export interface UserInfoI {
914
361
  userId: number;
915
362
  userName: string;
916
- organisationId: number;
917
- projectId: number;
918
363
  language: string;
919
- permissions: PermissionOptionI;
920
- featureFlags: FeatureFlagOptionI;
921
- }
922
- export interface PermissionOptionI {
923
- [key: string]: string[];
924
- }
925
- export interface FeatureFlagOptionI {
926
- [key: string]: string;
927
364
  }
928
365
  export interface ComponentTranslateMapI {
929
366
  [propPath: string]: string;
@@ -1175,6 +612,14 @@ export interface EditorConfigI {
1175
612
  getRevisionPayloadCallback: (payload: GetRevisionPayloadCallbackPayloadI) => CreateWidgetRevisionRequestI;
1176
613
  /** HTTP API configuration for all editor operations */
1177
614
  api: EditorApiConfigI;
615
+ /** Current user identity and language preferences */
616
+ userInfo: UserInfoI;
617
+ /** Project-level configurations */
618
+ projectConfigs?: WidgetProjectConfigI[];
619
+ /** Available languages for multilingual versions of the same widget
620
+ * @default A set of popular languages will be used
621
+ * */
622
+ languagesForMultilingualVersions?: FormLanguageI[];
1178
623
  /**
1179
624
  * Callback fired on initial data loading errors.
1180
625
  * If not provided, default error UI will be shown.
@@ -1606,18 +1051,10 @@ export interface ResolvedDataI {
1606
1051
  widgetData: ResolvedWidgetDataI;
1607
1052
  /** Teaser (minimized widget) data, if enabled */
1608
1053
  teaserData: ResolvedWidgetDataI | null;
1609
- /** Available languages for the widget */
1610
- languages: FormLanguageI[];
1611
- /** Current user information */
1612
- userInfo: UserInfoDtoI;
1613
1054
  /** List of widgets that can be linked */
1614
1055
  linkedWidgets: FormsListItemI[];
1615
1056
  /** Prize pools for gamification widgets */
1616
1057
  prizePools?: PrizePoolModelI[];
1617
- /** Widget type for creating new widget mock when widget data is absent */
1618
- widgetType?: EsWidgetType;
1619
- /** Layout type for creating new widget mock when widget data is absent */
1620
- layoutType?: EsWidgetLayoutType;
1621
1058
  }
1622
1059
  /**
1623
1060
  * Widget-specific data within {@link ResolvedDataI}.
@@ -1736,8 +1173,6 @@ export interface EditorApiConfigI {
1736
1173
  }> | Promise<{
1737
1174
  response: TranslateRequestJsonI;
1738
1175
  }>;
1739
- /** Enable/disable auto-translation */
1740
- setAutoTranslate?: (payload: SetAutoTranslatePayloadI) => void;
1741
1176
  /** Fetch available contact mapping options */
1742
1177
  getContactMappingOptions: () => Observable<ClContactMappingOptionI[]> | Promise<ClContactMappingOptionI[]>;
1743
1178
  /** Fetch contact field groups */