@gravitee/ui-policy-studio-angular 15.13.0 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/fesm2022/gravitee-ui-policy-studio-angular-testing.mjs +1 -1
  2. package/fesm2022/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
  3. package/fesm2022/gravitee-ui-policy-studio-angular.mjs +92 -95
  4. package/fesm2022/gravitee-ui-policy-studio-angular.mjs.map +1 -1
  5. package/index.d.ts +404 -3
  6. package/package.json +7 -11
  7. package/testing/index.d.ts +369 -3
  8. package/esm2022/gravitee-ui-policy-studio-angular.mjs +0 -5
  9. package/esm2022/lib/components/filter-pipe/gio-flter-connectors-by-mode.pipe.mjs +0 -43
  10. package/esm2022/lib/components/flow-details/gio-ps-flow-details.component.mjs +0 -184
  11. package/esm2022/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.component.mjs +0 -115
  12. package/esm2022/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.mjs +0 -179
  13. package/esm2022/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.mjs +0 -162
  14. package/esm2022/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.component.mjs +0 -81
  15. package/esm2022/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component.mjs +0 -109
  16. package/esm2022/lib/components/flow-form-dialog/flow-native-form-dialog/gio-ps-flow-native-form-dialog.component.mjs +0 -89
  17. package/esm2022/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component.mjs +0 -135
  18. package/esm2022/lib/components/flow-form-dialog/gio-ps-flow-form-dialog-result.model.mjs +0 -2
  19. package/esm2022/lib/components/flows-menu/gio-ps-flows-menu.component.mjs +0 -432
  20. package/esm2022/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.mjs +0 -165
  21. package/esm2022/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.component.mjs +0 -53
  22. package/esm2022/lib/components/step-form/gio-ps-step-form.component.mjs +0 -158
  23. package/esm2022/lib/models/ApiProtocolType.mjs +0 -17
  24. package/esm2022/lib/models/ApiType.mjs +0 -17
  25. package/esm2022/lib/models/ConnectorsInfo.mjs +0 -2
  26. package/esm2022/lib/models/PolicySchemaFetcher.mjs +0 -2
  27. package/esm2022/lib/models/SaveOutput.mjs +0 -2
  28. package/esm2022/lib/models/flow/Flow.mjs +0 -2
  29. package/esm2022/lib/models/flow/FlowExecution.mjs +0 -17
  30. package/esm2022/lib/models/flow/HttpMethod.mjs +0 -43
  31. package/esm2022/lib/models/flow/Selector.mjs +0 -2
  32. package/esm2022/lib/models/flow/Step.mjs +0 -2
  33. package/esm2022/lib/models/flow/index.mjs +0 -21
  34. package/esm2022/lib/models/index.mjs +0 -24
  35. package/esm2022/lib/models/plan/Plan.mjs +0 -17
  36. package/esm2022/lib/models/plan/index.mjs +0 -17
  37. package/esm2022/lib/models/policy/GenericPolicy.mjs +0 -24
  38. package/esm2022/lib/models/policy/Policy.mjs +0 -44
  39. package/esm2022/lib/models/policy/SharedPolicyGroupPolicy.mjs +0 -17
  40. package/esm2022/lib/models/policy/index.mjs +0 -19
  41. package/esm2022/lib/policy-group-studio/gio-policy-group-studio.component.mjs +0 -228
  42. package/esm2022/lib/policy-studio/gio-policy-studio.component.mjs +0 -304
  43. package/esm2022/lib/policy-studio/gio-policy-studio.model.mjs +0 -17
  44. package/esm2022/lib/policy-studio/gio-policy-studio.service.mjs +0 -74
  45. package/esm2022/public-api.mjs +0 -22
  46. package/esm2022/testing/gravitee-ui-policy-studio-angular-testing.mjs +0 -5
  47. package/esm2022/testing/lib/components/flow-details/gio-ps-flow-details.harness.mjs +0 -56
  48. package/esm2022/testing/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.harness.mjs +0 -35
  49. package/esm2022/testing/lib/components/flow-details-phase/gio-ps-flow-details-phase.harness.mjs +0 -155
  50. package/esm2022/testing/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.harness.mjs +0 -69
  51. package/esm2022/testing/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.harness.mjs +0 -60
  52. package/esm2022/testing/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness.mjs +0 -128
  53. package/esm2022/testing/lib/components/flow-form-dialog/flow-native-form-dialog/gio-ps-flow-native-form-dialog.harness.mjs +0 -50
  54. package/esm2022/testing/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness.mjs +0 -98
  55. package/esm2022/testing/lib/components/flows-menu/gio-ps-flows-menu.harness.mjs +0 -91
  56. package/esm2022/testing/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.harness.mjs +0 -87
  57. package/esm2022/testing/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.harness.mjs +0 -30
  58. package/esm2022/testing/lib/components/step-form/gio-ps-step-form.harness.mjs +0 -56
  59. package/esm2022/testing/lib/models/ApiProtocolType.mjs +0 -17
  60. package/esm2022/testing/lib/models/ApiType.mjs +0 -17
  61. package/esm2022/testing/lib/models/ConnectorsInfo.fixture.mjs +0 -182
  62. package/esm2022/testing/lib/models/ConnectorsInfo.mjs +0 -2
  63. package/esm2022/testing/lib/models/PolicySchemaFetcher.mjs +0 -2
  64. package/esm2022/testing/lib/models/SaveOutput.mjs +0 -2
  65. package/esm2022/testing/lib/models/flow/Flow.fixture.mjs +0 -122
  66. package/esm2022/testing/lib/models/flow/Flow.mjs +0 -2
  67. package/esm2022/testing/lib/models/flow/FlowExecution.fixture.mjs +0 -43
  68. package/esm2022/testing/lib/models/flow/FlowExecution.mjs +0 -17
  69. package/esm2022/testing/lib/models/flow/HttpMethod.mjs +0 -43
  70. package/esm2022/testing/lib/models/flow/Selector.mjs +0 -2
  71. package/esm2022/testing/lib/models/flow/Step.fixture.mjs +0 -92
  72. package/esm2022/testing/lib/models/flow/Step.mjs +0 -2
  73. package/esm2022/testing/lib/models/flow/index-testing.mjs +0 -19
  74. package/esm2022/testing/lib/models/flow/index.mjs +0 -21
  75. package/esm2022/testing/lib/models/index-testing.mjs +0 -20
  76. package/esm2022/testing/lib/models/index.mjs +0 -24
  77. package/esm2022/testing/lib/models/plan/Plan.fixture.mjs +0 -31
  78. package/esm2022/testing/lib/models/plan/Plan.mjs +0 -17
  79. package/esm2022/testing/lib/models/plan/index-testing.mjs +0 -17
  80. package/esm2022/testing/lib/models/plan/index.mjs +0 -17
  81. package/esm2022/testing/lib/models/policy/GenericPolicy.mjs +0 -24
  82. package/esm2022/testing/lib/models/policy/Policy.fixture.mjs +0 -194
  83. package/esm2022/testing/lib/models/policy/Policy.mjs +0 -44
  84. package/esm2022/testing/lib/models/policy/SharedPolicyGroupPolicy.mjs +0 -17
  85. package/esm2022/testing/lib/models/policy/index-testing.mjs +0 -17
  86. package/esm2022/testing/lib/models/policy/index.mjs +0 -19
  87. package/esm2022/testing/lib/policy-group-studio/gio-policy-group-studio.harness.mjs +0 -52
  88. package/esm2022/testing/lib/policy-studio/gio-policy-studio.harness.mjs +0 -202
  89. package/esm2022/testing/lib/policy-studio/gio-policy-studio.model.mjs +0 -17
  90. package/esm2022/testing/public-testing-api.mjs +0 -19
  91. package/lib/components/filter-pipe/gio-flter-connectors-by-mode.pipe.d.ts +0 -8
  92. package/lib/components/flow-details/gio-ps-flow-details.component.d.ts +0 -29
  93. package/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.component.d.ts +0 -20
  94. package/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.d.ts +0 -47
  95. package/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.d.ts +0 -33
  96. package/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.component.d.ts +0 -18
  97. package/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component.d.ts +0 -21
  98. package/lib/components/flow-form-dialog/flow-native-form-dialog/gio-ps-flow-native-form-dialog.component.d.ts +0 -21
  99. package/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component.d.ts +0 -24
  100. package/lib/components/flow-form-dialog/gio-ps-flow-form-dialog-result.model.d.ts +0 -2
  101. package/lib/components/flows-menu/gio-ps-flows-menu.component.d.ts +0 -57
  102. package/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.d.ts +0 -47
  103. package/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.component.d.ts +0 -24
  104. package/lib/components/step-form/gio-ps-step-form.component.d.ts +0 -35
  105. package/lib/models/ApiProtocolType.d.ts +0 -1
  106. package/lib/models/ApiType.d.ts +0 -1
  107. package/lib/models/ConnectorsInfo.d.ts +0 -7
  108. package/lib/models/PolicySchemaFetcher.d.ts +0 -5
  109. package/lib/models/SaveOutput.d.ts +0 -7
  110. package/lib/models/flow/Flow.d.ts +0 -24
  111. package/lib/models/flow/FlowExecution.d.ts +0 -11
  112. package/lib/models/flow/HttpMethod.d.ts +0 -3
  113. package/lib/models/flow/Selector.d.ts +0 -37
  114. package/lib/models/flow/Step.d.ts +0 -34
  115. package/lib/models/flow/index.d.ts +0 -5
  116. package/lib/models/index.d.ts +0 -8
  117. package/lib/models/plan/Plan.d.ts +0 -6
  118. package/lib/models/plan/index.d.ts +0 -1
  119. package/lib/models/policy/GenericPolicy.d.ts +0 -22
  120. package/lib/models/policy/Policy.d.ts +0 -28
  121. package/lib/models/policy/SharedPolicyGroupPolicy.d.ts +0 -11
  122. package/lib/models/policy/index.d.ts +0 -3
  123. package/lib/policy-group-studio/gio-policy-group-studio.component.d.ts +0 -70
  124. package/lib/policy-studio/gio-policy-studio.component.d.ts +0 -98
  125. package/lib/policy-studio/gio-policy-studio.model.d.ts +0 -17
  126. package/lib/policy-studio/gio-policy-studio.service.d.ts +0 -30
  127. package/public-api.d.ts +0 -3
  128. package/testing/lib/components/flow-details/gio-ps-flow-details.harness.d.ts +0 -12
  129. package/testing/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.harness.d.ts +0 -5
  130. package/testing/lib/components/flow-details-phase/gio-ps-flow-details-phase.harness.d.ts +0 -69
  131. package/testing/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.harness.d.ts +0 -21
  132. package/testing/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.harness.d.ts +0 -13
  133. package/testing/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness.d.ts +0 -37
  134. package/testing/lib/components/flow-form-dialog/flow-native-form-dialog/gio-ps-flow-native-form-dialog.harness.d.ts +0 -17
  135. package/testing/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness.d.ts +0 -33
  136. package/testing/lib/components/flows-menu/gio-ps-flows-menu.harness.d.ts +0 -31
  137. package/testing/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.harness.d.ts +0 -20
  138. package/testing/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.harness.d.ts +0 -8
  139. package/testing/lib/components/step-form/gio-ps-step-form.harness.d.ts +0 -18
  140. package/testing/lib/models/ApiProtocolType.d.ts +0 -1
  141. package/testing/lib/models/ApiType.d.ts +0 -1
  142. package/testing/lib/models/ConnectorsInfo.d.ts +0 -7
  143. package/testing/lib/models/ConnectorsInfo.fixture.d.ts +0 -12
  144. package/testing/lib/models/PolicySchemaFetcher.d.ts +0 -5
  145. package/testing/lib/models/SaveOutput.d.ts +0 -7
  146. package/testing/lib/models/flow/Flow.d.ts +0 -24
  147. package/testing/lib/models/flow/Flow.fixture.d.ts +0 -6
  148. package/testing/lib/models/flow/FlowExecution.d.ts +0 -11
  149. package/testing/lib/models/flow/FlowExecution.fixture.d.ts +0 -3
  150. package/testing/lib/models/flow/HttpMethod.d.ts +0 -3
  151. package/testing/lib/models/flow/Selector.d.ts +0 -37
  152. package/testing/lib/models/flow/Step.d.ts +0 -34
  153. package/testing/lib/models/flow/Step.fixture.d.ts +0 -5
  154. package/testing/lib/models/flow/index-testing.d.ts +0 -3
  155. package/testing/lib/models/flow/index.d.ts +0 -5
  156. package/testing/lib/models/index-testing.d.ts +0 -4
  157. package/testing/lib/models/index.d.ts +0 -8
  158. package/testing/lib/models/plan/Plan.d.ts +0 -6
  159. package/testing/lib/models/plan/Plan.fixture.d.ts +0 -2
  160. package/testing/lib/models/plan/index-testing.d.ts +0 -1
  161. package/testing/lib/models/plan/index.d.ts +0 -1
  162. package/testing/lib/models/policy/GenericPolicy.d.ts +0 -22
  163. package/testing/lib/models/policy/Policy.d.ts +0 -28
  164. package/testing/lib/models/policy/Policy.fixture.d.ts +0 -4
  165. package/testing/lib/models/policy/SharedPolicyGroupPolicy.d.ts +0 -11
  166. package/testing/lib/models/policy/index-testing.d.ts +0 -1
  167. package/testing/lib/models/policy/index.d.ts +0 -3
  168. package/testing/lib/policy-group-studio/gio-policy-group-studio.harness.d.ts +0 -20
  169. package/testing/lib/policy-studio/gio-policy-studio.harness.d.ts +0 -78
  170. package/testing/lib/policy-studio/gio-policy-studio.model.d.ts +0 -17
  171. package/testing/public-testing-api.d.ts +0 -3
package/index.d.ts CHANGED
@@ -1,5 +1,406 @@
1
+ import { Observable } from 'rxjs';
2
+ import * as i0 from '@angular/core';
3
+ import { OnChanges, OnDestroy, EventEmitter, SimpleChanges } from '@angular/core';
4
+
5
+ declare const HttpMethods: readonly ["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE", "OTHER"];
6
+ type HttpMethod = (typeof HttpMethods)[number];
7
+ declare const toHttpMethod: (value: string) => HttpMethod | undefined;
8
+
9
+ type Operation = 'PUBLISH' | 'SUBSCRIBE';
10
+ type Operator = 'EQUALS' | 'STARTS_WITH';
11
+ type BaseSelectorTypeEnum = 'HTTP' | 'CHANNEL' | 'CONDITION';
12
+ interface BaseSelector {
13
+ /**
14
+ * Selector type.
15
+ */
16
+ type?: BaseSelectorTypeEnum;
17
+ }
18
+ interface HttpSelector extends BaseSelector {
19
+ /**
20
+ * The path of the selector
21
+ */
22
+ path: string;
23
+ pathOperator: Operator;
24
+ methods?: HttpMethod[];
25
+ }
26
+ interface ChannelSelector extends BaseSelector {
27
+ /**
28
+ * The list of operations associated with this channel selector.
29
+ */
30
+ operations?: Operation[];
31
+ /**
32
+ * The channel of the selector
33
+ */
34
+ channel: string;
35
+ channelOperator: Operator;
36
+ entrypoints?: string[];
37
+ }
38
+ interface ConditionSelector extends BaseSelector {
39
+ /**
40
+ * The condition of the selector
41
+ */
42
+ condition: string;
43
+ }
44
+ type Selector = HttpSelector | ChannelSelector | ConditionSelector;
45
+
46
+ interface Step {
47
+ /**
48
+ * The name of the step
49
+ */
50
+ name?: string;
51
+ /**
52
+ * The description of the step
53
+ */
54
+ description?: string;
55
+ /**
56
+ * Is the step enabled or not.
57
+ */
58
+ enabled?: boolean;
59
+ /**
60
+ * The policy of the step
61
+ */
62
+ policy?: string;
63
+ /**
64
+ * The configuration of the step
65
+ */
66
+ configuration?: unknown;
67
+ /**
68
+ * The condition of the step
69
+ */
70
+ condition?: string;
71
+ /**
72
+ * The message condition of the step
73
+ */
74
+ messageCondition?: string;
75
+ /**
76
+ * Is the policy deployed or not.
77
+ */
78
+ deployed?: boolean;
79
+ }
80
+
81
+ interface Flow {
82
+ id?: string;
83
+ /**
84
+ * Flow's name.
85
+ */
86
+ name?: string;
87
+ /**
88
+ * Is the flow enabled.
89
+ */
90
+ enabled?: boolean;
91
+ selectors?: Selector[];
92
+ connect?: Step[];
93
+ interact?: Step[];
94
+ request?: Step[];
95
+ response?: Step[];
96
+ subscribe?: Step[];
97
+ publish?: Step[];
98
+ /**
99
+ * Flow's tags.
100
+ */
101
+ tags?: string[];
102
+ }
103
+
1
104
  /**
2
- * Generated bundle index. Do not edit.
105
+ * API's flow mode.
3
106
  */
4
- /// <amd-module name="@gravitee/ui-policy-studio-angular" />
5
- export * from './public-api';
107
+ type FlowMode = 'BEST_MATCH' | 'DEFAULT';
108
+ interface FlowExecution {
109
+ mode?: FlowMode;
110
+ /**
111
+ * Is the flow execution match required.
112
+ */
113
+ matchRequired?: boolean;
114
+ }
115
+
116
+ interface Plan {
117
+ id: string;
118
+ name: string;
119
+ flows: Flow[];
120
+ }
121
+
122
+ type ApiProtocolType = 'HTTP_MESSAGE' | 'HTTP_PROXY' | 'NATIVE_KAFKA';
123
+
124
+ type FlowPhase = 'REQUEST' | 'RESPONSE' | 'INTERACT' | 'CONNECT' | 'PUBLISH' | 'SUBSCRIBE';
125
+ interface Policy {
126
+ id: string;
127
+ name: string;
128
+ icon?: string;
129
+ description?: string;
130
+ category?: string;
131
+ version?: string;
132
+ flowPhaseCompatibility?: Partial<Record<ApiProtocolType, FlowPhase[]>>;
133
+ deployed?: boolean;
134
+ }
135
+ /**
136
+ * @Deprecated to keep as long as we support APIM < 4.6
137
+ */
138
+ type ExecutionPhase = 'REQUEST' | 'RESPONSE' | 'MESSAGE_REQUEST' | 'MESSAGE_RESPONSE';
139
+ type PolicyInput = Omit<Policy, 'proxy' | 'message'> & {
140
+ proxy?: ExecutionPhase[];
141
+ message?: ExecutionPhase[];
142
+ };
143
+ /**
144
+ * @Deprecated to keep as long as we support APIM < 4.6
145
+ */
146
+ declare const fromPolicyInput: (policy: PolicyInput | Policy) => Policy;
147
+ /**
148
+ * @Deprecated to keep as long as we support APIM < 4.6
149
+ */
150
+ declare const fromExecutionPhase: (phase: ExecutionPhase | FlowPhase) => FlowPhase;
151
+
152
+ type ApiType = 'MESSAGE' | 'LLM_PROXY' | 'MCP_PROXY' | 'PROXY' | 'NATIVE';
153
+
154
+ type SharedPolicyGroupPolicy = {
155
+ id: string;
156
+ policyId: string;
157
+ name: string;
158
+ description?: string;
159
+ prerequisiteMessage?: string;
160
+ apiType: ApiType;
161
+ phase: FlowPhase;
162
+ };
163
+
164
+ type CommonGenericPolicy = {
165
+ _id: string;
166
+ policyId: string;
167
+ icon?: string;
168
+ category?: string;
169
+ type: 'POLICY' | 'SHARED_POLICY_GROUP';
170
+ };
171
+ type GenericPolicyPolicy = CommonGenericPolicy & {
172
+ type: 'POLICY';
173
+ } & Omit<Policy, 'id'>;
174
+ type GenericPolicySharedPolicyGroupPolicy = CommonGenericPolicy & {
175
+ type: 'SHARED_POLICY_GROUP';
176
+ sharedPolicyGroupId: string;
177
+ } & Omit<SharedPolicyGroupPolicy, 'id'>;
178
+ type GenericPolicy = GenericPolicyPolicy | GenericPolicySharedPolicyGroupPolicy;
179
+ declare const isSharedPolicyGroupPolicy: (policy: GenericPolicy) => policy is GenericPolicySharedPolicyGroupPolicy;
180
+ declare const isPolicy: (policy: GenericPolicy) => policy is GenericPolicyPolicy;
181
+ declare const toGenericPolicies: (policies: Policy[], sharedPolicyGroupPolicies?: SharedPolicyGroupPolicy[]) => GenericPolicy[];
182
+ declare const toPolicy: (genericPolicy: GenericPolicy) => Policy;
183
+
184
+ interface ConnectorInfo {
185
+ name: string;
186
+ type: string;
187
+ icon: string;
188
+ supportedModes: ConnectorMode[];
189
+ }
190
+ type ConnectorMode = 'CONNECT' | 'INTERACT' | 'SUBSCRIBE' | 'PUBLISH' | 'REQUEST_RESPONSE';
191
+
192
+ type SaveOutput = {
193
+ commonFlows?: Flow[];
194
+ plansToUpdate?: Plan[];
195
+ flowExecution?: FlowExecution;
196
+ };
197
+
198
+ interface FlowVM extends Flow {
199
+ _id: string;
200
+ _hasChanged: boolean;
201
+ _parentFlowGroupName?: string;
202
+ }
203
+ interface FlowGroupVM {
204
+ _id: string;
205
+ _planId?: string;
206
+ _isPlan: boolean;
207
+ name: string;
208
+ flows: FlowVM[];
209
+ }
210
+ interface PolicyDocumentation {
211
+ content: string;
212
+ language: 'MARKDOWN' | 'ASCIIDOC';
213
+ }
214
+
215
+ type PolicySchemaFetcher = (policy: Policy) => Observable<unknown>;
216
+ type PolicyDocumentationFetcher = (policy: Policy) => Observable<PolicyDocumentation | string>;
217
+
218
+ declare class GioPolicyStudioService {
219
+ private schemasCache;
220
+ private documentationsCache;
221
+ private policySchemaFetcher?;
222
+ private policyDocumentationFetcher?;
223
+ setPolicySchemaFetcher(policySchemaFetcher: PolicySchemaFetcher): void;
224
+ setPolicyDocumentationFetcher(policyDocumentationFetcher: PolicyDocumentationFetcher): void;
225
+ /**
226
+ * Call the policy schema fetcher to get the schema for the given policy. If the
227
+ * schema has already been fetched, it will be returned from the cache.
228
+ *
229
+ * @param policy to get the schema for
230
+ * @returns the schema for the policy
231
+ */
232
+ getPolicySchema(policy: Policy): Observable<unknown>;
233
+ /**
234
+ * Call the policy documentation fetcher to get the documentation for the given policy. If the
235
+ * documentation has already been fetched, it will be returned from the cache.
236
+ *
237
+ * @param policy to get the documentation for
238
+ * @returns the documentation for the policy
239
+ */
240
+ getPolicyDocumentation(policy: Policy): Observable<PolicyDocumentation | string>;
241
+ static ɵfac: i0.ɵɵFactoryDeclaration<GioPolicyStudioService, never>;
242
+ static ɵprov: i0.ɵɵInjectableDeclaration<GioPolicyStudioService>;
243
+ }
244
+
245
+ type FlowSelection = {
246
+ planIndex: number;
247
+ flowIndex: number;
248
+ };
249
+ declare class GioPolicyStudioComponent implements OnChanges, OnDestroy {
250
+ private readonly policyStudioService;
251
+ /**
252
+ * May be set to `true` if the API is not manageable from the UI (e.g. kubernetes operator APIs)
253
+ */
254
+ readOnly: boolean;
255
+ /**
256
+ * API type (required)
257
+ */
258
+ apiType: ApiType;
259
+ /**
260
+ * Flow execution config (required)
261
+ */
262
+ flowExecution: FlowExecution;
263
+ /**
264
+ * List of entrypoints to display
265
+ */
266
+ entrypointsInfo: ConnectorInfo[];
267
+ /**
268
+ * List of endpoints to display
269
+ */
270
+ endpointsInfo: ConnectorInfo[];
271
+ /**
272
+ * List of common flows to add to common flows group
273
+ */
274
+ commonFlows: Flow[];
275
+ /**
276
+ * List of plans with their flows
277
+ */
278
+ plans: Plan[];
279
+ /**
280
+ * List of policies usable in the policy studio
281
+ */
282
+ set policies(value: (PolicyInput | Policy)[]);
283
+ get policies(): Policy[];
284
+ private _policies;
285
+ /**
286
+ * List of SharedPolicyGroups usable in the studio
287
+ */
288
+ sharedPolicyGroupPolicies: SharedPolicyGroupPolicy[];
289
+ /**
290
+ * When a policy is not available with the current license,
291
+ * this URL is used to redirect the user to the trial page.
292
+ */
293
+ trialUrl?: string;
294
+ /**
295
+ * Loading state
296
+ */
297
+ loading: boolean;
298
+ /**
299
+ * Called when Policy Studio needs to fetch the policy schema
300
+ * @returns Observable of the policy schema
301
+ */
302
+ policySchemaFetcher: PolicySchemaFetcher;
303
+ /**
304
+ * Called when Policy Studio needs to fetch the policy documentation
305
+ * @returns Observable of the policy documentation
306
+ */
307
+ policyDocumentationFetcher: PolicyDocumentationFetcher;
308
+ selectedFlowIndexes: FlowSelection;
309
+ selectedFlowChanged: EventEmitter<FlowSelection>;
310
+ /**
311
+ * Return what is needed to save.
312
+ **/
313
+ save: EventEmitter<SaveOutput>;
314
+ connectorsTooltip: string;
315
+ selectedFlow?: FlowVM;
316
+ flowsGroups: FlowGroupVM[];
317
+ disableSaveButton: boolean;
318
+ saving: boolean;
319
+ private initialFlowsGroups;
320
+ private hasFlowExecutionChanged;
321
+ private unSavingButtonSubscription?;
322
+ enableSavingTimer: boolean;
323
+ protected genericPolicies: GenericPolicy[];
324
+ constructor(policyStudioService: GioPolicyStudioService);
325
+ ngOnChanges(changes: SimpleChanges): void;
326
+ ngOnDestroy(): void;
327
+ onFlowExecutionChange(flowExecution: FlowExecution): void;
328
+ onFlowsGroupsChange(flowsGroups: FlowGroupVM[]): void;
329
+ onSelectedFlowChange(flow: FlowVM): void;
330
+ onSelectFlow(flowId: string): void;
331
+ onDeleteSelectedFlow(flow: FlowVM): void;
332
+ onSave(): void;
333
+ private initGenericPolicies;
334
+ static ɵfac: i0.ɵɵFactoryDeclaration<GioPolicyStudioComponent, never>;
335
+ static ɵcmp: i0.ɵɵComponentDeclaration<GioPolicyStudioComponent, "gio-policy-studio", never, { "readOnly": { "alias": "readOnly"; "required": false; }; "apiType": { "alias": "apiType"; "required": false; }; "flowExecution": { "alias": "flowExecution"; "required": false; }; "entrypointsInfo": { "alias": "entrypointsInfo"; "required": false; }; "endpointsInfo": { "alias": "endpointsInfo"; "required": false; }; "commonFlows": { "alias": "commonFlows"; "required": false; }; "plans": { "alias": "plans"; "required": false; }; "policies": { "alias": "policies"; "required": false; }; "sharedPolicyGroupPolicies": { "alias": "sharedPolicyGroupPolicies"; "required": false; }; "trialUrl": { "alias": "trialUrl"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "policySchemaFetcher": { "alias": "policySchemaFetcher"; "required": false; }; "policyDocumentationFetcher": { "alias": "policyDocumentationFetcher"; "required": false; }; "selectedFlowIndexes": { "alias": "selectedFlowIndexes"; "required": false; }; }, { "selectedFlowChanged": "selectedFlowChanged"; "save": "save"; }, never, never, true, never>;
336
+ static ngAcceptInputType_policies: unknown;
337
+ }
338
+
339
+ type PolicyGroupOutput = Step[];
340
+ type PolicyGroupInput = Step[];
341
+ type PolicyGroupVM = {
342
+ name: string;
343
+ description: string;
344
+ startConnectorName: string;
345
+ endConnectorName: string;
346
+ };
347
+ declare class GioPolicyGroupStudioComponent implements OnChanges {
348
+ private readonly policyStudioService;
349
+ /**
350
+ * List of policies usable in the studio
351
+ */
352
+ set policies(value: (PolicyInput | Policy)[]);
353
+ get policies(): Policy[];
354
+ private _policies;
355
+ /**
356
+ * Whether the Policy Group Studio is in read-only mode
357
+ */
358
+ readOnly: boolean;
359
+ /**
360
+ * Type of the API targeted by the Policy Group Studio
361
+ */
362
+ apiType: ApiType;
363
+ /**
364
+ * Execution phase targeted by the Policy Group Studio
365
+ * @deprecated Use `flowPhase` instead. To keep as long as we support APIM < 4.6
366
+ */
367
+ set executionPhase(value: ExecutionPhase);
368
+ /**
369
+ * Execution phase targeted by the Policy Group Studio
370
+ */
371
+ flowPhase: FlowPhase;
372
+ /**
373
+ * Called when Policy Group Studio needs to fetch the policy schema
374
+ * @returns Observable of the policy schema
375
+ */
376
+ policySchemaFetcher: PolicySchemaFetcher;
377
+ /**
378
+ * Called when Policy Group Studio needs to fetch the policy documentation
379
+ * @returns Observable of the policy documentation
380
+ */
381
+ policyDocumentationFetcher: PolicyDocumentationFetcher;
382
+ policyGroup: PolicyGroupInput;
383
+ /**
384
+ * Output event when the Policy Group Studio changes
385
+ */
386
+ policyGroupChange: EventEmitter<PolicyGroupOutput>;
387
+ protected isLoading: boolean;
388
+ protected createStartConnector: (name: string) => ConnectorInfo[];
389
+ protected createEndConnector: (name: string) => ConnectorInfo[];
390
+ protected policyGroupVM?: PolicyGroupVM;
391
+ protected steps: Step[];
392
+ protected trialUrl: string | undefined;
393
+ protected genericPolicies: GenericPolicy[];
394
+ protected startConnector: ConnectorInfo[];
395
+ protected endConnector: ConnectorInfo[];
396
+ private phases;
397
+ constructor(policyStudioService: GioPolicyStudioService);
398
+ ngOnChanges(changes: SimpleChanges): void;
399
+ protected onStepsChange(steps: Step[]): void;
400
+ static ɵfac: i0.ɵɵFactoryDeclaration<GioPolicyGroupStudioComponent, never>;
401
+ static ɵcmp: i0.ɵɵComponentDeclaration<GioPolicyGroupStudioComponent, "gio-policy-group-studio", never, { "policies": { "alias": "policies"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "apiType": { "alias": "apiType"; "required": true; }; "executionPhase": { "alias": "executionPhase"; "required": false; }; "flowPhase": { "alias": "flowPhase"; "required": false; }; "policySchemaFetcher": { "alias": "policySchemaFetcher"; "required": true; }; "policyDocumentationFetcher": { "alias": "policyDocumentationFetcher"; "required": true; }; "policyGroup": { "alias": "policyGroup"; "required": false; }; }, { "policyGroupChange": "policyGroupChange"; }, never, never, true, never>;
402
+ static ngAcceptInputType_policies: unknown;
403
+ }
404
+
405
+ export { GioPolicyGroupStudioComponent, GioPolicyStudioComponent, HttpMethods, fromExecutionPhase, fromPolicyInput, isPolicy, isSharedPolicyGroupPolicy, toGenericPolicies, toHttpMethod, toPolicy };
406
+ export type { ApiProtocolType, ApiType, BaseSelector, BaseSelectorTypeEnum, ChannelSelector, ConditionSelector, ConnectorInfo, ConnectorMode, ExecutionPhase, Flow, FlowExecution, FlowMode, FlowPhase, GenericPolicy, GenericPolicyPolicy, GenericPolicySharedPolicyGroupPolicy, HttpMethod, HttpSelector, Operation, Operator, Plan, Policy, PolicyDocumentationFetcher, PolicyGroupInput, PolicyGroupOutput, PolicyInput, PolicySchemaFetcher, SaveOutput, Selector, SharedPolicyGroupPolicy, Step };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/ui-policy-studio-angular",
3
- "version": "15.13.0",
3
+ "version": "16.0.0",
4
4
  "description": "Gravitee.io - UI Policy Studio Angular",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,12 +11,12 @@
11
11
  "tslib": "^2.6.2"
12
12
  },
13
13
  "peerDependencies": {
14
- "@angular/animations": "^19.0.0",
15
- "@angular/cdk": "^19.0.0",
16
- "@angular/common": "^19.0.0",
17
- "@angular/core": "^19.0.0",
18
- "@angular/forms": "^19.0.0",
19
- "@angular/material": "^19.0.0",
14
+ "@angular/animations": "^20.3.4",
15
+ "@angular/cdk": "^20.2.8",
16
+ "@angular/common": "^20.3.4",
17
+ "@angular/core": "^20.3.4",
18
+ "@angular/forms": "^20.3.4",
19
+ "@angular/material": "^20.2.8",
20
20
  "@gravitee/ui-particles-angular": "*",
21
21
  "lodash": "^4.17.21",
22
22
  "ngx-markdown": "^19.1.1"
@@ -32,14 +32,10 @@
32
32
  },
33
33
  ".": {
34
34
  "types": "./index.d.ts",
35
- "esm2022": "./esm2022/gravitee-ui-policy-studio-angular.mjs",
36
- "esm": "./esm2022/gravitee-ui-policy-studio-angular.mjs",
37
35
  "default": "./fesm2022/gravitee-ui-policy-studio-angular.mjs"
38
36
  },
39
37
  "./testing": {
40
38
  "types": "./testing/index.d.ts",
41
- "esm2022": "./esm2022/testing/gravitee-ui-policy-studio-angular-testing.mjs",
42
- "esm": "./esm2022/testing/gravitee-ui-policy-studio-angular-testing.mjs",
43
39
  "default": "./fesm2022/gravitee-ui-policy-studio-angular-testing.mjs"
44
40
  }
45
41
  },