@sendhome/common 1.0.20 → 1.0.22
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/build/events/publishers/recipient-created-event.d.ts +19 -0
- package/build/events/publishers/recipient-created-event.js +2 -0
- package/build/events/publishers/recipient-updated-event.d.ts +19 -0
- package/build/events/publishers/recipient-updated-event.js +2 -0
- package/build/events/subjects/subjects.d.ts +2 -0
- package/build/events/subjects/subjects.js +3 -0
- package/build/events/types/recipient-status.d.ts +5 -0
- package/build/events/types/recipient-status.js +12 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Subjects } from "../subjects/subjects";
|
|
2
|
+
import { RecipientStatus } from "../types/recipient-status";
|
|
3
|
+
export interface RecipientCreatedEvent {
|
|
4
|
+
subject: Subjects.RecipientCreated;
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
surname: string;
|
|
9
|
+
national_id: string;
|
|
10
|
+
email: string;
|
|
11
|
+
phone: string;
|
|
12
|
+
address: string;
|
|
13
|
+
status: RecipientStatus;
|
|
14
|
+
created_at: Date;
|
|
15
|
+
updated_at: Date;
|
|
16
|
+
user: string;
|
|
17
|
+
version: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Subjects } from "../subjects/subjects";
|
|
2
|
+
import { RecipientStatus } from "../types/recipient-status";
|
|
3
|
+
export interface RecipientUpdatedEvent {
|
|
4
|
+
subject: Subjects.RecipientUpdated;
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
surname: string;
|
|
9
|
+
national_id: string;
|
|
10
|
+
email: string;
|
|
11
|
+
phone: string;
|
|
12
|
+
address: string;
|
|
13
|
+
status: RecipientStatus;
|
|
14
|
+
created_at: Date;
|
|
15
|
+
updated_at: Date;
|
|
16
|
+
user: string;
|
|
17
|
+
version: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -6,6 +6,8 @@ export declare enum Subjects {
|
|
|
6
6
|
CompanyUpdated = "company:updated",
|
|
7
7
|
BranchCreated = "branch:created",
|
|
8
8
|
BranchUpdated = "branch:updated",
|
|
9
|
+
RecipientCreated = "recipient:created",
|
|
10
|
+
RecipientUpdated = "recipient:updated",
|
|
9
11
|
CategoryCreated = "category:created",
|
|
10
12
|
CategoryUpdated = "category:updated",
|
|
11
13
|
ProductCreated = "product:created",
|
|
@@ -13,6 +13,9 @@ var Subjects;
|
|
|
13
13
|
// branches
|
|
14
14
|
Subjects["BranchCreated"] = "branch:created";
|
|
15
15
|
Subjects["BranchUpdated"] = "branch:updated";
|
|
16
|
+
// recipient
|
|
17
|
+
Subjects["RecipientCreated"] = "recipient:created";
|
|
18
|
+
Subjects["RecipientUpdated"] = "recipient:updated";
|
|
16
19
|
// categories
|
|
17
20
|
Subjects["CategoryCreated"] = "category:created";
|
|
18
21
|
Subjects["CategoryUpdated"] = "category:updated";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecipientStatus = void 0;
|
|
4
|
+
var RecipientStatus;
|
|
5
|
+
(function (RecipientStatus) {
|
|
6
|
+
// recipient is active
|
|
7
|
+
RecipientStatus["Active"] = "active";
|
|
8
|
+
// recipient inactive
|
|
9
|
+
RecipientStatus["Inactive"] = "inactive";
|
|
10
|
+
// recipient deleted
|
|
11
|
+
RecipientStatus["Deleted"] = "deleted";
|
|
12
|
+
})(RecipientStatus = exports.RecipientStatus || (exports.RecipientStatus = {}));
|
package/build/index.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ export * from './events/publishers/order-created-event';
|
|
|
25
25
|
export * from './events/publishers/order-updated-event';
|
|
26
26
|
export * from './events/publishers/product-created-event';
|
|
27
27
|
export * from './events/publishers/product-updated-event';
|
|
28
|
+
export * from './events/publishers/recipient-created-event';
|
|
29
|
+
export * from './events/publishers/recipient-updated-event';
|
|
28
30
|
export * from './events/publishers/user-created-event';
|
|
29
31
|
export * from './events/publishers/user-updated-event';
|
|
30
32
|
export * from './events/types/branch-status';
|
|
@@ -35,5 +37,6 @@ export * from './events/types/company-status';
|
|
|
35
37
|
export * from './events/types/company-type';
|
|
36
38
|
export * from './events/types/order-status';
|
|
37
39
|
export * from './events/types/product-status';
|
|
40
|
+
export * from './events/types/recipient-status';
|
|
38
41
|
export * from './events/types/user-roles';
|
|
39
42
|
export * from './events/types/user-status';
|
package/build/index.js
CHANGED
|
@@ -38,6 +38,8 @@ __exportStar(require("./events/publishers/order-created-event"), exports);
|
|
|
38
38
|
__exportStar(require("./events/publishers/order-updated-event"), exports);
|
|
39
39
|
__exportStar(require("./events/publishers/product-created-event"), exports);
|
|
40
40
|
__exportStar(require("./events/publishers/product-updated-event"), exports);
|
|
41
|
+
__exportStar(require("./events/publishers/recipient-created-event"), exports);
|
|
42
|
+
__exportStar(require("./events/publishers/recipient-updated-event"), exports);
|
|
41
43
|
__exportStar(require("./events/publishers/user-created-event"), exports);
|
|
42
44
|
__exportStar(require("./events/publishers/user-updated-event"), exports);
|
|
43
45
|
__exportStar(require("./events/types/branch-status"), exports);
|
|
@@ -48,5 +50,6 @@ __exportStar(require("./events/types/company-status"), exports);
|
|
|
48
50
|
__exportStar(require("./events/types/company-type"), exports);
|
|
49
51
|
__exportStar(require("./events/types/order-status"), exports);
|
|
50
52
|
__exportStar(require("./events/types/product-status"), exports);
|
|
53
|
+
__exportStar(require("./events/types/recipient-status"), exports);
|
|
51
54
|
__exportStar(require("./events/types/user-roles"), exports);
|
|
52
55
|
__exportStar(require("./events/types/user-status"), exports);
|