Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const createContext = (storefront?: StorefrontInstance): StorefrontContext => {
websiteName: storefrontCtx.websiteName,
websiteId: storefrontCtx.websiteId,
storefrontTemplate: storefrontCtx.storefrontTemplate,
viewId: storefrontCtx.viewId,
};

const context: StorefrontContext = {
Expand Down
2 changes: 1 addition & 1 deletion packages/storefront-events-collector/src/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const schemas = {
SEARCH_RESULT_SUGGESTION_SCHEMA_URL: "iglu:com.adobe.magento.entity/search-result-suggestion/jsonschema/1-0-1",
SHOPPING_CART_SCHEMA_URL: "iglu:com.adobe.magento.entity/shopping-cart/jsonschema/3-0-0",
SHOPPER_SCHEMA_URL: "iglu:com.adobe.magento.entity/shopper/jsonschema/1-0-0",
STOREFRONT_INSTANCE_SCHEMA_URL: "iglu:com.adobe.magento.entity/storefront-instance/jsonschema/3-0-2",
STOREFRONT_INSTANCE_SCHEMA_URL: "iglu:com.adobe.magento.entity/storefront-instance/jsonschema/3-0-3",
};

export default schemas;
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ type Storefront = {
websiteId: number;
websiteName: string;
storefrontTemplate?: "Luma" | "EDS" | "Hyva" | "AEM CIF" | "Franklin" | "PWA Studio" | "Other";
viewId?: string | null;
};

type Tracker = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const mockStorefrontCtx = {
websiteId: 333333,
websiteName: "website",
storefrontTemplate: "EDS",
viewId: "catalog-view-1",
};

const mockCcdmStorefrontCtx = {
Expand All @@ -150,6 +151,7 @@ const mockCcdmStorefrontCtx = {
websiteCode: "",
websiteId: 333333,
websiteName: "website",
viewId: "catalog-view-1",
//storefrontTemplate: "EDS",
};

Expand All @@ -170,6 +172,7 @@ const mockCcdmStorefrontProcessedCtx = {
websiteCode: "WEBSITE_CODE",
websiteId: 333333,
websiteName: "website",
viewId: "catalog-view-1",
//storefrontTemplate: "EDS",
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ const mockStorefront: StorefrontInstance = {
websiteId: 333333,
websiteName: "website",
storefrontTemplate: "EDS",
viewId: "catalog-view-1",
};

const mockShopper: Shopper = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ export type StorefrontInstance = {
catalogExtensionVersion?: string | null;
locale?: string | null; // this field should stay null
storefrontTemplate?: "Luma" | "EDS" | "Hyva" | "AEM CIF" | "Franklin" | "PWA Studio" | "Other";
viewId?: string | null; // catalog view identifier
};
1 change: 1 addition & 0 deletions packages/storefront-events-sdk/tests/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ export const generateStorefrontInstanceContext = (overrides?: Partial<Storefront
storeViewName: "Test store view",
websiteId: 12345,
websiteName: "test website name",
viewId: "catalog-view-1",
...overrides,
});

Expand Down