@aifeatures/backend 0.5.3 → 0.5.5

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/dist/index.d.cts CHANGED
@@ -2373,6 +2373,14 @@ type OrderSessionStatus = {
2373
2373
  * The postage portion of `amount_total`, for showing the buyer a breakdown (0 renders as 'Free' — a met free-shipping threshold). Null when no postage was charged or none was recorded; render no shipping row at all then.
2374
2374
  */
2375
2375
  shipping_total: number | null;
2376
+ /**
2377
+ * The tax portion of `amount_total`, in minor units. Already INSIDE it — never add the two. Render a tax row ONLY when `tax_behavior` is 'exclusive' (Stripe priced tax on top of the goods); under 'inclusive' or a declared rate the tax already sits inside the line prices, so a row for it shows the buyer money they never paid separately. 0 means no tax was charged or recorded.
2378
+ */
2379
+ tax_total: number;
2380
+ /**
2381
+ * What `tax_total` MEANS — 'exclusive': charged on top of the goods, so it earns its own receipt row; 'inclusive': already inside the prices. Null when the order recorded no behavior (an unreadable stored value also reports null rather than guessing).
2382
+ */
2383
+ tax_behavior: "inclusive" | "exclusive";
2376
2384
  currency: string;
2377
2385
  /**
2378
2386
  * What was bought — a receipt-style summary. Still no buyer PII.
@@ -2383,6 +2391,14 @@ type OrderSessionStatus = {
2383
2391
  */
2384
2392
  name: string;
2385
2393
  quantity: number;
2394
+ /**
2395
+ * What ONE unit cost, in minor units of `currency`, snapshotted at checkout — multiply by `quantity` for the line total. Absent on rows written before the field existed. It is a LINE figure: the per-line values need not sum to `amount_total`, which also carries postage, exclusive tax, and any promotion-code discount — render `amount_total` as the total paid rather than adding lines up.
2396
+ */
2397
+ unit_amount?: number;
2398
+ /**
2399
+ * The product's first image at checkout time — the confirmation page's per-line thumbnail, the same snapshot the merchant's order page renders. Absent on imageless products and on older rows: render a placeholder, never a broken image.
2400
+ */
2401
+ image_url?: string;
2386
2402
  /**
2387
2403
  * The product bought — a stable id for branching the confirmation page per product type (absent only on legacy orders).
2388
2404
  */
package/dist/index.d.ts CHANGED
@@ -2373,6 +2373,14 @@ type OrderSessionStatus = {
2373
2373
  * The postage portion of `amount_total`, for showing the buyer a breakdown (0 renders as 'Free' — a met free-shipping threshold). Null when no postage was charged or none was recorded; render no shipping row at all then.
2374
2374
  */
2375
2375
  shipping_total: number | null;
2376
+ /**
2377
+ * The tax portion of `amount_total`, in minor units. Already INSIDE it — never add the two. Render a tax row ONLY when `tax_behavior` is 'exclusive' (Stripe priced tax on top of the goods); under 'inclusive' or a declared rate the tax already sits inside the line prices, so a row for it shows the buyer money they never paid separately. 0 means no tax was charged or recorded.
2378
+ */
2379
+ tax_total: number;
2380
+ /**
2381
+ * What `tax_total` MEANS — 'exclusive': charged on top of the goods, so it earns its own receipt row; 'inclusive': already inside the prices. Null when the order recorded no behavior (an unreadable stored value also reports null rather than guessing).
2382
+ */
2383
+ tax_behavior: "inclusive" | "exclusive";
2376
2384
  currency: string;
2377
2385
  /**
2378
2386
  * What was bought — a receipt-style summary. Still no buyer PII.
@@ -2383,6 +2391,14 @@ type OrderSessionStatus = {
2383
2391
  */
2384
2392
  name: string;
2385
2393
  quantity: number;
2394
+ /**
2395
+ * What ONE unit cost, in minor units of `currency`, snapshotted at checkout — multiply by `quantity` for the line total. Absent on rows written before the field existed. It is a LINE figure: the per-line values need not sum to `amount_total`, which also carries postage, exclusive tax, and any promotion-code discount — render `amount_total` as the total paid rather than adding lines up.
2396
+ */
2397
+ unit_amount?: number;
2398
+ /**
2399
+ * The product's first image at checkout time — the confirmation page's per-line thumbnail, the same snapshot the merchant's order page renders. Absent on imageless products and on older rows: render a placeholder, never a broken image.
2400
+ */
2401
+ image_url?: string;
2386
2402
  /**
2387
2403
  * The product bought — a stable id for branching the confirmation page per product type (absent only on legacy orders).
2388
2404
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aifeatures/backend",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "TypeScript API client for aifeatures backend",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",