/*** * * SaaSquatch Type Definitions * * This file was automatically generated. DO NOT edit it by hand, instead edit the related JSON Schema file. * * Generated on 2026-03-20T21:11:42.771Z * ***/ /*** * PurchaseEventFields.schema.json * Generated on 2026-03-20T21:11:43.340Z * This file was automatically generated. DO NOT edit it by hand, instead edit the related JSON Schema file. ***/ /** * The checkout ID associated with this purchase */ export type CheckoutID = string /** * The order or transaction ID associated with this purchase */ export type OrderID = string /** * Store or affiliation from which this transaction occurred (e.g. Google Store) */ export type Affiliation = string /** * Order total after discounts but before taxes and shipping */ export type PurchaseSubtotal = number /** * Revenue with discounts and coupons added in */ export type PurchaseTotal = number /** * Revenue associated with the transaction (excluding shipping and tax). This is the field we use to calculate a customer's LTV. */ export type Revenue = number /** * Shipping cost associated with the transaction */ export type ShippingCost = number /** * Total tax associated with the transaction */ export type TotalTax = number /** * Total discount associated with the transaction */ export type Discount = number /** * Transaction coupon redeemed with the transaction */ export type Coupon = string /** * The ISO currency code used in this purchase */ export type Currency = string /** * Database id of the product being viewed */ export type ProductID = string /** * Sku of the product being viewed */ export type StockKeepingUnit = string /** * Product category being viewed */ export type ProductCategory = string /** * Name of the product being viewed */ export type ProductName = string /** * Brand associated with the product */ export type Brand = string /** * Variant of the product (e.g. Black) */ export type ProductVariant = string /** * Price of the product being viewed */ export type Price = number /** * Quantity of a product */ export type Quantity = number /** * Coupon code associated with a product (e.g MAY_DEALS_3) */ export type Coupon1 = string /** * Position in the product list (ex. 3) */ export type ProductPosition = number /** * URL of the product page */ export type ProductURL = string /** * Image url of the product */ export type ImageURL = string /** * @maxItems 200 */ export type Products = Product[] /** * Defines the event fields our system recognizes as a purchase event */ export interface PaymentEventFieldsSchema { checkout_id?: CheckoutID order_id?: OrderID affiliation?: Affiliation subtotal?: PurchaseSubtotal total?: PurchaseTotal revenue?: Revenue shipping?: ShippingCost tax?: TotalTax discount?: Discount coupon?: Coupon currency?: Currency products?: Products } /** * This interface was referenced by `PaymentEventFieldsSchema`'s JSON-Schema * via the `definition` "product". */ export interface Product { product_id: ProductID sku?: StockKeepingUnit category?: ProductCategory name?: ProductName brand?: Brand variant?: ProductVariant price?: Price quantity?: Quantity coupon?: Coupon1 position?: ProductPosition url?: ProductURL image_url?: ImageURL }