@fyul/embed-sdk 2.7.59 → 2.7.61

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.
Files changed (27) hide show
  1. package/dist/cjs/modules/edm/types/data.types.d.ts +2 -0
  2. package/dist/cjs/modules/embed-studio/embedStudioModule.d.ts +2 -1
  3. package/dist/cjs/modules/embed-studio/embedStudioModule.js +4 -0
  4. package/dist/cjs/modules/embed-studio/events.d.ts +6 -0
  5. package/dist/cjs/modules/embed-studio/events.js +3 -0
  6. package/dist/cjs/modules/embed-studio/types/data.types.d.ts +4 -0
  7. package/dist/cjs/modules/embed-studio/types/event/actionEventPayload.types.d.ts +3 -0
  8. package/dist/cjs/modules/embed-studio/types/event/resultEventPayload.types.d.ts +4 -1
  9. package/dist/cjs/modules/events.d.ts +4 -4
  10. package/dist/cjs/services/embedStudio.d.ts +3 -1
  11. package/dist/cjs/services/embedStudio.js +4 -0
  12. package/dist/cjs/version.d.ts +1 -1
  13. package/dist/cjs/version.js +1 -1
  14. package/dist/esm/modules/edm/types/data.types.d.ts +2 -0
  15. package/dist/esm/modules/embed-studio/embedStudioModule.d.ts +2 -1
  16. package/dist/esm/modules/embed-studio/embedStudioModule.js +4 -0
  17. package/dist/esm/modules/embed-studio/events.d.ts +6 -0
  18. package/dist/esm/modules/embed-studio/events.js +3 -0
  19. package/dist/esm/modules/embed-studio/types/data.types.d.ts +4 -0
  20. package/dist/esm/modules/embed-studio/types/event/actionEventPayload.types.d.ts +3 -0
  21. package/dist/esm/modules/embed-studio/types/event/resultEventPayload.types.d.ts +4 -1
  22. package/dist/esm/modules/events.d.ts +4 -4
  23. package/dist/esm/services/embedStudio.d.ts +3 -1
  24. package/dist/esm/services/embedStudio.js +4 -0
  25. package/dist/esm/version.d.ts +1 -1
  26. package/dist/esm/version.js +1 -1
  27. package/package.json +1 -1
@@ -54,6 +54,8 @@ export interface DetailsEditStepConfig {
54
54
  * should only be set to false if product listings won't be available in EU
55
55
  * */
56
56
  showComplianceOption?: boolean;
57
+ /** Option to re-use previously saved product details */
58
+ useExistingDetails?: boolean;
57
59
  };
58
60
  }
59
61
  export interface TosScreenConfig {
@@ -1,10 +1,11 @@
1
1
  import { IEmbedStudioModule } from '../../types/module/module.types';
2
2
  import { BaseModule } from '../../modules/baseModule';
3
- import { InitializeEmbedStudioPayload, SaveDesignResultPayload } from './types';
3
+ import { AddImagePayload, AddImageResultPayload, InitializeEmbedStudioPayload, SaveDesignResultPayload } from './types';
4
4
  import { NotificationEventPayload } from '../../types/event/notification/notificationEventPayload.types';
5
5
  import { WithHandledResponses } from '../../helpers/typeHelper.types';
6
6
  export declare class EmbedStudioModule extends BaseModule implements WithHandledResponses<IEmbedStudioModule> {
7
7
  constructor();
8
8
  setup(payload?: InitializeEmbedStudioPayload): Promise<NotificationEventPayload>;
9
9
  saveDesign(): Promise<import("../..").HandledResponse<SaveDesignResultPayload, Error>>;
10
+ addImage(payload: AddImagePayload): Promise<import("../..").HandledResponse<AddImageResultPayload, Error>>;
10
11
  }
@@ -17,5 +17,9 @@ class EmbedStudioModule extends baseModule_1.BaseModule {
17
17
  const response = await this.sendRequest(events_1.EVENTS_ACTION.SAVE_DESIGN, {}).catch((e) => e);
18
18
  return (0, responseHandler_1.handleResponse)(response, 'Failed to save design');
19
19
  }
20
+ async addImage(payload) {
21
+ const response = await this.sendRequest(events_1.EVENTS_ACTION.ADD_IMAGE, payload).catch((e) => e);
22
+ return (0, responseHandler_1.handleResponse)(response, 'Failed to add image');
23
+ }
20
24
  }
21
25
  exports.EmbedStudioModule = EmbedStudioModule;
@@ -1,13 +1,16 @@
1
1
  export declare const EVENTS_ACTION: {
2
2
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
3
3
  readonly SAVE_DESIGN: "actionSaveDesign";
4
+ readonly ADD_IMAGE: "actionAddImage";
4
5
  };
5
6
  export declare const EVENTS_NOTIFICATION: {
6
7
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
7
8
  readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
9
+ readonly ADD_IMAGE_FAILURE: "actionAddImageFailure";
8
10
  };
9
11
  export declare const EVENTS_RESULT: {
10
12
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
13
+ readonly ADD_IMAGE_RESULT: "resultAddImage";
11
14
  };
12
15
  export declare const EVENT_BROADCAST: {
13
16
  readonly ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
@@ -17,8 +20,11 @@ export declare const EVENTS: {
17
20
  readonly ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
18
21
  readonly ON_INTERNAL_ERROR: "onError";
19
22
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
23
+ readonly ADD_IMAGE_RESULT: "resultAddImage";
20
24
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
21
25
  readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
26
+ readonly ADD_IMAGE_FAILURE: "actionAddImageFailure";
22
27
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
23
28
  readonly SAVE_DESIGN: "actionSaveDesign";
29
+ readonly ADD_IMAGE: "actionAddImage";
24
30
  };
@@ -4,13 +4,16 @@ exports.EVENTS = exports.EVENT_BROADCAST = exports.EVENTS_RESULT = exports.EVENT
4
4
  exports.EVENTS_ACTION = {
5
5
  INITIALIZE_EMBED_STUDIO: 'actionInitializeEdm',
6
6
  SAVE_DESIGN: 'actionSaveDesign',
7
+ ADD_IMAGE: 'actionAddImage',
7
8
  };
8
9
  exports.EVENTS_NOTIFICATION = {
9
10
  EMBED_STUDIO_INITIALIZATION_SUCCESS: 'notificationEdmInitializationSuccess',
10
11
  SAVE_DESIGN_FAILURE: 'actionSaveDesignFailure',
12
+ ADD_IMAGE_FAILURE: 'actionAddImageFailure',
11
13
  };
12
14
  exports.EVENTS_RESULT = {
13
15
  SAVE_DESIGN_RESULT: 'resultSaveDesign',
16
+ ADD_IMAGE_RESULT: 'resultAddImage',
14
17
  };
15
18
  exports.EVENT_BROADCAST = {
16
19
  ON_DESIGN_STATUS_UPDATE: 'onDesignStatusUpdate',
@@ -1,4 +1,8 @@
1
+ export interface EmbedStudioDesignerConfig {
2
+ simplified?: boolean;
3
+ }
1
4
  export interface EmbedStudioConfig {
5
+ designer?: EmbedStudioDesignerConfig;
2
6
  }
3
7
  export type EmbedStudioParams = ({
4
8
  element: HTMLElement;
@@ -4,3 +4,6 @@ export interface InitializeEmbedStudioPayloadWithVersion {
4
4
  clientVersion: string;
5
5
  }
6
6
  export type ActionEventPayload = InitializeEmbedStudioPayloadWithVersion;
7
+ export interface AddImagePayload {
8
+ imageUrl: string;
9
+ }
@@ -2,4 +2,7 @@ import { FyulTemplate } from '../../../../modules/embed-studio/types/data.types'
2
2
  export type SaveDesignResultPayload = {
3
3
  template: FyulTemplate;
4
4
  };
5
- export type EmbedStudioResultPayload = SaveDesignResultPayload;
5
+ export type AddImageResultPayload = {
6
+ success: boolean;
7
+ };
8
+ export type EmbedStudioResultPayload = SaveDesignResultPayload | AddImageResultPayload;
@@ -4,8 +4,8 @@ export declare const ALL_ACTION_EVENTS: {
4
4
  readonly GET_AVAILABLE_ROUTES: "actionGetAvailableRoutes";
5
5
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
6
6
  readonly SAVE_DESIGN: "actionSaveDesign";
7
- readonly INITIALIZE_EDM: "actionInitializeEdm";
8
7
  readonly ADD_IMAGE: "actionAddImage";
8
+ readonly INITIALIZE_EDM: "actionInitializeEdm";
9
9
  readonly SET_STYLE: "actionSetStyle";
10
10
  readonly NAVIGATE_STEP: "actionNavigateStep";
11
11
  readonly PRODUCT_PUBLISH: "actionProductPublish";
@@ -28,8 +28,8 @@ export declare const ALL_NOTIFICATION_EVENTS: {
28
28
  readonly GO_TO_VIEW_FAILURE: "actionGoToViewFailure";
29
29
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
30
30
  readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
31
- readonly EDM_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
32
31
  readonly ADD_IMAGE_FAILURE: "actionAddImageFailure";
32
+ readonly EDM_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
33
33
  readonly SET_STYLE_FAILURE: "actionSetStyleFailure";
34
34
  readonly NAVIGATE_STEP_FAILURE: "actionNavigateStepFailure";
35
35
  readonly GET_PRODUCT_PUBLISH_FAILURE: "actionGetProductPublishFailure";
@@ -100,8 +100,8 @@ export declare const ALL_EVENTS: {
100
100
  readonly GO_TO_VIEW_FAILURE: "actionGoToViewFailure";
101
101
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
102
102
  readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
103
- readonly EDM_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
104
103
  readonly ADD_IMAGE_FAILURE: "actionAddImageFailure";
104
+ readonly EDM_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
105
105
  readonly SET_STYLE_FAILURE: "actionSetStyleFailure";
106
106
  readonly NAVIGATE_STEP_FAILURE: "actionNavigateStepFailure";
107
107
  readonly GET_PRODUCT_PUBLISH_FAILURE: "actionGetProductPublishFailure";
@@ -120,8 +120,8 @@ export declare const ALL_EVENTS: {
120
120
  readonly GET_AVAILABLE_ROUTES: "actionGetAvailableRoutes";
121
121
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
122
122
  readonly SAVE_DESIGN: "actionSaveDesign";
123
- readonly INITIALIZE_EDM: "actionInitializeEdm";
124
123
  readonly ADD_IMAGE: "actionAddImage";
124
+ readonly INITIALIZE_EDM: "actionInitializeEdm";
125
125
  readonly SET_STYLE: "actionSetStyle";
126
126
  readonly NAVIGATE_STEP: "actionNavigateStep";
127
127
  readonly PRODUCT_PUBLISH: "actionProductPublish";
@@ -1,7 +1,8 @@
1
1
  import { EmbedStudioBroadcastModule } from '../modules/embed-studio/embedStudioBroadcastModule';
2
2
  import type { EmbedStudioParams, EmbedStudioConfig } from '../modules/embed-studio/types/data.types';
3
3
  import type { EmbedStudioBroadcastListeners } from '../modules/embed-studio/types/event/broadcastEvent.types';
4
- import type { SaveDesignResultPayload } from '../modules/embed-studio/types/event/resultEventPayload.types';
4
+ import type { AddImageResultPayload, SaveDesignResultPayload } from '../modules/embed-studio/types/event/resultEventPayload.types';
5
+ import type { AddImagePayload } from '../modules/embed-studio/types/event/actionEventPayload.types';
5
6
  import type { HandledResponse } from '../types/event/result/resultEventPayload.types';
6
7
  export declare class EmbedStudio {
7
8
  private params;
@@ -15,6 +16,7 @@ export declare class EmbedStudio {
15
16
  constructor(params: EmbedStudioParams, config?: EmbedStudioConfig | undefined, callbacks?: Partial<EmbedStudioBroadcastListeners>);
16
17
  init(): Promise<void>;
17
18
  saveDesign(): Promise<HandledResponse<SaveDesignResultPayload, Error>>;
19
+ addImage(payload: AddImagePayload): Promise<HandledResponse<AddImageResultPayload, Error>>;
18
20
  destroy(): void;
19
21
  static getBroadCastEventHandler(): EmbedStudioBroadcastModule;
20
22
  }
@@ -70,6 +70,10 @@ class EmbedStudio {
70
70
  const module = this.moduleLoader.getModule(moduleNames_1.MODULE_NAMES.EMBED_STUDIO);
71
71
  return module.saveDesign();
72
72
  }
73
+ addImage(payload) {
74
+ const module = this.moduleLoader.getModule(moduleNames_1.MODULE_NAMES.EMBED_STUDIO);
75
+ return module.addImage(payload);
76
+ }
73
77
  destroy() {
74
78
  if (this.iFrameManager) {
75
79
  this.iFrameManager.destroy();
@@ -1 +1 @@
1
- export declare const VERSION: "2.7.59";
1
+ export declare const VERSION: "2.7.61";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // AUTO-GENERATED
5
- exports.VERSION = '2.7.59';
5
+ exports.VERSION = '2.7.61';
@@ -54,6 +54,8 @@ export interface DetailsEditStepConfig {
54
54
  * should only be set to false if product listings won't be available in EU
55
55
  * */
56
56
  showComplianceOption?: boolean;
57
+ /** Option to re-use previously saved product details */
58
+ useExistingDetails?: boolean;
57
59
  };
58
60
  }
59
61
  export interface TosScreenConfig {
@@ -1,10 +1,11 @@
1
1
  import { IEmbedStudioModule } from '../../types/module/module.types';
2
2
  import { BaseModule } from '../../modules/baseModule';
3
- import { InitializeEmbedStudioPayload, SaveDesignResultPayload } from './types';
3
+ import { AddImagePayload, AddImageResultPayload, InitializeEmbedStudioPayload, SaveDesignResultPayload } from './types';
4
4
  import { NotificationEventPayload } from '../../types/event/notification/notificationEventPayload.types';
5
5
  import { WithHandledResponses } from '../../helpers/typeHelper.types';
6
6
  export declare class EmbedStudioModule extends BaseModule implements WithHandledResponses<IEmbedStudioModule> {
7
7
  constructor();
8
8
  setup(payload?: InitializeEmbedStudioPayload): Promise<NotificationEventPayload>;
9
9
  saveDesign(): Promise<import("../..").HandledResponse<SaveDesignResultPayload, Error>>;
10
+ addImage(payload: AddImagePayload): Promise<import("../..").HandledResponse<AddImageResultPayload, Error>>;
10
11
  }
@@ -14,4 +14,8 @@ export class EmbedStudioModule extends BaseModule {
14
14
  const response = await this.sendRequest(EVENTS_ACTION.SAVE_DESIGN, {}).catch((e) => e);
15
15
  return handleResponse(response, 'Failed to save design');
16
16
  }
17
+ async addImage(payload) {
18
+ const response = await this.sendRequest(EVENTS_ACTION.ADD_IMAGE, payload).catch((e) => e);
19
+ return handleResponse(response, 'Failed to add image');
20
+ }
17
21
  }
@@ -1,13 +1,16 @@
1
1
  export declare const EVENTS_ACTION: {
2
2
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
3
3
  readonly SAVE_DESIGN: "actionSaveDesign";
4
+ readonly ADD_IMAGE: "actionAddImage";
4
5
  };
5
6
  export declare const EVENTS_NOTIFICATION: {
6
7
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
7
8
  readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
9
+ readonly ADD_IMAGE_FAILURE: "actionAddImageFailure";
8
10
  };
9
11
  export declare const EVENTS_RESULT: {
10
12
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
13
+ readonly ADD_IMAGE_RESULT: "resultAddImage";
11
14
  };
12
15
  export declare const EVENT_BROADCAST: {
13
16
  readonly ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
@@ -17,8 +20,11 @@ export declare const EVENTS: {
17
20
  readonly ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
18
21
  readonly ON_INTERNAL_ERROR: "onError";
19
22
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
23
+ readonly ADD_IMAGE_RESULT: "resultAddImage";
20
24
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
21
25
  readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
26
+ readonly ADD_IMAGE_FAILURE: "actionAddImageFailure";
22
27
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
23
28
  readonly SAVE_DESIGN: "actionSaveDesign";
29
+ readonly ADD_IMAGE: "actionAddImage";
24
30
  };
@@ -1,13 +1,16 @@
1
1
  export const EVENTS_ACTION = {
2
2
  INITIALIZE_EMBED_STUDIO: 'actionInitializeEdm',
3
3
  SAVE_DESIGN: 'actionSaveDesign',
4
+ ADD_IMAGE: 'actionAddImage',
4
5
  };
5
6
  export const EVENTS_NOTIFICATION = {
6
7
  EMBED_STUDIO_INITIALIZATION_SUCCESS: 'notificationEdmInitializationSuccess',
7
8
  SAVE_DESIGN_FAILURE: 'actionSaveDesignFailure',
9
+ ADD_IMAGE_FAILURE: 'actionAddImageFailure',
8
10
  };
9
11
  export const EVENTS_RESULT = {
10
12
  SAVE_DESIGN_RESULT: 'resultSaveDesign',
13
+ ADD_IMAGE_RESULT: 'resultAddImage',
11
14
  };
12
15
  export const EVENT_BROADCAST = {
13
16
  ON_DESIGN_STATUS_UPDATE: 'onDesignStatusUpdate',
@@ -1,4 +1,8 @@
1
+ export interface EmbedStudioDesignerConfig {
2
+ simplified?: boolean;
3
+ }
1
4
  export interface EmbedStudioConfig {
5
+ designer?: EmbedStudioDesignerConfig;
2
6
  }
3
7
  export type EmbedStudioParams = ({
4
8
  element: HTMLElement;
@@ -4,3 +4,6 @@ export interface InitializeEmbedStudioPayloadWithVersion {
4
4
  clientVersion: string;
5
5
  }
6
6
  export type ActionEventPayload = InitializeEmbedStudioPayloadWithVersion;
7
+ export interface AddImagePayload {
8
+ imageUrl: string;
9
+ }
@@ -2,4 +2,7 @@ import { FyulTemplate } from '../../../../modules/embed-studio/types/data.types'
2
2
  export type SaveDesignResultPayload = {
3
3
  template: FyulTemplate;
4
4
  };
5
- export type EmbedStudioResultPayload = SaveDesignResultPayload;
5
+ export type AddImageResultPayload = {
6
+ success: boolean;
7
+ };
8
+ export type EmbedStudioResultPayload = SaveDesignResultPayload | AddImageResultPayload;
@@ -4,8 +4,8 @@ export declare const ALL_ACTION_EVENTS: {
4
4
  readonly GET_AVAILABLE_ROUTES: "actionGetAvailableRoutes";
5
5
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
6
6
  readonly SAVE_DESIGN: "actionSaveDesign";
7
- readonly INITIALIZE_EDM: "actionInitializeEdm";
8
7
  readonly ADD_IMAGE: "actionAddImage";
8
+ readonly INITIALIZE_EDM: "actionInitializeEdm";
9
9
  readonly SET_STYLE: "actionSetStyle";
10
10
  readonly NAVIGATE_STEP: "actionNavigateStep";
11
11
  readonly PRODUCT_PUBLISH: "actionProductPublish";
@@ -28,8 +28,8 @@ export declare const ALL_NOTIFICATION_EVENTS: {
28
28
  readonly GO_TO_VIEW_FAILURE: "actionGoToViewFailure";
29
29
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
30
30
  readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
31
- readonly EDM_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
32
31
  readonly ADD_IMAGE_FAILURE: "actionAddImageFailure";
32
+ readonly EDM_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
33
33
  readonly SET_STYLE_FAILURE: "actionSetStyleFailure";
34
34
  readonly NAVIGATE_STEP_FAILURE: "actionNavigateStepFailure";
35
35
  readonly GET_PRODUCT_PUBLISH_FAILURE: "actionGetProductPublishFailure";
@@ -100,8 +100,8 @@ export declare const ALL_EVENTS: {
100
100
  readonly GO_TO_VIEW_FAILURE: "actionGoToViewFailure";
101
101
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
102
102
  readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
103
- readonly EDM_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
104
103
  readonly ADD_IMAGE_FAILURE: "actionAddImageFailure";
104
+ readonly EDM_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
105
105
  readonly SET_STYLE_FAILURE: "actionSetStyleFailure";
106
106
  readonly NAVIGATE_STEP_FAILURE: "actionNavigateStepFailure";
107
107
  readonly GET_PRODUCT_PUBLISH_FAILURE: "actionGetProductPublishFailure";
@@ -120,8 +120,8 @@ export declare const ALL_EVENTS: {
120
120
  readonly GET_AVAILABLE_ROUTES: "actionGetAvailableRoutes";
121
121
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
122
122
  readonly SAVE_DESIGN: "actionSaveDesign";
123
- readonly INITIALIZE_EDM: "actionInitializeEdm";
124
123
  readonly ADD_IMAGE: "actionAddImage";
124
+ readonly INITIALIZE_EDM: "actionInitializeEdm";
125
125
  readonly SET_STYLE: "actionSetStyle";
126
126
  readonly NAVIGATE_STEP: "actionNavigateStep";
127
127
  readonly PRODUCT_PUBLISH: "actionProductPublish";
@@ -1,7 +1,8 @@
1
1
  import { EmbedStudioBroadcastModule } from '../modules/embed-studio/embedStudioBroadcastModule';
2
2
  import type { EmbedStudioParams, EmbedStudioConfig } from '../modules/embed-studio/types/data.types';
3
3
  import type { EmbedStudioBroadcastListeners } from '../modules/embed-studio/types/event/broadcastEvent.types';
4
- import type { SaveDesignResultPayload } from '../modules/embed-studio/types/event/resultEventPayload.types';
4
+ import type { AddImageResultPayload, SaveDesignResultPayload } from '../modules/embed-studio/types/event/resultEventPayload.types';
5
+ import type { AddImagePayload } from '../modules/embed-studio/types/event/actionEventPayload.types';
5
6
  import type { HandledResponse } from '../types/event/result/resultEventPayload.types';
6
7
  export declare class EmbedStudio {
7
8
  private params;
@@ -15,6 +16,7 @@ export declare class EmbedStudio {
15
16
  constructor(params: EmbedStudioParams, config?: EmbedStudioConfig | undefined, callbacks?: Partial<EmbedStudioBroadcastListeners>);
16
17
  init(): Promise<void>;
17
18
  saveDesign(): Promise<HandledResponse<SaveDesignResultPayload, Error>>;
19
+ addImage(payload: AddImagePayload): Promise<HandledResponse<AddImageResultPayload, Error>>;
18
20
  destroy(): void;
19
21
  static getBroadCastEventHandler(): EmbedStudioBroadcastModule;
20
22
  }
@@ -67,6 +67,10 @@ export class EmbedStudio {
67
67
  const module = this.moduleLoader.getModule(MODULE_NAMES.EMBED_STUDIO);
68
68
  return module.saveDesign();
69
69
  }
70
+ addImage(payload) {
71
+ const module = this.moduleLoader.getModule(MODULE_NAMES.EMBED_STUDIO);
72
+ return module.addImage(payload);
73
+ }
70
74
  destroy() {
71
75
  if (this.iFrameManager) {
72
76
  this.iFrameManager.destroy();
@@ -1 +1 @@
1
- export declare const VERSION: "2.7.59";
1
+ export declare const VERSION: "2.7.61";
@@ -1,2 +1,2 @@
1
1
  // AUTO-GENERATED
2
- export const VERSION = '2.7.59';
2
+ export const VERSION = '2.7.61';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fyul/embed-sdk",
3
- "version": "2.7.59",
3
+ "version": "2.7.61",
4
4
  "description": "",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",