@gethydra/sdk 0.1.35 → 0.1.36
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 +223 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -108,6 +108,8 @@ interface components {
|
|
|
108
108
|
exclude_services: boolean;
|
|
109
109
|
/** @example 0 */
|
|
110
110
|
min_order_total: number;
|
|
111
|
+
/** @example 12 */
|
|
112
|
+
pending_hours: number;
|
|
111
113
|
};
|
|
112
114
|
pricing_config: {
|
|
113
115
|
/** @example 2 */
|
|
@@ -3450,6 +3452,126 @@ interface components {
|
|
|
3450
3452
|
valid: boolean;
|
|
3451
3453
|
staff?: components["schemas"]["PosStaff"];
|
|
3452
3454
|
};
|
|
3455
|
+
PosAnalyticsDashboard: {
|
|
3456
|
+
period: {
|
|
3457
|
+
/** @example 2026-11-17 */
|
|
3458
|
+
from: string;
|
|
3459
|
+
/** @example 2026-11-17 */
|
|
3460
|
+
to: string;
|
|
3461
|
+
};
|
|
3462
|
+
/** @description Comparison date range, or null when compare=none. */
|
|
3463
|
+
comparison_period: {
|
|
3464
|
+
from: string;
|
|
3465
|
+
to: string;
|
|
3466
|
+
} | null;
|
|
3467
|
+
/**
|
|
3468
|
+
* @description Store base currency.
|
|
3469
|
+
* @example gbp
|
|
3470
|
+
*/
|
|
3471
|
+
currency: string;
|
|
3472
|
+
takings: {
|
|
3473
|
+
/** @description Total collected via cash payments (cents). */
|
|
3474
|
+
cash_collected: number;
|
|
3475
|
+
/** @description Total collected via card payments (cents). */
|
|
3476
|
+
card_collected: number;
|
|
3477
|
+
/** @description Total amount paid via gift cards (cents). */
|
|
3478
|
+
gift_card_payments: number;
|
|
3479
|
+
/** @description Total amount paid via store credit (cents). */
|
|
3480
|
+
store_credit_payments: number;
|
|
3481
|
+
/** @description Total discount amount applied (cents). */
|
|
3482
|
+
discounts_given: number;
|
|
3483
|
+
/** @description Cash + card actually received at the till (cents). */
|
|
3484
|
+
net_collected: number;
|
|
3485
|
+
};
|
|
3486
|
+
/** @description Takings for the comparison period, or null. */
|
|
3487
|
+
previous_takings: {
|
|
3488
|
+
/** @description Total collected via cash payments (cents). */
|
|
3489
|
+
cash_collected: number;
|
|
3490
|
+
/** @description Total collected via card payments (cents). */
|
|
3491
|
+
card_collected: number;
|
|
3492
|
+
/** @description Total amount paid via gift cards (cents). */
|
|
3493
|
+
gift_card_payments: number;
|
|
3494
|
+
/** @description Total amount paid via store credit (cents). */
|
|
3495
|
+
store_credit_payments: number;
|
|
3496
|
+
/** @description Total discount amount applied (cents). */
|
|
3497
|
+
discounts_given: number;
|
|
3498
|
+
/** @description Cash + card actually received at the till (cents). */
|
|
3499
|
+
net_collected: number;
|
|
3500
|
+
} | null;
|
|
3501
|
+
summary: {
|
|
3502
|
+
/** @description Sum of order subtotals (cents). */
|
|
3503
|
+
gross_revenue: {
|
|
3504
|
+
/** @description Metric value for the current period. */
|
|
3505
|
+
value: number;
|
|
3506
|
+
/** @description Metric value for the comparison period, or null. */
|
|
3507
|
+
previous: number | null;
|
|
3508
|
+
/** @description Percentage change vs comparison period (2dp), or null. */
|
|
3509
|
+
change: number | null;
|
|
3510
|
+
};
|
|
3511
|
+
/** @description Sum of order totals — actual cash/card received (cents). */
|
|
3512
|
+
net_collected: {
|
|
3513
|
+
/** @description Metric value for the current period. */
|
|
3514
|
+
value: number;
|
|
3515
|
+
/** @description Metric value for the comparison period, or null. */
|
|
3516
|
+
previous: number | null;
|
|
3517
|
+
/** @description Percentage change vs comparison period (2dp), or null. */
|
|
3518
|
+
change: number | null;
|
|
3519
|
+
};
|
|
3520
|
+
/** @description Number of non-cancelled orders. */
|
|
3521
|
+
order_count: {
|
|
3522
|
+
/** @description Metric value for the current period. */
|
|
3523
|
+
value: number;
|
|
3524
|
+
/** @description Metric value for the comparison period, or null. */
|
|
3525
|
+
previous: number | null;
|
|
3526
|
+
/** @description Percentage change vs comparison period (2dp), or null. */
|
|
3527
|
+
change: number | null;
|
|
3528
|
+
};
|
|
3529
|
+
/** @description Gross revenue per order (cents). */
|
|
3530
|
+
average_order_value: {
|
|
3531
|
+
/** @description Metric value for the current period. */
|
|
3532
|
+
value: number;
|
|
3533
|
+
/** @description Metric value for the comparison period, or null. */
|
|
3534
|
+
previous: number | null;
|
|
3535
|
+
/** @description Percentage change vs comparison period (2dp), or null. */
|
|
3536
|
+
change: number | null;
|
|
3537
|
+
};
|
|
3538
|
+
/** @description Total quantity of line items sold. */
|
|
3539
|
+
items_sold: {
|
|
3540
|
+
/** @description Metric value for the current period. */
|
|
3541
|
+
value: number;
|
|
3542
|
+
/** @description Metric value for the comparison period, or null. */
|
|
3543
|
+
previous: number | null;
|
|
3544
|
+
/** @description Percentage change vs comparison period (2dp), or null. */
|
|
3545
|
+
change: number | null;
|
|
3546
|
+
};
|
|
3547
|
+
};
|
|
3548
|
+
top_products: {
|
|
3549
|
+
/** @description Product ID. */
|
|
3550
|
+
product_id: string | null;
|
|
3551
|
+
/** @description Product title. */
|
|
3552
|
+
title: string;
|
|
3553
|
+
/** @description Product image URL. */
|
|
3554
|
+
image_src: string | null;
|
|
3555
|
+
/** @description Total line-item revenue (cents). */
|
|
3556
|
+
revenue: number;
|
|
3557
|
+
/** @description Total quantity sold. */
|
|
3558
|
+
quantity_sold: number;
|
|
3559
|
+
/** @description Number of distinct orders containing this product. */
|
|
3560
|
+
orders: number;
|
|
3561
|
+
}[];
|
|
3562
|
+
staff: {
|
|
3563
|
+
/** @description Staff member ID. */
|
|
3564
|
+
staff_id: string;
|
|
3565
|
+
/** @description Staff member name. */
|
|
3566
|
+
staff_name: string;
|
|
3567
|
+
/** @description Number of orders processed. */
|
|
3568
|
+
order_count: number;
|
|
3569
|
+
/** @description Commissionable amount — actual cash/card collected (cents). */
|
|
3570
|
+
total_collected: number;
|
|
3571
|
+
/** @description Sum of subtotals for orders by this staff (cents). */
|
|
3572
|
+
gross_revenue: number;
|
|
3573
|
+
}[];
|
|
3574
|
+
};
|
|
3453
3575
|
DayAvailability: {
|
|
3454
3576
|
/** @example 2026-11-20 */
|
|
3455
3577
|
date: string;
|
|
@@ -3664,6 +3786,28 @@ interface components {
|
|
|
3664
3786
|
status: "active" | "deactivated";
|
|
3665
3787
|
expires_at: string | null;
|
|
3666
3788
|
};
|
|
3789
|
+
GiftCardConvert: {
|
|
3790
|
+
gift_card: components["schemas"]["GiftCard"];
|
|
3791
|
+
credit_transaction: {
|
|
3792
|
+
id: string;
|
|
3793
|
+
customer_id: string;
|
|
3794
|
+
/** @enum {string} */
|
|
3795
|
+
type: "credit" | "debit" | "expiry";
|
|
3796
|
+
amount: number;
|
|
3797
|
+
balance_after: number;
|
|
3798
|
+
reason: string;
|
|
3799
|
+
note: string | null;
|
|
3800
|
+
related_order_id: string | null;
|
|
3801
|
+
related_refund_id: string | null;
|
|
3802
|
+
expires_at: string | null;
|
|
3803
|
+
metadata: {
|
|
3804
|
+
[key: string]: string | number;
|
|
3805
|
+
};
|
|
3806
|
+
created_at: string;
|
|
3807
|
+
updated_at: string;
|
|
3808
|
+
};
|
|
3809
|
+
customer_balance: number;
|
|
3810
|
+
};
|
|
3667
3811
|
GiftCardTransaction: {
|
|
3668
3812
|
id: string;
|
|
3669
3813
|
gift_card_id: string;
|
|
@@ -4537,6 +4681,8 @@ interface operations {
|
|
|
4537
4681
|
exclude_services?: boolean;
|
|
4538
4682
|
/** @example 0 */
|
|
4539
4683
|
min_order_total?: number;
|
|
4684
|
+
/** @example 12 */
|
|
4685
|
+
pending_hours?: number;
|
|
4540
4686
|
};
|
|
4541
4687
|
gift_card_config?: {
|
|
4542
4688
|
default_expiry_days?: number | null;
|
|
@@ -10119,6 +10265,8 @@ interface operations {
|
|
|
10119
10265
|
"application/json": {
|
|
10120
10266
|
data: {
|
|
10121
10267
|
balance: number;
|
|
10268
|
+
available_balance: number;
|
|
10269
|
+
pending_balance: number;
|
|
10122
10270
|
currency: string;
|
|
10123
10271
|
};
|
|
10124
10272
|
};
|
|
@@ -10169,6 +10317,7 @@ interface operations {
|
|
|
10169
10317
|
related_order_id: string | null;
|
|
10170
10318
|
related_refund_id: string | null;
|
|
10171
10319
|
expires_at: string | null;
|
|
10320
|
+
usable_after: string | null;
|
|
10172
10321
|
metadata: {
|
|
10173
10322
|
[key: string]: string | number;
|
|
10174
10323
|
};
|
|
@@ -10217,6 +10366,7 @@ interface operations {
|
|
|
10217
10366
|
related_order_id: string | null;
|
|
10218
10367
|
related_refund_id: string | null;
|
|
10219
10368
|
expires_at: string | null;
|
|
10369
|
+
usable_after: string | null;
|
|
10220
10370
|
metadata: {
|
|
10221
10371
|
[key: string]: string | number;
|
|
10222
10372
|
};
|
|
@@ -13316,7 +13466,7 @@ interface operations {
|
|
|
13316
13466
|
* "order.paid"
|
|
13317
13467
|
* ]
|
|
13318
13468
|
*/
|
|
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")[];
|
|
13469
|
+
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" | "gift_card.converted" | "membership.created" | "membership.updated" | "membership.cancelled" | "membership.expired" | "usage.warning" | "booking.created" | "booking.confirmed" | "booking.cancelled" | "booking.completed" | "lookbook.created" | "lookbook.updated" | "lookbook.deleted")[];
|
|
13320
13470
|
/**
|
|
13321
13471
|
* @default active
|
|
13322
13472
|
* @example active
|
|
@@ -13410,7 +13560,7 @@ interface operations {
|
|
|
13410
13560
|
* "product.updated"
|
|
13411
13561
|
* ]
|
|
13412
13562
|
*/
|
|
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")[];
|
|
13563
|
+
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" | "gift_card.converted" | "membership.created" | "membership.updated" | "membership.cancelled" | "membership.expired" | "usage.warning" | "booking.created" | "booking.confirmed" | "booking.cancelled" | "booking.completed" | "lookbook.created" | "lookbook.updated" | "lookbook.deleted")[];
|
|
13414
13564
|
/**
|
|
13415
13565
|
* @example active
|
|
13416
13566
|
* @enum {string}
|
|
@@ -16699,6 +16849,41 @@ interface operations {
|
|
|
16699
16849
|
};
|
|
16700
16850
|
};
|
|
16701
16851
|
};
|
|
16852
|
+
getPosAnalyticsDashboard: {
|
|
16853
|
+
parameters: {
|
|
16854
|
+
query: {
|
|
16855
|
+
/** @description Location ID to scope analytics to. */
|
|
16856
|
+
location_id: string;
|
|
16857
|
+
/** @description Start date (YYYY-MM-DD). */
|
|
16858
|
+
from: string;
|
|
16859
|
+
/** @description End date (YYYY-MM-DD). */
|
|
16860
|
+
to: string;
|
|
16861
|
+
/** @description Comparison mode. */
|
|
16862
|
+
compare?: "previous_period" | "none";
|
|
16863
|
+
/** @description Number of top products to return (1-20). */
|
|
16864
|
+
top_products_limit?: number;
|
|
16865
|
+
/** @description Sort top products by revenue or quantity sold. */
|
|
16866
|
+
top_products_sort?: "revenue" | "quantity";
|
|
16867
|
+
};
|
|
16868
|
+
header?: never;
|
|
16869
|
+
path?: never;
|
|
16870
|
+
cookie?: never;
|
|
16871
|
+
};
|
|
16872
|
+
requestBody?: never;
|
|
16873
|
+
responses: {
|
|
16874
|
+
/** @description POS analytics dashboard data */
|
|
16875
|
+
200: {
|
|
16876
|
+
headers: {
|
|
16877
|
+
[name: string]: unknown;
|
|
16878
|
+
};
|
|
16879
|
+
content: {
|
|
16880
|
+
"application/json": {
|
|
16881
|
+
data: components["schemas"]["PosAnalyticsDashboard"];
|
|
16882
|
+
};
|
|
16883
|
+
};
|
|
16884
|
+
};
|
|
16885
|
+
};
|
|
16886
|
+
};
|
|
16702
16887
|
listBookableLocations: {
|
|
16703
16888
|
parameters: {
|
|
16704
16889
|
query?: never;
|
|
@@ -17575,6 +17760,40 @@ interface operations {
|
|
|
17575
17760
|
};
|
|
17576
17761
|
};
|
|
17577
17762
|
};
|
|
17763
|
+
convertGiftCardToStoreCredit: {
|
|
17764
|
+
parameters: {
|
|
17765
|
+
query?: never;
|
|
17766
|
+
header?: never;
|
|
17767
|
+
path: {
|
|
17768
|
+
id: string;
|
|
17769
|
+
};
|
|
17770
|
+
cookie?: never;
|
|
17771
|
+
};
|
|
17772
|
+
requestBody?: {
|
|
17773
|
+
content: {
|
|
17774
|
+
"application/json": {
|
|
17775
|
+
/**
|
|
17776
|
+
* @description Customer to receive the store credit.
|
|
17777
|
+
* @example cus_abc123
|
|
17778
|
+
*/
|
|
17779
|
+
customer_id: string;
|
|
17780
|
+
};
|
|
17781
|
+
};
|
|
17782
|
+
};
|
|
17783
|
+
responses: {
|
|
17784
|
+
/** @description Gift card converted to store credit */
|
|
17785
|
+
200: {
|
|
17786
|
+
headers: {
|
|
17787
|
+
[name: string]: unknown;
|
|
17788
|
+
};
|
|
17789
|
+
content: {
|
|
17790
|
+
"application/json": {
|
|
17791
|
+
data: components["schemas"]["GiftCardConvert"];
|
|
17792
|
+
};
|
|
17793
|
+
};
|
|
17794
|
+
};
|
|
17795
|
+
};
|
|
17796
|
+
};
|
|
17578
17797
|
listGiftCardTransactions: {
|
|
17579
17798
|
parameters: {
|
|
17580
17799
|
query?: {
|
|
@@ -20931,6 +21150,8 @@ interface LoyaltySummary {
|
|
|
20931
21150
|
active_loyalty_points?: number;
|
|
20932
21151
|
clawed_back_credit?: number;
|
|
20933
21152
|
expired_credit?: number;
|
|
21153
|
+
pending_credit?: number;
|
|
21154
|
+
pending_points?: number;
|
|
20934
21155
|
display_multiplier?: number;
|
|
20935
21156
|
earn_rate_bps?: number;
|
|
20936
21157
|
}
|