import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient"; import * as core from "../../../../core"; import type * as Square from "../../../index"; import { CustomAttributeDefinitionsClient } from "../resources/customAttributeDefinitions/client/Client"; import { CustomAttributesClient } from "../resources/customAttributes/client/Client"; import { LocationProfilesClient } from "../resources/locationProfiles/client/Client"; import { TeamMemberProfilesClient } from "../resources/teamMemberProfiles/client/Client"; export declare namespace BookingsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class BookingsClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _customAttributeDefinitions: CustomAttributeDefinitionsClient | undefined; protected _customAttributes: CustomAttributesClient | undefined; protected _locationProfiles: LocationProfilesClient | undefined; protected _teamMemberProfiles: TeamMemberProfilesClient | undefined; constructor(options?: BookingsClient.Options); get customAttributeDefinitions(): CustomAttributeDefinitionsClient; get customAttributes(): CustomAttributesClient; get locationProfiles(): LocationProfilesClient; get teamMemberProfiles(): TeamMemberProfilesClient; /** * Retrieve a collection of bookings. * * To call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope. * To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. * * @param {Square.ListBookingsRequest} request * @param {BookingsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.bookings.list({ * limit: 1, * cursor: "cursor", * customerId: "customer_id", * teamMemberId: "team_member_id", * locationId: "location_id", * startAtMin: "start_at_min", * startAtMax: "start_at_max" * }) */ list(request?: Square.ListBookingsRequest, requestOptions?: BookingsClient.RequestOptions): Promise>; /** * Creates a booking. * * The required input must include the following: * - `Booking.location_id` * - `Booking.start_at` * - `Booking.AppointmentSegment.team_member_id` * - `Booking.AppointmentSegment.service_variation_id` * - `Booking.AppointmentSegment.service_variation_version` * * To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. * To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. * * For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus* * or *Appointments Premium*. * * @param {Square.CreateBookingRequest} request * @param {BookingsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.bookings.create({ * booking: {} * }) */ create(request: Square.CreateBookingRequest, requestOptions?: BookingsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Searches for availabilities for booking. * * To call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope. * To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. * * @param {Square.SearchAvailabilityRequest} request * @param {BookingsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.bookings.searchAvailability({ * query: { * filter: { * startAtRange: {} * } * } * }) */ searchAvailability(request: Square.SearchAvailabilityRequest, requestOptions?: BookingsClient.RequestOptions): core.HttpResponsePromise; private __searchAvailability; /** * Bulk-Retrieves a list of bookings by booking IDs. * * To call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope. * To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. * * @param {Square.BulkRetrieveBookingsRequest} request * @param {BookingsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.bookings.bulkRetrieveBookings({ * bookingIds: ["booking_ids"] * }) */ bulkRetrieveBookings(request: Square.BulkRetrieveBookingsRequest, requestOptions?: BookingsClient.RequestOptions): core.HttpResponsePromise; private __bulkRetrieveBookings; /** * Retrieves a seller's booking profile. * * @param {BookingsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.bookings.getBusinessProfile() */ getBusinessProfile(requestOptions?: BookingsClient.RequestOptions): core.HttpResponsePromise; private __getBusinessProfile; /** * Retrieves a seller's location booking profile. * * @param {Square.RetrieveLocationBookingProfileRequest} request * @param {BookingsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.bookings.retrieveLocationBookingProfile({ * locationId: "location_id" * }) */ retrieveLocationBookingProfile(request: Square.RetrieveLocationBookingProfileRequest, requestOptions?: BookingsClient.RequestOptions): core.HttpResponsePromise; private __retrieveLocationBookingProfile; /** * Retrieves one or more team members' booking profiles. * * @param {Square.BulkRetrieveTeamMemberBookingProfilesRequest} request * @param {BookingsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.bookings.bulkRetrieveTeamMemberBookingProfiles({ * teamMemberIds: ["team_member_ids"] * }) */ bulkRetrieveTeamMemberBookingProfiles(request: Square.BulkRetrieveTeamMemberBookingProfilesRequest, requestOptions?: BookingsClient.RequestOptions): core.HttpResponsePromise; private __bulkRetrieveTeamMemberBookingProfiles; /** * Retrieves a booking. * * To call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope. * To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope. * * @param {Square.GetBookingsRequest} request * @param {BookingsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.bookings.get({ * bookingId: "booking_id" * }) */ get(request: Square.GetBookingsRequest, requestOptions?: BookingsClient.RequestOptions): core.HttpResponsePromise; private __get; /** * Updates a booking. * * To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. * To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. * * For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus* * or *Appointments Premium*. * * @param {Square.UpdateBookingRequest} request * @param {BookingsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.bookings.update({ * bookingId: "booking_id", * booking: {} * }) */ update(request: Square.UpdateBookingRequest, requestOptions?: BookingsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Cancels an existing booking. * * To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope. * To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope. * * For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to *Appointments Plus* * or *Appointments Premium*. * * @param {Square.CancelBookingRequest} request * @param {BookingsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.bookings.cancel({ * bookingId: "booking_id" * }) */ cancel(request: Square.CancelBookingRequest, requestOptions?: BookingsClient.RequestOptions): core.HttpResponsePromise; private __cancel; }