@fyul/embed-sdk 2.5.2 → 2.6.0
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/dist/cjs/helpers/messageLogger.d.ts +1 -0
- package/dist/cjs/helpers/messageLogger.js +2 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/modules/baseModule.d.ts +2 -2
- package/dist/cjs/modules/embed-studio/broadcastEvents/baseEmbedStudioBroadcastEvent.d.ts +6 -0
- package/dist/cjs/modules/embed-studio/broadcastEvents/baseEmbedStudioBroadcastEvent.js +10 -0
- package/dist/cjs/modules/embed-studio/broadcastEvents/onDesignStatusUpdate.d.ts +5 -0
- package/dist/cjs/modules/embed-studio/broadcastEvents/onDesignStatusUpdate.js +10 -0
- package/dist/cjs/modules/embed-studio/broadcastEvents/onErrorUpdate.d.ts +5 -0
- package/dist/cjs/modules/embed-studio/broadcastEvents/onErrorUpdate.js +10 -0
- package/dist/cjs/modules/embed-studio/embedStudioBroadcastModule.d.ts +9 -0
- package/dist/cjs/modules/embed-studio/embedStudioBroadcastModule.js +20 -0
- package/dist/cjs/modules/embed-studio/embedStudioModule.d.ts +10 -0
- package/dist/cjs/modules/embed-studio/embedStudioModule.js +21 -0
- package/dist/cjs/modules/embed-studio/events.d.ts +26 -0
- package/dist/cjs/modules/embed-studio/events.js +25 -0
- package/dist/cjs/modules/embed-studio/types/data.types.d.ts +46 -0
- package/dist/cjs/modules/embed-studio/types/data.types.js +2 -0
- package/dist/cjs/modules/embed-studio/types/event/actionEvent.types.d.ts +7 -0
- package/dist/cjs/modules/embed-studio/types/event/actionEvent.types.js +2 -0
- package/dist/cjs/modules/embed-studio/types/event/actionEventPayload.types.d.ts +9 -0
- package/dist/cjs/modules/embed-studio/types/event/actionEventPayload.types.js +2 -0
- package/dist/cjs/modules/embed-studio/types/event/broadcastEvent.types.d.ts +9 -0
- package/dist/cjs/modules/embed-studio/types/event/broadcastEvent.types.js +2 -0
- package/dist/cjs/modules/embed-studio/types/event/broadcastEventPayload.types.d.ts +4 -0
- package/dist/cjs/modules/embed-studio/types/event/broadcastEventPayload.types.js +2 -0
- package/dist/cjs/modules/embed-studio/types/event/resultEvent.types.d.ts +5 -0
- package/dist/cjs/modules/embed-studio/types/event/resultEvent.types.js +2 -0
- package/dist/cjs/modules/embed-studio/types/event/resultEventPayload.types.d.ts +5 -0
- package/dist/cjs/modules/embed-studio/types/event/resultEventPayload.types.js +2 -0
- package/dist/cjs/modules/embed-studio/types/index.d.ts +8 -0
- package/dist/cjs/modules/embed-studio/types/index.js +27 -0
- package/dist/cjs/modules/eventTypes.d.ts +2 -2
- package/dist/cjs/modules/events.d.ts +12 -6
- package/dist/cjs/modules/events.js +5 -0
- package/dist/cjs/modules/moduleNames.d.ts +1 -0
- package/dist/cjs/modules/moduleNames.js +1 -0
- package/dist/cjs/modules/modules.d.ts +3 -0
- package/dist/cjs/modules/modules.js +3 -0
- package/dist/cjs/modules/product-publish/types/event/actionEventPayload.types.d.ts +3 -0
- package/dist/cjs/services/embedCommunicator.d.ts +3 -3
- package/dist/cjs/services/embedCommunicator.js +1 -0
- package/dist/cjs/services/embedStudio.d.ts +20 -0
- package/dist/cjs/services/embedStudio.js +88 -0
- package/dist/cjs/types/event/action/actionEvent.types.d.ts +2 -1
- package/dist/cjs/types/event/action/actionEventPayload.types.d.ts +2 -1
- package/dist/cjs/types/event/result/resultEvent.types.d.ts +2 -1
- package/dist/cjs/types/event/result/resultEventPayload.types.d.ts +2 -1
- package/dist/cjs/types/module/module.types.d.ts +10 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/helpers/messageLogger.d.ts +1 -0
- package/dist/esm/helpers/messageLogger.js +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/modules/baseModule.d.ts +2 -2
- package/dist/esm/modules/embed-studio/broadcastEvents/baseEmbedStudioBroadcastEvent.d.ts +6 -0
- package/dist/esm/modules/embed-studio/broadcastEvents/baseEmbedStudioBroadcastEvent.js +6 -0
- package/dist/esm/modules/embed-studio/broadcastEvents/onDesignStatusUpdate.d.ts +5 -0
- package/dist/esm/modules/embed-studio/broadcastEvents/onDesignStatusUpdate.js +6 -0
- package/dist/esm/modules/embed-studio/broadcastEvents/onErrorUpdate.d.ts +5 -0
- package/dist/esm/modules/embed-studio/broadcastEvents/onErrorUpdate.js +6 -0
- package/dist/esm/modules/embed-studio/embedStudioBroadcastModule.d.ts +9 -0
- package/dist/esm/modules/embed-studio/embedStudioBroadcastModule.js +16 -0
- package/dist/esm/modules/embed-studio/embedStudioModule.d.ts +10 -0
- package/dist/esm/modules/embed-studio/embedStudioModule.js +17 -0
- package/dist/esm/modules/embed-studio/events.d.ts +26 -0
- package/dist/esm/modules/embed-studio/events.js +22 -0
- package/dist/esm/modules/embed-studio/types/data.types.d.ts +46 -0
- package/dist/esm/modules/embed-studio/types/data.types.js +1 -0
- package/dist/esm/modules/embed-studio/types/event/actionEvent.types.d.ts +7 -0
- package/dist/esm/modules/embed-studio/types/event/actionEvent.types.js +1 -0
- package/dist/esm/modules/embed-studio/types/event/actionEventPayload.types.d.ts +9 -0
- package/dist/esm/modules/embed-studio/types/event/actionEventPayload.types.js +1 -0
- package/dist/esm/modules/embed-studio/types/event/broadcastEvent.types.d.ts +9 -0
- package/dist/esm/modules/embed-studio/types/event/broadcastEvent.types.js +1 -0
- package/dist/esm/modules/embed-studio/types/event/broadcastEventPayload.types.d.ts +4 -0
- package/dist/esm/modules/embed-studio/types/event/broadcastEventPayload.types.js +1 -0
- package/dist/esm/modules/embed-studio/types/event/resultEvent.types.d.ts +5 -0
- package/dist/esm/modules/embed-studio/types/event/resultEvent.types.js +1 -0
- package/dist/esm/modules/embed-studio/types/event/resultEventPayload.types.d.ts +5 -0
- package/dist/esm/modules/embed-studio/types/event/resultEventPayload.types.js +1 -0
- package/dist/esm/modules/embed-studio/types/index.d.ts +8 -0
- package/dist/esm/modules/embed-studio/types/index.js +11 -0
- package/dist/esm/modules/eventTypes.d.ts +2 -2
- package/dist/esm/modules/events.d.ts +12 -6
- package/dist/esm/modules/events.js +5 -0
- package/dist/esm/modules/moduleNames.d.ts +1 -0
- package/dist/esm/modules/moduleNames.js +1 -0
- package/dist/esm/modules/modules.d.ts +3 -0
- package/dist/esm/modules/modules.js +3 -0
- package/dist/esm/modules/product-publish/types/event/actionEventPayload.types.d.ts +3 -0
- package/dist/esm/services/embedCommunicator.d.ts +3 -3
- package/dist/esm/services/embedCommunicator.js +1 -0
- package/dist/esm/services/embedStudio.d.ts +20 -0
- package/dist/esm/services/embedStudio.js +84 -0
- package/dist/esm/types/event/action/actionEvent.types.d.ts +2 -1
- package/dist/esm/types/event/action/actionEventPayload.types.d.ts +2 -1
- package/dist/esm/types/event/result/resultEvent.types.d.ts +2 -1
- package/dist/esm/types/event/result/resultEventPayload.types.d.ts +2 -1
- package/dist/esm/types/module/module.types.d.ts +10 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ exports.SOURCES = {
|
|
|
13
13
|
HOST: 'Host',
|
|
14
14
|
SDK: 'SDK',
|
|
15
15
|
EDM: 'EDM',
|
|
16
|
+
EMBED_STUDIO: 'EmbedStudio',
|
|
16
17
|
WHITE_LABEL: 'WhiteLabel',
|
|
17
18
|
};
|
|
18
19
|
exports.messageLoggerState = {
|
|
@@ -34,6 +35,7 @@ function getSourceStyle(source) {
|
|
|
34
35
|
font-weight: bold;
|
|
35
36
|
`;
|
|
36
37
|
case exports.SOURCES.EDM:
|
|
38
|
+
case exports.SOURCES.EMBED_STUDIO:
|
|
37
39
|
case exports.SOURCES.SDK:
|
|
38
40
|
case exports.SOURCES.WHITE_LABEL:
|
|
39
41
|
return `
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Embed } from './services/embed';
|
|
2
2
|
export { EDM } from './services/edm';
|
|
3
|
+
export { EmbedStudio } from './services/embedStudio';
|
|
3
4
|
export { WhiteLabel } from './services/whiteLabel';
|
|
4
5
|
export * from './types/event/event.types';
|
|
5
6
|
export * from './types/event/eventPayload.types';
|
|
@@ -16,6 +17,7 @@ export * as MockupGenerationModule from './modules/mockup-generation/types';
|
|
|
16
17
|
export * as ProductPublishModule from './modules/product-publish/types';
|
|
17
18
|
export * as SdkModule from './modules/sdk/types';
|
|
18
19
|
export * as EdmModule from './modules/edm/types';
|
|
20
|
+
export * as EmbedStudioModule from './modules/embed-studio/types';
|
|
19
21
|
export * as WhiteLabelModule from './modules/white-label/types';
|
|
20
22
|
export { ALL_EVENTS } from './modules/events';
|
|
21
23
|
export { MODULE_NAMES } from './modules/modules';
|
package/dist/cjs/index.js
CHANGED
|
@@ -36,11 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.ProductPublishService = exports.MockupService = exports.CatalogService = exports.getVariantImageGallery = exports.getSortedVariantList = exports.isErrorNotification = exports.isNotificationPayload = exports.handleResponse = exports.SOURCES = exports.LOG_TYPES = exports.setLoggerState = exports.logEmbedMessage = exports.VERSION = exports.EVENT_TYPES = exports.MODULE_NAMES = exports.ALL_EVENTS = exports.WhiteLabelModule = exports.EdmModule = exports.SdkModule = exports.ProductPublishModule = exports.MockupGenerationModule = exports.CatalogModule = exports.WhiteLabel = exports.EDM = exports.Embed = void 0;
|
|
39
|
+
exports.ProductPublishService = exports.MockupService = exports.CatalogService = exports.getVariantImageGallery = exports.getSortedVariantList = exports.isErrorNotification = exports.isNotificationPayload = exports.handleResponse = exports.SOURCES = exports.LOG_TYPES = exports.setLoggerState = exports.logEmbedMessage = exports.VERSION = exports.EVENT_TYPES = exports.MODULE_NAMES = exports.ALL_EVENTS = exports.WhiteLabelModule = exports.EmbedStudioModule = exports.EdmModule = exports.SdkModule = exports.ProductPublishModule = exports.MockupGenerationModule = exports.CatalogModule = exports.WhiteLabel = exports.EmbedStudio = exports.EDM = exports.Embed = void 0;
|
|
40
40
|
var embed_1 = require("./services/embed");
|
|
41
41
|
Object.defineProperty(exports, "Embed", { enumerable: true, get: function () { return embed_1.Embed; } });
|
|
42
42
|
var edm_1 = require("./services/edm");
|
|
43
43
|
Object.defineProperty(exports, "EDM", { enumerable: true, get: function () { return edm_1.EDM; } });
|
|
44
|
+
var embedStudio_1 = require("./services/embedStudio");
|
|
45
|
+
Object.defineProperty(exports, "EmbedStudio", { enumerable: true, get: function () { return embedStudio_1.EmbedStudio; } });
|
|
44
46
|
var whiteLabel_1 = require("./services/whiteLabel");
|
|
45
47
|
Object.defineProperty(exports, "WhiteLabel", { enumerable: true, get: function () { return whiteLabel_1.WhiteLabel; } });
|
|
46
48
|
/* EXPORTS */
|
|
@@ -62,6 +64,7 @@ exports.MockupGenerationModule = __importStar(require("./modules/mockup-generati
|
|
|
62
64
|
exports.ProductPublishModule = __importStar(require("./modules/product-publish/types"));
|
|
63
65
|
exports.SdkModule = __importStar(require("./modules/sdk/types"));
|
|
64
66
|
exports.EdmModule = __importStar(require("./modules/edm/types"));
|
|
67
|
+
exports.EmbedStudioModule = __importStar(require("./modules/embed-studio/types"));
|
|
65
68
|
exports.WhiteLabelModule = __importStar(require("./modules/white-label/types"));
|
|
66
69
|
// Constants
|
|
67
70
|
var events_1 = require("./modules/events");
|
|
@@ -4,7 +4,7 @@ import { ResultEventPayload } from '../types/event/result/resultEventPayload.typ
|
|
|
4
4
|
import { NotificationEventPayload } from '../types/event/notification/notificationEventPayload.types';
|
|
5
5
|
import type { MODULE_NAMES } from '../modules/moduleNames';
|
|
6
6
|
export declare abstract class BaseModule {
|
|
7
|
-
protected moduleType: typeof MODULE_NAMES.SDK | typeof MODULE_NAMES.EDM | typeof MODULE_NAMES.WHITE_LABEL;
|
|
8
|
-
constructor(moduleType: typeof MODULE_NAMES.SDK | typeof MODULE_NAMES.EDM | typeof MODULE_NAMES.WHITE_LABEL);
|
|
7
|
+
protected moduleType: typeof MODULE_NAMES.SDK | typeof MODULE_NAMES.EDM | typeof MODULE_NAMES.EMBED_STUDIO | typeof MODULE_NAMES.WHITE_LABEL;
|
|
8
|
+
constructor(moduleType: typeof MODULE_NAMES.SDK | typeof MODULE_NAMES.EDM | typeof MODULE_NAMES.EMBED_STUDIO | typeof MODULE_NAMES.WHITE_LABEL);
|
|
9
9
|
protected sendRequest<T extends ResultEventPayload | NotificationEventPayload>(eventName: ActionEventName, eventPayload?: ActionEventPayload): Promise<T>;
|
|
10
10
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BroadcastEventPayload } from '../../../modules/embed-studio/types/event/broadcastEventPayload.types';
|
|
2
|
+
import { BaseBroadcastEventHandler } from '../../../types/event/broadcast/baseBroadcastEventHandler';
|
|
3
|
+
export declare abstract class BaseEmbedStudioBroadcastEvent implements BaseBroadcastEventHandler {
|
|
4
|
+
abstract handle(event: BroadcastEventPayload): void;
|
|
5
|
+
get broadcastHandler(): import("../embedStudioBroadcastModule").EmbedStudioBroadcastModule;
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseEmbedStudioBroadcastEvent = void 0;
|
|
4
|
+
const embedStudio_1 = require("../../../services/embedStudio");
|
|
5
|
+
class BaseEmbedStudioBroadcastEvent {
|
|
6
|
+
get broadcastHandler() {
|
|
7
|
+
return embedStudio_1.EmbedStudio.getBroadCastEventHandler();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.BaseEmbedStudioBroadcastEvent = BaseEmbedStudioBroadcastEvent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OnDesignStatusEventPayload } from '../../../modules/embed-studio/types/event/broadcastEventPayload.types';
|
|
2
|
+
import { BaseEmbedStudioBroadcastEvent } from '../../../modules/embed-studio/broadcastEvents/baseEmbedStudioBroadcastEvent';
|
|
3
|
+
export declare class OnDesignStatusUpdate extends BaseEmbedStudioBroadcastEvent {
|
|
4
|
+
handle(event: OnDesignStatusEventPayload): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnDesignStatusUpdate = void 0;
|
|
4
|
+
const baseEmbedStudioBroadcastEvent_1 = require("../../../modules/embed-studio/broadcastEvents/baseEmbedStudioBroadcastEvent");
|
|
5
|
+
class OnDesignStatusUpdate extends baseEmbedStudioBroadcastEvent_1.BaseEmbedStudioBroadcastEvent {
|
|
6
|
+
handle(event) {
|
|
7
|
+
this.broadcastHandler.onDesignStatusUpdate(event);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.OnDesignStatusUpdate = OnDesignStatusUpdate;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OnErrorEventPayload } from '../../../modules/embed-studio/types/event/broadcastEventPayload.types';
|
|
2
|
+
import { BaseEmbedStudioBroadcastEvent } from '../../../modules/embed-studio/broadcastEvents/baseEmbedStudioBroadcastEvent';
|
|
3
|
+
export declare class OnErrorUpdate extends BaseEmbedStudioBroadcastEvent {
|
|
4
|
+
handle(event: OnErrorEventPayload): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnErrorUpdate = void 0;
|
|
4
|
+
const baseEmbedStudioBroadcastEvent_1 = require("../../../modules/embed-studio/broadcastEvents/baseEmbedStudioBroadcastEvent");
|
|
5
|
+
class OnErrorUpdate extends baseEmbedStudioBroadcastEvent_1.BaseEmbedStudioBroadcastEvent {
|
|
6
|
+
handle(event) {
|
|
7
|
+
this.broadcastHandler.onErrorUpdate(event);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.OnErrorUpdate = OnErrorUpdate;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IEmbedStudioBroadcastModule } from '../../types/module/module.types';
|
|
2
|
+
import { EmbedStudioBroadcastListeners } from '../../modules/embed-studio/types/event/broadcastEvent.types';
|
|
3
|
+
import { OnDesignStatusEventPayload, OnErrorEventPayload } from '../../modules/embed-studio/types/event/broadcastEventPayload.types';
|
|
4
|
+
export declare class EmbedStudioBroadcastModule implements IEmbedStudioBroadcastModule {
|
|
5
|
+
protected listeners?: Partial<EmbedStudioBroadcastListeners>;
|
|
6
|
+
constructor(listeners?: Partial<EmbedStudioBroadcastListeners>);
|
|
7
|
+
onDesignStatusUpdate(event: OnDesignStatusEventPayload): void;
|
|
8
|
+
onErrorUpdate(event: OnErrorEventPayload): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmbedStudioBroadcastModule = void 0;
|
|
4
|
+
class EmbedStudioBroadcastModule {
|
|
5
|
+
listeners;
|
|
6
|
+
constructor(listeners) {
|
|
7
|
+
this.listeners = listeners;
|
|
8
|
+
}
|
|
9
|
+
onDesignStatusUpdate(event) {
|
|
10
|
+
if (this.listeners?.onDesignStatusUpdate) {
|
|
11
|
+
this.listeners.onDesignStatusUpdate(event);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
onErrorUpdate(event) {
|
|
15
|
+
if (this.listeners?.onError) {
|
|
16
|
+
this.listeners.onError(event);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.EmbedStudioBroadcastModule = EmbedStudioBroadcastModule;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IEmbedStudioModule } from '../../types/module/module.types';
|
|
2
|
+
import { BaseModule } from '../../modules/baseModule';
|
|
3
|
+
import { InitializeEmbedStudioPayload, SaveDesignResultPayload } from './types';
|
|
4
|
+
import { NotificationEventPayload } from '../../types/event/notification/notificationEventPayload.types';
|
|
5
|
+
import { WithHandledResponses } from '../../helpers/typeHelper.types';
|
|
6
|
+
export declare class EmbedStudioModule extends BaseModule implements WithHandledResponses<IEmbedStudioModule> {
|
|
7
|
+
constructor();
|
|
8
|
+
setup(payload?: InitializeEmbedStudioPayload): Promise<NotificationEventPayload>;
|
|
9
|
+
saveDesign(): Promise<import("../..").HandledResponse<SaveDesignResultPayload, Error>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmbedStudioModule = void 0;
|
|
4
|
+
const baseModule_1 = require("../../modules/baseModule");
|
|
5
|
+
const events_1 = require("./events");
|
|
6
|
+
const responseHandler_1 = require("../../helpers/responseHandler");
|
|
7
|
+
const modules_1 = require("../../modules/modules");
|
|
8
|
+
class EmbedStudioModule extends baseModule_1.BaseModule {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(modules_1.MODULE_NAMES.EMBED_STUDIO);
|
|
11
|
+
}
|
|
12
|
+
// @ts-expect-error setup does not return data
|
|
13
|
+
async setup(payload) {
|
|
14
|
+
return await this.sendRequest(events_1.EVENTS_ACTION.INITIALIZE_EMBED_STUDIO, payload);
|
|
15
|
+
}
|
|
16
|
+
async saveDesign() {
|
|
17
|
+
const response = await this.sendRequest(events_1.EVENTS_ACTION.SAVE_DESIGN, {}).catch((e) => e);
|
|
18
|
+
return (0, responseHandler_1.handleResponse)(response, 'Failed to save design');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.EmbedStudioModule = EmbedStudioModule;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const EVENTS_ACTION: {
|
|
2
|
+
readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
|
|
3
|
+
readonly SAVE_DESIGN: "actionSaveDesign";
|
|
4
|
+
readonly SET_STORE_CONTEXT: "actionSetStoreContext";
|
|
5
|
+
};
|
|
6
|
+
export declare const EVENTS_NOTIFICATION: {
|
|
7
|
+
readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
|
|
8
|
+
readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
|
|
9
|
+
};
|
|
10
|
+
export declare const EVENTS_RESULT: {
|
|
11
|
+
readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
|
|
12
|
+
};
|
|
13
|
+
export declare const EVENT_BROADCAST: {
|
|
14
|
+
readonly ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
|
|
15
|
+
readonly ON_INTERNAL_ERROR: "onError";
|
|
16
|
+
};
|
|
17
|
+
export declare const EVENTS: {
|
|
18
|
+
readonly ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
|
|
19
|
+
readonly ON_INTERNAL_ERROR: "onError";
|
|
20
|
+
readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
|
|
21
|
+
readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
|
|
22
|
+
readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
|
|
23
|
+
readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
|
|
24
|
+
readonly SAVE_DESIGN: "actionSaveDesign";
|
|
25
|
+
readonly SET_STORE_CONTEXT: "actionSetStoreContext";
|
|
26
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EVENTS = exports.EVENT_BROADCAST = exports.EVENTS_RESULT = exports.EVENTS_NOTIFICATION = exports.EVENTS_ACTION = void 0;
|
|
4
|
+
exports.EVENTS_ACTION = {
|
|
5
|
+
INITIALIZE_EMBED_STUDIO: 'actionInitializeEdm',
|
|
6
|
+
SAVE_DESIGN: 'actionSaveDesign',
|
|
7
|
+
SET_STORE_CONTEXT: 'actionSetStoreContext',
|
|
8
|
+
};
|
|
9
|
+
exports.EVENTS_NOTIFICATION = {
|
|
10
|
+
EMBED_STUDIO_INITIALIZATION_SUCCESS: 'notificationEdmInitializationSuccess',
|
|
11
|
+
SAVE_DESIGN_FAILURE: 'actionSaveDesignFailure',
|
|
12
|
+
};
|
|
13
|
+
exports.EVENTS_RESULT = {
|
|
14
|
+
SAVE_DESIGN_RESULT: 'resultSaveDesign',
|
|
15
|
+
};
|
|
16
|
+
exports.EVENT_BROADCAST = {
|
|
17
|
+
ON_DESIGN_STATUS_UPDATE: 'onDesignStatusUpdate',
|
|
18
|
+
ON_INTERNAL_ERROR: 'onError',
|
|
19
|
+
};
|
|
20
|
+
exports.EVENTS = {
|
|
21
|
+
...exports.EVENTS_ACTION,
|
|
22
|
+
...exports.EVENTS_NOTIFICATION,
|
|
23
|
+
...exports.EVENTS_RESULT,
|
|
24
|
+
...exports.EVENT_BROADCAST,
|
|
25
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface EmbedStudioConfig {
|
|
2
|
+
}
|
|
3
|
+
export type EmbedStudioParams = ({
|
|
4
|
+
element: HTMLElement;
|
|
5
|
+
elementId?: null;
|
|
6
|
+
} & EmbedStudioCommonParams) | ({
|
|
7
|
+
elementId: string;
|
|
8
|
+
element?: null;
|
|
9
|
+
} & EmbedStudioCommonParams);
|
|
10
|
+
export interface EmbedStudioCommonParams {
|
|
11
|
+
nonce: string;
|
|
12
|
+
externalProductId: string;
|
|
13
|
+
iframeClassName?: string;
|
|
14
|
+
origin?: string;
|
|
15
|
+
initProduct?: {
|
|
16
|
+
productId: number;
|
|
17
|
+
printProviderId?: number;
|
|
18
|
+
technique?: string;
|
|
19
|
+
forceOrientation?: 'horizontal' | 'vertical' | string;
|
|
20
|
+
};
|
|
21
|
+
debug?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface Message {
|
|
24
|
+
type: string;
|
|
25
|
+
message: string;
|
|
26
|
+
messageCode: string;
|
|
27
|
+
}
|
|
28
|
+
export interface FyulTemplate {
|
|
29
|
+
id: string;
|
|
30
|
+
external_product_id: string;
|
|
31
|
+
colors: string[];
|
|
32
|
+
sizes: string[];
|
|
33
|
+
technique: string;
|
|
34
|
+
}
|
|
35
|
+
export interface OnDesignStatusEvent {
|
|
36
|
+
designChanged: boolean;
|
|
37
|
+
designValid: boolean;
|
|
38
|
+
usedPlacements: string[];
|
|
39
|
+
selectedVariantIds: number[];
|
|
40
|
+
subTechnique: string;
|
|
41
|
+
errors: string[];
|
|
42
|
+
fatalErrors: Message[];
|
|
43
|
+
}
|
|
44
|
+
export interface OnErrorEvent {
|
|
45
|
+
error: string | Error;
|
|
46
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EVENTS_ACTION } from '../../../../modules/embed-studio/events';
|
|
2
|
+
import { InitializeEmbedStudioPayload, SetStoreContextPayload } from '../../../../modules/embed-studio/types';
|
|
3
|
+
import { BaseActionEvent } from '../../../../types/event/action/actionEvent.types';
|
|
4
|
+
export type InitializeEmbedStudioAction = BaseActionEvent<typeof EVENTS_ACTION.INITIALIZE_EMBED_STUDIO, InitializeEmbedStudioPayload>;
|
|
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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EmbedStudioConfig, EmbedStudioParams } from '../../../../modules/embed-studio/types/data.types';
|
|
2
|
+
export type InitializeEmbedStudioPayload = EmbedStudioConfig & EmbedStudioParams & InitializeEmbedStudioPayloadWithVersion;
|
|
3
|
+
export interface InitializeEmbedStudioPayloadWithVersion {
|
|
4
|
+
clientVersion: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SetStoreContextPayload {
|
|
7
|
+
storeId: string;
|
|
8
|
+
}
|
|
9
|
+
export type ActionEventPayload = InitializeEmbedStudioPayloadWithVersion | SetStoreContextPayload;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EVENT_BROADCAST } from '../../../../modules/embed-studio/events';
|
|
2
|
+
import { BaseBroadcastEvent } from '../../../../types/event/broadcast/broadcastEvent.types';
|
|
3
|
+
import { OnDesignStatusEventPayload, OnErrorEventPayload } from '../../../../modules/embed-studio/types/event/broadcastEventPayload.types';
|
|
4
|
+
export type OnDesignStatusUpdateBroadcast = BaseBroadcastEvent<typeof EVENT_BROADCAST.ON_DESIGN_STATUS_UPDATE, OnDesignStatusEventPayload>;
|
|
5
|
+
export type OnErrorUpdateBroadcast = BaseBroadcastEvent<typeof EVENT_BROADCAST.ON_INTERNAL_ERROR, OnErrorEventPayload>;
|
|
6
|
+
export type EmbedStudioBroadcastEvent = OnDesignStatusUpdateBroadcast | OnErrorUpdateBroadcast;
|
|
7
|
+
export type EmbedStudioBroadcastListeners = {
|
|
8
|
+
[K in EmbedStudioBroadcastEvent as K['name']]: (event: Exclude<K['payload'], undefined>) => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { OnDesignStatusEvent, OnErrorEvent } from '../../../../modules/embed-studio/types/data.types';
|
|
2
|
+
export type OnDesignStatusEventPayload = OnDesignStatusEvent;
|
|
3
|
+
export type OnErrorEventPayload = OnErrorEvent;
|
|
4
|
+
export type BroadcastEventPayload = OnDesignStatusEventPayload | OnErrorEventPayload;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseResultEvent } from '../../../../types/event/result/resultEvent.types';
|
|
2
|
+
import type { EVENTS_RESULT } from '../../../../modules/embed-studio/events';
|
|
3
|
+
import { SaveDesignResultPayload } from '../../../../modules/embed-studio/types/event/resultEventPayload.types';
|
|
4
|
+
export type SaveDesignResultEvent = BaseResultEvent<typeof EVENTS_RESULT.SAVE_DESIGN_RESULT, SaveDesignResultPayload>;
|
|
5
|
+
export type ResultEvent = SaveDesignResultEvent;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from '../../../modules/embed-studio/types/data.types';
|
|
2
|
+
export * from '../../../modules/embed-studio/types/event/actionEvent.types';
|
|
3
|
+
export * from '../../../modules/embed-studio/types/event/actionEventPayload.types';
|
|
4
|
+
export * from '../../../modules/embed-studio/types/event/resultEvent.types';
|
|
5
|
+
export * from '../../../modules/embed-studio/types/event/resultEventPayload.types';
|
|
6
|
+
export * from '../../../modules/embed-studio/types/event/broadcastEventPayload.types';
|
|
7
|
+
export * from '../../../modules/embed-studio/types/event/broadcastEvent.types';
|
|
8
|
+
export * from '../../../modules/embed-studio/events';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Data types
|
|
18
|
+
__exportStar(require("../../../modules/embed-studio/types/data.types"), exports);
|
|
19
|
+
// Event types
|
|
20
|
+
__exportStar(require("../../../modules/embed-studio/types/event/actionEvent.types"), exports);
|
|
21
|
+
__exportStar(require("../../../modules/embed-studio/types/event/actionEventPayload.types"), exports);
|
|
22
|
+
__exportStar(require("../../../modules/embed-studio/types/event/resultEvent.types"), exports);
|
|
23
|
+
__exportStar(require("../../../modules/embed-studio/types/event/resultEventPayload.types"), exports);
|
|
24
|
+
__exportStar(require("../../../modules/embed-studio/types/event/broadcastEventPayload.types"), exports);
|
|
25
|
+
__exportStar(require("../../../modules/embed-studio/types/event/broadcastEvent.types"), exports);
|
|
26
|
+
// Event names
|
|
27
|
+
__exportStar(require("../../../modules/embed-studio/events"), exports);
|
|
@@ -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;
|
|
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;
|
|
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("./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;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare const ALL_ACTION_EVENTS: {
|
|
2
2
|
readonly INITIALIZE_WHITE_LABEL: "actionInitializeWhiteLabel";
|
|
3
3
|
readonly GO_TO_VIEW: "actionGoToView";
|
|
4
|
-
readonly
|
|
4
|
+
readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
|
|
5
5
|
readonly SAVE_DESIGN: "actionSaveDesign";
|
|
6
|
+
readonly SET_STORE_CONTEXT: "actionSetStoreContext";
|
|
7
|
+
readonly INITIALIZE_EDM: "actionInitializeEdm";
|
|
6
8
|
readonly ADD_IMAGE: "actionAddImage";
|
|
7
9
|
readonly SET_STYLE: "actionSetStyle";
|
|
8
10
|
readonly NAVIGATE_STEP: "actionNavigateStep";
|
|
@@ -23,8 +25,9 @@ export declare const ALL_ACTION_EVENTS: {
|
|
|
23
25
|
export declare const ALL_NOTIFICATION_EVENTS: {
|
|
24
26
|
readonly WHITE_LABEL_INITIALIZATION_SUCCESS: "notificationWhiteLabelInitializationSuccess";
|
|
25
27
|
readonly GO_TO_VIEW_FAILURE: "actionGoToViewFailure";
|
|
26
|
-
readonly
|
|
28
|
+
readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
|
|
27
29
|
readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
|
|
30
|
+
readonly EDM_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
|
|
28
31
|
readonly ADD_IMAGE_FAILURE: "actionAddImageFailure";
|
|
29
32
|
readonly SET_STYLE_FAILURE: "actionSetStyleFailure";
|
|
30
33
|
readonly NAVIGATE_STEP_FAILURE: "actionNavigateStepFailure";
|
|
@@ -60,18 +63,18 @@ export declare const ALL_RESULT_EVENTS: {
|
|
|
60
63
|
export declare const ALL_BROADCAST_EVENTS: {
|
|
61
64
|
ON_SHOPPING_CART_UPDATE: "onShoppingCartUpdate";
|
|
62
65
|
ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
|
|
66
|
+
ON_INTERNAL_ERROR: "onError";
|
|
63
67
|
ON_PRICING_STATUS_UPDATE: "onPricingStatusUpdate";
|
|
64
68
|
ON_FILE_PICKER_REQUESTED: "onFilePickerRequested";
|
|
65
69
|
ON_STEP_STATUS_UPDATE: "onStepStatusUpdate";
|
|
66
|
-
ON_INTERNAL_ERROR: "onError";
|
|
67
70
|
};
|
|
68
71
|
export declare const ALL_EVENTS: {
|
|
69
72
|
readonly ON_SHOPPING_CART_UPDATE: "onShoppingCartUpdate";
|
|
70
73
|
readonly ON_DESIGN_STATUS_UPDATE: "onDesignStatusUpdate";
|
|
74
|
+
readonly ON_INTERNAL_ERROR: "onError";
|
|
71
75
|
readonly ON_PRICING_STATUS_UPDATE: "onPricingStatusUpdate";
|
|
72
76
|
readonly ON_FILE_PICKER_REQUESTED: "onFilePickerRequested";
|
|
73
77
|
readonly ON_STEP_STATUS_UPDATE: "onStepStatusUpdate";
|
|
74
|
-
readonly ON_INTERNAL_ERROR: "onError";
|
|
75
78
|
readonly GO_TO_VIEW_RESULT: "resultGoToView";
|
|
76
79
|
readonly SAVE_DESIGN_RESULT: "resultSaveDesign";
|
|
77
80
|
readonly ADD_IMAGE_RESULT: "resultAddImage";
|
|
@@ -89,8 +92,9 @@ export declare const ALL_EVENTS: {
|
|
|
89
92
|
readonly GET_CATALOG_CATEGORIES_RESULT: "resultGetCatalogCategories";
|
|
90
93
|
readonly WHITE_LABEL_INITIALIZATION_SUCCESS: "notificationWhiteLabelInitializationSuccess";
|
|
91
94
|
readonly GO_TO_VIEW_FAILURE: "actionGoToViewFailure";
|
|
92
|
-
readonly
|
|
95
|
+
readonly EMBED_STUDIO_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
|
|
93
96
|
readonly SAVE_DESIGN_FAILURE: "actionSaveDesignFailure";
|
|
97
|
+
readonly EDM_INITIALIZATION_SUCCESS: "notificationEdmInitializationSuccess";
|
|
94
98
|
readonly ADD_IMAGE_FAILURE: "actionAddImageFailure";
|
|
95
99
|
readonly SET_STYLE_FAILURE: "actionSetStyleFailure";
|
|
96
100
|
readonly NAVIGATE_STEP_FAILURE: "actionNavigateStepFailure";
|
|
@@ -107,8 +111,10 @@ export declare const ALL_EVENTS: {
|
|
|
107
111
|
readonly SDK_INITIALIZATION_SUCCESS: "notificationSdkInitializationSuccess";
|
|
108
112
|
readonly INITIALIZE_WHITE_LABEL: "actionInitializeWhiteLabel";
|
|
109
113
|
readonly GO_TO_VIEW: "actionGoToView";
|
|
110
|
-
readonly
|
|
114
|
+
readonly INITIALIZE_EMBED_STUDIO: "actionInitializeEdm";
|
|
111
115
|
readonly SAVE_DESIGN: "actionSaveDesign";
|
|
116
|
+
readonly SET_STORE_CONTEXT: "actionSetStoreContext";
|
|
117
|
+
readonly INITIALIZE_EDM: "actionInitializeEdm";
|
|
112
118
|
readonly ADD_IMAGE: "actionAddImage";
|
|
113
119
|
readonly SET_STYLE: "actionSetStyle";
|
|
114
120
|
readonly NAVIGATE_STEP: "actionNavigateStep";
|
|
@@ -39,6 +39,7 @@ const EVENTS_CATALOG = __importStar(require("./catalog/events"));
|
|
|
39
39
|
const EVENTS_MOCKUP_GENERATION = __importStar(require("./mockup-generation/events"));
|
|
40
40
|
const EVENTS_PRODUCT_PUBLISH = __importStar(require("./product-publish/events"));
|
|
41
41
|
const EVENTS_EDM = __importStar(require("./edm/events"));
|
|
42
|
+
const EVENTS_EMBED_STUDIO = __importStar(require("./embed-studio/events"));
|
|
42
43
|
const EVENTS_WHITE_LABEL = __importStar(require("./white-label/events"));
|
|
43
44
|
exports.ALL_ACTION_EVENTS = {
|
|
44
45
|
...EVENTS_SDK.EVENTS_ACTION,
|
|
@@ -46,6 +47,7 @@ exports.ALL_ACTION_EVENTS = {
|
|
|
46
47
|
...EVENTS_MOCKUP_GENERATION.EVENTS_ACTION,
|
|
47
48
|
...EVENTS_PRODUCT_PUBLISH.EVENTS_ACTION,
|
|
48
49
|
...EVENTS_EDM.EVENTS_ACTION,
|
|
50
|
+
...EVENTS_EMBED_STUDIO.EVENTS_ACTION,
|
|
49
51
|
...EVENTS_WHITE_LABEL.EVENTS_ACTION,
|
|
50
52
|
};
|
|
51
53
|
exports.ALL_NOTIFICATION_EVENTS = {
|
|
@@ -54,6 +56,7 @@ exports.ALL_NOTIFICATION_EVENTS = {
|
|
|
54
56
|
...EVENTS_MOCKUP_GENERATION.EVENTS_NOTIFICATION,
|
|
55
57
|
...EVENTS_PRODUCT_PUBLISH.EVENTS_NOTIFICATION,
|
|
56
58
|
...EVENTS_EDM.EVENTS_NOTIFICATION,
|
|
59
|
+
...EVENTS_EMBED_STUDIO.EVENTS_NOTIFICATION,
|
|
57
60
|
...EVENTS_WHITE_LABEL.EVENTS_NOTIFICATION,
|
|
58
61
|
};
|
|
59
62
|
exports.ALL_RESULT_EVENTS = {
|
|
@@ -62,10 +65,12 @@ exports.ALL_RESULT_EVENTS = {
|
|
|
62
65
|
...EVENTS_MOCKUP_GENERATION.EVENTS_RESULT,
|
|
63
66
|
...EVENTS_PRODUCT_PUBLISH.EVENTS_RESULT,
|
|
64
67
|
...EVENTS_EDM.EVENTS_RESULT,
|
|
68
|
+
...EVENTS_EMBED_STUDIO.EVENTS_RESULT,
|
|
65
69
|
...EVENTS_WHITE_LABEL.EVENTS_RESULT,
|
|
66
70
|
};
|
|
67
71
|
exports.ALL_BROADCAST_EVENTS = {
|
|
68
72
|
...EVENTS_EDM.EVENT_BROADCAST,
|
|
73
|
+
...EVENTS_EMBED_STUDIO.EVENT_BROADCAST,
|
|
69
74
|
...EVENTS_WHITE_LABEL.EVENT_BROADCAST,
|
|
70
75
|
};
|
|
71
76
|
exports.ALL_EVENTS = {
|
|
@@ -3,6 +3,7 @@ import { CatalogModule } from './catalog/catalogModule';
|
|
|
3
3
|
import { MockupGenerationModule } from './mockup-generation/mockupGenerationModule';
|
|
4
4
|
import { ProductPublishModule } from './product-publish/productPublishModule';
|
|
5
5
|
import { EdmModule } from '../modules/edm/edmModule';
|
|
6
|
+
import { EmbedStudioModule } from '../modules/embed-studio/embedStudioModule';
|
|
6
7
|
import { WhiteLabelModule } from '../modules/white-label/whiteLabelModule';
|
|
7
8
|
import { MODULE_NAMES } from './moduleNames';
|
|
8
9
|
export { MODULE_NAMES };
|
|
@@ -12,6 +13,7 @@ export declare const MODULES: {
|
|
|
12
13
|
mockupGeneration: typeof MockupGenerationModule;
|
|
13
14
|
productPublish: typeof ProductPublishModule;
|
|
14
15
|
edm: typeof EdmModule;
|
|
16
|
+
embedStudio: typeof EmbedStudioModule;
|
|
15
17
|
whiteLabel: typeof WhiteLabelModule;
|
|
16
18
|
};
|
|
17
19
|
export declare const MODULE_DEPENDENCY_MAP: {
|
|
@@ -20,5 +22,6 @@ export declare const MODULE_DEPENDENCY_MAP: {
|
|
|
20
22
|
mockupGeneration: "sdk";
|
|
21
23
|
productPublish: "sdk";
|
|
22
24
|
edm: "edm";
|
|
25
|
+
embedStudio: "embedStudio";
|
|
23
26
|
whiteLabel: "whiteLabel";
|
|
24
27
|
};
|
|
@@ -6,6 +6,7 @@ const catalogModule_1 = require("./catalog/catalogModule");
|
|
|
6
6
|
const mockupGenerationModule_1 = require("./mockup-generation/mockupGenerationModule");
|
|
7
7
|
const productPublishModule_1 = require("./product-publish/productPublishModule");
|
|
8
8
|
const edmModule_1 = require("../modules/edm/edmModule");
|
|
9
|
+
const embedStudioModule_1 = require("../modules/embed-studio/embedStudioModule");
|
|
9
10
|
const whiteLabelModule_1 = require("../modules/white-label/whiteLabelModule");
|
|
10
11
|
const moduleNames_1 = require("./moduleNames");
|
|
11
12
|
Object.defineProperty(exports, "MODULE_NAMES", { enumerable: true, get: function () { return moduleNames_1.MODULE_NAMES; } });
|
|
@@ -15,6 +16,7 @@ exports.MODULES = {
|
|
|
15
16
|
[moduleNames_1.MODULE_NAMES.MOCKUP_GENERATION]: mockupGenerationModule_1.MockupGenerationModule,
|
|
16
17
|
[moduleNames_1.MODULE_NAMES.PRODUCT_PUBLISH]: productPublishModule_1.ProductPublishModule,
|
|
17
18
|
[moduleNames_1.MODULE_NAMES.EDM]: edmModule_1.EdmModule,
|
|
19
|
+
[moduleNames_1.MODULE_NAMES.EMBED_STUDIO]: embedStudioModule_1.EmbedStudioModule,
|
|
18
20
|
[moduleNames_1.MODULE_NAMES.WHITE_LABEL]: whiteLabelModule_1.WhiteLabelModule,
|
|
19
21
|
};
|
|
20
22
|
exports.MODULE_DEPENDENCY_MAP = {
|
|
@@ -23,5 +25,6 @@ exports.MODULE_DEPENDENCY_MAP = {
|
|
|
23
25
|
[moduleNames_1.MODULE_NAMES.MOCKUP_GENERATION]: moduleNames_1.MODULE_NAMES.SDK,
|
|
24
26
|
[moduleNames_1.MODULE_NAMES.PRODUCT_PUBLISH]: moduleNames_1.MODULE_NAMES.SDK,
|
|
25
27
|
[moduleNames_1.MODULE_NAMES.EDM]: moduleNames_1.MODULE_NAMES.EDM,
|
|
28
|
+
[moduleNames_1.MODULE_NAMES.EMBED_STUDIO]: moduleNames_1.MODULE_NAMES.EMBED_STUDIO,
|
|
26
29
|
[moduleNames_1.MODULE_NAMES.WHITE_LABEL]: moduleNames_1.MODULE_NAMES.WHITE_LABEL,
|
|
27
30
|
};
|
|
@@ -17,6 +17,9 @@ export interface GetSavedProductsPayload {
|
|
|
17
17
|
externalProductId?: string;
|
|
18
18
|
limit?: number;
|
|
19
19
|
offset?: number;
|
|
20
|
+
/** Data is stored behind the apollo cache. You can set this property to true
|
|
21
|
+
* if updated data is needed (on the same page, after editing, for example) */
|
|
22
|
+
forceRefresh?: boolean;
|
|
20
23
|
}
|
|
21
24
|
export interface DeleteProductsPayload {
|
|
22
25
|
productTemplateIds: number[];
|