types-salon-management 1.0.49 → 1.0.50

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.
@@ -24,4 +24,13 @@ 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. These never block a booking — double-booking is the
29
+ * only hard conflict, enforced by exclusion constraints and surfaced as 409.
30
+ */
31
+ export declare const SchedulingWarningCode: {
32
+ readonly STAFF_DAY_OFF: "staff_day_off";
33
+ readonly STAFF_OUTSIDE_WORKING_HOURS: "staff_outside_working_hours";
34
+ };
35
+ export type SchedulingWarningCode = (typeof SchedulingWarningCode)[keyof typeof SchedulingWarningCode];
27
36
  //# 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;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;CAGxB,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,12 @@ exports.OccupancyStaffRole = {
23
23
  PRIMARY: 'primary',
24
24
  ASSISTANT: 'assistant',
25
25
  };
26
+ /**
27
+ * Advisory scheduling problems. These never block a booking — double-booking is the
28
+ * only hard conflict, enforced by exclusion constraints and surfaced as 409.
29
+ */
30
+ exports.SchedulingWarningCode = {
31
+ STAFF_DAY_OFF: 'staff_day_off',
32
+ STAFF_OUTSIDE_WORKING_HOURS: 'staff_outside_working_hours',
33
+ };
26
34
  //# 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;;;GAGG;AACU,QAAA,qBAAqB,GAAG;IACnC,aAAa,EAAE,eAAe;IAC9B,2BAA2B,EAAE,6BAA6B;CAClD,CAAC"}
@@ -0,0 +1,26 @@
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
+ startAt: string;
8
+ endAt?: string;
9
+ }
10
+ export interface CheckSchedulingRequest {
11
+ locationId: string;
12
+ slots: CheckSchedulingSlotRequest[];
13
+ }
14
+ export interface SchedulingWarningDto {
15
+ code: SchedulingWarningCode;
16
+ /** Ready-to-display sentence; the server owns the wording. */
17
+ message: string;
18
+ staffId: string;
19
+ staffName: string | null;
20
+ startAt: string;
21
+ endAt: string;
22
+ }
23
+ export interface CheckSchedulingResponse {
24
+ warnings: SchedulingWarningDto[];
25
+ }
26
+ //# 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,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;CACrC;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=check-scheduling.request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-scheduling.request.js","sourceRoot":"","sources":["../../../src/api/appointments/check-scheduling.request.ts"],"names":[],"mappings":""}
@@ -1,5 +1,6 @@
1
1
  export * from './appointment.constants';
2
2
  export * from './appointment.dto';
3
3
  export * from './book-appointment.request';
4
+ export * from './check-scheduling.request';
4
5
  export * from './reschedule-item.request';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "types-salon-management",
3
- "version": "1.0.49",
3
+ "version": "1.0.50",
4
4
  "description": "Types for Salon Management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,3 +33,15 @@ 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. These never block a booking — double-booking is the
39
+ * only hard conflict, enforced by exclusion constraints and surfaced as 409.
40
+ */
41
+ export const SchedulingWarningCode = {
42
+ STAFF_DAY_OFF: 'staff_day_off',
43
+ STAFF_OUTSIDE_WORKING_HOURS: 'staff_outside_working_hours',
44
+ } as const;
45
+
46
+ export type SchedulingWarningCode =
47
+ (typeof SchedulingWarningCode)[keyof typeof SchedulingWarningCode];
@@ -0,0 +1,29 @@
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
+ startAt: string;
9
+ endAt?: string;
10
+ }
11
+
12
+ export interface CheckSchedulingRequest {
13
+ locationId: string;
14
+ slots: CheckSchedulingSlotRequest[];
15
+ }
16
+
17
+ export interface SchedulingWarningDto {
18
+ code: SchedulingWarningCode;
19
+ /** Ready-to-display sentence; the server owns the wording. */
20
+ message: string;
21
+ staffId: string;
22
+ staffName: string | null;
23
+ startAt: string;
24
+ endAt: string;
25
+ }
26
+
27
+ export interface CheckSchedulingResponse {
28
+ warnings: SchedulingWarningDto[];
29
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './appointment.constants';
2
2
  export * from './appointment.dto';
3
3
  export * from './book-appointment.request';
4
+ export * from './check-scheduling.request';
4
5
  export * from './reschedule-item.request';