From bc66aad4e42de7b311d36c1013c9303c52fd210c Mon Sep 17 00:00:00 2001 From: Martin Zanoni Date: Mon, 4 Mar 2024 13:42:04 +0100 Subject: [PATCH] feat: add data property bag to track order --- packages/client/src/tracker.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/client/src/tracker.ts b/packages/client/src/tracker.ts index d97a93b..9b68245 100644 --- a/packages/client/src/tracker.ts +++ b/packages/client/src/tracker.ts @@ -9,14 +9,14 @@ export class Tracker extends RelewiseClient { super(datasetId, apiKey, options); } - - public async trackOrder({ user, subtotal, orderNumber, lineItems, cartName = 'default', trackingNumber }: { + public async trackOrder({ user, subtotal, orderNumber, lineItems, cartName = 'default', trackingNumber, data }: { user: User, subtotal: { currency: string, amount: number }, orderNumber: string, /** @deprecated Use orderNumber instead. */ trackingNumber?: string, lineItems: { productId: string, variantId?: string, lineTotal: number, quantity: number, data?: Record }[], + data?: Record, cartName?: string }, options?: RelewiseRequestOptions): Promise { return this.request('TrackOrderRequest', { @@ -36,6 +36,7 @@ export class Tracker extends RelewiseClient { orderNumber: orderNumber, trackingNumber: trackingNumber, cartName: cartName, + data: data, user: user, }, }, options);