@twin.org/rights-management-plugins 0.0.3-next.4 → 0.0.3-next.41

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 (131) hide show
  1. package/README.md +11 -3
  2. package/dist/es/index.js +18 -10
  3. package/dist/es/index.js.map +1 -1
  4. package/dist/es/models/IAutomationPolicyExecutionActionConfig.js +4 -0
  5. package/dist/es/models/IAutomationPolicyExecutionActionConfig.js.map +1 -0
  6. package/dist/es/models/IAutomationPolicyExecutionActionConstructorOptions.js +2 -0
  7. package/dist/es/models/IAutomationPolicyExecutionActionConstructorOptions.js.map +1 -0
  8. package/dist/es/models/{IExamplePolicyArbiterConstructorOptions.js → IDefaultPolicyArbiterConfig.js} +1 -1
  9. package/dist/es/models/IDefaultPolicyArbiterConfig.js.map +1 -0
  10. package/dist/es/models/{IExamplePolicyRequesterConstructorOptions.js → IDefaultPolicyArbiterConstructorOptions.js} +1 -1
  11. package/dist/es/models/IDefaultPolicyArbiterConstructorOptions.js.map +1 -0
  12. package/dist/es/models/{IExamplePolicyEnforcementProcessorConstructorOptions.js → IDefaultPolicyEnforcementProcessorConstructorOptions.js} +1 -1
  13. package/dist/es/models/IDefaultPolicyEnforcementProcessorConstructorOptions.js.map +1 -0
  14. package/dist/es/models/ILoggingPolicyExecutionActionConfig.js.map +1 -1
  15. package/dist/es/models/{IExampleDataAccessHandlerConstructorOptions.js → IPassThroughPolicyArbiterConstructorOptions.js} +1 -1
  16. package/dist/es/models/IPassThroughPolicyArbiterConstructorOptions.js.map +1 -0
  17. package/dist/es/models/IPassThroughPolicyEnforcementProcessorConstructorOptions.js +4 -0
  18. package/dist/es/models/IPassThroughPolicyEnforcementProcessorConstructorOptions.js.map +1 -0
  19. package/dist/es/models/IPassThroughPolicyNegotiatorConstructorOptions.js +4 -0
  20. package/dist/es/models/IPassThroughPolicyNegotiatorConstructorOptions.js.map +1 -0
  21. package/dist/es/models/IPassThroughPolicyObligationEnforcerConstructorOptions.js +4 -0
  22. package/dist/es/models/IPassThroughPolicyObligationEnforcerConstructorOptions.js.map +1 -0
  23. package/dist/es/models/{IExamplePolicyNegotiatorConstructorOptions.js → IPassThroughPolicyRequesterConstructorOptions.js} +1 -1
  24. package/dist/es/models/IPassThroughPolicyRequesterConstructorOptions.js.map +1 -0
  25. package/dist/es/models/IStaticPolicyInformationSource.js.map +1 -1
  26. package/dist/es/policyArbiters/defaultPolicyArbiter.js +1657 -0
  27. package/dist/es/policyArbiters/defaultPolicyArbiter.js.map +1 -0
  28. package/dist/es/policyArbiters/passThroughPolicyArbiter.js +59 -0
  29. package/dist/es/policyArbiters/passThroughPolicyArbiter.js.map +1 -0
  30. package/dist/es/policyEnforcementProcessor/defaultPolicyEnforcementProcessor.js +146 -0
  31. package/dist/es/policyEnforcementProcessor/defaultPolicyEnforcementProcessor.js.map +1 -0
  32. package/dist/es/policyEnforcementProcessor/passThroughPolicyEnforcementProcessor.js +54 -0
  33. package/dist/es/policyEnforcementProcessor/passThroughPolicyEnforcementProcessor.js.map +1 -0
  34. package/dist/es/policyExecutionActions/automationPolicyExecutionAction.js +76 -0
  35. package/dist/es/policyExecutionActions/automationPolicyExecutionAction.js.map +1 -0
  36. package/dist/es/policyExecutionActions/loggingPolicyExecutionAction.js +16 -15
  37. package/dist/es/policyExecutionActions/loggingPolicyExecutionAction.js.map +1 -1
  38. package/dist/es/policyInformationSources/identityPolicyInformationSource.js +43 -31
  39. package/dist/es/policyInformationSources/identityPolicyInformationSource.js.map +1 -1
  40. package/dist/es/policyInformationSources/staticPolicyInformationSource.js +17 -15
  41. package/dist/es/policyInformationSources/staticPolicyInformationSource.js.map +1 -1
  42. package/dist/es/policyNegotiators/passThroughPolicyNegotiator.js +88 -0
  43. package/dist/es/policyNegotiators/passThroughPolicyNegotiator.js.map +1 -0
  44. package/dist/es/policyObligationEnforcers/passThroughPolicyObligationEnforcer.js +56 -0
  45. package/dist/es/policyObligationEnforcers/passThroughPolicyObligationEnforcer.js.map +1 -0
  46. package/dist/es/policyRequesters/passThroughPolicyRequester.js +103 -0
  47. package/dist/es/policyRequesters/passThroughPolicyRequester.js.map +1 -0
  48. package/dist/types/index.d.ts +18 -10
  49. package/dist/types/models/IAutomationPolicyExecutionActionConfig.d.ts +9 -0
  50. package/dist/types/models/IAutomationPolicyExecutionActionConstructorOptions.d.ts +15 -0
  51. package/dist/types/models/IDefaultPolicyArbiterConfig.d.ts +10 -0
  52. package/dist/types/models/IDefaultPolicyArbiterConstructorOptions.d.ts +20 -0
  53. package/dist/types/models/{IExamplePolicyEnforcementProcessorConstructorOptions.d.ts → IDefaultPolicyEnforcementProcessorConstructorOptions.d.ts} +2 -2
  54. package/dist/types/models/ILoggingPolicyExecutionActionConfig.d.ts +2 -2
  55. package/dist/types/models/{IExamplePolicyArbiterConstructorOptions.d.ts → IPassThroughPolicyArbiterConstructorOptions.d.ts} +2 -2
  56. package/dist/types/models/IPassThroughPolicyEnforcementProcessorConstructorOptions.d.ts +10 -0
  57. package/dist/types/models/{IExamplePolicyNegotiatorConstructorOptions.d.ts → IPassThroughPolicyNegotiatorConstructorOptions.d.ts} +2 -2
  58. package/dist/types/models/IPassThroughPolicyObligationEnforcerConstructorOptions.d.ts +10 -0
  59. package/dist/types/models/{IExamplePolicyRequesterConstructorOptions.d.ts → IPassThroughPolicyRequesterConstructorOptions.d.ts} +2 -2
  60. package/dist/types/models/IStaticPolicyInformationSource.d.ts +10 -4
  61. package/dist/types/policyArbiters/defaultPolicyArbiter.d.ts +41 -0
  62. package/dist/types/policyArbiters/passThroughPolicyArbiter.d.ts +35 -0
  63. package/dist/types/policyEnforcementProcessor/defaultPolicyEnforcementProcessor.d.ts +40 -0
  64. package/dist/types/policyEnforcementProcessor/passThroughPolicyEnforcementProcessor.d.ts +32 -0
  65. package/dist/types/policyExecutionActions/automationPolicyExecutionAction.d.ts +49 -0
  66. package/dist/types/policyExecutionActions/loggingPolicyExecutionAction.d.ts +8 -8
  67. package/dist/types/policyInformationSources/identityPolicyInformationSource.d.ts +8 -6
  68. package/dist/types/policyInformationSources/staticPolicyInformationSource.d.ts +7 -5
  69. package/dist/types/policyNegotiators/passThroughPolicyNegotiator.d.ts +52 -0
  70. package/dist/types/policyObligationEnforcers/passThroughPolicyObligationEnforcer.d.ts +35 -0
  71. package/dist/types/policyRequesters/{examplePolicyRequester.d.ts → passThroughPolicyRequester.d.ts} +15 -20
  72. package/docs/changelog.md +835 -3
  73. package/docs/examples.md +295 -1
  74. package/docs/reference/classes/AutomationPolicyExecutionAction.md +143 -0
  75. package/docs/reference/classes/DefaultPolicyArbiter.md +111 -0
  76. package/docs/reference/classes/DefaultPolicyEnforcementProcessor.md +107 -0
  77. package/docs/reference/classes/IdentityPolicyInformationSource.md +14 -14
  78. package/docs/reference/classes/LoggingPolicyExecutionAction.md +20 -20
  79. package/docs/reference/classes/PassThroughPolicyArbiter.md +101 -0
  80. package/docs/reference/classes/PassThroughPolicyEnforcementProcessor.md +107 -0
  81. package/docs/reference/classes/{ExamplePolicyNegotiator.md → PassThroughPolicyNegotiator.md} +24 -22
  82. package/docs/reference/classes/PassThroughPolicyObligationEnforcer.md +107 -0
  83. package/docs/reference/classes/{ExamplePolicyRequester.md → PassThroughPolicyRequester.md} +20 -38
  84. package/docs/reference/classes/StaticPolicyInformationSource.md +15 -15
  85. package/docs/reference/index.md +18 -10
  86. package/docs/reference/interfaces/IAutomationPolicyExecutionActionConfig.md +11 -0
  87. package/docs/reference/interfaces/IAutomationPolicyExecutionActionConstructorOptions.md +25 -0
  88. package/docs/reference/interfaces/IDefaultPolicyArbiterConfig.md +17 -0
  89. package/docs/reference/interfaces/IDefaultPolicyArbiterConstructorOptions.md +39 -0
  90. package/docs/reference/interfaces/IDefaultPolicyEnforcementProcessorConstructorOptions.md +17 -0
  91. package/docs/reference/interfaces/IIdentityPolicyInformationSourceConstructorOptions.md +4 -4
  92. package/docs/reference/interfaces/ILoggingPolicyExecutionActionConfig.md +9 -9
  93. package/docs/reference/interfaces/ILoggingPolicyExecutionActionConstructorOptions.md +4 -4
  94. package/docs/reference/interfaces/IPassThroughPolicyArbiterConstructorOptions.md +17 -0
  95. package/docs/reference/interfaces/IPassThroughPolicyEnforcementProcessorConstructorOptions.md +17 -0
  96. package/docs/reference/interfaces/IPassThroughPolicyNegotiatorConstructorOptions.md +17 -0
  97. package/docs/reference/interfaces/IPassThroughPolicyObligationEnforcerConstructorOptions.md +17 -0
  98. package/docs/reference/interfaces/IPassThroughPolicyRequesterConstructorOptions.md +17 -0
  99. package/docs/reference/interfaces/IStaticPolicyInformationSource.md +25 -6
  100. package/docs/reference/interfaces/IStaticPolicyInformationSourceConfig.md +2 -2
  101. package/docs/reference/interfaces/IStaticPolicyInformationSourceConstructorOptions.md +4 -4
  102. package/locales/en.json +58 -6
  103. package/package.json +7 -5
  104. package/dist/es/dataAccessHandlers/examplePolicyRequester.js +0 -82
  105. package/dist/es/dataAccessHandlers/examplePolicyRequester.js.map +0 -1
  106. package/dist/es/models/IExampleDataAccessHandlerConstructorOptions.js.map +0 -1
  107. package/dist/es/models/IExamplePolicyArbiterConstructorOptions.js.map +0 -1
  108. package/dist/es/models/IExamplePolicyEnforcementProcessorConstructorOptions.js.map +0 -1
  109. package/dist/es/models/IExamplePolicyNegotiatorConstructorOptions.js.map +0 -1
  110. package/dist/es/models/IExamplePolicyRequesterConstructorOptions.js.map +0 -1
  111. package/dist/es/policyArbiters/examplePolicyArbiter.js +0 -50
  112. package/dist/es/policyArbiters/examplePolicyArbiter.js.map +0 -1
  113. package/dist/es/policyEnforcementProcessor/examplePolicyEnforcementProcessor.js +0 -42
  114. package/dist/es/policyEnforcementProcessor/examplePolicyEnforcementProcessor.js.map +0 -1
  115. package/dist/es/policyNegotiators/examplePolicyNegotiator.js +0 -61
  116. package/dist/es/policyNegotiators/examplePolicyNegotiator.js.map +0 -1
  117. package/dist/es/policyRequesters/examplePolicyRequester.js +0 -69
  118. package/dist/es/policyRequesters/examplePolicyRequester.js.map +0 -1
  119. package/dist/types/dataAccessHandlers/examplePolicyRequester.d.ts +0 -68
  120. package/dist/types/models/IExampleDataAccessHandlerConstructorOptions.d.ts +0 -10
  121. package/dist/types/policyArbiters/examplePolicyArbiter.d.ts +0 -36
  122. package/dist/types/policyEnforcementProcessor/examplePolicyEnforcementProcessor.d.ts +0 -29
  123. package/dist/types/policyNegotiators/examplePolicyNegotiator.d.ts +0 -45
  124. package/docs/reference/classes/ExampleDataAccessHandler.md +0 -243
  125. package/docs/reference/classes/ExamplePolicyArbiter.md +0 -121
  126. package/docs/reference/classes/ExamplePolicyEnforcementProcessor.md +0 -101
  127. package/docs/reference/interfaces/IExampleDataAccessHandlerConstructorOptions.md +0 -17
  128. package/docs/reference/interfaces/IExamplePolicyArbiterConstructorOptions.md +0 -17
  129. package/docs/reference/interfaces/IExamplePolicyEnforcementProcessorConstructorOptions.md +0 -17
  130. package/docs/reference/interfaces/IExamplePolicyNegotiatorConstructorOptions.md +0 -17
  131. package/docs/reference/interfaces/IExamplePolicyRequesterConstructorOptions.md +0 -17
@@ -28,7 +28,7 @@ The options for the logging policy source.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### CLASS\_NAME
31
+ ### CLASS\_NAME {#class_name}
32
32
 
33
33
  > `readonly` `static` **CLASS\_NAME**: `string`
34
34
 
@@ -36,7 +36,7 @@ The class name of the Identity Policy Information Source.
36
36
 
37
37
  ## Methods
38
38
 
39
- ### className()
39
+ ### className() {#classname}
40
40
 
41
41
  > **className**(): `string`
42
42
 
@@ -54,9 +54,9 @@ The class name of the component.
54
54
 
55
55
  ***
56
56
 
57
- ### retrieve()
57
+ ### retrieve() {#retrieve}
58
58
 
59
- > **retrieve**\<`D`\>(`locator`, `accessMode`, `policies`, `data?`): `Promise`\<`IJsonLdNodeObject`[] \| `undefined`\>
59
+ > **retrieve**\<`D`\>(`policy`, `accessMode`, `data?`, `action?`): `Promise`\<\{\[`id`: `string`\]: `IJsonLdNodeObject`; \} \| `undefined`\>
60
60
 
61
61
  Retrieve information from the sources.
62
62
 
@@ -68,11 +68,11 @@ Retrieve information from the sources.
68
68
 
69
69
  #### Parameters
70
70
 
71
- ##### locator
71
+ ##### policy
72
72
 
73
- `IPolicyLocator`
73
+ `IRightsManagementPolicy` \| `undefined`
74
74
 
75
- The locator to find relevant policies.
75
+ The policy to retrieve information for if available.
76
76
 
77
77
  ##### accessMode
78
78
 
@@ -80,21 +80,21 @@ The locator to find relevant policies.
80
80
 
81
81
  The access mode to use for the retrieval.
82
82
 
83
- ##### policies
84
-
85
- `IOdrlPolicy`[]
86
-
87
- The policies that apply to the data.
88
-
89
83
  ##### data?
90
84
 
91
85
  `D`
92
86
 
93
87
  The data to process.
94
88
 
89
+ ##### action?
90
+
91
+ `string`
92
+
93
+ The action that was evaluated.
94
+
95
95
  #### Returns
96
96
 
97
- `Promise`\<`IJsonLdNodeObject`[] \| `undefined`\>
97
+ `Promise`\<\{\[`id`: `string`\]: `IJsonLdNodeObject`; \} \| `undefined`\>
98
98
 
99
99
  The objects containing relevant information or undefined if nothing relevant is found.
100
100
 
@@ -28,7 +28,7 @@ The options for the logging policy execution action.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### CLASS\_NAME
31
+ ### CLASS\_NAME {#class_name}
32
32
 
33
33
  > `readonly` `static` **CLASS\_NAME**: `string`
34
34
 
@@ -36,7 +36,7 @@ The class name of the Logging Policy Execution Action.
36
36
 
37
37
  ## Methods
38
38
 
39
- ### className()
39
+ ### className() {#classname}
40
40
 
41
41
  > **className**(): `string`
42
42
 
@@ -54,7 +54,7 @@ The class name of the component.
54
54
 
55
55
  ***
56
56
 
57
- ### supportedStages()
57
+ ### supportedStages() {#supportedstages}
58
58
 
59
59
  > **supportedStages**(): `PolicyDecisionStage`[]
60
60
 
@@ -72,9 +72,9 @@ List of stages.
72
72
 
73
73
  ***
74
74
 
75
- ### execute()
75
+ ### execute() {#execute}
76
76
 
77
- > **execute**\<`D`\>(`stage`, `locator`, `policies?`, `decisions?`, `data?`): `Promise`\<`void`\>
77
+ > **execute**\<`D`\>(`policy`, `decisions`, `data`, `action`, `stage`): `Promise`\<`void`\>
78
78
 
79
79
  Execute function type for policy actions.
80
80
 
@@ -86,35 +86,35 @@ Execute function type for policy actions.
86
86
 
87
87
  #### Parameters
88
88
 
89
- ##### stage
89
+ ##### policy
90
90
 
91
- `PolicyDecisionStage`
91
+ `IRightsManagementPolicy`
92
92
 
93
- The stage of the policy decision.
93
+ The policy that applied to the data.
94
94
 
95
- ##### locator
95
+ ##### decisions
96
96
 
97
- `IPolicyLocator`
97
+ `IPolicyDecision`[]
98
98
 
99
- The locator to find relevant policies.
99
+ The decisions made by the PDP.
100
100
 
101
- ##### policies?
101
+ ##### data
102
102
 
103
- `IOdrlPolicy`[]
103
+ `D` \| `undefined`
104
104
 
105
- The policies that apply to the data.
105
+ The data to process.
106
106
 
107
- ##### decisions?
107
+ ##### action
108
108
 
109
- `IPolicyDecision`[]
109
+ `string` \| `undefined`
110
110
 
111
- The decisions made by the PDP.
111
+ Optional action to make a decision on, if not provided, the arbiter will evaluate all actions in the agreement.
112
112
 
113
- ##### data?
113
+ ##### stage
114
114
 
115
- `D`
115
+ `PolicyDecisionStage`
116
116
 
117
- The data to process.
117
+ The stage of the policy decision.
118
118
 
119
119
  #### Returns
120
120
 
@@ -0,0 +1,101 @@
1
+ # Class: PassThroughPolicyArbiter
2
+
3
+ Pass Through Policy Arbiter.
4
+
5
+ ## Implements
6
+
7
+ - `IPolicyArbiter`
8
+
9
+ ## Constructors
10
+
11
+ ### Constructor
12
+
13
+ > **new PassThroughPolicyArbiter**(`options?`): `PassThroughPolicyArbiter`
14
+
15
+ Create a new instance of PassThroughPolicyArbiter.
16
+
17
+ #### Parameters
18
+
19
+ ##### options?
20
+
21
+ [`IPassThroughPolicyArbiterConstructorOptions`](../interfaces/IPassThroughPolicyArbiterConstructorOptions.md)
22
+
23
+ The options for the pass through policy arbiter.
24
+
25
+ #### Returns
26
+
27
+ `PassThroughPolicyArbiter`
28
+
29
+ ## Properties
30
+
31
+ ### CLASS\_NAME {#class_name}
32
+
33
+ > `readonly` `static` **CLASS\_NAME**: `string`
34
+
35
+ The class name of the Pass Through Policy Arbiter.
36
+
37
+ ## Methods
38
+
39
+ ### className() {#classname}
40
+
41
+ > **className**(): `string`
42
+
43
+ Returns the class name of the component.
44
+
45
+ #### Returns
46
+
47
+ `string`
48
+
49
+ The class name of the component.
50
+
51
+ #### Implementation of
52
+
53
+ `IPolicyArbiter.className`
54
+
55
+ ***
56
+
57
+ ### decide() {#decide}
58
+
59
+ > **decide**\<`D`\>(`agreement`, `information?`, `data?`, `action?`): `Promise`\<`IPolicyDecision`[]\>
60
+
61
+ Makes decisions regarding policy access to data.
62
+
63
+ #### Type Parameters
64
+
65
+ ##### D
66
+
67
+ `D` = `unknown`
68
+
69
+ #### Parameters
70
+
71
+ ##### agreement
72
+
73
+ `IDataspaceProtocolAgreement`
74
+
75
+ The agreement to evaluate.
76
+
77
+ ##### information?
78
+
79
+ Information provided by the requester to determine if a policy can be created.
80
+
81
+ ##### data?
82
+
83
+ `D`
84
+
85
+ The data to make a decision on.
86
+
87
+ ##### action?
88
+
89
+ `string`
90
+
91
+ Optional action to make a decision on, if not provided, the arbiter will evaluate all actions in the agreement.
92
+
93
+ #### Returns
94
+
95
+ `Promise`\<`IPolicyDecision`[]\>
96
+
97
+ The decisions about access to the data.
98
+
99
+ #### Implementation of
100
+
101
+ `IPolicyArbiter.decide`
@@ -0,0 +1,107 @@
1
+ # Class: PassThroughPolicyEnforcementProcessor
2
+
3
+ Pass Through Policy Enforcement Processor.
4
+
5
+ ## Implements
6
+
7
+ - `IPolicyEnforcementProcessor`
8
+
9
+ ## Constructors
10
+
11
+ ### Constructor
12
+
13
+ > **new PassThroughPolicyEnforcementProcessor**(`options?`): `PassThroughPolicyEnforcementProcessor`
14
+
15
+ Create a new instance of PassThroughPolicyEnforcementProcessor.
16
+
17
+ #### Parameters
18
+
19
+ ##### options?
20
+
21
+ [`IPassThroughPolicyEnforcementProcessorConstructorOptions`](../interfaces/IPassThroughPolicyEnforcementProcessorConstructorOptions.md)
22
+
23
+ The options for the pass through policy enforcement processor.
24
+
25
+ #### Returns
26
+
27
+ `PassThroughPolicyEnforcementProcessor`
28
+
29
+ ## Properties
30
+
31
+ ### CLASS\_NAME {#class_name}
32
+
33
+ > `readonly` `static` **CLASS\_NAME**: `string`
34
+
35
+ The class name of the Pass Through Policy Enforcement Processor.
36
+
37
+ ## Methods
38
+
39
+ ### className() {#classname}
40
+
41
+ > **className**(): `string`
42
+
43
+ Returns the class name of the component.
44
+
45
+ #### Returns
46
+
47
+ `string`
48
+
49
+ The class name of the component.
50
+
51
+ #### Implementation of
52
+
53
+ `IPolicyEnforcementProcessor.className`
54
+
55
+ ***
56
+
57
+ ### process() {#process}
58
+
59
+ > **process**\<`D`, `R`\>(`agreement`, `decisions`, `data?`, `action?`): `Promise`\<`R`\>
60
+
61
+ Process the response from the policy decision point.
62
+
63
+ #### Type Parameters
64
+
65
+ ##### D
66
+
67
+ `D` = `unknown`
68
+
69
+ ##### R
70
+
71
+ `R` = `D`
72
+
73
+ #### Parameters
74
+
75
+ ##### agreement
76
+
77
+ `IDataspaceProtocolAgreement`
78
+
79
+ The agreement to process.
80
+
81
+ ##### decisions
82
+
83
+ `IPolicyDecision`[]
84
+
85
+ The decisions made by the policy decision point.
86
+
87
+ ##### data?
88
+
89
+ `D`
90
+
91
+ The data to process.
92
+
93
+ ##### action?
94
+
95
+ `string`
96
+
97
+ Optional action to make a decision on, if not provided, the arbiter will evaluate all actions in the agreement.
98
+
99
+ #### Returns
100
+
101
+ `Promise`\<`R`\>
102
+
103
+ The data after processing.
104
+
105
+ #### Implementation of
106
+
107
+ `IPolicyEnforcementProcessor.process`
@@ -1,6 +1,6 @@
1
- # Class: ExamplePolicyNegotiator
1
+ # Class: PassThroughPolicyNegotiator
2
2
 
3
- Example Policy Negotiator.
3
+ Pass Through Policy Negotiator.
4
4
 
5
5
  ## Implements
6
6
 
@@ -10,33 +10,33 @@ Example Policy Negotiator.
10
10
 
11
11
  ### Constructor
12
12
 
13
- > **new ExamplePolicyNegotiator**(`options?`): `ExamplePolicyNegotiator`
13
+ > **new PassThroughPolicyNegotiator**(`options?`): `PassThroughPolicyNegotiator`
14
14
 
15
- Create a new instance of ExamplePolicyNegotiator.
15
+ Create a new instance of PassThroughPolicyNegotiator.
16
16
 
17
17
  #### Parameters
18
18
 
19
19
  ##### options?
20
20
 
21
- [`IExamplePolicyNegotiatorConstructorOptions`](../interfaces/IExamplePolicyNegotiatorConstructorOptions.md)
21
+ [`IPassThroughPolicyNegotiatorConstructorOptions`](../interfaces/IPassThroughPolicyNegotiatorConstructorOptions.md)
22
22
 
23
- The options for the example policy negotiator.
23
+ The options for the pass through policy negotiator.
24
24
 
25
25
  #### Returns
26
26
 
27
- `ExamplePolicyNegotiator`
27
+ `PassThroughPolicyNegotiator`
28
28
 
29
29
  ## Properties
30
30
 
31
- ### CLASS\_NAME
31
+ ### CLASS\_NAME {#class_name}
32
32
 
33
33
  > `readonly` `static` **CLASS\_NAME**: `string`
34
34
 
35
- The class name of the Example Policy Negotiator.
35
+ The class name of the Pass Through Policy Negotiator.
36
36
 
37
37
  ## Methods
38
38
 
39
- ### className()
39
+ ### className() {#classname}
40
40
 
41
41
  > **className**(): `string`
42
42
 
@@ -54,7 +54,7 @@ The class name of the component.
54
54
 
55
55
  ***
56
56
 
57
- ### supportsOffer()
57
+ ### supportsOffer() {#supportsoffer}
58
58
 
59
59
  > **supportsOffer**(`offer`): `boolean`
60
60
 
@@ -64,7 +64,7 @@ Determines if the negotiator supports the given offer.
64
64
 
65
65
  ##### offer
66
66
 
67
- `IOdrlOffer`
67
+ `IDataspaceProtocolOffer`
68
68
 
69
69
  The offer to check.
70
70
 
@@ -80,7 +80,7 @@ Sets the supports flag if it can be offered, and the interventionRequired flag i
80
80
 
81
81
  ***
82
82
 
83
- ### handleOffer()
83
+ ### handleOffer() {#handleoffer}
84
84
 
85
85
  > **handleOffer**(`offer`, `information?`): `Promise`\<\{ `accepted`: `boolean`; `interventionRequired`: `boolean`; \}\>
86
86
 
@@ -90,14 +90,12 @@ Handle the offer.
90
90
 
91
91
  ##### offer
92
92
 
93
- `IOdrlOffer`
93
+ `IDataspaceProtocolOffer`
94
94
 
95
95
  The offer to check.
96
96
 
97
97
  ##### information?
98
98
 
99
- `IPolicyInformation`
100
-
101
99
  Information provided by the requester to determine if a policy can be created.
102
100
 
103
101
  #### Returns
@@ -112,9 +110,9 @@ Sets the accepted flag if it can be offered, and the interventionRequired flag i
112
110
 
113
111
  ***
114
112
 
115
- ### createAgreement()
113
+ ### createAgreement() {#createagreement}
116
114
 
117
- > **createAgreement**(`offer`, `information?`): `Promise`\<`IOdrlAgreement` \| `undefined`\>
115
+ > **createAgreement**(`offer`, `assignee`, `information?`): `Promise`\<`IDataspaceProtocolAgreement` \| `undefined`\>
118
116
 
119
117
  Create an agreement based on the offer.
120
118
 
@@ -122,19 +120,23 @@ Create an agreement based on the offer.
122
120
 
123
121
  ##### offer
124
122
 
125
- `IOdrlOffer`
123
+ `IDataspaceProtocolOffer`
126
124
 
127
125
  The offer to create the agreement from.
128
126
 
129
- ##### information?
127
+ ##### assignee
128
+
129
+ `string` \| `IOdrlParty`
130
130
 
131
- `IPolicyInformation`
131
+ The assignee of the agreement.
132
+
133
+ ##### information?
132
134
 
133
135
  Information provided by the requester to aid in the creation of the agreement.
134
136
 
135
137
  #### Returns
136
138
 
137
- `Promise`\<`IOdrlAgreement` \| `undefined`\>
139
+ `Promise`\<`IDataspaceProtocolAgreement` \| `undefined`\>
138
140
 
139
141
  The agreement created from the offer or undefined if an agreement could not be created.
140
142
 
@@ -0,0 +1,107 @@
1
+ # Class: PassThroughPolicyObligationEnforcer
2
+
3
+ Pass Through Policy Obligation Enforcer.
4
+
5
+ ## Implements
6
+
7
+ - `IPolicyObligationEnforcer`
8
+
9
+ ## Constructors
10
+
11
+ ### Constructor
12
+
13
+ > **new PassThroughPolicyObligationEnforcer**(`options?`): `PassThroughPolicyObligationEnforcer`
14
+
15
+ Create a new instance of Pass Through Policy Obligation Enforcer.
16
+
17
+ #### Parameters
18
+
19
+ ##### options?
20
+
21
+ [`IPassThroughPolicyObligationEnforcerConstructorOptions`](../interfaces/IPassThroughPolicyObligationEnforcerConstructorOptions.md)
22
+
23
+ The options for the pass through policy obligation enforcer.
24
+
25
+ #### Returns
26
+
27
+ `PassThroughPolicyObligationEnforcer`
28
+
29
+ ## Properties
30
+
31
+ ### CLASS\_NAME {#class_name}
32
+
33
+ > `readonly` `static` **CLASS\_NAME**: `string`
34
+
35
+ The class name of the Pass Through Policy Obligation Enforcer.
36
+
37
+ ## Methods
38
+
39
+ ### className() {#classname}
40
+
41
+ > **className**(): `string`
42
+
43
+ Returns the class name of the component.
44
+
45
+ #### Returns
46
+
47
+ `string`
48
+
49
+ The class name of the component.
50
+
51
+ #### Implementation of
52
+
53
+ `IPolicyObligationEnforcer.className`
54
+
55
+ ***
56
+
57
+ ### enforce() {#enforce}
58
+
59
+ > **enforce**\<`D`\>(`policy`, `duty`, `information?`, `data?`, `action?`): `Promise`\<`boolean`\>
60
+
61
+ Enforces obligations regarding policy access to data.
62
+
63
+ #### Type Parameters
64
+
65
+ ##### D
66
+
67
+ `D` = `unknown`
68
+
69
+ #### Parameters
70
+
71
+ ##### policy
72
+
73
+ `IRightsManagementPolicy`
74
+
75
+ The policy to evaluate.
76
+
77
+ ##### duty
78
+
79
+ `IOdrlDuty`
80
+
81
+ The duty to enforce.
82
+
83
+ ##### information?
84
+
85
+ Information provided by the requester to determine if a policy can be created.
86
+
87
+ ##### data?
88
+
89
+ `D`
90
+
91
+ The data to make a decision on.
92
+
93
+ ##### action?
94
+
95
+ `string`
96
+
97
+ Optional action to make a decision on, if not provided, the enforcer will evaluate all actions in the duty.
98
+
99
+ #### Returns
100
+
101
+ `Promise`\<`boolean`\>
102
+
103
+ Whether the obligations were successfully enforced.
104
+
105
+ #### Implementation of
106
+
107
+ `IPolicyObligationEnforcer.enforce`