@epam/ai-dial-chat-hooks 1.3.0-dev.288 → 1.3.0-dev.289

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 (47) hide show
  1. package/api-error/api-error.d.ts +2 -0
  2. package/api-error/api-error.d.ts.map +1 -1
  3. package/api-error/api-error.js +31 -23
  4. package/catalog/map-skill-to-catalog-item.js +19 -19
  5. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +2 -4
  6. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -1
  7. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +94 -112
  8. package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts +41 -0
  9. package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts.map +1 -0
  10. package/catalog/useCatalogItemDelete/useCatalogItemDelete.js +37 -0
  11. package/catalog/usePublishFolders/usePublishFolders.d.ts +8 -0
  12. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
  13. package/catalog/usePublishFolders/usePublishFolders.js +32 -29
  14. package/catalog.js +11 -10
  15. package/conversation/conversation-title-stream.d.ts +33 -0
  16. package/conversation/conversation-title-stream.d.ts.map +1 -0
  17. package/conversation/conversation-title-stream.js +103 -0
  18. package/conversation/useConversationExport/useConversationExport.js +46 -46
  19. package/conversation/useConversationHandlers/useConversationHandlers.js +39 -39
  20. package/conversation/useConversationStream/useConversationStream.js +93 -93
  21. package/conversation.js +5 -4
  22. package/entry-points/catalog.d.ts +1 -0
  23. package/entry-points/catalog.d.ts.map +1 -1
  24. package/entry-points/conversation.d.ts +1 -0
  25. package/entry-points/conversation.d.ts.map +1 -1
  26. package/files/dial-file-manager-copy-move.util.js +16 -16
  27. package/files/dial-file-manager-mapping.util.js +17 -17
  28. package/files/useDialFileListing/useDialFileListing.js +113 -113
  29. package/files/useDialFileMutations/useDialFileMutations.js +47 -47
  30. package/index.d.ts +2 -0
  31. package/index.d.ts.map +1 -1
  32. package/index.js +213 -211
  33. package/oauth/useToolsetLogin/useToolsetLogin.d.ts +7 -1
  34. package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -1
  35. package/oauth/useToolsetLogin/useToolsetLogin.js +40 -21
  36. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js +10 -10
  37. package/package.json +18 -18
  38. package/project/project-mapping.js +12 -12
  39. package/project/use-project-actions.js +12 -12
  40. package/project/use-project-watch.js +12 -12
  41. package/prompt/prompt.d.ts +11 -0
  42. package/prompt/prompt.d.ts.map +1 -1
  43. package/prompt/prompt.js +7 -3
  44. package/scheduled-task/use-scheduled-task-runs.js +13 -13
  45. package/usage/map-user-usage-to-model-limits.js +21 -21
  46. package/useShareLink/useShareLink.js +18 -18
  47. package/utils.js +21 -21
@@ -1,42 +1,42 @@
1
- import { useCallback as e, useEffect as t, useRef as n, useState as r } from "react";
2
- import { ShareLinkResponseDtoAccessEnum as i } from "@epam/ai-dial-chat-api-client";
1
+ import { ShareLinkResponseDtoAccessEnum as e } from "@epam/ai-dial-chat-api-client";
2
+ import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
3
3
  import { ShareLinkAccess as a } from "@epam/ai-dial-share";
4
4
  //#region src/useShareLink/useShareLink.ts
5
- var o = (e) => e.map((e) => e === i.Edit ? a.Edit : a.View), s = (e, t) => {
5
+ var o = (t) => t.map((t) => t === e.Edit ? a.Edit : a.View), s = (e, t) => {
6
6
  let n = new URL(e, t);
7
7
  return `${t}${n.pathname}${n.search}${n.hash}`;
8
- }, c = (i, c, l = window.location.origin) => {
9
- let [u, d] = r(), [f, p] = r(!0), [m, h] = r(null), g = n(0), _ = e(async (e = [a.View]) => {
10
- let t = ++g.current;
8
+ }, c = (e, c, l = window.location.origin) => {
9
+ let [u, d] = i(), [f, p] = i(!0), [m, h] = i(null), g = r(0), _ = t(async (t = [a.View]) => {
10
+ let n = ++g.current;
11
11
  p(!0), h(null);
12
12
  try {
13
- let n = await i.createShareLink({ createShareLinkDto: {
13
+ let r = await e.createShareLink({ createShareLinkDto: {
14
14
  itemId: c,
15
- access: e
15
+ access: t
16
16
  } });
17
- g.current === t && d({
18
- url: s(n.url, l),
19
- expiresInDays: n.expiresInDays,
20
- expiresInHours: n.expiresInHours,
21
- access: o(n.access)
17
+ g.current === n && d({
18
+ url: s(r.url, l),
19
+ expiresInDays: r.expiresInDays,
20
+ expiresInHours: r.expiresInHours,
21
+ access: o(r.access)
22
22
  });
23
23
  } catch (e) {
24
- g.current === t && h(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create share link"));
24
+ g.current === n && h(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create share link"));
25
25
  } finally {
26
- g.current === t && p(!1);
26
+ g.current === n && p(!1);
27
27
  }
28
28
  }, [
29
29
  c,
30
30
  l,
31
- i
31
+ e
32
32
  ]);
33
- return t(() => {
33
+ return n(() => {
34
34
  d(void 0), _();
35
35
  }, [c, _]), {
36
36
  data: u,
37
37
  isLoading: f,
38
38
  error: m,
39
- setAccess: e((e) => {
39
+ setAccess: t((e) => {
40
40
  _(e);
41
41
  }, [_])
42
42
  };
package/utils.js CHANGED
@@ -1,21 +1,21 @@
1
- import { getApiErrorDetails as e, getApiErrorMessage as t, getApiErrorStatus as n, isConversationNotFoundError as r } from "./api-error/api-error.js";
2
- import { createCsrfMiddleware as i } from "./api-transport/create-csrf-middleware.js";
3
- import { createUnauthorizedMiddleware as a } from "./api-transport/create-unauthorized-middleware.js";
4
- import { includesIgnoreCase as o, safeDecodeURI as s, safeDecodeURIComponent as c, stripSurroundingSlashes as l, stripTrailingSlashes as u } from "./shared/string-utils.js";
5
- import { appendLocaleCode as d, buildAdditionalLocaleOptions as f, composeLocalePayload as p, decomposeLocalizedFields as m, resolveLocalizedText as h, toBaseLocale as g } from "./shared/locale.js";
6
- import { formatCalendarDate as _, padTwoDigits as v } from "./shared/formatting.js";
7
- import { PromptSource as y, parsePromptResourceUrl as b } from "./prompt/prompt-resource.js";
8
- import { getRunnerSchemas as x, isCustomAppSchema as S, isQuickAppSchema as C } from "./shared/application-schema.js";
9
- import { buildExternalServiceScopeId as w, getExternalServiceFallbackName as T, parseExternalServiceUrl as E } from "./shared/external-services.js";
10
- import { buildPromptExportEnvelope as D, buildPromptExportFileName as O, serializePromptExport as k } from "./prompt/export-prompt.js";
11
- import { PROMPT_CONTENT_MAX_LENGTH as A, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as j, PROMPT_DESCRIPTION_MAX_LENGTH as M, PROMPT_NAME_MAX_LENGTH as N, PromptFieldError as P, buildPromptPath as F, getRemainingCharacters as I, validatePromptContent as L, validatePromptDescription as R, validatePromptName as z } from "./prompt/prompt.js";
12
- import { usePromptsState as B } from "./prompt/usePromptsState/usePromptsState.js";
13
- import { apSchedulerDayToJsDay as V, jsDayToApSchedulerDay as H } from "./shared/cron-weekday.js";
14
- import { getBrowserTimezone as U } from "./shared/browser-timezone.js";
15
- import { isValidAbsoluteUrl as W, isValidFeaturesData as G, parseFeaturesData as K } from "./shared/custom-apps.js";
16
- import { EXTERNAL_SERVICE_SIGNIN_METHOD as q, PendingSigninEventKind as J, TOOLSET_SIGNIN_METHOD as Y } from "./shared/client-channel.js";
17
- import { ColorScheme as X, applyThemeColors as Z, getOsPreferredTheme as Q } from "./shared/theme-colors.js";
18
- import { useUsageData as $ } from "./usage/useUsageData/useUsageData.js";
19
- import { triggerBrowserDownload as ee } from "./files/browser-download.js";
20
- import { usePersistedState as te } from "./shared/usePersistedState/usePersistedState.js";
21
- export { X as ColorScheme, q as EXTERNAL_SERVICE_SIGNIN_METHOD, A as PROMPT_CONTENT_MAX_LENGTH, j as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, M as PROMPT_DESCRIPTION_MAX_LENGTH, N as PROMPT_NAME_MAX_LENGTH, J as PendingSigninEventKind, P as PromptFieldError, y as PromptSource, Y as TOOLSET_SIGNIN_METHOD, V as apSchedulerDayToJsDay, d as appendLocaleCode, Z as applyThemeColors, f as buildAdditionalLocaleOptions, w as buildExternalServiceScopeId, D as buildPromptExportEnvelope, O as buildPromptExportFileName, F as buildPromptPath, p as composeLocalePayload, i as createCsrfMiddleware, a as createUnauthorizedMiddleware, m as decomposeLocalizedFields, _ as formatCalendarDate, e as getApiErrorDetails, t as getApiErrorMessage, n as getApiErrorStatus, U as getBrowserTimezone, T as getExternalServiceFallbackName, Q as getOsPreferredTheme, I as getRemainingCharacters, x as getRunnerSchemas, o as includesIgnoreCase, r as isConversationNotFoundError, S as isCustomAppSchema, C as isQuickAppSchema, W as isValidAbsoluteUrl, G as isValidFeaturesData, H as jsDayToApSchedulerDay, v as padTwoDigits, E as parseExternalServiceUrl, K as parseFeaturesData, b as parsePromptResourceUrl, h as resolveLocalizedText, s as safeDecodeURI, c as safeDecodeURIComponent, k as serializePromptExport, l as stripSurroundingSlashes, u as stripTrailingSlashes, g as toBaseLocale, ee as triggerBrowserDownload, te as usePersistedState, B as usePromptsState, $ as useUsageData, L as validatePromptContent, R as validatePromptDescription, z as validatePromptName };
1
+ import { getAcceptInvitationErrorItemName as e, getApiErrorDetails as t, getApiErrorMessage as n, getApiErrorStatus as r, isConversationNotFoundError as i } from "./api-error/api-error.js";
2
+ import { createCsrfMiddleware as a } from "./api-transport/create-csrf-middleware.js";
3
+ import { createUnauthorizedMiddleware as o } from "./api-transport/create-unauthorized-middleware.js";
4
+ import { includesIgnoreCase as s, safeDecodeURI as c, safeDecodeURIComponent as l, stripSurroundingSlashes as u, stripTrailingSlashes as d } from "./shared/string-utils.js";
5
+ import { appendLocaleCode as f, buildAdditionalLocaleOptions as p, composeLocalePayload as m, decomposeLocalizedFields as h, resolveLocalizedText as g, toBaseLocale as _ } from "./shared/locale.js";
6
+ import { formatCalendarDate as v, padTwoDigits as y } from "./shared/formatting.js";
7
+ import { PromptSource as b, parsePromptResourceUrl as x } from "./prompt/prompt-resource.js";
8
+ import { getRunnerSchemas as S, isCustomAppSchema as C, isQuickAppSchema as w } from "./shared/application-schema.js";
9
+ import { buildExternalServiceScopeId as T, getExternalServiceFallbackName as E, parseExternalServiceUrl as D } from "./shared/external-services.js";
10
+ import { buildPromptExportEnvelope as O, buildPromptExportFileName as k, serializePromptExport as A } from "./prompt/export-prompt.js";
11
+ import { PROMPT_CONTENT_MAX_LENGTH as j, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as M, PROMPT_DESCRIPTION_MAX_LENGTH as N, PROMPT_FIELD_VALIDATORS as P, PROMPT_NAME_MAX_LENGTH as F, PromptFieldError as I, buildPromptPath as L, getRemainingCharacters as R, validatePromptContent as z, validatePromptDescription as B, validatePromptName as V } from "./prompt/prompt.js";
12
+ import { usePromptsState as H } from "./prompt/usePromptsState/usePromptsState.js";
13
+ import { apSchedulerDayToJsDay as U, jsDayToApSchedulerDay as W } from "./shared/cron-weekday.js";
14
+ import { getBrowserTimezone as G } from "./shared/browser-timezone.js";
15
+ import { isValidAbsoluteUrl as K, isValidFeaturesData as q, parseFeaturesData as J } from "./shared/custom-apps.js";
16
+ import { EXTERNAL_SERVICE_SIGNIN_METHOD as Y, PendingSigninEventKind as X, TOOLSET_SIGNIN_METHOD as Z } from "./shared/client-channel.js";
17
+ import { ColorScheme as Q, applyThemeColors as $, getOsPreferredTheme as ee } from "./shared/theme-colors.js";
18
+ import { useUsageData as te } from "./usage/useUsageData/useUsageData.js";
19
+ import { triggerBrowserDownload as ne } from "./files/browser-download.js";
20
+ import { usePersistedState as re } from "./shared/usePersistedState/usePersistedState.js";
21
+ export { Q as ColorScheme, Y as EXTERNAL_SERVICE_SIGNIN_METHOD, j as PROMPT_CONTENT_MAX_LENGTH, M as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, N as PROMPT_DESCRIPTION_MAX_LENGTH, P as PROMPT_FIELD_VALIDATORS, F as PROMPT_NAME_MAX_LENGTH, X as PendingSigninEventKind, I as PromptFieldError, b as PromptSource, Z as TOOLSET_SIGNIN_METHOD, U as apSchedulerDayToJsDay, f as appendLocaleCode, $ as applyThemeColors, p as buildAdditionalLocaleOptions, T as buildExternalServiceScopeId, O as buildPromptExportEnvelope, k as buildPromptExportFileName, L as buildPromptPath, m as composeLocalePayload, a as createCsrfMiddleware, o as createUnauthorizedMiddleware, h as decomposeLocalizedFields, v as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, G as getBrowserTimezone, E as getExternalServiceFallbackName, ee as getOsPreferredTheme, R as getRemainingCharacters, S as getRunnerSchemas, s as includesIgnoreCase, i as isConversationNotFoundError, C as isCustomAppSchema, w as isQuickAppSchema, K as isValidAbsoluteUrl, q as isValidFeaturesData, W as jsDayToApSchedulerDay, y as padTwoDigits, D as parseExternalServiceUrl, J as parseFeaturesData, x as parsePromptResourceUrl, g as resolveLocalizedText, c as safeDecodeURI, l as safeDecodeURIComponent, A as serializePromptExport, u as stripSurroundingSlashes, d as stripTrailingSlashes, _ as toBaseLocale, ne as triggerBrowserDownload, re as usePersistedState, H as usePromptsState, te as useUsageData, z as validatePromptContent, B as validatePromptDescription, V as validatePromptName };