@gravitee/ui-policy-studio-angular 15.13.0-angular-20-4a9d88b → 15.13.0-fix-cron-e0271bb

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/esm2022/gravitee-ui-policy-studio-angular.mjs +5 -0
  2. package/esm2022/lib/components/filter-pipe/gio-flter-connectors-by-mode.pipe.mjs +43 -0
  3. package/esm2022/lib/components/flow-details/gio-ps-flow-details.component.mjs +184 -0
  4. package/esm2022/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.component.mjs +115 -0
  5. package/esm2022/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.mjs +179 -0
  6. package/esm2022/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.mjs +162 -0
  7. package/esm2022/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.component.mjs +81 -0
  8. package/esm2022/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component.mjs +109 -0
  9. package/esm2022/lib/components/flow-form-dialog/flow-native-form-dialog/gio-ps-flow-native-form-dialog.component.mjs +89 -0
  10. package/esm2022/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component.mjs +135 -0
  11. package/esm2022/lib/components/flow-form-dialog/gio-ps-flow-form-dialog-result.model.mjs +2 -0
  12. package/esm2022/lib/components/flows-menu/gio-ps-flows-menu.component.mjs +432 -0
  13. package/esm2022/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.mjs +165 -0
  14. package/esm2022/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.component.mjs +53 -0
  15. package/esm2022/lib/components/step-form/gio-ps-step-form.component.mjs +158 -0
  16. package/esm2022/lib/models/ApiProtocolType.mjs +17 -0
  17. package/esm2022/lib/models/ApiType.mjs +17 -0
  18. package/esm2022/lib/models/ConnectorsInfo.mjs +2 -0
  19. package/esm2022/lib/models/PolicySchemaFetcher.mjs +2 -0
  20. package/esm2022/lib/models/SaveOutput.mjs +2 -0
  21. package/esm2022/lib/models/flow/Flow.mjs +2 -0
  22. package/esm2022/lib/models/flow/FlowExecution.mjs +17 -0
  23. package/esm2022/lib/models/flow/HttpMethod.mjs +43 -0
  24. package/esm2022/lib/models/flow/Selector.mjs +2 -0
  25. package/esm2022/lib/models/flow/Step.mjs +2 -0
  26. package/esm2022/lib/models/flow/index.mjs +21 -0
  27. package/esm2022/lib/models/index.mjs +24 -0
  28. package/esm2022/lib/models/plan/Plan.mjs +17 -0
  29. package/esm2022/lib/models/plan/index.mjs +17 -0
  30. package/esm2022/lib/models/policy/GenericPolicy.mjs +24 -0
  31. package/esm2022/lib/models/policy/Policy.mjs +44 -0
  32. package/esm2022/lib/models/policy/SharedPolicyGroupPolicy.mjs +17 -0
  33. package/esm2022/lib/models/policy/index.mjs +19 -0
  34. package/esm2022/lib/policy-group-studio/gio-policy-group-studio.component.mjs +228 -0
  35. package/esm2022/lib/policy-studio/gio-policy-studio.component.mjs +304 -0
  36. package/esm2022/lib/policy-studio/gio-policy-studio.model.mjs +17 -0
  37. package/esm2022/lib/policy-studio/gio-policy-studio.service.mjs +74 -0
  38. package/esm2022/public-api.mjs +22 -0
  39. package/esm2022/testing/gravitee-ui-policy-studio-angular-testing.mjs +5 -0
  40. package/esm2022/testing/lib/components/flow-details/gio-ps-flow-details.harness.mjs +56 -0
  41. package/esm2022/testing/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.harness.mjs +35 -0
  42. package/esm2022/testing/lib/components/flow-details-phase/gio-ps-flow-details-phase.harness.mjs +155 -0
  43. package/esm2022/testing/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.harness.mjs +69 -0
  44. package/esm2022/testing/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.harness.mjs +60 -0
  45. package/esm2022/testing/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness.mjs +128 -0
  46. package/esm2022/testing/lib/components/flow-form-dialog/flow-native-form-dialog/gio-ps-flow-native-form-dialog.harness.mjs +50 -0
  47. package/esm2022/testing/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness.mjs +98 -0
  48. package/esm2022/testing/lib/components/flows-menu/gio-ps-flows-menu.harness.mjs +91 -0
  49. package/esm2022/testing/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.harness.mjs +87 -0
  50. package/esm2022/testing/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.harness.mjs +30 -0
  51. package/esm2022/testing/lib/components/step-form/gio-ps-step-form.harness.mjs +56 -0
  52. package/esm2022/testing/lib/models/ApiProtocolType.mjs +17 -0
  53. package/esm2022/testing/lib/models/ApiType.mjs +17 -0
  54. package/esm2022/testing/lib/models/ConnectorsInfo.fixture.mjs +182 -0
  55. package/esm2022/testing/lib/models/ConnectorsInfo.mjs +2 -0
  56. package/esm2022/testing/lib/models/PolicySchemaFetcher.mjs +2 -0
  57. package/esm2022/testing/lib/models/SaveOutput.mjs +2 -0
  58. package/esm2022/testing/lib/models/flow/Flow.fixture.mjs +122 -0
  59. package/esm2022/testing/lib/models/flow/Flow.mjs +2 -0
  60. package/esm2022/testing/lib/models/flow/FlowExecution.fixture.mjs +43 -0
  61. package/esm2022/testing/lib/models/flow/FlowExecution.mjs +17 -0
  62. package/esm2022/testing/lib/models/flow/HttpMethod.mjs +43 -0
  63. package/esm2022/testing/lib/models/flow/Selector.mjs +2 -0
  64. package/esm2022/testing/lib/models/flow/Step.fixture.mjs +92 -0
  65. package/esm2022/testing/lib/models/flow/Step.mjs +2 -0
  66. package/esm2022/testing/lib/models/flow/index-testing.mjs +19 -0
  67. package/esm2022/testing/lib/models/flow/index.mjs +21 -0
  68. package/esm2022/testing/lib/models/index-testing.mjs +20 -0
  69. package/esm2022/testing/lib/models/index.mjs +24 -0
  70. package/esm2022/testing/lib/models/plan/Plan.fixture.mjs +31 -0
  71. package/esm2022/testing/lib/models/plan/Plan.mjs +17 -0
  72. package/esm2022/testing/lib/models/plan/index-testing.mjs +17 -0
  73. package/esm2022/testing/lib/models/plan/index.mjs +17 -0
  74. package/esm2022/testing/lib/models/policy/GenericPolicy.mjs +24 -0
  75. package/esm2022/testing/lib/models/policy/Policy.fixture.mjs +194 -0
  76. package/esm2022/testing/lib/models/policy/Policy.mjs +44 -0
  77. package/esm2022/testing/lib/models/policy/SharedPolicyGroupPolicy.mjs +17 -0
  78. package/esm2022/testing/lib/models/policy/index-testing.mjs +17 -0
  79. package/esm2022/testing/lib/models/policy/index.mjs +19 -0
  80. package/esm2022/testing/lib/policy-group-studio/gio-policy-group-studio.harness.mjs +52 -0
  81. package/esm2022/testing/lib/policy-studio/gio-policy-studio.harness.mjs +202 -0
  82. package/esm2022/testing/lib/policy-studio/gio-policy-studio.model.mjs +17 -0
  83. package/esm2022/testing/public-testing-api.mjs +19 -0
  84. package/fesm2022/gravitee-ui-policy-studio-angular-testing.mjs +1 -1
  85. package/fesm2022/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
  86. package/fesm2022/gravitee-ui-policy-studio-angular.mjs +95 -92
  87. package/fesm2022/gravitee-ui-policy-studio-angular.mjs.map +1 -1
  88. package/index.d.ts +3 -404
  89. package/lib/components/filter-pipe/gio-flter-connectors-by-mode.pipe.d.ts +8 -0
  90. package/lib/components/flow-details/gio-ps-flow-details.component.d.ts +29 -0
  91. package/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.component.d.ts +20 -0
  92. package/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.d.ts +47 -0
  93. package/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.d.ts +33 -0
  94. package/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.component.d.ts +18 -0
  95. package/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component.d.ts +21 -0
  96. package/lib/components/flow-form-dialog/flow-native-form-dialog/gio-ps-flow-native-form-dialog.component.d.ts +21 -0
  97. package/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component.d.ts +24 -0
  98. package/lib/components/flow-form-dialog/gio-ps-flow-form-dialog-result.model.d.ts +2 -0
  99. package/lib/components/flows-menu/gio-ps-flows-menu.component.d.ts +57 -0
  100. package/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.d.ts +47 -0
  101. package/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.component.d.ts +24 -0
  102. package/lib/components/step-form/gio-ps-step-form.component.d.ts +35 -0
  103. package/lib/models/ApiProtocolType.d.ts +1 -0
  104. package/lib/models/ApiType.d.ts +1 -0
  105. package/lib/models/ConnectorsInfo.d.ts +7 -0
  106. package/lib/models/PolicySchemaFetcher.d.ts +5 -0
  107. package/lib/models/SaveOutput.d.ts +7 -0
  108. package/lib/models/flow/Flow.d.ts +24 -0
  109. package/lib/models/flow/FlowExecution.d.ts +11 -0
  110. package/lib/models/flow/HttpMethod.d.ts +3 -0
  111. package/lib/models/flow/Selector.d.ts +37 -0
  112. package/lib/models/flow/Step.d.ts +34 -0
  113. package/lib/models/flow/index.d.ts +5 -0
  114. package/lib/models/index.d.ts +8 -0
  115. package/lib/models/plan/Plan.d.ts +6 -0
  116. package/lib/models/plan/index.d.ts +1 -0
  117. package/lib/models/policy/GenericPolicy.d.ts +22 -0
  118. package/lib/models/policy/Policy.d.ts +28 -0
  119. package/lib/models/policy/SharedPolicyGroupPolicy.d.ts +11 -0
  120. package/lib/models/policy/index.d.ts +3 -0
  121. package/lib/policy-group-studio/gio-policy-group-studio.component.d.ts +70 -0
  122. package/lib/policy-studio/gio-policy-studio.component.d.ts +98 -0
  123. package/lib/policy-studio/gio-policy-studio.model.d.ts +17 -0
  124. package/lib/policy-studio/gio-policy-studio.service.d.ts +30 -0
  125. package/package.json +11 -7
  126. package/public-api.d.ts +3 -0
  127. package/testing/index.d.ts +3 -369
  128. package/testing/lib/components/flow-details/gio-ps-flow-details.harness.d.ts +12 -0
  129. package/testing/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.harness.d.ts +5 -0
  130. package/testing/lib/components/flow-details-phase/gio-ps-flow-details-phase.harness.d.ts +69 -0
  131. package/testing/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.harness.d.ts +21 -0
  132. package/testing/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.harness.d.ts +13 -0
  133. package/testing/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness.d.ts +37 -0
  134. package/testing/lib/components/flow-form-dialog/flow-native-form-dialog/gio-ps-flow-native-form-dialog.harness.d.ts +17 -0
  135. package/testing/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness.d.ts +33 -0
  136. package/testing/lib/components/flows-menu/gio-ps-flows-menu.harness.d.ts +31 -0
  137. package/testing/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.harness.d.ts +20 -0
  138. package/testing/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.harness.d.ts +8 -0
  139. package/testing/lib/components/step-form/gio-ps-step-form.harness.d.ts +18 -0
  140. package/testing/lib/models/ApiProtocolType.d.ts +1 -0
  141. package/testing/lib/models/ApiType.d.ts +1 -0
  142. package/testing/lib/models/ConnectorsInfo.d.ts +7 -0
  143. package/testing/lib/models/ConnectorsInfo.fixture.d.ts +12 -0
  144. package/testing/lib/models/PolicySchemaFetcher.d.ts +5 -0
  145. package/testing/lib/models/SaveOutput.d.ts +7 -0
  146. package/testing/lib/models/flow/Flow.d.ts +24 -0
  147. package/testing/lib/models/flow/Flow.fixture.d.ts +6 -0
  148. package/testing/lib/models/flow/FlowExecution.d.ts +11 -0
  149. package/testing/lib/models/flow/FlowExecution.fixture.d.ts +3 -0
  150. package/testing/lib/models/flow/HttpMethod.d.ts +3 -0
  151. package/testing/lib/models/flow/Selector.d.ts +37 -0
  152. package/testing/lib/models/flow/Step.d.ts +34 -0
  153. package/testing/lib/models/flow/Step.fixture.d.ts +5 -0
  154. package/testing/lib/models/flow/index-testing.d.ts +3 -0
  155. package/testing/lib/models/flow/index.d.ts +5 -0
  156. package/testing/lib/models/index-testing.d.ts +4 -0
  157. package/testing/lib/models/index.d.ts +8 -0
  158. package/testing/lib/models/plan/Plan.d.ts +6 -0
  159. package/testing/lib/models/plan/Plan.fixture.d.ts +2 -0
  160. package/testing/lib/models/plan/index-testing.d.ts +1 -0
  161. package/testing/lib/models/plan/index.d.ts +1 -0
  162. package/testing/lib/models/policy/GenericPolicy.d.ts +22 -0
  163. package/testing/lib/models/policy/Policy.d.ts +28 -0
  164. package/testing/lib/models/policy/Policy.fixture.d.ts +4 -0
  165. package/testing/lib/models/policy/SharedPolicyGroupPolicy.d.ts +11 -0
  166. package/testing/lib/models/policy/index-testing.d.ts +1 -0
  167. package/testing/lib/models/policy/index.d.ts +3 -0
  168. package/testing/lib/policy-group-studio/gio-policy-group-studio.harness.d.ts +20 -0
  169. package/testing/lib/policy-studio/gio-policy-studio.harness.d.ts +78 -0
  170. package/testing/lib/policy-studio/gio-policy-studio.model.d.ts +17 -0
  171. package/testing/public-testing-api.d.ts +3 -0
@@ -0,0 +1,20 @@
1
+ import { ComponentHarness } from '@angular/cdk/testing';
2
+ import { GioPolicyStudioStepFormHarness } from '../step-form/gio-ps-step-form.harness';
3
+ export declare class GioPolicyStudioPoliciesCatalogDialogHarness extends ComponentHarness {
4
+ static hostSelector: string;
5
+ private policiesLocator;
6
+ private getCategoriesFilter;
7
+ getPhase(): Promise<string>;
8
+ getPoliciesName(): Promise<string[]>;
9
+ selectPolicy(policyName: string): Promise<void>;
10
+ getSelectedPolicyName(): Promise<string>;
11
+ hasRequestUpgradeButton(): Promise<boolean>;
12
+ clickAddPolicyButton(): Promise<void>;
13
+ getStepForm(): Promise<GioPolicyStudioStepFormHarness>;
14
+ getCategoriesSelection(): Promise<{
15
+ name: string;
16
+ selected: boolean;
17
+ }[]>;
18
+ selectCategoryFilter(categoryName: string): Promise<void>;
19
+ searchFilter(search: string): Promise<void>;
20
+ }
@@ -0,0 +1,8 @@
1
+ import { ComponentHarness } from '@angular/cdk/testing';
2
+ import { GioPolicyStudioStepFormHarness } from '../step-form/gio-ps-step-form.harness';
3
+ export declare class GioPolicyStudioStepEditDialogHarness extends ComponentHarness {
4
+ static hostSelector: string;
5
+ getPolicyName(): Promise<string>;
6
+ getStepForm(): Promise<GioPolicyStudioStepFormHarness>;
7
+ save(): Promise<void>;
8
+ }
@@ -0,0 +1,18 @@
1
+ import { ComponentHarness, LocatorFactory } from '@angular/cdk/testing';
2
+ export type StepForm = {
3
+ description?: string;
4
+ condition?: string;
5
+ messageCondition?: string;
6
+ waitForPolicyFormCompletionCb?: (locator: LocatorFactory) => Promise<void>;
7
+ waitForInitHttpRequestCompletionCb?: () => void;
8
+ };
9
+ export declare class GioPolicyStudioStepFormHarness extends ComponentHarness {
10
+ static hostSelector: string;
11
+ private getDescriptionInput;
12
+ private getConditionInput;
13
+ setStepForm(stepForm: StepForm): Promise<void>;
14
+ getStepFormValue(): Promise<{
15
+ description?: string;
16
+ }>;
17
+ getDocumentation(): Promise<string | null>;
18
+ }
@@ -0,0 +1 @@
1
+ export type ApiProtocolType = 'HTTP_MESSAGE' | 'HTTP_PROXY' | 'NATIVE_KAFKA';
@@ -0,0 +1 @@
1
+ export type ApiType = 'MESSAGE' | 'LLM_PROXY' | 'MCP_PROXY' | 'PROXY' | 'NATIVE';
@@ -0,0 +1,7 @@
1
+ export interface ConnectorInfo {
2
+ name: string;
3
+ type: string;
4
+ icon: string;
5
+ supportedModes: ConnectorMode[];
6
+ }
7
+ export type ConnectorMode = 'CONNECT' | 'INTERACT' | 'SUBSCRIBE' | 'PUBLISH' | 'REQUEST_RESPONSE';
@@ -0,0 +1,12 @@
1
+ import { ConnectorInfo } from './ConnectorsInfo';
2
+ export declare function fakeSSEMessageEntrypoint(modifier?: Partial<ConnectorInfo> | ((base: ConnectorInfo) => ConnectorInfo)): ConnectorInfo;
3
+ export declare function fakeWebsocketMessageEntrypoint(modifier?: Partial<ConnectorInfo> | ((base: ConnectorInfo) => ConnectorInfo)): ConnectorInfo;
4
+ export declare function fakeHTTPPostMessageEntrypoint(modifier?: Partial<ConnectorInfo> | ((base: ConnectorInfo) => ConnectorInfo)): ConnectorInfo;
5
+ export declare function fakeHTTPGetMessageEntrypoint(modifier?: Partial<ConnectorInfo> | ((base: ConnectorInfo) => ConnectorInfo)): ConnectorInfo;
6
+ export declare function fakeWebhookMessageEntrypoint(modifier?: Partial<ConnectorInfo> | ((base: ConnectorInfo) => ConnectorInfo)): ConnectorInfo;
7
+ export declare function fakeHTTPProxyEntrypoint(modifier?: Partial<ConnectorInfo> | ((base: ConnectorInfo) => ConnectorInfo)): ConnectorInfo;
8
+ export declare function fakeMockMessageEndpoint(modifier?: Partial<ConnectorInfo> | ((base: ConnectorInfo) => ConnectorInfo)): ConnectorInfo;
9
+ export declare function fakeKafkaMessageEndpoint(modifier?: Partial<ConnectorInfo> | ((base: ConnectorInfo) => ConnectorInfo)): ConnectorInfo;
10
+ export declare function fakeHTTPProxyEndpoint(modifier?: Partial<ConnectorInfo> | ((base: ConnectorInfo) => ConnectorInfo)): ConnectorInfo;
11
+ export declare function fakeKafkaNativeEntrypoint(modifier?: Partial<ConnectorInfo> | ((base: ConnectorInfo) => ConnectorInfo)): ConnectorInfo;
12
+ export declare function fakeKafkaNativeEndpoint(modifier?: Partial<ConnectorInfo> | ((base: ConnectorInfo) => ConnectorInfo)): ConnectorInfo;
@@ -0,0 +1,5 @@
1
+ import { Observable } from 'rxjs';
2
+ import { PolicyDocumentation } from '../policy-studio/gio-policy-studio.model';
3
+ import { Policy } from './policy/Policy';
4
+ export type PolicySchemaFetcher = (policy: Policy) => Observable<unknown>;
5
+ export type PolicyDocumentationFetcher = (policy: Policy) => Observable<PolicyDocumentation | string>;
@@ -0,0 +1,7 @@
1
+ import { Flow, FlowExecution } from './flow';
2
+ import { Plan } from './plan';
3
+ export type SaveOutput = {
4
+ commonFlows?: Flow[];
5
+ plansToUpdate?: Plan[];
6
+ flowExecution?: FlowExecution;
7
+ };
@@ -0,0 +1,24 @@
1
+ import { Selector } from './Selector';
2
+ import { Step } from './Step';
3
+ export interface Flow {
4
+ id?: string;
5
+ /**
6
+ * Flow's name.
7
+ */
8
+ name?: string;
9
+ /**
10
+ * Is the flow enabled.
11
+ */
12
+ enabled?: boolean;
13
+ selectors?: Selector[];
14
+ connect?: Step[];
15
+ interact?: Step[];
16
+ request?: Step[];
17
+ response?: Step[];
18
+ subscribe?: Step[];
19
+ publish?: Step[];
20
+ /**
21
+ * Flow's tags.
22
+ */
23
+ tags?: string[];
24
+ }
@@ -0,0 +1,6 @@
1
+ import { Flow } from './Flow';
2
+ export declare function fakeChannelFlow(modifier?: Partial<Flow> | ((baseApi: Flow) => Flow)): Flow;
3
+ export declare function fakeConditionedChannelFlow(modifier?: Partial<Flow> | ((baseApi: Flow) => Flow)): Flow;
4
+ export declare function fakeHttpFlow(modifier?: Partial<Flow> | ((baseApi: Flow) => Flow)): Flow;
5
+ export declare function fakeConditionedHttpFlow(modifier?: Partial<Flow> | ((baseApi: Flow) => Flow)): Flow;
6
+ export declare function fakeNativeFlow(modifier?: Partial<Flow> | ((baseApi: Flow) => Flow)): Flow;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * API's flow mode.
3
+ */
4
+ export type FlowMode = 'BEST_MATCH' | 'DEFAULT';
5
+ export interface FlowExecution {
6
+ mode?: FlowMode;
7
+ /**
8
+ * Is the flow execution match required.
9
+ */
10
+ matchRequired?: boolean;
11
+ }
@@ -0,0 +1,3 @@
1
+ import { FlowExecution } from './FlowExecution';
2
+ export declare function fakeBestMatchFlowExecution(modifier?: Partial<FlowExecution> | ((baseApi: FlowExecution) => FlowExecution)): FlowExecution;
3
+ export declare function fakeDefaultFlowExecution(modifier?: Partial<FlowExecution> | ((baseApi: FlowExecution) => FlowExecution)): FlowExecution;
@@ -0,0 +1,3 @@
1
+ export declare const HttpMethods: readonly ["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE", "OTHER"];
2
+ export type HttpMethod = (typeof HttpMethods)[number];
3
+ export declare const toHttpMethod: (value: string) => HttpMethod | undefined;
@@ -0,0 +1,37 @@
1
+ import { HttpMethod } from './HttpMethod';
2
+ export type Operation = 'PUBLISH' | 'SUBSCRIBE';
3
+ export type Operator = 'EQUALS' | 'STARTS_WITH';
4
+ export type BaseSelectorTypeEnum = 'HTTP' | 'CHANNEL' | 'CONDITION';
5
+ export interface BaseSelector {
6
+ /**
7
+ * Selector type.
8
+ */
9
+ type?: BaseSelectorTypeEnum;
10
+ }
11
+ export interface HttpSelector extends BaseSelector {
12
+ /**
13
+ * The path of the selector
14
+ */
15
+ path: string;
16
+ pathOperator: Operator;
17
+ methods?: HttpMethod[];
18
+ }
19
+ export interface ChannelSelector extends BaseSelector {
20
+ /**
21
+ * The list of operations associated with this channel selector.
22
+ */
23
+ operations?: Operation[];
24
+ /**
25
+ * The channel of the selector
26
+ */
27
+ channel: string;
28
+ channelOperator: Operator;
29
+ entrypoints?: string[];
30
+ }
31
+ export interface ConditionSelector extends BaseSelector {
32
+ /**
33
+ * The condition of the selector
34
+ */
35
+ condition: string;
36
+ }
37
+ export type Selector = HttpSelector | ChannelSelector | ConditionSelector;
@@ -0,0 +1,34 @@
1
+ export interface Step {
2
+ /**
3
+ * The name of the step
4
+ */
5
+ name?: string;
6
+ /**
7
+ * The description of the step
8
+ */
9
+ description?: string;
10
+ /**
11
+ * Is the step enabled or not.
12
+ */
13
+ enabled?: boolean;
14
+ /**
15
+ * The policy of the step
16
+ */
17
+ policy?: string;
18
+ /**
19
+ * The configuration of the step
20
+ */
21
+ configuration?: unknown;
22
+ /**
23
+ * The condition of the step
24
+ */
25
+ condition?: string;
26
+ /**
27
+ * The message condition of the step
28
+ */
29
+ messageCondition?: string;
30
+ /**
31
+ * Is the policy deployed or not.
32
+ */
33
+ deployed?: boolean;
34
+ }
@@ -0,0 +1,5 @@
1
+ import { Step } from './Step';
2
+ export declare function fakeTestPolicyStep(modifier?: Partial<Step> | ((base: Step) => Step)): Step;
3
+ export declare function fakeRateLimitStep(modifier?: Partial<Step> | ((base: Step) => Step)): Step;
4
+ export declare function fakeJsonToXmlStep(modifier?: Partial<Step> | ((base: Step) => Step)): Step;
5
+ export declare function fakeSharedPolicyGroupPolicyStep(modifier?: Partial<Step> | ((base: Step) => Step)): Step;
@@ -0,0 +1,3 @@
1
+ export * from './Flow.fixture';
2
+ export * from './FlowExecution.fixture';
3
+ export * from './Step.fixture';
@@ -0,0 +1,5 @@
1
+ export * from './Flow';
2
+ export * from './FlowExecution';
3
+ export * from './HttpMethod';
4
+ export * from './Selector';
5
+ export * from './Step';
@@ -0,0 +1,4 @@
1
+ export * from './flow/index-testing';
2
+ export * from './plan/index-testing';
3
+ export * from './policy/index-testing';
4
+ export * from './ConnectorsInfo.fixture';
@@ -0,0 +1,8 @@
1
+ export * from './flow';
2
+ export * from './plan';
3
+ export * from './policy';
4
+ export * from './ConnectorsInfo';
5
+ export * from './SaveOutput';
6
+ export * from './PolicySchemaFetcher';
7
+ export * from './ApiProtocolType';
8
+ export * from './ApiType';
@@ -0,0 +1,6 @@
1
+ import { Flow } from '../flow';
2
+ export interface Plan {
3
+ id: string;
4
+ name: string;
5
+ flows: Flow[];
6
+ }
@@ -0,0 +1,2 @@
1
+ import { Plan } from './Plan';
2
+ export declare function fakePlan(modifier?: Partial<Plan> | ((base: Plan) => Plan)): Plan;
@@ -0,0 +1 @@
1
+ export * from './Plan.fixture';
@@ -0,0 +1 @@
1
+ export * from './Plan';
@@ -0,0 +1,22 @@
1
+ import { SharedPolicyGroupPolicy } from './SharedPolicyGroupPolicy';
2
+ import { Policy } from './Policy';
3
+ type CommonGenericPolicy = {
4
+ _id: string;
5
+ policyId: string;
6
+ icon?: string;
7
+ category?: string;
8
+ type: 'POLICY' | 'SHARED_POLICY_GROUP';
9
+ };
10
+ export type GenericPolicyPolicy = CommonGenericPolicy & {
11
+ type: 'POLICY';
12
+ } & Omit<Policy, 'id'>;
13
+ export type GenericPolicySharedPolicyGroupPolicy = CommonGenericPolicy & {
14
+ type: 'SHARED_POLICY_GROUP';
15
+ sharedPolicyGroupId: string;
16
+ } & Omit<SharedPolicyGroupPolicy, 'id'>;
17
+ export type GenericPolicy = GenericPolicyPolicy | GenericPolicySharedPolicyGroupPolicy;
18
+ export declare const isSharedPolicyGroupPolicy: (policy: GenericPolicy) => policy is GenericPolicySharedPolicyGroupPolicy;
19
+ export declare const isPolicy: (policy: GenericPolicy) => policy is GenericPolicyPolicy;
20
+ export declare const toGenericPolicies: (policies: Policy[], sharedPolicyGroupPolicies?: SharedPolicyGroupPolicy[]) => GenericPolicy[];
21
+ export declare const toPolicy: (genericPolicy: GenericPolicy) => Policy;
22
+ export {};
@@ -0,0 +1,28 @@
1
+ import { ApiProtocolType } from '../ApiProtocolType';
2
+ export type FlowPhase = 'REQUEST' | 'RESPONSE' | 'INTERACT' | 'CONNECT' | 'PUBLISH' | 'SUBSCRIBE';
3
+ export interface Policy {
4
+ id: string;
5
+ name: string;
6
+ icon?: string;
7
+ description?: string;
8
+ category?: string;
9
+ version?: string;
10
+ flowPhaseCompatibility?: Partial<Record<ApiProtocolType, FlowPhase[]>>;
11
+ deployed?: boolean;
12
+ }
13
+ /**
14
+ * @Deprecated to keep as long as we support APIM < 4.6
15
+ */
16
+ export type ExecutionPhase = 'REQUEST' | 'RESPONSE' | 'MESSAGE_REQUEST' | 'MESSAGE_RESPONSE';
17
+ export type PolicyInput = Omit<Policy, 'proxy' | 'message'> & {
18
+ proxy?: ExecutionPhase[];
19
+ message?: ExecutionPhase[];
20
+ };
21
+ /**
22
+ * @Deprecated to keep as long as we support APIM < 4.6
23
+ */
24
+ export declare const fromPolicyInput: (policy: PolicyInput | Policy) => Policy;
25
+ /**
26
+ * @Deprecated to keep as long as we support APIM < 4.6
27
+ */
28
+ export declare const fromExecutionPhase: (phase: ExecutionPhase | FlowPhase) => FlowPhase;
@@ -0,0 +1,4 @@
1
+ import { Policy, PolicyInput } from './Policy';
2
+ export declare const POLICIES_V4_UNREGISTERED_ICON: Policy[];
3
+ export declare function fakeTestPolicy(modifier?: Partial<Policy> | ((base: Policy) => Policy)): Policy;
4
+ export declare function fakeAllPolicies(): (PolicyInput | Policy)[];
@@ -0,0 +1,11 @@
1
+ import { ApiType } from '../ApiType';
2
+ import { FlowPhase } from './Policy';
3
+ export type SharedPolicyGroupPolicy = {
4
+ id: string;
5
+ policyId: string;
6
+ name: string;
7
+ description?: string;
8
+ prerequisiteMessage?: string;
9
+ apiType: ApiType;
10
+ phase: FlowPhase;
11
+ };
@@ -0,0 +1 @@
1
+ export * from './Policy.fixture';
@@ -0,0 +1,3 @@
1
+ export * from './Policy';
2
+ export * from './SharedPolicyGroupPolicy';
3
+ export * from './GenericPolicy';
@@ -0,0 +1,20 @@
1
+ import { ComponentHarness } from '@angular/cdk/testing';
2
+ import { GioPolicyStudioDetailsPhaseHarness } from '../components/flow-details-phase/gio-ps-flow-details-phase.harness';
3
+ import { StepForm } from '../components/step-form/gio-ps-step-form.harness';
4
+ export declare class GioPolicyGroupStudioHarness extends ComponentHarness {
5
+ static hostSelector: string;
6
+ private phaseHarness;
7
+ /**
8
+ * Get Policy Group phase harness
9
+ */
10
+ getPolicyGroupPhase(): Promise<GioPolicyStudioDetailsPhaseHarness>;
11
+ clickAddStep(index: number): Promise<void>;
12
+ /**
13
+ * Add a step to a policy-group
14
+ * @param index Index where to add the step. (Add button index)
15
+ * @param stepConfig Step to add
16
+ */
17
+ addStep(index: number, stepConfig: {
18
+ policyName: string;
19
+ } & StepForm): Promise<void>;
20
+ }
@@ -0,0 +1,78 @@
1
+ import { ComponentHarness } from '@angular/cdk/testing';
2
+ import { MatInputHarness } from '@angular/material/input/testing';
3
+ import { Flow, FlowExecution } from '../models';
4
+ import { GioPolicyStudioDetailsPhaseHarness, PhaseType } from '../components/flow-details-phase/gio-ps-flow-details-phase.harness';
5
+ export declare class GioPolicyStudioHarness extends ComponentHarness {
6
+ static hostSelector: string;
7
+ private menuHarness;
8
+ private detailsHarness;
9
+ private phaseHarness;
10
+ isReadOnly(): Promise<boolean>;
11
+ /**
12
+ * Add a flow to a plan or to "Common flows"
13
+ *
14
+ * @param groupName Plan name where to add the flow. You also can define "Common flows" to add a flow to this group.
15
+ * @param flow Flow to add
16
+ */
17
+ addFlow(groupName: string, flow: Flow): Promise<void>;
18
+ /**
19
+ * Edit a flow configuration
20
+ *
21
+ * @param flowName Flow name to edit
22
+ * @param flow
23
+ */
24
+ editFlowConfig(flowName: string, flow: Partial<Flow>): Promise<void>;
25
+ /**
26
+ * Delete a flow
27
+ *
28
+ * @param flowName Flow name to delete
29
+ */
30
+ deleteFlow(flowName: string): Promise<void>;
31
+ /**
32
+ * Enable or disable a flow
33
+ */
34
+ enableDisableFlow(flowName: string): Promise<void>;
35
+ /**
36
+ * Duplicate a flow
37
+ *
38
+ * @param flowName Flow name to clone
39
+ */
40
+ duplicateFlow(flowName: string): Promise<void>;
41
+ /**
42
+ * Select a flow in the menu
43
+ *
44
+ * @param flowName Flow name to select
45
+ */
46
+ selectFlowInMenu(flowName: string): Promise<void>;
47
+ /**
48
+ * Get the list of flows in the menu
49
+ */
50
+ getFlowsMenu(): Promise<{
51
+ name: string | null;
52
+ flows: {
53
+ name: string | null;
54
+ isSelected: boolean;
55
+ infos: string | null;
56
+ }[];
57
+ }[]>;
58
+ /**
59
+ * Get selected flow infos
60
+ */
61
+ getSelectedFlowInfos(): Promise<Record<string, (string | null)[]>>;
62
+ /**
63
+ * Get selected flow phase harness
64
+ * @param phaseType Phase type to get
65
+ */
66
+ getSelectedFlowPhase(phaseType: PhaseType): Promise<GioPolicyStudioDetailsPhaseHarness | undefined>;
67
+ /**
68
+ * Get Save button state
69
+ */
70
+ getSaveButtonState(): Promise<'VISIBLE' | 'DISABLED' | 'SAVING'>;
71
+ /**
72
+ * Click on the "Save" button
73
+ */
74
+ save(): Promise<void>;
75
+ private setFlowFormDialog;
76
+ setFlowExecutionConfig(flowExecution: FlowExecution): Promise<void>;
77
+ getSearchInput(): Promise<MatInputHarness>;
78
+ }
@@ -0,0 +1,17 @@
1
+ import { Flow } from '../models';
2
+ export interface FlowVM extends Flow {
3
+ _id: string;
4
+ _hasChanged: boolean;
5
+ _parentFlowGroupName?: string;
6
+ }
7
+ export interface FlowGroupVM {
8
+ _id: string;
9
+ _planId?: string;
10
+ _isPlan: boolean;
11
+ name: string;
12
+ flows: FlowVM[];
13
+ }
14
+ export interface PolicyDocumentation {
15
+ content: string;
16
+ language: 'MARKDOWN' | 'ASCIIDOC';
17
+ }
@@ -0,0 +1,3 @@
1
+ export * from './lib/models/index-testing';
2
+ export * from './lib/policy-studio/gio-policy-studio.harness';
3
+ export * from './lib/policy-group-studio/gio-policy-group-studio.harness';