@uipath/apollo-wind 2.94.1 → 2.95.1
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/dist/components/ui/byo-model-dialog/byo-model-dialog.cjs +1297 -0
- package/dist/components/ui/byo-model-dialog/byo-model-dialog.d.ts +24 -0
- package/dist/components/ui/byo-model-dialog/byo-model-dialog.js +1263 -0
- package/dist/components/ui/byo-model-dialog/index.cjs +43 -0
- package/dist/components/ui/byo-model-dialog/index.d.ts +5 -0
- package/dist/components/ui/byo-model-dialog/index.js +3 -0
- package/dist/components/ui/byo-model-dialog/labels.cjs +114 -0
- package/dist/components/ui/byo-model-dialog/labels.d.ts +79 -0
- package/dist/components/ui/byo-model-dialog/labels.js +77 -0
- package/dist/components/ui/byo-model-dialog/types.cjs +18 -0
- package/dist/components/ui/byo-model-dialog/types.d.ts +187 -0
- package/dist/components/ui/byo-model-dialog/types.js +0 -0
- package/dist/components/ui/index.cjs +302 -289
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/index.cjs +19 -9
- package/dist/index.d.ts +7 -5
- package/dist/index.js +4 -3
- package/dist/styles.css +67 -0
- package/dist/tailwind.utilities.css +41 -0
- package/package.json +2 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
resolveByoModelDialogLabels: ()=>external_labels_cjs_namespaceObject.resolveByoModelDialogLabels,
|
|
28
|
+
DEFAULT_BYO_MODEL_DIALOG_LABELS: ()=>external_labels_cjs_namespaceObject.DEFAULT_BYO_MODEL_DIALOG_LABELS,
|
|
29
|
+
ByoModelDialog: ()=>external_byo_model_dialog_cjs_namespaceObject.ByoModelDialog
|
|
30
|
+
});
|
|
31
|
+
const external_byo_model_dialog_cjs_namespaceObject = require("./byo-model-dialog.cjs");
|
|
32
|
+
const external_labels_cjs_namespaceObject = require("./labels.cjs");
|
|
33
|
+
exports.ByoModelDialog = __webpack_exports__.ByoModelDialog;
|
|
34
|
+
exports.DEFAULT_BYO_MODEL_DIALOG_LABELS = __webpack_exports__.DEFAULT_BYO_MODEL_DIALOG_LABELS;
|
|
35
|
+
exports.resolveByoModelDialogLabels = __webpack_exports__.resolveByoModelDialogLabels;
|
|
36
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
37
|
+
"ByoModelDialog",
|
|
38
|
+
"DEFAULT_BYO_MODEL_DIALOG_LABELS",
|
|
39
|
+
"resolveByoModelDialogLabels"
|
|
40
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
41
|
+
Object.defineProperty(exports, '__esModule', {
|
|
42
|
+
value: true
|
|
43
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { ByoModelDialogProps } from './byo-model-dialog';
|
|
2
|
+
export { ByoModelDialog } from './byo-model-dialog';
|
|
3
|
+
export type { ByoModelDialogLabels } from './labels';
|
|
4
|
+
export { DEFAULT_BYO_MODEL_DIALOG_LABELS, resolveByoModelDialogLabels } from './labels';
|
|
5
|
+
export type { ByoApiType, ByoAuthType, ByoConnection, ByoConnectionForm, ByoConnectionValues, ByoConnectRequest, ByoDialogContext, ByoEditTarget, ByoFailure, ByoFieldOption, ByoFolder, ByoFormField, ByoModelDialogApi, ByoModelToEdit, ByoProvider, ByoProviderModel, ByoProviderModels, ByoReplaceableModel, ByoResult, ByoSavedModel, ByoSaveRequest, } from './types';
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
DEFAULT_BYO_MODEL_DIALOG_LABELS: ()=>DEFAULT_BYO_MODEL_DIALOG_LABELS,
|
|
28
|
+
resolveByoModelDialogLabels: ()=>resolveByoModelDialogLabels
|
|
29
|
+
});
|
|
30
|
+
const DEFAULT_BYO_MODEL_DIALOG_LABELS = {
|
|
31
|
+
title: 'Use your own model',
|
|
32
|
+
description: 'UiPath calls your provider with your own credentials.',
|
|
33
|
+
editTitle: 'Edit your model',
|
|
34
|
+
editDescription: 'Change the model, its name or the connection it uses.',
|
|
35
|
+
loadingContext: 'Loading your connections',
|
|
36
|
+
loadingModel: 'Loading your model',
|
|
37
|
+
providerStep: 'Provider',
|
|
38
|
+
providerPlaceholder: 'Select a provider',
|
|
39
|
+
connectionStep: 'Connection',
|
|
40
|
+
connectionNeedsProvider: 'Select a provider first',
|
|
41
|
+
savedConnection: (name, folder)=>`Saved connection: ${name} · ${folder}`,
|
|
42
|
+
newConnection: 'New connection…',
|
|
43
|
+
connectedIn: (folder)=>`Connected. New connection created in ${folder}.`,
|
|
44
|
+
credentialsTitle: (provider)=>`${provider} credentials`,
|
|
45
|
+
credentialsCaption: (provider)=>`Sent only to ${provider}.`,
|
|
46
|
+
loadingForm: (provider)=>`Loading the ${provider} form…`,
|
|
47
|
+
authType: 'Authentication',
|
|
48
|
+
moreSettings: (provider)=>`More ${provider} settings`,
|
|
49
|
+
optional: 'optional',
|
|
50
|
+
inUiPathTitle: 'In UiPath',
|
|
51
|
+
inUiPathCaption: (provider)=>`Your connection to ${provider} will be saved in this folder.`,
|
|
52
|
+
connectionName: 'Connection name',
|
|
53
|
+
folder: 'Folder',
|
|
54
|
+
folderHint: 'Personal workspace keeps it to you; a shared folder lets teammates reuse it.',
|
|
55
|
+
connectionNameTaken: 'You already have a connection with this name.',
|
|
56
|
+
connect: 'Connect',
|
|
57
|
+
connecting: 'Connecting…',
|
|
58
|
+
editConnection: 'Edit connection',
|
|
59
|
+
secretKeepHint: 'Leave blank to keep the current value.',
|
|
60
|
+
loadingConnection: 'Loading the connection settings…',
|
|
61
|
+
saveConnection: 'Save connection',
|
|
62
|
+
savingConnection: 'Saving…',
|
|
63
|
+
cancelConnectionEdit: 'Cancel',
|
|
64
|
+
connectionUpdated: 'Connection updated.',
|
|
65
|
+
modelStep: 'Model',
|
|
66
|
+
modelNeedsConnection: (provider)=>`Connect to list your ${provider} models`,
|
|
67
|
+
modelsLoading: (provider)=>`Loading your ${provider} models…`,
|
|
68
|
+
modelsFailed: (provider)=>`Could not list your ${provider} models`,
|
|
69
|
+
modelSelect: (compatible)=>`Select a model · ${compatible} can be used`,
|
|
70
|
+
modelSearch: (total)=>`Search ${total} models…`,
|
|
71
|
+
modelNoMatch: (query)=>`No models match "${query}".`,
|
|
72
|
+
compatibleGroup: (count)=>`Can be used · ${count}`,
|
|
73
|
+
incompatibleGroup: (count)=>`Not supported · ${count}`,
|
|
74
|
+
modelIdPlaceholder: 'Model or deployment name',
|
|
75
|
+
modelIdLabel: 'Model id',
|
|
76
|
+
nameStep: 'Name in your model list',
|
|
77
|
+
nameHint: 'Shown in the model picker. Defaults to the model id.',
|
|
78
|
+
nameTaken: (name)=>`"${name}" is already in your model list. Pick another name.`,
|
|
79
|
+
nameReserved: (name)=>`"${name}" is the name of a UiPath model. Pick another name.`,
|
|
80
|
+
useOwnName: 'A name of your own',
|
|
81
|
+
useReplacement: 'Replace a UiPath model',
|
|
82
|
+
replacementPlaceholder: 'Select a UiPath model',
|
|
83
|
+
replacementHint: 'Calls to this UiPath model go to your model instead.',
|
|
84
|
+
deprecated: 'Deprecated',
|
|
85
|
+
retiresOn: (date)=>`To be retired on ${date}`,
|
|
86
|
+
apiTypeStep: 'API type',
|
|
87
|
+
apiTypePlaceholder: 'Select an API type',
|
|
88
|
+
apiTypeHint: 'The API endpoint supported by the LLM.',
|
|
89
|
+
apiTypeNone: (provider)=>`${provider} offers no API type that can serve this model.`,
|
|
90
|
+
showResponse: 'Show LLM response',
|
|
91
|
+
hideResponse: 'Hide LLM response',
|
|
92
|
+
close: 'Close',
|
|
93
|
+
cancel: 'Cancel',
|
|
94
|
+
testAndAdd: 'Test and add',
|
|
95
|
+
testAndSave: 'Test and save',
|
|
96
|
+
testing: 'Testing…',
|
|
97
|
+
testAndAddHint: (provider)=>`Sends one short test message to ${provider}, then adds the model to your model list.`,
|
|
98
|
+
testAndSaveHint: (provider)=>`Sends one short test message to ${provider}, then saves your changes.`
|
|
99
|
+
};
|
|
100
|
+
function resolveByoModelDialogLabels(labels) {
|
|
101
|
+
return labels ? {
|
|
102
|
+
...DEFAULT_BYO_MODEL_DIALOG_LABELS,
|
|
103
|
+
...labels
|
|
104
|
+
} : DEFAULT_BYO_MODEL_DIALOG_LABELS;
|
|
105
|
+
}
|
|
106
|
+
exports.DEFAULT_BYO_MODEL_DIALOG_LABELS = __webpack_exports__.DEFAULT_BYO_MODEL_DIALOG_LABELS;
|
|
107
|
+
exports.resolveByoModelDialogLabels = __webpack_exports__.resolveByoModelDialogLabels;
|
|
108
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
109
|
+
"DEFAULT_BYO_MODEL_DIALOG_LABELS",
|
|
110
|
+
"resolveByoModelDialogLabels"
|
|
111
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
112
|
+
Object.defineProperty(exports, '__esModule', {
|
|
113
|
+
value: true
|
|
114
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every user-visible string the dialog renders, with English defaults, as the
|
|
3
|
+
* model picker's labels are: a host passes what its own catalog produced.
|
|
4
|
+
* Field labels, hints and the provider's own error text come from the host's
|
|
5
|
+
* API and are shown as given.
|
|
6
|
+
*/
|
|
7
|
+
export interface ByoModelDialogLabels {
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
editTitle: string;
|
|
11
|
+
editDescription: string;
|
|
12
|
+
loadingContext: string;
|
|
13
|
+
loadingModel: string;
|
|
14
|
+
providerStep: string;
|
|
15
|
+
providerPlaceholder: string;
|
|
16
|
+
connectionStep: string;
|
|
17
|
+
connectionNeedsProvider: string;
|
|
18
|
+
savedConnection: (name: string, folder: string) => string;
|
|
19
|
+
newConnection: string;
|
|
20
|
+
connectedIn: (folder: string) => string;
|
|
21
|
+
credentialsTitle: (provider: string) => string;
|
|
22
|
+
credentialsCaption: (provider: string) => string;
|
|
23
|
+
loadingForm: (provider: string) => string;
|
|
24
|
+
authType: string;
|
|
25
|
+
moreSettings: (provider: string) => string;
|
|
26
|
+
optional: string;
|
|
27
|
+
inUiPathTitle: string;
|
|
28
|
+
inUiPathCaption: (provider: string) => string;
|
|
29
|
+
connectionName: string;
|
|
30
|
+
folder: string;
|
|
31
|
+
folderHint: string;
|
|
32
|
+
connectionNameTaken: string;
|
|
33
|
+
connect: string;
|
|
34
|
+
connecting: string;
|
|
35
|
+
editConnection: string;
|
|
36
|
+
secretKeepHint: string;
|
|
37
|
+
loadingConnection: string;
|
|
38
|
+
saveConnection: string;
|
|
39
|
+
savingConnection: string;
|
|
40
|
+
cancelConnectionEdit: string;
|
|
41
|
+
connectionUpdated: string;
|
|
42
|
+
modelStep: string;
|
|
43
|
+
modelNeedsConnection: (provider: string) => string;
|
|
44
|
+
modelsLoading: (provider: string) => string;
|
|
45
|
+
modelsFailed: (provider: string) => string;
|
|
46
|
+
modelSelect: (compatible: number) => string;
|
|
47
|
+
modelSearch: (total: number) => string;
|
|
48
|
+
modelNoMatch: (query: string) => string;
|
|
49
|
+
compatibleGroup: (count: number) => string;
|
|
50
|
+
incompatibleGroup: (count: number) => string;
|
|
51
|
+
modelIdPlaceholder: string;
|
|
52
|
+
modelIdLabel: string;
|
|
53
|
+
nameStep: string;
|
|
54
|
+
nameHint: string;
|
|
55
|
+
nameTaken: (name: string) => string;
|
|
56
|
+
nameReserved: (name: string) => string;
|
|
57
|
+
useOwnName: string;
|
|
58
|
+
useReplacement: string;
|
|
59
|
+
replacementPlaceholder: string;
|
|
60
|
+
replacementHint: string;
|
|
61
|
+
deprecated: string;
|
|
62
|
+
retiresOn: (date: string) => string;
|
|
63
|
+
apiTypeStep: string;
|
|
64
|
+
apiTypePlaceholder: string;
|
|
65
|
+
apiTypeHint: string;
|
|
66
|
+
apiTypeNone: (provider: string) => string;
|
|
67
|
+
showResponse: string;
|
|
68
|
+
hideResponse: string;
|
|
69
|
+
close: string;
|
|
70
|
+
cancel: string;
|
|
71
|
+
testAndAdd: string;
|
|
72
|
+
testAndSave: string;
|
|
73
|
+
testing: string;
|
|
74
|
+
testAndAddHint: (provider: string) => string;
|
|
75
|
+
testAndSaveHint: (provider: string) => string;
|
|
76
|
+
}
|
|
77
|
+
export declare const DEFAULT_BYO_MODEL_DIALOG_LABELS: ByoModelDialogLabels;
|
|
78
|
+
/** Fill the gaps in a host's partial override. */
|
|
79
|
+
export declare function resolveByoModelDialogLabels(labels?: Partial<ByoModelDialogLabels>): ByoModelDialogLabels;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
const DEFAULT_BYO_MODEL_DIALOG_LABELS = {
|
|
2
|
+
title: 'Use your own model',
|
|
3
|
+
description: 'UiPath calls your provider with your own credentials.',
|
|
4
|
+
editTitle: 'Edit your model',
|
|
5
|
+
editDescription: 'Change the model, its name or the connection it uses.',
|
|
6
|
+
loadingContext: 'Loading your connections',
|
|
7
|
+
loadingModel: 'Loading your model',
|
|
8
|
+
providerStep: 'Provider',
|
|
9
|
+
providerPlaceholder: 'Select a provider',
|
|
10
|
+
connectionStep: 'Connection',
|
|
11
|
+
connectionNeedsProvider: 'Select a provider first',
|
|
12
|
+
savedConnection: (name, folder)=>`Saved connection: ${name} · ${folder}`,
|
|
13
|
+
newConnection: 'New connection…',
|
|
14
|
+
connectedIn: (folder)=>`Connected. New connection created in ${folder}.`,
|
|
15
|
+
credentialsTitle: (provider)=>`${provider} credentials`,
|
|
16
|
+
credentialsCaption: (provider)=>`Sent only to ${provider}.`,
|
|
17
|
+
loadingForm: (provider)=>`Loading the ${provider} form…`,
|
|
18
|
+
authType: 'Authentication',
|
|
19
|
+
moreSettings: (provider)=>`More ${provider} settings`,
|
|
20
|
+
optional: 'optional',
|
|
21
|
+
inUiPathTitle: 'In UiPath',
|
|
22
|
+
inUiPathCaption: (provider)=>`Your connection to ${provider} will be saved in this folder.`,
|
|
23
|
+
connectionName: 'Connection name',
|
|
24
|
+
folder: 'Folder',
|
|
25
|
+
folderHint: 'Personal workspace keeps it to you; a shared folder lets teammates reuse it.',
|
|
26
|
+
connectionNameTaken: 'You already have a connection with this name.',
|
|
27
|
+
connect: 'Connect',
|
|
28
|
+
connecting: 'Connecting…',
|
|
29
|
+
editConnection: 'Edit connection',
|
|
30
|
+
secretKeepHint: 'Leave blank to keep the current value.',
|
|
31
|
+
loadingConnection: 'Loading the connection settings…',
|
|
32
|
+
saveConnection: 'Save connection',
|
|
33
|
+
savingConnection: 'Saving…',
|
|
34
|
+
cancelConnectionEdit: 'Cancel',
|
|
35
|
+
connectionUpdated: 'Connection updated.',
|
|
36
|
+
modelStep: 'Model',
|
|
37
|
+
modelNeedsConnection: (provider)=>`Connect to list your ${provider} models`,
|
|
38
|
+
modelsLoading: (provider)=>`Loading your ${provider} models…`,
|
|
39
|
+
modelsFailed: (provider)=>`Could not list your ${provider} models`,
|
|
40
|
+
modelSelect: (compatible)=>`Select a model · ${compatible} can be used`,
|
|
41
|
+
modelSearch: (total)=>`Search ${total} models…`,
|
|
42
|
+
modelNoMatch: (query)=>`No models match "${query}".`,
|
|
43
|
+
compatibleGroup: (count)=>`Can be used · ${count}`,
|
|
44
|
+
incompatibleGroup: (count)=>`Not supported · ${count}`,
|
|
45
|
+
modelIdPlaceholder: 'Model or deployment name',
|
|
46
|
+
modelIdLabel: 'Model id',
|
|
47
|
+
nameStep: 'Name in your model list',
|
|
48
|
+
nameHint: 'Shown in the model picker. Defaults to the model id.',
|
|
49
|
+
nameTaken: (name)=>`"${name}" is already in your model list. Pick another name.`,
|
|
50
|
+
nameReserved: (name)=>`"${name}" is the name of a UiPath model. Pick another name.`,
|
|
51
|
+
useOwnName: 'A name of your own',
|
|
52
|
+
useReplacement: 'Replace a UiPath model',
|
|
53
|
+
replacementPlaceholder: 'Select a UiPath model',
|
|
54
|
+
replacementHint: 'Calls to this UiPath model go to your model instead.',
|
|
55
|
+
deprecated: 'Deprecated',
|
|
56
|
+
retiresOn: (date)=>`To be retired on ${date}`,
|
|
57
|
+
apiTypeStep: 'API type',
|
|
58
|
+
apiTypePlaceholder: 'Select an API type',
|
|
59
|
+
apiTypeHint: 'The API endpoint supported by the LLM.',
|
|
60
|
+
apiTypeNone: (provider)=>`${provider} offers no API type that can serve this model.`,
|
|
61
|
+
showResponse: 'Show LLM response',
|
|
62
|
+
hideResponse: 'Hide LLM response',
|
|
63
|
+
close: 'Close',
|
|
64
|
+
cancel: 'Cancel',
|
|
65
|
+
testAndAdd: 'Test and add',
|
|
66
|
+
testAndSave: 'Test and save',
|
|
67
|
+
testing: 'Testing…',
|
|
68
|
+
testAndAddHint: (provider)=>`Sends one short test message to ${provider}, then adds the model to your model list.`,
|
|
69
|
+
testAndSaveHint: (provider)=>`Sends one short test message to ${provider}, then saves your changes.`
|
|
70
|
+
};
|
|
71
|
+
function resolveByoModelDialogLabels(labels) {
|
|
72
|
+
return labels ? {
|
|
73
|
+
...DEFAULT_BYO_MODEL_DIALOG_LABELS,
|
|
74
|
+
...labels
|
|
75
|
+
} : DEFAULT_BYO_MODEL_DIALOG_LABELS;
|
|
76
|
+
}
|
|
77
|
+
export { DEFAULT_BYO_MODEL_DIALOG_LABELS, resolveByoModelDialogLabels };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.r = (exports1)=>{
|
|
5
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
|
+
value: 'Module'
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
9
|
+
value: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
})();
|
|
13
|
+
var __webpack_exports__ = {};
|
|
14
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15
|
+
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
16
|
+
Object.defineProperty(exports, '__esModule', {
|
|
17
|
+
value: true
|
|
18
|
+
});
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/** A provider the user can bring a model from. */
|
|
2
|
+
export interface ByoProvider {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
/** An authentication type the provider's connector offers, e.g. API key or client credentials. */
|
|
7
|
+
export interface ByoAuthType {
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}
|
|
11
|
+
/** One credential field of a provider's connection form. */
|
|
12
|
+
export interface ByoFormField {
|
|
13
|
+
key: string;
|
|
14
|
+
label: string;
|
|
15
|
+
/** Rendered as a masked input. */
|
|
16
|
+
secret: boolean;
|
|
17
|
+
required: boolean;
|
|
18
|
+
/** Optional settings shown under "More settings". */
|
|
19
|
+
advanced: boolean;
|
|
20
|
+
/** The authentication type the field belongs to; `null` for every type. */
|
|
21
|
+
group: string | null;
|
|
22
|
+
defaultValue: string;
|
|
23
|
+
placeholder: string;
|
|
24
|
+
hint: string;
|
|
25
|
+
/** The values the field takes, rendered as a dropdown; omitted for a free-text field. */
|
|
26
|
+
options?: ByoFieldOption[];
|
|
27
|
+
}
|
|
28
|
+
/** One value a dropdown field offers. */
|
|
29
|
+
export interface ByoFieldOption {
|
|
30
|
+
value: string;
|
|
31
|
+
label: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ByoConnectionForm {
|
|
34
|
+
authTypes: ByoAuthType[];
|
|
35
|
+
defaultAuthType: string | null;
|
|
36
|
+
fields: ByoFormField[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A saved connection's current settings, to fill its edit form.
|
|
40
|
+
* Secret values are never included: a secret left blank keeps its current value.
|
|
41
|
+
*/
|
|
42
|
+
export interface ByoConnectionValues {
|
|
43
|
+
authType: string | null;
|
|
44
|
+
values: Record<string, string>;
|
|
45
|
+
}
|
|
46
|
+
export interface ByoFolder {
|
|
47
|
+
id: string;
|
|
48
|
+
label: string;
|
|
49
|
+
}
|
|
50
|
+
/** A saved connection to a provider. */
|
|
51
|
+
export interface ByoConnection {
|
|
52
|
+
id: string;
|
|
53
|
+
providerId: string;
|
|
54
|
+
name: string;
|
|
55
|
+
folderId: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ByoProviderModel {
|
|
58
|
+
id: string;
|
|
59
|
+
/** Short trailing text on the row, e.g. the inference profile in use. */
|
|
60
|
+
note?: string;
|
|
61
|
+
/** Short tag for a model that cannot be used, e.g. "Embedding model". */
|
|
62
|
+
short?: string;
|
|
63
|
+
/** Why the model cannot be used; set for incompatible models only. */
|
|
64
|
+
reason?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface ByoProviderModels {
|
|
67
|
+
compatible: ByoProviderModel[];
|
|
68
|
+
incompatible: ByoProviderModel[];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A refusal, shown in the dialog until the user changes something.
|
|
72
|
+
* `title` names what failed, `message` is the provider's own text,
|
|
73
|
+
* `detail` the raw response behind "Show LLM response". When there is a
|
|
74
|
+
* `detail`, the dialog shows it instead of `message`.
|
|
75
|
+
*/
|
|
76
|
+
export interface ByoFailure {
|
|
77
|
+
title: string;
|
|
78
|
+
message?: string;
|
|
79
|
+
detail?: string;
|
|
80
|
+
}
|
|
81
|
+
export type ByoResult<T> = {
|
|
82
|
+
ok: true;
|
|
83
|
+
value: T;
|
|
84
|
+
} | {
|
|
85
|
+
ok: false;
|
|
86
|
+
failure: ByoFailure;
|
|
87
|
+
};
|
|
88
|
+
/** An API the model is called through, e.g. OpenAI Responses. */
|
|
89
|
+
export interface ByoApiType {
|
|
90
|
+
value: string;
|
|
91
|
+
label: string;
|
|
92
|
+
}
|
|
93
|
+
/** A UiPath model the user's own model can stand in for, under the UiPath model's name. */
|
|
94
|
+
export interface ByoReplaceableModel {
|
|
95
|
+
name: string;
|
|
96
|
+
/** The date the UiPath model retires on (`YYYY-MM-DD`); set only for a model being retired. */
|
|
97
|
+
retiresOn?: string;
|
|
98
|
+
/** Already replaced by one of the user's models, so it cannot be replaced again. */
|
|
99
|
+
replaced: boolean;
|
|
100
|
+
}
|
|
101
|
+
export interface ByoDialogContext {
|
|
102
|
+
providers: ByoProvider[];
|
|
103
|
+
connections: ByoConnection[];
|
|
104
|
+
folders: ByoFolder[];
|
|
105
|
+
defaultFolderId: string | null;
|
|
106
|
+
/** Names already in the user's model list, compared case-insensitively. */
|
|
107
|
+
takenModelNames: string[];
|
|
108
|
+
/** UiPath models the user's model can replace. */
|
|
109
|
+
replaceableModels: ByoReplaceableModel[];
|
|
110
|
+
/** Whether a model can be added under a name of the user's own. */
|
|
111
|
+
allowsNewNames: boolean;
|
|
112
|
+
/** UiPath model names, which a name of the user's own cannot take. Compared case-insensitively. */
|
|
113
|
+
reservedModelNames: string[];
|
|
114
|
+
}
|
|
115
|
+
/** Which saved model the dialog edits: the host knows it from its model list. */
|
|
116
|
+
export interface ByoEditTarget {
|
|
117
|
+
configurationId: string;
|
|
118
|
+
/** The model's name in the user's model list. */
|
|
119
|
+
name: string;
|
|
120
|
+
}
|
|
121
|
+
/** A saved model as the edit form starts from. */
|
|
122
|
+
export interface ByoModelToEdit {
|
|
123
|
+
configurationId: string;
|
|
124
|
+
providerId: string;
|
|
125
|
+
connectionId: string;
|
|
126
|
+
modelId: string;
|
|
127
|
+
name: string;
|
|
128
|
+
/** The UiPath model it replaces, whose name `name` then is; `null` for a name of the user's own. */
|
|
129
|
+
replaces: string | null;
|
|
130
|
+
/** `null` when the saved model names none. */
|
|
131
|
+
apiType: string | null;
|
|
132
|
+
}
|
|
133
|
+
export interface ByoConnectRequest {
|
|
134
|
+
providerId: string;
|
|
135
|
+
form: ByoConnectionForm;
|
|
136
|
+
authType: string | null;
|
|
137
|
+
values: Record<string, string>;
|
|
138
|
+
name: string;
|
|
139
|
+
folderId: string;
|
|
140
|
+
/** The saved connection being edited; omitted when creating a connection. */
|
|
141
|
+
existing?: ByoConnection;
|
|
142
|
+
}
|
|
143
|
+
export interface ByoSaveRequest {
|
|
144
|
+
providerId: string;
|
|
145
|
+
connection: ByoConnection;
|
|
146
|
+
modelId: string;
|
|
147
|
+
name: string;
|
|
148
|
+
/** The UiPath model it replaces, whose name `name` then is; `null` for a name of the user's own. */
|
|
149
|
+
replaces: string | null;
|
|
150
|
+
apiType: string;
|
|
151
|
+
/** The saved model being edited; omitted when adding a model. */
|
|
152
|
+
editing?: ByoModelToEdit;
|
|
153
|
+
}
|
|
154
|
+
export interface ByoSavedModel {
|
|
155
|
+
name: string;
|
|
156
|
+
modelId: string;
|
|
157
|
+
connectionId: string;
|
|
158
|
+
folderId: string;
|
|
159
|
+
/** How long the test call took. */
|
|
160
|
+
latencyMs: number;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* The calls the dialog makes. The dialog renders and sequences them; the host
|
|
164
|
+
* owns how they reach Integration Service and the LLM Gateway.
|
|
165
|
+
*/
|
|
166
|
+
export interface ByoModelDialogApi {
|
|
167
|
+
loadContext: () => Promise<ByoResult<ByoDialogContext>>;
|
|
168
|
+
/** Reads the saved model the dialog was opened to edit. */
|
|
169
|
+
loadModel: (target: ByoEditTarget) => Promise<ByoResult<ByoModelToEdit>>;
|
|
170
|
+
loadForm: (providerId: string, folderId: string | null) => Promise<ByoResult<ByoConnectionForm>>;
|
|
171
|
+
/** Reads a saved connection's current settings for its edit form. */
|
|
172
|
+
loadConnectionValues: (providerId: string, connection: ByoConnection) => Promise<ByoResult<ByoConnectionValues>>;
|
|
173
|
+
/** Creates a connection, or updates `existing` when one is given. */
|
|
174
|
+
connect: (request: ByoConnectRequest) => Promise<ByoResult<ByoConnection>>;
|
|
175
|
+
listModels: (providerId: string, connection: ByoConnection) => Promise<ByoResult<ByoProviderModels>>;
|
|
176
|
+
/**
|
|
177
|
+
* The API types the provider can call the model through, most suitable first: replacing the
|
|
178
|
+
* UiPath model `replaces`, or under a name of the user's own when it is `null`. Answers from
|
|
179
|
+
* what `loadContext` read.
|
|
180
|
+
*/
|
|
181
|
+
apiTypes: (providerId: string, replaces: string | null) => ByoApiType[];
|
|
182
|
+
/**
|
|
183
|
+
* Tests the model through the connection and, if it passes, saves it:
|
|
184
|
+
* adds it to the user's model list, or updates `editing` when one is given.
|
|
185
|
+
*/
|
|
186
|
+
testAndSave: (request: ByoSaveRequest) => Promise<ByoResult<ByoSavedModel>>;
|
|
187
|
+
}
|
|
File without changes
|