Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wix/bookings_availability-calendar

Package Overview
Dependencies
Maintainers
0
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wix/bookings_availability-calendar - npm Package Compare versions

Comparing version 1.0.30 to 1.0.31

4

build/cjs/src/bookings-availability-v1-slot-availability-availability-calendar.context.d.ts
import { queryAvailability as publicQueryAvailability } from './bookings-availability-v1-slot-availability-availability-calendar.public';
import { BuildRESTFunction } from '@wix/sdk-types';
export declare const queryAvailability: BuildRESTFunction<typeof publicQueryAvailability>;
import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
export declare const queryAvailability: ReturnType<typeof createRESTModule<typeof publicQueryAvailability>>;

@@ -5,4 +5,4 @@ "use strict";

const bookings_availability_v1_slot_availability_availability_calendar_public_1 = require("./bookings-availability-v1-slot-availability-availability-calendar.public");
const context_1 = require("@wix/sdk-runtime/context");
exports.queryAvailability = (0, context_1.contextualizeRESTModule)(bookings_availability_v1_slot_availability_availability_calendar_public_1.queryAvailability, 1);
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
exports.queryAvailability = (0, rest_modules_1.createRESTModule)(bookings_availability_v1_slot_availability_availability_calendar_public_1.queryAvailability);
//# sourceMappingURL=bookings-availability-v1-slot-availability-availability-calendar.context.js.map
import { queryAvailability as publicQueryAvailability } from './bookings-availability-v1-slot-availability-availability-calendar.public';
import { BuildRESTFunction } from '@wix/sdk-types';
export declare const queryAvailability: BuildRESTFunction<typeof publicQueryAvailability>;
import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
export declare const queryAvailability: ReturnType<typeof createRESTModule<typeof publicQueryAvailability>>;
import { queryAvailability as publicQueryAvailability } from './bookings-availability-v1-slot-availability-availability-calendar.public';
import { contextualizeRESTModule } from '@wix/sdk-runtime/context';
export const queryAvailability = contextualizeRESTModule(publicQueryAvailability, 1);
import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
export const queryAvailability = createRESTModule(publicQueryAvailability);
//# sourceMappingURL=bookings-availability-v1-slot-availability-availability-calendar.context.js.map
{
"name": "@wix/bookings_availability-calendar",
"version": "1.0.30",
"version": "1.0.31",
"publishConfig": {

@@ -23,4 +23,4 @@ "registry": "https://registry.npmjs.org/",

"@wix/motion-edm-autogen-query-wrapper": "^1.0.37",
"@wix/sdk-runtime": "^0.3.3",
"@wix/sdk-types": "^1.9.1"
"@wix/sdk-runtime": "^0.3.11",
"@wix/sdk-types": "^1.9.2"
},

@@ -48,3 +48,3 @@ "devDependencies": {

},
"falconPackageHash": "0e892bb9deef349aad35b5145c0f836ef65abb3d63f61fcd5b717b3a"
"falconPackageHash": "83f4e2df13838f45eae494f954fa0c754d4837941c597eec6e60d73c"
}

@@ -1,187 +0,6 @@

interface SlotAvailability {
/**
* The slot for the corresponding session, when the session is either a single session
* or a specific session generated from a recurring session.
*/
slot?: Slot;
/**
* Whether the slot is bookable. Bookability is determined by checking a
* session's open slots and booking policies. Locks are not taken into
* account.
*/
bookable?: boolean;
/**
* Total number of spots for this slot.
* For example, if a session has a total of 10 spots and 3 spots are booked,
* `spotsTotal` is 10 and `openSpots` is 7.
*/
totalSpots?: number | null;
/** Number of open spots for this slot. */
openSpots?: number | null;
/** An object describing the slot's waitlist and its occupancy. */
waitingList?: AvailabilityWaitingList;
/** Booking policy violations for the slot. */
bookingPolicyViolations?: BookingPolicyViolations;
/**
* Indicates whether the slot is locked because a waitlist exists.
* When a slot frees up, the slot is offered to the next customer on the waitlist. Read-only.
*/
locked?: boolean | null;
isFromV2?: boolean;
}
interface Slot {
/**
* ID for the slot's corresponding session, when the session is either a single session
* or a specific session generated from a recurring session.
*/
sessionId?: string | null;
/** Service ID. */
serviceId?: string;
/** Schedule ID. */
scheduleId?: string;
/**
* The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
* format.
*
* If `timezone` is specified,
* dates are based on the local date/time. This means that the timezone offset
* in the `start_date` is ignored.
*/
startDate?: string | null;
/**
* The end time of this slot in
* [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
*
* If `timezone` is specified,
* dates are based on the local date/time. This means that the timezone offset
* in the `end_date` is ignored.
*/
endDate?: string | null;
/**
* The timezone for which slot availability is to be calculated. If specified,
* dates are based on the local date/time, meaning that the timezone offset
* in the date's format is ignored.
*/
timezone?: string | null;
/**
* The resource required for this slot. Currently, the only supported resource
* is the relevant staff member for the slot.
*/
resource?: SlotResource;
/** Geographic location of the slot. */
location?: Location;
}
interface SlotResource {
/**
* Resource ID.
* @readonly
*/
_id?: string | null;
/** Resource name. Read only. */
name?: string | null;
}
interface Location {
/**
* Business location ID. Available only for locations that are business locations,
* meaning the `location_type` is `"OWNER_BUSINESS"`.
*/
_id?: string | null;
/** Location name. */
name?: string | null;
/** The full address of this location. */
formattedAddress?: string | null;
/**
* Location type.
*
* - `"OWNER_BUSINESS"`: The business address, as set in the site’s general settings.
* - `"OWNER_CUSTOM"`: The address as set when creating the service.
* - `"CUSTOM"`: The address as set for the individual session.
*/
locationType?: LocationType;
}
declare enum LocationType {
UNDEFINED = "UNDEFINED",
OWNER_BUSINESS = "OWNER_BUSINESS",
OWNER_CUSTOM = "OWNER_CUSTOM",
CUSTOM = "CUSTOM"
}
interface AvailabilityWaitingList {
/**
* Total number of spots and open spots for this waitlist.
* For example, a Yoga class with 10 waitlist spots and 3 registered
* on the waitlist has 10 `total_spots` and 7 `open_spots`.
*/
totalSpots?: number | null;
/** Number of open spots for this waitlist. */
openSpots?: number | null;
}
interface BookingPolicyViolations {
/** Bookings policy violation. Too early to book this slot. */
tooEarlyToBook?: boolean | null;
/** Bookings policy violation. Too late to book this slot. */
tooLateToBook?: boolean | null;
/** Bookings policy violation. Online booking is disabled for this slot. */
bookOnlineDisabled?: boolean | null;
}
interface QueryV2 extends QueryV2PagingMethodOneOf {
/**
* Filter object. You must include `serviceId`, `startDate` and `endDate` in the filter. This avoids large results that can impact performance.
*/
filter?: Record<string, any> | null;
/** Currently, only sorting by `startDate` is supported. */
sort?: Sorting[];
}
/** @oneof */
interface QueryV2PagingMethodOneOf {
}
interface Sorting {
/** Name of the field to sort by. */
fieldName?: string;
/** Sort order. */
order?: SortOrder;
}
declare enum SortOrder {
ASC = "ASC",
DESC = "DESC"
}
interface QueryAvailabilityResponse {
/** List of slots that potentially can be booked. */
availabilityEntries?: SlotAvailability[];
}
interface QueryAvailabilityResponseNonNullableFields {
availabilityEntries: {
slot?: {
serviceId: string;
scheduleId: string;
location?: {
locationType: LocationType;
};
};
bookable: boolean;
isFromV2: boolean;
}[];
}
interface QueryAvailabilityOptions {
/**
* The timezone for which slot availability is to be calculated. If specified,
* dates are based on the local date/time, meaning that the timezone offset
* in the date's format is ignored.
*/
timezone?: string | null;
/**
* Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,
* at most 3 available slots are returned for each day in the date range specified in the query's
* `filter`.
*
* When a day has both bookable and non-bookable slots, bookable slots are returned first.
* Non-bookable slots are returned according to the specified filters, after all
* bookable slots are already included.
*/
slotsPerDay?: number | null;
}
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
interface HttpClient {
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
fetchWithAuth: typeof fetch;
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
}

@@ -216,6 +35,6 @@ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;

declare function queryAvailability$1(httpClient: HttpClient): (query: QueryV2, options?: QueryAvailabilityOptions) => Promise<QueryAvailabilityResponse & QueryAvailabilityResponseNonNullableFields>;
declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
declare const queryAvailability: BuildRESTFunction<typeof queryAvailability$1>;
declare const queryAvailability: ReturnType<typeof createRESTModule<typeof publicQueryAvailability>>;
export { queryAvailability };

@@ -573,3 +573,4 @@ interface SlotAvailability {

request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
fetchWithAuth: typeof fetch;
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
}

@@ -576,0 +577,0 @@ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc