@gethydra/sdk 0.1.27 → 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 +89 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1594,6 +1594,12 @@ interface components {
1594
1594
  discount_code: string | null;
1595
1595
  /** @example null */
1596
1596
  discount_id: string | null;
1597
+ /**
1598
+ * @description How the discount was applied.
1599
+ * @example null
1600
+ * @enum {string|null}
1601
+ */
1602
+ discount_source: "code" | "manual" | "automatic" | null;
1597
1603
  /** @example 7137 */
1598
1604
  total: number;
1599
1605
  /** @example USD */
@@ -1650,6 +1656,16 @@ interface components {
1650
1656
  metadata: {
1651
1657
  [key: string]: string | number;
1652
1658
  } | null;
1659
+ /**
1660
+ * @description ID of the staff member who created this order.
1661
+ * @example null
1662
+ */
1663
+ staff_id: string | null;
1664
+ /**
1665
+ * @description Display name of the staff member who created this order.
1666
+ * @example null
1667
+ */
1668
+ staff_name: string | null;
1653
1669
  /** @example INV-0001 */
1654
1670
  invoice_number: string | null;
1655
1671
  /**
@@ -1703,6 +1719,23 @@ interface components {
1703
1719
  unit_price: number;
1704
1720
  /** @example 5998 */
1705
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;
1706
1739
  /**
1707
1740
  * Format: date-time
1708
1741
  * @example 2026-03-10T16:45:00.000Z
@@ -11553,6 +11586,22 @@ interface operations {
11553
11586
  quantity: number;
11554
11587
  /** @example 2999 */
11555
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;
11556
11605
  }[];
11557
11606
  /** @default [] */
11558
11607
  custom_items?: {
@@ -11562,6 +11611,22 @@ interface operations {
11562
11611
  quantity: number;
11563
11612
  /** @example 1500 */
11564
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;
11565
11630
  }[];
11566
11631
  shipping_address?: {
11567
11632
  first_name?: string;
@@ -11608,6 +11673,22 @@ interface operations {
11608
11673
  * @example disc_abc123
11609
11674
  */
11610
11675
  discount_id?: string;
11676
+ /**
11677
+ * @description How the discount was applied: code (validated discount code), manual (staff-entered), or automatic (rule-based).
11678
+ * @example code
11679
+ * @enum {string}
11680
+ */
11681
+ discount_source?: "code" | "manual" | "automatic";
11682
+ /**
11683
+ * @description ID of the staff member who created this order (e.g. POS operator).
11684
+ * @example pstaff_abc123
11685
+ */
11686
+ staff_id?: string;
11687
+ /**
11688
+ * @description Display name of the staff member who created this order.
11689
+ * @example Alice
11690
+ */
11691
+ staff_name?: string;
11611
11692
  /**
11612
11693
  * @example card
11613
11694
  * @enum {string}
@@ -16316,14 +16397,22 @@ interface operations {
16316
16397
  line_items: {
16317
16398
  variant_id: string;
16318
16399
  quantity: number;
16400
+ /** @enum {string} */
16401
+ discount_type?: "percentage" | "fixed_amount";
16402
+ discount_value?: number;
16403
+ discount_reason?: string;
16319
16404
  }[];
16320
16405
  location_id: string;
16321
16406
  /** @default 0 */
16322
16407
  discount?: number;
16323
16408
  discount_code?: string;
16324
16409
  discount_id?: string;
16410
+ /** @enum {string} */
16411
+ discount_source?: "code" | "manual" | "automatic";
16325
16412
  /** @default 0 */
16326
16413
  store_credit_amount?: number;
16414
+ staff_id?: string;
16415
+ staff_name?: string;
16327
16416
  notes?: string;
16328
16417
  metadata?: {
16329
16418
  [key: string]: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.1.27",
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",