@microboxlabs/miot-calendar-client 0.7.0 → 0.8.0

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.mts CHANGED
@@ -71,6 +71,15 @@ interface CalendarResponse {
71
71
  filter?: CalendarFilter;
72
72
  hasSlotManager?: boolean;
73
73
  }
74
+ /**
75
+ * Discriminator for a time window.
76
+ *
77
+ * - `WINDOW` — bookable period with a capacity quota (the historical default).
78
+ * - `BLOCK` — non-bookable period (holiday, maintenance, manual closure);
79
+ * slot generation produces CLOSED slots so the planning UI can paint them
80
+ * and the backend rejects bookings against them.
81
+ */
82
+ type TimeWindowKind = "WINDOW" | "BLOCK";
74
83
  interface TimeWindowRequest {
75
84
  name: string;
76
85
  startHour: number;
@@ -81,6 +90,8 @@ interface TimeWindowRequest {
81
90
  validTo?: string;
82
91
  active?: boolean;
83
92
  color?: string;
93
+ /** Defaults to `WINDOW` server-side when omitted. */
94
+ kind?: TimeWindowKind;
84
95
  }
85
96
  interface TimeWindowResponse {
86
97
  id: string;
@@ -95,6 +106,7 @@ interface TimeWindowResponse {
95
106
  validTo?: string;
96
107
  active: boolean;
97
108
  color?: string;
109
+ kind: TimeWindowKind;
98
110
  createdAt: string;
99
111
  updatedAt: string;
100
112
  }
@@ -253,4 +265,4 @@ declare class MiotCalendarApiError extends Error {
253
265
  constructor(status: number, body: ErrorResponse | string);
254
266
  }
255
267
 
256
- export { type BookingListResponse, type BookingRequest, type BookingResponse, type CalendarFilter, type CalendarGroupRequest, type CalendarGroupResponse, type CalendarRequest, type CalendarResponse, type ClientConfig, type ErrorResponse, type GenerateSlotsRequest, type GenerateSlotsResponse, MiotCalendarApiError, type ResourceData, type SlotData, type SlotListResponse, type SlotManagerRequest, type SlotManagerResponse, type SlotManagerRunResponse, type SlotResponse, type SlotStatus, type TimeWindowRequest, type TimeWindowResponse, type UpdateSlotStatusRequest, createMiotCalendarClient };
268
+ export { type BookingListResponse, type BookingRequest, type BookingResponse, type CalendarFilter, type CalendarGroupRequest, type CalendarGroupResponse, type CalendarRequest, type CalendarResponse, type ClientConfig, type ErrorResponse, type GenerateSlotsRequest, type GenerateSlotsResponse, MiotCalendarApiError, type ResourceData, type SlotData, type SlotListResponse, type SlotManagerRequest, type SlotManagerResponse, type SlotManagerRunResponse, type SlotResponse, type SlotStatus, type TimeWindowKind, type TimeWindowRequest, type TimeWindowResponse, type UpdateSlotStatusRequest, createMiotCalendarClient };
package/dist/index.d.ts CHANGED
@@ -71,6 +71,15 @@ interface CalendarResponse {
71
71
  filter?: CalendarFilter;
72
72
  hasSlotManager?: boolean;
73
73
  }
74
+ /**
75
+ * Discriminator for a time window.
76
+ *
77
+ * - `WINDOW` — bookable period with a capacity quota (the historical default).
78
+ * - `BLOCK` — non-bookable period (holiday, maintenance, manual closure);
79
+ * slot generation produces CLOSED slots so the planning UI can paint them
80
+ * and the backend rejects bookings against them.
81
+ */
82
+ type TimeWindowKind = "WINDOW" | "BLOCK";
74
83
  interface TimeWindowRequest {
75
84
  name: string;
76
85
  startHour: number;
@@ -81,6 +90,8 @@ interface TimeWindowRequest {
81
90
  validTo?: string;
82
91
  active?: boolean;
83
92
  color?: string;
93
+ /** Defaults to `WINDOW` server-side when omitted. */
94
+ kind?: TimeWindowKind;
84
95
  }
85
96
  interface TimeWindowResponse {
86
97
  id: string;
@@ -95,6 +106,7 @@ interface TimeWindowResponse {
95
106
  validTo?: string;
96
107
  active: boolean;
97
108
  color?: string;
109
+ kind: TimeWindowKind;
98
110
  createdAt: string;
99
111
  updatedAt: string;
100
112
  }
@@ -253,4 +265,4 @@ declare class MiotCalendarApiError extends Error {
253
265
  constructor(status: number, body: ErrorResponse | string);
254
266
  }
255
267
 
256
- export { type BookingListResponse, type BookingRequest, type BookingResponse, type CalendarFilter, type CalendarGroupRequest, type CalendarGroupResponse, type CalendarRequest, type CalendarResponse, type ClientConfig, type ErrorResponse, type GenerateSlotsRequest, type GenerateSlotsResponse, MiotCalendarApiError, type ResourceData, type SlotData, type SlotListResponse, type SlotManagerRequest, type SlotManagerResponse, type SlotManagerRunResponse, type SlotResponse, type SlotStatus, type TimeWindowRequest, type TimeWindowResponse, type UpdateSlotStatusRequest, createMiotCalendarClient };
268
+ export { type BookingListResponse, type BookingRequest, type BookingResponse, type CalendarFilter, type CalendarGroupRequest, type CalendarGroupResponse, type CalendarRequest, type CalendarResponse, type ClientConfig, type ErrorResponse, type GenerateSlotsRequest, type GenerateSlotsResponse, MiotCalendarApiError, type ResourceData, type SlotData, type SlotListResponse, type SlotManagerRequest, type SlotManagerResponse, type SlotManagerRunResponse, type SlotResponse, type SlotStatus, type TimeWindowKind, type TimeWindowRequest, type TimeWindowResponse, type UpdateSlotStatusRequest, createMiotCalendarClient };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microboxlabs/miot-calendar-client",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",