kcommons 5.16.16 → 5.17.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/build/index.d.ts +2 -0
- package/build/index.js +3 -0
- package/build/templates/notifications/rfq.notifications.d.ts +2 -0
- package/build/templates/notifications/rfq.notifications.js +12 -0
- package/build/typings/notifications.typings.d.ts +65 -0
- package/build/typings/notifications.typings.js +20 -0
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * from "./typings/common/paginationFilters.typings";
|
|
|
33
33
|
export * from "./typings/common/uploadMedia.typings";
|
|
34
34
|
export * from "./typings/common/retrieveMedia.typings";
|
|
35
35
|
export * from "./typings/quote.typings";
|
|
36
|
+
export * from "./typings/notifications.typings";
|
|
36
37
|
export * from "./constants/permission.constants";
|
|
37
38
|
export * from "./constants/entityTypes.constants";
|
|
38
39
|
export * from "./constants/documentStatus.typings";
|
|
@@ -40,3 +41,4 @@ export * from "./constants/form.constants";
|
|
|
40
41
|
export * from "./constants/upload.constants";
|
|
41
42
|
export * from "./classes/asnWrapper.class";
|
|
42
43
|
export * from "./utils/permission.utils";
|
|
44
|
+
export * from "./templates/notifications/rfq.notifications";
|
package/build/index.js
CHANGED
|
@@ -50,6 +50,7 @@ __exportStar(require("./typings/common/paginationFilters.typings"), exports);
|
|
|
50
50
|
__exportStar(require("./typings/common/uploadMedia.typings"), exports);
|
|
51
51
|
__exportStar(require("./typings/common/retrieveMedia.typings"), exports);
|
|
52
52
|
__exportStar(require("./typings/quote.typings"), exports);
|
|
53
|
+
__exportStar(require("./typings/notifications.typings"), exports);
|
|
53
54
|
// Constants
|
|
54
55
|
__exportStar(require("./constants/permission.constants"), exports);
|
|
55
56
|
__exportStar(require("./constants/entityTypes.constants"), exports);
|
|
@@ -60,3 +61,5 @@ __exportStar(require("./constants/upload.constants"), exports);
|
|
|
60
61
|
__exportStar(require("./classes/asnWrapper.class"), exports);
|
|
61
62
|
// Utils
|
|
62
63
|
__exportStar(require("./utils/permission.utils"), exports);
|
|
64
|
+
// Templates
|
|
65
|
+
__exportStar(require("./templates/notifications/rfq.notifications"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RFQ_NOTIFICATION_TEMPLATES = void 0;
|
|
4
|
+
exports.RFQ_NOTIFICATION_TEMPLATES = {
|
|
5
|
+
chanceForApproval: ({ rfq_id, rfq_no, }) => {
|
|
6
|
+
return {
|
|
7
|
+
actionLink: `/purchase/request-for-requisition/${rfq_id}`,
|
|
8
|
+
message: `Please approve the RFQ ${rfq_no}`,
|
|
9
|
+
title: "RFQ Approval",
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { EntityTypes } from "../constants/entityTypes.constants";
|
|
2
|
+
import { IPERMISSION_ENTITIES, PERMISSION_ACTIONS } from "../constants/permission.constants";
|
|
3
|
+
import { INestedCompany } from "./company.typings";
|
|
4
|
+
import { INestedUser } from "./user.typings";
|
|
5
|
+
import { INestedVendor } from "./vendor.typings";
|
|
6
|
+
export interface INotificationsPayload {
|
|
7
|
+
}
|
|
8
|
+
export declare enum NOTIFICATION_INCLUDE {
|
|
9
|
+
company = "company",
|
|
10
|
+
user = "user",
|
|
11
|
+
vendor = "vendor"
|
|
12
|
+
}
|
|
13
|
+
export interface INotification {
|
|
14
|
+
id: string;
|
|
15
|
+
company_id: string;
|
|
16
|
+
user_id: string | null;
|
|
17
|
+
vendor_id: string | null;
|
|
18
|
+
category: string;
|
|
19
|
+
read: boolean;
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
action_link: string | null;
|
|
23
|
+
company: INestedCompany | null;
|
|
24
|
+
user: INestedUser | null;
|
|
25
|
+
vendor: INestedVendor | null;
|
|
26
|
+
}
|
|
27
|
+
export interface INestedNotificationEntity {
|
|
28
|
+
}
|
|
29
|
+
export declare enum NOTIFICAITON_CATEGORIES {
|
|
30
|
+
INDIVIDUAL = "INDIVIDUAL",
|
|
31
|
+
GROUP = "GROUP"
|
|
32
|
+
}
|
|
33
|
+
export declare enum GROUP_NOTIFICATION_TYPES {
|
|
34
|
+
ENTITY_DEPENDENT = "ENTITY_DEPENDENT",
|
|
35
|
+
PRIVILEGE_DEPENDENT = "PRIVILEGE_DEPENDENT",
|
|
36
|
+
ENTITY_PRIVILEGE_DEPENDENT = "ENTITY_PRIVILEGE_DEPENDENT"
|
|
37
|
+
}
|
|
38
|
+
export interface IEntityDependentNotificaiton {
|
|
39
|
+
type: GROUP_NOTIFICATION_TYPES.ENTITY_DEPENDENT;
|
|
40
|
+
entity_type: EntityTypes;
|
|
41
|
+
entity_id: string;
|
|
42
|
+
}
|
|
43
|
+
export interface IPrivilegeDependentNotifications {
|
|
44
|
+
type: GROUP_NOTIFICATION_TYPES.PRIVILEGE_DEPENDENT;
|
|
45
|
+
permission_entity: IPERMISSION_ENTITIES;
|
|
46
|
+
actions: PERMISSION_ACTIONS[];
|
|
47
|
+
}
|
|
48
|
+
export interface IEntityAndPrivilegeDependentNotifications {
|
|
49
|
+
type: GROUP_NOTIFICATION_TYPES.ENTITY_PRIVILEGE_DEPENDENT;
|
|
50
|
+
entity_type: EntityTypes;
|
|
51
|
+
entity_id: string;
|
|
52
|
+
permission_entity: IPERMISSION_ENTITIES;
|
|
53
|
+
actions: PERMISSION_ACTIONS[];
|
|
54
|
+
}
|
|
55
|
+
export type IGroupNotification = IEntityAndPrivilegeDependentNotifications | IPrivilegeDependentNotifications | IEntityAndPrivilegeDependentNotifications;
|
|
56
|
+
export interface IIndividualNotification {
|
|
57
|
+
user_id: string;
|
|
58
|
+
vendor_id: string;
|
|
59
|
+
}
|
|
60
|
+
export type INotificationType = IIndividualNotification | IGroupNotification;
|
|
61
|
+
export interface INotificationTemplate {
|
|
62
|
+
title: string;
|
|
63
|
+
message: string;
|
|
64
|
+
actionLink: string;
|
|
65
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GROUP_NOTIFICATION_TYPES = exports.NOTIFICAITON_CATEGORIES = exports.NOTIFICATION_INCLUDE = void 0;
|
|
4
|
+
var NOTIFICATION_INCLUDE;
|
|
5
|
+
(function (NOTIFICATION_INCLUDE) {
|
|
6
|
+
NOTIFICATION_INCLUDE["company"] = "company";
|
|
7
|
+
NOTIFICATION_INCLUDE["user"] = "user";
|
|
8
|
+
NOTIFICATION_INCLUDE["vendor"] = "vendor";
|
|
9
|
+
})(NOTIFICATION_INCLUDE || (exports.NOTIFICATION_INCLUDE = NOTIFICATION_INCLUDE = {}));
|
|
10
|
+
var NOTIFICAITON_CATEGORIES;
|
|
11
|
+
(function (NOTIFICAITON_CATEGORIES) {
|
|
12
|
+
NOTIFICAITON_CATEGORIES["INDIVIDUAL"] = "INDIVIDUAL";
|
|
13
|
+
NOTIFICAITON_CATEGORIES["GROUP"] = "GROUP";
|
|
14
|
+
})(NOTIFICAITON_CATEGORIES || (exports.NOTIFICAITON_CATEGORIES = NOTIFICAITON_CATEGORIES = {}));
|
|
15
|
+
var GROUP_NOTIFICATION_TYPES;
|
|
16
|
+
(function (GROUP_NOTIFICATION_TYPES) {
|
|
17
|
+
GROUP_NOTIFICATION_TYPES["ENTITY_DEPENDENT"] = "ENTITY_DEPENDENT";
|
|
18
|
+
GROUP_NOTIFICATION_TYPES["PRIVILEGE_DEPENDENT"] = "PRIVILEGE_DEPENDENT";
|
|
19
|
+
GROUP_NOTIFICATION_TYPES["ENTITY_PRIVILEGE_DEPENDENT"] = "ENTITY_PRIVILEGE_DEPENDENT";
|
|
20
|
+
})(GROUP_NOTIFICATION_TYPES || (exports.GROUP_NOTIFICATION_TYPES = GROUP_NOTIFICATION_TYPES = {}));
|