@epam/ai-dial-chat-hooks 1.2.0-dev.99 → 1.3.0-dev.5
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/api-error/api-error.js +7 -4
- package/catalog/catalog-derivations.js +1 -1
- package/catalog/deployment-id.js +8 -2
- package/catalog/map-deployment-limits-to-catalog.js +16 -24
- package/catalog/map-deployment-limits-to-input.js +81 -9
- package/catalog/map-deployment-to-catalog-item.js +34 -34
- package/catalog/map-entity-details-to-catalog.js +237 -192
- package/catalog/map-skill-to-catalog-item.js +61 -54
- package/catalog/publish.js +4 -4
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +122 -101
- package/catalog/useCatalogItemDetails.js +9 -8
- package/catalog/usePublishFolders/usePublishFolders.js +1 -1
- package/catalog.d.ts +171 -34
- package/catalog.js +23 -23
- package/conversation/conversation-transfer/export-conversation.js +24 -16
- package/conversation/conversation-transfer/import-conversation.js +80 -31
- package/conversation/create-chat-stream-api.js +89 -49
- package/conversation/get-model-id-from-conversation-id.js +15 -9
- package/conversation/message-utils.js +44 -2
- package/conversation/stage.js +6 -2
- package/conversation/useActiveConversationSync/useActiveConversationSync.js +7 -8
- package/conversation/useConversationExport/useConversationExport.js +9 -9
- package/conversation/useConversationHandlers/message-utils.js +8 -5
- package/conversation/useConversationHandlers/useConversationHandlers.js +181 -167
- package/conversation/useConversationImport/useConversationImport.js +123 -121
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +49 -31
- package/conversation/useConversationStream/frame-scheduler.js +39 -0
- package/conversation/useConversationStream/generation-resume.js +122 -64
- package/conversation/useConversationStream/useConversationStream.js +298 -118
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +189 -0
- package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
- package/conversation-sources.d.ts +1 -1
- package/conversation-transfer.d.ts +2 -1
- package/conversation.d.ts +218 -22
- package/conversation.js +32 -31
- package/file-manager-canvas.d.ts +27 -7
- package/file-manager.d.ts +87 -32
- package/file-manager.js +25 -24
- package/files/attachment-canvas.js +67 -44
- package/files/dial-file-manager-copy-move.util.js +9 -8
- package/files/dial-file-manager-mapping.util.js +2 -1
- package/files/dial-file-manager-path.util.js +24 -2
- package/files/dial-file-manager.model.js +23 -19
- package/files/dial-file-manager.types.js +3 -3
- package/files/file-manager-variant.js +1 -1
- package/files/resolve-dial-file-api-path.js +11 -12
- package/files/useDialFileListing/useDialFileListing.js +140 -127
- package/files/useDialFileManager/useDialFileManager.js +139 -135
- package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -15
- package/files/useDialFileMutations/useDialFileMutations.js +65 -60
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +28 -23
- package/index.d.ts +643 -128
- package/index.js +136 -134
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
- package/oauth/authorize-url.js +3 -3
- package/oauth/toolset-id.js +5 -3
- package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
- package/oauth.d.ts +34 -2
- package/oauth.js +9 -9
- package/package.json +19 -23
- package/scheduled-task/scheduled-task-description.js +43 -39
- package/scheduled-task/scheduled-task-trigger.js +74 -71
- package/scheduled-task/use-scheduled-task-runs.js +162 -50
- package/scheduled-task/use-scheduled-tasks.js +52 -48
- package/scheduled-tasks.d.ts +27 -6
- package/scheduled-tasks.js +2 -2
- package/shared/application-schema.js +5 -2
- package/shared/cron-day-of-month.js +13 -0
- package/skill/skill-archive.js +19 -0
- package/skill/skill-types.js +8 -7
- package/skill/skill.js +52 -29
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +38 -34
- package/skill/useSkillEditorLoad.js +65 -59
- package/skill/useSkillEditorSubmit.js +105 -93
- package/skill/useSkillFileActions.js +70 -58
- package/skill-editor.d.ts +62 -13
- package/skill-editor.js +9 -9
- package/usage/map-user-usage-to-model-limits.js +137 -95
- package/usage.d.ts +8 -3
- package/usePageFileDrag/usePageFileDrag.js +3 -3
- package/utils.d.ts +26 -6
- package/utils.js +10 -10
package/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DeploymentCreationFormLocaleEntry } from '@epam/ai-dial-builder-form';
|
|
2
|
-
import { DeploymentCreationFormLocaleOption } from '@epam/ai-dial-builder-form';
|
|
3
1
|
import { ExportFolder } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { LocaleOption } from '@epam/ai-dial-chat-shared';
|
|
4
3
|
import { LocaleTextEntryDto } from '@epam/ai-dial-chat-api-client';
|
|
4
|
+
import { LocalizedTextEntry } from '@epam/ai-dial-chat-shared';
|
|
5
5
|
import { Middleware } from '@epam/ai-dial-chat-api-client';
|
|
6
6
|
import { PromptFolderResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
7
7
|
import { PromptListResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
@@ -10,12 +10,24 @@ import { UserLimitStatsResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
|
10
10
|
|
|
11
11
|
/** Normalized shape returned by {@link getApiErrorDetails}. */
|
|
12
12
|
export declare interface ApiErrorDetails {
|
|
13
|
+
/** Stable domain error code supplied by the API, when present. */
|
|
14
|
+
code?: string;
|
|
13
15
|
/** HTTP status code carried by the error, when available. */
|
|
14
16
|
status?: number;
|
|
15
17
|
/** Resolved human-readable error message, or `null` when none could be resolved. */
|
|
16
18
|
message: string | null;
|
|
17
19
|
/** Extracted W3C trace ID, when the error's response carries a valid `traceparent`. */
|
|
18
20
|
traceId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Error code reported by the service behind the API, when the API forwards one
|
|
23
|
+
* (`upstreamCode`). Passed through as-is; the host decides whether to act on it.
|
|
24
|
+
*/
|
|
25
|
+
upstreamCode?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Error reason reported by the service behind the API, when the API forwards one
|
|
28
|
+
* (`upstreamMessage`). Untranslated; the host decides whether to display it.
|
|
29
|
+
*/
|
|
30
|
+
upstreamMessage?: string;
|
|
19
31
|
}
|
|
20
32
|
|
|
21
33
|
/** Appends a locale's uppercased code to a field label, e.g. `'Name [EN]'`. */
|
|
@@ -29,7 +41,7 @@ export declare const apSchedulerDayToJsDay: (apSchedulerDay: number) => number;
|
|
|
29
41
|
* `additionalLocaleCodes` and excluding whichever code is already the
|
|
30
42
|
* primary Name/Description field.
|
|
31
43
|
*/
|
|
32
|
-
export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) =>
|
|
44
|
+
export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => LocaleOption[];
|
|
33
45
|
|
|
34
46
|
/** Reconstructs the exact scope id Core expects as `ResourceSignInRequest`/`ResourceSignOutRequest`'s `url` field. */
|
|
35
47
|
export declare const buildExternalServiceScopeId: (appId: string, serviceName: string) => string;
|
|
@@ -52,7 +64,7 @@ export declare const buildPromptPath: (folderId: string, name: string) => string
|
|
|
52
64
|
* `undefined` (not `[]`) when nothing remains, so a request untouched by
|
|
53
65
|
* this feature stays byte-identical to today.
|
|
54
66
|
*/
|
|
55
|
-
export declare const composeLocalePayload: (otherLocales:
|
|
67
|
+
export declare const composeLocalePayload: (otherLocales: LocalizedTextEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
|
|
56
68
|
|
|
57
69
|
/**
|
|
58
70
|
* Builds a generated-client `Middleware` that attaches `X-CSRF-Token` on every
|
|
@@ -113,7 +125,7 @@ export declare type CsrfRefreshOutcome = {
|
|
|
113
125
|
* present in either map, excluding `primaryLocale` — that key is already the
|
|
114
126
|
* primary Name/Description field, not a row in the popup.
|
|
115
127
|
*/
|
|
116
|
-
export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) =>
|
|
128
|
+
export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => LocalizedTextEntry[];
|
|
117
129
|
|
|
118
130
|
/** A prompt record as it appears inside a downloaded prompt file. */
|
|
119
131
|
export declare interface ExportedPrompt {
|
|
@@ -132,7 +144,7 @@ export declare interface ExportedPrompt {
|
|
|
132
144
|
/** Formats a Unix timestamp (ms) as a locale-formatted calendar date, e.g. `'22/7/2026'`. */
|
|
133
145
|
export declare const formatCalendarDate: (timestampMs: number) => string;
|
|
134
146
|
|
|
135
|
-
/** Normalizes any API error into a `{ status?, message, traceId? }` shape. */
|
|
147
|
+
/** Normalizes any API error into a `{ status?, message, traceId?, code?, upstreamCode?, upstreamMessage? }` shape. */
|
|
136
148
|
export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
|
|
137
149
|
|
|
138
150
|
/** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
|
|
@@ -162,6 +174,9 @@ export declare const getExternalServiceFallbackName: (serviceName: string) => st
|
|
|
162
174
|
*/
|
|
163
175
|
export declare const getRemainingCharacters: (value: string, maxLength: number) => number | null;
|
|
164
176
|
|
|
177
|
+
/** Returns the schemas that create schema-based apps: unique by id, without id-less entries or the custom-app schema. */
|
|
178
|
+
export declare const getRunnerSchemas: <T extends QuickAppSchemaLike>(schemas: T[]) => RunnerSchema<T>[];
|
|
179
|
+
|
|
165
180
|
/** Case-insensitive substring match. */
|
|
166
181
|
export declare const includesIgnoreCase: (str: string, query: string) => boolean;
|
|
167
182
|
|
|
@@ -285,6 +300,11 @@ export declare interface QuickAppSchemaLike {
|
|
|
285
300
|
*/
|
|
286
301
|
export declare const resolveLocalizedText: (value: LocalizedText | undefined | null, activeLocale: string, primaryLocale: string) => string;
|
|
287
302
|
|
|
303
|
+
/** An application schema with a resolved id, as returned by {@link getRunnerSchemas}. */
|
|
304
|
+
export declare type RunnerSchema<T extends QuickAppSchemaLike> = T & {
|
|
305
|
+
id: string;
|
|
306
|
+
};
|
|
307
|
+
|
|
288
308
|
/** Decodes a URI-encoded path segment, returning the original string if decoding fails. */
|
|
289
309
|
export declare const safeDecodeURI: (path: string) => string;
|
|
290
310
|
|
package/utils.js
CHANGED
|
@@ -5,13 +5,13 @@ import { includesIgnoreCase as o, safeDecodeURI as s, safeDecodeURIComponent as
|
|
|
5
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
6
|
import { formatCalendarDate as _, padTwoDigits as v } from "./shared/formatting.js";
|
|
7
7
|
import { PromptSource as y, parsePromptResourceUrl as b } from "./prompt/prompt-resource.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { getBrowserTimezone as
|
|
14
|
-
import { isValidAbsoluteUrl as
|
|
15
|
-
import { buildExternalServiceScopeId as
|
|
16
|
-
import { useUsageData as
|
|
17
|
-
export {
|
|
8
|
+
import { getRunnerSchemas as x, isCustomAppSchema as S, isQuickAppSchema as C } from "./shared/application-schema.js";
|
|
9
|
+
import { buildPromptExportEnvelope as w, buildPromptExportFileName as T, serializePromptExport as E } from "./prompt/export-prompt.js";
|
|
10
|
+
import { PROMPT_CONTENT_MAX_LENGTH as D, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as O, PROMPT_DESCRIPTION_MAX_LENGTH as k, PROMPT_NAME_MAX_LENGTH as A, PromptFieldError as j, buildPromptPath as M, getRemainingCharacters as N, validatePromptContent as P, validatePromptDescription as F, validatePromptName as I } from "./prompt/prompt.js";
|
|
11
|
+
import { usePromptsState as L } from "./prompt/usePromptsState/usePromptsState.js";
|
|
12
|
+
import { apSchedulerDayToJsDay as R, jsDayToApSchedulerDay as z } from "./shared/cron-weekday.js";
|
|
13
|
+
import { getBrowserTimezone as B } from "./shared/browser-timezone.js";
|
|
14
|
+
import { isValidAbsoluteUrl as V, isValidFeaturesData as H, parseFeaturesData as U } from "./shared/custom-apps.js";
|
|
15
|
+
import { buildExternalServiceScopeId as W, getExternalServiceFallbackName as G, parseExternalServiceUrl as K } from "./shared/external-services.js";
|
|
16
|
+
import { useUsageData as q } from "./usage/useUsageData/useUsageData.js";
|
|
17
|
+
export { D as PROMPT_CONTENT_MAX_LENGTH, O as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, k as PROMPT_DESCRIPTION_MAX_LENGTH, A as PROMPT_NAME_MAX_LENGTH, j as PromptFieldError, y as PromptSource, R as apSchedulerDayToJsDay, d as appendLocaleCode, f as buildAdditionalLocaleOptions, W as buildExternalServiceScopeId, w as buildPromptExportEnvelope, T as buildPromptExportFileName, M 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, B as getBrowserTimezone, G as getExternalServiceFallbackName, N as getRemainingCharacters, x as getRunnerSchemas, o as includesIgnoreCase, r as isConversationNotFoundError, S as isCustomAppSchema, C as isQuickAppSchema, V as isValidAbsoluteUrl, H as isValidFeaturesData, z as jsDayToApSchedulerDay, v as padTwoDigits, K as parseExternalServiceUrl, U as parseFeaturesData, b as parsePromptResourceUrl, h as resolveLocalizedText, s as safeDecodeURI, c as safeDecodeURIComponent, E as serializePromptExport, l as stripSurroundingSlashes, u as stripTrailingSlashes, g as toBaseLocale, L as usePromptsState, q as useUsageData, P as validatePromptContent, F as validatePromptDescription, I as validatePromptName };
|