brainerce 1.36.3 → 1.36.4

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/README.md CHANGED
@@ -2206,7 +2206,8 @@ interface Checkout {
2206
2206
  subtotal: string;
2207
2207
  discountAmount: string;
2208
2208
  shippingAmount: string;
2209
- taxAmount: string;
2209
+ taxAmount: string; // "0" in inclusive (VAT) mode — see taxBreakdown.totalTax
2210
+ taxBreakdown?: TaxBreakdown | null; // { totalTax, pricesIncludeTax, breakdown[] }
2210
2211
  total: string;
2211
2212
  couponCode?: string | null;
2212
2213
  items: CheckoutLineItem[];
package/dist/index.d.mts CHANGED
@@ -1139,8 +1139,15 @@ interface Order {
1139
1139
  }> | null;
1140
1140
  /** Shipping cost */
1141
1141
  shippingAmount?: string | null;
1142
- /** Tax amount */
1142
+ /** Tax amount. In inclusive (VAT) mode this is `"0"` — read the included VAT
1143
+ * from {@link Order.taxBreakdown}.totalTax instead. */
1143
1144
  taxAmount?: string | null;
1145
+ /**
1146
+ * Frozen tax breakdown snapshot. In inclusive (VAT) pricing `taxAmount` is 0
1147
+ * and the real VAT lives here (`taxBreakdown.totalTax`, with
1148
+ * `pricesIncludeTax: true`). Use it to display "incl. VAT" on receipts.
1149
+ */
1150
+ taxBreakdown?: TaxBreakdown | null;
1144
1151
  createdAt: string;
1145
1152
  /** Payment method used (e.g., "card", "paypal", "cash_on_delivery"). */
1146
1153
  paymentMethod?: string | null;
@@ -2204,6 +2211,12 @@ interface TaxBreakdown {
2204
2211
  total: number;
2205
2212
  /** Itemized tax breakdown */
2206
2213
  breakdown: TaxBreakdownItem[];
2214
+ /**
2215
+ * True when the store's prices already include tax (inclusive/VAT mode). In
2216
+ * that mode `totalTax` is the VAT backed out of the displayed price — it is
2217
+ * already part of `total`, not added on top. Display it as "incl. VAT".
2218
+ */
2219
+ pricesIncludeTax?: boolean;
2207
2220
  /** Currency code */
2208
2221
  currency?: string;
2209
2222
  }
package/dist/index.d.ts CHANGED
@@ -1139,8 +1139,15 @@ interface Order {
1139
1139
  }> | null;
1140
1140
  /** Shipping cost */
1141
1141
  shippingAmount?: string | null;
1142
- /** Tax amount */
1142
+ /** Tax amount. In inclusive (VAT) mode this is `"0"` — read the included VAT
1143
+ * from {@link Order.taxBreakdown}.totalTax instead. */
1143
1144
  taxAmount?: string | null;
1145
+ /**
1146
+ * Frozen tax breakdown snapshot. In inclusive (VAT) pricing `taxAmount` is 0
1147
+ * and the real VAT lives here (`taxBreakdown.totalTax`, with
1148
+ * `pricesIncludeTax: true`). Use it to display "incl. VAT" on receipts.
1149
+ */
1150
+ taxBreakdown?: TaxBreakdown | null;
1144
1151
  createdAt: string;
1145
1152
  /** Payment method used (e.g., "card", "paypal", "cash_on_delivery"). */
1146
1153
  paymentMethod?: string | null;
@@ -2204,6 +2211,12 @@ interface TaxBreakdown {
2204
2211
  total: number;
2205
2212
  /** Itemized tax breakdown */
2206
2213
  breakdown: TaxBreakdownItem[];
2214
+ /**
2215
+ * True when the store's prices already include tax (inclusive/VAT mode). In
2216
+ * that mode `totalTax` is the VAT backed out of the displayed price — it is
2217
+ * already part of `total`, not added on top. Display it as "incl. VAT".
2218
+ */
2219
+ pricesIncludeTax?: boolean;
2207
2220
  /** Currency code */
2208
2221
  currency?: string;
2209
2222
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brainerce",
3
- "version": "1.36.3",
3
+ "version": "1.36.4",
4
4
  "description": "Official SDK for building e-commerce storefronts with Brainerce Platform. Perfect for vibe-coded sites, AI-built stores (Cursor, Lovable, v0), and custom storefronts.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",