@epam/ai-dial-toolset-editor 1.1.0-dev.465
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/components/AuthSection/AuthSection.d.ts +5 -0
- package/components/AuthSection/AuthSection.d.ts.map +1 -0
- package/components/ConnectMcpUrlContent/ConnectMcpUrlContent.d.ts +12 -0
- package/components/ConnectMcpUrlContent/ConnectMcpUrlContent.d.ts.map +1 -0
- package/components/GeneralForm/GeneralForm.d.ts +5 -0
- package/components/GeneralForm/GeneralForm.d.ts.map +1 -0
- package/components/SettingsForm/SettingsForm.d.ts +5 -0
- package/components/SettingsForm/SettingsForm.d.ts.map +1 -0
- package/components/ToolsetEditor/ToolsetEditor.d.ts +5 -0
- package/components/ToolsetEditor/ToolsetEditor.d.ts.map +1 -0
- package/constants/toolsets.d.ts +15 -0
- package/constants/toolsets.d.ts.map +1 -0
- package/index.d.ts +12 -0
- package/index.d.ts.map +1 -0
- package/index.js +741 -0
- package/models/auth-section-props.d.ts +110 -0
- package/models/auth-section-props.d.ts.map +1 -0
- package/models/general-form-props.d.ts +42 -0
- package/models/general-form-props.d.ts.map +1 -0
- package/models/settings-form-props.d.ts +79 -0
- package/models/settings-form-props.d.ts.map +1 -0
- package/models/toolset-editor-props.d.ts +134 -0
- package/models/toolset-editor-props.d.ts.map +1 -0
- package/models/toolset-form.d.ts +112 -0
- package/models/toolset-form.d.ts.map +1 -0
- package/models/toolset-oauth-login.d.ts +60 -0
- package/models/toolset-oauth-login.d.ts.map +1 -0
- package/package.json +31 -0
- package/test-setup.d.ts +1 -0
- package/test-setup.d.ts.map +1 -0
- package/utils/toolsets.d.ts +33 -0
- package/utils/toolsets.d.ts.map +1 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ToolsetAuthFormData, ToolsetFormData } from '../models/toolset-form';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a storage-safe toolset name that does not collide with any existing
|
|
4
|
+
* name, appending a numeric suffix when the default name is taken.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getStorageSafeUniqueToolsetName: ({ defaultName, existingNames, }: {
|
|
7
|
+
/** Candidate name to make unique. Defaults to `DEFAULT_TOOLSET_NAME`. */
|
|
8
|
+
defaultName?: string;
|
|
9
|
+
/** Names already taken by the user's toolsets. */
|
|
10
|
+
existingNames: string[];
|
|
11
|
+
}) => string;
|
|
12
|
+
/** Returns the form state a brand-new toolset editor opens with. */
|
|
13
|
+
export declare const getDefaultToolsetForm: (existingNames?: string[]) => ToolsetFormData;
|
|
14
|
+
/** Validates a toolset endpoint URL (http(s) or sse, parseable, no trailing `.`/`//`). */
|
|
15
|
+
export declare const isValidEndpointUrl: (value: string) => boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Normalizes an endpoint URL as returned by the backend: repairs a
|
|
18
|
+
* single-slash scheme (`https:/\/…`) and decodes percent-encoding when either
|
|
19
|
+
* produces a valid URL; otherwise returns the trimmed value unchanged.
|
|
20
|
+
*/
|
|
21
|
+
export declare const normalizeReturnedEndpointUrl: (value?: string) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Returns whether the auth form state can be saved without surfacing
|
|
24
|
+
* validation errors. `isEditMode` relaxes the OAuth `clientSecret`
|
|
25
|
+
* requirement: the server never returns a previously saved secret (it's
|
|
26
|
+
* redacted on every GET), and on update it preserves the stored secret when
|
|
27
|
+
* the form submits none, so an existing OAuth-with-config toolset must stay
|
|
28
|
+
* saveable without forcing the user to retype a secret they can't see.
|
|
29
|
+
*/
|
|
30
|
+
export declare const isToolsetAuthValid: (auth: ToolsetAuthFormData, isEditMode?: boolean) => boolean;
|
|
31
|
+
/** Returns whether the editor form can be saved without surfacing validation errors. */
|
|
32
|
+
export declare const isToolsetFormValid: (form: ToolsetFormData, isEditMode?: boolean) => boolean;
|
|
33
|
+
//# sourceMappingURL=toolsets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/utils/toolsets.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,+BAA+B,GAAI,iCAG7C;IACD,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,KAAG,MAOH,CAAC;AAQF,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,GAChC,gBAAe,MAAM,EAAO,KAC3B,eAWD,CAAC;AAYH,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,OACR,CAAC;AAK5C;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,QAAQ,MAAM,KAAG,MAkB7D,CAAC;AAKF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,mBAAmB,EACzB,oBAAkB,KACjB,OAmBF,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,GAC7B,MAAM,eAAe,EACrB,oBAAkB,KACjB,OAKwC,CAAC"}
|