types-salon-management 1.0.47 → 1.0.49
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 +27 -0
- package/dist/api/appointments/appointment.constants.d.ts.map +1 -0
- package/dist/api/appointments/appointment.constants.js +26 -0
- package/dist/api/appointments/appointment.constants.js.map +1 -0
- package/dist/api/appointments/appointment.dto.d.ts +58 -0
- package/dist/api/appointments/appointment.dto.d.ts.map +1 -0
- package/dist/api/appointments/appointment.dto.js +3 -0
- package/dist/api/appointments/appointment.dto.js.map +1 -0
- package/dist/api/appointments/book-appointment.request.d.ts +18 -0
- package/dist/api/appointments/book-appointment.request.d.ts.map +1 -0
- package/dist/api/appointments/book-appointment.request.js +3 -0
- package/dist/api/appointments/book-appointment.request.js.map +1 -0
- package/dist/api/appointments/index.d.ts +5 -0
- package/dist/api/appointments/index.d.ts.map +1 -0
- package/dist/api/appointments/index.js +21 -0
- package/dist/api/appointments/index.js.map +1 -0
- package/dist/api/appointments/reschedule-item.request.d.ts +10 -0
- package/dist/api/appointments/reschedule-item.request.d.ts.map +1 -0
- package/dist/api/appointments/reschedule-item.request.js +3 -0
- package/dist/api/appointments/reschedule-item.request.js.map +1 -0
- package/dist/api/calendar/calendar.dto.d.ts +34 -0
- package/dist/api/calendar/calendar.dto.d.ts.map +1 -0
- package/dist/api/calendar/calendar.dto.js +3 -0
- package/dist/api/calendar/calendar.dto.js.map +1 -0
- package/dist/api/calendar/index.d.ts +2 -0
- package/dist/api/calendar/index.d.ts.map +1 -0
- package/dist/api/calendar/index.js +18 -0
- package/dist/api/calendar/index.js.map +1 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/appointments/appointment.constants.ts +35 -0
- package/src/api/appointments/appointment.dto.ts +66 -0
- package/src/api/appointments/book-appointment.request.ts +19 -0
- package/src/api/appointments/index.ts +4 -0
- package/src/api/appointments/reschedule-item.request.ts +10 -0
- package/src/api/calendar/calendar.dto.ts +35 -0
- package/src/api/calendar/index.ts +1 -0
- package/src/api/index.ts +2 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Postgres appointment header status — distinct from legacy Firestore `AppointmentStatus` enum. */
|
|
2
|
+
export declare const SchedulingAppointmentStatus: {
|
|
3
|
+
readonly NEW: "new";
|
|
4
|
+
readonly CONFIRMED: "confirmed";
|
|
5
|
+
readonly ARRIVED: "arrived";
|
|
6
|
+
readonly STARTED: "started";
|
|
7
|
+
readonly COMPLETED: "completed";
|
|
8
|
+
readonly CANCELLED: "cancelled";
|
|
9
|
+
readonly NO_SHOW: "no_show";
|
|
10
|
+
};
|
|
11
|
+
export type SchedulingAppointmentStatus = (typeof SchedulingAppointmentStatus)[keyof typeof SchedulingAppointmentStatus];
|
|
12
|
+
/** Matches invoice client type: recorded = registered client. */
|
|
13
|
+
export declare const AppointmentClientType: {
|
|
14
|
+
readonly WALK_IN: "walk_in";
|
|
15
|
+
readonly RECORDED: "recorded";
|
|
16
|
+
};
|
|
17
|
+
export type AppointmentClientType = (typeof AppointmentClientType)[keyof typeof AppointmentClientType];
|
|
18
|
+
export declare const AppointmentKind: {
|
|
19
|
+
readonly BOOKING: "booking";
|
|
20
|
+
};
|
|
21
|
+
export type AppointmentKind = (typeof AppointmentKind)[keyof typeof AppointmentKind];
|
|
22
|
+
export declare const OccupancyStaffRole: {
|
|
23
|
+
readonly PRIMARY: "primary";
|
|
24
|
+
readonly ASSISTANT: "assistant";
|
|
25
|
+
};
|
|
26
|
+
export type OccupancyStaffRole = (typeof OccupancyStaffRole)[keyof typeof OccupancyStaffRole];
|
|
27
|
+
//# sourceMappingURL=appointment.constants.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OccupancyStaffRole = exports.AppointmentKind = exports.AppointmentClientType = exports.SchedulingAppointmentStatus = void 0;
|
|
4
|
+
/** Postgres appointment header status — distinct from legacy Firestore `AppointmentStatus` enum. */
|
|
5
|
+
exports.SchedulingAppointmentStatus = {
|
|
6
|
+
NEW: 'new',
|
|
7
|
+
CONFIRMED: 'confirmed',
|
|
8
|
+
ARRIVED: 'arrived',
|
|
9
|
+
STARTED: 'started',
|
|
10
|
+
COMPLETED: 'completed',
|
|
11
|
+
CANCELLED: 'cancelled',
|
|
12
|
+
NO_SHOW: 'no_show',
|
|
13
|
+
};
|
|
14
|
+
/** Matches invoice client type: recorded = registered client. */
|
|
15
|
+
exports.AppointmentClientType = {
|
|
16
|
+
WALK_IN: 'walk_in',
|
|
17
|
+
RECORDED: 'recorded',
|
|
18
|
+
};
|
|
19
|
+
exports.AppointmentKind = {
|
|
20
|
+
BOOKING: 'booking',
|
|
21
|
+
};
|
|
22
|
+
exports.OccupancyStaffRole = {
|
|
23
|
+
PRIMARY: 'primary',
|
|
24
|
+
ASSISTANT: 'assistant',
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=appointment.constants.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
import type { AuditActor } from '../audit';
|
|
3
|
+
import type { AppointmentClientType, AppointmentKind, SchedulingAppointmentStatus, OccupancyStaffRole } from './appointment.constants';
|
|
4
|
+
export interface AppointmentItemDurationSegmentDto {
|
|
5
|
+
id: string;
|
|
6
|
+
segmentType: string;
|
|
7
|
+
durationMinutes: number;
|
|
8
|
+
sortOrder: number;
|
|
9
|
+
}
|
|
10
|
+
export interface AppointmentItemDto {
|
|
11
|
+
id: string;
|
|
12
|
+
serviceId: string | null;
|
|
13
|
+
serviceVariantId: string | null;
|
|
14
|
+
comboId: string | null;
|
|
15
|
+
serviceName: string;
|
|
16
|
+
variantName: string | null;
|
|
17
|
+
comboName: string | null;
|
|
18
|
+
durationMinutes: number;
|
|
19
|
+
unitPrice: string;
|
|
20
|
+
priceType: string;
|
|
21
|
+
requiresTwoStaffs: boolean;
|
|
22
|
+
sortOrder: number;
|
|
23
|
+
status: SchedulingAppointmentStatus;
|
|
24
|
+
durationSegments: AppointmentItemDurationSegmentDto[];
|
|
25
|
+
}
|
|
26
|
+
export interface AppointmentOccupancyDto {
|
|
27
|
+
id: string;
|
|
28
|
+
appointmentItemId: string;
|
|
29
|
+
staffId: string | null;
|
|
30
|
+
staffName: string | null;
|
|
31
|
+
resourceId: string | null;
|
|
32
|
+
resourceName: string | null;
|
|
33
|
+
staffRole: OccupancyStaffRole | null;
|
|
34
|
+
startAt: string;
|
|
35
|
+
endAt: string;
|
|
36
|
+
}
|
|
37
|
+
export interface AppointmentDetailDto {
|
|
38
|
+
id: string;
|
|
39
|
+
locationId: string;
|
|
40
|
+
locationName: string;
|
|
41
|
+
clientId: string | null;
|
|
42
|
+
clientType: AppointmentClientType;
|
|
43
|
+
clientDisplayName: string | null;
|
|
44
|
+
clientPhone: PhoneNumberModel | null;
|
|
45
|
+
clientPhoneE164: string | null;
|
|
46
|
+
clientEmail: string | null;
|
|
47
|
+
groupId: string | null;
|
|
48
|
+
kind: AppointmentKind;
|
|
49
|
+
status: SchedulingAppointmentStatus;
|
|
50
|
+
notes: string | null;
|
|
51
|
+
items: AppointmentItemDto[];
|
|
52
|
+
occupancies: AppointmentOccupancyDto[];
|
|
53
|
+
createdAt: string;
|
|
54
|
+
updatedAt: string | null;
|
|
55
|
+
createdBy: AuditActor | null;
|
|
56
|
+
updatedBy: AuditActor | null;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=appointment.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appointment.dto.d.ts","sourceRoot":"","sources":["../../../src/api/appointments/appointment.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EACf,2BAA2B,EAC3B,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,iCAAiC;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,2BAA2B,CAAC;IACpC,gBAAgB,EAAE,iCAAiC,EAAE,CAAC;CACvD;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,qBAAqB,CAAC;IAClC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,2BAA2B,CAAC;IACpC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,WAAW,EAAE,uBAAuB,EAAE,CAAC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appointment.dto.js","sourceRoot":"","sources":["../../../src/api/appointments/appointment.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
export interface BookAppointmentItemRequest {
|
|
3
|
+
serviceVariantId: string;
|
|
4
|
+
staffId: string;
|
|
5
|
+
staffId2?: string;
|
|
6
|
+
resourceId?: string;
|
|
7
|
+
startAt: string;
|
|
8
|
+
}
|
|
9
|
+
export interface BookAppointmentRequest {
|
|
10
|
+
locationId: string;
|
|
11
|
+
clientId?: string | null;
|
|
12
|
+
clientDisplayName?: string | null;
|
|
13
|
+
clientPhone?: PhoneNumberModel | null;
|
|
14
|
+
clientEmail?: string | null;
|
|
15
|
+
notes?: string | null;
|
|
16
|
+
items: BookAppointmentItemRequest[];
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=book-appointment.request.d.ts.map
|
|
@@ -0,0 +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;CACrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"book-appointment.request.js","sourceRoot":"","sources":["../../../src/api/appointments/book-appointment.request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./appointment.constants"), exports);
|
|
18
|
+
__exportStar(require("./appointment.dto"), exports);
|
|
19
|
+
__exportStar(require("./book-appointment.request"), exports);
|
|
20
|
+
__exportStar(require("./reschedule-item.request"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/appointments/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,oDAAkC;AAClC,6DAA2C;AAC3C,4DAA0C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OccupancyStaffRole } from './appointment.constants';
|
|
2
|
+
export interface RescheduleItemRequest {
|
|
3
|
+
startAt: string;
|
|
4
|
+
endAt: string;
|
|
5
|
+
staffId?: string;
|
|
6
|
+
staffId2?: string;
|
|
7
|
+
resourceId?: string | null;
|
|
8
|
+
staffRole?: OccupancyStaffRole;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=reschedule-item.request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reschedule-item.request.d.ts","sourceRoot":"","sources":["../../../src/api/appointments/reschedule-item.request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reschedule-item.request.js","sourceRoot":"","sources":["../../../src/api/appointments/reschedule-item.request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { LocationClosureDto } from '../location-closures/location-closure.dto';
|
|
2
|
+
import type { AppointmentItemDurationSegmentDto } from '../appointments/appointment.dto';
|
|
3
|
+
import type { SchedulingAppointmentStatus, OccupancyStaffRole } from '../appointments/appointment.constants';
|
|
4
|
+
export interface CalendarOccupancyDto {
|
|
5
|
+
occupancyId: string;
|
|
6
|
+
appointmentId: string;
|
|
7
|
+
appointmentItemId: string;
|
|
8
|
+
locationId: string;
|
|
9
|
+
staffId: string | null;
|
|
10
|
+
staffName: string | null;
|
|
11
|
+
resourceId: string | null;
|
|
12
|
+
resourceName: string | null;
|
|
13
|
+
staffRole: OccupancyStaffRole | null;
|
|
14
|
+
startAt: string;
|
|
15
|
+
endAt: string;
|
|
16
|
+
clientDisplayName: string | null;
|
|
17
|
+
serviceName: string;
|
|
18
|
+
variantName: string | null;
|
|
19
|
+
/** Live service colour; drives the event background. Null when unset. */
|
|
20
|
+
serviceColor: string | null;
|
|
21
|
+
status: SchedulingAppointmentStatus;
|
|
22
|
+
groupId: string | null;
|
|
23
|
+
requiresTwoStaffs: boolean;
|
|
24
|
+
durationMinutes: number;
|
|
25
|
+
durationSegments: AppointmentItemDurationSegmentDto[];
|
|
26
|
+
}
|
|
27
|
+
export interface CalendarFeedDto {
|
|
28
|
+
locationId: string;
|
|
29
|
+
from: string;
|
|
30
|
+
to: string;
|
|
31
|
+
occupancies: CalendarOccupancyDto[];
|
|
32
|
+
closures: LocationClosureDto[];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=calendar.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.dto.d.ts","sourceRoot":"","sources":["../../../src/api/calendar/calendar.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,KAAK,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE7G,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,yEAAyE;IACzE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,2BAA2B,CAAC;IACpC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,iCAAiC,EAAE,CAAC;CACvD;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,QAAQ,EAAE,kBAAkB,EAAE,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.dto.js","sourceRoot":"","sources":["../../../src/api/calendar/calendar.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/calendar/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./calendar.dto"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/calendar/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export * from './tax/index';
|
|
|
9
9
|
export * from './gst-number/index';
|
|
10
10
|
export * from './cancellation-reason';
|
|
11
11
|
export * from './location-closures/index';
|
|
12
|
+
export * from './appointments/index';
|
|
13
|
+
export * from './calendar/index';
|
|
12
14
|
export * from './location';
|
|
13
15
|
export * from './platform-terms';
|
|
14
16
|
export * from './user/index';
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC"}
|
package/dist/api/index.js
CHANGED
|
@@ -25,6 +25,8 @@ __exportStar(require("./tax/index"), exports);
|
|
|
25
25
|
__exportStar(require("./gst-number/index"), exports);
|
|
26
26
|
__exportStar(require("./cancellation-reason"), exports);
|
|
27
27
|
__exportStar(require("./location-closures/index"), exports);
|
|
28
|
+
__exportStar(require("./appointments/index"), exports);
|
|
29
|
+
__exportStar(require("./calendar/index"), exports);
|
|
28
30
|
__exportStar(require("./location"), exports);
|
|
29
31
|
__exportStar(require("./platform-terms"), exports);
|
|
30
32
|
__exportStar(require("./user/index"), exports);
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAqE;AACrE,0CAAwB;AACxB,4CAA0B;AAC1B,iDAA+B;AAC/B,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,8CAA4B;AAC5B,qDAAmC;AACnC,wDAAsC;AACtC,4DAA0C;AAC1C,6CAA2B;AAC3B,mDAAiC;AACjC,+CAA6B;AAC7B,2DAAyC;AACzC,oDAAkC;AAClC,gDAA8B;AAC9B,uDAAqC;AACrC,oDAAkC;AAClC,4DAA0C;AAC1C,6DAA2C;AAC3C,mDAAiC;AACjC,yDAAuC;AACvC,qDAAmC;AACnC,sDAAoC;AACpC,0DAAwC;AACxC,kDAAgC;AAChC,mDAAiC;AACjC,+DAA6C;AAC7C,qDAAmC;AACnC,6DAA2C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAqE;AACrE,0CAAwB;AACxB,4CAA0B;AAC1B,iDAA+B;AAC/B,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,8CAA4B;AAC5B,qDAAmC;AACnC,wDAAsC;AACtC,4DAA0C;AAC1C,uDAAqC;AACrC,mDAAiC;AACjC,6CAA2B;AAC3B,mDAAiC;AACjC,+CAA6B;AAC7B,2DAAyC;AACzC,oDAAkC;AAClC,gDAA8B;AAC9B,uDAAqC;AACrC,oDAAkC;AAClC,4DAA0C;AAC1C,6DAA2C;AAC3C,mDAAiC;AACjC,yDAAuC;AACvC,qDAAmC;AACnC,sDAAoC;AACpC,0DAAwC;AACxC,kDAAgC;AAChC,mDAAiC;AACjC,+DAA6C;AAC7C,qDAAmC;AACnC,6DAA2C"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Postgres appointment header status — distinct from legacy Firestore `AppointmentStatus` enum. */
|
|
2
|
+
export const SchedulingAppointmentStatus = {
|
|
3
|
+
NEW: 'new',
|
|
4
|
+
CONFIRMED: 'confirmed',
|
|
5
|
+
ARRIVED: 'arrived',
|
|
6
|
+
STARTED: 'started',
|
|
7
|
+
COMPLETED: 'completed',
|
|
8
|
+
CANCELLED: 'cancelled',
|
|
9
|
+
NO_SHOW: 'no_show',
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export type SchedulingAppointmentStatus =
|
|
13
|
+
(typeof SchedulingAppointmentStatus)[keyof typeof SchedulingAppointmentStatus];
|
|
14
|
+
|
|
15
|
+
/** Matches invoice client type: recorded = registered client. */
|
|
16
|
+
export const AppointmentClientType = {
|
|
17
|
+
WALK_IN: 'walk_in',
|
|
18
|
+
RECORDED: 'recorded',
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
export type AppointmentClientType =
|
|
22
|
+
(typeof AppointmentClientType)[keyof typeof AppointmentClientType];
|
|
23
|
+
|
|
24
|
+
export const AppointmentKind = {
|
|
25
|
+
BOOKING: 'booking',
|
|
26
|
+
} as const;
|
|
27
|
+
|
|
28
|
+
export type AppointmentKind = (typeof AppointmentKind)[keyof typeof AppointmentKind];
|
|
29
|
+
|
|
30
|
+
export const OccupancyStaffRole = {
|
|
31
|
+
PRIMARY: 'primary',
|
|
32
|
+
ASSISTANT: 'assistant',
|
|
33
|
+
} as const;
|
|
34
|
+
|
|
35
|
+
export type OccupancyStaffRole = (typeof OccupancyStaffRole)[keyof typeof OccupancyStaffRole];
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
import type { AuditActor } from '../audit';
|
|
3
|
+
import type {
|
|
4
|
+
AppointmentClientType,
|
|
5
|
+
AppointmentKind,
|
|
6
|
+
SchedulingAppointmentStatus,
|
|
7
|
+
OccupancyStaffRole,
|
|
8
|
+
} from './appointment.constants';
|
|
9
|
+
|
|
10
|
+
export interface AppointmentItemDurationSegmentDto {
|
|
11
|
+
id: string;
|
|
12
|
+
segmentType: string;
|
|
13
|
+
durationMinutes: number;
|
|
14
|
+
sortOrder: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface AppointmentItemDto {
|
|
18
|
+
id: string;
|
|
19
|
+
serviceId: string | null;
|
|
20
|
+
serviceVariantId: string | null;
|
|
21
|
+
comboId: string | null;
|
|
22
|
+
serviceName: string;
|
|
23
|
+
variantName: string | null;
|
|
24
|
+
comboName: string | null;
|
|
25
|
+
durationMinutes: number;
|
|
26
|
+
unitPrice: string;
|
|
27
|
+
priceType: string;
|
|
28
|
+
requiresTwoStaffs: boolean;
|
|
29
|
+
sortOrder: number;
|
|
30
|
+
status: SchedulingAppointmentStatus;
|
|
31
|
+
durationSegments: AppointmentItemDurationSegmentDto[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface AppointmentOccupancyDto {
|
|
35
|
+
id: string;
|
|
36
|
+
appointmentItemId: string;
|
|
37
|
+
staffId: string | null;
|
|
38
|
+
staffName: string | null;
|
|
39
|
+
resourceId: string | null;
|
|
40
|
+
resourceName: string | null;
|
|
41
|
+
staffRole: OccupancyStaffRole | null;
|
|
42
|
+
startAt: string;
|
|
43
|
+
endAt: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface AppointmentDetailDto {
|
|
47
|
+
id: string;
|
|
48
|
+
locationId: string;
|
|
49
|
+
locationName: string;
|
|
50
|
+
clientId: string | null;
|
|
51
|
+
clientType: AppointmentClientType;
|
|
52
|
+
clientDisplayName: string | null;
|
|
53
|
+
clientPhone: PhoneNumberModel | null;
|
|
54
|
+
clientPhoneE164: string | null;
|
|
55
|
+
clientEmail: string | null;
|
|
56
|
+
groupId: string | null;
|
|
57
|
+
kind: AppointmentKind;
|
|
58
|
+
status: SchedulingAppointmentStatus;
|
|
59
|
+
notes: string | null;
|
|
60
|
+
items: AppointmentItemDto[];
|
|
61
|
+
occupancies: AppointmentOccupancyDto[];
|
|
62
|
+
createdAt: string;
|
|
63
|
+
updatedAt: string | null;
|
|
64
|
+
createdBy: AuditActor | null;
|
|
65
|
+
updatedBy: AuditActor | null;
|
|
66
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
|
|
3
|
+
export interface BookAppointmentItemRequest {
|
|
4
|
+
serviceVariantId: string;
|
|
5
|
+
staffId: string;
|
|
6
|
+
staffId2?: string;
|
|
7
|
+
resourceId?: string;
|
|
8
|
+
startAt: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface BookAppointmentRequest {
|
|
12
|
+
locationId: string;
|
|
13
|
+
clientId?: string | null;
|
|
14
|
+
clientDisplayName?: string | null;
|
|
15
|
+
clientPhone?: PhoneNumberModel | null;
|
|
16
|
+
clientEmail?: string | null;
|
|
17
|
+
notes?: string | null;
|
|
18
|
+
items: BookAppointmentItemRequest[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { LocationClosureDto } from '../location-closures/location-closure.dto';
|
|
2
|
+
import type { AppointmentItemDurationSegmentDto } from '../appointments/appointment.dto';
|
|
3
|
+
import type { SchedulingAppointmentStatus, OccupancyStaffRole } from '../appointments/appointment.constants';
|
|
4
|
+
|
|
5
|
+
export interface CalendarOccupancyDto {
|
|
6
|
+
occupancyId: string;
|
|
7
|
+
appointmentId: string;
|
|
8
|
+
appointmentItemId: string;
|
|
9
|
+
locationId: string;
|
|
10
|
+
staffId: string | null;
|
|
11
|
+
staffName: string | null;
|
|
12
|
+
resourceId: string | null;
|
|
13
|
+
resourceName: string | null;
|
|
14
|
+
staffRole: OccupancyStaffRole | null;
|
|
15
|
+
startAt: string;
|
|
16
|
+
endAt: string;
|
|
17
|
+
clientDisplayName: string | null;
|
|
18
|
+
serviceName: string;
|
|
19
|
+
variantName: string | null;
|
|
20
|
+
/** Live service colour; drives the event background. Null when unset. */
|
|
21
|
+
serviceColor: string | null;
|
|
22
|
+
status: SchedulingAppointmentStatus;
|
|
23
|
+
groupId: string | null;
|
|
24
|
+
requiresTwoStaffs: boolean;
|
|
25
|
+
durationMinutes: number;
|
|
26
|
+
durationSegments: AppointmentItemDurationSegmentDto[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface CalendarFeedDto {
|
|
30
|
+
locationId: string;
|
|
31
|
+
from: string;
|
|
32
|
+
to: string;
|
|
33
|
+
occupancies: CalendarOccupancyDto[];
|
|
34
|
+
closures: LocationClosureDto[];
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './calendar.dto';
|
package/src/api/index.ts
CHANGED
|
@@ -9,6 +9,8 @@ export * from './tax/index';
|
|
|
9
9
|
export * from './gst-number/index';
|
|
10
10
|
export * from './cancellation-reason';
|
|
11
11
|
export * from './location-closures/index';
|
|
12
|
+
export * from './appointments/index';
|
|
13
|
+
export * from './calendar/index';
|
|
12
14
|
export * from './location';
|
|
13
15
|
export * from './platform-terms';
|
|
14
16
|
export * from './user/index';
|