@epam/ai-dial-chat-hooks 1.3.0-dev.296 → 1.3.0-dev.304
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/catalog/application-credentials.d.ts.map +1 -1
- package/catalog/application-credentials.js +20 -25
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -1
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js +72 -77
- package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -1
- package/conversation/useConversationScroll/useConversationScroll.js +64 -63
- package/external-services/useExternalServiceLogin.d.ts +3 -13
- package/external-services/useExternalServiceLogin.d.ts.map +1 -1
- package/external-services/useExternalServiceLogin.js +49 -58
- package/index.js +168 -168
- package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -1
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +42 -39
- package/oauth/authorize-url.d.ts +7 -1
- package/oauth/authorize-url.d.ts.map +1 -1
- package/oauth/authorize-url.js +13 -3
- package/oauth/models.d.ts +25 -0
- package/oauth/models.d.ts.map +1 -1
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -1
- package/oauth/useToolsetLogin/useToolsetLogin.js +45 -56
- package/oauth.js +7 -7
- package/package.json +17 -17
package/oauth/authorize-url.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToolsetOAuthSettings } from './models';
|
|
1
|
+
import { ToolsetOAuthSettings, ToolsetOAuthSettingsSource } from './models';
|
|
2
2
|
/**
|
|
3
3
|
* Resolves the OAuth callback location against the current origin. The
|
|
4
4
|
* callback path is supplied by the host: this module owns no application
|
|
@@ -13,4 +13,10 @@ export declare const getToolsetRedirectUri: (callbackPath: string) => string;
|
|
|
13
13
|
* `http:`/`https:` URL.
|
|
14
14
|
*/
|
|
15
15
|
export declare const buildToolsetAuthorizeUrl: (auth: ToolsetOAuthSettings, redirectUri: string, state: string) => string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Maps the public OAuth client fields of a DIAL Core auth-settings DTO onto
|
|
18
|
+
* the settings `buildToolsetAuthorizeUrl` reads, so every login entry point
|
|
19
|
+
* copies the same fields. An absent source yields all-`undefined` settings.
|
|
20
|
+
*/
|
|
21
|
+
export declare const toToolsetOAuthSettings: (source?: ToolsetOAuthSettingsSource) => ToolsetOAuthSettings;
|
|
16
22
|
//# sourceMappingURL=authorize-url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorize-url.d.ts","sourceRoot":"","sources":["../../src/oauth/authorize-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"authorize-url.d.ts","sourceRoot":"","sources":["../../src/oauth/authorize-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAElB;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,cAAc,MAAM,KAAG,MACjB,CAAC;AAU7C;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GACnC,MAAM,oBAAoB,EAC1B,aAAa,MAAM,EACnB,OAAO,MAAM,KACZ,MAAM,GAAG,IAmCX,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,0BAA0B,KAClC,oBAOD,CAAC"}
|
package/oauth/authorize-url.js
CHANGED
|
@@ -3,10 +3,20 @@ var e = (e) => `${window.location.origin}${e}`, t = /* @__PURE__ */ new Set(["ht
|
|
|
3
3
|
if (!e.authorizationEndpoint?.trim() || !e.clientId?.trim()) return null;
|
|
4
4
|
try {
|
|
5
5
|
let i = new URL(e.authorizationEndpoint.trim());
|
|
6
|
-
|
|
6
|
+
if (!t.has(i.protocol)) return null;
|
|
7
|
+
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(" "));
|
|
8
|
+
let a = e.resource?.trim();
|
|
9
|
+
return a && i.searchParams.set("resource", a), i.toString();
|
|
7
10
|
} catch {
|
|
8
11
|
return null;
|
|
9
12
|
}
|
|
10
|
-
}
|
|
13
|
+
}, r = (e) => ({
|
|
14
|
+
clientId: e?.clientId,
|
|
15
|
+
authorizationEndpoint: e?.authorizationEndpoint,
|
|
16
|
+
scopes: e?.scopesSupported,
|
|
17
|
+
codeChallenge: e?.codeChallenge,
|
|
18
|
+
codeChallengeMethod: e?.codeChallengeMethod,
|
|
19
|
+
resource: e?.resource
|
|
20
|
+
});
|
|
11
21
|
//#endregion
|
|
12
|
-
export { n as buildToolsetAuthorizeUrl, e as getToolsetRedirectUri };
|
|
22
|
+
export { n as buildToolsetAuthorizeUrl, e as getToolsetRedirectUri, r as toToolsetOAuthSettings };
|
package/oauth/models.d.ts
CHANGED
|
@@ -11,6 +11,31 @@ export interface ToolsetOAuthSettings {
|
|
|
11
11
|
scopes?: string[];
|
|
12
12
|
codeChallenge?: string;
|
|
13
13
|
codeChallengeMethod?: string;
|
|
14
|
+
/**
|
|
15
|
+
* RFC 8707 resource indicator DIAL Core stored for the client and sends on
|
|
16
|
+
* the token exchange; the authorize URL must carry the same value.
|
|
17
|
+
*/
|
|
18
|
+
resource?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Public OAuth client fields of a DIAL Core auth-settings DTO, as both a
|
|
22
|
+
* toolset's `authSettings` and an external service's metadata carry them.
|
|
23
|
+
* Declared structurally so `toToolsetOAuthSettings` accepts either without
|
|
24
|
+
* this module importing the generated client.
|
|
25
|
+
*/
|
|
26
|
+
export interface ToolsetOAuthSettingsSource {
|
|
27
|
+
/** OAuth client id. */
|
|
28
|
+
clientId?: string;
|
|
29
|
+
/** Authorization endpoint the popup is sent to. */
|
|
30
|
+
authorizationEndpoint?: string;
|
|
31
|
+
/** Scopes the client may request. */
|
|
32
|
+
scopesSupported?: string[];
|
|
33
|
+
/** PKCE challenge. */
|
|
34
|
+
codeChallenge?: string;
|
|
35
|
+
/** PKCE challenge method. */
|
|
36
|
+
codeChallengeMethod?: string;
|
|
37
|
+
/** RFC 8707 resource indicator. */
|
|
38
|
+
resource?: string;
|
|
14
39
|
}
|
|
15
40
|
/**
|
|
16
41
|
* Redirect state for an OAuth login flow. The flow writes this into the
|
package/oauth/models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/oauth/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,8BAA8B,EAC9B,yBAAyB,EACzB,gCAAgC,EAChC,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/oauth/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,8BAA8B,EAC9B,yBAAyB,EACzB,gCAAgC,EAChC,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,uBAAuB;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qCAAqC;IACrC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,sBAAsB;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6BAA6B;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,uBAAuB,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,MAAM,4BAA4B,GACpC;IACE,IAAI,EAAE,gCAAgC,CAAC,OAAO,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,GACD;IAAE,IAAI,EAAE,gCAAgC,CAAC,OAAO,CAAA;CAAE,GAClD;IAAE,IAAI,EAAE,gCAAgC,CAAC,aAAa,CAAA;CAAE,CAAC;AAE7D,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,sBAAsB,CAAC,OAAO,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,uBAAuB,CAAC;CAC3C;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,sBAAsB,CAAC,OAAO,CAAC;IACrC,MAAM,EAAE,yBAAyB,CAAC;CACnC;AAED,qEAAqE;AACrE,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,8BAA8B,CAAC,kBAAkB,CAAC;CACzD;AAED;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GACpC,0BAA0B,GAAG,0BAA0B,CAAC;AAE1D,0FAA0F;AAC1F,MAAM,MAAM,kBAAkB,GAC1B,0BAA0B,GAC1B,0BAA0B,GAC1B;IAAE,IAAI,EAAE,sBAAsB,CAAC,SAAS,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolsetLogin.d.ts","sourceRoot":"","sources":["../../../src/oauth/useToolsetLogin/useToolsetLogin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"useToolsetLogin.d.ts","sourceRoot":"","sources":["../../../src/oauth/useToolsetLogin/useToolsetLogin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAOtD,OAAO,EAGL,gBAAgB,EAChB,uBAAuB,EAGxB,MAAM,UAAU,CAAC;AAElB,kDAAkD;AAClD,oBAAY,uBAAuB;IACjC,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,YAAY,kBAAkB;IAC9B,SAAS,cAAc;CACxB;AAED,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,0DAA0D;IAC1D,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,qDAAqD;IACrD,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,8CAA8C;AAC9C,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,YAAY,EAAE,CACZ,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,mBAAmB,KACtB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,0EAA0E;IAC1E,aAAa,EAAE,CACb,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,oBAAoB,KACvB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,wFAAwF;IACxF,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAC3D;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,kDAAkD;AAClD,MAAM,WAAW,qBAAqB;IACpC,wEAAwE;IACxE,KAAK,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACrE;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,sFAM7B,qBAAqB,KAAG,qBA+L1B,CAAC"}
|
|
@@ -1,93 +1,82 @@
|
|
|
1
1
|
import { OAuthResourceKind as e, ToolsetAuthStatus as t, ToolsetAuthTypes as n, ToolsetOAuthInitiationResultType as r, ToolsetOAuthResultType as i } from "../types.js";
|
|
2
2
|
import { selectToolsetAuthStatus as a } from "../toolset-id.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { toToolsetOAuthSettings as o } from "../authorize-url.js";
|
|
4
|
+
import { emitToolsetLoginSuccess as s } from "../../shared/toolset-login-events.js";
|
|
5
|
+
import { waitForToolsetOAuthResult as c } from "../handshake.js";
|
|
6
|
+
import { initiateOAuthLogin as l, navigateToolsetOAuthPopup as u, openToolsetOAuthPopup as d } from "../popup.js";
|
|
7
|
+
import { useCallback as f } from "react";
|
|
7
8
|
//#region src/oauth/useToolsetLogin/useToolsetLogin.ts
|
|
8
|
-
var
|
|
9
|
+
var p = /* @__PURE__ */ function(e) {
|
|
9
10
|
return e.Success = "success", e.Failure = "failure", e.PopupBlocked = "popup-blocked", e.Cancelled = "cancelled", e;
|
|
10
|
-
}({}),
|
|
11
|
-
let
|
|
11
|
+
}({}), m = ({ callbackPath: p, loginToolset: m, logoutToolset: h, getToolset: g, shouldFetchOAuthSettings: _ = !1 }) => {
|
|
12
|
+
let v = f(async (e, t, n) => {
|
|
12
13
|
try {
|
|
13
|
-
await
|
|
14
|
+
await h(e, {
|
|
14
15
|
url: e,
|
|
15
16
|
credentialsLevel: t,
|
|
16
17
|
authenticationType: n
|
|
17
18
|
});
|
|
18
19
|
} catch {}
|
|
19
|
-
}, [
|
|
20
|
-
let { toolsetId:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
scopes: v?.scopes,
|
|
24
|
-
codeChallenge: v?.codeChallenge,
|
|
25
|
-
codeChallengeMethod: v?.codeChallengeMethod
|
|
26
|
-
}, S;
|
|
27
|
-
if (y || g) {
|
|
28
|
-
let t = u();
|
|
20
|
+
}, [h]), y = f(async (f) => {
|
|
21
|
+
let { toolsetId: m, credentialsLevel: h, oauthSettings: y, forceStale: b, offlineUsageConsent: x } = f, S = y ?? {}, C;
|
|
22
|
+
if (b || _) {
|
|
23
|
+
let t = d();
|
|
29
24
|
if (!t) return { type: "popup-blocked" };
|
|
30
|
-
|
|
31
|
-
let r =
|
|
32
|
-
if (
|
|
33
|
-
let { authSettings: e } = await
|
|
25
|
+
b && await v(m, h, n.OAuth);
|
|
26
|
+
let r = S;
|
|
27
|
+
if (_) try {
|
|
28
|
+
let { authSettings: e } = await g(m);
|
|
34
29
|
if (t.closed) return { type: "cancelled" };
|
|
35
30
|
if (e?.authenticationType !== n.OAuth) return t.close(), { type: "failure" };
|
|
36
|
-
r =
|
|
37
|
-
clientId: e.clientId,
|
|
38
|
-
authorizationEndpoint: e.authorizationEndpoint,
|
|
39
|
-
scopes: e.scopesSupported,
|
|
40
|
-
codeChallenge: e.codeChallenge,
|
|
41
|
-
codeChallengeMethod: e.codeChallengeMethod
|
|
42
|
-
};
|
|
31
|
+
r = o(e);
|
|
43
32
|
} catch {
|
|
44
33
|
return t.close(), { type: "failure" };
|
|
45
34
|
}
|
|
46
|
-
|
|
47
|
-
} else
|
|
48
|
-
if (
|
|
49
|
-
if (
|
|
50
|
-
let
|
|
51
|
-
toolsetId:
|
|
52
|
-
credentialsLevel:
|
|
53
|
-
callbackPath:
|
|
35
|
+
C = u(t, r, m, p, h, e.Toolset, x);
|
|
36
|
+
} else C = l(S, m, p, h, x);
|
|
37
|
+
if (C.type === r.Blocked) return { type: "popup-blocked" };
|
|
38
|
+
if (C.type !== r.Started) return { type: "failure" };
|
|
39
|
+
let w = await c(C.popup, C.flowId, {
|
|
40
|
+
toolsetId: m,
|
|
41
|
+
credentialsLevel: h,
|
|
42
|
+
callbackPath: p
|
|
54
43
|
});
|
|
55
|
-
if (
|
|
56
|
-
toolsetId:
|
|
57
|
-
credentialsLevel:
|
|
44
|
+
if (w.type === i.Success) return s({
|
|
45
|
+
toolsetId: m,
|
|
46
|
+
credentialsLevel: h
|
|
58
47
|
}), { type: "success" };
|
|
59
|
-
if (
|
|
48
|
+
if (w.type === i.Failure) return { type: "failure" };
|
|
60
49
|
try {
|
|
61
|
-
let e = await
|
|
62
|
-
if (a(e.authSettings,
|
|
63
|
-
toolsetId:
|
|
64
|
-
credentialsLevel:
|
|
50
|
+
let e = await g(m);
|
|
51
|
+
if (a(e.authSettings, h) === t.SignedIn) return s({
|
|
52
|
+
toolsetId: m,
|
|
53
|
+
credentialsLevel: h
|
|
65
54
|
}), { type: "success" };
|
|
66
55
|
} catch {}
|
|
67
56
|
return { type: "cancelled" };
|
|
68
57
|
}, [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
]),
|
|
74
|
-
let { toolsetId: t, credentialsLevel: n, authenticationType: r, apiKey: i, isCurrentlyFailed: a, forceStale:
|
|
58
|
+
p,
|
|
59
|
+
g,
|
|
60
|
+
v,
|
|
61
|
+
_
|
|
62
|
+
]), b = f(async (e) => {
|
|
63
|
+
let { toolsetId: t, credentialsLevel: n, authenticationType: r, apiKey: i, isCurrentlyFailed: a, forceStale: o, offlineUsageConsent: c } = e;
|
|
75
64
|
try {
|
|
76
|
-
return (
|
|
65
|
+
return (o || a) && await v(t, n, r), await m(t, {
|
|
77
66
|
url: t,
|
|
78
67
|
credentialsLevel: n,
|
|
79
68
|
authenticationType: r,
|
|
80
69
|
apiKey: i?.trim(),
|
|
81
70
|
offlineUsageConsent: c
|
|
82
|
-
}),
|
|
71
|
+
}), s({
|
|
83
72
|
toolsetId: t,
|
|
84
73
|
credentialsLevel: n
|
|
85
74
|
}), { type: "success" };
|
|
86
75
|
} catch {
|
|
87
76
|
return { type: "failure" };
|
|
88
77
|
}
|
|
89
|
-
}, [
|
|
90
|
-
return { login:
|
|
78
|
+
}, [m, v]);
|
|
79
|
+
return { login: f((e) => e.authenticationType === n.OAuth ? y(e) : b(e), [y, b]) };
|
|
91
80
|
};
|
|
92
81
|
//#endregion
|
|
93
|
-
export {
|
|
82
|
+
export { p as ToolsetLoginOutcomeType, m as useToolsetLogin };
|
package/oauth.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { OAuthResourceKind as e, TOOLSET_REDIRECT_STATE_KEY as t, ToolsetAuthStatus as n, ToolsetAuthTypes as r, ToolsetCredentialsLevel as i, ToolsetOAuthCallbackQuery as a, ToolsetOAuthChannelControlType as o, ToolsetOAuthFailureReason as s, ToolsetOAuthInitiationResultType as c, ToolsetOAuthResultType as l, WithLogin as u } from "./oauth/types.js";
|
|
2
2
|
import { decodeToolsetId as d, encodeToolsetId as f, getToolsetFallbackName as p, isPublicToolsetId as m, normalizeToolsetId as h, resolveToolsetCredentialsLevel as g, selectToolsetAuthStatus as _ } from "./oauth/toolset-id.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { initiateOAuthLogin as
|
|
7
|
-
import { ToolsetLoginOutcomeType as
|
|
8
|
-
import { useOAuthCallbackCompletion as
|
|
9
|
-
export { e as OAuthResourceKind, t as TOOLSET_REDIRECT_STATE_KEY, n as ToolsetAuthStatus, r as ToolsetAuthTypes, i as ToolsetCredentialsLevel,
|
|
3
|
+
import { buildToolsetAuthorizeUrl as v, getToolsetRedirectUri as y, toToolsetOAuthSettings as b } from "./oauth/authorize-url.js";
|
|
4
|
+
import { emitToolsetLoginSuccess as x, subscribeToolsetLoginSuccess as S } from "./shared/toolset-login-events.js";
|
|
5
|
+
import { getToolsetOAuthChannelName as C, waitForToolsetOAuthResult as w } from "./oauth/handshake.js";
|
|
6
|
+
import { initiateOAuthLogin as T, navigateToolsetOAuthPopup as E, openToolsetOAuthPopup as D } from "./oauth/popup.js";
|
|
7
|
+
import { ToolsetLoginOutcomeType as O, useToolsetLogin as k } from "./oauth/useToolsetLogin/useToolsetLogin.js";
|
|
8
|
+
import { useOAuthCallbackCompletion as A } from "./oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js";
|
|
9
|
+
export { e as OAuthResourceKind, t as TOOLSET_REDIRECT_STATE_KEY, n as ToolsetAuthStatus, r as ToolsetAuthTypes, i as ToolsetCredentialsLevel, O as ToolsetLoginOutcomeType, a as ToolsetOAuthCallbackQuery, o as ToolsetOAuthChannelControlType, s as ToolsetOAuthFailureReason, c as ToolsetOAuthInitiationResultType, l as ToolsetOAuthResultType, u as WithLogin, v as buildToolsetAuthorizeUrl, d as decodeToolsetId, x as emitToolsetLoginSuccess, f as encodeToolsetId, p as getToolsetFallbackName, C as getToolsetOAuthChannelName, y as getToolsetRedirectUri, T as initiateOAuthLogin, m as isPublicToolsetId, E as navigateToolsetOAuthPopup, h as normalizeToolsetId, D as openToolsetOAuthPopup, g as resolveToolsetCredentialsLevel, _ as selectToolsetAuthStatus, S as subscribeToolsetLoginSuccess, b as toToolsetOAuthSettings, A as useOAuthCallbackCompletion, k as useToolsetLogin, w as waitForToolsetOAuthResult };
|
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.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.304",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
"dependencies": {
|
|
134
|
-
"@epam/ai-dial-chat-api-client": "1.3.0-dev.
|
|
134
|
+
"@epam/ai-dial-chat-api-client": "1.3.0-dev.304",
|
|
135
135
|
"dompurify": "3.4.17",
|
|
136
136
|
"fflate": "^0.8.3",
|
|
137
137
|
"lru-cache": "^10.4.3",
|
|
@@ -140,23 +140,23 @@
|
|
|
140
140
|
},
|
|
141
141
|
"peerDependencies": {
|
|
142
142
|
"react": "^19.2.8",
|
|
143
|
-
"@epam/ai-dial-attachment-canvas": "1.3.0-dev.
|
|
144
|
-
"@epam/ai-dial-attachment-input": "1.3.0-dev.
|
|
145
|
-
"@epam/ai-dial-catalog": "1.3.0-dev.
|
|
146
|
-
"@epam/ai-dial-chat-overlay": "1.3.0-dev.
|
|
147
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
148
|
-
"@epam/ai-dial-conversation-input": "1.3.0-dev.
|
|
149
|
-
"@epam/ai-dial-mcp-apps": "1.3.0-dev.
|
|
150
|
-
"@epam/ai-dial-projects": "1.3.0-dev.
|
|
151
|
-
"@epam/ai-dial-publish-panel": "1.3.0-dev.
|
|
152
|
-
"@epam/ai-dial-quotations": "1.3.0-dev.
|
|
143
|
+
"@epam/ai-dial-attachment-canvas": "1.3.0-dev.304",
|
|
144
|
+
"@epam/ai-dial-attachment-input": "1.3.0-dev.304",
|
|
145
|
+
"@epam/ai-dial-catalog": "1.3.0-dev.304",
|
|
146
|
+
"@epam/ai-dial-chat-overlay": "1.3.0-dev.304",
|
|
147
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.304",
|
|
148
|
+
"@epam/ai-dial-conversation-input": "1.3.0-dev.304",
|
|
149
|
+
"@epam/ai-dial-mcp-apps": "1.3.0-dev.304",
|
|
150
|
+
"@epam/ai-dial-projects": "1.3.0-dev.304",
|
|
151
|
+
"@epam/ai-dial-publish-panel": "1.3.0-dev.304",
|
|
152
|
+
"@epam/ai-dial-quotations": "1.3.0-dev.304",
|
|
153
153
|
"@epam/ai-dial-react-file-manager": "^0.4.0-dev.25",
|
|
154
|
-
"@epam/ai-dial-scheduled-tasks": "1.3.0-dev.
|
|
155
|
-
"@epam/ai-dial-share": "1.3.0-dev.
|
|
156
|
-
"@epam/ai-dial-skill-editor": "1.3.0-dev.
|
|
157
|
-
"@epam/ai-dial-source-panel": "1.3.0-dev.
|
|
154
|
+
"@epam/ai-dial-scheduled-tasks": "1.3.0-dev.304",
|
|
155
|
+
"@epam/ai-dial-share": "1.3.0-dev.304",
|
|
156
|
+
"@epam/ai-dial-skill-editor": "1.3.0-dev.304",
|
|
157
|
+
"@epam/ai-dial-source-panel": "1.3.0-dev.304",
|
|
158
158
|
"@epam/ai-dial-ui-kit": "^0.16.0-dev.67",
|
|
159
|
-
"@epam/ai-dial-usage-dashboard": "1.3.0-dev.
|
|
159
|
+
"@epam/ai-dial-usage-dashboard": "1.3.0-dev.304",
|
|
160
160
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
161
161
|
"@epam/pdf-highlighter-kit": "^0.0.19"
|
|
162
162
|
},
|