@iveri/contracts 0.41.0 → 0.42.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-lead-kind.enum.d.ts +4 -0
- package/dist/api/clinic/clinic-lead-kind.enum.js +5 -0
- package/dist/api/clinic/clinic-lead-status.enum.d.ts +4 -0
- package/dist/api/clinic/clinic-lead-status.enum.js +5 -0
- package/dist/api/clinic/clinic-lead.type.d.ts +32 -0
- package/dist/api/clinic/clinic-lead.type.js +1 -0
- package/dist/api/clinic/clinic-my-appointment.type.d.ts +37 -0
- package/dist/api/clinic/clinic-my-appointment.type.js +1 -0
- package/dist/api/clinic/clinic-profile.type.d.ts +32 -0
- package/dist/api/clinic/clinic-profile.type.js +1 -0
- package/dist/api/clinic/clinic-public.type.d.ts +53 -0
- package/dist/api/clinic/clinic-public.type.js +1 -0
- package/dist/api/clinic/index.d.ts +6 -0
- package/dist/api/clinic/index.js +6 -0
- package/dist/enum/user-permission.enum.d.ts +5 -1
- package/dist/enum/user-permission.enum.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
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 { ClinicLeadKind } from './clinic-lead-kind.enum.js';
|
|
5
|
+
import type { ClinicLeadStatus } from './clinic-lead-status.enum.js';
|
|
6
|
+
/** Somebody who asked the clinic to call them back, or asked it something. */
|
|
7
|
+
export interface ClinicLead {
|
|
8
|
+
id: UUID;
|
|
9
|
+
kind: ClinicLeadKind;
|
|
10
|
+
status: ClinicLeadStatus;
|
|
11
|
+
name: string;
|
|
12
|
+
phone: string;
|
|
13
|
+
message: Nullable<string>;
|
|
14
|
+
locationId: Nullable<UUID>;
|
|
15
|
+
treatmentId: Nullable<UUID>;
|
|
16
|
+
/** When this person agreed to be contacted. A lead cannot exist without it. */
|
|
17
|
+
consentedAt: IsoDateTime;
|
|
18
|
+
handledAt: Nullable<IsoDateTime>;
|
|
19
|
+
createdAt: IsoDateTime;
|
|
20
|
+
}
|
|
21
|
+
export interface CreateClinicLeadRequest {
|
|
22
|
+
kind: ClinicLeadKind;
|
|
23
|
+
name: string;
|
|
24
|
+
phone: string;
|
|
25
|
+
message?: Nullable<string>;
|
|
26
|
+
locationId?: Nullable<UUID>;
|
|
27
|
+
treatmentId?: Nullable<UUID>;
|
|
28
|
+
hasPrivacyConsent: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface ChangeClinicLeadStatusRequest {
|
|
31
|
+
status: ClinicLeadStatus;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { ClinicAppointmentLine } from './clinic-appointment.type.js';
|
|
6
|
+
import type { LocalizedText } from './localized-text.type.js';
|
|
7
|
+
/** A client's own view of a booking, without the room and machine the clinic assigned. */
|
|
8
|
+
export interface MyClinicAppointment {
|
|
9
|
+
id: UUID;
|
|
10
|
+
locationId: UUID;
|
|
11
|
+
specialistName: string;
|
|
12
|
+
treatmentId: UUID;
|
|
13
|
+
treatmentName: LocalizedText;
|
|
14
|
+
status: ClinicAppointmentStatus;
|
|
15
|
+
startsAt: IsoDateTime;
|
|
16
|
+
endsAt: IsoDateTime;
|
|
17
|
+
currency: string;
|
|
18
|
+
totalMinor: number;
|
|
19
|
+
lines: ClinicAppointmentLine[];
|
|
20
|
+
note: Nullable<string>;
|
|
21
|
+
/** Whether the clinic's rules still let this client cancel it themselves. */
|
|
22
|
+
canCancel: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface BookMyClinicAppointmentRequest {
|
|
25
|
+
locationId: UUID;
|
|
26
|
+
treatmentId: UUID;
|
|
27
|
+
optionIds: UUID[];
|
|
28
|
+
staffMemberId: UUID;
|
|
29
|
+
startsAt: IsoDateTime;
|
|
30
|
+
note?: Nullable<string>;
|
|
31
|
+
}
|
|
32
|
+
export interface SaveMyClinicClientRequest {
|
|
33
|
+
firstName: string;
|
|
34
|
+
lastName: string;
|
|
35
|
+
phone: string;
|
|
36
|
+
email?: Nullable<string>;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { LocalizedText } from './localized-text.type.js';
|
|
5
|
+
/** How a clinic presents itself to the public, and the rules for booking online. */
|
|
6
|
+
export interface ClinicProfile {
|
|
7
|
+
id: UUID;
|
|
8
|
+
/** The name its public address and app build use. Unique across every clinic. */
|
|
9
|
+
slug: string;
|
|
10
|
+
name: LocalizedText;
|
|
11
|
+
tagline: Nullable<LocalizedText>;
|
|
12
|
+
phone: Nullable<string>;
|
|
13
|
+
email: Nullable<string>;
|
|
14
|
+
/** Nothing about the clinic is public until this is true. */
|
|
15
|
+
isPublished: boolean;
|
|
16
|
+
/** How long before a booking a client can still cancel it themselves. */
|
|
17
|
+
clientCancelCutoffHours: number;
|
|
18
|
+
/** How far ahead a client can book. */
|
|
19
|
+
bookingHorizonDays: number;
|
|
20
|
+
createdAt: IsoDateTime;
|
|
21
|
+
updatedAt: IsoDateTime;
|
|
22
|
+
}
|
|
23
|
+
export interface SaveClinicProfileRequest {
|
|
24
|
+
slug: string;
|
|
25
|
+
name: LocalizedText;
|
|
26
|
+
tagline?: Nullable<LocalizedText>;
|
|
27
|
+
phone?: Nullable<string>;
|
|
28
|
+
email?: Nullable<string>;
|
|
29
|
+
isPublished: boolean;
|
|
30
|
+
clientCancelCutoffHours: number;
|
|
31
|
+
bookingHorizonDays: number;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Nullable } from '../../type/nil.type.js';
|
|
2
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
3
|
+
import type { LocalizedText } from './localized-text.type.js';
|
|
4
|
+
/**
|
|
5
|
+
* What anybody on the internet may read.
|
|
6
|
+
*
|
|
7
|
+
* Declared apart from the staff shapes on purpose. A field added to one of those does not reach
|
|
8
|
+
* the public until somebody adds it here too.
|
|
9
|
+
*/
|
|
10
|
+
export interface PublicClinic {
|
|
11
|
+
slug: string;
|
|
12
|
+
name: LocalizedText;
|
|
13
|
+
tagline: Nullable<LocalizedText>;
|
|
14
|
+
phone: Nullable<string>;
|
|
15
|
+
email: Nullable<string>;
|
|
16
|
+
bookingHorizonDays: number;
|
|
17
|
+
}
|
|
18
|
+
export interface PublicSpecialty {
|
|
19
|
+
id: UUID;
|
|
20
|
+
slug: string;
|
|
21
|
+
name: LocalizedText;
|
|
22
|
+
}
|
|
23
|
+
export interface PublicBranch {
|
|
24
|
+
id: UUID;
|
|
25
|
+
name: LocalizedText;
|
|
26
|
+
city: LocalizedText;
|
|
27
|
+
address: Nullable<string>;
|
|
28
|
+
phone: Nullable<string>;
|
|
29
|
+
timeZone: string;
|
|
30
|
+
specialtyIds: UUID[];
|
|
31
|
+
}
|
|
32
|
+
export interface PublicTreatmentOption {
|
|
33
|
+
id: UUID;
|
|
34
|
+
name: LocalizedText;
|
|
35
|
+
durationMinutes: number;
|
|
36
|
+
priceMinor: number;
|
|
37
|
+
}
|
|
38
|
+
export interface PublicTreatment {
|
|
39
|
+
id: UUID;
|
|
40
|
+
specialtyId: UUID;
|
|
41
|
+
name: LocalizedText;
|
|
42
|
+
description: Nullable<LocalizedText>;
|
|
43
|
+
currency: string;
|
|
44
|
+
minDaysBetweenSessions: Nullable<number>;
|
|
45
|
+
isBookableOnline: boolean;
|
|
46
|
+
options: PublicTreatmentOption[];
|
|
47
|
+
}
|
|
48
|
+
export interface PublicSpecialist {
|
|
49
|
+
id: UUID;
|
|
50
|
+
displayName: string;
|
|
51
|
+
locationId: UUID;
|
|
52
|
+
treatmentIds: UUID[];
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,7 +2,13 @@ export * from './clinic-appointment-status.enum.js';
|
|
|
2
2
|
export * from './clinic-appointment.type.js';
|
|
3
3
|
export * from './clinic-client.type.js';
|
|
4
4
|
export * from './clinic-device.type.js';
|
|
5
|
+
export * from './clinic-lead-kind.enum.js';
|
|
6
|
+
export * from './clinic-lead-status.enum.js';
|
|
7
|
+
export * from './clinic-lead.type.js';
|
|
5
8
|
export * from './clinic-location.type.js';
|
|
9
|
+
export * from './clinic-my-appointment.type.js';
|
|
10
|
+
export * from './clinic-profile.type.js';
|
|
11
|
+
export * from './clinic-public.type.js';
|
|
6
12
|
export * from './clinic-resource-status.enum.js';
|
|
7
13
|
export * from './clinic-room.type.js';
|
|
8
14
|
export * from './clinic-slot.type.js';
|
package/dist/api/clinic/index.js
CHANGED
|
@@ -2,7 +2,13 @@ export * from './clinic-appointment-status.enum.js';
|
|
|
2
2
|
export * from './clinic-appointment.type.js';
|
|
3
3
|
export * from './clinic-client.type.js';
|
|
4
4
|
export * from './clinic-device.type.js';
|
|
5
|
+
export * from './clinic-lead-kind.enum.js';
|
|
6
|
+
export * from './clinic-lead-status.enum.js';
|
|
7
|
+
export * from './clinic-lead.type.js';
|
|
5
8
|
export * from './clinic-location.type.js';
|
|
9
|
+
export * from './clinic-my-appointment.type.js';
|
|
10
|
+
export * from './clinic-profile.type.js';
|
|
11
|
+
export * from './clinic-public.type.js';
|
|
6
12
|
export * from './clinic-resource-status.enum.js';
|
|
7
13
|
export * from './clinic-room.type.js';
|
|
8
14
|
export * from './clinic-slot.type.js';
|
|
@@ -442,7 +442,11 @@ export declare enum UserPermission {
|
|
|
442
442
|
/** Read a clinic's clients. */
|
|
443
443
|
CLINIC_CLIENT_READ = "clinic:client:read",
|
|
444
444
|
/** Create and change a clinic's clients. */
|
|
445
|
-
CLINIC_CLIENT_MANAGE = "clinic:client:manage"
|
|
445
|
+
CLINIC_CLIENT_MANAGE = "clinic:client:manage",
|
|
446
|
+
/** Read callback requests and questions sent from a clinic's website or app. */
|
|
447
|
+
CLINIC_LEAD_READ = "clinic:lead:read",
|
|
448
|
+
/** Mark those requests as handled. */
|
|
449
|
+
CLINIC_LEAD_MANAGE = "clinic:lead:manage"
|
|
446
450
|
}
|
|
447
451
|
/**
|
|
448
452
|
* Every member, for seeding the owner role and validating custom-role input.
|
|
@@ -505,6 +505,10 @@ export var UserPermission;
|
|
|
505
505
|
UserPermission["CLINIC_CLIENT_READ"] = "clinic:client:read";
|
|
506
506
|
/** Create and change a clinic's clients. */
|
|
507
507
|
UserPermission["CLINIC_CLIENT_MANAGE"] = "clinic:client:manage";
|
|
508
|
+
/** Read callback requests and questions sent from a clinic's website or app. */
|
|
509
|
+
UserPermission["CLINIC_LEAD_READ"] = "clinic:lead:read";
|
|
510
|
+
/** Mark those requests as handled. */
|
|
511
|
+
UserPermission["CLINIC_LEAD_MANAGE"] = "clinic:lead:manage";
|
|
508
512
|
})(UserPermission || (UserPermission = {}));
|
|
509
513
|
/**
|
|
510
514
|
* Every member, for seeding the owner role and validating custom-role input.
|