@gethydra/sdk 0.1.51 → 0.1.53

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
@@ -21989,8 +21989,20 @@ declare class BookingsResource {
21989
21989
  date_from?: string;
21990
21990
  date_to?: string;
21991
21991
  }): Promise<DataResponse<Appointment[]>>;
21992
+ /** Cancel the customer's own appointment. Must be 24h+ before scheduled time. Requires customer JWT. */
21993
+ cancelMyAppointment(id: string): Promise<DataResponse<Appointment>>;
21994
+ /** Reschedule the customer's own appointment. Must be 4h+ before current time. Requires customer JWT. */
21995
+ rescheduleMyAppointment(id: string, body: {
21996
+ scheduled_date: string;
21997
+ start_time: string;
21998
+ }): Promise<DataResponse<Appointment>>;
21992
21999
  getAppointment(id: string): Promise<DataResponse<Appointment>>;
21993
22000
  updateAppointment(id: string, body: UpdateAppointmentBody): Promise<DataResponse<Appointment>>;
22001
+ /** Reschedule an appointment to a new date/time. Requires a secret key. */
22002
+ rescheduleAppointment(id: string, body: {
22003
+ scheduled_date: string;
22004
+ start_time: string;
22005
+ }): Promise<DataResponse<Appointment>>;
21994
22006
  createOverride(body: CreateOverrideBody, options?: ResourceRequestOptions): Promise<DataResponse<AvailabilityOverride>>;
21995
22007
  listOverrides(params: ListOverridesParams): Promise<ListResponse<AvailabilityOverride>>;
21996
22008
  deleteOverride(id: string): Promise<void>;
package/dist/index.js CHANGED
@@ -1692,6 +1692,14 @@ var BookingsResource = class {
1692
1692
  async myAppointments(params) {
1693
1693
  return this.client.request("GET", "/v1/bookings/my-appointments", { params });
1694
1694
  }
1695
+ /** Cancel the customer's own appointment. Must be 24h+ before scheduled time. Requires customer JWT. */
1696
+ async cancelMyAppointment(id) {
1697
+ return this.client.request("POST", `/v1/bookings/my-appointments/${id}/cancel`);
1698
+ }
1699
+ /** Reschedule the customer's own appointment. Must be 4h+ before current time. Requires customer JWT. */
1700
+ async rescheduleMyAppointment(id, body) {
1701
+ return this.client.request("POST", `/v1/bookings/my-appointments/${id}/reschedule`, { body });
1702
+ }
1695
1703
  async getAppointment(id) {
1696
1704
  return this.client.request("GET", `/v1/bookings/appointments/${id}`);
1697
1705
  }
@@ -1700,6 +1708,10 @@ var BookingsResource = class {
1700
1708
  body
1701
1709
  });
1702
1710
  }
1711
+ /** Reschedule an appointment to a new date/time. Requires a secret key. */
1712
+ async rescheduleAppointment(id, body) {
1713
+ return this.client.request("POST", `/v1/bookings/appointments/${id}/reschedule`, { body });
1714
+ }
1703
1715
  // ── Availability overrides ──
1704
1716
  async createOverride(body, options) {
1705
1717
  return this.client.request("POST", "/v1/bookings/overrides", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
4
4
  "description": "Official TypeScript SDK for the Hydra Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",