@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.
Files changed (32) hide show
  1. package/components/AuthSection/AuthSection.d.ts +5 -0
  2. package/components/AuthSection/AuthSection.d.ts.map +1 -0
  3. package/components/ConnectMcpUrlContent/ConnectMcpUrlContent.d.ts +12 -0
  4. package/components/ConnectMcpUrlContent/ConnectMcpUrlContent.d.ts.map +1 -0
  5. package/components/GeneralForm/GeneralForm.d.ts +5 -0
  6. package/components/GeneralForm/GeneralForm.d.ts.map +1 -0
  7. package/components/SettingsForm/SettingsForm.d.ts +5 -0
  8. package/components/SettingsForm/SettingsForm.d.ts.map +1 -0
  9. package/components/ToolsetEditor/ToolsetEditor.d.ts +5 -0
  10. package/components/ToolsetEditor/ToolsetEditor.d.ts.map +1 -0
  11. package/constants/toolsets.d.ts +15 -0
  12. package/constants/toolsets.d.ts.map +1 -0
  13. package/index.d.ts +12 -0
  14. package/index.d.ts.map +1 -0
  15. package/index.js +741 -0
  16. package/models/auth-section-props.d.ts +110 -0
  17. package/models/auth-section-props.d.ts.map +1 -0
  18. package/models/general-form-props.d.ts +42 -0
  19. package/models/general-form-props.d.ts.map +1 -0
  20. package/models/settings-form-props.d.ts +79 -0
  21. package/models/settings-form-props.d.ts.map +1 -0
  22. package/models/toolset-editor-props.d.ts +134 -0
  23. package/models/toolset-editor-props.d.ts.map +1 -0
  24. package/models/toolset-form.d.ts +112 -0
  25. package/models/toolset-form.d.ts.map +1 -0
  26. package/models/toolset-oauth-login.d.ts +60 -0
  27. package/models/toolset-oauth-login.d.ts.map +1 -0
  28. package/package.json +31 -0
  29. package/test-setup.d.ts +1 -0
  30. package/test-setup.d.ts.map +1 -0
  31. package/utils/toolsets.d.ts +33 -0
  32. 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"}