@gravitee/ui-policy-studio-angular 16.0.1-apim-11657-adapt-ui-for-llm-a32a07d → 16.0.1-renovate-digests-pin-bd697d2
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.
- package/fesm2022/gravitee-ui-policy-studio-angular-testing.mjs +1 -124
- package/fesm2022/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
- package/fesm2022/gravitee-ui-policy-studio-angular.mjs +23 -256
- package/fesm2022/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/index.d.ts +4 -7
- package/package.json +1 -1
- package/testing/index.d.ts +4 -10
|
@@ -152,26 +152,6 @@ function fakeMcpFlow(modifier) {
|
|
|
152
152
|
...modifier,
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
function fakeLlmFlow(modifier) {
|
|
156
|
-
const llmSelector = {
|
|
157
|
-
type: 'LLM',
|
|
158
|
-
methods: [],
|
|
159
|
-
};
|
|
160
|
-
const base = {
|
|
161
|
-
name: 'Flow name',
|
|
162
|
-
selectors: [llmSelector],
|
|
163
|
-
request: [],
|
|
164
|
-
response: [],
|
|
165
|
-
enabled: true,
|
|
166
|
-
};
|
|
167
|
-
if (isFunction(modifier)) {
|
|
168
|
-
return modifier(base);
|
|
169
|
-
}
|
|
170
|
-
return {
|
|
171
|
-
...base,
|
|
172
|
-
...modifier,
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
155
|
|
|
176
156
|
/*
|
|
177
157
|
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
@@ -349,7 +329,6 @@ function fakeTestPolicy(modifier) {
|
|
|
349
329
|
flowPhaseCompatibility: {
|
|
350
330
|
HTTP_PROXY: ['REQUEST', 'RESPONSE'],
|
|
351
331
|
HTTP_MCP_PROXY: ['REQUEST', 'RESPONSE'],
|
|
352
|
-
HTTP_LLM_PROXY: ['REQUEST', 'RESPONSE'],
|
|
353
332
|
HTTP_MESSAGE: ['REQUEST', 'RESPONSE', 'SUBSCRIBE', 'PUBLISH'],
|
|
354
333
|
NATIVE_KAFKA: ['CONNECT', 'INTERACT', 'PUBLISH', 'SUBSCRIBE'],
|
|
355
334
|
},
|
|
@@ -788,36 +767,6 @@ function fakeMCPProxyEndpoint(modifier) {
|
|
|
788
767
|
...modifier,
|
|
789
768
|
};
|
|
790
769
|
}
|
|
791
|
-
function fakeLlmProxyEntrypoint(modifier) {
|
|
792
|
-
const base = {
|
|
793
|
-
type: 'llm-proxy',
|
|
794
|
-
name: 'LLM Proxy',
|
|
795
|
-
supportedModes: ['REQUEST_RESPONSE'],
|
|
796
|
-
icon: 'gio:language',
|
|
797
|
-
};
|
|
798
|
-
if (isFunction(modifier)) {
|
|
799
|
-
return modifier(base);
|
|
800
|
-
}
|
|
801
|
-
return {
|
|
802
|
-
...base,
|
|
803
|
-
...modifier,
|
|
804
|
-
};
|
|
805
|
-
}
|
|
806
|
-
function fakeLlmProxyEndpoint(modifier) {
|
|
807
|
-
const base = {
|
|
808
|
-
type: 'llm-proxy',
|
|
809
|
-
name: 'LLM Proxy',
|
|
810
|
-
supportedModes: ['REQUEST_RESPONSE'],
|
|
811
|
-
icon: 'gio:language',
|
|
812
|
-
};
|
|
813
|
-
if (isFunction(modifier)) {
|
|
814
|
-
return modifier(base);
|
|
815
|
-
}
|
|
816
|
-
return {
|
|
817
|
-
...base,
|
|
818
|
-
...modifier,
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
770
|
|
|
822
771
|
/*
|
|
823
772
|
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
@@ -1762,67 +1711,6 @@ class GioPolicyStudioFlowMcpFormDialogHarness extends ComponentHarness {
|
|
|
1762
1711
|
}
|
|
1763
1712
|
}
|
|
1764
1713
|
|
|
1765
|
-
/*
|
|
1766
|
-
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
1767
|
-
*
|
|
1768
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1769
|
-
* you may not use this file except in compliance with the License.
|
|
1770
|
-
* You may obtain a copy of the License at
|
|
1771
|
-
*
|
|
1772
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1773
|
-
*
|
|
1774
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1775
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1776
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1777
|
-
* See the License for the specific language governing permissions and
|
|
1778
|
-
* limitations under the License.
|
|
1779
|
-
*/
|
|
1780
|
-
class GioPolicyStudioFlowLlmFormDialogHarness extends ComponentHarness {
|
|
1781
|
-
constructor() {
|
|
1782
|
-
super(...arguments);
|
|
1783
|
-
this.getSaveBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__saveBtn' }));
|
|
1784
|
-
this.getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));
|
|
1785
|
-
this.nameInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="name"]' }));
|
|
1786
|
-
this.methodsInput = this.locatorFor(GioFormTagsInputHarness.with({ selector: '[formControlName="llmMethods"]' }));
|
|
1787
|
-
this.conditionInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="condition"]' }));
|
|
1788
|
-
}
|
|
1789
|
-
static { this.hostSelector = 'gio-ps-flow-llm-form-dialog'; }
|
|
1790
|
-
async setFlowFormValues(flow) {
|
|
1791
|
-
if (flow.name) {
|
|
1792
|
-
const nameInput = await this.nameInput();
|
|
1793
|
-
await nameInput.setValue(flow.name);
|
|
1794
|
-
}
|
|
1795
|
-
if (flow.methods) {
|
|
1796
|
-
const methodsInput = await this.methodsInput();
|
|
1797
|
-
for (const method of flow.methods) {
|
|
1798
|
-
await methodsInput.addTag(method);
|
|
1799
|
-
}
|
|
1800
|
-
}
|
|
1801
|
-
if (flow.condition) {
|
|
1802
|
-
const conditionInput = await this.conditionInput();
|
|
1803
|
-
await conditionInput.setValue(flow.condition);
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
async getFlowFormValues() {
|
|
1807
|
-
return {
|
|
1808
|
-
name: await this.getFlowName(),
|
|
1809
|
-
methods: await this.methodsInput().then(input => input.getTags()),
|
|
1810
|
-
condition: await this.conditionInput().then(input => input.getValue()),
|
|
1811
|
-
};
|
|
1812
|
-
}
|
|
1813
|
-
async getFlowName() {
|
|
1814
|
-
return this.nameInput().then(input => input.getValue());
|
|
1815
|
-
}
|
|
1816
|
-
async save() {
|
|
1817
|
-
const button = await this.getSaveBtn();
|
|
1818
|
-
await button.click();
|
|
1819
|
-
}
|
|
1820
|
-
async cancel() {
|
|
1821
|
-
const button = await this.getCancelBtn();
|
|
1822
|
-
await button.click();
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
1714
|
/*
|
|
1827
1715
|
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
1828
1716
|
*
|
|
@@ -1962,7 +1850,6 @@ class GioPolicyStudioHarness extends ComponentHarness {
|
|
|
1962
1850
|
const httpSelector = flow.selectors?.find(s => s.type === 'HTTP');
|
|
1963
1851
|
const conditionSelector = flow.selectors?.find(s => s.type === 'CONDITION');
|
|
1964
1852
|
const mcpSelector = flow.selectors?.find(s => s.type === 'MCP');
|
|
1965
|
-
const llmSelector = flow.selectors?.find(s => s.type === 'LLM');
|
|
1966
1853
|
if (!!channelSelector && !!httpSelector) {
|
|
1967
1854
|
throw new Error('Channel and HTTP selectors are not be used together.');
|
|
1968
1855
|
}
|
|
@@ -2005,16 +1892,6 @@ class GioPolicyStudioHarness extends ComponentHarness {
|
|
|
2005
1892
|
await flowFormNewDialog.save();
|
|
2006
1893
|
return;
|
|
2007
1894
|
}
|
|
2008
|
-
if (llmSelector) {
|
|
2009
|
-
const flowFormNewDialog = await this.documentRootLocatorFactory().locatorFor(GioPolicyStudioFlowLlmFormDialogHarness)();
|
|
2010
|
-
await flowFormNewDialog.setFlowFormValues({
|
|
2011
|
-
name: flow.name,
|
|
2012
|
-
methods: llmSelector?.methods,
|
|
2013
|
-
condition: conditionSelector?.condition,
|
|
2014
|
-
});
|
|
2015
|
-
await flowFormNewDialog.save();
|
|
2016
|
-
return;
|
|
2017
|
-
}
|
|
2018
1895
|
if (!channelSelector && !httpSelector) {
|
|
2019
1896
|
const flowFormNewDialog = await this.documentRootLocatorFactory().locatorFor(GioPolicyStudioFlowNativeFormDialogHarness)();
|
|
2020
1897
|
await flowFormNewDialog.setFlowFormValues({
|
|
@@ -2104,5 +1981,5 @@ class GioPolicyGroupStudioHarness extends ComponentHarness {
|
|
|
2104
1981
|
* Generated bundle index. Do not edit.
|
|
2105
1982
|
*/
|
|
2106
1983
|
|
|
2107
|
-
export { GioPolicyGroupStudioHarness, GioPolicyStudioHarness, POLICIES_V4_UNREGISTERED_ICON, fakeAllPolicies, fakeBestMatchFlowExecution, fakeChannelFlow, fakeConditionedChannelFlow, fakeConditionedHttpFlow, fakeDefaultFlowExecution, fakeHTTPGetMessageEntrypoint, fakeHTTPPostMessageEntrypoint, fakeHTTPProxyEndpoint, fakeHTTPProxyEntrypoint, fakeHttpFlow, fakeJsonToXmlStep, fakeKafkaMessageEndpoint, fakeKafkaNativeEndpoint, fakeKafkaNativeEntrypoint,
|
|
1984
|
+
export { GioPolicyGroupStudioHarness, GioPolicyStudioHarness, POLICIES_V4_UNREGISTERED_ICON, fakeAllPolicies, fakeBestMatchFlowExecution, fakeChannelFlow, fakeConditionedChannelFlow, fakeConditionedHttpFlow, fakeDefaultFlowExecution, fakeHTTPGetMessageEntrypoint, fakeHTTPPostMessageEntrypoint, fakeHTTPProxyEndpoint, fakeHTTPProxyEntrypoint, fakeHttpFlow, fakeJsonToXmlStep, fakeKafkaMessageEndpoint, fakeKafkaNativeEndpoint, fakeKafkaNativeEntrypoint, fakeMCPProxyEndpoint, fakeMCPProxyEntrypoint, fakeMcpFlow, fakeMockMessageEndpoint, fakeNativeFlow, fakePlan, fakeRateLimitStep, fakeSSEMessageEntrypoint, fakeSharedPolicyGroupPolicyStep, fakeTestPolicy, fakeTestPolicyStep, fakeWebhookMessageEntrypoint, fakeWebsocketMessageEntrypoint };
|
|
2108
1985
|
//# sourceMappingURL=gravitee-ui-policy-studio-angular-testing.mjs.map
|