@iveri/contracts 0.40.0 → 0.41.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/api/clinic/clinic-appointment-status.enum.d.ts +7 -0
- package/dist/api/clinic/clinic-appointment-status.enum.js +8 -0
- package/dist/api/clinic/clinic-appointment.type.d.ts +48 -0
- package/dist/api/clinic/clinic-appointment.type.js +1 -0
- package/dist/api/clinic/clinic-client.type.d.ts +25 -0
- package/dist/api/clinic/clinic-client.type.js +1 -0
- package/dist/api/clinic/clinic-slot.type.d.ts +9 -0
- package/dist/api/clinic/clinic-slot.type.js +1 -0
- package/dist/api/clinic/index.d.ts +4 -0
- package/dist/api/clinic/index.js +4 -0
- package/dist/enum/user-permission.enum.d.ts +9 -1
- package/dist/enum/user-permission.enum.js +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var ClinicAppointmentStatus;
|
|
2
|
+
(function (ClinicAppointmentStatus) {
|
|
3
|
+
ClinicAppointmentStatus["BOOKED"] = "booked";
|
|
4
|
+
ClinicAppointmentStatus["CHECKED_IN"] = "checked-in";
|
|
5
|
+
ClinicAppointmentStatus["COMPLETED"] = "completed";
|
|
6
|
+
ClinicAppointmentStatus["CANCELLED"] = "cancelled";
|
|
7
|
+
ClinicAppointmentStatus["NO_SHOW"] = "no-show";
|
|
8
|
+
})(ClinicAppointmentStatus || (ClinicAppointmentStatus = {}));
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { IsoDateTime } from '../../type/iso-date-time.type.js';
|
|
2
|
+
import type { Nullable } from '../../type/nil.type.js';
|
|
3
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
4
|
+
import type { ClinicAppointmentStatus } from './clinic-appointment-status.enum.js';
|
|
5
|
+
import type { LocalizedText } from './localized-text.type.js';
|
|
6
|
+
/** One option as it was when the appointment was booked. A later price change does not touch it. */
|
|
7
|
+
export interface ClinicAppointmentLine {
|
|
8
|
+
optionId: UUID;
|
|
9
|
+
name: LocalizedText;
|
|
10
|
+
durationMinutes: number;
|
|
11
|
+
priceMinor: number;
|
|
12
|
+
}
|
|
13
|
+
export interface ClinicAppointment {
|
|
14
|
+
id: UUID;
|
|
15
|
+
locationId: UUID;
|
|
16
|
+
staffMemberId: UUID;
|
|
17
|
+
roomId: UUID;
|
|
18
|
+
deviceId: Nullable<UUID>;
|
|
19
|
+
clientId: UUID;
|
|
20
|
+
clientName: string;
|
|
21
|
+
clientPhone: string;
|
|
22
|
+
treatmentId: UUID;
|
|
23
|
+
treatmentName: LocalizedText;
|
|
24
|
+
status: ClinicAppointmentStatus;
|
|
25
|
+
startsAt: IsoDateTime;
|
|
26
|
+
/** When the treatment itself finishes. */
|
|
27
|
+
endsAt: IsoDateTime;
|
|
28
|
+
/** When the specialist, the room and any machine are free again, which includes the buffer. */
|
|
29
|
+
blockedUntil: IsoDateTime;
|
|
30
|
+
currency: string;
|
|
31
|
+
totalMinor: number;
|
|
32
|
+
lines: ClinicAppointmentLine[];
|
|
33
|
+
note: Nullable<string>;
|
|
34
|
+
createdAt: IsoDateTime;
|
|
35
|
+
updatedAt: IsoDateTime;
|
|
36
|
+
}
|
|
37
|
+
export interface CreateClinicAppointmentRequest {
|
|
38
|
+
locationId: UUID;
|
|
39
|
+
treatmentId: UUID;
|
|
40
|
+
optionIds: UUID[];
|
|
41
|
+
staffMemberId: UUID;
|
|
42
|
+
clientId: UUID;
|
|
43
|
+
startsAt: IsoDateTime;
|
|
44
|
+
note?: Nullable<string>;
|
|
45
|
+
}
|
|
46
|
+
export interface ChangeClinicAppointmentStatusRequest {
|
|
47
|
+
status: ClinicAppointmentStatus;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IsoDateTime } from '../../type/iso-date-time.type.js';
|
|
2
|
+
import type { Nullable } from '../../type/nil.type.js';
|
|
3
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
4
|
+
/** Somebody the clinic treats. They need no account to be booked by reception. */
|
|
5
|
+
export interface ClinicClient {
|
|
6
|
+
id: UUID;
|
|
7
|
+
firstName: string;
|
|
8
|
+
lastName: string;
|
|
9
|
+
phone: string;
|
|
10
|
+
email: Nullable<string>;
|
|
11
|
+
createdAt: IsoDateTime;
|
|
12
|
+
updatedAt: IsoDateTime;
|
|
13
|
+
}
|
|
14
|
+
export interface CreateClinicClientRequest {
|
|
15
|
+
firstName: string;
|
|
16
|
+
lastName: string;
|
|
17
|
+
phone: string;
|
|
18
|
+
email?: Nullable<string>;
|
|
19
|
+
}
|
|
20
|
+
export interface UpdateClinicClientRequest {
|
|
21
|
+
firstName?: string;
|
|
22
|
+
lastName?: string;
|
|
23
|
+
phone?: string;
|
|
24
|
+
email?: Nullable<string>;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IsoDateTime } from '../../type/iso-date-time.type.js';
|
|
2
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
3
|
+
/** A time one specialist can start this treatment, with a room and any machine free for all of it. */
|
|
4
|
+
export interface ClinicSlot {
|
|
5
|
+
staffMemberId: UUID;
|
|
6
|
+
startsAt: IsoDateTime;
|
|
7
|
+
/** When the treatment itself finishes, without the buffer after it. */
|
|
8
|
+
endsAt: IsoDateTime;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
export * from './clinic-appointment-status.enum.js';
|
|
2
|
+
export * from './clinic-appointment.type.js';
|
|
3
|
+
export * from './clinic-client.type.js';
|
|
1
4
|
export * from './clinic-device.type.js';
|
|
2
5
|
export * from './clinic-location.type.js';
|
|
3
6
|
export * from './clinic-resource-status.enum.js';
|
|
4
7
|
export * from './clinic-room.type.js';
|
|
8
|
+
export * from './clinic-slot.type.js';
|
|
5
9
|
export * from './clinic-specialty.type.js';
|
|
6
10
|
export * from './clinic-staff.type.js';
|
|
7
11
|
export * from './clinic-treatment.type.js';
|
package/dist/api/clinic/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
export * from './clinic-appointment-status.enum.js';
|
|
2
|
+
export * from './clinic-appointment.type.js';
|
|
3
|
+
export * from './clinic-client.type.js';
|
|
1
4
|
export * from './clinic-device.type.js';
|
|
2
5
|
export * from './clinic-location.type.js';
|
|
3
6
|
export * from './clinic-resource-status.enum.js';
|
|
4
7
|
export * from './clinic-room.type.js';
|
|
8
|
+
export * from './clinic-slot.type.js';
|
|
5
9
|
export * from './clinic-specialty.type.js';
|
|
6
10
|
export * from './clinic-staff.type.js';
|
|
7
11
|
export * from './clinic-treatment.type.js';
|
|
@@ -434,7 +434,15 @@ export declare enum UserPermission {
|
|
|
434
434
|
/** Read a clinic's specialties, locations, rooms, devices, treatments and staff. */
|
|
435
435
|
CLINIC_SETUP_READ = "clinic:setup:read",
|
|
436
436
|
/** Create and change them, including staff working hours. */
|
|
437
|
-
CLINIC_SETUP_MANAGE = "clinic:setup:manage"
|
|
437
|
+
CLINIC_SETUP_MANAGE = "clinic:setup:manage",
|
|
438
|
+
/** Read the appointment calendar and search for free slots. */
|
|
439
|
+
CLINIC_APPOINTMENT_READ = "clinic:appointment:read",
|
|
440
|
+
/** Book appointments and move them through their statuses. */
|
|
441
|
+
CLINIC_APPOINTMENT_MANAGE = "clinic:appointment:manage",
|
|
442
|
+
/** Read a clinic's clients. */
|
|
443
|
+
CLINIC_CLIENT_READ = "clinic:client:read",
|
|
444
|
+
/** Create and change a clinic's clients. */
|
|
445
|
+
CLINIC_CLIENT_MANAGE = "clinic:client:manage"
|
|
438
446
|
}
|
|
439
447
|
/**
|
|
440
448
|
* Every member, for seeding the owner role and validating custom-role input.
|
|
@@ -497,6 +497,14 @@ export var UserPermission;
|
|
|
497
497
|
UserPermission["CLINIC_SETUP_READ"] = "clinic:setup:read";
|
|
498
498
|
/** Create and change them, including staff working hours. */
|
|
499
499
|
UserPermission["CLINIC_SETUP_MANAGE"] = "clinic:setup:manage";
|
|
500
|
+
/** Read the appointment calendar and search for free slots. */
|
|
501
|
+
UserPermission["CLINIC_APPOINTMENT_READ"] = "clinic:appointment:read";
|
|
502
|
+
/** Book appointments and move them through their statuses. */
|
|
503
|
+
UserPermission["CLINIC_APPOINTMENT_MANAGE"] = "clinic:appointment:manage";
|
|
504
|
+
/** Read a clinic's clients. */
|
|
505
|
+
UserPermission["CLINIC_CLIENT_READ"] = "clinic:client:read";
|
|
506
|
+
/** Create and change a clinic's clients. */
|
|
507
|
+
UserPermission["CLINIC_CLIENT_MANAGE"] = "clinic:client:manage";
|
|
500
508
|
})(UserPermission || (UserPermission = {}));
|
|
501
509
|
/**
|
|
502
510
|
* Every member, for seeding the owner role and validating custom-role input.
|