grm-shared-library 1.1.181 → 1.1.182

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.
Files changed (94) hide show
  1. package/dist/cjs/index.js +1 -0
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/modules/notification/enums/email-provider-name.enum.js +15 -0
  4. package/dist/cjs/modules/notification/enums/email-provider-name.enum.js.map +1 -0
  5. package/dist/cjs/modules/notification/enums/notification-channel.enum.js +15 -0
  6. package/dist/cjs/modules/notification/enums/notification-channel.enum.js.map +1 -0
  7. package/dist/cjs/modules/notification/enums/notification-overall-status.enum.js +16 -0
  8. package/dist/cjs/modules/notification/enums/notification-overall-status.enum.js.map +1 -0
  9. package/dist/cjs/modules/notification/enums/provider-failure-reason.enum.js +28 -0
  10. package/dist/cjs/modules/notification/enums/provider-failure-reason.enum.js.map +1 -0
  11. package/dist/cjs/modules/notification/enums/sms-provider-name.enum.js +14 -0
  12. package/dist/cjs/modules/notification/enums/sms-provider-name.enum.js.map +1 -0
  13. package/dist/cjs/modules/notification/index.js +32 -0
  14. package/dist/cjs/modules/notification/index.js.map +1 -0
  15. package/dist/cjs/modules/notification/interfaces/email-send-request.js +3 -0
  16. package/dist/cjs/modules/notification/interfaces/email-send-request.js.map +1 -0
  17. package/dist/cjs/modules/notification/interfaces/email-send-result.js +3 -0
  18. package/dist/cjs/modules/notification/interfaces/email-send-result.js.map +1 -0
  19. package/dist/cjs/modules/notification/interfaces/notification-dispatch-result.js +3 -0
  20. package/dist/cjs/modules/notification/interfaces/notification-dispatch-result.js.map +1 -0
  21. package/dist/cjs/modules/notification/interfaces/per-channel-result.js +3 -0
  22. package/dist/cjs/modules/notification/interfaces/per-channel-result.js.map +1 -0
  23. package/dist/cjs/modules/notification/interfaces/provider-attempt.js +3 -0
  24. package/dist/cjs/modules/notification/interfaces/provider-attempt.js.map +1 -0
  25. package/dist/cjs/modules/notification/interfaces/sms-send-request.js +3 -0
  26. package/dist/cjs/modules/notification/interfaces/sms-send-request.js.map +1 -0
  27. package/dist/cjs/modules/notification/interfaces/sms-send-result.js +3 -0
  28. package/dist/cjs/modules/notification/interfaces/sms-send-result.js.map +1 -0
  29. package/dist/cjs/modules/permission/data/permissions.data.js +66 -0
  30. package/dist/cjs/modules/permission/data/permissions.data.js.map +1 -1
  31. package/dist/cjs/modules/permission/enums/permission-actions.enum.js +58 -0
  32. package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
  33. package/dist/cjs/modules/permission/enums/permissions-module.enum.js +2 -0
  34. package/dist/cjs/modules/permission/enums/permissions-module.enum.js.map +1 -1
  35. package/dist/cjs/modules/role/constants/roles-by-scope.js +3 -1
  36. package/dist/cjs/modules/role/constants/roles-by-scope.js.map +1 -1
  37. package/dist/cjs/modules/role/enums/role.enum.js +2 -0
  38. package/dist/cjs/modules/role/enums/role.enum.js.map +1 -1
  39. package/dist/esm/index.js +1 -0
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/modules/notification/enums/email-provider-name.enum.js +12 -0
  42. package/dist/esm/modules/notification/enums/email-provider-name.enum.js.map +1 -0
  43. package/dist/esm/modules/notification/enums/notification-channel.enum.js +12 -0
  44. package/dist/esm/modules/notification/enums/notification-channel.enum.js.map +1 -0
  45. package/dist/esm/modules/notification/enums/notification-overall-status.enum.js +13 -0
  46. package/dist/esm/modules/notification/enums/notification-overall-status.enum.js.map +1 -0
  47. package/dist/esm/modules/notification/enums/provider-failure-reason.enum.js +25 -0
  48. package/dist/esm/modules/notification/enums/provider-failure-reason.enum.js.map +1 -0
  49. package/dist/esm/modules/notification/enums/sms-provider-name.enum.js +11 -0
  50. package/dist/esm/modules/notification/enums/sms-provider-name.enum.js.map +1 -0
  51. package/dist/esm/modules/notification/index.js +16 -0
  52. package/dist/esm/modules/notification/index.js.map +1 -0
  53. package/dist/esm/modules/notification/interfaces/email-send-request.js +2 -0
  54. package/dist/esm/modules/notification/interfaces/email-send-request.js.map +1 -0
  55. package/dist/esm/modules/notification/interfaces/email-send-result.js +2 -0
  56. package/dist/esm/modules/notification/interfaces/email-send-result.js.map +1 -0
  57. package/dist/esm/modules/notification/interfaces/notification-dispatch-result.js +2 -0
  58. package/dist/esm/modules/notification/interfaces/notification-dispatch-result.js.map +1 -0
  59. package/dist/esm/modules/notification/interfaces/per-channel-result.js +2 -0
  60. package/dist/esm/modules/notification/interfaces/per-channel-result.js.map +1 -0
  61. package/dist/esm/modules/notification/interfaces/provider-attempt.js +2 -0
  62. package/dist/esm/modules/notification/interfaces/provider-attempt.js.map +1 -0
  63. package/dist/esm/modules/notification/interfaces/sms-send-request.js +2 -0
  64. package/dist/esm/modules/notification/interfaces/sms-send-request.js.map +1 -0
  65. package/dist/esm/modules/notification/interfaces/sms-send-result.js +2 -0
  66. package/dist/esm/modules/notification/interfaces/sms-send-result.js.map +1 -0
  67. package/dist/esm/modules/permission/data/permissions.data.js +66 -0
  68. package/dist/esm/modules/permission/data/permissions.data.js.map +1 -1
  69. package/dist/esm/modules/permission/enums/permission-actions.enum.js +58 -0
  70. package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
  71. package/dist/esm/modules/permission/enums/permissions-module.enum.js +2 -0
  72. package/dist/esm/modules/permission/enums/permissions-module.enum.js.map +1 -1
  73. package/dist/esm/modules/role/constants/roles-by-scope.js +3 -1
  74. package/dist/esm/modules/role/constants/roles-by-scope.js.map +1 -1
  75. package/dist/esm/modules/role/enums/role.enum.js +2 -0
  76. package/dist/esm/modules/role/enums/role.enum.js.map +1 -1
  77. package/dist/types/index.d.ts +1 -0
  78. package/dist/types/modules/notification/enums/email-provider-name.enum.d.ts +10 -0
  79. package/dist/types/modules/notification/enums/notification-channel.enum.d.ts +10 -0
  80. package/dist/types/modules/notification/enums/notification-overall-status.enum.d.ts +11 -0
  81. package/dist/types/modules/notification/enums/provider-failure-reason.enum.d.ts +23 -0
  82. package/dist/types/modules/notification/enums/sms-provider-name.enum.d.ts +9 -0
  83. package/dist/types/modules/notification/index.d.ts +12 -0
  84. package/dist/types/modules/notification/interfaces/email-send-request.d.ts +35 -0
  85. package/dist/types/modules/notification/interfaces/email-send-result.d.ts +22 -0
  86. package/dist/types/modules/notification/interfaces/notification-dispatch-result.d.ts +26 -0
  87. package/dist/types/modules/notification/interfaces/per-channel-result.d.ts +22 -0
  88. package/dist/types/modules/notification/interfaces/provider-attempt.d.ts +25 -0
  89. package/dist/types/modules/notification/interfaces/sms-send-request.d.ts +18 -0
  90. package/dist/types/modules/notification/interfaces/sms-send-result.d.ts +22 -0
  91. package/dist/types/modules/permission/enums/permission-actions.enum.d.ts +57 -1
  92. package/dist/types/modules/permission/enums/permissions-module.enum.d.ts +3 -1
  93. package/dist/types/modules/role/enums/role.enum.d.ts +2 -0
  94. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=notification-dispatch-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-dispatch-result.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/notification-dispatch-result.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=per-channel-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"per-channel-result.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/per-channel-result.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=provider-attempt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-attempt.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/provider-attempt.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sms-send-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sms-send-request.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/sms-send-request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sms-send-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sms-send-result.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/sms-send-result.ts"],"names":[],"mappings":""}
@@ -67,6 +67,72 @@ export const PERMISSIONS_DATA = [
67
67
  PermissionActions.UPDATE_RESPONSE_UNIT,
68
68
  PermissionActions.DELETE_RESPONSE_UNIT
69
69
  ]
70
+ },
71
+ {
72
+ module: PermissionsModule.BILLING,
73
+ actions: [
74
+ PermissionActions.CREATE_BENEFICIARY,
75
+ PermissionActions.READ_BENEFICIARY,
76
+ PermissionActions.UPDATE_BENEFICIARY,
77
+ PermissionActions.DELETE_BENEFICIARY,
78
+ PermissionActions.CREATE_BILLING_CONFIG,
79
+ PermissionActions.READ_BILLING_CONFIG,
80
+ PermissionActions.UPDATE_BILLING_CONFIG,
81
+ PermissionActions.DELETE_BILLING_CONFIG,
82
+ PermissionActions.CREATE_CORPORATE_CLIENT,
83
+ PermissionActions.READ_CORPORATE_CLIENT,
84
+ PermissionActions.UPDATE_CORPORATE_CLIENT,
85
+ PermissionActions.DELETE_CORPORATE_CLIENT,
86
+ PermissionActions.CREATE_CORPORATE_CLIENT_MEMBER,
87
+ PermissionActions.READ_CORPORATE_CLIENT_MEMBER,
88
+ PermissionActions.UPDATE_CORPORATE_CLIENT_MEMBER,
89
+ PermissionActions.DELETE_CORPORATE_CLIENT_MEMBER,
90
+ PermissionActions.CREATE_INDIVIDUAL_CLIENT,
91
+ PermissionActions.READ_INDIVIDUAL_CLIENT,
92
+ PermissionActions.UPDATE_INDIVIDUAL_CLIENT,
93
+ PermissionActions.DELETE_INDIVIDUAL_CLIENT,
94
+ PermissionActions.READ_ENTITLEMENT,
95
+ PermissionActions.CREATE_INVOICE,
96
+ PermissionActions.READ_INVOICE,
97
+ PermissionActions.MARK_INVOICE_PAID,
98
+ PermissionActions.CREATE_ORDER,
99
+ PermissionActions.READ_ORDER,
100
+ PermissionActions.CONFIRM_ORDER,
101
+ PermissionActions.CREATE_RECEIPT,
102
+ PermissionActions.READ_RECEIPT,
103
+ PermissionActions.CREATE_PACKAGE,
104
+ PermissionActions.READ_PACKAGE,
105
+ PermissionActions.UPDATE_PACKAGE,
106
+ PermissionActions.ACTIVATE_PACKAGE,
107
+ PermissionActions.DEACTIVATE_PACKAGE,
108
+ PermissionActions.DELETE_PACKAGE,
109
+ PermissionActions.INITIALIZE_PAYMENT,
110
+ PermissionActions.VERIFY_PAYMENT,
111
+ PermissionActions.READ_PAYMENT,
112
+ PermissionActions.INITIALIZE_INDIVIDUAL_SUBSCRIPTION,
113
+ PermissionActions.READ_INDIVIDUAL_SUBSCRIPTION,
114
+ PermissionActions.APPROVE_INDIVIDUAL_SUBSCRIPTION_MANUALLY,
115
+ PermissionActions.CANCEL_INDIVIDUAL_SUBSCRIPTION,
116
+ PermissionActions.INITIALIZE_CORPORATE_SUBSCRIPTION,
117
+ PermissionActions.READ_CORPORATE_SUBSCRIPTION,
118
+ PermissionActions.APPROVE_CORPORATE_SUBSCRIPTION_MANUALLY,
119
+ PermissionActions.CANCEL_CORPORATE_SUBSCRIPTION,
120
+ PermissionActions.CREATE_SETTLEMENT,
121
+ PermissionActions.READ_SETTLEMENT,
122
+ PermissionActions.SEND_SETTLEMENT_INVOICE,
123
+ PermissionActions.MARK_SETTLEMENT_PAID,
124
+ ]
125
+ },
126
+ {
127
+ module: PermissionsModule.NEWSFEED,
128
+ actions: [
129
+ PermissionActions.CREATE_NEWSFEED_POST,
130
+ PermissionActions.READ_NEWSFEED_POST,
131
+ PermissionActions.UPDATE_NEWSFEED_POST,
132
+ PermissionActions.PUBLISH_NEWSFEED_POST,
133
+ PermissionActions.ARCHIVE_NEWSFEED_POST,
134
+ PermissionActions.DELETE_NEWSFEED_POST
135
+ ]
70
136
  }
71
137
  ];
72
138
  //# sourceMappingURL=permissions.data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.data.js","sourceRoot":"","sources":["../../../../../src/modules/permission/data/permissions.data.ts"],"names":[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C,eAAe;YACjC,iBAAiB,CAAC,6BAA6B;YAC/C,iBAAiB,CAAC,2BAA2B;YAC7C,iBAAiB,CAAC,6BAA6B;YAC/C,iBAAiB,CAAC,6BAA6B;SAClD;KACJ;IACD;QACI,MAAM,EAAE,iBAAiB,CAAC,aAAa;QACvC,OAAO,EAAE;YACL,iBAAiB,CAAC,oBAAoB;YACtC,iBAAiB,CAAC,kBAAkB;YACpC,iBAAiB,CAAC,oBAAoB;YACtC,iBAAiB,CAAC,oBAAoB;SACzC;KACJ;CACJ,CAAC"}
1
+ {"version":3,"file":"permissions.data.js","sourceRoot":"","sources":["../../../../../src/modules/permission/data/permissions.data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC1C;QACI,MAAM,EAAE,iBAAiB,CAAC,YAAY;QACtC,OAAO,EAAE;YACL,iBAAiB,CAAC,mBAAmB;YACrC,iBAAiB,CAAC,iBAAiB;YACnC,iBAAiB,CAAC,mBAAmB;YACrC,iBAAiB,CAAC,mBAAmB;SACxC;KACJ;IACD;QACI,MAAM,EAAE,iBAAiB,CAAC,OAAO;QACjC,OAAO,EAAE;YACL,iBAAiB,CAAC,cAAc;YAChC,iBAAiB,CAAC,YAAY;YAC9B,iBAAiB,CAAC,cAAc;YAChC,iBAAiB,CAAC,cAAc;SACnC;KACJ;IACD;QACI,MAAM,EAAE,iBAAiB,CAAC,cAAc;QACxC,OAAO,EAAE;YACL,iBAAiB,CAAC,qBAAqB;YACvC,iBAAiB,CAAC,mBAAmB;YACrC,iBAAiB,CAAC,qBAAqB;YACvC,iBAAiB,CAAC,qBAAqB;SAC1C;KACJ;IACD;QACI,MAAM,EAAE,iBAAiB,CAAC,IAAI;QAC9B,OAAO,EAAE;YACL,iBAAiB,CAAC,WAAW;YAC7B,iBAAiB,CA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AAiB,CAAC,oBAAoB;SACzC;KACJ;CACJ,CAAC"}
@@ -44,5 +44,63 @@ export var PermissionActions;
44
44
  PermissionActions["READ_RESPONSE_UNIT"] = "read:response-unit";
45
45
  PermissionActions["UPDATE_RESPONSE_UNIT"] = "update:response-unit";
46
46
  PermissionActions["DELETE_RESPONSE_UNIT"] = "delete:response-unit";
47
+ // Module: Billing
48
+ PermissionActions["CREATE_BENEFICIARY"] = "create:beneficiary";
49
+ PermissionActions["READ_BENEFICIARY"] = "read:beneficiary";
50
+ PermissionActions["UPDATE_BENEFICIARY"] = "update:beneficiary";
51
+ PermissionActions["DELETE_BENEFICIARY"] = "delete:beneficiary";
52
+ PermissionActions["CREATE_BILLING_CONFIG"] = "create:billing-config";
53
+ PermissionActions["READ_BILLING_CONFIG"] = "read:billing-config";
54
+ PermissionActions["UPDATE_BILLING_CONFIG"] = "update:billing-config";
55
+ PermissionActions["DELETE_BILLING_CONFIG"] = "delete:billing-config";
56
+ PermissionActions["CREATE_CORPORATE_CLIENT"] = "create:corporate-client";
57
+ PermissionActions["READ_CORPORATE_CLIENT"] = "read:corporate-client";
58
+ PermissionActions["UPDATE_CORPORATE_CLIENT"] = "update:corporate-client";
59
+ PermissionActions["DELETE_CORPORATE_CLIENT"] = "delete:corporate-client";
60
+ PermissionActions["CREATE_CORPORATE_CLIENT_MEMBER"] = "create:corporate-client-member";
61
+ PermissionActions["READ_CORPORATE_CLIENT_MEMBER"] = "read:corporate-client-member";
62
+ PermissionActions["UPDATE_CORPORATE_CLIENT_MEMBER"] = "update:corporate-client-member";
63
+ PermissionActions["DELETE_CORPORATE_CLIENT_MEMBER"] = "delete:corporate-client-member";
64
+ PermissionActions["CREATE_INDIVIDUAL_CLIENT"] = "create:individual-client";
65
+ PermissionActions["READ_INDIVIDUAL_CLIENT"] = "read:individual-client";
66
+ PermissionActions["UPDATE_INDIVIDUAL_CLIENT"] = "update:individual-client";
67
+ PermissionActions["DELETE_INDIVIDUAL_CLIENT"] = "delete:individual-client";
68
+ PermissionActions["READ_ENTITLEMENT"] = "read:entitlement";
69
+ PermissionActions["CREATE_INVOICE"] = "create:invoice";
70
+ PermissionActions["READ_INVOICE"] = "read:invoice";
71
+ PermissionActions["MARK_INVOICE_PAID"] = "mark:invoice-paid";
72
+ PermissionActions["CREATE_ORDER"] = "create:order";
73
+ PermissionActions["READ_ORDER"] = "read:order";
74
+ PermissionActions["CONFIRM_ORDER"] = "confirm:order";
75
+ PermissionActions["CREATE_RECEIPT"] = "create:receipt";
76
+ PermissionActions["READ_RECEIPT"] = "read:receipt";
77
+ PermissionActions["CREATE_PACKAGE"] = "create:package";
78
+ PermissionActions["READ_PACKAGE"] = "read:package";
79
+ PermissionActions["UPDATE_PACKAGE"] = "update:package";
80
+ PermissionActions["ACTIVATE_PACKAGE"] = "activate:package";
81
+ PermissionActions["DEACTIVATE_PACKAGE"] = "deactivate:package";
82
+ PermissionActions["DELETE_PACKAGE"] = "delete:package";
83
+ PermissionActions["INITIALIZE_PAYMENT"] = "initialize:payment";
84
+ PermissionActions["VERIFY_PAYMENT"] = "verify:payment";
85
+ PermissionActions["READ_PAYMENT"] = "read:payment";
86
+ PermissionActions["INITIALIZE_INDIVIDUAL_SUBSCRIPTION"] = "initialize:individual-subscription";
87
+ PermissionActions["READ_INDIVIDUAL_SUBSCRIPTION"] = "read:individual-subscription";
88
+ PermissionActions["APPROVE_INDIVIDUAL_SUBSCRIPTION_MANUALLY"] = "approve:individual-subscription-manually";
89
+ PermissionActions["CANCEL_INDIVIDUAL_SUBSCRIPTION"] = "cancel:individual-subscription";
90
+ PermissionActions["INITIALIZE_CORPORATE_SUBSCRIPTION"] = "initialize:corporate-subscription";
91
+ PermissionActions["READ_CORPORATE_SUBSCRIPTION"] = "read:corporate-subscription";
92
+ PermissionActions["APPROVE_CORPORATE_SUBSCRIPTION_MANUALLY"] = "approve:corporate-subscription-manually";
93
+ PermissionActions["CANCEL_CORPORATE_SUBSCRIPTION"] = "cancel:corporate-subscription";
94
+ PermissionActions["CREATE_SETTLEMENT"] = "create:settlement";
95
+ PermissionActions["READ_SETTLEMENT"] = "read:settlement";
96
+ PermissionActions["SEND_SETTLEMENT_INVOICE"] = "send:settlement-invoice";
97
+ PermissionActions["MARK_SETTLEMENT_PAID"] = "mark:settlement-paid";
98
+ // Module: Newsfeed
99
+ PermissionActions["CREATE_NEWSFEED_POST"] = "create:newsfeed-post";
100
+ PermissionActions["READ_NEWSFEED_POST"] = "read:newsfeed-post";
101
+ PermissionActions["UPDATE_NEWSFEED_POST"] = "update:newsfeed-post";
102
+ PermissionActions["PUBLISH_NEWSFEED_POST"] = "publish:newsfeed-post";
103
+ PermissionActions["ARCHIVE_NEWSFEED_POST"] = "archive:newsfeed-post";
104
+ PermissionActions["DELETE_NEWSFEED_POST"] = "delete:newsfeed-post";
47
105
  })(PermissionActions || (PermissionActions = {}));
48
106
  //# sourceMappingURL=permission-actions.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAoDX;AApDD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAE3C,kBAAkB;IAClB,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IAEjC,wBAAwB;IACxB,oEAA+C,CAAA;IAC/C,gEAA2C,CAAA;IAC3C,oEAA+C,CAAA;IAC/C,oEAA+C,CAAA;IAE/C,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAE3B,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAE3B,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAE3B,mBAAmB;IACnB,wDAAmC,CAAA;IACnC,oDAA+B,CAAA;IAC/B,wDAAmC,CAAA;IACnC,wDAAmC,CAAA;IACnC,oFAA+D,CAAA;IAC/D,gFAA2D,CAAA;IAC3D,oFAA+D,CAAA;IAC/D,oFAA+D,CAAA;IAE/D,uBAAuB;IACvB,kEAA6C,CAAA;IAC7C,8DAAyC,CAAA;IACzC,kEAA6C,CAAA;IAC7C,kEAA6C,CAAA;AACjD,CAAC,EApDW,iBAAiB,KAAjB,iBAAiB,QAoD5B"}
1
+ {"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBA6HX;AA7HD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAE3C,kBAAkB;IAClB,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IAEjC,wBAAwB;IACxB,oEAA+C,CAAA;IAC/C,gEAA2C,CAAA;IAC3C,oEAA+C,CAAA;IAC/C,oEAA+C,CAAA;IAE/C,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAE3B,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAE3B,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAE3B,mBAAmB;IACnB,wDAAmC,CAAA;IACnC,oDAA+B,CAAA;IAC/B,wDAAmC,CAA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ACnC,wEAAmD,CAAA;IACnD,kEAA6C,CAAA;IAE7C,mBAAmB;IACnB,kEAA6C,CAAA;IAC7C,8DAAyC,CAAA;IACzC,kEAA6C,CAAA;IAC7C,oEAA+C,CAAA;IAC/C,oEAA+C,CAAA;IAC/C,kEAA6C,CAAA;AACjD,CAAC,EA7HW,iBAAiB,KAAjB,iBAAiB,QA6H5B"}
@@ -7,5 +7,7 @@ export var PermissionsModule;
7
7
  PermissionsModule["ROLE"] = "Role";
8
8
  PermissionsModule["INCIDENT"] = "Grievance";
9
9
  PermissionsModule["RESPONSE_UNIT"] = "Response Unit";
10
+ PermissionsModule["BILLING"] = "Billing";
11
+ PermissionsModule["NEWSFEED"] = "Newsfeed";
10
12
  })(PermissionsModule || (PermissionsModule = {}));
11
13
  //# sourceMappingURL=permissions-module.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"permissions-module.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permissions-module.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAQX;AARD,WAAY,iBAAiB;IACzB,kDAA6B,CAAA;IAC7B,wCAAmB,CAAA;IACnB,sDAAiC,CAAA;IACjC,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,2CAAsB,CAAA;IACtB,oDAA+B,CAAA;AACnC,CAAC,EARW,iBAAiB,KAAjB,iBAAiB,QAQ5B"}
1
+ {"version":3,"file":"permissions-module.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permissions-module.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IACzB,kDAA6B,CAAA;IAC7B,wCAAmB,CAAA;IACnB,sDAAiC,CAAA;IACjC,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,2CAAsB,CAAA;IACtB,oDAA+B,CAAA;IAC/B,wCAAmB,CAAA;IACnB,0CAAqB,CAAA;AACzB,CAAC,EAVW,iBAAiB,KAAjB,iBAAiB,QAU5B"}
@@ -2,7 +2,9 @@ import { Roles } from "../enums/role.enum";
2
2
  export const ORGANIZATION_ROLES = [
3
3
  Roles.ORGANIZATION_OWNER,
4
4
  Roles.ORGANIZATION_ADMIN,
5
- Roles.ORGANIZATION_USER
5
+ Roles.ORGANIZATION_USER,
6
+ Roles.ORGANIZATION_BILLING_ADMIN,
7
+ Roles.ORGANIZATION_NEWSFEED_ADMIN
6
8
  ];
7
9
  export const CONTROL_CENTRE_ROLES = [
8
10
  Roles.CONTROL_CENTRE_ADMIN,
@@ -1 +1 @@
1
- {"version":3,"file":"roles-by-scope.js","sourceRoot":"","sources":["../../../../../src/modules/role/constants/roles-by-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAa;IACxC,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,iBAAiB;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAa;IAC1C,KAAK,CAAC,oBAAoB;IAC1B,KAAK,CAAC,mBAAmB;IACzB,KAAK,CAAC,SAAS;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAa;IAClC,KAAK,CAAC,WAAW;CACpB,CAAC"}
1
+ {"version":3,"file":"roles-by-scope.js","sourceRoot":"","sources":["../../../../../src/modules/role/constants/roles-by-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAa;IACxC,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,iBAAiB;IACvB,KAAK,CAAC,0BAA0B;IAChC,KAAK,CAAC,2BAA2B;CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAa;IAC1C,KAAK,CAAC,oBAAoB;IAC1B,KAAK,CAAC,mBAAmB;IACzB,KAAK,CAAC,SAAS;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAa;IAClC,KAAK,CAAC,WAAW;CACpB,CAAC"}
@@ -4,6 +4,8 @@ export var Roles;
4
4
  Roles["ORGANIZATION_OWNER"] = "Organization:Owner";
5
5
  Roles["ORGANIZATION_ADMIN"] = "Organization:Admin";
6
6
  Roles["ORGANIZATION_USER"] = "Organization:User";
7
+ Roles["ORGANIZATION_BILLING_ADMIN"] = "Organization:Billing-Admin";
8
+ Roles["ORGANIZATION_NEWSFEED_ADMIN"] = "Organization:Newsfeed-Admin";
7
9
  Roles["CONTROL_CENTRE_ADMIN"] = "Control-Centre:Admin";
8
10
  Roles["CONTROL_CENTRE_USER"] = "Control-Centre:User";
9
11
  Roles["RESPONDER"] = "Responder";
@@ -1 +1 @@
1
- {"version":3,"file":"role.enum.js","sourceRoot":"","sources":["../../../../../src/modules/role/enums/role.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,KASX;AATD,WAAY,KAAK;IACb,oCAA2B,CAAA;IAC3B,kDAAyC,CAAA;IACzC,kDAAyC,CAAA;IACzC,gDAAuC,CAAA;IACvC,sDAA6C,CAAA;IAC7C,oDAA2C,CAAA;IAC3C,gCAAuB,CAAA;IACvB,oCAA2B,CAAA;AAC/B,CAAC,EATW,KAAK,KAAL,KAAK,QAShB;AAED;;GAEG"}
1
+ {"version":3,"file":"role.enum.js","sourceRoot":"","sources":["../../../../../src/modules/role/enums/role.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,KAWX;AAXD,WAAY,KAAK;IACb,oCAA2B,CAAA;IAC3B,kDAAyC,CAAA;IACzC,kDAAyC,CAAA;IACzC,gDAAuC,CAAA;IACvC,kEAAyD,CAAA;IACzD,oEAA2D,CAAA;IAC3D,sDAA6C,CAAA;IAC7C,oDAA2C,CAAA;IAC3C,gCAAuB,CAAA;IACvB,oCAA2B,CAAA;AAC/B,CAAC,EAXW,KAAK,KAAL,KAAK,QAWhB;AAED;;GAEG"}
@@ -14,6 +14,7 @@ export * from './modules/sms/index';
14
14
  export * from './modules/gis/index';
15
15
  export * from './modules/socket/index';
16
16
  export * from './modules/web-notification/index';
17
+ export * from './modules/notification/index';
17
18
  export * from './modules/chat/index';
18
19
  export * from './interfaces/server-message';
19
20
  export * from './interfaces/i-request-with-user';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Identifiers for the email providers the notification service can dispatch through.
3
+ * TWILIO_SENDGRID is the Twilio email provider (SendGrid API).
4
+ * Provider order/fallback is configuration-driven; new providers can be appended.
5
+ */
6
+ export declare enum EmailProviderName {
7
+ TWILIO_SENDGRID = "twilio_sendgrid",
8
+ MAILGUN = "mailgun",
9
+ SES = "ses"
10
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Delivery channels supported by the clarion-notification service.
3
+ * Used to key per-channel dispatch results.
4
+ */
5
+ export declare enum NotificationChannel {
6
+ SMS = "SMS",
7
+ EMAIL = "EMAIL",
8
+ PUSH = "PUSH",
9
+ WEB = "WEB"
10
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Aggregate status for a multi-channel notification dispatch.
3
+ * - SUCCESS: every attempted channel succeeded.
4
+ * - PARTIAL_SUCCESS: at least one channel succeeded and at least one failed.
5
+ * - FAILED: no attempted channel succeeded.
6
+ */
7
+ export declare enum NotificationOverallStatus {
8
+ SUCCESS = "SUCCESS",
9
+ PARTIAL_SUCCESS = "PARTIAL_SUCCESS",
10
+ FAILED = "FAILED"
11
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Normalized classification of why a provider attempt failed.
3
+ * Drives fallback behaviour: VALIDATION / CONFIG_MISSING are non-retryable
4
+ * (no fallback), the remainder are provider-level failures that trigger fallback.
5
+ */
6
+ export declare enum ProviderFailureReason {
7
+ /** Malformed/invalid request (bad recipient, missing body/subject). Do not fall back. */
8
+ VALIDATION = "VALIDATION",
9
+ /** Provider is not configured/enabled. Skip provider (try next), not a send failure. */
10
+ CONFIG_MISSING = "CONFIG_MISSING",
11
+ /** Authentication/authorization failure with the provider. */
12
+ AUTH = "AUTH",
13
+ /** Provider rate limited the request. */
14
+ RATE_LIMIT = "RATE_LIMIT",
15
+ /** Request timed out. */
16
+ TIMEOUT = "TIMEOUT",
17
+ /** Network/connection error reaching the provider. */
18
+ NETWORK = "NETWORK",
19
+ /** Provider returned a server-side/processing error. */
20
+ PROVIDER_ERROR = "PROVIDER_ERROR",
21
+ /** Unclassified failure. */
22
+ UNKNOWN = "UNKNOWN"
23
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Identifiers for the SMS providers the notification service can dispatch through.
3
+ * Provider order/fallback is configuration-driven; new providers can be appended.
4
+ */
5
+ export declare enum SmsProviderName {
6
+ TWILIO = "twilio",
7
+ UWAZII = "uwazii",
8
+ AFRICASTALKING = "africastalking"
9
+ }
@@ -0,0 +1,12 @@
1
+ export * from './enums/notification-channel.enum';
2
+ export * from './enums/sms-provider-name.enum';
3
+ export * from './enums/email-provider-name.enum';
4
+ export * from './enums/notification-overall-status.enum';
5
+ export * from './enums/provider-failure-reason.enum';
6
+ export * from './interfaces/provider-attempt';
7
+ export * from './interfaces/per-channel-result';
8
+ export * from './interfaces/sms-send-result';
9
+ export * from './interfaces/email-send-result';
10
+ export * from './interfaces/notification-dispatch-result';
11
+ export * from './interfaces/sms-send-request';
12
+ export * from './interfaces/email-send-request';
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Provider-agnostic email attachment. `content` is base64-encoded; `path` points to
3
+ * a file on disk. `cid` marks an inline attachment referenced from the HTML body.
4
+ */
5
+ export interface EmailAttachment {
6
+ filename: string;
7
+ content?: string;
8
+ path?: string;
9
+ contentType?: string;
10
+ /** Content-ID for inline images referenced via cid: in the HTML body. */
11
+ cid?: string;
12
+ }
13
+ /**
14
+ * Provider-agnostic email send request handed to an EmailProvider implementation.
15
+ * Templating/rendering happens upstream; providers receive final subject/html/text.
16
+ * Backend/service-level contract (not consumed by the web admin).
17
+ */
18
+ export interface EmailSendRequest {
19
+ to: string[];
20
+ subject: string;
21
+ /** Rendered HTML body. */
22
+ html: string;
23
+ /** Optional rendered plain-text body. */
24
+ text?: string;
25
+ /** From email address. Provider falls back to its configured default when absent. */
26
+ from?: string;
27
+ fromName?: string;
28
+ replyTo?: string;
29
+ cc?: string[];
30
+ bcc?: string[];
31
+ attachments?: EmailAttachment[];
32
+ /** Provider-level categorization tags. */
33
+ tags?: string[];
34
+ metadata?: Record<string, any>;
35
+ }
@@ -0,0 +1,22 @@
1
+ import { NotificationChannel } from '../enums/notification-channel.enum';
2
+ import { EmailProviderName } from '../enums/email-provider-name.enum';
3
+ import { ProviderFailureReason } from '../enums/provider-failure-reason.enum';
4
+ import { ProviderAttempt } from './provider-attempt';
5
+ /**
6
+ * Normalized result of an email send across the configured provider chain.
7
+ */
8
+ export interface EmailSendResult {
9
+ channel: NotificationChannel.EMAIL;
10
+ success: boolean;
11
+ /** Provider that ultimately succeeded. */
12
+ provider?: EmailProviderName | string;
13
+ /** Normalized provider message/reference id. */
14
+ messageId?: string;
15
+ /** Recipients targeted. */
16
+ to?: string[];
17
+ /** Ordered attempts (primary first, then fallbacks). */
18
+ attempts: ProviderAttempt[];
19
+ failureReason?: ProviderFailureReason;
20
+ /** Internal, safe-to-log error summary. */
21
+ errorMessage?: string;
22
+ }
@@ -0,0 +1,26 @@
1
+ import { NotificationChannel } from '../enums/notification-channel.enum';
2
+ import { NotificationOverallStatus } from '../enums/notification-overall-status.enum';
3
+ import { PerChannelResult } from './per-channel-result';
4
+ import { ProviderAttempt } from './provider-attempt';
5
+ /**
6
+ * Aggregate outcome of a multi-channel notification dispatch.
7
+ *
8
+ * NOTE: In the current architecture most dispatches are triggered by fire-and-forget
9
+ * Kafka events, so this object is produced for internal logging/persistence and
10
+ * observability rather than being returned synchronously to the original API caller.
11
+ * It is display-safe (no secrets) and can back a future synchronous notification
12
+ * endpoint or an admin-facing view.
13
+ */
14
+ export interface NotificationDispatchResult {
15
+ overallStatus: NotificationOverallStatus;
16
+ successfulChannels: NotificationChannel[];
17
+ failedChannels: NotificationChannel[];
18
+ /** Per-channel outcomes including provider attempts. */
19
+ perChannelResults: PerChannelResult[];
20
+ /** Flattened list of every provider attempt across all channels. */
21
+ providerAttempts: ProviderAttempt[];
22
+ /** Internal, safe-to-log error summaries. */
23
+ errors: string[];
24
+ /** Correlation/trace id linking this dispatch to the originating event. */
25
+ correlationId?: string;
26
+ }
@@ -0,0 +1,22 @@
1
+ import { NotificationChannel } from '../enums/notification-channel.enum';
2
+ import { ProviderFailureReason } from '../enums/provider-failure-reason.enum';
3
+ import { ProviderAttempt } from './provider-attempt';
4
+ /**
5
+ * Normalized outcome for a single notification channel, including every provider
6
+ * attempt made (primary and fallbacks) and which provider ultimately succeeded.
7
+ */
8
+ export interface PerChannelResult {
9
+ channel: NotificationChannel;
10
+ success: boolean;
11
+ /** Provider that ultimately succeeded (undefined when the channel failed). */
12
+ provider?: string;
13
+ /** Normalized provider reference id from the successful provider. */
14
+ messageId?: string;
15
+ /** Ordered attempts (primary first, then fallbacks). */
16
+ attempts: ProviderAttempt[];
17
+ /** True when the channel was intentionally not attempted (e.g. no recipient). */
18
+ skipped?: boolean;
19
+ failureReason?: ProviderFailureReason;
20
+ /** Internal, safe-to-log error summary. */
21
+ errorMessage?: string;
22
+ }
@@ -0,0 +1,25 @@
1
+ import { NotificationChannel } from '../enums/notification-channel.enum';
2
+ import { ProviderFailureReason } from '../enums/provider-failure-reason.enum';
3
+ /**
4
+ * Record of a single provider send attempt within a channel.
5
+ * One channel may produce several attempts (primary + fallbacks).
6
+ * Error details here are intended for internal logging/observability, not for
7
+ * public API clients.
8
+ */
9
+ export interface ProviderAttempt {
10
+ /** Provider identifier (SmsProviderName | EmailProviderName value). */
11
+ provider: string;
12
+ channel: NotificationChannel;
13
+ success: boolean;
14
+ /** Whether the failure was provider-level and eligible for fallback. */
15
+ retryable?: boolean;
16
+ failureReason?: ProviderFailureReason;
17
+ /** Normalized provider message/reference id when the send succeeded. */
18
+ messageId?: string;
19
+ /** Internal, safe-to-log error summary (never surfaced to public clients). */
20
+ errorMessage?: string;
21
+ /** Provider HTTP/status code when available. */
22
+ statusCode?: number;
23
+ startedAt?: string;
24
+ durationMs?: number;
25
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Provider-agnostic SMS send request handed to an SmsProvider implementation.
3
+ * Backend/service-level contract (not consumed by the web admin).
4
+ */
5
+ export interface SmsSendRequest {
6
+ /** Recipients in E.164 format. */
7
+ to: string[];
8
+ /** Message body. */
9
+ body: string;
10
+ /** Sender id / from (alphanumeric sender name or number). Provider may override. */
11
+ senderId?: string;
12
+ /** Optional provider message type hint. */
13
+ type?: string;
14
+ metadata?: Record<string, any>;
15
+ incidentId?: number;
16
+ userId?: number;
17
+ organizationId?: number;
18
+ }
@@ -0,0 +1,22 @@
1
+ import { NotificationChannel } from '../enums/notification-channel.enum';
2
+ import { ProviderFailureReason } from '../enums/provider-failure-reason.enum';
3
+ import { SmsProviderName } from '../enums/sms-provider-name.enum';
4
+ import { ProviderAttempt } from './provider-attempt';
5
+ /**
6
+ * Normalized result of an SMS send across the configured provider chain.
7
+ */
8
+ export interface SmsSendResult {
9
+ channel: NotificationChannel.SMS;
10
+ success: boolean;
11
+ /** Provider that ultimately succeeded. */
12
+ provider?: SmsProviderName | string;
13
+ /** Normalized provider message/reference id. */
14
+ messageId?: string;
15
+ /** Recipients targeted (E.164). */
16
+ to?: string[];
17
+ /** Ordered attempts (primary first, then fallbacks). */
18
+ attempts: ProviderAttempt[];
19
+ failureReason?: ProviderFailureReason;
20
+ /** Internal, safe-to-log error summary. */
21
+ errorMessage?: string;
22
+ }
@@ -34,5 +34,61 @@ export declare enum PermissionActions {
34
34
  CREATE_RESPONSE_UNIT = "create:response-unit",
35
35
  READ_RESPONSE_UNIT = "read:response-unit",
36
36
  UPDATE_RESPONSE_UNIT = "update:response-unit",
37
- DELETE_RESPONSE_UNIT = "delete:response-unit"
37
+ DELETE_RESPONSE_UNIT = "delete:response-unit",
38
+ CREATE_BENEFICIARY = "create:beneficiary",
39
+ READ_BENEFICIARY = "read:beneficiary",
40
+ UPDATE_BENEFICIARY = "update:beneficiary",
41
+ DELETE_BENEFICIARY = "delete:beneficiary",
42
+ CREATE_BILLING_CONFIG = "create:billing-config",
43
+ READ_BILLING_CONFIG = "read:billing-config",
44
+ UPDATE_BILLING_CONFIG = "update:billing-config",
45
+ DELETE_BILLING_CONFIG = "delete:billing-config",
46
+ CREATE_CORPORATE_CLIENT = "create:corporate-client",
47
+ READ_CORPORATE_CLIENT = "read:corporate-client",
48
+ UPDATE_CORPORATE_CLIENT = "update:corporate-client",
49
+ DELETE_CORPORATE_CLIENT = "delete:corporate-client",
50
+ CREATE_CORPORATE_CLIENT_MEMBER = "create:corporate-client-member",
51
+ READ_CORPORATE_CLIENT_MEMBER = "read:corporate-client-member",
52
+ UPDATE_CORPORATE_CLIENT_MEMBER = "update:corporate-client-member",
53
+ DELETE_CORPORATE_CLIENT_MEMBER = "delete:corporate-client-member",
54
+ CREATE_INDIVIDUAL_CLIENT = "create:individual-client",
55
+ READ_INDIVIDUAL_CLIENT = "read:individual-client",
56
+ UPDATE_INDIVIDUAL_CLIENT = "update:individual-client",
57
+ DELETE_INDIVIDUAL_CLIENT = "delete:individual-client",
58
+ READ_ENTITLEMENT = "read:entitlement",
59
+ CREATE_INVOICE = "create:invoice",
60
+ READ_INVOICE = "read:invoice",
61
+ MARK_INVOICE_PAID = "mark:invoice-paid",
62
+ CREATE_ORDER = "create:order",
63
+ READ_ORDER = "read:order",
64
+ CONFIRM_ORDER = "confirm:order",
65
+ CREATE_RECEIPT = "create:receipt",
66
+ READ_RECEIPT = "read:receipt",
67
+ CREATE_PACKAGE = "create:package",
68
+ READ_PACKAGE = "read:package",
69
+ UPDATE_PACKAGE = "update:package",
70
+ ACTIVATE_PACKAGE = "activate:package",
71
+ DEACTIVATE_PACKAGE = "deactivate:package",
72
+ DELETE_PACKAGE = "delete:package",
73
+ INITIALIZE_PAYMENT = "initialize:payment",
74
+ VERIFY_PAYMENT = "verify:payment",
75
+ READ_PAYMENT = "read:payment",
76
+ INITIALIZE_INDIVIDUAL_SUBSCRIPTION = "initialize:individual-subscription",
77
+ READ_INDIVIDUAL_SUBSCRIPTION = "read:individual-subscription",
78
+ APPROVE_INDIVIDUAL_SUBSCRIPTION_MANUALLY = "approve:individual-subscription-manually",
79
+ CANCEL_INDIVIDUAL_SUBSCRIPTION = "cancel:individual-subscription",
80
+ INITIALIZE_CORPORATE_SUBSCRIPTION = "initialize:corporate-subscription",
81
+ READ_CORPORATE_SUBSCRIPTION = "read:corporate-subscription",
82
+ APPROVE_CORPORATE_SUBSCRIPTION_MANUALLY = "approve:corporate-subscription-manually",
83
+ CANCEL_CORPORATE_SUBSCRIPTION = "cancel:corporate-subscription",
84
+ CREATE_SETTLEMENT = "create:settlement",
85
+ READ_SETTLEMENT = "read:settlement",
86
+ SEND_SETTLEMENT_INVOICE = "send:settlement-invoice",
87
+ MARK_SETTLEMENT_PAID = "mark:settlement-paid",
88
+ CREATE_NEWSFEED_POST = "create:newsfeed-post",
89
+ READ_NEWSFEED_POST = "read:newsfeed-post",
90
+ UPDATE_NEWSFEED_POST = "update:newsfeed-post",
91
+ PUBLISH_NEWSFEED_POST = "publish:newsfeed-post",
92
+ ARCHIVE_NEWSFEED_POST = "archive:newsfeed-post",
93
+ DELETE_NEWSFEED_POST = "delete:newsfeed-post"
38
94
  }
@@ -5,5 +5,7 @@ export declare enum PermissionsModule {
5
5
  USER = "User",
6
6
  ROLE = "Role",
7
7
  INCIDENT = "Grievance",
8
- RESPONSE_UNIT = "Response Unit"
8
+ RESPONSE_UNIT = "Response Unit",
9
+ BILLING = "Billing",
10
+ NEWSFEED = "Newsfeed"
9
11
  }
@@ -3,6 +3,8 @@ export declare enum Roles {
3
3
  ORGANIZATION_OWNER = "Organization:Owner",
4
4
  ORGANIZATION_ADMIN = "Organization:Admin",
5
5
  ORGANIZATION_USER = "Organization:User",
6
+ ORGANIZATION_BILLING_ADMIN = "Organization:Billing-Admin",
7
+ ORGANIZATION_NEWSFEED_ADMIN = "Organization:Newsfeed-Admin",
6
8
  CONTROL_CENTRE_ADMIN = "Control-Centre:Admin",
7
9
  CONTROL_CENTRE_USER = "Control-Centre:User",
8
10
  RESPONDER = "Responder",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.1.181",
3
+ "version": "1.1.182",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",