@iveri/contracts 0.44.0 → 0.45.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.
@@ -22,6 +22,8 @@ export interface MyClinicAppointment {
22
22
  note: Nullable<string>;
23
23
  /** Whether the clinic's rules still let this client cancel it themselves. */
24
24
  canCancel: boolean;
25
+ /** Whether this visit is over and has not been reviewed yet. */
26
+ canReview: boolean;
25
27
  }
26
28
  export interface BookMyClinicAppointmentRequest {
27
29
  locationId: UUID;
@@ -1,3 +1,4 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
1
2
  import type { Nullable } from '../../type/nil.type.js';
2
3
  import type { UUID } from '../../type/uuid.type.js';
3
4
  import type { LocalizedText } from './localized-text.type.js';
@@ -75,3 +76,21 @@ export interface PublicPromotion {
75
76
  treatmentIds: UUID[];
76
77
  locationIds: UUID[];
77
78
  }
79
+ /** A published review. It names a client only if they agreed, and otherwise `authorName` is null. */
80
+ export interface PublicReview {
81
+ id: UUID;
82
+ rating: number;
83
+ comment: Nullable<string>;
84
+ authorName: Nullable<string>;
85
+ treatmentId: UUID;
86
+ treatmentName: LocalizedText;
87
+ staffMemberId: UUID;
88
+ specialistName: string;
89
+ createdAt: IsoDateTime;
90
+ }
91
+ /** The newest published reviews, and what all of those matching the filter add up to. */
92
+ export interface PublicReviewList {
93
+ averageRating: Nullable<number>;
94
+ count: number;
95
+ items: PublicReview[];
96
+ }
@@ -0,0 +1,6 @@
1
+ /** Where a client's review stands. Nothing reaches the public until somebody has read it. */
2
+ export declare enum ClinicReviewStatus {
3
+ PENDING = "pending",
4
+ PUBLISHED = "published",
5
+ HIDDEN = "hidden"
6
+ }
@@ -0,0 +1,7 @@
1
+ /** Where a client's review stands. Nothing reaches the public until somebody has read it. */
2
+ export var ClinicReviewStatus;
3
+ (function (ClinicReviewStatus) {
4
+ ClinicReviewStatus["PENDING"] = "pending";
5
+ ClinicReviewStatus["PUBLISHED"] = "published";
6
+ ClinicReviewStatus["HIDDEN"] = "hidden";
7
+ })(ClinicReviewStatus || (ClinicReviewStatus = {}));
@@ -0,0 +1,30 @@
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 { ClinicReviewStatus } from './clinic-review-status.enum.js';
5
+ import type { LocalizedText } from './localized-text.type.js';
6
+ /** A client's review of a visit they actually had, as the clinic's staff read it. */
7
+ export interface ClinicReview {
8
+ id: UUID;
9
+ appointmentId: UUID;
10
+ clientName: string;
11
+ treatmentId: UUID;
12
+ treatmentName: LocalizedText;
13
+ staffMemberId: UUID;
14
+ specialistName: string;
15
+ locationId: UUID;
16
+ rating: number;
17
+ comment: Nullable<string>;
18
+ /** Whether the client agreed to be named once this is published. */
19
+ isNamePublic: boolean;
20
+ status: ClinicReviewStatus;
21
+ createdAt: IsoDateTime;
22
+ }
23
+ export interface ChangeClinicReviewStatusRequest {
24
+ status: ClinicReviewStatus;
25
+ }
26
+ export interface SubmitClinicReviewRequest {
27
+ rating: number;
28
+ comment?: Nullable<string>;
29
+ isNamePublic: boolean;
30
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -11,6 +11,8 @@ export * from './clinic-profile.type.js';
11
11
  export * from './clinic-promotion.type.js';
12
12
  export * from './clinic-public.type.js';
13
13
  export * from './clinic-resource-status.enum.js';
14
+ export * from './clinic-review-status.enum.js';
15
+ export * from './clinic-review.type.js';
14
16
  export * from './clinic-room.type.js';
15
17
  export * from './clinic-slot.type.js';
16
18
  export * from './clinic-specialty.type.js';
@@ -11,6 +11,8 @@ export * from './clinic-profile.type.js';
11
11
  export * from './clinic-promotion.type.js';
12
12
  export * from './clinic-public.type.js';
13
13
  export * from './clinic-resource-status.enum.js';
14
+ export * from './clinic-review-status.enum.js';
15
+ export * from './clinic-review.type.js';
14
16
  export * from './clinic-room.type.js';
15
17
  export * from './clinic-slot.type.js';
16
18
  export * from './clinic-specialty.type.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.44.0",
3
+ "version": "0.45.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {