@claspo/editor 1.0.11 → 1.0.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claspo/editor",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Claspo Editor SDK and types",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/index.js CHANGED
@@ -108,41 +108,11 @@ exports.EsWidgetType = Object.freeze({
108
108
  TEASER: "TEASER",
109
109
  });
110
110
 
111
- exports.EsFormFieldType = Object.freeze({
112
- CHECKBOX_LIST: "CHECKBOX_LIST",
113
- DROPDOWN: "DROPDOWN",
114
- RADIO_GROUP: "RADIO_GROUP",
115
- GIFT_BOX: "GIFT_BOX",
116
- SCRATCH_CARD: "SCRATCH_CARD",
117
- WHEEL_OF_FORTUNE: "WHEEL_OF_FORTUNE",
118
- });
119
-
120
111
  exports.EsFormIntegrationType = Object.freeze({
121
112
  WEBHOOK: "webhook",
122
113
  EMBEDDED: "embedded",
123
114
  });
124
115
 
125
- exports.EsFormVariantIntegrationErrorCode = Object.freeze({
126
- NO_PLACEMENT: "NO_PLACEMENT",
127
- DELETED_SEGMENT: "DELETED_SEGMENT",
128
- DELETED_WELCOME_MESSAGE: "DELETED_WELCOME_MESSAGE",
129
- DELETED_WELCOME_EVENT_TYPE: "DELETED_WELCOME_EVENT_TYPE",
130
- DELETED_DOUBLE_OPT_IN_MESSAGE: "DELETED_DOUBLE_OPT_IN_MESSAGE",
131
- WRONG_CATEGORY_FOR_DOUBLE_OPT_IN_MESSAGE: "WRONG_CATEGORY_FOR_DOUBLE_OPT_IN_MESSAGE",
132
- });
133
-
134
- exports.EsFormIntegrationContactCollectingType = Object.freeze({
135
- NEW_ONLY: "NEW_ONLY",
136
- ALL: "ALL",
137
- DATA_FOR_EXISTING: "DATA_FOR_EXISTING",
138
- });
139
-
140
- exports.EsFormIntegrationActionName = Object.freeze({
141
- SEND_OPT_IN_MESSAGE: "sendOptInMessage",
142
- ADD_TO_SEGMENTS: "addToSegments",
143
- SEND_EVENT: "sendEvent",
144
- });
145
-
146
116
  exports.WidgetProjectConfigId = Object.freeze({
147
117
  ANNOYANCE_SAFEGUARD: "ANNOYANCE_SAFEGUARD",
148
118
  COUNTRY_CODES_PRIORITY: "COUNTRY_CODES_PRIORITY",
package/src/types.d.ts CHANGED
@@ -132,32 +132,6 @@ export interface ContactMappingOptionLimitsI {
132
132
  MIN_VALUE?: number;
133
133
  ANNUAL?: boolean;
134
134
  }
135
- export interface IntegrationMappingI {
136
- fields: IntegrationMappingFieldI[];
137
- }
138
- export interface IntegrationMappingFieldI {
139
- source: string;
140
- target: string;
141
- type?: ContactMappingOptionType | "SUBSCRIPTION_CATEGORY" | null;
142
- format?: string;
143
- values_mapping?: IntegrationMappingFieldValuesMappingI;
144
- }
145
- export interface IntegrationMappingFieldValuesMappingI {
146
- [index: string]: string;
147
- }
148
- export interface IntegratedConfigI {
149
- doubleOptIn: boolean;
150
- contactCollectingType: EsFormIntegrationContactCollectingType;
151
- actions: EsFormIntegrationActionsI;
152
- errors?: EsFormVariantIntegrationErrorI[];
153
- }
154
- export interface UpdateIntegrationParamsI {
155
- name: string;
156
- integrationUuid: string;
157
- fullyConfigured: boolean;
158
- mapping: IntegrationMappingI;
159
- config: IntegratedConfigI;
160
- }
161
135
  export interface FormsListItemI {
162
136
  id: number;
163
137
  name: string;
@@ -185,15 +159,11 @@ declare enum FormTestingStatus {
185
159
  export interface EsFormI {
186
160
  id: number;
187
161
  name: string;
188
- restrictions: EsFormRestrictionI;
189
162
  publishStatus: FormPublishStatus;
190
- testingStatus: FormTestingStatus;
191
163
  createdDate: string;
192
164
  updatedDate: string;
193
165
  variants: EsFormVariantI[];
194
- abTestId: number | null;
195
166
  config: EsFormVariantI;
196
- deleted: boolean;
197
167
  }
198
168
  export interface EsFormRestrictionI {
199
169
  BRANDED?: EsFormBrandingI;
@@ -216,8 +186,6 @@ export interface EsFormVariantConfigI {
216
186
  placements?: EsFormVariantPlacementI[];
217
187
  prizePoolIds?: string[];
218
188
  }
219
- export interface EsFormFieldIntegrationI {
220
- }
221
189
  export declare enum EsWidgetLayoutType {
222
190
  BUILT_IN = "BUILT_IN",
223
191
  DETACHED = "DETACHED",
@@ -241,25 +209,6 @@ export interface EsFormVariantPlacementI {
241
209
  selector: string | null;
242
210
  insertType: PlacementInsertType | null;
243
211
  }
244
- declare enum EsFormFieldType {
245
- CHECKBOX_LIST = "CHECKBOX_LIST",
246
- DROPDOWN = "DROPDOWN",
247
- RADIO_GROUP = "RADIO_GROUP",
248
- GIFT_BOX = "GIFT_BOX",
249
- SCRATCH_CARD = "SCRATCH_CARD",
250
- WHEEL_OF_FORTUNE = "WHEEL_OF_FORTUNE"
251
- }
252
- export interface EsFormFieldIntegrationI {
253
- id: string;
254
- label: string;
255
- options: EsFormFieldIntegrationOptionI[];
256
- type?: EsFormFieldType;
257
- }
258
- export interface EsFormFieldIntegrationOptionI {
259
- id: string;
260
- label: string;
261
- exportId: string;
262
- }
263
212
  export interface EsFormVariantAppearanceI {
264
213
  id: number | string;
265
214
  language: string | null;
@@ -283,55 +232,6 @@ export interface EsFormIntegrationParamsI {
283
232
  uuid: string;
284
233
  consumers?: string[];
285
234
  }
286
- export interface EsFormVariantIntegrationErrorI {
287
- code: EsFormVariantIntegrationErrorCode;
288
- description: string;
289
- }
290
- declare enum EsFormVariantIntegrationErrorCode {
291
- NO_PLACEMENT = "NO_PLACEMENT",
292
- DELETED_SEGMENT = "DELETED_SEGMENT",
293
- DELETED_WELCOME_MESSAGE = "DELETED_WELCOME_MESSAGE",
294
- DELETED_WELCOME_EVENT_TYPE = "DELETED_WELCOME_EVENT_TYPE",
295
- DELETED_DOUBLE_OPT_IN_MESSAGE = "DELETED_DOUBLE_OPT_IN_MESSAGE",
296
- WRONG_CATEGORY_FOR_DOUBLE_OPT_IN_MESSAGE = "WRONG_CATEGORY_FOR_DOUBLE_OPT_IN_MESSAGE"
297
- }
298
- declare enum EsFormIntegrationContactCollectingType {
299
- NEW_ONLY = "NEW_ONLY",
300
- ALL = "ALL",
301
- DATA_FOR_EXISTING = "DATA_FOR_EXISTING"
302
- }
303
- export interface EsFormIntegrationActionsI {
304
- addToSegments: EsFormIntegrationActionI<EsFormIntegrationAddToSegmentsI>;
305
- sendOptInMessage?: EsFormIntegrationActionI<EsFormIntegrationSendOptInMessageI>;
306
- [key: string]: EsFormIntegrationActionI<EsFormIntegrationActionEventTypeI | EsFormIntegrationAddToSegmentsI | EsFormIntegrationSendOptInMessageI>;
307
- }
308
- export interface EsFormIntegrationActionMappingI {
309
- [key: string]: string;
310
- }
311
- export interface EsFormIntegrationActionEventTypeI {
312
- eventTypeId: number;
313
- mappings: EsFormIntegrationActionMappingI;
314
- }
315
- export interface EsFormIntegrationActionI<T = any> {
316
- name: EsFormIntegrationActionName;
317
- params: T;
318
- }
319
- declare enum EsFormIntegrationActionName {
320
- SEND_OPT_IN_MESSAGE = "sendOptInMessage",
321
- ADD_TO_SEGMENTS = "addToSegments",
322
- SEND_EVENT = "sendEvent"
323
- }
324
- export interface EsFormIntegrationSendOptInMessageI {
325
- messageId: number | null;
326
- redirectAfterClick: string | null;
327
- welcomeEventTypeId: number | null;
328
- welcomeMessageId: number | null;
329
- runWelcomeSeriesToNewOnly: boolean;
330
- }
331
- export interface EsFormIntegrationAddToSegmentsI {
332
- segmentsIds: number[];
333
- newOnly: boolean;
334
- }
335
235
  export interface EsFormAppearanceI {
336
236
  id: number | string;
337
237
  origin: boolean;
@@ -395,17 +295,13 @@ export interface CreateWidgetRevisionRequestI {
395
295
  export interface WidgetRevisionPayloadI {
396
296
  type: EsWidgetType;
397
297
  presentation: WidgetRevisionPresentationI;
398
- integration: UpdateIntegrationParamsI | null;
399
- linkedTo: number | null;
400
298
  appearances: WidgetRevisionAppearanceI[];
401
299
  prizePoolIds?: string[];
402
300
  publishStatus?: FormPublishStatus;
403
- templateId?: number;
404
- linkedToRevision?: string | null;
301
+ linkedTo?: number | null;
405
302
  }
406
303
  export interface WidgetRevisionPresentationI {
407
304
  type: EsWidgetLayoutType;
408
- fields: EsFormFieldIntegrationI[];
409
305
  }
410
306
  export interface WidgetRevisionAppearanceI {
411
307
  id: number | string;
@@ -436,7 +332,7 @@ export interface WidgetProjectConfigI {
436
332
  id: WidgetProjectConfigId;
437
333
  value: string;
438
334
  }
439
- declare enum WidgetProjectConfigId {
335
+ export declare enum WidgetProjectConfigId {
440
336
  ANNOYANCE_SAFEGUARD = "ANNOYANCE_SAFEGUARD",
441
337
  COUNTRY_CODES_PRIORITY = "COUNTRY_CODES_PRIORITY",
442
338
  CABINET_AB_TESTS = "CABINET_AB_TESTS"