@gethydra/sdk 0.1.28 → 0.1.29

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +53 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1719,6 +1719,23 @@ interface components {
1719
1719
  unit_price: number;
1720
1720
  /** @example 5998 */
1721
1721
  total: number;
1722
+ /**
1723
+ * @description Resolved discount in minor units.
1724
+ * @example 0
1725
+ */
1726
+ discount_amount: number;
1727
+ /**
1728
+ * @example null
1729
+ * @enum {string|null}
1730
+ */
1731
+ discount_type: "percentage" | "fixed_amount" | null;
1732
+ /**
1733
+ * @description Original input value. Percentage × 100 or pence.
1734
+ * @example null
1735
+ */
1736
+ discount_value: number | null;
1737
+ /** @example null */
1738
+ discount_reason: string | null;
1722
1739
  /**
1723
1740
  * Format: date-time
1724
1741
  * @example 2026-03-10T16:45:00.000Z
@@ -11569,6 +11586,22 @@ interface operations {
11569
11586
  quantity: number;
11570
11587
  /** @example 2999 */
11571
11588
  unit_price?: number;
11589
+ /**
11590
+ * @description Type of discount applied to this line item.
11591
+ * @example percentage
11592
+ * @enum {string}
11593
+ */
11594
+ discount_type?: "percentage" | "fixed_amount";
11595
+ /**
11596
+ * @description Discount input value. For percentage: value × 100 (1000 = 10%). For fixed_amount: pence.
11597
+ * @example 1000
11598
+ */
11599
+ discount_value?: number;
11600
+ /**
11601
+ * @description Free-text reason for the line discount.
11602
+ * @example Damaged packaging
11603
+ */
11604
+ discount_reason?: string;
11572
11605
  }[];
11573
11606
  /** @default [] */
11574
11607
  custom_items?: {
@@ -11578,6 +11611,22 @@ interface operations {
11578
11611
  quantity: number;
11579
11612
  /** @example 1500 */
11580
11613
  unit_price: number;
11614
+ /**
11615
+ * @description Type of discount applied to this custom line item.
11616
+ * @example percentage
11617
+ * @enum {string}
11618
+ */
11619
+ discount_type?: "percentage" | "fixed_amount";
11620
+ /**
11621
+ * @description Discount input value. For percentage: value × 100 (1000 = 10%). For fixed_amount: pence.
11622
+ * @example 1000
11623
+ */
11624
+ discount_value?: number;
11625
+ /**
11626
+ * @description Free-text reason for the line discount.
11627
+ * @example Staff discount
11628
+ */
11629
+ discount_reason?: string;
11581
11630
  }[];
11582
11631
  shipping_address?: {
11583
11632
  first_name?: string;
@@ -16348,6 +16397,10 @@ interface operations {
16348
16397
  line_items: {
16349
16398
  variant_id: string;
16350
16399
  quantity: number;
16400
+ /** @enum {string} */
16401
+ discount_type?: "percentage" | "fixed_amount";
16402
+ discount_value?: number;
16403
+ discount_reason?: string;
16351
16404
  }[];
16352
16405
  location_id: string;
16353
16406
  /** @default 0 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "Official TypeScript SDK for the Hydra Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",