@gethydra/sdk 0.1.17 → 0.1.18
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 +532 -5
- package/dist/index.js +62 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3302,6 +3302,21 @@ interface components {
|
|
|
3302
3302
|
/** @example Visit our Birmingham retail location. */
|
|
3303
3303
|
description?: string;
|
|
3304
3304
|
};
|
|
3305
|
+
/** @example false */
|
|
3306
|
+
booking_enabled: boolean;
|
|
3307
|
+
/** @example 1 */
|
|
3308
|
+
room_count: number;
|
|
3309
|
+
/** @example 30 */
|
|
3310
|
+
slot_duration_minutes: number;
|
|
3311
|
+
/** @example 0 */
|
|
3312
|
+
buffer_minutes: number;
|
|
3313
|
+
/** @example {} */
|
|
3314
|
+
opening_hours: {
|
|
3315
|
+
[key: string]: {
|
|
3316
|
+
open: string;
|
|
3317
|
+
close: string;
|
|
3318
|
+
} | null;
|
|
3319
|
+
};
|
|
3305
3320
|
/**
|
|
3306
3321
|
* @description Number of variants with inventory at this location
|
|
3307
3322
|
* @example 12
|
|
@@ -3355,6 +3370,112 @@ interface components {
|
|
|
3355
3370
|
valid: boolean;
|
|
3356
3371
|
staff?: components["schemas"]["PosStaff"];
|
|
3357
3372
|
};
|
|
3373
|
+
DayAvailability: {
|
|
3374
|
+
/** @example 2026-11-20 */
|
|
3375
|
+
date: string;
|
|
3376
|
+
/** @example wednesday */
|
|
3377
|
+
day_of_week: string;
|
|
3378
|
+
slots: components["schemas"]["Slot"][];
|
|
3379
|
+
};
|
|
3380
|
+
Slot: {
|
|
3381
|
+
/** @example 10:00 */
|
|
3382
|
+
start_time: string;
|
|
3383
|
+
/** @example 10:30 */
|
|
3384
|
+
end_time: string;
|
|
3385
|
+
/** @example 2 */
|
|
3386
|
+
available: number;
|
|
3387
|
+
};
|
|
3388
|
+
SuggestedSlot: {
|
|
3389
|
+
/** @example 2026-11-20 */
|
|
3390
|
+
date: string;
|
|
3391
|
+
/** @example wednesday */
|
|
3392
|
+
day_of_week: string;
|
|
3393
|
+
/** @example 10:00 */
|
|
3394
|
+
start_time: string;
|
|
3395
|
+
/** @example 10:30 */
|
|
3396
|
+
end_time: string;
|
|
3397
|
+
};
|
|
3398
|
+
Appointment: {
|
|
3399
|
+
/** @example appt_abc123def456ghi789 */
|
|
3400
|
+
id: string;
|
|
3401
|
+
/** @example loc_abc123def456ghi789 */
|
|
3402
|
+
location_id: string;
|
|
3403
|
+
/** @example null */
|
|
3404
|
+
customer_id: string | null;
|
|
3405
|
+
/** @example Sophie Turner */
|
|
3406
|
+
customer_name: string;
|
|
3407
|
+
/** @example sophie@example.com */
|
|
3408
|
+
customer_email: string;
|
|
3409
|
+
/** @example +447123456789 */
|
|
3410
|
+
customer_phone: string | null;
|
|
3411
|
+
/** @example 2026-11-20 */
|
|
3412
|
+
scheduled_date: string;
|
|
3413
|
+
/** @example 10:00 */
|
|
3414
|
+
start_time: string;
|
|
3415
|
+
/** @example 10:30 */
|
|
3416
|
+
end_time: string;
|
|
3417
|
+
/**
|
|
3418
|
+
* @example confirmed
|
|
3419
|
+
* @enum {string}
|
|
3420
|
+
*/
|
|
3421
|
+
status: "pending" | "confirmed" | "cancelled" | "completed" | "no_show";
|
|
3422
|
+
/**
|
|
3423
|
+
* @example online
|
|
3424
|
+
* @enum {string}
|
|
3425
|
+
*/
|
|
3426
|
+
source: "online" | "walk_in" | "phone";
|
|
3427
|
+
/** @example 1000 */
|
|
3428
|
+
deposit_amount: number | null;
|
|
3429
|
+
/** @example null */
|
|
3430
|
+
stripe_payment_intent_id: string | null;
|
|
3431
|
+
/** @example null */
|
|
3432
|
+
notes: string | null;
|
|
3433
|
+
/** @example null */
|
|
3434
|
+
metadata: {
|
|
3435
|
+
[key: string]: unknown;
|
|
3436
|
+
} | null;
|
|
3437
|
+
/**
|
|
3438
|
+
* Format: date-time
|
|
3439
|
+
* @example null
|
|
3440
|
+
*/
|
|
3441
|
+
cancelled_at: string | null;
|
|
3442
|
+
/**
|
|
3443
|
+
* Format: date-time
|
|
3444
|
+
* @example 2026-11-12T10:00:00.000Z
|
|
3445
|
+
*/
|
|
3446
|
+
created_at: string;
|
|
3447
|
+
/**
|
|
3448
|
+
* Format: date-time
|
|
3449
|
+
* @example 2026-11-12T10:00:00.000Z
|
|
3450
|
+
*/
|
|
3451
|
+
updated_at: string;
|
|
3452
|
+
};
|
|
3453
|
+
AvailabilityOverride: {
|
|
3454
|
+
/** @example avo_abc123def456ghi789 */
|
|
3455
|
+
id: string;
|
|
3456
|
+
/** @example loc_abc123def456ghi789 */
|
|
3457
|
+
location_id: string;
|
|
3458
|
+
/** @example 2026-12-25 */
|
|
3459
|
+
date: string;
|
|
3460
|
+
/** @example true */
|
|
3461
|
+
is_closed: boolean;
|
|
3462
|
+
/** @example null */
|
|
3463
|
+
open_time: string | null;
|
|
3464
|
+
/** @example null */
|
|
3465
|
+
close_time: string | null;
|
|
3466
|
+
/** @example Christmas Day */
|
|
3467
|
+
reason: string | null;
|
|
3468
|
+
/**
|
|
3469
|
+
* Format: date-time
|
|
3470
|
+
* @example 2026-11-12T10:00:00.000Z
|
|
3471
|
+
*/
|
|
3472
|
+
created_at: string;
|
|
3473
|
+
/**
|
|
3474
|
+
* Format: date-time
|
|
3475
|
+
* @example 2026-11-12T10:00:00.000Z
|
|
3476
|
+
*/
|
|
3477
|
+
updated_at: string;
|
|
3478
|
+
};
|
|
3358
3479
|
Post: {
|
|
3359
3480
|
/** @example post_abc123 */
|
|
3360
3481
|
id: string;
|
|
@@ -12836,7 +12957,7 @@ interface operations {
|
|
|
12836
12957
|
* "order.paid"
|
|
12837
12958
|
* ]
|
|
12838
12959
|
*/
|
|
12839
|
-
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")[];
|
|
12960
|
+
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")[];
|
|
12840
12961
|
/**
|
|
12841
12962
|
* @default active
|
|
12842
12963
|
* @example active
|
|
@@ -12930,7 +13051,7 @@ interface operations {
|
|
|
12930
13051
|
* "product.updated"
|
|
12931
13052
|
* ]
|
|
12932
13053
|
*/
|
|
12933
|
-
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")[];
|
|
13054
|
+
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")[];
|
|
12934
13055
|
/**
|
|
12935
13056
|
* @example active
|
|
12936
13057
|
* @enum {string}
|
|
@@ -15633,6 +15754,33 @@ interface operations {
|
|
|
15633
15754
|
metadata?: {
|
|
15634
15755
|
[key: string]: string | number;
|
|
15635
15756
|
};
|
|
15757
|
+
/** @example true */
|
|
15758
|
+
booking_enabled?: boolean;
|
|
15759
|
+
/** @example 2 */
|
|
15760
|
+
room_count?: number;
|
|
15761
|
+
/** @example 30 */
|
|
15762
|
+
slot_duration_minutes?: number;
|
|
15763
|
+
/** @example 10 */
|
|
15764
|
+
buffer_minutes?: number;
|
|
15765
|
+
/**
|
|
15766
|
+
* @example {
|
|
15767
|
+
* "monday": {
|
|
15768
|
+
* "open": "10:00",
|
|
15769
|
+
* "close": "18:00"
|
|
15770
|
+
* },
|
|
15771
|
+
* "tuesday": {
|
|
15772
|
+
* "open": "10:00",
|
|
15773
|
+
* "close": "18:00"
|
|
15774
|
+
* },
|
|
15775
|
+
* "sunday": null
|
|
15776
|
+
* }
|
|
15777
|
+
*/
|
|
15778
|
+
opening_hours?: {
|
|
15779
|
+
[key: string]: {
|
|
15780
|
+
open: string;
|
|
15781
|
+
close: string;
|
|
15782
|
+
} | null;
|
|
15783
|
+
};
|
|
15636
15784
|
};
|
|
15637
15785
|
};
|
|
15638
15786
|
};
|
|
@@ -16127,6 +16275,334 @@ interface operations {
|
|
|
16127
16275
|
};
|
|
16128
16276
|
};
|
|
16129
16277
|
};
|
|
16278
|
+
listBookableLocations: {
|
|
16279
|
+
parameters: {
|
|
16280
|
+
query?: never;
|
|
16281
|
+
header?: never;
|
|
16282
|
+
path?: never;
|
|
16283
|
+
cookie?: never;
|
|
16284
|
+
};
|
|
16285
|
+
requestBody?: never;
|
|
16286
|
+
responses: {
|
|
16287
|
+
/** @description Bookable locations */
|
|
16288
|
+
200: {
|
|
16289
|
+
headers: {
|
|
16290
|
+
[name: string]: unknown;
|
|
16291
|
+
};
|
|
16292
|
+
content: {
|
|
16293
|
+
"application/json": {
|
|
16294
|
+
data: {
|
|
16295
|
+
id: string;
|
|
16296
|
+
name: string;
|
|
16297
|
+
address_line1: string | null;
|
|
16298
|
+
city: string | null;
|
|
16299
|
+
postal_code: string | null;
|
|
16300
|
+
phone: string | null;
|
|
16301
|
+
slot_duration_minutes: number;
|
|
16302
|
+
opening_hours: {
|
|
16303
|
+
[key: string]: {
|
|
16304
|
+
open: string;
|
|
16305
|
+
close: string;
|
|
16306
|
+
} | null;
|
|
16307
|
+
};
|
|
16308
|
+
}[];
|
|
16309
|
+
};
|
|
16310
|
+
};
|
|
16311
|
+
};
|
|
16312
|
+
};
|
|
16313
|
+
};
|
|
16314
|
+
getBookingAvailability: {
|
|
16315
|
+
parameters: {
|
|
16316
|
+
query: {
|
|
16317
|
+
location_id: string;
|
|
16318
|
+
date?: string;
|
|
16319
|
+
suggest?: number;
|
|
16320
|
+
};
|
|
16321
|
+
header?: never;
|
|
16322
|
+
path?: never;
|
|
16323
|
+
cookie?: never;
|
|
16324
|
+
};
|
|
16325
|
+
requestBody?: never;
|
|
16326
|
+
responses: {
|
|
16327
|
+
/** @description Available time slots */
|
|
16328
|
+
200: {
|
|
16329
|
+
headers: {
|
|
16330
|
+
[name: string]: unknown;
|
|
16331
|
+
};
|
|
16332
|
+
content: {
|
|
16333
|
+
"application/json": {
|
|
16334
|
+
data: components["schemas"]["DayAvailability"][] | components["schemas"]["SuggestedSlot"][];
|
|
16335
|
+
};
|
|
16336
|
+
};
|
|
16337
|
+
};
|
|
16338
|
+
};
|
|
16339
|
+
};
|
|
16340
|
+
listAppointments: {
|
|
16341
|
+
parameters: {
|
|
16342
|
+
query?: {
|
|
16343
|
+
limit?: number;
|
|
16344
|
+
cursor?: string;
|
|
16345
|
+
fields?: string;
|
|
16346
|
+
sort?: "created_at" | "scheduled_date";
|
|
16347
|
+
order?: "asc" | "desc";
|
|
16348
|
+
location_id?: string;
|
|
16349
|
+
date_from?: string;
|
|
16350
|
+
date_to?: string;
|
|
16351
|
+
status?: "pending" | "confirmed" | "cancelled" | "completed" | "no_show";
|
|
16352
|
+
customer_email?: string;
|
|
16353
|
+
};
|
|
16354
|
+
header?: never;
|
|
16355
|
+
path?: never;
|
|
16356
|
+
cookie?: never;
|
|
16357
|
+
};
|
|
16358
|
+
requestBody?: never;
|
|
16359
|
+
responses: {
|
|
16360
|
+
/** @description Paginated appointment list */
|
|
16361
|
+
200: {
|
|
16362
|
+
headers: {
|
|
16363
|
+
[name: string]: unknown;
|
|
16364
|
+
};
|
|
16365
|
+
content: {
|
|
16366
|
+
"application/json": {
|
|
16367
|
+
data: components["schemas"]["Appointment"][];
|
|
16368
|
+
pagination: {
|
|
16369
|
+
cursor: string | null;
|
|
16370
|
+
has_more: boolean;
|
|
16371
|
+
total: number;
|
|
16372
|
+
};
|
|
16373
|
+
};
|
|
16374
|
+
};
|
|
16375
|
+
};
|
|
16376
|
+
};
|
|
16377
|
+
};
|
|
16378
|
+
createAppointment: {
|
|
16379
|
+
parameters: {
|
|
16380
|
+
query?: never;
|
|
16381
|
+
header?: never;
|
|
16382
|
+
path?: never;
|
|
16383
|
+
cookie?: never;
|
|
16384
|
+
};
|
|
16385
|
+
requestBody?: {
|
|
16386
|
+
content: {
|
|
16387
|
+
"application/json": {
|
|
16388
|
+
/** @example loc_abc123def456ghi789 */
|
|
16389
|
+
location_id: string;
|
|
16390
|
+
/** @example Sophie Turner */
|
|
16391
|
+
customer_name: string;
|
|
16392
|
+
/**
|
|
16393
|
+
* Format: email
|
|
16394
|
+
* @example sophie@example.com
|
|
16395
|
+
*/
|
|
16396
|
+
customer_email: string;
|
|
16397
|
+
/** @example +447123456789 */
|
|
16398
|
+
customer_phone?: string;
|
|
16399
|
+
/** @example 2026-11-20 */
|
|
16400
|
+
scheduled_date: string;
|
|
16401
|
+
/** @example 10:00 */
|
|
16402
|
+
start_time: string;
|
|
16403
|
+
/** @example First piercing appointment */
|
|
16404
|
+
notes?: string;
|
|
16405
|
+
/** @default {} */
|
|
16406
|
+
metadata?: {
|
|
16407
|
+
[key: string]: string | number;
|
|
16408
|
+
};
|
|
16409
|
+
};
|
|
16410
|
+
};
|
|
16411
|
+
};
|
|
16412
|
+
responses: {
|
|
16413
|
+
/** @description Appointment created with Stripe client_secret */
|
|
16414
|
+
201: {
|
|
16415
|
+
headers: {
|
|
16416
|
+
[name: string]: unknown;
|
|
16417
|
+
};
|
|
16418
|
+
content: {
|
|
16419
|
+
"application/json": {
|
|
16420
|
+
data: components["schemas"]["Appointment"];
|
|
16421
|
+
client_secret: string;
|
|
16422
|
+
};
|
|
16423
|
+
};
|
|
16424
|
+
};
|
|
16425
|
+
};
|
|
16426
|
+
};
|
|
16427
|
+
confirmAppointment: {
|
|
16428
|
+
parameters: {
|
|
16429
|
+
query?: never;
|
|
16430
|
+
header?: never;
|
|
16431
|
+
path: {
|
|
16432
|
+
id: string;
|
|
16433
|
+
};
|
|
16434
|
+
cookie?: never;
|
|
16435
|
+
};
|
|
16436
|
+
requestBody?: never;
|
|
16437
|
+
responses: {
|
|
16438
|
+
/** @description Appointment confirmed */
|
|
16439
|
+
200: {
|
|
16440
|
+
headers: {
|
|
16441
|
+
[name: string]: unknown;
|
|
16442
|
+
};
|
|
16443
|
+
content: {
|
|
16444
|
+
"application/json": {
|
|
16445
|
+
data: components["schemas"]["Appointment"];
|
|
16446
|
+
};
|
|
16447
|
+
};
|
|
16448
|
+
};
|
|
16449
|
+
};
|
|
16450
|
+
};
|
|
16451
|
+
getAppointment: {
|
|
16452
|
+
parameters: {
|
|
16453
|
+
query?: never;
|
|
16454
|
+
header?: never;
|
|
16455
|
+
path: {
|
|
16456
|
+
id: string;
|
|
16457
|
+
};
|
|
16458
|
+
cookie?: never;
|
|
16459
|
+
};
|
|
16460
|
+
requestBody?: never;
|
|
16461
|
+
responses: {
|
|
16462
|
+
/** @description Appointment details */
|
|
16463
|
+
200: {
|
|
16464
|
+
headers: {
|
|
16465
|
+
[name: string]: unknown;
|
|
16466
|
+
};
|
|
16467
|
+
content: {
|
|
16468
|
+
"application/json": {
|
|
16469
|
+
data: components["schemas"]["Appointment"];
|
|
16470
|
+
};
|
|
16471
|
+
};
|
|
16472
|
+
};
|
|
16473
|
+
};
|
|
16474
|
+
};
|
|
16475
|
+
updateAppointment: {
|
|
16476
|
+
parameters: {
|
|
16477
|
+
query?: never;
|
|
16478
|
+
header?: never;
|
|
16479
|
+
path: {
|
|
16480
|
+
id: string;
|
|
16481
|
+
};
|
|
16482
|
+
cookie?: never;
|
|
16483
|
+
};
|
|
16484
|
+
requestBody?: {
|
|
16485
|
+
content: {
|
|
16486
|
+
"application/json": {
|
|
16487
|
+
/** @enum {string} */
|
|
16488
|
+
status?: "confirmed" | "cancelled" | "completed" | "no_show";
|
|
16489
|
+
notes?: string;
|
|
16490
|
+
metadata?: {
|
|
16491
|
+
[key: string]: string | number;
|
|
16492
|
+
};
|
|
16493
|
+
};
|
|
16494
|
+
};
|
|
16495
|
+
};
|
|
16496
|
+
responses: {
|
|
16497
|
+
/** @description Appointment updated */
|
|
16498
|
+
200: {
|
|
16499
|
+
headers: {
|
|
16500
|
+
[name: string]: unknown;
|
|
16501
|
+
};
|
|
16502
|
+
content: {
|
|
16503
|
+
"application/json": {
|
|
16504
|
+
data: components["schemas"]["Appointment"];
|
|
16505
|
+
};
|
|
16506
|
+
};
|
|
16507
|
+
};
|
|
16508
|
+
};
|
|
16509
|
+
};
|
|
16510
|
+
listAvailabilityOverrides: {
|
|
16511
|
+
parameters: {
|
|
16512
|
+
query: {
|
|
16513
|
+
limit?: number;
|
|
16514
|
+
cursor?: string;
|
|
16515
|
+
fields?: string;
|
|
16516
|
+
location_id: string;
|
|
16517
|
+
date_from?: string;
|
|
16518
|
+
date_to?: string;
|
|
16519
|
+
};
|
|
16520
|
+
header?: never;
|
|
16521
|
+
path?: never;
|
|
16522
|
+
cookie?: never;
|
|
16523
|
+
};
|
|
16524
|
+
requestBody?: never;
|
|
16525
|
+
responses: {
|
|
16526
|
+
/** @description Override list */
|
|
16527
|
+
200: {
|
|
16528
|
+
headers: {
|
|
16529
|
+
[name: string]: unknown;
|
|
16530
|
+
};
|
|
16531
|
+
content: {
|
|
16532
|
+
"application/json": {
|
|
16533
|
+
data: components["schemas"]["AvailabilityOverride"][];
|
|
16534
|
+
pagination: {
|
|
16535
|
+
cursor: string | null;
|
|
16536
|
+
has_more: boolean;
|
|
16537
|
+
total: number;
|
|
16538
|
+
};
|
|
16539
|
+
};
|
|
16540
|
+
};
|
|
16541
|
+
};
|
|
16542
|
+
};
|
|
16543
|
+
};
|
|
16544
|
+
createAvailabilityOverride: {
|
|
16545
|
+
parameters: {
|
|
16546
|
+
query?: never;
|
|
16547
|
+
header?: never;
|
|
16548
|
+
path?: never;
|
|
16549
|
+
cookie?: never;
|
|
16550
|
+
};
|
|
16551
|
+
requestBody?: {
|
|
16552
|
+
content: {
|
|
16553
|
+
"application/json": {
|
|
16554
|
+
/** @example loc_abc123def456ghi789 */
|
|
16555
|
+
location_id: string;
|
|
16556
|
+
/** @example 2026-12-25 */
|
|
16557
|
+
date: string;
|
|
16558
|
+
/**
|
|
16559
|
+
* @default false
|
|
16560
|
+
* @example true
|
|
16561
|
+
*/
|
|
16562
|
+
is_closed?: boolean;
|
|
16563
|
+
/** @example 10:00 */
|
|
16564
|
+
open_time?: string;
|
|
16565
|
+
/** @example 14:00 */
|
|
16566
|
+
close_time?: string;
|
|
16567
|
+
/** @example Christmas Day */
|
|
16568
|
+
reason?: string;
|
|
16569
|
+
};
|
|
16570
|
+
};
|
|
16571
|
+
};
|
|
16572
|
+
responses: {
|
|
16573
|
+
/** @description Override created */
|
|
16574
|
+
201: {
|
|
16575
|
+
headers: {
|
|
16576
|
+
[name: string]: unknown;
|
|
16577
|
+
};
|
|
16578
|
+
content: {
|
|
16579
|
+
"application/json": {
|
|
16580
|
+
data: components["schemas"]["AvailabilityOverride"];
|
|
16581
|
+
};
|
|
16582
|
+
};
|
|
16583
|
+
};
|
|
16584
|
+
};
|
|
16585
|
+
};
|
|
16586
|
+
deleteAvailabilityOverride: {
|
|
16587
|
+
parameters: {
|
|
16588
|
+
query?: never;
|
|
16589
|
+
header?: never;
|
|
16590
|
+
path: {
|
|
16591
|
+
id: string;
|
|
16592
|
+
};
|
|
16593
|
+
cookie?: never;
|
|
16594
|
+
};
|
|
16595
|
+
requestBody?: never;
|
|
16596
|
+
responses: {
|
|
16597
|
+
/** @description Override deleted */
|
|
16598
|
+
204: {
|
|
16599
|
+
headers: {
|
|
16600
|
+
[name: string]: unknown;
|
|
16601
|
+
};
|
|
16602
|
+
content?: never;
|
|
16603
|
+
};
|
|
16604
|
+
};
|
|
16605
|
+
};
|
|
16130
16606
|
listPosts: {
|
|
16131
16607
|
parameters: {
|
|
16132
16608
|
query?: {
|
|
@@ -17080,7 +17556,7 @@ interface operations {
|
|
|
17080
17556
|
sort?: "created_at" | "updated_at" | "title" | "relevance";
|
|
17081
17557
|
order?: "asc" | "desc";
|
|
17082
17558
|
/** @description Filter by notification type */
|
|
17083
|
-
type?: "email_verification" | "welcome" | "password_reset" | "password_changed" | "order_confirmation" | "order_cancelled" | "refund_issued" | "draft_order_payment_request" | "shipping_confirmation" | "delivery_confirmation" | "cart_recovery" | "new_order" | "low_stock" | "domain_warning" | "domain_revoked" | "domain_recovered";
|
|
17559
|
+
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";
|
|
17084
17560
|
/** @description Filter by delivery status */
|
|
17085
17561
|
status?: "sent" | "failed" | "skipped";
|
|
17086
17562
|
/** @description Filter by recipient email */
|
|
@@ -17153,7 +17629,7 @@ interface operations {
|
|
|
17153
17629
|
* @example new_order
|
|
17154
17630
|
* @enum {string}
|
|
17155
17631
|
*/
|
|
17156
|
-
type: "email_verification" | "welcome" | "password_reset" | "password_changed" | "order_confirmation" | "order_cancelled" | "refund_issued" | "draft_order_payment_request" | "shipping_confirmation" | "delivery_confirmation" | "cart_recovery" | "new_order" | "low_stock" | "domain_warning" | "domain_revoked" | "domain_recovered";
|
|
17632
|
+
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";
|
|
17157
17633
|
/**
|
|
17158
17634
|
* Format: email
|
|
17159
17635
|
* @description Email address to send the test to
|
|
@@ -18436,6 +18912,11 @@ type Post$1 = components['schemas']['Post'];
|
|
|
18436
18912
|
type ContentCategory$1 = components['schemas']['ContentCategory'];
|
|
18437
18913
|
type MembershipPlan$1 = components['schemas']['MembershipPlan'];
|
|
18438
18914
|
type CustomerMembership$1 = components['schemas']['CustomerMembership'];
|
|
18915
|
+
type Appointment$1 = components['schemas']['Appointment'];
|
|
18916
|
+
type AvailabilityOverride$1 = components['schemas']['AvailabilityOverride'];
|
|
18917
|
+
type Slot = components['schemas']['Slot'];
|
|
18918
|
+
type DayAvailability$1 = components['schemas']['DayAvailability'];
|
|
18919
|
+
type SuggestedSlot$1 = components['schemas']['SuggestedSlot'];
|
|
18439
18920
|
interface Pagination {
|
|
18440
18921
|
cursor: string | null;
|
|
18441
18922
|
has_more: boolean;
|
|
@@ -19521,6 +20002,51 @@ declare class MembershipPlansResource {
|
|
|
19521
20002
|
listSubscriptions(params?: SubscriptionListParams): Promise<ListResponse<CustomerMembership>>;
|
|
19522
20003
|
}
|
|
19523
20004
|
|
|
20005
|
+
type Appointment = components['schemas']['Appointment'];
|
|
20006
|
+
type AvailabilityOverride = components['schemas']['AvailabilityOverride'];
|
|
20007
|
+
type DayAvailability = components['schemas']['DayAvailability'];
|
|
20008
|
+
type SuggestedSlot = components['schemas']['SuggestedSlot'];
|
|
20009
|
+
type ListAppointmentsParams = NonNullable<operations['listAppointments']['parameters']['query']>;
|
|
20010
|
+
type CreateAppointmentBody = NonNullable<operations['createAppointment']['requestBody']>['content']['application/json'];
|
|
20011
|
+
type UpdateAppointmentBody = NonNullable<operations['updateAppointment']['requestBody']>['content']['application/json'];
|
|
20012
|
+
type AvailabilityParams = NonNullable<operations['getBookingAvailability']['parameters']['query']>;
|
|
20013
|
+
type CreateOverrideBody = NonNullable<operations['createAvailabilityOverride']['requestBody']>['content']['application/json'];
|
|
20014
|
+
type ListOverridesParams = NonNullable<operations['listAvailabilityOverrides']['parameters']['query']>;
|
|
20015
|
+
declare class BookingsResource {
|
|
20016
|
+
private client;
|
|
20017
|
+
constructor(client: Hydra);
|
|
20018
|
+
listLocations(): Promise<DataResponse<{
|
|
20019
|
+
id: string;
|
|
20020
|
+
name: string;
|
|
20021
|
+
address_line1: string | null;
|
|
20022
|
+
city: string | null;
|
|
20023
|
+
postal_code: string | null;
|
|
20024
|
+
phone: string | null;
|
|
20025
|
+
slot_duration_minutes: number;
|
|
20026
|
+
opening_hours: Record<string, {
|
|
20027
|
+
open: string;
|
|
20028
|
+
close: string;
|
|
20029
|
+
} | null>;
|
|
20030
|
+
}[]>>;
|
|
20031
|
+
getAvailability(params: AvailabilityParams): Promise<{
|
|
20032
|
+
data: DayAvailability[] | SuggestedSlot[];
|
|
20033
|
+
}>;
|
|
20034
|
+
createAppointment(body: CreateAppointmentBody, options?: ResourceRequestOptions): Promise<DataResponse<Appointment> & {
|
|
20035
|
+
client_secret: string;
|
|
20036
|
+
}>;
|
|
20037
|
+
confirmAppointment(id: string): Promise<DataResponse<Appointment>>;
|
|
20038
|
+
listAppointments(params?: ListAppointmentsParams): Promise<ListResponse<Appointment>>;
|
|
20039
|
+
iterateAppointments(params?: Omit<ListAppointmentsParams, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Appointment, void, undefined>;
|
|
20040
|
+
toArrayAppointments(params?: Omit<ListAppointmentsParams, 'cursor'>, options?: PaginateOptions & {
|
|
20041
|
+
limit?: number;
|
|
20042
|
+
}): Promise<Appointment[]>;
|
|
20043
|
+
getAppointment(id: string): Promise<DataResponse<Appointment>>;
|
|
20044
|
+
updateAppointment(id: string, body: UpdateAppointmentBody): Promise<DataResponse<Appointment>>;
|
|
20045
|
+
createOverride(body: CreateOverrideBody, options?: ResourceRequestOptions): Promise<DataResponse<AvailabilityOverride>>;
|
|
20046
|
+
listOverrides(params: ListOverridesParams): Promise<ListResponse<AvailabilityOverride>>;
|
|
20047
|
+
deleteOverride(id: string): Promise<void>;
|
|
20048
|
+
}
|
|
20049
|
+
|
|
19524
20050
|
interface AppInfo {
|
|
19525
20051
|
/** Integration/plugin name (e.g. "MyShopTheme") */
|
|
19526
20052
|
name: string;
|
|
@@ -19602,6 +20128,7 @@ declare class Hydra {
|
|
|
19602
20128
|
readonly posts: PostsResource;
|
|
19603
20129
|
readonly contentCategories: ContentCategoriesResource;
|
|
19604
20130
|
readonly membershipPlans: MembershipPlansResource;
|
|
20131
|
+
readonly bookings: BookingsResource;
|
|
19605
20132
|
constructor(config: HydraConfig);
|
|
19606
20133
|
request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
|
|
19607
20134
|
/** Multipart upload for file-based endpoints (e.g. images) */
|
|
@@ -19683,4 +20210,4 @@ declare class HydraIdempotencyError extends HydraError {
|
|
|
19683
20210
|
constructor(body: HydraErrorBody, headers: Headers);
|
|
19684
20211
|
}
|
|
19685
20212
|
|
|
19686
|
-
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 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 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 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, 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 ListResponse, type Location$1 as Location, LocationsResource, 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 Store$1 as Store, StoreCreditResource, StoreResource, type Tag$1 as Tag, TagsResource, type TaxExemption$1 as TaxExemption, type TaxGroup$1 as TaxGroup, type TaxRate$1 as TaxRate, TaxResource, type Variant$2 as Variant, type VariantPrice$1 as VariantPrice, VariantsResource, type Webhook$1 as Webhook, WebhooksResource, paginate, toArray };
|
|
20213
|
+
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 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, 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 ListResponse, type Location$1 as Location, LocationsResource, 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 Variant$2 as Variant, type VariantPrice$1 as VariantPrice, VariantsResource, type Webhook$1 as Webhook, WebhooksResource, paginate, toArray };
|
package/dist/index.js
CHANGED
|
@@ -1646,6 +1646,65 @@ var MembershipPlansResource = class {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
};
|
|
1648
1648
|
|
|
1649
|
+
// src/resources/bookings.ts
|
|
1650
|
+
var BookingsResource = class {
|
|
1651
|
+
constructor(client) {
|
|
1652
|
+
this.client = client;
|
|
1653
|
+
}
|
|
1654
|
+
client;
|
|
1655
|
+
// ── Bookable locations ──
|
|
1656
|
+
async listLocations() {
|
|
1657
|
+
return this.client.request("GET", "/v1/bookings/locations");
|
|
1658
|
+
}
|
|
1659
|
+
// ── Availability ──
|
|
1660
|
+
async getAvailability(params) {
|
|
1661
|
+
return this.client.request("GET", "/v1/bookings/availability", { params });
|
|
1662
|
+
}
|
|
1663
|
+
// ── Appointments ──
|
|
1664
|
+
async createAppointment(body, options) {
|
|
1665
|
+
return this.client.request("POST", "/v1/bookings/appointments", {
|
|
1666
|
+
body,
|
|
1667
|
+
...options
|
|
1668
|
+
});
|
|
1669
|
+
}
|
|
1670
|
+
async confirmAppointment(id) {
|
|
1671
|
+
return this.client.request("POST", `/v1/bookings/appointments/${id}/confirm`);
|
|
1672
|
+
}
|
|
1673
|
+
async listAppointments(params) {
|
|
1674
|
+
return this.client.request("GET", "/v1/bookings/appointments", { params });
|
|
1675
|
+
}
|
|
1676
|
+
iterateAppointments(params, options) {
|
|
1677
|
+
return paginate(
|
|
1678
|
+
(cursor) => this.listAppointments({ ...params, cursor }),
|
|
1679
|
+
options
|
|
1680
|
+
);
|
|
1681
|
+
}
|
|
1682
|
+
async toArrayAppointments(params, options) {
|
|
1683
|
+
return toArray(this.iterateAppointments(params, options), options);
|
|
1684
|
+
}
|
|
1685
|
+
async getAppointment(id) {
|
|
1686
|
+
return this.client.request("GET", `/v1/bookings/appointments/${id}`);
|
|
1687
|
+
}
|
|
1688
|
+
async updateAppointment(id, body) {
|
|
1689
|
+
return this.client.request("PATCH", `/v1/bookings/appointments/${id}`, {
|
|
1690
|
+
body
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
// ── Availability overrides ──
|
|
1694
|
+
async createOverride(body, options) {
|
|
1695
|
+
return this.client.request("POST", "/v1/bookings/overrides", {
|
|
1696
|
+
body,
|
|
1697
|
+
...options
|
|
1698
|
+
});
|
|
1699
|
+
}
|
|
1700
|
+
async listOverrides(params) {
|
|
1701
|
+
return this.client.request("GET", "/v1/bookings/overrides", { params });
|
|
1702
|
+
}
|
|
1703
|
+
async deleteOverride(id) {
|
|
1704
|
+
return this.client.request("DELETE", `/v1/bookings/overrides/${id}`);
|
|
1705
|
+
}
|
|
1706
|
+
};
|
|
1707
|
+
|
|
1649
1708
|
// src/client.ts
|
|
1650
1709
|
var SDK_VERSION = "0.1.0";
|
|
1651
1710
|
var INITIAL_RETRY_DELAY = 0.5;
|
|
@@ -1726,6 +1785,8 @@ var Hydra = class {
|
|
|
1726
1785
|
contentCategories = new ContentCategoriesResource(this);
|
|
1727
1786
|
// P8: Subscriptions
|
|
1728
1787
|
membershipPlans = new MembershipPlansResource(this);
|
|
1788
|
+
// P9: Bookings
|
|
1789
|
+
bookings = new BookingsResource(this);
|
|
1729
1790
|
constructor(config) {
|
|
1730
1791
|
for (const key of Object.keys(config)) {
|
|
1731
1792
|
if (!VALID_CONFIG_KEYS.has(key)) {
|
|
@@ -1934,6 +1995,7 @@ var Hydra = class {
|
|
|
1934
1995
|
export {
|
|
1935
1996
|
AddressesResource,
|
|
1936
1997
|
AnalyticsResource,
|
|
1998
|
+
BookingsResource,
|
|
1937
1999
|
CartResource,
|
|
1938
2000
|
ChannelsResource,
|
|
1939
2001
|
CheckoutResource,
|