@gethydra/sdk 0.1.30 → 0.1.33

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.ts CHANGED
@@ -92,6 +92,23 @@ interface components {
92
92
  /** @example true */
93
93
  confirmation_email: boolean;
94
94
  } | null;
95
+ /** @description Loyalty programme configuration */
96
+ loyalty_config: {
97
+ /** @example 500 */
98
+ earn_rate_bps: number;
99
+ /** @example 100 */
100
+ display_multiplier: number;
101
+ /** @example 365 */
102
+ expiry_days: number | null;
103
+ /** @example true */
104
+ activity_reset: boolean;
105
+ /** @example true */
106
+ exclude_gift_cards: boolean;
107
+ /** @example false */
108
+ exclude_services: boolean;
109
+ /** @example 0 */
110
+ min_order_total: number;
111
+ };
95
112
  pricing_config: {
96
113
  /** @example 2 */
97
114
  next_key_index: number;
@@ -635,7 +652,7 @@ interface components {
635
652
  * @example physical
636
653
  * @enum {string}
637
654
  */
638
- fulfillment_type: "physical" | "digital" | "service";
655
+ fulfillment_type: "physical" | "digital" | "service" | "gift_card";
639
656
  /** @example Restocking in Q3. */
640
657
  internal_notes: string | null;
641
658
  /** @example Polished Titanium */
@@ -1600,6 +1617,12 @@ interface components {
1600
1617
  * @enum {string|null}
1601
1618
  */
1602
1619
  discount_source: "code" | "manual" | "automatic" | null;
1620
+ /** @example 0 */
1621
+ store_credit_applied: number;
1622
+ /** @example 0 */
1623
+ gift_card_applied: number;
1624
+ /** @example null */
1625
+ gift_card_id: string | null;
1603
1626
  /** @example 7137 */
1604
1627
  total: number;
1605
1628
  /** @example USD */
@@ -3611,6 +3634,53 @@ interface components {
3611
3634
  */
3612
3635
  updated_at: string;
3613
3636
  };
3637
+ GiftCard: {
3638
+ id: string;
3639
+ code: string;
3640
+ /** @enum {string} */
3641
+ status: "active" | "deactivated";
3642
+ initial_balance: number;
3643
+ current_balance: number;
3644
+ currency: string;
3645
+ customer_id: string | null;
3646
+ source_order_id: string | null;
3647
+ recipient_email: string | null;
3648
+ recipient_name: string | null;
3649
+ sender_name: string | null;
3650
+ personal_message: string | null;
3651
+ note: string | null;
3652
+ expires_at: string | null;
3653
+ deactivated_at: string | null;
3654
+ metadata: {
3655
+ [key: string]: string | number;
3656
+ };
3657
+ created_at: string;
3658
+ updated_at: string;
3659
+ };
3660
+ GiftCardLookup: {
3661
+ current_balance: number;
3662
+ currency: string;
3663
+ /** @enum {string} */
3664
+ status: "active" | "deactivated";
3665
+ expires_at: string | null;
3666
+ };
3667
+ GiftCardTransaction: {
3668
+ id: string;
3669
+ gift_card_id: string;
3670
+ /** @enum {string} */
3671
+ type: "credit" | "debit" | "refund";
3672
+ amount: number;
3673
+ balance_after: number;
3674
+ reason: string;
3675
+ note: string | null;
3676
+ related_order_id: string | null;
3677
+ related_refund_id: string | null;
3678
+ metadata: {
3679
+ [key: string]: string | number;
3680
+ };
3681
+ created_at: string;
3682
+ updated_at: string;
3683
+ };
3614
3684
  Post: {
3615
3685
  /** @example post_abc123 */
3616
3686
  id: string;
@@ -4451,6 +4521,26 @@ interface operations {
4451
4521
  /** @example true */
4452
4522
  confirmation_email?: boolean;
4453
4523
  };
4524
+ /** @description Partial update — only provided fields are changed, others are preserved. */
4525
+ loyalty_config?: {
4526
+ /** @example 500 */
4527
+ earn_rate_bps?: number;
4528
+ /** @example 100 */
4529
+ display_multiplier?: number;
4530
+ /** @example 365 */
4531
+ expiry_days?: number | null;
4532
+ /** @example true */
4533
+ activity_reset?: boolean;
4534
+ /** @example true */
4535
+ exclude_gift_cards?: boolean;
4536
+ /** @example false */
4537
+ exclude_services?: boolean;
4538
+ /** @example 0 */
4539
+ min_order_total?: number;
4540
+ };
4541
+ gift_card_config?: {
4542
+ default_expiry_days?: number | null;
4543
+ };
4454
4544
  };
4455
4545
  };
4456
4546
  };
@@ -6652,7 +6742,7 @@ interface operations {
6652
6742
  * @example physical
6653
6743
  * @enum {string}
6654
6744
  */
6655
- fulfillment_type?: "physical" | "digital" | "service";
6745
+ fulfillment_type?: "physical" | "digital" | "service" | "gift_card";
6656
6746
  /** @example Restocking in Q3. */
6657
6747
  internal_notes?: string;
6658
6748
  /** @example Polished Titanium */
@@ -6811,7 +6901,7 @@ interface operations {
6811
6901
  * @example physical
6812
6902
  * @enum {string}
6813
6903
  */
6814
- fulfillment_type?: "physical" | "digital" | "service";
6904
+ fulfillment_type?: "physical" | "digital" | "service" | "gift_card";
6815
6905
  /** @example Restocking in Q3. */
6816
6906
  internal_notes?: string;
6817
6907
  /** @example Polished Titanium */
@@ -7015,7 +7105,7 @@ interface operations {
7015
7105
  * @example physical
7016
7106
  * @enum {string}
7017
7107
  */
7018
- fulfillment_type?: "physical" | "digital" | "service";
7108
+ fulfillment_type?: "physical" | "digital" | "service" | "gift_card";
7019
7109
  /** @example Restocking in Q3. */
7020
7110
  internal_notes?: string | null;
7021
7111
  /** @example Polished Titanium */
@@ -10098,6 +10188,7 @@ interface operations {
10098
10188
  fields?: string;
10099
10189
  sort?: "created_at" | "updated_at" | "title" | "relevance";
10100
10190
  order?: "asc" | "desc";
10191
+ reason?: string;
10101
10192
  };
10102
10193
  header?: never;
10103
10194
  path: {
@@ -10142,6 +10233,26 @@ interface operations {
10142
10233
  };
10143
10234
  };
10144
10235
  };
10236
+ getCustomerLoyalty: {
10237
+ parameters: {
10238
+ query?: never;
10239
+ header?: never;
10240
+ path: {
10241
+ id: string;
10242
+ };
10243
+ cookie?: never;
10244
+ };
10245
+ requestBody?: never;
10246
+ responses: {
10247
+ /** @description Loyalty summary */
10248
+ 200: {
10249
+ headers: {
10250
+ [name: string]: unknown;
10251
+ };
10252
+ content?: never;
10253
+ };
10254
+ };
10255
+ };
10145
10256
  listCustomerMetafieldValues: {
10146
10257
  parameters: {
10147
10258
  query?: never;
@@ -11707,6 +11818,17 @@ interface operations {
11707
11818
  * @example 0
11708
11819
  */
11709
11820
  store_credit_applied?: number;
11821
+ /**
11822
+ * @description Amount of gift card balance (in minor units) to debit. Requires gift_card_id.
11823
+ * @default 0
11824
+ * @example 0
11825
+ */
11826
+ gift_card_applied?: number;
11827
+ /**
11828
+ * @description ID of the gift card to debit.
11829
+ * @example gc_abc123
11830
+ */
11831
+ gift_card_id?: string;
11710
11832
  /** @default {} */
11711
11833
  metadata?: {
11712
11834
  [key: string]: string | number;
@@ -13194,7 +13316,7 @@ interface operations {
13194
13316
  * "order.paid"
13195
13317
  * ]
13196
13318
  */
13197
- events: ("product.created" | "product.updated" | "product.deleted" | "order.created" | "order.paid" | "order.fulfilled" | "order.cancelled" | "order.refunded" | "channel.created" | "channel.updated" | "channel.archived" | "collection.created" | "collection.updated" | "collection.deleted" | "company.created" | "company.updated" | "company.deleted" | "customer.created" | "customer.updated" | "customer_photo.submitted" | "customer_photo.approved" | "customer_photo.rejected" | "discount.created" | "discount.updated" | "discount.deleted" | "draft_order.created" | "draft_order.updated" | "draft_order.completed" | "draft_order.deleted" | "filter_attribute.created" | "filter_attribute.updated" | "filter_attribute.deleted" | "fulfillment.created" | "fulfillment.updated" | "fulfillment.cancelled" | "fulfillment_order.created" | "inventory.low" | "location.created" | "location.updated" | "location.deleted" | "navigation.created" | "navigation.updated" | "navigation.deleted" | "shipping.zone.created" | "shipping.zone.updated" | "shipping.zone.deleted" | "post.created" | "post.updated" | "post.deleted" | "post.published" | "post.unpublished" | "promotion.created" | "promotion.updated" | "promotion.deleted" | "purchase_order.created" | "purchase_order.updated" | "purchase_order.received" | "purchase_order.cancelled" | "refund.created" | "refund.succeeded" | "refund.failed" | "return.requested" | "return.approved" | "return.received" | "return.rejected" | "return.cancelled" | "return.closed" | "store.published" | "store_credit.issued" | "store_credit.used" | "store_credit.expired" | "membership.created" | "membership.updated" | "membership.cancelled" | "membership.expired" | "usage.warning" | "booking.created" | "booking.confirmed" | "booking.cancelled" | "booking.completed" | "lookbook.created" | "lookbook.updated" | "lookbook.deleted")[];
13319
+ events: ("product.created" | "product.updated" | "product.deleted" | "order.created" | "order.paid" | "order.fulfilled" | "order.cancelled" | "order.refunded" | "channel.created" | "channel.updated" | "channel.archived" | "collection.created" | "collection.updated" | "collection.deleted" | "company.created" | "company.updated" | "company.deleted" | "customer.created" | "customer.updated" | "customer_photo.submitted" | "customer_photo.approved" | "customer_photo.rejected" | "discount.created" | "discount.updated" | "discount.deleted" | "draft_order.created" | "draft_order.updated" | "draft_order.completed" | "draft_order.deleted" | "filter_attribute.created" | "filter_attribute.updated" | "filter_attribute.deleted" | "fulfillment.created" | "fulfillment.updated" | "fulfillment.cancelled" | "fulfillment_order.created" | "inventory.low" | "location.created" | "location.updated" | "location.deleted" | "navigation.created" | "navigation.updated" | "navigation.deleted" | "shipping.zone.created" | "shipping.zone.updated" | "shipping.zone.deleted" | "post.created" | "post.updated" | "post.deleted" | "post.published" | "post.unpublished" | "promotion.created" | "promotion.updated" | "promotion.deleted" | "purchase_order.created" | "purchase_order.updated" | "purchase_order.received" | "purchase_order.cancelled" | "refund.created" | "refund.succeeded" | "refund.failed" | "return.requested" | "return.approved" | "return.received" | "return.rejected" | "return.cancelled" | "return.closed" | "store.published" | "store_credit.issued" | "store_credit.used" | "store_credit.expired" | "loyalty.earned" | "loyalty.clawed_back" | "gift_card.created" | "gift_card.updated" | "gift_card.deactivated" | "gift_card.redeemed" | "gift_card.credited" | "membership.created" | "membership.updated" | "membership.cancelled" | "membership.expired" | "usage.warning" | "booking.created" | "booking.confirmed" | "booking.cancelled" | "booking.completed" | "lookbook.created" | "lookbook.updated" | "lookbook.deleted")[];
13198
13320
  /**
13199
13321
  * @default active
13200
13322
  * @example active
@@ -13288,7 +13410,7 @@ interface operations {
13288
13410
  * "product.updated"
13289
13411
  * ]
13290
13412
  */
13291
- events?: ("product.created" | "product.updated" | "product.deleted" | "order.created" | "order.paid" | "order.fulfilled" | "order.cancelled" | "order.refunded" | "channel.created" | "channel.updated" | "channel.archived" | "collection.created" | "collection.updated" | "collection.deleted" | "company.created" | "company.updated" | "company.deleted" | "customer.created" | "customer.updated" | "customer_photo.submitted" | "customer_photo.approved" | "customer_photo.rejected" | "discount.created" | "discount.updated" | "discount.deleted" | "draft_order.created" | "draft_order.updated" | "draft_order.completed" | "draft_order.deleted" | "filter_attribute.created" | "filter_attribute.updated" | "filter_attribute.deleted" | "fulfillment.created" | "fulfillment.updated" | "fulfillment.cancelled" | "fulfillment_order.created" | "inventory.low" | "location.created" | "location.updated" | "location.deleted" | "navigation.created" | "navigation.updated" | "navigation.deleted" | "shipping.zone.created" | "shipping.zone.updated" | "shipping.zone.deleted" | "post.created" | "post.updated" | "post.deleted" | "post.published" | "post.unpublished" | "promotion.created" | "promotion.updated" | "promotion.deleted" | "purchase_order.created" | "purchase_order.updated" | "purchase_order.received" | "purchase_order.cancelled" | "refund.created" | "refund.succeeded" | "refund.failed" | "return.requested" | "return.approved" | "return.received" | "return.rejected" | "return.cancelled" | "return.closed" | "store.published" | "store_credit.issued" | "store_credit.used" | "store_credit.expired" | "membership.created" | "membership.updated" | "membership.cancelled" | "membership.expired" | "usage.warning" | "booking.created" | "booking.confirmed" | "booking.cancelled" | "booking.completed" | "lookbook.created" | "lookbook.updated" | "lookbook.deleted")[];
13413
+ events?: ("product.created" | "product.updated" | "product.deleted" | "order.created" | "order.paid" | "order.fulfilled" | "order.cancelled" | "order.refunded" | "channel.created" | "channel.updated" | "channel.archived" | "collection.created" | "collection.updated" | "collection.deleted" | "company.created" | "company.updated" | "company.deleted" | "customer.created" | "customer.updated" | "customer_photo.submitted" | "customer_photo.approved" | "customer_photo.rejected" | "discount.created" | "discount.updated" | "discount.deleted" | "draft_order.created" | "draft_order.updated" | "draft_order.completed" | "draft_order.deleted" | "filter_attribute.created" | "filter_attribute.updated" | "filter_attribute.deleted" | "fulfillment.created" | "fulfillment.updated" | "fulfillment.cancelled" | "fulfillment_order.created" | "inventory.low" | "location.created" | "location.updated" | "location.deleted" | "navigation.created" | "navigation.updated" | "navigation.deleted" | "shipping.zone.created" | "shipping.zone.updated" | "shipping.zone.deleted" | "post.created" | "post.updated" | "post.deleted" | "post.published" | "post.unpublished" | "promotion.created" | "promotion.updated" | "promotion.deleted" | "purchase_order.created" | "purchase_order.updated" | "purchase_order.received" | "purchase_order.cancelled" | "refund.created" | "refund.succeeded" | "refund.failed" | "return.requested" | "return.approved" | "return.received" | "return.rejected" | "return.cancelled" | "return.closed" | "store.published" | "store_credit.issued" | "store_credit.used" | "store_credit.expired" | "loyalty.earned" | "loyalty.clawed_back" | "gift_card.created" | "gift_card.updated" | "gift_card.deactivated" | "gift_card.redeemed" | "gift_card.credited" | "membership.created" | "membership.updated" | "membership.cancelled" | "membership.expired" | "usage.warning" | "booking.created" | "booking.confirmed" | "booking.cancelled" | "booking.completed" | "lookbook.created" | "lookbook.updated" | "lookbook.deleted")[];
13292
13414
  /**
13293
13415
  * @example active
13294
13416
  * @enum {string}
@@ -15228,7 +15350,7 @@ interface operations {
15228
15350
  /** @example Approved by Alice */
15229
15351
  staff_note?: string;
15230
15352
  /**
15231
- * @description Where to send the refund. "card" refunds to the original payment method via Stripe; "store_credit" adds the amount to the customer's store credit balance; "cash" is record-keeping only (staff hands cash to customer).
15353
+ * @description Where to send the refund. "card" refunds to the original payment method via Stripe; "store_credit" adds the amount to the customer's store credit balance; "gift_card" credits the gift card used on this order; "cash" is record-keeping only (staff hands cash to customer).
15232
15354
  * @default card
15233
15355
  * @example card
15234
15356
  * @enum {string}
@@ -17240,6 +17362,324 @@ interface operations {
17240
17362
  };
17241
17363
  };
17242
17364
  };
17365
+ listGiftCards: {
17366
+ parameters: {
17367
+ query?: {
17368
+ limit?: number;
17369
+ cursor?: string;
17370
+ fields?: string;
17371
+ sort?: "created_at" | "updated_at";
17372
+ order?: "asc" | "desc";
17373
+ status?: "active" | "deactivated";
17374
+ customer_id?: string;
17375
+ };
17376
+ header?: never;
17377
+ path?: never;
17378
+ cookie?: never;
17379
+ };
17380
+ requestBody?: never;
17381
+ responses: {
17382
+ /** @description Paginated gift card list */
17383
+ 200: {
17384
+ headers: {
17385
+ [name: string]: unknown;
17386
+ };
17387
+ content: {
17388
+ "application/json": {
17389
+ data: components["schemas"]["GiftCard"][];
17390
+ pagination: {
17391
+ cursor: string | null;
17392
+ has_more: boolean;
17393
+ total: number;
17394
+ };
17395
+ };
17396
+ };
17397
+ };
17398
+ };
17399
+ };
17400
+ createGiftCard: {
17401
+ parameters: {
17402
+ query?: never;
17403
+ header?: never;
17404
+ path?: never;
17405
+ cookie?: never;
17406
+ };
17407
+ requestBody?: {
17408
+ content: {
17409
+ "application/json": {
17410
+ /**
17411
+ * @description Initial balance in minor units (e.g. 5000 = £50.00).
17412
+ * @example 5000
17413
+ */
17414
+ initial_balance: number;
17415
+ /**
17416
+ * @description Currency code. Defaults to store currency if omitted.
17417
+ * @example GBP
17418
+ */
17419
+ currency?: string;
17420
+ /**
17421
+ * @description Customer who purchased this gift card.
17422
+ * @example cus_abc123
17423
+ */
17424
+ customer_id?: string;
17425
+ /**
17426
+ * Format: email
17427
+ * @description Email address to deliver the gift card code.
17428
+ * @example recipient@example.com
17429
+ */
17430
+ recipient_email?: string;
17431
+ /** @example Jane Doe */
17432
+ recipient_name?: string;
17433
+ /** @example John Smith */
17434
+ sender_name?: string;
17435
+ /** @example Happy birthday! */
17436
+ personal_message?: string;
17437
+ /** @description Internal staff note. */
17438
+ note?: string;
17439
+ /**
17440
+ * Format: date-time
17441
+ * @description Optional expiration date (ISO 8601).
17442
+ */
17443
+ expires_at?: string;
17444
+ /** @default {} */
17445
+ metadata?: {
17446
+ [key: string]: string | number;
17447
+ };
17448
+ };
17449
+ };
17450
+ };
17451
+ responses: {
17452
+ /** @description Gift card created */
17453
+ 201: {
17454
+ headers: {
17455
+ [name: string]: unknown;
17456
+ };
17457
+ content: {
17458
+ "application/json": {
17459
+ data: components["schemas"]["GiftCard"];
17460
+ };
17461
+ };
17462
+ };
17463
+ };
17464
+ };
17465
+ lookupGiftCard: {
17466
+ parameters: {
17467
+ query: {
17468
+ /** @description Gift card code. */
17469
+ code: string;
17470
+ };
17471
+ header?: never;
17472
+ path?: never;
17473
+ cookie?: never;
17474
+ };
17475
+ requestBody?: never;
17476
+ responses: {
17477
+ /** @description Gift card balance */
17478
+ 200: {
17479
+ headers: {
17480
+ [name: string]: unknown;
17481
+ };
17482
+ content: {
17483
+ "application/json": {
17484
+ data: components["schemas"]["GiftCardLookup"];
17485
+ };
17486
+ };
17487
+ };
17488
+ };
17489
+ };
17490
+ getGiftCard: {
17491
+ parameters: {
17492
+ query?: never;
17493
+ header?: never;
17494
+ path: {
17495
+ id: string;
17496
+ };
17497
+ cookie?: never;
17498
+ };
17499
+ requestBody?: never;
17500
+ responses: {
17501
+ /** @description Gift card details */
17502
+ 200: {
17503
+ headers: {
17504
+ [name: string]: unknown;
17505
+ };
17506
+ content: {
17507
+ "application/json": {
17508
+ data: components["schemas"]["GiftCard"];
17509
+ };
17510
+ };
17511
+ };
17512
+ };
17513
+ };
17514
+ updateGiftCard: {
17515
+ parameters: {
17516
+ query?: never;
17517
+ header?: never;
17518
+ path: {
17519
+ id: string;
17520
+ };
17521
+ cookie?: never;
17522
+ };
17523
+ requestBody?: {
17524
+ content: {
17525
+ "application/json": {
17526
+ note?: string | null;
17527
+ /** Format: date-time */
17528
+ expires_at?: string | null;
17529
+ /** Format: email */
17530
+ recipient_email?: string | null;
17531
+ recipient_name?: string | null;
17532
+ sender_name?: string | null;
17533
+ personal_message?: string | null;
17534
+ metadata?: {
17535
+ [key: string]: string | number;
17536
+ };
17537
+ };
17538
+ };
17539
+ };
17540
+ responses: {
17541
+ /** @description Gift card updated */
17542
+ 200: {
17543
+ headers: {
17544
+ [name: string]: unknown;
17545
+ };
17546
+ content: {
17547
+ "application/json": {
17548
+ data: components["schemas"]["GiftCard"];
17549
+ };
17550
+ };
17551
+ };
17552
+ };
17553
+ };
17554
+ deactivateGiftCard: {
17555
+ parameters: {
17556
+ query?: never;
17557
+ header?: never;
17558
+ path: {
17559
+ id: string;
17560
+ };
17561
+ cookie?: never;
17562
+ };
17563
+ requestBody?: never;
17564
+ responses: {
17565
+ /** @description Gift card deactivated */
17566
+ 200: {
17567
+ headers: {
17568
+ [name: string]: unknown;
17569
+ };
17570
+ content: {
17571
+ "application/json": {
17572
+ data: components["schemas"]["GiftCard"];
17573
+ };
17574
+ };
17575
+ };
17576
+ };
17577
+ };
17578
+ listGiftCardTransactions: {
17579
+ parameters: {
17580
+ query?: {
17581
+ limit?: number;
17582
+ cursor?: string;
17583
+ fields?: string;
17584
+ sort?: "created_at" | "updated_at";
17585
+ order?: "asc" | "desc";
17586
+ };
17587
+ header?: never;
17588
+ path: {
17589
+ id: string;
17590
+ };
17591
+ cookie?: never;
17592
+ };
17593
+ requestBody?: never;
17594
+ responses: {
17595
+ /** @description Paginated transaction list */
17596
+ 200: {
17597
+ headers: {
17598
+ [name: string]: unknown;
17599
+ };
17600
+ content: {
17601
+ "application/json": {
17602
+ data: components["schemas"]["GiftCardTransaction"][];
17603
+ pagination: {
17604
+ cursor: string | null;
17605
+ has_more: boolean;
17606
+ total: number;
17607
+ };
17608
+ };
17609
+ };
17610
+ };
17611
+ };
17612
+ };
17613
+ creditGiftCard: {
17614
+ parameters: {
17615
+ query?: never;
17616
+ header?: never;
17617
+ path: {
17618
+ id: string;
17619
+ };
17620
+ cookie?: never;
17621
+ };
17622
+ requestBody?: {
17623
+ content: {
17624
+ "application/json": {
17625
+ /**
17626
+ * @description Amount to add in minor units.
17627
+ * @example 1000
17628
+ */
17629
+ amount: number;
17630
+ note?: string;
17631
+ };
17632
+ };
17633
+ };
17634
+ responses: {
17635
+ /** @description Credit applied */
17636
+ 201: {
17637
+ headers: {
17638
+ [name: string]: unknown;
17639
+ };
17640
+ content: {
17641
+ "application/json": {
17642
+ data: components["schemas"]["GiftCardTransaction"];
17643
+ };
17644
+ };
17645
+ };
17646
+ };
17647
+ };
17648
+ debitGiftCard: {
17649
+ parameters: {
17650
+ query?: never;
17651
+ header?: never;
17652
+ path: {
17653
+ id: string;
17654
+ };
17655
+ cookie?: never;
17656
+ };
17657
+ requestBody?: {
17658
+ content: {
17659
+ "application/json": {
17660
+ /**
17661
+ * @description Amount to deduct in minor units.
17662
+ * @example 1000
17663
+ */
17664
+ amount: number;
17665
+ note?: string;
17666
+ };
17667
+ };
17668
+ };
17669
+ responses: {
17670
+ /** @description Debit applied */
17671
+ 201: {
17672
+ headers: {
17673
+ [name: string]: unknown;
17674
+ };
17675
+ content: {
17676
+ "application/json": {
17677
+ data: components["schemas"]["GiftCardTransaction"];
17678
+ };
17679
+ };
17680
+ };
17681
+ };
17682
+ };
17243
17683
  listPosts: {
17244
17684
  parameters: {
17245
17685
  query?: {
@@ -18193,7 +18633,7 @@ interface operations {
18193
18633
  sort?: "created_at" | "updated_at" | "title" | "relevance";
18194
18634
  order?: "asc" | "desc";
18195
18635
  /** @description Filter by notification type */
18196
- type?: "email_verification" | "welcome" | "password_reset" | "password_changed" | "order_confirmation" | "order_cancelled" | "refund_issued" | "draft_order_payment_request" | "shipping_confirmation" | "delivery_confirmation" | "cart_recovery" | "booking_confirmation" | "new_order" | "low_stock" | "domain_warning" | "domain_revoked" | "domain_recovered";
18636
+ type?: "email_verification" | "welcome" | "password_reset" | "password_changed" | "order_confirmation" | "order_cancelled" | "refund_issued" | "draft_order_payment_request" | "shipping_confirmation" | "delivery_confirmation" | "cart_recovery" | "booking_confirmation" | "gift_card_delivery" | "new_order" | "low_stock" | "domain_warning" | "domain_revoked" | "domain_recovered";
18197
18637
  /** @description Filter by delivery status */
18198
18638
  status?: "sent" | "failed" | "skipped";
18199
18639
  /** @description Filter by recipient email */
@@ -18266,7 +18706,7 @@ interface operations {
18266
18706
  * @example new_order
18267
18707
  * @enum {string}
18268
18708
  */
18269
- type: "email_verification" | "welcome" | "password_reset" | "password_changed" | "order_confirmation" | "order_cancelled" | "refund_issued" | "draft_order_payment_request" | "shipping_confirmation" | "delivery_confirmation" | "cart_recovery" | "booking_confirmation" | "new_order" | "low_stock" | "domain_warning" | "domain_revoked" | "domain_recovered";
18709
+ type: "email_verification" | "welcome" | "password_reset" | "password_changed" | "order_confirmation" | "order_cancelled" | "refund_issued" | "draft_order_payment_request" | "shipping_confirmation" | "delivery_confirmation" | "cart_recovery" | "booking_confirmation" | "gift_card_delivery" | "new_order" | "low_stock" | "domain_warning" | "domain_revoked" | "domain_recovered";
18270
18710
  /**
18271
18711
  * Format: email
18272
18712
  * @description Email address to send the test to
@@ -19142,6 +19582,7 @@ interface operations {
19142
19582
  fields?: string;
19143
19583
  sort?: "created_at" | "updated_at" | "title" | "relevance";
19144
19584
  order?: "asc" | "desc";
19585
+ reason?: string;
19145
19586
  };
19146
19587
  header?: never;
19147
19588
  path?: never;
@@ -20425,10 +20866,22 @@ type CreditTransaction = NonNullable<operations['issueCustomerCredit']['response
20425
20866
  type CreditBalance = NonNullable<operations['getCustomerCredit']['responses']['200']['content']['application/json']['data']>;
20426
20867
  type ListParams$6 = NonNullable<operations['listCustomerCreditTransactions']['parameters']['query']>;
20427
20868
  type IssueCreditBody = NonNullable<operations['issueCustomerCredit']['requestBody']>['content']['application/json'];
20869
+ interface LoyaltySummary {
20870
+ enabled: boolean;
20871
+ lifetime_earned_credit?: number;
20872
+ lifetime_earned_points?: number;
20873
+ active_loyalty_credit?: number;
20874
+ active_loyalty_points?: number;
20875
+ clawed_back_credit?: number;
20876
+ expired_credit?: number;
20877
+ display_multiplier?: number;
20878
+ earn_rate_bps?: number;
20879
+ }
20428
20880
  declare class StoreCreditResource {
20429
20881
  private client;
20430
20882
  constructor(client: Hydra);
20431
20883
  getBalance(customerId: string): Promise<DataResponse<CreditBalance>>;
20884
+ getLoyalty(customerId: string): Promise<DataResponse<LoyaltySummary>>;
20432
20885
  issue(customerId: string, body: IssueCreditBody, options?: ResourceRequestOptions): Promise<DataResponse<CreditTransaction>>;
20433
20886
  listTransactions(customerId: string, params?: ListParams$6): Promise<ListResponse<CreditTransaction>>;
20434
20887
  iterateTransactions(customerId: string, params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CreditTransaction, void, undefined>;
@@ -20983,4 +21436,4 @@ declare class HydraIdempotencyError extends HydraError {
20983
21436
  constructor(body: HydraErrorBody, headers: Headers);
20984
21437
  }
20985
21438
 
20986
- export { AddressesResource, type AnalyticsActionItems$1 as AnalyticsActionItems, type AnalyticsOrdersSeries$1 as AnalyticsOrdersSeries, AnalyticsResource, type AnalyticsSummary$1 as AnalyticsSummary, type AnalyticsTimeSeries$1 as AnalyticsTimeSeries, type AnalyticsTopProduct$1 as AnalyticsTopProduct, type AppInfo, type Appointment$1 as Appointment, type AvailabilityOverride$1 as AvailabilityOverride, BookingsResource, type Cart$1 as Cart, type CartItem, CartResource, type Channel$1 as Channel, ChannelsResource, type CheckoutCreate$1 as CheckoutCreate, type CheckoutGet$1 as CheckoutGet, type CheckoutListItem$1 as CheckoutListItem, CheckoutResource, CheckoutsResource, type Collection$1 as Collection, CollectionsResource, CompaniesResource, type Company$1 as Company, ContentCategoriesResource, type ContentCategory$1 as ContentCategory, type CreateGiftCardBody, type Customer$1 as Customer, type CustomerGroup$1 as CustomerGroup, CustomerGroupsResource, type CustomerMembership$1 as CustomerMembership, type CustomerPhoto$1 as CustomerPhoto, CustomerPhotosResource, CustomersResource, type DataResponse, type DayAvailability$1 as DayAvailability, type Discount$1 as Discount, DiscountsResource, type DraftOrder$1 as DraftOrder, DraftOrdersResource, type ExchangeRate$1 as ExchangeRate, ExchangeRatesResource, type Fulfillment$1 as Fulfillment, type FulfillmentOrder$2 as FulfillmentOrder, FulfillmentOrdersResource, FulfillmentsResource, type GenerateVariantsResult$1 as GenerateVariantsResult, type GiftCard, type CreditDebitBody as GiftCardCreditDebitBody, type GiftCardLookup, type GiftCardTransaction, GiftCardsResource, Hydra, HydraAuthenticationError, type HydraConfig, HydraConnectionError, HydraError, type HydraErrorBody, HydraIdempotencyError, HydraNotFoundError, HydraPermissionError, HydraRateLimitError, HydraValidationError, type Image$2 as Image, ImagesResource, IntegrationsResource, type InventoryLevel$1 as InventoryLevel, InventoryResource, type ListGiftCardTransactionsParams, type ListGiftCardsParams, type ListResponse, type Location$1 as Location, LocationsResource, type Lookbook$1 as Lookbook, type LookbookTag$1 as LookbookTag, LookbooksResource, type MembershipPlan$1 as MembershipPlan, MembershipPlansResource, MetafieldsResource, type NotificationLog$1 as NotificationLog, NotificationsResource, type Order$2 as Order, OrdersResource, type PaginateOptions, type Pagination, type Post$1 as Post, PostsResource, type Product$1 as Product, type ProductStats$1 as ProductStats, ProductsResource, type Promotion$1 as Promotion, PromotionsResource, type PurchaseOrder$1 as PurchaseOrder, PurchaseOrdersResource, type Redirect$1 as Redirect, RedirectsResource, type Refund$1 as Refund, RefundsResource, type RequestOptions, type ResourceRequestOptions, type Return$1 as Return, ReturnsResource, SearchResource, type ShippingRate$1 as ShippingRate, ShippingResource, type ShippingZone$1 as ShippingZone, type Slot, type Store$1 as Store, StoreCreditResource, StoreResource, type SuggestedSlot$1 as SuggestedSlot, type Tag$1 as Tag, TagsResource, type TaxExemption$1 as TaxExemption, type TaxGroup$1 as TaxGroup, type TaxRate$1 as TaxRate, TaxResource, type UpdateGiftCardBody, type Variant$2 as Variant, type VariantPrice$1 as VariantPrice, VariantsResource, type Webhook$1 as Webhook, WebhooksResource, paginate, toArray };
21439
+ export { AddressesResource, type AnalyticsActionItems$1 as AnalyticsActionItems, type AnalyticsOrdersSeries$1 as AnalyticsOrdersSeries, AnalyticsResource, type AnalyticsSummary$1 as AnalyticsSummary, type AnalyticsTimeSeries$1 as AnalyticsTimeSeries, type AnalyticsTopProduct$1 as AnalyticsTopProduct, type AppInfo, type Appointment$1 as Appointment, type AvailabilityOverride$1 as AvailabilityOverride, BookingsResource, type Cart$1 as Cart, type CartItem, CartResource, type Channel$1 as Channel, ChannelsResource, type CheckoutCreate$1 as CheckoutCreate, type CheckoutGet$1 as CheckoutGet, type CheckoutListItem$1 as CheckoutListItem, CheckoutResource, CheckoutsResource, type Collection$1 as Collection, CollectionsResource, CompaniesResource, type Company$1 as Company, ContentCategoriesResource, type ContentCategory$1 as ContentCategory, type CreateGiftCardBody, type Customer$1 as Customer, type CustomerGroup$1 as CustomerGroup, CustomerGroupsResource, type CustomerMembership$1 as CustomerMembership, type CustomerPhoto$1 as CustomerPhoto, CustomerPhotosResource, CustomersResource, type DataResponse, type DayAvailability$1 as DayAvailability, type Discount$1 as Discount, DiscountsResource, type DraftOrder$1 as DraftOrder, DraftOrdersResource, type ExchangeRate$1 as ExchangeRate, ExchangeRatesResource, type Fulfillment$1 as Fulfillment, type FulfillmentOrder$2 as FulfillmentOrder, FulfillmentOrdersResource, FulfillmentsResource, type GenerateVariantsResult$1 as GenerateVariantsResult, type GiftCard, type CreditDebitBody as GiftCardCreditDebitBody, type GiftCardLookup, type GiftCardTransaction, GiftCardsResource, Hydra, HydraAuthenticationError, type HydraConfig, HydraConnectionError, HydraError, type HydraErrorBody, HydraIdempotencyError, HydraNotFoundError, HydraPermissionError, HydraRateLimitError, HydraValidationError, type Image$2 as Image, ImagesResource, IntegrationsResource, type InventoryLevel$1 as InventoryLevel, InventoryResource, type ListGiftCardTransactionsParams, type ListGiftCardsParams, type ListResponse, type Location$1 as Location, LocationsResource, type Lookbook$1 as Lookbook, type LookbookTag$1 as LookbookTag, LookbooksResource, type LoyaltySummary, type MembershipPlan$1 as MembershipPlan, MembershipPlansResource, MetafieldsResource, type NotificationLog$1 as NotificationLog, NotificationsResource, type Order$2 as Order, OrdersResource, type PaginateOptions, type Pagination, type Post$1 as Post, PostsResource, type Product$1 as Product, type ProductStats$1 as ProductStats, ProductsResource, type Promotion$1 as Promotion, PromotionsResource, type PurchaseOrder$1 as PurchaseOrder, PurchaseOrdersResource, type Redirect$1 as Redirect, RedirectsResource, type Refund$1 as Refund, RefundsResource, type RequestOptions, type ResourceRequestOptions, type Return$1 as Return, ReturnsResource, SearchResource, type ShippingRate$1 as ShippingRate, ShippingResource, type ShippingZone$1 as ShippingZone, type Slot, type Store$1 as Store, StoreCreditResource, StoreResource, type SuggestedSlot$1 as SuggestedSlot, type Tag$1 as Tag, TagsResource, type TaxExemption$1 as TaxExemption, type TaxGroup$1 as TaxGroup, type TaxRate$1 as TaxRate, TaxResource, type UpdateGiftCardBody, type Variant$2 as Variant, type VariantPrice$1 as VariantPrice, VariantsResource, type Webhook$1 as Webhook, WebhooksResource, paginate, toArray };
package/dist/index.js CHANGED
@@ -1381,6 +1381,9 @@ var StoreCreditResource = class {
1381
1381
  async getBalance(customerId) {
1382
1382
  return this.client.request("GET", `/v1/customers/${customerId}/credit`);
1383
1383
  }
1384
+ async getLoyalty(customerId) {
1385
+ return this.client.request("GET", `/v1/customers/${customerId}/loyalty`);
1386
+ }
1384
1387
  async issue(customerId, body, options) {
1385
1388
  return this.client.request("POST", `/v1/customers/${customerId}/credit`, {
1386
1389
  body,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.1.30",
3
+ "version": "0.1.33",
4
4
  "description": "Official TypeScript SDK for the Hydra Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",