Skip to content

Commit

Permalink
Expose snowplow-ecommerce browser plugin typings (close #1291)
Browse files Browse the repository at this point in the history
  • Loading branch information
igneel64 committed Mar 5, 2024
1 parent ffb1994 commit 999d7bc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@snowplow/browser-plugin-snowplow-ecommerce",
"comment": "Expose types",
"type": "none"
}
],
"packageName": "@snowplow/browser-plugin-snowplow-ecommerce"
}
1 change: 1 addition & 0 deletions plugins/browser-plugin-snowplow-ecommerce/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './api';
export * from './ua/api';
export * from './ga4/api';
export * from './types';
4 changes: 2 additions & 2 deletions plugins/browser-plugin-snowplow-ecommerce/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ export interface User {
email?: string;
}

export interface CommonEcommerceEventProperties extends CommonEventProperties {
export interface CommonEcommerceEventProperties<T = Record<string, unknown>> extends CommonEventProperties<T> {
/** Add context to an event by setting an Array of Self Describing JSON */
context?: Array<SelfDescribingJson>;
context?: Array<SelfDescribingJson<T>>;
}

export type ListViewEvent = { name: string; products: Product[] };
Expand Down

0 comments on commit 999d7bc

Please sign in to comment.