@epam/ai-dial-chat-hooks 1.2.0-dev.316 → 1.2.0-dev.319

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/index.d.ts CHANGED
@@ -609,8 +609,8 @@ export declare const buildSkillOverview: (skill: SkillMetadataItemDto | undefine
609
609
  * Builds the OAuth authorize URL for a given, already-generated `state`
610
610
  * value. The caller owns what `state` carries — see `initiateOAuthLogin`.
611
611
  * Returns `null` rather than throwing for a configuration that cannot
612
- * produce a valid URL, including one whose authorization endpoint is not
613
- * reachable over a secure transport.
612
+ * produce a valid URL, including one whose authorization endpoint is not an
613
+ * `http:`/`https:` URL.
614
614
  */
615
615
  export declare const buildToolsetAuthorizeUrl: (auth: ToolsetOAuthSettings, redirectUri: string, state: string) => string | null;
616
616
 
@@ -1,12 +1,12 @@
1
1
  //#region src/oauth/authorize-url.ts
2
- var e = (e) => `${window.location.origin}${e}`, t = (e) => e === "localhost" || e === "[::1]" || /^127(?:\.\d{1,3}){3}$/.test(e), n = (e) => e.protocol === "https:" ? !0 : e.protocol === "http:" && t(e.hostname), r = (e, t, r) => {
2
+ var e = (e) => `${window.location.origin}${e}`, t = new Set(["http:", "https:"]), n = (e, n, r) => {
3
3
  if (!e.authorizationEndpoint?.trim() || !e.clientId?.trim()) return null;
4
4
  try {
5
5
  let i = new URL(e.authorizationEndpoint.trim());
6
- return n(i) ? (i.searchParams.set("response_type", "code"), i.searchParams.set("client_id", e.clientId.trim()), i.searchParams.set("redirect_uri", t), e.codeChallenge && i.searchParams.set("code_challenge", e.codeChallenge), e.codeChallengeMethod && i.searchParams.set("code_challenge_method", e.codeChallengeMethod), i.searchParams.set("state", r), e.scopes && e.scopes.length > 0 && i.searchParams.set("scope", e.scopes.join(" ")), i.toString()) : null;
6
+ return t.has(i.protocol) ? (i.searchParams.set("response_type", "code"), i.searchParams.set("client_id", e.clientId.trim()), i.searchParams.set("redirect_uri", n), e.codeChallenge && i.searchParams.set("code_challenge", e.codeChallenge), e.codeChallengeMethod && i.searchParams.set("code_challenge_method", e.codeChallengeMethod), i.searchParams.set("state", r), e.scopes && e.scopes.length > 0 && i.searchParams.set("scope", e.scopes.join(" ")), i.toString()) : null;
7
7
  } catch {
8
8
  return null;
9
9
  }
10
10
  };
11
11
  //#endregion
12
- export { r as buildToolsetAuthorizeUrl, e as getToolsetRedirectUri };
12
+ export { n as buildToolsetAuthorizeUrl, e as getToolsetRedirectUri };
package/oauth.d.ts CHANGED
@@ -7,8 +7,8 @@ import { ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
7
7
  * Builds the OAuth authorize URL for a given, already-generated `state`
8
8
  * value. The caller owns what `state` carries — see `initiateOAuthLogin`.
9
9
  * Returns `null` rather than throwing for a configuration that cannot
10
- * produce a valid URL, including one whose authorization endpoint is not
11
- * reachable over a secure transport.
10
+ * produce a valid URL, including one whose authorization endpoint is not an
11
+ * `http:`/`https:` URL.
12
12
  */
13
13
  export declare const buildToolsetAuthorizeUrl: (auth: ToolsetOAuthSettings, redirectUri: string, state: string) => string | null;
14
14
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-hooks",
3
3
  "description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
4
- "version": "1.2.0-dev.316",
4
+ "version": "1.2.0-dev.319",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -111,7 +111,7 @@
111
111
  }
112
112
  },
113
113
  "dependencies": {
114
- "@epam/ai-dial-chat-api-client": "1.2.0-dev.316",
114
+ "@epam/ai-dial-chat-api-client": "1.2.0-dev.319",
115
115
  "dompurify": "3.4.16",
116
116
  "fflate": "^0.8.3",
117
117
  "lru-cache": "^10.4.3",
@@ -120,21 +120,21 @@
120
120
  },
121
121
  "peerDependencies": {
122
122
  "react": "^19.2.8",
123
- "@epam/ai-dial-attachment-canvas": "1.2.0-dev.316",
124
- "@epam/ai-dial-attachment-input": "1.2.0-dev.316",
125
- "@epam/ai-dial-catalog": "1.2.0-dev.316",
126
- "@epam/ai-dial-chat-overlay": "1.2.0-dev.316",
127
- "@epam/ai-dial-chat-shared": "1.2.0-dev.316",
128
- "@epam/ai-dial-mcp-apps": "1.2.0-dev.316",
129
- "@epam/ai-dial-publish-panel": "1.2.0-dev.316",
130
- "@epam/ai-dial-quotations": "1.2.0-dev.316",
123
+ "@epam/ai-dial-attachment-canvas": "1.2.0-dev.319",
124
+ "@epam/ai-dial-attachment-input": "1.2.0-dev.319",
125
+ "@epam/ai-dial-catalog": "1.2.0-dev.319",
126
+ "@epam/ai-dial-chat-overlay": "1.2.0-dev.319",
127
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.319",
128
+ "@epam/ai-dial-mcp-apps": "1.2.0-dev.319",
129
+ "@epam/ai-dial-publish-panel": "1.2.0-dev.319",
130
+ "@epam/ai-dial-quotations": "1.2.0-dev.319",
131
131
  "@epam/ai-dial-react-file-manager": "^0.3.0-dev.25",
132
- "@epam/ai-dial-scheduled-tasks": "1.2.0-dev.316",
133
- "@epam/ai-dial-share": "1.2.0-dev.316",
134
- "@epam/ai-dial-skill-editor": "1.2.0-dev.316",
135
- "@epam/ai-dial-source-panel": "1.2.0-dev.316",
132
+ "@epam/ai-dial-scheduled-tasks": "1.2.0-dev.319",
133
+ "@epam/ai-dial-share": "1.2.0-dev.319",
134
+ "@epam/ai-dial-skill-editor": "1.2.0-dev.319",
135
+ "@epam/ai-dial-source-panel": "1.2.0-dev.319",
136
136
  "@epam/ai-dial-ui-kit": "^0.15.0-dev.39",
137
- "@epam/ai-dial-usage-dashboard": "1.2.0-dev.316",
137
+ "@epam/ai-dial-usage-dashboard": "1.2.0-dev.319",
138
138
  "@modelcontextprotocol/sdk": "^1.32.1",
139
139
  "@epam/pdf-highlighter-kit": "^0.0.19",
140
140
  "@mcp-ui/client": "^7.1.1"