@wix/auto_sdk_bookings_availability-time-slots 1.0.254 → 1.0.256

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.
@@ -1078,6 +1078,178 @@ interface ResolvedContext {
1078
1078
  */
1079
1079
  timeZone?: string | null;
1080
1080
  }
1081
+ interface BulkListAvailabilityTimeSlotsRequest {
1082
+ /**
1083
+ * IDs of the appointment-based services to retrieve time slots for.
1084
+ * Non-appointment services and IDs that don't exist are returned as failed entries in `results`.
1085
+ * @format GUID
1086
+ * @minSize 1
1087
+ * @maxSize 100
1088
+ */
1089
+ serviceIds?: string[];
1090
+ /**
1091
+ * Lower boundary for `localStartDate` to include, applied to every service.
1092
+ * Each returned time slot has a `localStartDate` within the provided `fromLocalDate` and `toLocalDate` exclusive.
1093
+ *
1094
+ * Local start date in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
1095
+ * For example, `2026-01-30T13:30:00`.
1096
+ * @format LOCAL_DATE_TIME
1097
+ */
1098
+ fromLocalDate?: string | null;
1099
+ /**
1100
+ * Upper boundary for `localStartDate` to include, applied to every service.
1101
+ * Each returned time slot has a `localStartDate` within the provided `fromLocalDate` and `toLocalDate` exclusive.
1102
+ *
1103
+ * Local end date in `YYYY-MM-DDThh:mm:ss` [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
1104
+ * For example, `2026-01-30T13:30:00`.
1105
+ * @format LOCAL_DATE_TIME
1106
+ */
1107
+ toLocalDate?: string | null;
1108
+ /**
1109
+ * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) for adjusting `fromLocalDate` and `toLocalDate`.
1110
+ * For example, `America/New_York` or `UTC`.
1111
+ *
1112
+ * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
1113
+ * @minLength 1
1114
+ * @maxLength 150
1115
+ */
1116
+ timeZone?: string | null;
1117
+ /**
1118
+ * Whether the time slot is bookable according to each service's booking policies.
1119
+ * If not specified, returns both bookable and un-bookable time slots.
1120
+ */
1121
+ bookable?: boolean | null;
1122
+ /**
1123
+ * Maximum number of slots to return per service for each day in the specified time range.
1124
+ * If `bookable` filter isn't specified, bookable slots are returned first.
1125
+ *
1126
+ * Min: `1`.
1127
+ * @min 1
1128
+ */
1129
+ timeSlotsPerDay?: number | null;
1130
+ /**
1131
+ * Maximum number of time slots to return per service.
1132
+ *
1133
+ * Min: `1`. Max: `1000`.
1134
+ *
1135
+ * Default: `1000`.
1136
+ * @min 1
1137
+ * @max 1000
1138
+ */
1139
+ limitPerService?: number | null;
1140
+ /**
1141
+ * Locations to include in response, applied to every service.
1142
+ * If not specified, returns time slots for all locations where each service is available.
1143
+ * @maxSize 5
1144
+ */
1145
+ locations?: Location[];
1146
+ /**
1147
+ * Resource type IDs to include in the response, applied to every service.
1148
+ * If specified, returns up to 10 `availableResources` with matching `resourceTypeId`.
1149
+ * This controls which resource details are included in the response but doesn't filter the time slots themselves.
1150
+ * @format GUID
1151
+ * @maxSize 100
1152
+ */
1153
+ includeResourceTypeIds?: string[];
1154
+ /**
1155
+ * Indicators for services' booking policy violations, applied to every service.
1156
+ * Allows filtering for time slots with specific violation types based on [booking policies](https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/booking-policies/introduction). When you don't specify `bookingPolicyViolations` filters, all slots are returned regardless of their booking policy status.
1157
+ */
1158
+ bookingPolicyViolations?: BookingPolicyViolations;
1159
+ /**
1160
+ * Selected customer choices for service configuration, applied to every service.
1161
+ * If not specified, uses each service's default configuration.
1162
+ *
1163
+ * Not supported for services configured with a duration range (`availabilityConstraints.durationRange`).
1164
+ *
1165
+ * When using [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction), we recommend passing only `addOnIds` and omitting `durationInMinutes`. Wix Bookings then calculates the total duration automatically. If you specify both `addOnIds` and `durationInMinutes`, `durationInMinutes` must equal the service duration plus all selected add-on durations.
1166
+ */
1167
+ customerChoices?: CustomerChoices;
1168
+ /**
1169
+ * Resource types to filter time slots, applied to every service.
1170
+ * Only returns time slots that have these specific resource types available.
1171
+ * This filters the time slots themselves, unlike `includeResourceTypeIds` which only controls response details.
1172
+ * @maxSize 3
1173
+ */
1174
+ resourceTypes?: ResourceType[];
1175
+ }
1176
+ interface BulkListAvailabilityTimeSlotsResponse {
1177
+ /**
1178
+ * Per-service results, one entry per requested `serviceId`.
1179
+ * Each entry carries `itemMetadata` with the outcome, and `serviceTimeSlots` on success.
1180
+ * Order isn't guaranteed to match the request; correlate via `itemMetadata.id` or `itemMetadata.originalIndex`.
1181
+ * @maxSize 100
1182
+ */
1183
+ results?: BulkServiceTimeSlotsResult[];
1184
+ /**
1185
+ * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) used for all services.
1186
+ * For example, `America/New_York` or `UTC`.
1187
+ *
1188
+ * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties).
1189
+ * @minLength 1
1190
+ * @maxLength 150
1191
+ */
1192
+ timeZone?: string | null;
1193
+ /** Success and failure totals across all requested services. */
1194
+ bulkActionMetadata?: BulkActionMetadata;
1195
+ }
1196
+ interface BulkServiceTimeSlotsResult {
1197
+ /**
1198
+ * Outcome for a single requested service.
1199
+ * `id` echoes the `serviceId`, `originalIndex` is the service's position in the request, and
1200
+ * `success`/`error` describe whether availability could be computed.
1201
+ */
1202
+ itemMetadata?: ItemMetadata;
1203
+ /** Time slots for the service. Populated only when `itemMetadata.success` is `true`. */
1204
+ serviceTimeSlots?: ServiceTimeSlots;
1205
+ }
1206
+ interface ItemMetadata {
1207
+ /**
1208
+ * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
1209
+ * @format GUID
1210
+ */
1211
+ _id?: string | null;
1212
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1213
+ originalIndex?: number;
1214
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1215
+ success?: boolean;
1216
+ /** Details about the error in case of failure. */
1217
+ error?: ApplicationError;
1218
+ }
1219
+ interface ApplicationError {
1220
+ /** Error code. */
1221
+ code?: string;
1222
+ /** Description of the error. */
1223
+ description?: string;
1224
+ /** Data related to the error. */
1225
+ data?: Record<string, any> | null;
1226
+ }
1227
+ interface ServiceTimeSlots {
1228
+ /**
1229
+ * Service the time slots belong to.
1230
+ * @format GUID
1231
+ */
1232
+ serviceId?: string;
1233
+ /**
1234
+ * Retrieved time slots for the service.
1235
+ * Sorted by `localStartDate` in ascending order. When multiple slots have the same start time, no specific secondary sorting is guaranteed.
1236
+ * @maxSize 1000
1237
+ */
1238
+ timeSlots?: TimeSlot[];
1239
+ /**
1240
+ * Paging metadata for the service's remaining slots.
1241
+ * To fetch more slots for this service, pass `cursors.next` to `ListAvailabilityTimeSlots`.
1242
+ */
1243
+ cursorPagingMetadata?: CursorPagingMetadata;
1244
+ }
1245
+ interface BulkActionMetadata {
1246
+ /** Number of items that were successfully processed. */
1247
+ totalSuccesses?: number;
1248
+ /** Number of items that couldn't be processed. */
1249
+ totalFailures?: number;
1250
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1251
+ undetailedFailures?: number;
1252
+ }
1081
1253
  /** @docsIgnore */
1082
1254
  type ListAvailabilityTimeSlotsApplicationErrors = {
1083
1255
  code?: 'NO_IMPLEMENTERS_FOUND';
@@ -1453,4 +1625,4 @@ interface GetAvailabilityTimeSlotOptions {
1453
1625
  resourceTypes?: ResourceType[];
1454
1626
  }
1455
1627
 
1456
- 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, listAvailabilityTimeSlotEndOptions, listAvailabilityTimeSlots };
1628
+ export { type ApplicationError, type AvailableResources, type BookingPolicyViolations, type BulkActionMetadata, type BulkListAvailabilityTimeSlotsRequest, type BulkListAvailabilityTimeSlotsResponse, type BulkServiceTimeSlotsResult, 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 ItemMetadata, 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, type ServiceTimeSlots, SuggestedAction, type SuggestedActionWithLiterals, type TimeSlot, type V2CustomerChoices, type WaitingList, getAvailabilityTimeSlot, listAvailabilityTimeSlotEndOptions, listAvailabilityTimeSlots };