@degenerate/endpoints 0.0.5 → 0.0.7

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 (214) hide show
  1. package/dist/cors/authority/audience/get-set-audiences.d.ts.map +1 -0
  2. package/dist/cors/authority/jwt/validate-jwt-authorities.d.ts.map +1 -0
  3. package/dist/{endpoints/src/cors → cors}/authority/jwt/validate-jwt-authorities.js +2 -3
  4. package/dist/cors/endpoints/authorities/validate-authorities-transaction.d.ts.map +1 -0
  5. package/dist/cors/endpoints/helpers/validate-request-body.d.ts.map +1 -0
  6. package/dist/cors/errors/all-error-handler.d.ts.map +1 -0
  7. package/dist/cors/errors/bad-request-handler.d.ts.map +1 -0
  8. package/dist/cors/errors/unauthorized-handler.d.ts.map +1 -0
  9. package/dist/cors/index.d.ts.map +1 -0
  10. package/dist/cors/routes/authorities.routes.d.ts.map +1 -0
  11. package/dist/{endpoints/src/cors → cors}/routes/authorities.routes.js +2 -2
  12. package/dist/cors/routes/events.routes.d.ts.map +1 -0
  13. package/dist/cors/routes/functions.routes.d.ts.map +1 -0
  14. package/dist/cors/routes/rules.routes.d.ts.map +1 -0
  15. package/dist/cors/routes/share-data.routes.d.ts.map +1 -0
  16. package/dist/examples/express-server/app.d.ts.map +1 -0
  17. package/dist/{endpoints/src/examples → examples}/express-server/app.js +2 -2
  18. package/dist/examples/express-server/server.d.ts.map +1 -0
  19. package/dist/{endpoints/src/index.d.ts.map → index.d.ts.map} +1 -1
  20. package/package.json +2 -2
  21. package/dist/endpoints/src/cors/authority/audience/get-set-audiences.d.ts.map +0 -1
  22. package/dist/endpoints/src/cors/authority/jwt/validate-jwt-authorities.d.ts.map +0 -1
  23. package/dist/endpoints/src/cors/endpoints/authorities/validate-authorities-transaction.d.ts.map +0 -1
  24. package/dist/endpoints/src/cors/endpoints/helpers/validate-request-body.d.ts.map +0 -1
  25. package/dist/endpoints/src/cors/errors/all-error-handler.d.ts.map +0 -1
  26. package/dist/endpoints/src/cors/errors/bad-request-handler.d.ts.map +0 -1
  27. package/dist/endpoints/src/cors/errors/unauthorized-handler.d.ts.map +0 -1
  28. package/dist/endpoints/src/cors/index.d.ts.map +0 -1
  29. package/dist/endpoints/src/cors/routes/authorities.routes.d.ts.map +0 -1
  30. package/dist/endpoints/src/cors/routes/events.routes.d.ts.map +0 -1
  31. package/dist/endpoints/src/cors/routes/functions.routes.d.ts.map +0 -1
  32. package/dist/endpoints/src/cors/routes/rules.routes.d.ts.map +0 -1
  33. package/dist/endpoints/src/cors/routes/share-data.routes.d.ts.map +0 -1
  34. package/dist/endpoints/src/examples/express-server/app.d.ts.map +0 -1
  35. package/dist/endpoints/src/examples/express-server/server.d.ts.map +0 -1
  36. package/dist/generic/src/_settings/authorization-settings.d.ts +0 -17
  37. package/dist/generic/src/_settings/authorization-settings.d.ts.map +0 -1
  38. package/dist/generic/src/_settings/authorization-settings.js +0 -20
  39. package/dist/generic/src/authorization/index.d.ts +0 -24
  40. package/dist/generic/src/authorization/index.d.ts.map +0 -1
  41. package/dist/generic/src/authorization/index.js +0 -61
  42. package/dist/generic/src/authorization/jwt/keys/create-public-key-pem.d.ts +0 -9
  43. package/dist/generic/src/authorization/jwt/keys/create-public-key-pem.d.ts.map +0 -1
  44. package/dist/generic/src/authorization/jwt/keys/create-public-key-pem.js +0 -25
  45. package/dist/generic/src/authorization/jwt/keys/create-secret-key-pem.d.ts +0 -9
  46. package/dist/generic/src/authorization/jwt/keys/create-secret-key-pem.d.ts.map +0 -1
  47. package/dist/generic/src/authorization/jwt/keys/create-secret-key-pem.js +0 -24
  48. package/dist/generic/src/authorization/jwt/sign/create-authorization-issuer.d.ts +0 -10
  49. package/dist/generic/src/authorization/jwt/sign/create-authorization-issuer.d.ts.map +0 -1
  50. package/dist/generic/src/authorization/jwt/sign/create-authorization-issuer.js +0 -26
  51. package/dist/generic/src/authorization/jwt/sign/create-authorization-subject.d.ts +0 -12
  52. package/dist/generic/src/authorization/jwt/sign/create-authorization-subject.d.ts.map +0 -1
  53. package/dist/generic/src/authorization/jwt/sign/create-authorization-subject.js +0 -19
  54. package/dist/generic/src/authorization/jwt/sign/create-jwt-options.d.ts +0 -17
  55. package/dist/generic/src/authorization/jwt/sign/create-jwt-options.d.ts.map +0 -1
  56. package/dist/generic/src/authorization/jwt/sign/create-jwt-options.js +0 -43
  57. package/dist/generic/src/authorization/jwt/sign/create-jwt-signed-token.d.ts +0 -13
  58. package/dist/generic/src/authorization/jwt/sign/create-jwt-signed-token.d.ts.map +0 -1
  59. package/dist/generic/src/authorization/jwt/sign/create-jwt-signed-token.js +0 -22
  60. package/dist/generic/src/authorization/jwt/transform/transform-token-payload-to-safe-payload.d.ts +0 -10
  61. package/dist/generic/src/authorization/jwt/transform/transform-token-payload-to-safe-payload.d.ts.map +0 -1
  62. package/dist/generic/src/authorization/jwt/transform/transform-token-payload-to-safe-payload.js +0 -31
  63. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-header.d.ts +0 -10
  64. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-header.d.ts.map +0 -1
  65. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-header.js +0 -20
  66. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-signed-token-payload.d.ts +0 -9
  67. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-signed-token-payload.d.ts.map +0 -1
  68. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-signed-token-payload.js +0 -17
  69. package/dist/generic/src/authorization/jwt/verify/verify-jwt-signed-token.d.ts +0 -12
  70. package/dist/generic/src/authorization/jwt/verify/verify-jwt-signed-token.d.ts.map +0 -1
  71. package/dist/generic/src/authorization/jwt/verify/verify-jwt-signed-token.js +0 -34
  72. package/dist/generic/src/authorization/safe/authorization/authorized-authorities.d.ts +0 -42
  73. package/dist/generic/src/authorization/safe/authorization/authorized-authorities.d.ts.map +0 -1
  74. package/dist/generic/src/authorization/safe/authorization/authorized-authorities.js +0 -65
  75. package/dist/generic/src/authorization/safe/request/decode-bearer-token.d.ts +0 -11
  76. package/dist/generic/src/authorization/safe/request/decode-bearer-token.d.ts.map +0 -1
  77. package/dist/generic/src/authorization/safe/request/decode-bearer-token.js +0 -31
  78. package/dist/generic/src/authorization/safe/request/decode-safe-request.d.ts +0 -11
  79. package/dist/generic/src/authorization/safe/request/decode-safe-request.d.ts.map +0 -1
  80. package/dist/generic/src/authorization/safe/request/decode-safe-request.js +0 -30
  81. package/dist/generic/src/authorization/safe/request/determine-issuer-from-request.d.ts +0 -10
  82. package/dist/generic/src/authorization/safe/request/determine-issuer-from-request.d.ts.map +0 -1
  83. package/dist/generic/src/authorization/safe/request/determine-issuer-from-request.js +0 -29
  84. package/dist/generic/src/authorization/safe/request/issuer/determine-issuer-from-bearer-token.d.ts +0 -12
  85. package/dist/generic/src/authorization/safe/request/issuer/determine-issuer-from-bearer-token.d.ts.map +0 -1
  86. package/dist/generic/src/authorization/safe/request/issuer/determine-issuer-from-bearer-token.js +0 -30
  87. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-audience.d.ts +0 -10
  88. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-audience.d.ts.map +0 -1
  89. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-audience.js +0 -24
  90. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-expiration-time.d.ts +0 -8
  91. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-expiration-time.d.ts.map +0 -1
  92. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-expiration-time.js +0 -23
  93. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issued-at-time.d.ts +0 -9
  94. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issued-at-time.d.ts.map +0 -1
  95. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issued-at-time.js +0 -24
  96. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issuer.d.ts +0 -10
  97. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issuer.d.ts.map +0 -1
  98. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issuer.js +0 -25
  99. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-not-before-time.d.ts +0 -8
  100. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-not-before-time.d.ts.map +0 -1
  101. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-not-before-time.js +0 -23
  102. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-subject.d.ts +0 -10
  103. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-subject.d.ts.map +0 -1
  104. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-subject.js +0 -22
  105. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-header.d.ts +0 -9
  106. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-header.d.ts.map +0 -1
  107. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-header.js +0 -25
  108. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-payload.d.ts +0 -11
  109. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-payload.d.ts.map +0 -1
  110. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-payload.js +0 -30
  111. package/dist/generic/src/errors/audit-log/audit-log-errors.d.ts +0 -20
  112. package/dist/generic/src/errors/audit-log/audit-log-errors.d.ts.map +0 -1
  113. package/dist/generic/src/errors/audit-log/audit-log-errors.js +0 -31
  114. package/dist/generic/src/errors/authorization/authorization-errors.d.ts +0 -106
  115. package/dist/generic/src/errors/authorization/authorization-errors.d.ts.map +0 -1
  116. package/dist/generic/src/errors/authorization/authorization-errors.js +0 -160
  117. package/dist/generic/src/errors/base-error.d.ts +0 -23
  118. package/dist/generic/src/errors/base-error.d.ts.map +0 -1
  119. package/dist/generic/src/errors/base-error.js +0 -34
  120. package/dist/generic/src/errors/database/database-errors.d.ts +0 -24
  121. package/dist/generic/src/errors/database/database-errors.d.ts.map +0 -1
  122. package/dist/generic/src/errors/database/database-errors.js +0 -33
  123. package/dist/generic/src/errors/generic/generic-errors.d.ts +0 -35
  124. package/dist/generic/src/errors/generic/generic-errors.d.ts.map +0 -1
  125. package/dist/generic/src/errors/generic/generic-errors.js +0 -47
  126. package/dist/generic/src/errors/index.d.ts +0 -10
  127. package/dist/generic/src/errors/index.d.ts.map +0 -1
  128. package/dist/generic/src/errors/index.js +0 -26
  129. package/dist/generic/src/errors/request/request-errors.d.ts +0 -98
  130. package/dist/generic/src/errors/request/request-errors.d.ts.map +0 -1
  131. package/dist/generic/src/errors/request/request-errors.js +0 -134
  132. package/dist/generic/src/errors/safe/safe-rules-errors.d.ts +0 -102
  133. package/dist/generic/src/errors/safe/safe-rules-errors.d.ts.map +0 -1
  134. package/dist/generic/src/errors/safe/safe-rules-errors.js +0 -152
  135. package/dist/generic/src/errors/scheduler/scheduler-errors.d.ts +0 -8
  136. package/dist/generic/src/errors/scheduler/scheduler-errors.d.ts.map +0 -1
  137. package/dist/generic/src/errors/scheduler/scheduler-errors.js +0 -14
  138. package/dist/generic/src/errors/share-data/share-data-errors.d.ts +0 -67
  139. package/dist/generic/src/errors/share-data/share-data-errors.d.ts.map +0 -1
  140. package/dist/generic/src/errors/share-data/share-data-errors.js +0 -92
  141. package/dist/generic/src/helpers/crypto/cryptography-helpers.d.ts +0 -37
  142. package/dist/generic/src/helpers/crypto/cryptography-helpers.d.ts.map +0 -1
  143. package/dist/generic/src/helpers/crypto/cryptography-helpers.js +0 -65
  144. package/dist/generic/src/helpers/object-validation-helpers.d.ts +0 -66
  145. package/dist/generic/src/helpers/object-validation-helpers.d.ts.map +0 -1
  146. package/dist/generic/src/helpers/object-validation-helpers.js +0 -254
  147. package/dist/generic/src/models/application/audit-log/application-audit-log-models.d.ts +0 -87
  148. package/dist/generic/src/models/application/audit-log/application-audit-log-models.d.ts.map +0 -1
  149. package/dist/generic/src/models/application/audit-log/application-audit-log-models.js +0 -59
  150. package/dist/generic/src/models/application/database/firestore-models.d.ts +0 -84
  151. package/dist/generic/src/models/application/database/firestore-models.d.ts.map +0 -1
  152. package/dist/generic/src/models/application/database/firestore-models.js +0 -4
  153. package/dist/generic/src/models/authorization/authorization-models.d.ts +0 -81
  154. package/dist/generic/src/models/authorization/authorization-models.d.ts.map +0 -1
  155. package/dist/generic/src/models/authorization/authorization-models.js +0 -33
  156. package/dist/generic/src/models/crypto/crypto-models.d.ts +0 -5
  157. package/dist/generic/src/models/crypto/crypto-models.d.ts.map +0 -1
  158. package/dist/generic/src/models/crypto/crypto-models.js +0 -3
  159. package/dist/generic/src/models/data/data-models.d.ts +0 -24
  160. package/dist/generic/src/models/data/data-models.d.ts.map +0 -1
  161. package/dist/generic/src/models/data/data-models.js +0 -3
  162. package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.d.ts +0 -9
  163. package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.d.ts.map +0 -1
  164. package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.js +0 -2
  165. package/dist/generic/src/models/events/share-event-models.d.ts +0 -65
  166. package/dist/generic/src/models/events/share-event-models.d.ts.map +0 -1
  167. package/dist/generic/src/models/events/share-event-models.js +0 -70
  168. package/dist/generic/src/models/functions/share-data-function-models.d.ts +0 -86
  169. package/dist/generic/src/models/functions/share-data-function-models.d.ts.map +0 -1
  170. package/dist/generic/src/models/functions/share-data-function-models.js +0 -17
  171. package/dist/generic/src/models/generic/request-response-models.d.ts +0 -8
  172. package/dist/generic/src/models/generic/request-response-models.d.ts.map +0 -1
  173. package/dist/generic/src/models/generic/request-response-models.js +0 -2
  174. package/dist/generic/src/models/index.d.ts +0 -13
  175. package/dist/generic/src/models/index.d.ts.map +0 -1
  176. package/dist/generic/src/models/index.js +0 -29
  177. package/dist/generic/src/models/rules/share-rule-models.d.ts +0 -303
  178. package/dist/generic/src/models/rules/share-rule-models.d.ts.map +0 -1
  179. package/dist/generic/src/models/rules/share-rule-models.js +0 -93
  180. package/dist/generic/src/models/safe/safe-transaction-models.d.ts +0 -81
  181. package/dist/generic/src/models/safe/safe-transaction-models.d.ts.map +0 -1
  182. package/dist/generic/src/models/safe/safe-transaction-models.js +0 -26
  183. package/dist/generic/src/models/share-data/share-data.d.ts +0 -56
  184. package/dist/generic/src/models/share-data/share-data.d.ts.map +0 -1
  185. package/dist/generic/src/models/share-data/share-data.js +0 -20
  186. /package/dist/{endpoints/src/cors → cors}/authority/audience/get-set-audiences.d.ts +0 -0
  187. /package/dist/{endpoints/src/cors → cors}/authority/audience/get-set-audiences.js +0 -0
  188. /package/dist/{endpoints/src/cors → cors}/authority/jwt/validate-jwt-authorities.d.ts +0 -0
  189. /package/dist/{endpoints/src/cors → cors}/endpoints/authorities/validate-authorities-transaction.d.ts +0 -0
  190. /package/dist/{endpoints/src/cors → cors}/endpoints/authorities/validate-authorities-transaction.js +0 -0
  191. /package/dist/{endpoints/src/cors → cors}/endpoints/helpers/validate-request-body.d.ts +0 -0
  192. /package/dist/{endpoints/src/cors → cors}/endpoints/helpers/validate-request-body.js +0 -0
  193. /package/dist/{endpoints/src/cors → cors}/errors/all-error-handler.d.ts +0 -0
  194. /package/dist/{endpoints/src/cors → cors}/errors/all-error-handler.js +0 -0
  195. /package/dist/{endpoints/src/cors → cors}/errors/bad-request-handler.d.ts +0 -0
  196. /package/dist/{endpoints/src/cors → cors}/errors/bad-request-handler.js +0 -0
  197. /package/dist/{endpoints/src/cors → cors}/errors/unauthorized-handler.d.ts +0 -0
  198. /package/dist/{endpoints/src/cors → cors}/errors/unauthorized-handler.js +0 -0
  199. /package/dist/{endpoints/src/cors → cors}/index.d.ts +0 -0
  200. /package/dist/{endpoints/src/cors → cors}/index.js +0 -0
  201. /package/dist/{endpoints/src/cors → cors}/routes/authorities.routes.d.ts +0 -0
  202. /package/dist/{endpoints/src/cors → cors}/routes/events.routes.d.ts +0 -0
  203. /package/dist/{endpoints/src/cors → cors}/routes/events.routes.js +0 -0
  204. /package/dist/{endpoints/src/cors → cors}/routes/functions.routes.d.ts +0 -0
  205. /package/dist/{endpoints/src/cors → cors}/routes/functions.routes.js +0 -0
  206. /package/dist/{endpoints/src/cors → cors}/routes/rules.routes.d.ts +0 -0
  207. /package/dist/{endpoints/src/cors → cors}/routes/rules.routes.js +0 -0
  208. /package/dist/{endpoints/src/cors → cors}/routes/share-data.routes.d.ts +0 -0
  209. /package/dist/{endpoints/src/cors → cors}/routes/share-data.routes.js +0 -0
  210. /package/dist/{endpoints/src/examples → examples}/express-server/app.d.ts +0 -0
  211. /package/dist/{endpoints/src/examples → examples}/express-server/server.d.ts +0 -0
  212. /package/dist/{endpoints/src/examples → examples}/express-server/server.js +0 -0
  213. /package/dist/{endpoints/src/index.d.ts → index.d.ts} +0 -0
  214. /package/dist/{endpoints/src/index.js → index.js} +0 -0
@@ -1,67 +0,0 @@
1
- import { BaseError } from '../base-error';
2
- import { ShareDataTypes } from '../../models/share-data/share-data';
3
- import { IShareDataFunction } from '../../models/functions/share-data-function-models';
4
- /**
5
- * This error is thrown when a function is tried to be applied to the share data thats state is locked.
6
- */
7
- export declare class ShareDataIsLockedError extends BaseError {
8
- /**
9
- * This error is thrown when a function is tried to be applied to the share data thats state is locked.
10
- */
11
- constructor(shareDataId: string, shareDataType: ShareDataTypes);
12
- }
13
- /**
14
- * This error is thrown when a data proposal matches the current data in the rules evaluation service.
15
- */
16
- export declare class ShareDataCurrentAndProposalDataMatchesError extends BaseError {
17
- /**
18
- * This error is thrown when a data proposal matches the current data in the rules evaluation service.
19
- */
20
- constructor(shareDataId: string);
21
- }
22
- /**
23
- * This error is thrown when the share data integrity check fails.
24
- */
25
- export declare class ShareDataIntegrityError extends BaseError {
26
- /**
27
- * This error is thrown when the share data integrity check fails.
28
- */
29
- constructor(shareDataId: string);
30
- }
31
- /**
32
- * This error is thrown when the attemping to be applied function does not exist on the share data.
33
- */
34
- export declare class ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError extends BaseError {
35
- /**
36
- * This error is thrown when the attemping to be applied function does not exist on the share data.
37
- */
38
- constructor(shareDataId: string, functionName: string, functionId: string);
39
- }
40
- /**
41
- * This error is thrown when the function hash is not valid.
42
- */
43
- export declare class ShareDataFunctionHashNotValid extends BaseError {
44
- /**
45
- * This error is thrown when the function hash is not valid.
46
- */
47
- constructor(shareDataId: string, shareDataFunction: IShareDataFunction, calculatedHash: string);
48
- }
49
- /**
50
- * This is thrown when a rule doesn't have current conditions present.
51
- */
52
- export declare class ShareRuleCurrentConditionsNotPresentError extends BaseError {
53
- /**
54
- * This is thrown when a rule doesn't have a before or after conditions.
55
- */
56
- constructor(ruleId: string);
57
- }
58
- /**
59
- * This is thrown when a rule doesn't have proposed conditions present.
60
- */
61
- export declare class ShareRuleProposedConditionsNotPresentError extends BaseError {
62
- /**
63
- * This is thrown when a rule doesn't have a before or after conditions.
64
- */
65
- constructor(ruleId: string);
66
- }
67
- //# sourceMappingURL=share-data-errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"share-data-errors.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/errors/share-data/share-data-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAEvF;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,SAAS;IACjD;;OAEG;gBACS,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc;CAGjE;AAED;;GAEG;AACH,qBAAa,2CAA4C,SAAQ,SAAS;IACtE;;OAEG;gBACS,WAAW,EAAE,MAAM;CAGlC;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,SAAS;IAClD;;OAEG;gBACS,WAAW,EAAE,MAAM;CAGlC;AAED;;GAEG;AACH,qBAAa,yDAA0D,SAAQ,SAAS;IACpF;;OAEG;gBACS,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAI5E;AAGD;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,SAAS;IACxD;;OAEG;gBACS,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM;CAIjG;AAKD;;GAEG;AACH,qBAAa,yCAA0C,SAAQ,SAAS;IACpE;;OAEG;gBACS,MAAM,EAAE,MAAM;CAG7B;AAED;;GAEG;AACH,qBAAa,0CAA2C,SAAQ,SAAS;IACrE;;OAEG;gBACS,MAAM,EAAE,MAAM;CAG7B"}
@@ -1,92 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShareRuleProposedConditionsNotPresentError = exports.ShareRuleCurrentConditionsNotPresentError = exports.ShareDataFunctionHashNotValid = exports.ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError = exports.ShareDataIntegrityError = exports.ShareDataCurrentAndProposalDataMatchesError = exports.ShareDataIsLockedError = void 0;
4
- const base_error_1 = require("../base-error");
5
- /**
6
- * This error is thrown when a function is tried to be applied to the share data thats state is locked.
7
- */
8
- class ShareDataIsLockedError extends base_error_1.BaseError {
9
- /**
10
- * This error is thrown when a function is tried to be applied to the share data thats state is locked.
11
- */
12
- constructor(shareDataId, shareDataType) {
13
- super(`Share data with id ${shareDataId} and type ${shareDataType} is locked and cannot be modified.`);
14
- }
15
- }
16
- exports.ShareDataIsLockedError = ShareDataIsLockedError;
17
- /**
18
- * This error is thrown when a data proposal matches the current data in the rules evaluation service.
19
- */
20
- class ShareDataCurrentAndProposalDataMatchesError extends base_error_1.BaseError {
21
- /**
22
- * This error is thrown when a data proposal matches the current data in the rules evaluation service.
23
- */
24
- constructor(shareDataId) {
25
- super(`Share data with id ${shareDataId} current and proposal data matches.`);
26
- }
27
- }
28
- exports.ShareDataCurrentAndProposalDataMatchesError = ShareDataCurrentAndProposalDataMatchesError;
29
- /**
30
- * This error is thrown when the share data integrity check fails.
31
- */
32
- class ShareDataIntegrityError extends base_error_1.BaseError {
33
- /**
34
- * This error is thrown when the share data integrity check fails.
35
- */
36
- constructor(shareDataId) {
37
- super(`Share data with id ${shareDataId} failed the integrity check.`);
38
- }
39
- }
40
- exports.ShareDataIntegrityError = ShareDataIntegrityError;
41
- /**
42
- * This error is thrown when the attemping to be applied function does not exist on the share data.
43
- */
44
- class ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError extends base_error_1.BaseError {
45
- /**
46
- * This error is thrown when the attemping to be applied function does not exist on the share data.
47
- */
48
- constructor(shareDataId, functionName, functionId) {
49
- super(`On share data with id ${shareDataId} the function with id: ${functionId} & name: ${functionName} that is trying to be executed, ` +
50
- 'but does not exist in the authorized functions for the share data.');
51
- }
52
- }
53
- exports.ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError = ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError;
54
- /**
55
- * This error is thrown when the function hash is not valid.
56
- */
57
- class ShareDataFunctionHashNotValid extends base_error_1.BaseError {
58
- /**
59
- * This error is thrown when the function hash is not valid.
60
- */
61
- constructor(shareDataId, shareDataFunction, calculatedHash) {
62
- super(`On share data with id ${shareDataId} the function with current hash: ${shareDataFunction.currentHash} & previous hase: ${shareDataFunction.previousHash}` +
63
- ` that is trying to be executed does not meet the generated hash ${calculatedHash}. This makes it an authorized function execution.`);
64
- }
65
- }
66
- exports.ShareDataFunctionHashNotValid = ShareDataFunctionHashNotValid;
67
- //#region Rules
68
- /**
69
- * This is thrown when a rule doesn't have current conditions present.
70
- */
71
- class ShareRuleCurrentConditionsNotPresentError extends base_error_1.BaseError {
72
- /**
73
- * This is thrown when a rule doesn't have a before or after conditions.
74
- */
75
- constructor(ruleId) {
76
- super(`Rule with id ${ruleId} does not have any current conditions present.`);
77
- }
78
- }
79
- exports.ShareRuleCurrentConditionsNotPresentError = ShareRuleCurrentConditionsNotPresentError;
80
- /**
81
- * This is thrown when a rule doesn't have proposed conditions present.
82
- */
83
- class ShareRuleProposedConditionsNotPresentError extends base_error_1.BaseError {
84
- /**
85
- * This is thrown when a rule doesn't have a before or after conditions.
86
- */
87
- constructor(ruleId) {
88
- super(`Rule with id ${ruleId} does not have any proposed conditions present.`);
89
- }
90
- }
91
- exports.ShareRuleProposedConditionsNotPresentError = ShareRuleProposedConditionsNotPresentError;
92
- //#endregion Rules
@@ -1,37 +0,0 @@
1
- /**
2
- * this function converts a hex string to a base64 string.
3
- *
4
- * @param hex the hex string to convert to base64
5
- * @returns
6
- */
7
- declare const hexToBase64: (hexString: string) => string;
8
- /**
9
- * this function converts a base64 string to a hex string.
10
- *
11
- * @param base64 the base64 string to convert to hex
12
- * @returns
13
- */
14
- declare const base64ToHex: (base64String: string) => string;
15
- /**
16
- * this function converts a base64 string to a PEM string for a public key.
17
- *
18
- * @param base64 the base64 string to convert to PEM format.
19
- * @returns
20
- */
21
- declare const base64ToPublicPEM: (base64: string) => string;
22
- /**
23
- * this function converts a base64 string to a PEM string for an elliptical curve private key.
24
- *
25
- * @param base64 the base64 string to convert to PEM format.
26
- * @returns
27
- */
28
- declare const base64ToPrivateECPEM: (base64: string) => string;
29
- /**
30
- * this function converts a base64 string to a PEM string for a private key.
31
- *
32
- * @param base64 the base64 string to convert to PEM format.
33
- * @returns
34
- */
35
- declare const base64ToPrivatePEM: (base64: string) => string;
36
- export { base64ToHex, base64ToPublicPEM, base64ToPrivateECPEM, base64ToPrivatePEM, hexToBase64, };
37
- //# sourceMappingURL=cryptography-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cryptography-helpers.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/helpers/crypto/cryptography-helpers.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,QAAA,MAAM,WAAW,cAAe,MAAM,KAAG,MAExC,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,WAAW,iBAAkB,MAAM,KAAG,MAE3C,CAAC;AAIF;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB,WAAY,MAAM,KAAG,MAK3C,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,oBAAoB,WAAY,MAAM,KAAG,MAK9C,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,kBAAkB,WAAY,MAAM,KAAG,MAK5C,CAAC;AAIF,OAAO,EACH,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,WAAW,GACd,CAAC"}
@@ -1,65 +0,0 @@
1
- "use strict";
2
- // This file contains the helper functions for cryptography in the application.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.hexToBase64 = exports.base64ToPrivatePEM = exports.base64ToPrivateECPEM = exports.base64ToPublicPEM = exports.base64ToHex = void 0;
5
- //#region hex to base 64 functions
6
- /**
7
- * this function converts a hex string to a base64 string.
8
- *
9
- * @param hex the hex string to convert to base64
10
- * @returns
11
- */
12
- const hexToBase64 = (hexString) => {
13
- return Buffer.from(hexString, 'hex').toString('base64');
14
- };
15
- exports.hexToBase64 = hexToBase64;
16
- /**
17
- * this function converts a base64 string to a hex string.
18
- *
19
- * @param base64 the base64 string to convert to hex
20
- * @returns
21
- */
22
- const base64ToHex = (base64String) => {
23
- return Buffer.from(base64String, 'base64').toString('hex');
24
- };
25
- exports.base64ToHex = base64ToHex;
26
- //#region base 64 to PEM functions
27
- /**
28
- * this function converts a base64 string to a PEM string for a public key.
29
- *
30
- * @param base64 the base64 string to convert to PEM format.
31
- * @returns
32
- */
33
- const base64ToPublicPEM = (base64) => {
34
- // split the base64 into 64 character chunks
35
- const regex = /.{64}/g;
36
- const formattedBase64 = base64.replace(regex, '$&\n');
37
- return `-----BEGIN PUBLIC KEY-----\n${formattedBase64}\n-----END PUBLIC KEY-----`;
38
- };
39
- exports.base64ToPublicPEM = base64ToPublicPEM;
40
- /**
41
- * this function converts a base64 string to a PEM string for an elliptical curve private key.
42
- *
43
- * @param base64 the base64 string to convert to PEM format.
44
- * @returns
45
- */
46
- const base64ToPrivateECPEM = (base64) => {
47
- // split the base64 into 64 character chunks
48
- const regex = /.{64}/g;
49
- const formattedBase64 = base64.replace(regex, '$&\n');
50
- return `-----BEGIN EC PRIVATE KEY-----\n${formattedBase64}\n-----END EC PRIVATE KEY-----`;
51
- };
52
- exports.base64ToPrivateECPEM = base64ToPrivateECPEM;
53
- /**
54
- * this function converts a base64 string to a PEM string for a private key.
55
- *
56
- * @param base64 the base64 string to convert to PEM format.
57
- * @returns
58
- */
59
- const base64ToPrivatePEM = (base64) => {
60
- // split the base64 into 64 character chunks
61
- const regex = /.{64}/g;
62
- const formattedBase64 = base64.replace(regex, '$&\n');
63
- return `-----BEGIN PRIVATE KEY-----\n${formattedBase64}\n-----END PRIVATE KEY-----`;
64
- };
65
- exports.base64ToPrivatePEM = base64ToPrivatePEM;
@@ -1,66 +0,0 @@
1
- /**
2
- * Checks that an object is an array and that it has the minimum number of items.
3
- *
4
- * @param incomingObject the object to check
5
- * @param minimumLength the minimum number of objects to match (zero by default)
6
- * @param maximumLength the maximum number of objects to match will default to the array length if not provided
7
- *
8
- * @returns whether the criteria matches.
9
- */
10
- declare const validateArray: (incomingObject: unknown, minimumLength?: number, maximumLength?: number) => boolean;
11
- /**
12
- * This validates an incoming shape of a boolean type data.
13
- *
14
- * @param incomingObject an object to validate as a boolean.
15
- * @param undefinedValid whether the item can be undefined or not (false by default)
16
- *
17
- * @returns whether the shape is valid.
18
- */
19
- declare const validateBoolean: (incomingObject: unknown, undefinedValid?: boolean) => boolean;
20
- /**
21
- * This validates a date object or a string that can be converted to a date object.
22
- * @param dateToValidate the date to validate
23
- * @param undefinedValid whether the item can be undefined or not (false by default)
24
- * @param allowFutureDated the date can be in the future (false by default)
25
- * @param ensureAtLeast18YearsAgo whether the date is at least 18 years ago (true by default)
26
- *
27
- * @returns
28
- */
29
- declare const validateDate: (dateToValidate: unknown, undefinedValid?: boolean, allowFutureDated?: boolean, ensureAtLeast18YearsAgo?: boolean) => boolean;
30
- /**
31
- * This validates that the incoming Object is a number and that it is in the range (if provided)
32
- *
33
- * @param incomingObject object to validate to a number
34
- * @param min (optional) minimum number
35
- * @param max (optional) maximum number
36
- * @returns
37
- */
38
- declare const validateNumber: (incomingObject: unknown, min?: number, max?: number) => boolean;
39
- /**
40
- * This validates an incoming shape of a set of files links to the data.
41
- *
42
- * @param incomingObject an object to validate as a string.
43
- * @param hasNoSpaces whether the item should have no spaces in it (false by default)
44
- * @param undefinedValid whether the item can be undefined or not (false by default)
45
- * @param emptyStringValid whether the item can be an empty string or not (false by default)
46
- *
47
- * @returns whether the shape is valid.
48
- */
49
- declare const validateString: (incomingObject: unknown, hasNoSpaces?: boolean, undefinedValid?: boolean, emptyStringValid?: boolean) => boolean;
50
- /**
51
- * This validates that an incoming object is a valid hex string without spaces.
52
- *
53
- * @param incomingObject the object to validate
54
- * @returns
55
- */
56
- declare const validateStringHex: (incomingObject: unknown) => boolean;
57
- /**
58
- * This validates that an incoming object is a valid URL.
59
- *
60
- * @param incomingUrl the URL to check
61
- * @param undefinedValid whether the item can be undefined or not (false by default)
62
- * @returns wether it is a valid URL or not
63
- */
64
- declare const validateUrl: (incomingUrl: unknown, undefinedValid?: boolean) => boolean;
65
- export { validateArray, validateBoolean, validateDate, validateNumber, validateString, validateStringHex, validateUrl, };
66
- //# sourceMappingURL=object-validation-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object-validation-helpers.d.ts","sourceRoot":"","sources":["../../../../../generic/src/helpers/object-validation-helpers.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,QAAA,MAAM,aAAa,mBAAoB,OAAO,0CAAqC,MAAM,KAAG,OAc3F,CAAC;AAEF;;;;;;;GAOG;AACH,QAAA,MAAM,eAAe,mBAAoB,OAAO,+BAA2B,OAS1E,CAAC;AAEF;;;;;;;;GAQG;AACH,QAAA,MAAM,YAAY,mBAAoB,OAAO,8FACP,OAoCrC,CAAC;AAEF;;;;;;;GAOG;AACH,QAAA,MAAM,cAAc,mBAAoB,OAAO,QAAQ,MAAM,QAAQ,MAAM,KAAG,OAU7E,CAAC;AAEF;;;;;;;;;GASG;AACH,QAAA,MAAM,cAAc,mBAAoB,OAAO,kFAA0E,OAiCxH,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB,mBAAoB,OAAO,KAAG,OAepD,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,WAAW,gBAAiB,OAAO,+BAA2B,OAqBnE,CAAC;AA+CF,OAAO,EACH,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,WAAW,GACd,CAAC"}
@@ -1,254 +0,0 @@
1
- "use strict";
2
- // This file contains the validation functions for objects.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.validateUrl = exports.validateStringHex = exports.validateString = exports.validateNumber = exports.validateDate = exports.validateBoolean = exports.validateArray = void 0;
5
- /**
6
- * Checks that an object is an array and that it has the minimum number of items.
7
- *
8
- * @param incomingObject the object to check
9
- * @param minimumLength the minimum number of objects to match (zero by default)
10
- * @param maximumLength the maximum number of objects to match will default to the array length if not provided
11
- *
12
- * @returns whether the criteria matches.
13
- */
14
- const validateArray = (incomingObject, minimumLength = 0, maximumLength) => {
15
- if (incomingObject && Array.isArray(incomingObject) && incomingObject.length >= minimumLength) {
16
- if (!maximumLength) {
17
- return true;
18
- }
19
- else {
20
- if (incomingObject.length <= maximumLength) {
21
- return true;
22
- }
23
- else {
24
- return false;
25
- }
26
- }
27
- }
28
- else {
29
- return false;
30
- }
31
- };
32
- exports.validateArray = validateArray;
33
- /**
34
- * This validates an incoming shape of a boolean type data.
35
- *
36
- * @param incomingObject an object to validate as a boolean.
37
- * @param undefinedValid whether the item can be undefined or not (false by default)
38
- *
39
- * @returns whether the shape is valid.
40
- */
41
- const validateBoolean = (incomingObject, undefinedValid = false) => {
42
- if (undefinedValid && typeof incomingObject === 'undefined') { // if undefined is valid and it"s undefined
43
- return true;
44
- }
45
- if (typeof incomingObject === 'boolean') {
46
- return true;
47
- }
48
- else {
49
- return false;
50
- }
51
- };
52
- exports.validateBoolean = validateBoolean;
53
- /**
54
- * This validates a date object or a string that can be converted to a date object.
55
- * @param dateToValidate the date to validate
56
- * @param undefinedValid whether the item can be undefined or not (false by default)
57
- * @param allowFutureDated the date can be in the future (false by default)
58
- * @param ensureAtLeast18YearsAgo whether the date is at least 18 years ago (true by default)
59
- *
60
- * @returns
61
- */
62
- const validateDate = (dateToValidate, undefinedValid = false, allowFutureDated = false, ensureAtLeast18YearsAgo = false) => {
63
- if (undefinedValid && (typeof dateToValidate === 'undefined' || dateToValidate === '' || dateToValidate === null)) {
64
- return true;
65
- }
66
- let date; // a placeholder for the date object
67
- if (typeof dateToValidate === 'string') {
68
- date = new Date(dateToValidate); // try to parse the date
69
- if (isNaN(date.getTime())) { // if it's not a valid date
70
- return false; // return false
71
- }
72
- return true;
73
- }
74
- else {
75
- if (!(typeof dateToValidate === 'object' && dateToValidate !== null)) {
76
- return false; // the date isn't an object
77
- }
78
- if (Object.prototype.toString.call(dateToValidate) !== '[object Date]') {
79
- return false; // the date isn't a date object
80
- }
81
- // Check if the date is in the future and this is not allowed
82
- if (!allowFutureDated && dateToValidate > new Date()) {
83
- return false;
84
- }
85
- // determine if the date is newer than 18 years in the past
86
- if (ensureAtLeast18YearsAgo) {
87
- const today = new Date();
88
- const eighteenYearsAgo = new Date(today.getFullYear() - 18, today.getMonth(), today.getDate());
89
- return dateToValidate <= eighteenYearsAgo;
90
- }
91
- // otherwise the date is valid.
92
- return true;
93
- }
94
- };
95
- exports.validateDate = validateDate;
96
- /**
97
- * This validates that the incoming Object is a number and that it is in the range (if provided)
98
- *
99
- * @param incomingObject object to validate to a number
100
- * @param min (optional) minimum number
101
- * @param max (optional) maximum number
102
- * @returns
103
- */
104
- const validateNumber = (incomingObject, min, max) => {
105
- if (typeof incomingObject === 'number') {
106
- if (validateMin(incomingObject, min) && validateMax(incomingObject, max)) {
107
- return true;
108
- }
109
- else {
110
- return false;
111
- }
112
- }
113
- else {
114
- return false;
115
- }
116
- };
117
- exports.validateNumber = validateNumber;
118
- /**
119
- * This validates an incoming shape of a set of files links to the data.
120
- *
121
- * @param incomingObject an object to validate as a string.
122
- * @param hasNoSpaces whether the item should have no spaces in it (false by default)
123
- * @param undefinedValid whether the item can be undefined or not (false by default)
124
- * @param emptyStringValid whether the item can be an empty string or not (false by default)
125
- *
126
- * @returns whether the shape is valid.
127
- */
128
- const validateString = (incomingObject, hasNoSpaces = false, undefinedValid = false, emptyStringValid = false) => {
129
- // if undefined is valid and check if it's undefined and if so, return true
130
- if (undefinedValid) {
131
- if (typeof incomingObject === 'undefined') { // if undefined is valid and it"s undefined
132
- return true;
133
- }
134
- if (incomingObject === null) { // include null values.
135
- return true;
136
- }
137
- }
138
- // Check if the string is empty and if it's valid to be empty
139
- if (emptyStringValid) {
140
- if (typeof incomingObject === 'string' && incomingObject.length === 0) {
141
- return true;
142
- }
143
- }
144
- // if it's a string and it's not empty
145
- if (typeof incomingObject === 'string') {
146
- // check that it is a string and that it is not empty
147
- if (incomingObject.length === 0) {
148
- return false;
149
- }
150
- // check if it has no spaces
151
- if (hasNoSpaces) {
152
- return incomingObject.indexOf(' ') === -1;
153
- }
154
- // otherwise it's a valid string
155
- return true;
156
- }
157
- else {
158
- return false;
159
- }
160
- };
161
- exports.validateString = validateString;
162
- /**
163
- * This validates that an incoming object is a valid hex string without spaces.
164
- *
165
- * @param incomingObject the object to validate
166
- * @returns
167
- */
168
- const validateStringHex = (incomingObject) => {
169
- // make sure its a string
170
- const isStringWithoutSpaces = validateString(incomingObject, true, false, false);
171
- // make sure its a valid hex string
172
- if (!isStringWithoutSpaces) {
173
- return false;
174
- }
175
- // check that it is a hex string
176
- const hexStringRegexp = /^[0-9a-fA-F]+$/;
177
- if (!hexStringRegexp.test(incomingObject)) {
178
- return false;
179
- }
180
- return true;
181
- };
182
- exports.validateStringHex = validateStringHex;
183
- /**
184
- * This validates that an incoming object is a valid URL.
185
- *
186
- * @param incomingUrl the URL to check
187
- * @param undefinedValid whether the item can be undefined or not (false by default)
188
- * @returns wether it is a valid URL or not
189
- */
190
- const validateUrl = (incomingUrl, undefinedValid = false) => {
191
- if (undefinedValid && (typeof incomingUrl === 'undefined' || incomingUrl === '')) { // if undefined is valid and it"s undefined
192
- return true;
193
- }
194
- if (typeof incomingUrl !== 'string') {
195
- return false;
196
- }
197
- if (incomingUrl.indexOf(' ') !== -1) {
198
- return false;
199
- }
200
- //Is it recognized as a valid URL?
201
- let givenURL;
202
- try {
203
- givenURL = new URL(incomingUrl);
204
- //Is the domain name a valid one with TLD and using HTTP or HTTPS?
205
- const validDomainRegexp = /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/im;
206
- return validDomainRegexp.test(givenURL.host) && (givenURL.protocol === 'http:' || givenURL.protocol === 'https:');
207
- }
208
- catch (error) {
209
- return false;
210
- }
211
- };
212
- exports.validateUrl = validateUrl;
213
- //#endregion Public Functions
214
- //#region Internal Functions
215
- /**
216
- * validates that an incoming number is greater than the minimum if it was provided.
217
- *
218
- * @param incomingNumber the number to check
219
- * @param min the minimum value.
220
- * @returns
221
- */
222
- const validateMin = (incomingNumber, min) => {
223
- if (typeof min === 'number') {
224
- if (incomingNumber >= min) {
225
- return true;
226
- }
227
- else {
228
- return false;
229
- }
230
- }
231
- else {
232
- return true;
233
- }
234
- };
235
- /**
236
- * validates that an incoming number is less than or equal to the mamimum if it was provided.
237
- *
238
- * @param incomingNumber the number to check
239
- * @param max the maximum value.
240
- * @returns
241
- */
242
- const validateMax = (incomingNumber, max) => {
243
- if (typeof max === 'number') {
244
- if (incomingNumber <= max) {
245
- return true;
246
- }
247
- else {
248
- return false;
249
- }
250
- }
251
- else {
252
- return true;
253
- }
254
- };
@@ -1,87 +0,0 @@
1
- /**
2
- * This contains interfaces for the audit logs that are generated in the system.
3
- * This type of audit log is used to create and log application functions within a non structured database.
4
- */
5
- export type IApplicationAuditLog = IApplicationAuditLogUnstructured;
6
- /**
7
- * This is an application audit log.
8
- */
9
- export interface IApplicationAuditLogUnstructured {
10
- additionalAuditLogIds: IAdditionalApplicationAuditLogIds[];
11
- applicationAuditLogAction: ApplicationAuditLogAction;
12
- applicationAuditLogType: ApplicationAuditLogType;
13
- applicationAuditLogSubType: ApplicationAuditLogSubType;
14
- createdAt: number;
15
- createdBy: string;
16
- currentData?: any;
17
- previousData?: any;
18
- }
19
- /**
20
- * This contains the additional audit log Ids in order of the access in the application
21
- * for database this would be the reference path and reference Id
22
- * for User Financial data this would be
23
- * [
24
- * { referencePath: 'Administrator', referenceId: '{{ administratorId }} ' }, // These are every path downstream from the root data
25
- * { referencePath: 'Accounts', referenceId: '{{ accountId }}' },
26
- * ]
27
- *
28
- * These are available in the helper files based on the Application Audit Log Sub Types.
29
- */
30
- export interface IAdditionalApplicationAuditLogIds {
31
- referencePath: string;
32
- referenceId: string;
33
- }
34
- /**
35
- * This contains the enum for the audit log actions.
36
- */
37
- export declare enum ApplicationAuditLogAction {
38
- create = "create",
39
- update = "update",
40
- delete = "delete",
41
- read = "read",
42
- list = "list",
43
- file = "file"
44
- }
45
- /**
46
- * This contains the model for the audit logs that are generated in the system.
47
- */
48
- export declare enum ApplicationAuditLogType {
49
- authorizedAuthority = "authorizedAuthority",// the authorized authority audit log
50
- global = "global"
51
- }
52
- /**
53
- * This contains the enum for the audit log sub types for the multiple path classes.
54
- */
55
- export declare enum MultiplePathAuditLogSubType {
56
- multiplePathALAI = "multiplePathALAI"
57
- }
58
- /**
59
- * This contains the interface for keeping the query audit log and value.
60
- */
61
- export interface IQueryObjectAndValueForAuditLog {
62
- queryObject: string;
63
- queryValue: string | number | boolean;
64
- }
65
- /**
66
- * This contains the enum for the audit log sub types.
67
- */
68
- export type ApplicationAuditLogSubType = AdministrationAuditLogSubType | UserAuditLogSubType | PublicDataAuditLogSubType | MultiplePathAuditLogSubType;
69
- /**
70
- * This contains the enum for the audit log sub types for the administrator classes.
71
- */
72
- export declare enum AdministrationAuditLogSubType {
73
- administrator = "administrator"
74
- }
75
- /**
76
- * This contains the enum for the audit log sub types for the user classes.
77
- */
78
- export declare enum UserAuditLogSubType {
79
- profile = "profile"
80
- }
81
- /**
82
- * This contains the enum for the audit log sub types for the public data classes.
83
- */
84
- export declare enum PublicDataAuditLogSubType {
85
- userRelatedProfile = "userRelatedProfile"
86
- }
87
- //# sourceMappingURL=application-audit-log-models.d.ts.map