@gethydra/sdk 0.1.51 → 0.1.52

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,6 +21989,13 @@ 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>>;
21994
22001
  createOverride(body: CreateOverrideBody, options?: ResourceRequestOptions): Promise<DataResponse<AvailabilityOverride>>;
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.1.51",
3
+ "version": "0.1.52",
4
4
  "description": "Official TypeScript SDK for the Hydra Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",