@degenerate/endpoints 0.0.3 → 0.0.4

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 (212) hide show
  1. package/dist/endpoints/src/cors/authority/audience/get-set-audiences.d.ts +60 -0
  2. package/dist/endpoints/src/cors/authority/audience/get-set-audiences.d.ts.map +1 -0
  3. package/dist/endpoints/src/cors/authority/audience/get-set-audiences.js +90 -0
  4. package/dist/endpoints/src/cors/authority/jwt/validate-jwt-authorities.d.ts +16 -0
  5. package/dist/endpoints/src/cors/authority/jwt/validate-jwt-authorities.d.ts.map +1 -0
  6. package/dist/endpoints/src/cors/authority/jwt/validate-jwt-authorities.js +34 -0
  7. package/dist/endpoints/src/cors/endpoints/authorities/validate-authorities-transaction.d.ts +30 -0
  8. package/dist/endpoints/src/cors/endpoints/authorities/validate-authorities-transaction.d.ts.map +1 -0
  9. package/dist/endpoints/src/cors/endpoints/authorities/validate-authorities-transaction.js +155 -0
  10. package/dist/endpoints/src/cors/endpoints/helpers/validate-request-body.d.ts +11 -0
  11. package/dist/endpoints/src/cors/endpoints/helpers/validate-request-body.d.ts.map +1 -0
  12. package/dist/endpoints/src/cors/endpoints/helpers/validate-request-body.js +32 -0
  13. package/dist/{cors → endpoints/src/cors}/errors/all-error-handler.d.ts +2 -2
  14. package/dist/endpoints/src/cors/errors/all-error-handler.d.ts.map +1 -0
  15. package/dist/{cors → endpoints/src/cors}/errors/all-error-handler.js +1 -0
  16. package/dist/endpoints/src/cors/errors/bad-request-handler.d.ts +12 -0
  17. package/dist/endpoints/src/cors/errors/bad-request-handler.d.ts.map +1 -0
  18. package/dist/{cors → endpoints/src/cors}/errors/bad-request-handler.js +1 -0
  19. package/dist/endpoints/src/cors/errors/unauthorized-handler.d.ts +12 -0
  20. package/dist/endpoints/src/cors/errors/unauthorized-handler.d.ts.map +1 -0
  21. package/dist/{cors → endpoints/src/cors}/errors/unauthorized-handler.js +1 -0
  22. package/dist/endpoints/src/cors/index.d.ts +9 -0
  23. package/dist/endpoints/src/cors/index.d.ts.map +1 -0
  24. package/dist/{cors → endpoints/src/cors}/index.js +7 -0
  25. package/dist/endpoints/src/cors/routes/authorities.routes.d.ts +2 -0
  26. package/dist/endpoints/src/cors/routes/authorities.routes.d.ts.map +1 -0
  27. package/dist/endpoints/src/cors/routes/authorities.routes.js +69 -0
  28. package/dist/endpoints/src/cors/routes/events.routes.d.ts +2 -0
  29. package/dist/endpoints/src/cors/routes/events.routes.d.ts.map +1 -0
  30. package/dist/endpoints/src/cors/routes/events.routes.js +56 -0
  31. package/dist/endpoints/src/cors/routes/functions.routes.d.ts +2 -0
  32. package/dist/endpoints/src/cors/routes/functions.routes.d.ts.map +1 -0
  33. package/dist/endpoints/src/cors/routes/functions.routes.js +56 -0
  34. package/dist/endpoints/src/cors/routes/rules.routes.d.ts +2 -0
  35. package/dist/endpoints/src/cors/routes/rules.routes.d.ts.map +1 -0
  36. package/dist/endpoints/src/cors/routes/rules.routes.js +56 -0
  37. package/dist/endpoints/src/cors/routes/share-data.routes.d.ts +2 -0
  38. package/dist/endpoints/src/cors/routes/share-data.routes.d.ts.map +1 -0
  39. package/dist/endpoints/src/cors/routes/share-data.routes.js +56 -0
  40. package/dist/endpoints/src/examples/express-server/app.d.ts +3 -0
  41. package/dist/endpoints/src/examples/express-server/app.d.ts.map +1 -0
  42. package/dist/endpoints/src/examples/express-server/app.js +29 -0
  43. package/dist/endpoints/src/examples/express-server/server.d.ts +2 -0
  44. package/dist/endpoints/src/examples/express-server/server.d.ts.map +1 -0
  45. package/dist/endpoints/src/examples/express-server/server.js +9 -0
  46. package/dist/{index.d.ts.map → endpoints/src/index.d.ts.map} +1 -1
  47. package/dist/generic/src/_settings/authorization-settings.d.ts +17 -0
  48. package/dist/generic/src/_settings/authorization-settings.d.ts.map +1 -0
  49. package/dist/generic/src/_settings/authorization-settings.js +20 -0
  50. package/dist/generic/src/authorization/index.d.ts +24 -0
  51. package/dist/generic/src/authorization/index.d.ts.map +1 -0
  52. package/dist/generic/src/authorization/index.js +61 -0
  53. package/dist/generic/src/authorization/jwt/keys/create-public-key-pem.d.ts +9 -0
  54. package/dist/generic/src/authorization/jwt/keys/create-public-key-pem.d.ts.map +1 -0
  55. package/dist/generic/src/authorization/jwt/keys/create-public-key-pem.js +25 -0
  56. package/dist/generic/src/authorization/jwt/keys/create-secret-key-pem.d.ts +9 -0
  57. package/dist/generic/src/authorization/jwt/keys/create-secret-key-pem.d.ts.map +1 -0
  58. package/dist/generic/src/authorization/jwt/keys/create-secret-key-pem.js +24 -0
  59. package/dist/generic/src/authorization/jwt/sign/create-authorization-issuer.d.ts +10 -0
  60. package/dist/generic/src/authorization/jwt/sign/create-authorization-issuer.d.ts.map +1 -0
  61. package/dist/generic/src/authorization/jwt/sign/create-authorization-issuer.js +26 -0
  62. package/dist/generic/src/authorization/jwt/sign/create-authorization-subject.d.ts +12 -0
  63. package/dist/generic/src/authorization/jwt/sign/create-authorization-subject.d.ts.map +1 -0
  64. package/dist/generic/src/authorization/jwt/sign/create-authorization-subject.js +19 -0
  65. package/dist/generic/src/authorization/jwt/sign/create-jwt-options.d.ts +17 -0
  66. package/dist/generic/src/authorization/jwt/sign/create-jwt-options.d.ts.map +1 -0
  67. package/dist/generic/src/authorization/jwt/sign/create-jwt-options.js +43 -0
  68. package/dist/generic/src/authorization/jwt/sign/create-jwt-signed-token.d.ts +13 -0
  69. package/dist/generic/src/authorization/jwt/sign/create-jwt-signed-token.d.ts.map +1 -0
  70. package/dist/generic/src/authorization/jwt/sign/create-jwt-signed-token.js +22 -0
  71. package/dist/generic/src/authorization/jwt/transform/transform-token-payload-to-safe-payload.d.ts +10 -0
  72. package/dist/generic/src/authorization/jwt/transform/transform-token-payload-to-safe-payload.d.ts.map +1 -0
  73. package/dist/generic/src/authorization/jwt/transform/transform-token-payload-to-safe-payload.js +31 -0
  74. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-header.d.ts +10 -0
  75. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-header.d.ts.map +1 -0
  76. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-header.js +20 -0
  77. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-signed-token-payload.d.ts +9 -0
  78. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-signed-token-payload.d.ts.map +1 -0
  79. package/dist/generic/src/authorization/jwt/verify/get-decoded-jwt-signed-token-payload.js +17 -0
  80. package/dist/generic/src/authorization/jwt/verify/verify-jwt-signed-token.d.ts +12 -0
  81. package/dist/generic/src/authorization/jwt/verify/verify-jwt-signed-token.d.ts.map +1 -0
  82. package/dist/generic/src/authorization/jwt/verify/verify-jwt-signed-token.js +34 -0
  83. package/dist/generic/src/authorization/safe/authorization/authorized-authorities.d.ts +42 -0
  84. package/dist/generic/src/authorization/safe/authorization/authorized-authorities.d.ts.map +1 -0
  85. package/dist/generic/src/authorization/safe/authorization/authorized-authorities.js +65 -0
  86. package/dist/generic/src/authorization/safe/request/decode-bearer-token.d.ts +11 -0
  87. package/dist/generic/src/authorization/safe/request/decode-bearer-token.d.ts.map +1 -0
  88. package/dist/generic/src/authorization/safe/request/decode-bearer-token.js +31 -0
  89. package/dist/generic/src/authorization/safe/request/decode-safe-request.d.ts +11 -0
  90. package/dist/generic/src/authorization/safe/request/decode-safe-request.d.ts.map +1 -0
  91. package/dist/generic/src/authorization/safe/request/decode-safe-request.js +30 -0
  92. package/dist/generic/src/authorization/safe/request/determine-issuer-from-request.d.ts +10 -0
  93. package/dist/generic/src/authorization/safe/request/determine-issuer-from-request.d.ts.map +1 -0
  94. package/dist/generic/src/authorization/safe/request/determine-issuer-from-request.js +29 -0
  95. package/dist/generic/src/authorization/safe/request/issuer/determine-issuer-from-bearer-token.d.ts +12 -0
  96. package/dist/generic/src/authorization/safe/request/issuer/determine-issuer-from-bearer-token.d.ts.map +1 -0
  97. package/dist/generic/src/authorization/safe/request/issuer/determine-issuer-from-bearer-token.js +30 -0
  98. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-audience.d.ts +10 -0
  99. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-audience.d.ts.map +1 -0
  100. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-audience.js +24 -0
  101. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-expiration-time.d.ts +8 -0
  102. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-expiration-time.d.ts.map +1 -0
  103. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-expiration-time.js +23 -0
  104. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issued-at-time.d.ts +9 -0
  105. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issued-at-time.d.ts.map +1 -0
  106. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issued-at-time.js +24 -0
  107. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issuer.d.ts +10 -0
  108. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issuer.d.ts.map +1 -0
  109. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-issuer.js +25 -0
  110. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-not-before-time.d.ts +8 -0
  111. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-not-before-time.d.ts.map +1 -0
  112. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-not-before-time.js +23 -0
  113. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-subject.d.ts +10 -0
  114. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-subject.d.ts.map +1 -0
  115. package/dist/generic/src/authorization/safe/validation/jwt/payload/verify-authorization-subject.js +22 -0
  116. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-header.d.ts +9 -0
  117. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-header.d.ts.map +1 -0
  118. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-header.js +25 -0
  119. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-payload.d.ts +11 -0
  120. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-payload.d.ts.map +1 -0
  121. package/dist/generic/src/authorization/safe/validation/jwt/verify-token-payload.js +30 -0
  122. package/dist/generic/src/errors/audit-log/audit-log-errors.d.ts +20 -0
  123. package/dist/generic/src/errors/audit-log/audit-log-errors.d.ts.map +1 -0
  124. package/dist/generic/src/errors/audit-log/audit-log-errors.js +31 -0
  125. package/dist/generic/src/errors/authorization/authorization-errors.d.ts +106 -0
  126. package/dist/generic/src/errors/authorization/authorization-errors.d.ts.map +1 -0
  127. package/dist/generic/src/errors/authorization/authorization-errors.js +160 -0
  128. package/dist/generic/src/errors/base-error.d.ts +23 -0
  129. package/dist/generic/src/errors/base-error.d.ts.map +1 -0
  130. package/dist/generic/src/errors/base-error.js +34 -0
  131. package/dist/generic/src/errors/database/database-errors.d.ts +24 -0
  132. package/dist/generic/src/errors/database/database-errors.d.ts.map +1 -0
  133. package/dist/generic/src/errors/database/database-errors.js +33 -0
  134. package/dist/generic/src/errors/generic/generic-errors.d.ts +35 -0
  135. package/dist/generic/src/errors/generic/generic-errors.d.ts.map +1 -0
  136. package/dist/generic/src/errors/generic/generic-errors.js +47 -0
  137. package/dist/generic/src/errors/index.d.ts +10 -0
  138. package/dist/generic/src/errors/index.d.ts.map +1 -0
  139. package/dist/generic/src/errors/index.js +26 -0
  140. package/dist/generic/src/errors/request/request-errors.d.ts +98 -0
  141. package/dist/generic/src/errors/request/request-errors.d.ts.map +1 -0
  142. package/dist/generic/src/errors/request/request-errors.js +134 -0
  143. package/dist/generic/src/errors/safe/safe-rules-errors.d.ts +102 -0
  144. package/dist/generic/src/errors/safe/safe-rules-errors.d.ts.map +1 -0
  145. package/dist/generic/src/errors/safe/safe-rules-errors.js +152 -0
  146. package/dist/generic/src/errors/scheduler/scheduler-errors.d.ts +8 -0
  147. package/dist/generic/src/errors/scheduler/scheduler-errors.d.ts.map +1 -0
  148. package/dist/generic/src/errors/scheduler/scheduler-errors.js +14 -0
  149. package/dist/generic/src/errors/share-data/share-data-errors.d.ts +67 -0
  150. package/dist/generic/src/errors/share-data/share-data-errors.d.ts.map +1 -0
  151. package/dist/generic/src/errors/share-data/share-data-errors.js +92 -0
  152. package/dist/generic/src/helpers/crypto/cryptography-helpers.d.ts +37 -0
  153. package/dist/generic/src/helpers/crypto/cryptography-helpers.d.ts.map +1 -0
  154. package/dist/generic/src/helpers/crypto/cryptography-helpers.js +65 -0
  155. package/dist/generic/src/helpers/object-validation-helpers.d.ts +66 -0
  156. package/dist/generic/src/helpers/object-validation-helpers.d.ts.map +1 -0
  157. package/dist/generic/src/helpers/object-validation-helpers.js +254 -0
  158. package/dist/generic/src/models/application/audit-log/application-audit-log-models.d.ts +87 -0
  159. package/dist/generic/src/models/application/audit-log/application-audit-log-models.d.ts.map +1 -0
  160. package/dist/generic/src/models/application/audit-log/application-audit-log-models.js +59 -0
  161. package/dist/generic/src/models/application/database/firestore-models.d.ts +84 -0
  162. package/dist/generic/src/models/application/database/firestore-models.d.ts.map +1 -0
  163. package/dist/generic/src/models/application/database/firestore-models.js +4 -0
  164. package/dist/generic/src/models/authorization/authorization-models.d.ts +81 -0
  165. package/dist/generic/src/models/authorization/authorization-models.d.ts.map +1 -0
  166. package/dist/generic/src/models/authorization/authorization-models.js +33 -0
  167. package/dist/generic/src/models/crypto/crypto-models.d.ts +5 -0
  168. package/dist/generic/src/models/crypto/crypto-models.d.ts.map +1 -0
  169. package/dist/generic/src/models/crypto/crypto-models.js +3 -0
  170. package/dist/generic/src/models/data/data-models.d.ts +24 -0
  171. package/dist/generic/src/models/data/data-models.d.ts.map +1 -0
  172. package/dist/generic/src/models/data/data-models.js +3 -0
  173. package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.d.ts +9 -0
  174. package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.d.ts.map +1 -0
  175. package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.js +2 -0
  176. package/dist/generic/src/models/events/share-event-models.d.ts +65 -0
  177. package/dist/generic/src/models/events/share-event-models.d.ts.map +1 -0
  178. package/dist/generic/src/models/events/share-event-models.js +70 -0
  179. package/dist/generic/src/models/functions/share-data-function-models.d.ts +86 -0
  180. package/dist/generic/src/models/functions/share-data-function-models.d.ts.map +1 -0
  181. package/dist/generic/src/models/functions/share-data-function-models.js +17 -0
  182. package/dist/generic/src/models/generic/request-response-models.d.ts +8 -0
  183. package/dist/generic/src/models/generic/request-response-models.d.ts.map +1 -0
  184. package/dist/generic/src/models/generic/request-response-models.js +2 -0
  185. package/dist/generic/src/models/index.d.ts +13 -0
  186. package/dist/generic/src/models/index.d.ts.map +1 -0
  187. package/dist/generic/src/models/index.js +29 -0
  188. package/dist/generic/src/models/rules/share-rule-models.d.ts +303 -0
  189. package/dist/generic/src/models/rules/share-rule-models.d.ts.map +1 -0
  190. package/dist/generic/src/models/rules/share-rule-models.js +93 -0
  191. package/dist/generic/src/models/safe/safe-transaction-models.d.ts +81 -0
  192. package/dist/generic/src/models/safe/safe-transaction-models.d.ts.map +1 -0
  193. package/dist/generic/src/models/safe/safe-transaction-models.js +26 -0
  194. package/dist/generic/src/models/share-data/share-data.d.ts +56 -0
  195. package/dist/generic/src/models/share-data/share-data.d.ts.map +1 -0
  196. package/dist/generic/src/models/share-data/share-data.js +20 -0
  197. package/package.json +4 -3
  198. package/dist/cors/authority/audience/set-audience-authority.d.ts +0 -1
  199. package/dist/cors/authority/audience/set-audience-authority.d.ts.map +0 -1
  200. package/dist/cors/authority/audience/set-audience-authority.js +0 -1
  201. package/dist/cors/authority/jwt/validate-jwt-authority.d.ts +0 -1
  202. package/dist/cors/authority/jwt/validate-jwt-authority.d.ts.map +0 -1
  203. package/dist/cors/authority/jwt/validate-jwt-authority.js +0 -1
  204. package/dist/cors/errors/all-error-handler.d.ts.map +0 -1
  205. package/dist/cors/errors/bad-request-handler.d.ts +0 -12
  206. package/dist/cors/errors/bad-request-handler.d.ts.map +0 -1
  207. package/dist/cors/errors/unauthorized-handler.d.ts +0 -12
  208. package/dist/cors/errors/unauthorized-handler.d.ts.map +0 -1
  209. package/dist/cors/index.d.ts +0 -4
  210. package/dist/cors/index.d.ts.map +0 -1
  211. /package/dist/{index.d.ts → endpoints/src/index.d.ts} +0 -0
  212. /package/dist/{index.js → endpoints/src/index.js} +0 -0
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file contains all models for the dynamic eexecution fo functions.
3
+ */
4
+ export interface IDynamicExecutionOutput {
5
+ output: any;
6
+ executionTime: number;
7
+ timeoutStepsConsumed: number;
8
+ }
9
+ //# sourceMappingURL=dynamic-execution-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-execution-models.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/models/dynamic-execution/dynamic-execution-models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,MAAM,EAAE,GAAG,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;CAChC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,65 @@
1
+ /**
2
+ * This contains the interfaces for all event data types that can be run on the network.
3
+ */
4
+ /**
5
+ * This is the types of events that can be run on the network.
6
+ */
7
+ export declare enum ShareEventType {
8
+ Application = "Application",
9
+ DataChange = "DataChange",
10
+ Scheduled = "Scheduled"
11
+ }
12
+ /**
13
+ * All sources of event trusts
14
+ */
15
+ export declare enum EventSourceTruthType {
16
+ Crypto = "Crypto",
17
+ Oauth = "Oauth",
18
+ ShareBlock = "ShareBlock"
19
+ }
20
+ /**
21
+ * All the types of proofs that can be sent from the sources of event execution truths.
22
+ */
23
+ export declare enum EventSourceTruthProofType {
24
+ Hash = "Hash",
25
+ Signature = "Signature"
26
+ }
27
+ /**
28
+ * This is the type of processing that can be done on the share data event.
29
+ */
30
+ export declare enum ShareDataEventProcessingType {
31
+ Parallel = "parallel",
32
+ Linear = "linear"
33
+ }
34
+ /**
35
+ * This is the interface for the share data event.
36
+ */
37
+ export interface ShareDataEvent {
38
+ eventId: string;
39
+ locked: boolean;
40
+ eventType: ShareEventType;
41
+ eventSource: string;
42
+ eventSourceTruthType: EventSourceTruthType;
43
+ eventSourceTruthProofType: EventSourceTruthProofType;
44
+ eventSourceTruthProof: string | number | Buffer;
45
+ triggerCondition: (...args: any[]) => boolean;
46
+ shareDataEventInformation: IShareDataEvent[];
47
+ eventContext?: object;
48
+ }
49
+ /**
50
+ * This is the interface for the share data event.
51
+ */
52
+ export interface IShareDataEvent {
53
+ shareData: IShareDataAndFunctionEvent[];
54
+ processingType: ShareDataEventProcessingType;
55
+ }
56
+ /**
57
+ * This is all data that is required to find the sharedata and function to execute.
58
+ */
59
+ export interface IShareDataAndFunctionEvent {
60
+ shareDataId: string;
61
+ functionId: string;
62
+ shareDataInputs: string[];
63
+ inputs: any;
64
+ }
65
+ //# sourceMappingURL=share-event-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-event-models.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/models/events/share-event-models.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,oBAAY,cAAc;IACtB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,SAAS,cAAc;CAC1B;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC5B,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,UAAU,eAAe;CAC5B;AAED;;GAEG;AACH,oBAAY,yBAAyB;IACjC,IAAI,SAAS;IACb,SAAS,cAAc;CAC1B;AAED;;GAEG;AACH,oBAAY,4BAA4B;IACpC,QAAQ,aAAa;IACrB,MAAM,WAAW;CACpB;AAKD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,cAAc,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,yBAAyB,EAAE,yBAAyB,CAAC;IACrD,qBAAqB,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAChD,gBAAgB,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC;IAE9C,yBAAyB,EAAE,eAAe,EAAE,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,0BAA0B,EAAE,CAAC;IACxC,cAAc,EAAE,4BAA4B,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;CACf"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /**
3
+ * This contains the interfaces for all event data types that can be run on the network.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ShareDataEventProcessingType = exports.EventSourceTruthProofType = exports.EventSourceTruthType = exports.ShareEventType = void 0;
7
+ //#region Share Event Data Enums
8
+ /**
9
+ * This is the types of events that can be run on the network.
10
+ */
11
+ var ShareEventType;
12
+ (function (ShareEventType) {
13
+ ShareEventType["Application"] = "Application";
14
+ ShareEventType["DataChange"] = "DataChange";
15
+ ShareEventType["Scheduled"] = "Scheduled";
16
+ })(ShareEventType || (exports.ShareEventType = ShareEventType = {}));
17
+ /**
18
+ * All sources of event trusts
19
+ */
20
+ var EventSourceTruthType;
21
+ (function (EventSourceTruthType) {
22
+ EventSourceTruthType["Crypto"] = "Crypto";
23
+ EventSourceTruthType["Oauth"] = "Oauth";
24
+ EventSourceTruthType["ShareBlock"] = "ShareBlock";
25
+ })(EventSourceTruthType || (exports.EventSourceTruthType = EventSourceTruthType = {}));
26
+ /**
27
+ * All the types of proofs that can be sent from the sources of event execution truths.
28
+ */
29
+ var EventSourceTruthProofType;
30
+ (function (EventSourceTruthProofType) {
31
+ EventSourceTruthProofType["Hash"] = "Hash";
32
+ EventSourceTruthProofType["Signature"] = "Signature";
33
+ })(EventSourceTruthProofType || (exports.EventSourceTruthProofType = EventSourceTruthProofType = {}));
34
+ /**
35
+ * This is the type of processing that can be done on the share data event.
36
+ */
37
+ var ShareDataEventProcessingType;
38
+ (function (ShareDataEventProcessingType) {
39
+ ShareDataEventProcessingType["Parallel"] = "parallel";
40
+ ShareDataEventProcessingType["Linear"] = "linear";
41
+ })(ShareDataEventProcessingType || (exports.ShareDataEventProcessingType = ShareDataEventProcessingType = {}));
42
+ // const applicationEvent: ShareDataEvent = {
43
+ // eventId: 'appEvent123',
44
+ // eventType: 'Application',
45
+ // eventSource: 'API',
46
+ // triggerCondition: () => true, // Always triggers for demonstration purposes
47
+ // shareDataEventInformation: [
48
+ // {
49
+ // shareData: [
50
+ // { shareDataId: shareDataIds[0], functionId: 'funcA', shareDataInputs: ['financial.principal', 'financial.time'], inputs: { rate: 0.45 } },
51
+ // { shareDataId: 'data2', functionId: 'funcB', shareDataInputs: {}, inputs: { rate: 0.45 } },
52
+ // { shareDataId: 'data3', functionId: 'funcC' },
53
+ // ],
54
+ // processingType: 'parallel', // Process in parallel
55
+ // },
56
+ // {
57
+ // shareData: [
58
+ // { shareDataId: 'data3', functionId: 'funcC' },
59
+ // { shareDataId: 'data4', functionId: 'funcD' },
60
+ // { shareDataId: 'data3', functionId: 'funcE' },
61
+ // ],
62
+ // processingType: 'linear', // Process in linear order
63
+ // },
64
+ // ],
65
+ // eventContext: {
66
+ // user: 'john_doe',
67
+ // timestamp: new Date().toISOString(),
68
+ // },
69
+ // };
70
+ // shareDataIds[0],
@@ -0,0 +1,86 @@
1
+ /**
2
+ * This contains the data for the sahre functions
3
+ */
4
+ /**
5
+ * This is the incoming object for the share functions.
6
+ */
7
+ export interface ITargetObject {
8
+ [key: string]: unknown;
9
+ }
10
+ /**
11
+ * This contains all the proof types that exist for the network.
12
+ */
13
+ export declare enum INetworkProofType {
14
+ CRYPTOGRAPHIC_SIGNATURE = "CRYPTOGRAPHIC_SIGNATURE"
15
+ }
16
+ /**
17
+ * This contains the network proof for the share data network functions.
18
+ */
19
+ export type INetworkProof = ICryptographicSignatureProof;
20
+ /**
21
+ * This contains the cryptographic signature proof for the share data network functions.
22
+ */
23
+ export interface ICryptographicSignatureProof {
24
+ publicKey: string;
25
+ signature: string;
26
+ }
27
+ /**
28
+ * This contains the data for a share data network function without the signature
29
+ */
30
+ export interface IShareDataFunctionBasic {
31
+ createdAt: number;
32
+ previousHash: string;
33
+ stringifiedFunction: string;
34
+ currentHash: string;
35
+ }
36
+ /**
37
+ * This contains the data for a share data network function.
38
+ */
39
+ export interface IShareDataFunction extends IShareDataFunctionBasic {
40
+ proof: INetworkProof;
41
+ proofType: INetworkProofType;
42
+ }
43
+ /**
44
+ * This contains a share data network function
45
+ */
46
+ export interface IShareDataNetworkFunction {
47
+ id: string;
48
+ name: string;
49
+ description: string;
50
+ shareDataFunctions: IShareDataFunction[];
51
+ proof: INetworkProof;
52
+ proofType: INetworkProofType;
53
+ }
54
+ export interface IShareDataNetworkFunctionDescriptor {
55
+ functionNumber: number;
56
+ name: string;
57
+ description: string;
58
+ }
59
+ /**
60
+ * This contains the data for a share data network rule that is the basic shape.
61
+ */
62
+ export interface IShareDataRuleBasic {
63
+ createdAt: number;
64
+ previousHash: string;
65
+ stringifiedRule: string;
66
+ currentHash: string;
67
+ }
68
+ /**
69
+ * This contains the interface for a share function record in the share data object
70
+ */
71
+ export interface IShareDataNetworkRule {
72
+ id: string;
73
+ shareDataRules: IShareDataRule[];
74
+ applicationId: string;
75
+ applicationIdProof: string;
76
+ }
77
+ /**
78
+ * This contains the data for a share data network rule.
79
+ */
80
+ export interface IShareDataRule {
81
+ createdAt: number;
82
+ previousHash: string;
83
+ stringifiedRule: string;
84
+ currentHash: string;
85
+ }
86
+ //# sourceMappingURL=share-data-function-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-data-function-models.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/models/functions/share-data-function-models.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,oBAAY,iBAAiB;IACzB,uBAAuB,4BAA4B;CACtD;AACD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB;AACD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,uBAAuB;IAC/D,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,iBAAiB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,kBAAkB,EAAE,CAAC;IACzC,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,mCAAmC;IAChD,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACvB;AAGD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,cAAc,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * This contains the data for the sahre functions
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.INetworkProofType = void 0;
7
+ /**
8
+ * This contains all the proof types that exist for the network.
9
+ */
10
+ var INetworkProofType;
11
+ (function (INetworkProofType) {
12
+ INetworkProofType["CRYPTOGRAPHIC_SIGNATURE"] = "CRYPTOGRAPHIC_SIGNATURE";
13
+ })(INetworkProofType || (exports.INetworkProofType = INetworkProofType = {}));
14
+ /// Use of user defined function in the share data
15
+ /// Storage / Retrieval of the user defined functions in the network. (logic library)
16
+ // Use of user defined rules in the share data (product)
17
+ // Storage / Retrieval of the user defined rules in the network. (logic library)
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This contains a generic response of the application when complex or other data is not required.
3
+ */
4
+ export interface IGenericResponse {
5
+ successful: boolean;
6
+ error?: string;
7
+ }
8
+ //# sourceMappingURL=request-response-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-response-models.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/models/generic/request-response-models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ export * from './application/audit-log/application-audit-log-models';
2
+ export * from './application/database/firestore-models';
3
+ export * from './authorization/authorization-models';
4
+ export * from './crypto/crypto-models';
5
+ export * from './data/data-models';
6
+ export * from './dynamic-execution/dynamic-execution-models';
7
+ export * from './events/share-event-models';
8
+ export * from './functions/share-data-function-models';
9
+ export * from './generic/request-response-models';
10
+ export * from './rules/share-rule-models';
11
+ export * from './safe/safe-transaction-models';
12
+ export * from './share-data/share-data';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../generic/src/models/index.ts"],"names":[],"mappings":"AAEA,cAAc,sDAAsD,CAAC;AACrE,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ // This exports all model files from the models folder.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ __exportStar(require("./application/audit-log/application-audit-log-models"), exports);
19
+ __exportStar(require("./application/database/firestore-models"), exports);
20
+ __exportStar(require("./authorization/authorization-models"), exports);
21
+ __exportStar(require("./crypto/crypto-models"), exports);
22
+ __exportStar(require("./data/data-models"), exports);
23
+ __exportStar(require("./dynamic-execution/dynamic-execution-models"), exports);
24
+ __exportStar(require("./events/share-event-models"), exports);
25
+ __exportStar(require("./functions/share-data-function-models"), exports);
26
+ __exportStar(require("./generic/request-response-models"), exports);
27
+ __exportStar(require("./rules/share-rule-models"), exports);
28
+ __exportStar(require("./safe/safe-transaction-models"), exports);
29
+ __exportStar(require("./share-data/share-data"), exports);
@@ -0,0 +1,303 @@
1
+ /**
2
+ * This file contains the models for the rules used in the share data.
3
+ */
4
+ /**
5
+ * This contains the interface for the rule evaluation.
6
+ */
7
+ export interface IShareRuleEvalutionResult {
8
+ ruleId: string;
9
+ currentResult: boolean;
10
+ currentConditionFailure: ICondition[];
11
+ proposedResult: boolean;
12
+ proposedConditionFailure: ICondition[];
13
+ }
14
+ /**
15
+ * This contains the interface for the rule evaluation.
16
+ */
17
+ export interface IShareRulesEvaluationResult {
18
+ rootParam: string;
19
+ passedRuleCheck: boolean;
20
+ passedRuleId: string;
21
+ shareRuleEvalutionResults: IShareRuleEvalutionResult[];
22
+ }
23
+ /**
24
+ * This contains the interface for the rule evaluation results.
25
+ */
26
+ export interface IRuleEvaluationResults {
27
+ shareDataId: string;
28
+ rulesResults: IShareRulesEvaluationResult[];
29
+ isValidProposal: boolean;
30
+ }
31
+ /**
32
+ * This contains the interface for the rule set in the share data object
33
+ */
34
+ export interface IShareRuleSet {
35
+ description?: string;
36
+ id: string;
37
+ name: string;
38
+ ruleGroups: IShareRuleGroup[];
39
+ version: number;
40
+ }
41
+ /**
42
+ * This contains the logical operators for combining rules.
43
+ */
44
+ export declare enum LogicalOperator {
45
+ AND = "AND",
46
+ OR = "OR"
47
+ }
48
+ /**
49
+ * This contains the interface for a rule group.
50
+ *
51
+ * A rule group can contain individual rules or nested rule groups.
52
+ */
53
+ export interface IShareRuleGroup {
54
+ operator: LogicalOperator;
55
+ rules: (IShareRuleApplied | IShareRuleGroup)[];
56
+ }
57
+ /**
58
+ * This contains the interface for a share rule in the share data object
59
+ */
60
+ export interface IShareRule {
61
+ ruleId: string;
62
+ currentDataConditions: ICondition[];
63
+ proposedDataConditions: ICondition[];
64
+ }
65
+ /**
66
+ * This contains the applied rule informaiton in the share data object.
67
+ */
68
+ export interface IShareRuleApplied extends IShareRule {
69
+ targettedProperty: string;
70
+ }
71
+ /**
72
+ * This contains the different types of conditions that can be evaluated.
73
+ */
74
+ export type ConditionType = ConditionTypeSingle | ConditionTypeRange | ConditionTypeStartsEndsWith | ConditionTypeBoolean | ConditionTypeSpecial;
75
+ /**
76
+ * This contains the choices for the type of qualifier.
77
+ */
78
+ export declare enum ConditionTypeQualifier {
79
+ IS = "is",
80
+ IS_NOT = "is not"
81
+ }
82
+ /**
83
+ * This contains the choices for the type of condition.
84
+ */
85
+ export declare enum ConditionTypeSingle {
86
+ TYPEOF = "typeof",// the type of the property
87
+ EQUAL = "equal",// the value is equal to the condition value
88
+ CONTAINS = "contains",// the value contains the condition value
89
+ NULL = "null",// the value is null
90
+ EMPTY = "empty",// the value is empty
91
+ SHARE_RULE = "share-rule"
92
+ }
93
+ /**
94
+ * This contains the choices for the range conditions.
95
+ */
96
+ export declare enum ConditionTypeRange {
97
+ GREATER_THAN = "greater than",
98
+ LESS_THAN = "less than",
99
+ GREATER_THAN_OR_EQUAL = "greater than or equal",
100
+ LESS_THAN_OR_EQUAL = "less than or equal"
101
+ }
102
+ /**
103
+ * This contains the choices for the starts with and ends with conditions.
104
+ */
105
+ export declare enum ConditionTypeStartsEndsWith {
106
+ STARTS_WITH = "starts with",
107
+ ENDS_WITH = "ends with"
108
+ }
109
+ /**
110
+ * This contains the choices for the boolean conditions.
111
+ */
112
+ export declare enum ConditionTypeBoolean {
113
+ TRUE = "true",
114
+ FALSE = "false"
115
+ }
116
+ /**
117
+ * This contains the choices for the special conditions.
118
+ */
119
+ export declare enum ConditionTypeSpecial {
120
+ PATTERN = "pattern"
121
+ }
122
+ /**
123
+ * This is the interface for the conditional information in the checks.
124
+ */
125
+ export type ICondition = IConditionTypeOf | IConditionEquality | IConditionRange | IConditionContains | IConditionStartsEndsWith | IConditionNull | IConditionBoolean | IConditionEmpty | IConditionShareRule | IConditionSpecial;
126
+ /**
127
+ * This is the interface for the base condition.
128
+ */
129
+ export interface IConditionBase {
130
+ conditionType: ConditionType;
131
+ conditionTypeQualifier: ConditionTypeQualifier;
132
+ targettedProperty: string;
133
+ }
134
+ /**
135
+ * These are the different choices for the types of data in a condition.
136
+ */
137
+ export declare enum ConditionTypeOf {
138
+ STRING = "string",
139
+ NUMBER = "number",
140
+ INTEGER = "integer",
141
+ BOOLEAN = "boolean",
142
+ OBJECT = "object",
143
+ ARRAY = "array",
144
+ NULL = "null",
145
+ UNDEFINED = "undefined",
146
+ FUNCTION = "function",
147
+ BIGINT = "bigint"
148
+ }
149
+ /**
150
+ * This is the interface for the type of condition.
151
+ *
152
+ const exampleConditionTypeOf: IConditionTypeOf = {
153
+ conditionType: ConditionTypeSingle.TYPEOF,
154
+ ConditionTypeQualifier: ConditionTypeQualifier.IS,
155
+ conditionValue: ConditionTypeOf.NUMBER,
156
+ targettedProperty: 'address.city.total',
157
+ };
158
+ */
159
+ export interface IConditionTypeOf extends IConditionBase {
160
+ conditionType: ConditionTypeSingle.TYPEOF;
161
+ conditionValue: ConditionTypeOf;
162
+ }
163
+ /**
164
+ * This is the interface for the equality condition.
165
+ *
166
+ const exampleConditionEquality: IConditionEquality = {
167
+ conditionType: ConditionTypeSingle.EQUAL,
168
+ ConditionTypeQualifier: ConditionTypeQualifier.IS,
169
+ conditionValue: 100,
170
+ targettedProperty: 'address.city.total',
171
+ };
172
+ */
173
+ export interface IConditionEquality extends IConditionBase {
174
+ conditionType: ConditionTypeSingle.EQUAL;
175
+ conditionValue: number | string;
176
+ }
177
+ /**
178
+ * This is the interface for the range condition.
179
+ *
180
+ const exampleConditionRange: IConditionRange = {
181
+ conditionType: ConditionTypeRange.GREATER_THAN,
182
+ ConditionTypeQualifier: ConditionTypeQualifier.IS,
183
+ conditionValue: 100,
184
+ targettedProperty: 'address.city.total',
185
+ };
186
+ */
187
+ export interface IConditionRange extends IConditionBase {
188
+ conditionType: ConditionTypeRange;
189
+ conditionValue: string | number;
190
+ }
191
+ /**
192
+ * This is the interface for the contains condition.
193
+ *
194
+ const exampleConditionContains: IConditionContains = {
195
+ conditionType: ConditionTypeSingle.CONTAINS,
196
+ conditionTypeQualifier: ConditionTypeQualifier.IS,
197
+ conditionValue: ['gar'| 'garison' | 'garage']
198
+ targettedProperty: 'address.city.name',
199
+ * };
200
+ */
201
+ export interface IConditionContains extends IConditionBase {
202
+ conditionType: ConditionTypeSingle.CONTAINS;
203
+ conditionValue: string | string[] | number[];
204
+ }
205
+ /**
206
+ * This is the interface for the starts with and ends with condition.
207
+ *
208
+ const exampleConditionStartsEndsWith: IConditionStartsEndsWith = {
209
+ conditionType: ConditionTypeStartsEndsWith.STARTS_WITH,
210
+ conditionTypeQualifier: ConditionTypeQualifier.IS,
211
+ conditionValue: 'cal'
212
+ targettedProperty: 'address.city.name',
213
+ };
214
+ */
215
+ export interface IConditionStartsEndsWith extends IConditionBase {
216
+ conditionType: ConditionTypeStartsEndsWith;
217
+ conditionValue: string;
218
+ }
219
+ /**
220
+ * This is the interface for the null condition.
221
+ *
222
+ const exampleConditionNull: IConditionNull = {
223
+ conditionType: ConditionTypeSingle.NULL
224
+ targettedProperty: 'address.city.name',
225
+ };
226
+ */
227
+ export interface IConditionNull extends IConditionBase {
228
+ conditionType: ConditionTypeSingle.NULL;
229
+ }
230
+ /**
231
+ * This is the interface for the boolean condition.
232
+ *
233
+ const exampleConditionBoolean: IConditionBoolean = {
234
+ conditionType: ConditionTypeBoolean.TRUE,
235
+ conditionTypeQualifier: ConditionTypeQualifier.IS,
236
+ targettedProperty: 'address.city.name',
237
+ };
238
+ */
239
+ export interface IConditionBoolean extends IConditionBase {
240
+ conditionType: ConditionTypeBoolean;
241
+ }
242
+ /**
243
+ * This is the interface for the empty condition.
244
+ *
245
+ const exampleConditionEmpty: IConditionEmpty = {
246
+ conditionType: ConditionTypeEmpty.IS_EMPTY,
247
+ conditionTypeQualifier: ConditionTypeQualifier.IS,
248
+ targettedProperty: 'address.city.name',
249
+ };
250
+ */
251
+ export interface IConditionEmpty extends IConditionBase {
252
+ conditionType: ConditionTypeSingle.EMPTY;
253
+ }
254
+ /**
255
+ * This is the interface for the special condition.
256
+ *
257
+ const exampleConditionSpecial: IConditionSpecial = {
258
+ conditionType: ConditionTypeSpecial.PATTERN,
259
+ conditionTypeQualifier: ConditionTypeQualifier.IS,
260
+ conditionValue: '^[a-zA-Z0-9]*$'
261
+ targettedProperty: 'address.city.name',
262
+ };
263
+ */
264
+ export interface IConditionSpecial extends IConditionBase {
265
+ conditionType: ConditionTypeSpecial;
266
+ conditionValue: string;
267
+ }
268
+ /**
269
+ * This is the interface for the share rule condition.
270
+ *
271
+
272
+ const nestedShareRule: IShareRule = {
273
+ ruleId: 'nestedRule',
274
+ currentDataConditions: [
275
+ {
276
+ targettedProperty: 'nestedProperty',
277
+ conditionType: 'equal',
278
+ conditionValue: 'expectedValue',
279
+ conditionTypeQualifier: ConditionTypeQualifier.IS,
280
+ },
281
+ ],
282
+ proposedDataConditions: [
283
+ {
284
+ targettedProperty: 'nestedProperty',
285
+ conditionType: 'equal',
286
+ conditionValue: 'newValue',
287
+ conditionTypeQualifier: ConditionTypeQualifier.IS,
288
+ },
289
+ ],
290
+ };
291
+
292
+ const conditionWithShareRule: IConditionShareRule = {
293
+ conditionType: ConditionTypeSingle.SHARE_RULE,
294
+ conditionTypeQualifier: ConditionTypeQualifier.IS,
295
+ targettedProperty: 'parentProperty',
296
+ rule: nestedShareRule,
297
+ };
298
+ */
299
+ export interface IConditionShareRule extends IConditionBase {
300
+ conditionType: ConditionTypeSingle.SHARE_RULE;
301
+ conditionValue: IShareRule;
302
+ }
303
+ //# sourceMappingURL=share-rule-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-rule-models.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/models/rules/share-rule-models.ts"],"names":[],"mappings":"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"}