types-salon-management 1.0.49 → 1.0.51
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/api/appointments/appointment.constants.d.ts +12 -0
- package/dist/api/appointments/appointment.constants.d.ts.map +1 -1
- package/dist/api/appointments/appointment.constants.js +12 -1
- package/dist/api/appointments/appointment.constants.js.map +1 -1
- package/dist/api/appointments/book-appointment.request.d.ts +5 -0
- package/dist/api/appointments/book-appointment.request.d.ts.map +1 -1
- package/dist/api/appointments/check-scheduling.request.d.ts +30 -0
- package/dist/api/appointments/check-scheduling.request.d.ts.map +1 -0
- package/dist/api/appointments/check-scheduling.request.js +3 -0
- package/dist/api/appointments/check-scheduling.request.js.map +1 -0
- package/dist/api/appointments/index.d.ts +1 -0
- package/dist/api/appointments/index.d.ts.map +1 -1
- package/dist/api/appointments/index.js +1 -0
- package/dist/api/appointments/index.js.map +1 -1
- package/dist/api/appointments/reschedule-item.request.d.ts +8 -2
- package/dist/api/appointments/reschedule-item.request.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/appointments/appointment.constants.ts +15 -0
- package/src/api/appointments/book-appointment.request.ts +5 -0
- package/src/api/appointments/check-scheduling.request.ts +33 -0
- package/src/api/appointments/index.ts +1 -0
- package/src/api/appointments/reschedule-item.request.ts +8 -3
|
@@ -24,4 +24,16 @@ export declare const OccupancyStaffRole: {
|
|
|
24
24
|
readonly ASSISTANT: "assistant";
|
|
25
25
|
};
|
|
26
26
|
export type OccupancyStaffRole = (typeof OccupancyStaffRole)[keyof typeof OccupancyStaffRole];
|
|
27
|
+
/**
|
|
28
|
+
* Advisory scheduling problems. None of these block a booking: the caller may proceed by
|
|
29
|
+
* setting `allowOverlap` on the write request, which is recorded on the occupancy. The
|
|
30
|
+
* exclusion constraints still reject overlaps that were never acknowledged.
|
|
31
|
+
*/
|
|
32
|
+
export declare const SchedulingWarningCode: {
|
|
33
|
+
readonly STAFF_DAY_OFF: "staff_day_off";
|
|
34
|
+
readonly STAFF_OUTSIDE_WORKING_HOURS: "staff_outside_working_hours";
|
|
35
|
+
readonly STAFF_DOUBLE_BOOKED: "staff_double_booked";
|
|
36
|
+
readonly RESOURCE_DOUBLE_BOOKED: "resource_double_booked";
|
|
37
|
+
};
|
|
38
|
+
export type SchedulingWarningCode = (typeof SchedulingWarningCode)[keyof typeof SchedulingWarningCode];
|
|
27
39
|
//# sourceMappingURL=appointment.constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.constants.d.ts","sourceRoot":"","sources":["../../../src/api/appointments/appointment.constants.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,eAAO,MAAM,2BAA2B;;;;;;;;CAQ9B,CAAC;AAEX,MAAM,MAAM,2BAA2B,GACrC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAC;AAEjF,iEAAiE;AACjE,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAErE,eAAO,MAAM,eAAe;;CAElB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"appointment.constants.d.ts","sourceRoot":"","sources":["../../../src/api/appointments/appointment.constants.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,eAAO,MAAM,2BAA2B;;;;;;;;CAQ9B,CAAC;AAEX,MAAM,MAAM,2BAA2B,GACrC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAC;AAEjF,iEAAiE;AACjE,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAErE,eAAO,MAAM,eAAe;;CAElB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAE9F;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OccupancyStaffRole = exports.AppointmentKind = exports.AppointmentClientType = exports.SchedulingAppointmentStatus = void 0;
|
|
3
|
+
exports.SchedulingWarningCode = exports.OccupancyStaffRole = exports.AppointmentKind = exports.AppointmentClientType = exports.SchedulingAppointmentStatus = void 0;
|
|
4
4
|
/** Postgres appointment header status — distinct from legacy Firestore `AppointmentStatus` enum. */
|
|
5
5
|
exports.SchedulingAppointmentStatus = {
|
|
6
6
|
NEW: 'new',
|
|
@@ -23,4 +23,15 @@ exports.OccupancyStaffRole = {
|
|
|
23
23
|
PRIMARY: 'primary',
|
|
24
24
|
ASSISTANT: 'assistant',
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Advisory scheduling problems. None of these block a booking: the caller may proceed by
|
|
28
|
+
* setting `allowOverlap` on the write request, which is recorded on the occupancy. The
|
|
29
|
+
* exclusion constraints still reject overlaps that were never acknowledged.
|
|
30
|
+
*/
|
|
31
|
+
exports.SchedulingWarningCode = {
|
|
32
|
+
STAFF_DAY_OFF: 'staff_day_off',
|
|
33
|
+
STAFF_OUTSIDE_WORKING_HOURS: 'staff_outside_working_hours',
|
|
34
|
+
STAFF_DOUBLE_BOOKED: 'staff_double_booked',
|
|
35
|
+
RESOURCE_DOUBLE_BOOKED: 'resource_double_booked',
|
|
36
|
+
};
|
|
26
37
|
//# sourceMappingURL=appointment.constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.constants.js","sourceRoot":"","sources":["../../../src/api/appointments/appointment.constants.ts"],"names":[],"mappings":";;;AAAA,oGAAoG;AACvF,QAAA,2BAA2B,GAAG;IACzC,GAAG,EAAE,KAAK;IACV,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;CACV,CAAC;AAKX,iEAAiE;AACpD,QAAA,qBAAqB,GAAG;IACnC,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAKE,QAAA,eAAe,GAAG;IAC7B,OAAO,EAAE,SAAS;CACV,CAAC;AAIE,QAAA,kBAAkB,GAAG;IAChC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;CACd,CAAC"}
|
|
1
|
+
{"version":3,"file":"appointment.constants.js","sourceRoot":"","sources":["../../../src/api/appointments/appointment.constants.ts"],"names":[],"mappings":";;;AAAA,oGAAoG;AACvF,QAAA,2BAA2B,GAAG;IACzC,GAAG,EAAE,KAAK;IACV,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;CACV,CAAC;AAKX,iEAAiE;AACpD,QAAA,qBAAqB,GAAG;IACnC,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAKE,QAAA,eAAe,GAAG;IAC7B,OAAO,EAAE,SAAS;CACV,CAAC;AAIE,QAAA,kBAAkB,GAAG;IAChC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;CACd,CAAC;AAIX;;;;GAIG;AACU,QAAA,qBAAqB,GAAG;IACnC,aAAa,EAAE,eAAe;IAC9B,2BAA2B,EAAE,6BAA6B;IAC1D,mBAAmB,EAAE,qBAAqB;IAC1C,sBAAsB,EAAE,wBAAwB;CACxC,CAAC"}
|
|
@@ -14,5 +14,10 @@ export interface BookAppointmentRequest {
|
|
|
14
14
|
clientEmail?: string | null;
|
|
15
15
|
notes?: string | null;
|
|
16
16
|
items: BookAppointmentItemRequest[];
|
|
17
|
+
/**
|
|
18
|
+
* Set once the user has seen a clash and chosen to double-book anyway. Without it the
|
|
19
|
+
* exclusion constraints reject the overlap with a 409.
|
|
20
|
+
*/
|
|
21
|
+
allowOverlap?: boolean;
|
|
17
22
|
}
|
|
18
23
|
//# sourceMappingURL=book-appointment.request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"book-appointment.request.d.ts","sourceRoot":"","sources":["../../../src/api/appointments/book-appointment.request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,0BAA0B,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"book-appointment.request.d.ts","sourceRoot":"","sources":["../../../src/api/appointments/book-appointment.request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,0BAA0B,EAAE,CAAC;IACpC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { SchedulingWarningCode } from './appointment.constants';
|
|
2
|
+
/** One staff/time slot to evaluate. `endAt` is optional; omit it to derive from the variant. */
|
|
3
|
+
export interface CheckSchedulingSlotRequest {
|
|
4
|
+
serviceVariantId?: string;
|
|
5
|
+
staffId: string;
|
|
6
|
+
staffId2?: string;
|
|
7
|
+
resourceId?: string;
|
|
8
|
+
startAt: string;
|
|
9
|
+
endAt?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CheckSchedulingRequest {
|
|
12
|
+
locationId: string;
|
|
13
|
+
slots: CheckSchedulingSlotRequest[];
|
|
14
|
+
/** Occupancies of this item are ignored, so rescheduling never clashes with itself. */
|
|
15
|
+
excludeAppointmentItemId?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface SchedulingWarningDto {
|
|
18
|
+
code: SchedulingWarningCode;
|
|
19
|
+
/** Ready-to-display sentence; the server owns the wording. */
|
|
20
|
+
message: string;
|
|
21
|
+
/** Null for resource clashes, which aren't tied to a staff member. */
|
|
22
|
+
staffId: string | null;
|
|
23
|
+
staffName: string | null;
|
|
24
|
+
startAt: string;
|
|
25
|
+
endAt: string;
|
|
26
|
+
}
|
|
27
|
+
export interface CheckSchedulingResponse {
|
|
28
|
+
warnings: SchedulingWarningDto[];
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=check-scheduling.request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-scheduling.request.d.ts","sourceRoot":"","sources":["../../../src/api/appointments/check-scheduling.request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,gGAAgG;AAChG,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,0BAA0B,EAAE,CAAC;IACpC,uFAAuF;IACvF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,oBAAoB,EAAE,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-scheduling.request.js","sourceRoot":"","sources":["../../../src/api/appointments/check-scheduling.request.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/appointments/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/appointments/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
|
|
@@ -17,5 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./appointment.constants"), exports);
|
|
18
18
|
__exportStar(require("./appointment.dto"), exports);
|
|
19
19
|
__exportStar(require("./book-appointment.request"), exports);
|
|
20
|
+
__exportStar(require("./check-scheduling.request"), exports);
|
|
20
21
|
__exportStar(require("./reschedule-item.request"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/appointments/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,oDAAkC;AAClC,6DAA2C;AAC3C,4DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/appointments/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,oDAAkC;AAClC,6DAA2C;AAC3C,6DAA2C;AAC3C,4DAA0C"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import type { OccupancyStaffRole } from './appointment.constants';
|
|
2
1
|
export interface RescheduleItemRequest {
|
|
3
2
|
startAt: string;
|
|
4
3
|
endAt: string;
|
|
4
|
+
/** New primary staff; omit to leave unchanged. */
|
|
5
5
|
staffId?: string;
|
|
6
|
+
/** New assistant staff for two-staff services; omit to leave unchanged. */
|
|
6
7
|
staffId2?: string;
|
|
8
|
+
/** New room; omit or null to leave unchanged. */
|
|
7
9
|
resourceId?: string | null;
|
|
8
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Set once the user has seen a clash and chosen to double-book anyway. Without it the
|
|
12
|
+
* exclusion constraints reject the overlap with a 409.
|
|
13
|
+
*/
|
|
14
|
+
allowOverlap?: boolean;
|
|
9
15
|
}
|
|
10
16
|
//# sourceMappingURL=reschedule-item.request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reschedule-item.request.d.ts","sourceRoot":"","sources":["../../../src/api/appointments/reschedule-item.request.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"reschedule-item.request.d.ts","sourceRoot":"","sources":["../../../src/api/appointments/reschedule-item.request.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB"}
|
package/package.json
CHANGED
|
@@ -33,3 +33,18 @@ export const OccupancyStaffRole = {
|
|
|
33
33
|
} as const;
|
|
34
34
|
|
|
35
35
|
export type OccupancyStaffRole = (typeof OccupancyStaffRole)[keyof typeof OccupancyStaffRole];
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Advisory scheduling problems. None of these block a booking: the caller may proceed by
|
|
39
|
+
* setting `allowOverlap` on the write request, which is recorded on the occupancy. The
|
|
40
|
+
* exclusion constraints still reject overlaps that were never acknowledged.
|
|
41
|
+
*/
|
|
42
|
+
export const SchedulingWarningCode = {
|
|
43
|
+
STAFF_DAY_OFF: 'staff_day_off',
|
|
44
|
+
STAFF_OUTSIDE_WORKING_HOURS: 'staff_outside_working_hours',
|
|
45
|
+
STAFF_DOUBLE_BOOKED: 'staff_double_booked',
|
|
46
|
+
RESOURCE_DOUBLE_BOOKED: 'resource_double_booked',
|
|
47
|
+
} as const;
|
|
48
|
+
|
|
49
|
+
export type SchedulingWarningCode =
|
|
50
|
+
(typeof SchedulingWarningCode)[keyof typeof SchedulingWarningCode];
|
|
@@ -16,4 +16,9 @@ export interface BookAppointmentRequest {
|
|
|
16
16
|
clientEmail?: string | null;
|
|
17
17
|
notes?: string | null;
|
|
18
18
|
items: BookAppointmentItemRequest[];
|
|
19
|
+
/**
|
|
20
|
+
* Set once the user has seen a clash and chosen to double-book anyway. Without it the
|
|
21
|
+
* exclusion constraints reject the overlap with a 409.
|
|
22
|
+
*/
|
|
23
|
+
allowOverlap?: boolean;
|
|
19
24
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { SchedulingWarningCode } from './appointment.constants';
|
|
2
|
+
|
|
3
|
+
/** One staff/time slot to evaluate. `endAt` is optional; omit it to derive from the variant. */
|
|
4
|
+
export interface CheckSchedulingSlotRequest {
|
|
5
|
+
serviceVariantId?: string;
|
|
6
|
+
staffId: string;
|
|
7
|
+
staffId2?: string;
|
|
8
|
+
resourceId?: string;
|
|
9
|
+
startAt: string;
|
|
10
|
+
endAt?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface CheckSchedulingRequest {
|
|
14
|
+
locationId: string;
|
|
15
|
+
slots: CheckSchedulingSlotRequest[];
|
|
16
|
+
/** Occupancies of this item are ignored, so rescheduling never clashes with itself. */
|
|
17
|
+
excludeAppointmentItemId?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface SchedulingWarningDto {
|
|
21
|
+
code: SchedulingWarningCode;
|
|
22
|
+
/** Ready-to-display sentence; the server owns the wording. */
|
|
23
|
+
message: string;
|
|
24
|
+
/** Null for resource clashes, which aren't tied to a staff member. */
|
|
25
|
+
staffId: string | null;
|
|
26
|
+
staffName: string | null;
|
|
27
|
+
startAt: string;
|
|
28
|
+
endAt: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface CheckSchedulingResponse {
|
|
32
|
+
warnings: SchedulingWarningDto[];
|
|
33
|
+
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import type { OccupancyStaffRole } from './appointment.constants';
|
|
2
|
-
|
|
3
1
|
export interface RescheduleItemRequest {
|
|
4
2
|
startAt: string;
|
|
5
3
|
endAt: string;
|
|
4
|
+
/** New primary staff; omit to leave unchanged. */
|
|
6
5
|
staffId?: string;
|
|
6
|
+
/** New assistant staff for two-staff services; omit to leave unchanged. */
|
|
7
7
|
staffId2?: string;
|
|
8
|
+
/** New room; omit or null to leave unchanged. */
|
|
8
9
|
resourceId?: string | null;
|
|
9
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Set once the user has seen a clash and chosen to double-book anyway. Without it the
|
|
12
|
+
* exclusion constraints reject the overlap with a 409.
|
|
13
|
+
*/
|
|
14
|
+
allowOverlap?: boolean;
|
|
10
15
|
}
|