@wix/auto_sdk_bookings_availability-time-slots 1.0.248 → 1.0.249
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/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +28 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +155 -1
- package/build/cjs/index.typings.js +28 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +155 -1
- package/build/cjs/meta.js +28 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +26 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +155 -1
- package/build/es/index.typings.mjs +26 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +155 -1
- package/build/es/meta.mjs +26 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.js +28 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +155 -1
- package/build/internal/cjs/index.typings.js +28 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +155 -1
- package/build/internal/cjs/meta.js +28 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.mjs +26 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +155 -1
- package/build/internal/es/index.typings.mjs +26 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +155 -1
- package/build/internal/es/meta.mjs +26 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -935,6 +935,160 @@ interface GetAvailabilityTimeSlotResponse {
|
|
|
935
935
|
*/
|
|
936
936
|
timeZone?: string | null;
|
|
937
937
|
}
|
|
938
|
+
interface DiagnoseAvailabilityRequest {
|
|
939
|
+
/**
|
|
940
|
+
* Service to diagnose; provide this or `resource_id`.
|
|
941
|
+
* @format GUID
|
|
942
|
+
*/
|
|
943
|
+
serviceId?: string | null;
|
|
944
|
+
/**
|
|
945
|
+
* Staff member / resource to diagnose; provide this or `service_id`.
|
|
946
|
+
* @format GUID
|
|
947
|
+
*/
|
|
948
|
+
resourceId?: string | null;
|
|
949
|
+
/**
|
|
950
|
+
* Lower boundary of the diagnosed range, `YYYY-MM-DDThh:mm:ss` (ISO-8601). Optional; defaults to the current time when omitted.
|
|
951
|
+
* @format LOCAL_DATE_TIME
|
|
952
|
+
*/
|
|
953
|
+
fromLocalDate?: string | null;
|
|
954
|
+
/**
|
|
955
|
+
* Upper boundary of the diagnosed range, `YYYY-MM-DDThh:mm:ss` (ISO-8601). Optional; defaults to `fromLocalDate` + 90 days when omitted.
|
|
956
|
+
* @format LOCAL_DATE_TIME
|
|
957
|
+
*/
|
|
958
|
+
toLocalDate?: string | null;
|
|
959
|
+
/**
|
|
960
|
+
* IANA tz database time zone for `fromLocalDate`/`toLocalDate`.
|
|
961
|
+
* @minLength 1
|
|
962
|
+
* @maxLength 150
|
|
963
|
+
*/
|
|
964
|
+
timeZone?: string | null;
|
|
965
|
+
/**
|
|
966
|
+
* Locations to diagnose; all offered locations when empty.
|
|
967
|
+
* @maxSize 100
|
|
968
|
+
*/
|
|
969
|
+
locations?: Location[];
|
|
970
|
+
/**
|
|
971
|
+
* Whether to run a deeper diagnosis. Optional; defaults to `false` — the fast, deterministic
|
|
972
|
+
* configuration/setup checks (resource-availability-window checks are added to this path as they
|
|
973
|
+
* roll out). Set `true` only when the default result is inconclusive (no reasons) and you need to
|
|
974
|
+
* know *why* specific resources have no availability at specific times — it samples resource
|
|
975
|
+
* availability to attribute an empty window to a working-hours gap vs. blocked time, at extra
|
|
976
|
+
* latency. Not supported yet — `true` currently returns `DIAGNOSTIC_DEPTH_NOT_SUPPORTED`.
|
|
977
|
+
*/
|
|
978
|
+
deep?: boolean;
|
|
979
|
+
}
|
|
980
|
+
interface DiagnoseAvailabilityResponse {
|
|
981
|
+
/**
|
|
982
|
+
* Whether the service or resource has bookable availability in the diagnosed range.
|
|
983
|
+
* Note: the current diagnosis detects setup/configuration problems and does not positively confirm
|
|
984
|
+
* availability, so this is not set to `true` yet (reserved for the deeper availability-window check).
|
|
985
|
+
*/
|
|
986
|
+
hasAvailability?: boolean;
|
|
987
|
+
/**
|
|
988
|
+
* Causes of unavailability, most-specific first. When empty, the diagnosis is undetermined: no
|
|
989
|
+
* blocking cause was identified (and availability was not positively confirmed).
|
|
990
|
+
* @maxSize 20
|
|
991
|
+
*/
|
|
992
|
+
reasons?: DiagnosisReason[];
|
|
993
|
+
/** Resolved inputs used for the diagnosis, echoed for debugging. */
|
|
994
|
+
resolvedContext?: ResolvedContext;
|
|
995
|
+
}
|
|
996
|
+
interface DiagnosisReason {
|
|
997
|
+
/** Machine-readable reason code. */
|
|
998
|
+
code?: ReasonCodeWithLiterals;
|
|
999
|
+
/** Suggested owner-facing action key. Wording and localization are the client's responsibility. */
|
|
1000
|
+
suggestedAction?: SuggestedActionWithLiterals;
|
|
1001
|
+
}
|
|
1002
|
+
/** Machine-readable cause for empty availability. */
|
|
1003
|
+
declare enum ReasonCode {
|
|
1004
|
+
/** No staff or resources are assigned to the service. */
|
|
1005
|
+
NO_ASSIGNED_STAFF_OR_RESOURCES = "NO_ASSIGNED_STAFF_OR_RESOURCES",
|
|
1006
|
+
/** The service's availability configuration is missing. */
|
|
1007
|
+
SERVICE_AVAILABILITY_CONFIGURATION_MISSING = "SERVICE_AVAILABILITY_CONFIGURATION_MISSING",
|
|
1008
|
+
/** The requested location(s) are not offered by the service. */
|
|
1009
|
+
REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE = "REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE",
|
|
1010
|
+
/** The service's resource types could not be resolved. */
|
|
1011
|
+
RESOURCE_TYPE_RESOLUTION_FAILED = "RESOURCE_TYPE_RESOLUTION_FAILED",
|
|
1012
|
+
/** No resource-availability windows exist in the diagnosed range. */
|
|
1013
|
+
NO_RESOURCE_AVAILABILITY_WINDOWS = "NO_RESOURCE_AVAILABILITY_WINDOWS",
|
|
1014
|
+
/** The service duration is longer than every available window. */
|
|
1015
|
+
DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS = "DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS",
|
|
1016
|
+
/** Buffer time eliminates all otherwise-available windows. */
|
|
1017
|
+
BUFFER_TIME_ELIMINATES_WINDOWS = "BUFFER_TIME_ELIMINATES_WINDOWS",
|
|
1018
|
+
/** Resources are not within working hours during the diagnosed range. Reported only at `DEEP` depth. */
|
|
1019
|
+
RESOURCE_NOT_IN_WORKING_HOURS = "RESOURCE_NOT_IN_WORKING_HOURS",
|
|
1020
|
+
/** Resources are blocked by events or external calendars during the range. Reported only at `DEEP` depth. */
|
|
1021
|
+
RESOURCE_BLOCKED = "RESOURCE_BLOCKED",
|
|
1022
|
+
/** The staff member / resource has no working-hours schedule configured. */
|
|
1023
|
+
RESOURCE_HAS_NO_WORKING_HOURS = "RESOURCE_HAS_NO_WORKING_HOURS",
|
|
1024
|
+
/** The staff member / resource is not assigned to the service. */
|
|
1025
|
+
RESOURCE_NOT_ASSIGNED_TO_SERVICE = "RESOURCE_NOT_ASSIGNED_TO_SERVICE"
|
|
1026
|
+
}
|
|
1027
|
+
/** @enumType */
|
|
1028
|
+
type ReasonCodeWithLiterals = ReasonCode | 'NO_ASSIGNED_STAFF_OR_RESOURCES' | 'SERVICE_AVAILABILITY_CONFIGURATION_MISSING' | 'REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE' | 'RESOURCE_TYPE_RESOLUTION_FAILED' | 'NO_RESOURCE_AVAILABILITY_WINDOWS' | 'DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS' | 'BUFFER_TIME_ELIMINATES_WINDOWS' | 'RESOURCE_NOT_IN_WORKING_HOURS' | 'RESOURCE_BLOCKED' | 'RESOURCE_HAS_NO_WORKING_HOURS' | 'RESOURCE_NOT_ASSIGNED_TO_SERVICE';
|
|
1029
|
+
/** Owner-facing action key suggested to resolve a diagnosed reason. */
|
|
1030
|
+
declare enum SuggestedAction {
|
|
1031
|
+
/** Assign staff or resources to the service. */
|
|
1032
|
+
ASSIGN_STAFF_OR_RESOURCES = "ASSIGN_STAFF_OR_RESOURCES",
|
|
1033
|
+
/** Review staff working hours. */
|
|
1034
|
+
CHECK_STAFF_WORKING_HOURS = "CHECK_STAFF_WORKING_HOURS",
|
|
1035
|
+
/** Review staff work locations. */
|
|
1036
|
+
CHECK_WORK_LOCATIONS = "CHECK_WORK_LOCATIONS",
|
|
1037
|
+
/** Review the service's offered locations. */
|
|
1038
|
+
CHECK_SERVICE_LOCATIONS = "CHECK_SERVICE_LOCATIONS",
|
|
1039
|
+
/** Reduce the service duration or buffer time. */
|
|
1040
|
+
REDUCE_DURATION_OR_BUFFER = "REDUCE_DURATION_OR_BUFFER",
|
|
1041
|
+
/** Review blocked time and calendar events. */
|
|
1042
|
+
CHECK_BLOCKED_TIME = "CHECK_BLOCKED_TIME",
|
|
1043
|
+
/** Assign the staff member / resource to the service. */
|
|
1044
|
+
ASSIGN_RESOURCE_TO_SERVICE = "ASSIGN_RESOURCE_TO_SERVICE"
|
|
1045
|
+
}
|
|
1046
|
+
/** @enumType */
|
|
1047
|
+
type SuggestedActionWithLiterals = SuggestedAction | 'ASSIGN_STAFF_OR_RESOURCES' | 'CHECK_STAFF_WORKING_HOURS' | 'CHECK_WORK_LOCATIONS' | 'CHECK_SERVICE_LOCATIONS' | 'REDUCE_DURATION_OR_BUFFER' | 'CHECK_BLOCKED_TIME' | 'ASSIGN_RESOURCE_TO_SERVICE';
|
|
1048
|
+
interface ResolvedContext {
|
|
1049
|
+
/**
|
|
1050
|
+
* Service ID that was diagnosed.
|
|
1051
|
+
* @format GUID
|
|
1052
|
+
*/
|
|
1053
|
+
serviceId?: string | null;
|
|
1054
|
+
/**
|
|
1055
|
+
* Staff member / resource ID that was diagnosed.
|
|
1056
|
+
* @format GUID
|
|
1057
|
+
*/
|
|
1058
|
+
resourceId?: string | null;
|
|
1059
|
+
/**
|
|
1060
|
+
* Locations resolved for the diagnosis (the service's offered locations, capped like the
|
|
1061
|
+
* configuration provider's location list).
|
|
1062
|
+
* @maxSize 100
|
|
1063
|
+
*/
|
|
1064
|
+
resolvedLocations?: Location[];
|
|
1065
|
+
/**
|
|
1066
|
+
* Service duration in minutes used for the diagnosis. Set only when `serviceId` is provided
|
|
1067
|
+
* (reflects service configuration); absent on the resource-only path.
|
|
1068
|
+
*/
|
|
1069
|
+
durationInMinutes?: number | null;
|
|
1070
|
+
/**
|
|
1071
|
+
* Buffer time in minutes used for the diagnosis. Set only when `serviceId` is provided
|
|
1072
|
+
* (reflects service configuration); absent on the resource-only path.
|
|
1073
|
+
*/
|
|
1074
|
+
bufferTimeInMinutes?: number | null;
|
|
1075
|
+
/**
|
|
1076
|
+
* Lower boundary of the diagnosed range actually used (the request value, or the default).
|
|
1077
|
+
* @format LOCAL_DATE_TIME
|
|
1078
|
+
*/
|
|
1079
|
+
fromLocalDate?: string | null;
|
|
1080
|
+
/**
|
|
1081
|
+
* Upper boundary of the diagnosed range actually used (the request value, or the default).
|
|
1082
|
+
* @format LOCAL_DATE_TIME
|
|
1083
|
+
*/
|
|
1084
|
+
toLocalDate?: string | null;
|
|
1085
|
+
/**
|
|
1086
|
+
* Time zone used for the diagnosis, in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).
|
|
1087
|
+
* @minLength 1
|
|
1088
|
+
* @maxLength 150
|
|
1089
|
+
*/
|
|
1090
|
+
timeZone?: string | null;
|
|
1091
|
+
}
|
|
938
1092
|
/** @docsIgnore */
|
|
939
1093
|
type ListAvailabilityTimeSlotsApplicationErrors = {
|
|
940
1094
|
code?: 'NO_IMPLEMENTERS_FOUND';
|
|
@@ -1276,4 +1430,4 @@ interface GetAvailabilityTimeSlotOptions {
|
|
|
1276
1430
|
resourceTypes?: ResourceType[];
|
|
1277
1431
|
}
|
|
1278
1432
|
|
|
1279
|
-
export { type AvailableResources, type BookingPolicyViolations, type CursorPaging, type CursorPagingMetadata, type Cursors, type CustomerChoices, type EventInfo, type GetAvailabilityTimeSlotApplicationErrors, type GetAvailabilityTimeSlotOptions, type GetAvailabilityTimeSlotRequest, type GetAvailabilityTimeSlotRequestCustomerChoices, type GetAvailabilityTimeSlotResponse, type GetEventTimeSlotRequest, type GetEventTimeSlotResponse, type GetMultiServiceAvailabilityTimeSlotRequest, type GetMultiServiceAvailabilityTimeSlotResponse, type ListAvailabilityTimeSlotEndOptions, type ListAvailabilityTimeSlotEndOptionsApplicationErrors, type ListAvailabilityTimeSlotEndOptionsRequest, type ListAvailabilityTimeSlotEndOptionsResponse, type ListAvailabilityTimeSlotsApplicationErrors, type ListAvailabilityTimeSlotsOptions, type ListAvailabilityTimeSlotsRequest, type ListAvailabilityTimeSlotsResponse, type ListEventTimeSlotsRequest, type ListEventTimeSlotsResponse, type ListMultiServiceAvailabilityTimeSlotsRequest, type ListMultiServiceAvailabilityTimeSlotsResponse, type Location, LocationType, type LocationTypeWithLiterals, type NestedTimeSlot, type NonBookableReasons, type Resource, type ResourceType, type Service, type TimeSlot, type V2CustomerChoices, type WaitingList, getAvailabilityTimeSlot, listAvailabilityTimeSlots };
|
|
1433
|
+
export { type AvailableResources, type BookingPolicyViolations, type CursorPaging, type CursorPagingMetadata, type Cursors, type CustomerChoices, type DiagnoseAvailabilityRequest, type DiagnoseAvailabilityResponse, type DiagnosisReason, type EventInfo, type GetAvailabilityTimeSlotApplicationErrors, type GetAvailabilityTimeSlotOptions, type GetAvailabilityTimeSlotRequest, type GetAvailabilityTimeSlotRequestCustomerChoices, type GetAvailabilityTimeSlotResponse, type GetEventTimeSlotRequest, type GetEventTimeSlotResponse, type GetMultiServiceAvailabilityTimeSlotRequest, type GetMultiServiceAvailabilityTimeSlotResponse, type ListAvailabilityTimeSlotEndOptions, type ListAvailabilityTimeSlotEndOptionsApplicationErrors, type ListAvailabilityTimeSlotEndOptionsRequest, type ListAvailabilityTimeSlotEndOptionsResponse, type ListAvailabilityTimeSlotsApplicationErrors, type ListAvailabilityTimeSlotsOptions, type ListAvailabilityTimeSlotsRequest, type ListAvailabilityTimeSlotsResponse, type ListEventTimeSlotsRequest, type ListEventTimeSlotsResponse, type ListMultiServiceAvailabilityTimeSlotsRequest, type ListMultiServiceAvailabilityTimeSlotsResponse, type Location, LocationType, type LocationTypeWithLiterals, type NestedTimeSlot, type NonBookableReasons, ReasonCode, type ReasonCodeWithLiterals, type ResolvedContext, type Resource, type ResourceType, type Service, SuggestedAction, type SuggestedActionWithLiterals, type TimeSlot, type V2CustomerChoices, type WaitingList, getAvailabilityTimeSlot, listAvailabilityTimeSlots };
|
|
@@ -21,6 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_typings_exports = {};
|
|
22
22
|
__export(index_typings_exports, {
|
|
23
23
|
LocationType: () => LocationType,
|
|
24
|
+
ReasonCode: () => ReasonCode,
|
|
25
|
+
SuggestedAction: () => SuggestedAction,
|
|
24
26
|
getAvailabilityTimeSlot: () => getAvailabilityTimeSlot2,
|
|
25
27
|
listAvailabilityTimeSlotEndOptions: () => listAvailabilityTimeSlotEndOptions2,
|
|
26
28
|
listAvailabilityTimeSlots: () => listAvailabilityTimeSlots2
|
|
@@ -271,6 +273,30 @@ var LocationType = /* @__PURE__ */ ((LocationType2) => {
|
|
|
271
273
|
LocationType2["CUSTOMER"] = "CUSTOMER";
|
|
272
274
|
return LocationType2;
|
|
273
275
|
})(LocationType || {});
|
|
276
|
+
var ReasonCode = /* @__PURE__ */ ((ReasonCode2) => {
|
|
277
|
+
ReasonCode2["NO_ASSIGNED_STAFF_OR_RESOURCES"] = "NO_ASSIGNED_STAFF_OR_RESOURCES";
|
|
278
|
+
ReasonCode2["SERVICE_AVAILABILITY_CONFIGURATION_MISSING"] = "SERVICE_AVAILABILITY_CONFIGURATION_MISSING";
|
|
279
|
+
ReasonCode2["REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE"] = "REQUESTED_LOCATION_NOT_OFFERED_BY_SERVICE";
|
|
280
|
+
ReasonCode2["RESOURCE_TYPE_RESOLUTION_FAILED"] = "RESOURCE_TYPE_RESOLUTION_FAILED";
|
|
281
|
+
ReasonCode2["NO_RESOURCE_AVAILABILITY_WINDOWS"] = "NO_RESOURCE_AVAILABILITY_WINDOWS";
|
|
282
|
+
ReasonCode2["DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS"] = "DURATION_TOO_LONG_FOR_AVAILABLE_WINDOWS";
|
|
283
|
+
ReasonCode2["BUFFER_TIME_ELIMINATES_WINDOWS"] = "BUFFER_TIME_ELIMINATES_WINDOWS";
|
|
284
|
+
ReasonCode2["RESOURCE_NOT_IN_WORKING_HOURS"] = "RESOURCE_NOT_IN_WORKING_HOURS";
|
|
285
|
+
ReasonCode2["RESOURCE_BLOCKED"] = "RESOURCE_BLOCKED";
|
|
286
|
+
ReasonCode2["RESOURCE_HAS_NO_WORKING_HOURS"] = "RESOURCE_HAS_NO_WORKING_HOURS";
|
|
287
|
+
ReasonCode2["RESOURCE_NOT_ASSIGNED_TO_SERVICE"] = "RESOURCE_NOT_ASSIGNED_TO_SERVICE";
|
|
288
|
+
return ReasonCode2;
|
|
289
|
+
})(ReasonCode || {});
|
|
290
|
+
var SuggestedAction = /* @__PURE__ */ ((SuggestedAction2) => {
|
|
291
|
+
SuggestedAction2["ASSIGN_STAFF_OR_RESOURCES"] = "ASSIGN_STAFF_OR_RESOURCES";
|
|
292
|
+
SuggestedAction2["CHECK_STAFF_WORKING_HOURS"] = "CHECK_STAFF_WORKING_HOURS";
|
|
293
|
+
SuggestedAction2["CHECK_WORK_LOCATIONS"] = "CHECK_WORK_LOCATIONS";
|
|
294
|
+
SuggestedAction2["CHECK_SERVICE_LOCATIONS"] = "CHECK_SERVICE_LOCATIONS";
|
|
295
|
+
SuggestedAction2["REDUCE_DURATION_OR_BUFFER"] = "REDUCE_DURATION_OR_BUFFER";
|
|
296
|
+
SuggestedAction2["CHECK_BLOCKED_TIME"] = "CHECK_BLOCKED_TIME";
|
|
297
|
+
SuggestedAction2["ASSIGN_RESOURCE_TO_SERVICE"] = "ASSIGN_RESOURCE_TO_SERVICE";
|
|
298
|
+
return SuggestedAction2;
|
|
299
|
+
})(SuggestedAction || {});
|
|
274
300
|
async function listAvailabilityTimeSlots2(options) {
|
|
275
301
|
const { httpClient, sideEffects } = arguments[1];
|
|
276
302
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -412,6 +438,8 @@ async function getAvailabilityTimeSlot2(serviceId, localStartDate, localEndDate,
|
|
|
412
438
|
// Annotate the CommonJS export names for ESM import in node:
|
|
413
439
|
0 && (module.exports = {
|
|
414
440
|
LocationType,
|
|
441
|
+
ReasonCode,
|
|
442
|
+
SuggestedAction,
|
|
415
443
|
getAvailabilityTimeSlot,
|
|
416
444
|
listAvailabilityTimeSlotEndOptions,
|
|
417
445
|
listAvailabilityTimeSlots
|