@fyul/embed-sdk 2.7.52 → 2.7.54

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 (41) hide show
  1. package/dist/cjs/modules/embed-studio/embedStudioModule.d.ts +1 -2
  2. package/dist/cjs/modules/embed-studio/embedStudioModule.js +0 -4
  3. package/dist/cjs/modules/embed-studio/events.d.ts +0 -4
  4. package/dist/cjs/modules/embed-studio/events.js +0 -2
  5. package/dist/cjs/modules/embed-studio/types/data.types.d.ts +1 -0
  6. package/dist/cjs/modules/embed-studio/types/event/actionEvent.types.d.ts +2 -3
  7. package/dist/cjs/modules/embed-studio/types/event/actionEventPayload.types.d.ts +1 -4
  8. package/dist/cjs/modules/embed-studio/types/event/resultEvent.types.d.ts +2 -3
  9. package/dist/cjs/modules/embed-studio/types/event/resultEventPayload.types.d.ts +1 -4
  10. package/dist/cjs/modules/eventTypes.d.ts +2 -2
  11. package/dist/cjs/modules/events.d.ts +0 -4
  12. package/dist/cjs/modules/white-label/types/data.types.d.ts +8 -0
  13. package/dist/cjs/services/embedStudio.d.ts +1 -3
  14. package/dist/cjs/services/embedStudio.js +0 -4
  15. package/dist/cjs/services/whiteLabel.js +1 -1
  16. package/dist/cjs/types/module/module.types.d.ts +1 -2
  17. package/dist/cjs/version.d.ts +1 -1
  18. package/dist/cjs/version.js +1 -1
  19. package/dist/esm/modules/embed-studio/embedStudioModule.d.ts +1 -2
  20. package/dist/esm/modules/embed-studio/embedStudioModule.js +0 -4
  21. package/dist/esm/modules/embed-studio/events.d.ts +0 -4
  22. package/dist/esm/modules/embed-studio/events.js +0 -2
  23. package/dist/esm/modules/embed-studio/types/data.types.d.ts +1 -0
  24. package/dist/esm/modules/embed-studio/types/event/actionEvent.types.d.ts +2 -3
  25. package/dist/esm/modules/embed-studio/types/event/actionEventPayload.types.d.ts +1 -4
  26. package/dist/esm/modules/embed-studio/types/event/resultEvent.types.d.ts +2 -3
  27. package/dist/esm/modules/embed-studio/types/event/resultEventPayload.types.d.ts +1 -4
  28. package/dist/esm/modules/eventTypes.d.ts +2 -2
  29. package/dist/esm/modules/events.d.ts +0 -4
  30. package/dist/esm/modules/white-label/types/data.types.d.ts +8 -0
  31. package/dist/esm/services/embedStudio.d.ts +1 -3
  32. package/dist/esm/services/embedStudio.js +0 -4
  33. package/dist/esm/services/whiteLabel.js +1 -1
  34. package/dist/esm/types/module/module.types.d.ts +1 -2
  35. package/dist/esm/version.d.ts +1 -1
  36. package/dist/esm/version.js +1 -1
  37. package/package.json +1 -1
  38. package/dist/cjs/types/jwtData.d.ts +0 -8
  39. package/dist/cjs/types/jwtData.js +0 -2
  40. package/dist/esm/types/jwtData.d.ts +0 -8
  41. package/dist/esm/types/jwtData.js +0 -1
@@ -1,11 +1,10 @@
1
1
  import { IEmbedStudioModule } from '../../types/module/module.types';
2
2
  import { BaseModule } from '../../modules/baseModule';
3
- import { InitializeEmbedStudioPayload, SaveDesignResultPayload, SetStoreContextPayload, SetStoreContextResultPayload } from './types';
3
+ import { 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
- setStoreContext(payload: SetStoreContextPayload): Promise<import("../..").HandledResponse<SetStoreContextResultPayload, Error>>;
11
10
  }
@@ -17,9 +17,5 @@ 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 setStoreContext(payload) {
21
- const response = await this.sendRequest(events_1.EVENTS_ACTION.SET_STORE_CONTEXT, payload).catch((e) => e);
22
- return (0, responseHandler_1.handleResponse)(response, 'Failed to set store context');
23
- }
24
20
  }
25
21
  exports.EmbedStudioModule = EmbedStudioModule;
@@ -1,7 +1,6 @@
1
1
  export declare const EVENTS_ACTION: {
2
2
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
3
3
  readonly SAVE_DESIGN: "actionSaveDesign";
4
- readonly SET_STORE_CONTEXT: "actionSetStoreContext";
5
4
  };
6
5
  export declare const EVENTS_NOTIFICATION: {
7
6
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
@@ -9,7 +8,6 @@ export declare const EVENTS_NOTIFICATION: {
9
8
  };
10
9
  export declare const EVENTS_RESULT: {
11
10
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
12
- readonly SET_STORE_CONTEXT_RESULT: "resultSetStoreContext";
13
11
  };
14
12
  export declare const EVENT_BROADCAST: {
15
13
  readonly ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
@@ -19,10 +17,8 @@ export declare const EVENTS: {
19
17
  readonly ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
20
18
  readonly ON_INTERNAL_ERROR: "onError";
21
19
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
22
- readonly SET_STORE_CONTEXT_RESULT: "resultSetStoreContext";
23
20
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
24
21
  readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
25
22
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
26
23
  readonly SAVE_DESIGN: "actionSaveDesign";
27
- readonly SET_STORE_CONTEXT: "actionSetStoreContext";
28
24
  };
@@ -4,7 +4,6 @@ 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
- SET_STORE_CONTEXT: 'actionSetStoreContext',
8
7
  };
9
8
  exports.EVENTS_NOTIFICATION = {
10
9
  EMBED_STUDIO_INITIALIZATION_SUCCESS: 'notificationEdmInitializationSuccess',
@@ -12,7 +11,6 @@ exports.EVENTS_NOTIFICATION = {
12
11
  };
13
12
  exports.EVENTS_RESULT = {
14
13
  SAVE_DESIGN_RESULT: 'resultSaveDesign',
15
- SET_STORE_CONTEXT_RESULT: 'resultSetStoreContext',
16
14
  };
17
15
  exports.EVENT_BROADCAST = {
18
16
  ON_DESIGN_STATUS_UPDATE: 'onDesignStatusUpdate',
@@ -10,6 +10,7 @@ export type EmbedStudioParams = ({
10
10
  export interface EmbedStudioCommonParams {
11
11
  nonce: string;
12
12
  externalProductId: string;
13
+ storeId?: string;
13
14
  iframeClassName?: string;
14
15
  origin?: string;
15
16
  initProduct?: {
@@ -1,7 +1,6 @@
1
1
  import { EVENTS_ACTION } from '../../../../modules/embed-studio/events';
2
- import { InitializeEmbedStudioPayload, SetStoreContextPayload } from '../../../../modules/embed-studio/types';
2
+ import { InitializeEmbedStudioPayload } from '../../../../modules/embed-studio/types';
3
3
  import { BaseActionEvent } from '../../../../types/event/action/actionEvent.types';
4
4
  export type InitializeEmbedStudioAction = BaseActionEvent<typeof EVENTS_ACTION.INITIALIZE_EMBED_STUDIO, InitializeEmbedStudioPayload>;
5
5
  export type SaveDesignAction = BaseActionEvent<typeof EVENTS_ACTION.SAVE_DESIGN, undefined>;
6
- export type SetStoreContextAction = BaseActionEvent<typeof EVENTS_ACTION.SET_STORE_CONTEXT, SetStoreContextPayload>;
7
- export type ActionEvent = InitializeEmbedStudioAction | SaveDesignAction | SetStoreContextAction;
6
+ export type ActionEvent = InitializeEmbedStudioAction | SaveDesignAction;
@@ -3,7 +3,4 @@ export type InitializeEmbedStudioPayload = EmbedStudioConfig & EmbedStudioParams
3
3
  export interface InitializeEmbedStudioPayloadWithVersion {
4
4
  clientVersion: string;
5
5
  }
6
- export interface SetStoreContextPayload {
7
- storeId: string;
8
- }
9
- export type ActionEventPayload = InitializeEmbedStudioPayloadWithVersion | SetStoreContextPayload;
6
+ export type ActionEventPayload = InitializeEmbedStudioPayloadWithVersion;
@@ -1,6 +1,5 @@
1
1
  import { BaseResultEvent } from '../../../../types/event/result/resultEvent.types';
2
2
  import type { EVENTS_RESULT } from '../../../../modules/embed-studio/events';
3
- import { SaveDesignResultPayload, SetStoreContextResultPayload } from '../../../../modules/embed-studio/types/event/resultEventPayload.types';
3
+ import { SaveDesignResultPayload } from '../../../../modules/embed-studio/types/event/resultEventPayload.types';
4
4
  export type SaveDesignResultEvent = BaseResultEvent<typeof EVENTS_RESULT.SAVE_DESIGN_RESULT, SaveDesignResultPayload>;
5
- export type SetStoreContextResultEvent = BaseResultEvent<typeof EVENTS_RESULT.SET_STORE_CONTEXT_RESULT, SetStoreContextResultPayload>;
6
- export type ResultEvent = SaveDesignResultEvent | SetStoreContextResultEvent;
5
+ export type ResultEvent = SaveDesignResultEvent;
@@ -2,7 +2,4 @@ import { FyulTemplate } from '../../../../modules/embed-studio/types/data.types'
2
2
  export type SaveDesignResultPayload = {
3
3
  template: FyulTemplate;
4
4
  };
5
- export type SetStoreContextResultPayload = {
6
- storeId: string;
7
- };
8
- export type EmbedStudioResultPayload = SaveDesignResultPayload | SetStoreContextResultPayload;
5
+ export type EmbedStudioResultPayload = SaveDesignResultPayload;
@@ -5,7 +5,7 @@ export declare const EVENT_TYPES: {
5
5
  readonly RESULT: "result";
6
6
  readonly BROADCAST: "broadcast";
7
7
  };
8
- export declare function isAction(event: AnyEvent): event is import("./sdk/types").InitializeSdkAction | import("./sdk/types").LoadModuleAction | import("./mockup-generation/types").GetMockupsAction | import("./mockup-generation/types").GetMoreMockupsAction | import("./mockup-generation/types").AdjustMockupAction | import("./edm/types").InitializeEdmAction | import("./edm/types").SaveDesignAction | import("./edm/types").AddImageAction | import("./edm/types").NavigateStepAction | import("./white-label/types").InitializeWhiteLabelAction | import("./catalog/types").GetCatalogCategoriesAction | import("./catalog/types").GetCatalogProductsByIdsAction | import("./catalog/types").GetCatalogProductsAction | import("./catalog/types").GetSingleCatalogProductAction | import("./product-publish/types").DeleteProductsAction | import("./product-publish/types").GetSavedProductsAction | import("./product-publish/types").GetProductPublishAction | import("./embed-studio/types").InitializeEmbedStudioAction | import("./embed-studio/types").SaveDesignAction | import("./embed-studio/types").SetStoreContextAction;
8
+ export declare function isAction(event: AnyEvent): event is import("./sdk/types").InitializeSdkAction | import("./sdk/types").LoadModuleAction | import("./mockup-generation/types").GetMockupsAction | import("./mockup-generation/types").GetMoreMockupsAction | import("./mockup-generation/types").AdjustMockupAction | import("./edm/types").InitializeEdmAction | import("./edm/types").SaveDesignAction | import("./edm/types").AddImageAction | import("./edm/types").NavigateStepAction | import("./white-label/types").InitializeWhiteLabelAction | import("./catalog/types").GetCatalogCategoriesAction | import("./catalog/types").GetCatalogProductsByIdsAction | import("./catalog/types").GetCatalogProductsAction | import("./catalog/types").GetSingleCatalogProductAction | import("./product-publish/types").DeleteProductsAction | import("./product-publish/types").GetSavedProductsAction | import("./product-publish/types").GetProductPublishAction | import("./embed-studio/types").InitializeEmbedStudioAction | import("./embed-studio/types").SaveDesignAction;
9
9
  export declare function isNotification(event: AnyEvent): event is import("..").NotificationEvent;
10
- export declare function isResult(event: AnyEvent): event is import("./catalog/types").GetCatalogProductsResult | import("./catalog/types").GetSingleCatalogProductResult | import("./catalog/types").GetCatalogCategoriesResult | import("./product-publish/types").GetProductPublishResult | import("./product-publish/types").GetSavedProductsResult | import("./product-publish/types").GetSavedProductMockupsResult | import("./product-publish/types").DeleteProductsResult | import("./edm/types").SaveDesignResultEvent | import("./edm/types").AddImageResultEvent | import("./edm/types").SetStyleResultEvent | import("./edm/types").NavigateStepResultEvent | import("./embed-studio/types").SaveDesignResultEvent | import("./embed-studio/types").SetStoreContextResultEvent | import("./mockup-generation/types").GetMockupsResultEvent | import("./mockup-generation/types").GetMoreMockupsResultEvent | import("./mockup-generation/types").AdjustMockupResultEvent | import("./white-label/types").GoToViewResultEvent;
10
+ export declare function isResult(event: AnyEvent): event is import("./catalog/types").GetCatalogProductsResult | import("./catalog/types").GetSingleCatalogProductResult | import("./catalog/types").GetCatalogCategoriesResult | import("./product-publish/types").GetProductPublishResult | import("./product-publish/types").GetSavedProductsResult | import("./product-publish/types").GetSavedProductMockupsResult | import("./product-publish/types").DeleteProductsResult | import("./edm/types").SaveDesignResultEvent | import("./edm/types").AddImageResultEvent | import("./edm/types").SetStyleResultEvent | import("./edm/types").NavigateStepResultEvent | import("./embed-studio/types").SaveDesignResultEvent | import("./mockup-generation/types").GetMockupsResultEvent | import("./mockup-generation/types").GetMoreMockupsResultEvent | import("./mockup-generation/types").AdjustMockupResultEvent | import("./white-label/types").GoToViewResultEvent;
11
11
  export declare function isBroadcast(event: AnyEvent): event is import("./edm/types/event/broadcastEvent.types").OnDesignStatusUpdateBroadcast | import("./edm/types/event/broadcastEvent.types").OnPricingStatusUpdateBroadcast | import("./edm/types/event/broadcastEvent.types").OnFilePickerRequestBroadcast | import("./edm/types/event/broadcastEvent.types").OnStepStatusUpdateBroadcast | import("./edm/types/event/broadcastEvent.types").OnErrorUpdateBroadcast | import("./white-label/types").OnShoppingCartUpdateBroadcast | import("./white-label/types").OnContentSizeChangeBroadcast;
@@ -3,7 +3,6 @@ export declare const ALL_ACTION_EVENTS: {
3
3
  readonly GO_TO_VIEW: "actionGoToView";
4
4
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
5
5
  readonly SAVE_DESIGN: "actionSaveDesign";
6
- readonly SET_STORE_CONTEXT: "actionSetStoreContext";
7
6
  readonly INITIALIZE_EDM: "actionInitializeEdm";
8
7
  readonly ADD_IMAGE: "actionAddImage";
9
8
  readonly SET_STYLE: "actionSetStyle";
@@ -47,7 +46,6 @@ export declare const ALL_NOTIFICATION_EVENTS: {
47
46
  export declare const ALL_RESULT_EVENTS: {
48
47
  readonly GO_TO_VIEW_RESULT: "resultGoToView";
49
48
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
50
- readonly SET_STORE_CONTEXT_RESULT: "resultSetStoreContext";
51
49
  readonly ADD_IMAGE_RESULT: "resultAddImage";
52
50
  readonly SET_STYLE_RESULT: "resultSetStyle";
53
51
  readonly NAVIGATE_STEP_RESULT: "resultNavigateStep";
@@ -81,7 +79,6 @@ export declare const ALL_EVENTS: {
81
79
  readonly ON_STEP_STATUS_UPDATE: "onStepStatusUpdate";
82
80
  readonly GO_TO_VIEW_RESULT: "resultGoToView";
83
81
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
84
- readonly SET_STORE_CONTEXT_RESULT: "resultSetStoreContext";
85
82
  readonly ADD_IMAGE_RESULT: "resultAddImage";
86
83
  readonly SET_STYLE_RESULT: "resultSetStyle";
87
84
  readonly NAVIGATE_STEP_RESULT: "resultNavigateStep";
@@ -119,7 +116,6 @@ export declare const ALL_EVENTS: {
119
116
  readonly GO_TO_VIEW: "actionGoToView";
120
117
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
121
118
  readonly SAVE_DESIGN: "actionSaveDesign";
122
- readonly SET_STORE_CONTEXT: "actionSetStoreContext";
123
119
  readonly INITIALIZE_EDM: "actionInitializeEdm";
124
120
  readonly ADD_IMAGE: "actionAddImage";
125
121
  readonly SET_STYLE: "actionSetStyle";
@@ -32,3 +32,11 @@ export interface OnShoppingCartUpdateEvent {
32
32
  export interface OnContentSizeChangeEvent {
33
33
  height: number;
34
34
  }
35
+ export interface JWTData {
36
+ tid: string;
37
+ nce: string;
38
+ scp: string[];
39
+ iat: number;
40
+ exp: number;
41
+ cid: string;
42
+ }
@@ -1,9 +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, SetStoreContextResultPayload } from '../modules/embed-studio/types/event/resultEventPayload.types';
4
+ import type { SaveDesignResultPayload } from '../modules/embed-studio/types/event/resultEventPayload.types';
5
5
  import type { HandledResponse } from '../types/event/result/resultEventPayload.types';
6
- import { SetStoreContextPayload } from '../modules/embed-studio/types';
7
6
  export declare class EmbedStudio {
8
7
  private params;
9
8
  private config?;
@@ -16,7 +15,6 @@ export declare class EmbedStudio {
16
15
  constructor(params: EmbedStudioParams, config?: EmbedStudioConfig | undefined, callbacks?: Partial<EmbedStudioBroadcastListeners>);
17
16
  init(): Promise<void>;
18
17
  saveDesign(): Promise<HandledResponse<SaveDesignResultPayload, Error>>;
19
- setStoreContext(payload: SetStoreContextPayload): Promise<HandledResponse<SetStoreContextResultPayload, Error>>;
20
18
  destroy(): void;
21
19
  static getBroadCastEventHandler(): EmbedStudioBroadcastModule;
22
20
  }
@@ -68,10 +68,6 @@ class EmbedStudio {
68
68
  const module = this.moduleLoader.getModule(moduleNames_1.MODULE_NAMES.EMBED_STUDIO);
69
69
  return module.saveDesign();
70
70
  }
71
- setStoreContext(payload) {
72
- const module = this.moduleLoader.getModule(moduleNames_1.MODULE_NAMES.EMBED_STUDIO);
73
- return module.setStoreContext(payload);
74
- }
75
71
  destroy() {
76
72
  if (this.iFrameManager) {
77
73
  this.iFrameManager.destroy();
@@ -13,7 +13,7 @@ class WhiteLabel {
13
13
  params;
14
14
  config;
15
15
  static BASE_URL = globalThis.__FYUL_TESTING_VARS__?.ewlUrl ??
16
- 'https://embed-white-label-fe.nonprod.printify.com/embed';
16
+ 'https://ewl.printify.com/embed';
17
17
  static broadCastEventHandler;
18
18
  jwt;
19
19
  iFrameManager = null;
@@ -7,7 +7,7 @@ import { DeleteProductsPayload, DeleteProductResultPayload, GetProductPublishPay
7
7
  import { OnDesignStatusEventPayload, OnErrorEventPayload, OnFilePickerRequestedEventPayload, OnPricingStatusUpdateEventPayload, OnStepStatusUpdateEventPayload } from '../../modules/edm/types/event/broadcastEventPayload.types';
8
8
  import { OnDesignStatusEventPayload as EmbedStudioOnDesignStatusEventPayload, OnErrorEventPayload as EmbedStudioOnErrorEventPayload } from '../../modules/embed-studio/types/event/broadcastEventPayload.types';
9
9
  import { AddImagePayload, AddImageResultPayload, InitializeEdmPayload, NavigateStepPayload, NavigateStepResultPayload, SaveDesignResultPayload, SetStylePayload, SetStyleResultPayload } from '../../modules/edm/types';
10
- import { InitializeEmbedStudioPayload, SaveDesignResultPayload as EmbedStudioSaveDesignResultPayload, SetStoreContextPayload, SetStoreContextResultPayload as EmbedStudioSetStoreContextResultPayload } from '../../modules/embed-studio/types';
10
+ import { InitializeEmbedStudioPayload, SaveDesignResultPayload as EmbedStudioSaveDesignResultPayload } from '../../modules/embed-studio/types';
11
11
  import { InitializeWhiteLabelPayload, GoToViewResultPayload, GoToViewPayload, SetupNotificationPayload } from '../../modules/white-label/types';
12
12
  import { OnShoppingCartUpdateEventPayload, OnContentSizeChangeEventPayload } from '../../modules/white-label/types/event/broadcastEventPayload.types';
13
13
  /** This file ensures that Iframe and SDK has the same source of truth for return values */
@@ -40,7 +40,6 @@ export interface IEdmModule {
40
40
  export interface IEmbedStudioModule {
41
41
  setup(config?: InitializeEmbedStudioPayload): NotificationEventPayload | void;
42
42
  saveDesign(): EmbedStudioSaveDesignResultPayload;
43
- setStoreContext(payload: SetStoreContextPayload): EmbedStudioSetStoreContextResultPayload;
44
43
  }
45
44
  export interface IEdmBroadcastModule {
46
45
  onDesignStatusUpdate(event: OnDesignStatusEventPayload): void;
@@ -1 +1 @@
1
- export declare const VERSION: "2.7.52";
1
+ export declare const VERSION: "2.7.54";
@@ -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.52';
5
+ exports.VERSION = '2.7.54';
@@ -1,11 +1,10 @@
1
1
  import { IEmbedStudioModule } from '../../types/module/module.types';
2
2
  import { BaseModule } from '../../modules/baseModule';
3
- import { InitializeEmbedStudioPayload, SaveDesignResultPayload, SetStoreContextPayload, SetStoreContextResultPayload } from './types';
3
+ import { 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
- setStoreContext(payload: SetStoreContextPayload): Promise<import("../..").HandledResponse<SetStoreContextResultPayload, Error>>;
11
10
  }
@@ -14,8 +14,4 @@ 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 setStoreContext(payload) {
18
- const response = await this.sendRequest(EVENTS_ACTION.SET_STORE_CONTEXT, payload).catch((e) => e);
19
- return handleResponse(response, 'Failed to set store context');
20
- }
21
17
  }
@@ -1,7 +1,6 @@
1
1
  export declare const EVENTS_ACTION: {
2
2
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
3
3
  readonly SAVE_DESIGN: "actionSaveDesign";
4
- readonly SET_STORE_CONTEXT: "actionSetStoreContext";
5
4
  };
6
5
  export declare const EVENTS_NOTIFICATION: {
7
6
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
@@ -9,7 +8,6 @@ export declare const EVENTS_NOTIFICATION: {
9
8
  };
10
9
  export declare const EVENTS_RESULT: {
11
10
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
12
- readonly SET_STORE_CONTEXT_RESULT: "resultSetStoreContext";
13
11
  };
14
12
  export declare const EVENT_BROADCAST: {
15
13
  readonly ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
@@ -19,10 +17,8 @@ export declare const EVENTS: {
19
17
  readonly ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
20
18
  readonly ON_INTERNAL_ERROR: "onError";
21
19
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
22
- readonly SET_STORE_CONTEXT_RESULT: "resultSetStoreContext";
23
20
  readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
24
21
  readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
25
22
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
26
23
  readonly SAVE_DESIGN: "actionSaveDesign";
27
- readonly SET_STORE_CONTEXT: "actionSetStoreContext";
28
24
  };
@@ -1,7 +1,6 @@
1
1
  export const EVENTS_ACTION = {
2
2
  INITIALIZE_EMBED_STUDIO: 'actionInitializeEdm',
3
3
  SAVE_DESIGN: 'actionSaveDesign',
4
- SET_STORE_CONTEXT: 'actionSetStoreContext',
5
4
  };
6
5
  export const EVENTS_NOTIFICATION = {
7
6
  EMBED_STUDIO_INITIALIZATION_SUCCESS: 'notificationEdmInitializationSuccess',
@@ -9,7 +8,6 @@ export const EVENTS_NOTIFICATION = {
9
8
  };
10
9
  export const EVENTS_RESULT = {
11
10
  SAVE_DESIGN_RESULT: 'resultSaveDesign',
12
- SET_STORE_CONTEXT_RESULT: 'resultSetStoreContext',
13
11
  };
14
12
  export const EVENT_BROADCAST = {
15
13
  ON_DESIGN_STATUS_UPDATE: 'onDesignStatusUpdate',
@@ -10,6 +10,7 @@ export type EmbedStudioParams = ({
10
10
  export interface EmbedStudioCommonParams {
11
11
  nonce: string;
12
12
  externalProductId: string;
13
+ storeId?: string;
13
14
  iframeClassName?: string;
14
15
  origin?: string;
15
16
  initProduct?: {
@@ -1,7 +1,6 @@
1
1
  import { EVENTS_ACTION } from '../../../../modules/embed-studio/events';
2
- import { InitializeEmbedStudioPayload, SetStoreContextPayload } from '../../../../modules/embed-studio/types';
2
+ import { InitializeEmbedStudioPayload } from '../../../../modules/embed-studio/types';
3
3
  import { BaseActionEvent } from '../../../../types/event/action/actionEvent.types';
4
4
  export type InitializeEmbedStudioAction = BaseActionEvent<typeof EVENTS_ACTION.INITIALIZE_EMBED_STUDIO, InitializeEmbedStudioPayload>;
5
5
  export type SaveDesignAction = BaseActionEvent<typeof EVENTS_ACTION.SAVE_DESIGN, undefined>;
6
- export type SetStoreContextAction = BaseActionEvent<typeof EVENTS_ACTION.SET_STORE_CONTEXT, SetStoreContextPayload>;
7
- export type ActionEvent = InitializeEmbedStudioAction | SaveDesignAction | SetStoreContextAction;
6
+ export type ActionEvent = InitializeEmbedStudioAction | SaveDesignAction;
@@ -3,7 +3,4 @@ export type InitializeEmbedStudioPayload = EmbedStudioConfig & EmbedStudioParams
3
3
  export interface InitializeEmbedStudioPayloadWithVersion {
4
4
  clientVersion: string;
5
5
  }
6
- export interface SetStoreContextPayload {
7
- storeId: string;
8
- }
9
- export type ActionEventPayload = InitializeEmbedStudioPayloadWithVersion | SetStoreContextPayload;
6
+ export type ActionEventPayload = InitializeEmbedStudioPayloadWithVersion;
@@ -1,6 +1,5 @@
1
1
  import { BaseResultEvent } from '../../../../types/event/result/resultEvent.types';
2
2
  import type { EVENTS_RESULT } from '../../../../modules/embed-studio/events';
3
- import { SaveDesignResultPayload, SetStoreContextResultPayload } from '../../../../modules/embed-studio/types/event/resultEventPayload.types';
3
+ import { SaveDesignResultPayload } from '../../../../modules/embed-studio/types/event/resultEventPayload.types';
4
4
  export type SaveDesignResultEvent = BaseResultEvent<typeof EVENTS_RESULT.SAVE_DESIGN_RESULT, SaveDesignResultPayload>;
5
- export type SetStoreContextResultEvent = BaseResultEvent<typeof EVENTS_RESULT.SET_STORE_CONTEXT_RESULT, SetStoreContextResultPayload>;
6
- export type ResultEvent = SaveDesignResultEvent | SetStoreContextResultEvent;
5
+ export type ResultEvent = SaveDesignResultEvent;
@@ -2,7 +2,4 @@ import { FyulTemplate } from '../../../../modules/embed-studio/types/data.types'
2
2
  export type SaveDesignResultPayload = {
3
3
  template: FyulTemplate;
4
4
  };
5
- export type SetStoreContextResultPayload = {
6
- storeId: string;
7
- };
8
- export type EmbedStudioResultPayload = SaveDesignResultPayload | SetStoreContextResultPayload;
5
+ export type EmbedStudioResultPayload = SaveDesignResultPayload;
@@ -5,7 +5,7 @@ export declare const EVENT_TYPES: {
5
5
  readonly RESULT: "result";
6
6
  readonly BROADCAST: "broadcast";
7
7
  };
8
- export declare function isAction(event: AnyEvent): event is import("./sdk/types").InitializeSdkAction | import("./sdk/types").LoadModuleAction | import("./mockup-generation/types").GetMockupsAction | import("./mockup-generation/types").GetMoreMockupsAction | import("./mockup-generation/types").AdjustMockupAction | import("./edm/types").InitializeEdmAction | import("./edm/types").SaveDesignAction | import("./edm/types").AddImageAction | import("./edm/types").NavigateStepAction | import("./white-label/types").InitializeWhiteLabelAction | import("./catalog/types").GetCatalogCategoriesAction | import("./catalog/types").GetCatalogProductsByIdsAction | import("./catalog/types").GetCatalogProductsAction | import("./catalog/types").GetSingleCatalogProductAction | import("./product-publish/types").DeleteProductsAction | import("./product-publish/types").GetSavedProductsAction | import("./product-publish/types").GetProductPublishAction | import("./embed-studio/types").InitializeEmbedStudioAction | import("./embed-studio/types").SaveDesignAction | import("./embed-studio/types").SetStoreContextAction;
8
+ export declare function isAction(event: AnyEvent): event is import("./sdk/types").InitializeSdkAction | import("./sdk/types").LoadModuleAction | import("./mockup-generation/types").GetMockupsAction | import("./mockup-generation/types").GetMoreMockupsAction | import("./mockup-generation/types").AdjustMockupAction | import("./edm/types").InitializeEdmAction | import("./edm/types").SaveDesignAction | import("./edm/types").AddImageAction | import("./edm/types").NavigateStepAction | import("./white-label/types").InitializeWhiteLabelAction | import("./catalog/types").GetCatalogCategoriesAction | import("./catalog/types").GetCatalogProductsByIdsAction | import("./catalog/types").GetCatalogProductsAction | import("./catalog/types").GetSingleCatalogProductAction | import("./product-publish/types").DeleteProductsAction | import("./product-publish/types").GetSavedProductsAction | import("./product-publish/types").GetProductPublishAction | import("./embed-studio/types").InitializeEmbedStudioAction | import("./embed-studio/types").SaveDesignAction;
9
9
  export declare function isNotification(event: AnyEvent): event is import("..").NotificationEvent;
10
- export declare function isResult(event: AnyEvent): event is import("./catalog/types").GetCatalogProductsResult | import("./catalog/types").GetSingleCatalogProductResult | import("./catalog/types").GetCatalogCategoriesResult | import("./product-publish/types").GetProductPublishResult | import("./product-publish/types").GetSavedProductsResult | import("./product-publish/types").GetSavedProductMockupsResult | import("./product-publish/types").DeleteProductsResult | import("./edm/types").SaveDesignResultEvent | import("./edm/types").AddImageResultEvent | import("./edm/types").SetStyleResultEvent | import("./edm/types").NavigateStepResultEvent | import("./embed-studio/types").SaveDesignResultEvent | import("./embed-studio/types").SetStoreContextResultEvent | import("./mockup-generation/types").GetMockupsResultEvent | import("./mockup-generation/types").GetMoreMockupsResultEvent | import("./mockup-generation/types").AdjustMockupResultEvent | import("./white-label/types").GoToViewResultEvent;
10
+ export declare function isResult(event: AnyEvent): event is import("./catalog/types").GetCatalogProductsResult | import("./catalog/types").GetSingleCatalogProductResult | import("./catalog/types").GetCatalogCategoriesResult | import("./product-publish/types").GetProductPublishResult | import("./product-publish/types").GetSavedProductsResult | import("./product-publish/types").GetSavedProductMockupsResult | import("./product-publish/types").DeleteProductsResult | import("./edm/types").SaveDesignResultEvent | import("./edm/types").AddImageResultEvent | import("./edm/types").SetStyleResultEvent | import("./edm/types").NavigateStepResultEvent | import("./embed-studio/types").SaveDesignResultEvent | import("./mockup-generation/types").GetMockupsResultEvent | import("./mockup-generation/types").GetMoreMockupsResultEvent | import("./mockup-generation/types").AdjustMockupResultEvent | import("./white-label/types").GoToViewResultEvent;
11
11
  export declare function isBroadcast(event: AnyEvent): event is import("./edm/types/event/broadcastEvent.types").OnDesignStatusUpdateBroadcast | import("./edm/types/event/broadcastEvent.types").OnPricingStatusUpdateBroadcast | import("./edm/types/event/broadcastEvent.types").OnFilePickerRequestBroadcast | import("./edm/types/event/broadcastEvent.types").OnStepStatusUpdateBroadcast | import("./edm/types/event/broadcastEvent.types").OnErrorUpdateBroadcast | import("./white-label/types").OnShoppingCartUpdateBroadcast | import("./white-label/types").OnContentSizeChangeBroadcast;
@@ -3,7 +3,6 @@ export declare const ALL_ACTION_EVENTS: {
3
3
  readonly GO_TO_VIEW: "actionGoToView";
4
4
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
5
5
  readonly SAVE_DESIGN: "actionSaveDesign";
6
- readonly SET_STORE_CONTEXT: "actionSetStoreContext";
7
6
  readonly INITIALIZE_EDM: "actionInitializeEdm";
8
7
  readonly ADD_IMAGE: "actionAddImage";
9
8
  readonly SET_STYLE: "actionSetStyle";
@@ -47,7 +46,6 @@ export declare const ALL_NOTIFICATION_EVENTS: {
47
46
  export declare const ALL_RESULT_EVENTS: {
48
47
  readonly GO_TO_VIEW_RESULT: "resultGoToView";
49
48
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
50
- readonly SET_STORE_CONTEXT_RESULT: "resultSetStoreContext";
51
49
  readonly ADD_IMAGE_RESULT: "resultAddImage";
52
50
  readonly SET_STYLE_RESULT: "resultSetStyle";
53
51
  readonly NAVIGATE_STEP_RESULT: "resultNavigateStep";
@@ -81,7 +79,6 @@ export declare const ALL_EVENTS: {
81
79
  readonly ON_STEP_STATUS_UPDATE: "onStepStatusUpdate";
82
80
  readonly GO_TO_VIEW_RESULT: "resultGoToView";
83
81
  readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
84
- readonly SET_STORE_CONTEXT_RESULT: "resultSetStoreContext";
85
82
  readonly ADD_IMAGE_RESULT: "resultAddImage";
86
83
  readonly SET_STYLE_RESULT: "resultSetStyle";
87
84
  readonly NAVIGATE_STEP_RESULT: "resultNavigateStep";
@@ -119,7 +116,6 @@ export declare const ALL_EVENTS: {
119
116
  readonly GO_TO_VIEW: "actionGoToView";
120
117
  readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
121
118
  readonly SAVE_DESIGN: "actionSaveDesign";
122
- readonly SET_STORE_CONTEXT: "actionSetStoreContext";
123
119
  readonly INITIALIZE_EDM: "actionInitializeEdm";
124
120
  readonly ADD_IMAGE: "actionAddImage";
125
121
  readonly SET_STYLE: "actionSetStyle";
@@ -32,3 +32,11 @@ export interface OnShoppingCartUpdateEvent {
32
32
  export interface OnContentSizeChangeEvent {
33
33
  height: number;
34
34
  }
35
+ export interface JWTData {
36
+ tid: string;
37
+ nce: string;
38
+ scp: string[];
39
+ iat: number;
40
+ exp: number;
41
+ cid: string;
42
+ }
@@ -1,9 +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, SetStoreContextResultPayload } from '../modules/embed-studio/types/event/resultEventPayload.types';
4
+ import type { SaveDesignResultPayload } from '../modules/embed-studio/types/event/resultEventPayload.types';
5
5
  import type { HandledResponse } from '../types/event/result/resultEventPayload.types';
6
- import { SetStoreContextPayload } from '../modules/embed-studio/types';
7
6
  export declare class EmbedStudio {
8
7
  private params;
9
8
  private config?;
@@ -16,7 +15,6 @@ export declare class EmbedStudio {
16
15
  constructor(params: EmbedStudioParams, config?: EmbedStudioConfig | undefined, callbacks?: Partial<EmbedStudioBroadcastListeners>);
17
16
  init(): Promise<void>;
18
17
  saveDesign(): Promise<HandledResponse<SaveDesignResultPayload, Error>>;
19
- setStoreContext(payload: SetStoreContextPayload): Promise<HandledResponse<SetStoreContextResultPayload, Error>>;
20
18
  destroy(): void;
21
19
  static getBroadCastEventHandler(): EmbedStudioBroadcastModule;
22
20
  }
@@ -65,10 +65,6 @@ export class EmbedStudio {
65
65
  const module = this.moduleLoader.getModule(MODULE_NAMES.EMBED_STUDIO);
66
66
  return module.saveDesign();
67
67
  }
68
- setStoreContext(payload) {
69
- const module = this.moduleLoader.getModule(MODULE_NAMES.EMBED_STUDIO);
70
- return module.setStoreContext(payload);
71
- }
72
68
  destroy() {
73
69
  if (this.iFrameManager) {
74
70
  this.iFrameManager.destroy();
@@ -10,7 +10,7 @@ export class WhiteLabel {
10
10
  params;
11
11
  config;
12
12
  static BASE_URL = globalThis.__FYUL_TESTING_VARS__?.ewlUrl ??
13
- 'https://embed-white-label-fe.nonprod.printify.com/embed';
13
+ 'https://ewl.printify.com/embed';
14
14
  static broadCastEventHandler;
15
15
  jwt;
16
16
  iFrameManager = null;
@@ -7,7 +7,7 @@ import { DeleteProductsPayload, DeleteProductResultPayload, GetProductPublishPay
7
7
  import { OnDesignStatusEventPayload, OnErrorEventPayload, OnFilePickerRequestedEventPayload, OnPricingStatusUpdateEventPayload, OnStepStatusUpdateEventPayload } from '../../modules/edm/types/event/broadcastEventPayload.types';
8
8
  import { OnDesignStatusEventPayload as EmbedStudioOnDesignStatusEventPayload, OnErrorEventPayload as EmbedStudioOnErrorEventPayload } from '../../modules/embed-studio/types/event/broadcastEventPayload.types';
9
9
  import { AddImagePayload, AddImageResultPayload, InitializeEdmPayload, NavigateStepPayload, NavigateStepResultPayload, SaveDesignResultPayload, SetStylePayload, SetStyleResultPayload } from '../../modules/edm/types';
10
- import { InitializeEmbedStudioPayload, SaveDesignResultPayload as EmbedStudioSaveDesignResultPayload, SetStoreContextPayload, SetStoreContextResultPayload as EmbedStudioSetStoreContextResultPayload } from '../../modules/embed-studio/types';
10
+ import { InitializeEmbedStudioPayload, SaveDesignResultPayload as EmbedStudioSaveDesignResultPayload } from '../../modules/embed-studio/types';
11
11
  import { InitializeWhiteLabelPayload, GoToViewResultPayload, GoToViewPayload, SetupNotificationPayload } from '../../modules/white-label/types';
12
12
  import { OnShoppingCartUpdateEventPayload, OnContentSizeChangeEventPayload } from '../../modules/white-label/types/event/broadcastEventPayload.types';
13
13
  /** This file ensures that Iframe and SDK has the same source of truth for return values */
@@ -40,7 +40,6 @@ export interface IEdmModule {
40
40
  export interface IEmbedStudioModule {
41
41
  setup(config?: InitializeEmbedStudioPayload): NotificationEventPayload | void;
42
42
  saveDesign(): EmbedStudioSaveDesignResultPayload;
43
- setStoreContext(payload: SetStoreContextPayload): EmbedStudioSetStoreContextResultPayload;
44
43
  }
45
44
  export interface IEdmBroadcastModule {
46
45
  onDesignStatusUpdate(event: OnDesignStatusEventPayload): void;
@@ -1 +1 @@
1
- export declare const VERSION: "2.7.52";
1
+ export declare const VERSION: "2.7.54";
@@ -1,2 +1,2 @@
1
1
  // AUTO-GENERATED
2
- export const VERSION = '2.7.52';
2
+ export const VERSION = '2.7.54';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fyul/embed-sdk",
3
- "version": "2.7.52",
3
+ "version": "2.7.54",
4
4
  "description": "",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -1,8 +0,0 @@
1
- export interface JWTData {
2
- tid: string;
3
- nce: string;
4
- scp: string[];
5
- iat: number;
6
- exp: number;
7
- cid: string;
8
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- export interface JWTData {
2
- tid: string;
3
- nce: string;
4
- scp: string[];
5
- iat: number;
6
- exp: number;
7
- cid: string;
8
- }
@@ -1 +0,0 @@
1
- export {};