@reservamos/browser-analytics 1.1.5 → 1.1.6-alpha.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/CHANGELOG.md +5 -1
- package/README.md +5 -5
- package/dist/browser-analytics.cjs +1 -1
- package/dist/browser-analytics.cjs.map +1 -1
- package/dist/browser-analytics.d.ts +12 -12
- package/dist/browser-analytics.esm.js +5 -5
- package/dist/browser-analytics.esm.js.map +1 -1
- package/dist/browser-analytics.iife.js +1 -1
- package/dist/browser-analytics.iife.js.map +1 -1
- package/package.json +1 -1
- package/src/events/purchaseConfirmation/purchaseConfirmation.test.ts +36 -23
- package/src/events/purchaseConfirmation/purchaseConfirmationSchema.ts +4 -4
|
@@ -814,23 +814,23 @@ declare const purchaseCanceledSchema: z.ZodObject<{
|
|
|
814
814
|
export type PurchaseCanceledProps = z.infer<typeof purchaseCanceledSchema>;
|
|
815
815
|
declare function trackPurchaseCanceled(eventData: PurchaseCanceledProps, meta?: EventData): void;
|
|
816
816
|
declare const purchaseConfirmationSchema: z.ZodObject<{
|
|
817
|
-
|
|
818
|
-
|
|
817
|
+
"Operation Id": z.ZodString;
|
|
818
|
+
"Payment Status": z.ZodEnum<[
|
|
819
819
|
"confirmed",
|
|
820
820
|
"pending_pix"
|
|
821
821
|
]>;
|
|
822
|
-
|
|
823
|
-
|
|
822
|
+
"Payment Type": z.ZodOptional<z.ZodString>;
|
|
823
|
+
Total: z.ZodOptional<z.ZodNumber>;
|
|
824
824
|
}, "strict", z.ZodTypeAny, {
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
825
|
+
"Operation Id": string;
|
|
826
|
+
"Payment Status": "confirmed" | "pending_pix";
|
|
827
|
+
Total?: number | undefined;
|
|
828
|
+
"Payment Type"?: string | undefined;
|
|
829
829
|
}, {
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
830
|
+
"Operation Id": string;
|
|
831
|
+
"Payment Status": "confirmed" | "pending_pix";
|
|
832
|
+
Total?: number | undefined;
|
|
833
|
+
"Payment Type"?: string | undefined;
|
|
834
834
|
}>;
|
|
835
835
|
export type PurchaseConfirmationProps = z.infer<typeof purchaseConfirmationSchema>;
|
|
836
836
|
declare function trackPurchaseConfirmation(eventData: PurchaseConfirmationProps, meta?: EventMetadata): void;
|
|
@@ -13407,7 +13407,7 @@ function loadNoop(_src, onload) {
|
|
|
13407
13407
|
onload();
|
|
13408
13408
|
}
|
|
13409
13409
|
var mixpanel = init_as_module(loadNoop);
|
|
13410
|
-
const version = "1.1.
|
|
13410
|
+
const version = "1.1.6-alpha.0";
|
|
13411
13411
|
const MIXPANEL_DISTINCT_ID_CACHE_KEY = "mp_distinct_id";
|
|
13412
13412
|
const EVENT_SOURCE_SUPER_PROPERTY = {
|
|
13413
13413
|
"Event Source": "sdk"
|
|
@@ -13659,10 +13659,10 @@ function trackPurchaseAttempt(eventData, meta = {}) {
|
|
|
13659
13659
|
trackEvent(EVENT_NAME$5, eventData, meta);
|
|
13660
13660
|
}
|
|
13661
13661
|
const purchaseConfirmationSchema = z.object({
|
|
13662
|
-
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13662
|
+
"Operation Id": z.string().min(1, "Operation Id is required"),
|
|
13663
|
+
"Payment Status": z.enum(["confirmed", "pending_pix"]),
|
|
13664
|
+
"Payment Type": z.string().optional(),
|
|
13665
|
+
"Total": z.number().optional()
|
|
13666
13666
|
}).strict();
|
|
13667
13667
|
const EVENT_NAME$4 = "Purchase Confirmation Viewed";
|
|
13668
13668
|
function trackPurchaseConfirmation(eventData, meta = {}) {
|