@misalon/common 1.0.9 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,18 @@
1
+ import { Subjects } from "./subjects";
2
+ export interface AppointmentCreatedEvent {
3
+ subject: Subjects.AppointmentCreated;
4
+ data: {
5
+ id: string;
6
+ service: {
7
+ id: string;
8
+ name: string;
9
+ price: number;
10
+ duration: number;
11
+ };
12
+ userId: string;
13
+ date: string;
14
+ time: string;
15
+ status: string;
16
+ version: number;
17
+ };
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { Subjects } from "./subjects";
2
+ export interface AppointmentCancelledEvent {
3
+ subject: Subjects.AppointmentCancelled;
4
+ data: {
5
+ id: string;
6
+ service: {
7
+ id: string;
8
+ };
9
+ userId: string;
10
+ version: number;
11
+ };
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,6 @@
1
1
  export declare enum Subjects {
2
2
  ServiceCreated = "service:created",
3
- ServiceUpdated = "service:updated"
3
+ ServiceUpdated = "service:updated",
4
+ AppointmentCreated = "appointment:created",
5
+ AppointmentCancelled = "appointment:cancelled"
4
6
  }
@@ -5,4 +5,6 @@ var Subjects;
5
5
  (function (Subjects) {
6
6
  Subjects["ServiceCreated"] = "service:created";
7
7
  Subjects["ServiceUpdated"] = "service:updated";
8
+ Subjects["AppointmentCreated"] = "appointment:created";
9
+ Subjects["AppointmentCancelled"] = "appointment:cancelled";
8
10
  })(Subjects || (exports.Subjects = Subjects = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum AppointmentStatus {
2
+ Pending = "Pending",
3
+ Confirmed = "Confirmed",
4
+ Cancelled = "Cancelled"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppointmentStatus = void 0;
4
+ var AppointmentStatus;
5
+ (function (AppointmentStatus) {
6
+ AppointmentStatus["Pending"] = "Pending";
7
+ AppointmentStatus["Confirmed"] = "Confirmed";
8
+ AppointmentStatus["Cancelled"] = "Cancelled";
9
+ })(AppointmentStatus || (exports.AppointmentStatus = AppointmentStatus = {}));
package/build/index.d.ts CHANGED
@@ -14,4 +14,7 @@ export * from './events/base-publisher';
14
14
  export * from './events/subjects';
15
15
  export * from './events/salon-service-created-event';
16
16
  export * from './events/salon-service-updated-event';
17
+ export * from "./events/appointment--created-event";
18
+ export * from "./events/appointment-cancelled-event";
17
19
  export * from './events/type/service-category';
20
+ export * from './events/type/status';
package/build/index.js CHANGED
@@ -30,4 +30,7 @@ __exportStar(require("./events/base-publisher"), exports);
30
30
  __exportStar(require("./events/subjects"), exports);
31
31
  __exportStar(require("./events/salon-service-created-event"), exports);
32
32
  __exportStar(require("./events/salon-service-updated-event"), exports);
33
+ __exportStar(require("./events/appointment--created-event"), exports);
34
+ __exportStar(require("./events/appointment-cancelled-event"), exports);
33
35
  __exportStar(require("./events/type/service-category"), exports);
36
+ __exportStar(require("./events/type/status"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misalon/common",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [