@epam/ai-dial-chat-hooks 1.1.0-dev.299 → 1.1.0-dev.307
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/catalog-derivations.d.ts +27 -0
- package/catalog/catalog-derivations.d.ts.map +1 -0
- package/catalog/catalog-primary-action.d.ts +47 -0
- package/catalog/catalog-primary-action.d.ts.map +1 -0
- package/catalog/create-publish-api.d.ts +32 -0
- package/catalog/create-publish-api.d.ts.map +1 -0
- package/catalog/map-prompt-to-catalog-item.d.ts +4 -6
- package/catalog/map-prompt-to-catalog-item.d.ts.map +1 -1
- package/catalog/useCatalogItemDetails.d.ts +73 -0
- package/catalog/useCatalogItemDetails.d.ts.map +1 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts +71 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -0
- package/conversation/announcement-message.d.ts +7 -1
- package/conversation/announcement-message.d.ts.map +1 -1
- package/files/dial-file-manager-mapping.util.d.ts +1 -1
- package/files/dial-file-manager-mapping.util.d.ts.map +1 -1
- package/files/dial-file-manager.types.d.ts +2 -5
- package/files/dial-file-manager.types.d.ts.map +1 -1
- package/files/file-manager-variant.d.ts +2 -20
- package/files/file-manager-variant.d.ts.map +1 -1
- package/files/resolve-dial-file-api-path.d.ts +1 -5
- package/files/resolve-dial-file-api-path.d.ts.map +1 -1
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +1 -1
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -1
- package/index.d.ts +6 -3
- package/index.d.ts.map +1 -1
- package/index.js +2600 -2410
- package/package.json +14 -15
- package/prompt/prompt-resource.d.ts +8 -9
- package/prompt/prompt-resource.d.ts.map +1 -1
- package/skill/useSkillFilePreview.d.ts +38 -0
- package/skill/useSkillFilePreview.d.ts.map +1 -0
- package/useShareLink/useShareLink.d.ts +2 -2
- package/useShareLink/useShareLink.d.ts.map +1 -1
- package/files/file-path.d.ts +0 -3
- package/files/file-path.d.ts.map +0 -1
- package/files/upload-batch.types.d.ts +0 -22
- package/files/upload-batch.types.d.ts.map +0 -1
- package/files/useGridEditingScroll/useGridEditingScroll.d.ts +0 -27
- package/files/useGridEditingScroll/useGridEditingScroll.d.ts.map +0 -1
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.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.307",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -23,22 +23,21 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^19.2.6",
|
|
26
|
-
"@epam/ai-dial-attachment-canvas": "1.1.0-dev.
|
|
27
|
-
"@epam/ai-dial-attachment-input": "1.1.0-dev.
|
|
28
|
-
"@epam/ai-dial-catalog": "1.1.0-dev.
|
|
29
|
-
"@epam/ai-dial-chat-api-client": "1.1.0-dev.
|
|
30
|
-
"@epam/ai-dial-chat-overlay": "1.1.0-dev.
|
|
31
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
32
|
-
"@epam/ai-dial-deployment-creation-form": "1.1.0-dev.
|
|
33
|
-
"@epam/ai-dial-publish-panel": "1.1.0-dev.
|
|
34
|
-
"@epam/ai-dial-quotations": "1.1.0-dev.
|
|
26
|
+
"@epam/ai-dial-attachment-canvas": "1.1.0-dev.307",
|
|
27
|
+
"@epam/ai-dial-attachment-input": "1.1.0-dev.307",
|
|
28
|
+
"@epam/ai-dial-catalog": "1.1.0-dev.307",
|
|
29
|
+
"@epam/ai-dial-chat-api-client": "1.1.0-dev.307",
|
|
30
|
+
"@epam/ai-dial-chat-overlay": "1.1.0-dev.307",
|
|
31
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.307",
|
|
32
|
+
"@epam/ai-dial-deployment-creation-form": "1.1.0-dev.307",
|
|
33
|
+
"@epam/ai-dial-publish-panel": "1.1.0-dev.307",
|
|
34
|
+
"@epam/ai-dial-quotations": "1.1.0-dev.307",
|
|
35
35
|
"@epam/ai-dial-react-file-manager": "*",
|
|
36
|
-
"@epam/ai-dial-scheduled-tasks": "1.1.0-dev.
|
|
37
|
-
"@epam/ai-dial-share": "1.1.0-dev.
|
|
38
|
-
"@epam/ai-dial-skill-editor": "1.1.0-dev.
|
|
39
|
-
"@epam/ai-dial-source-panel": "1.1.0-dev.
|
|
36
|
+
"@epam/ai-dial-scheduled-tasks": "1.1.0-dev.307",
|
|
37
|
+
"@epam/ai-dial-share": "1.1.0-dev.307",
|
|
38
|
+
"@epam/ai-dial-skill-editor": "1.1.0-dev.307",
|
|
39
|
+
"@epam/ai-dial-source-panel": "1.1.0-dev.307",
|
|
40
40
|
"@epam/ai-dial-ui-kit": "*",
|
|
41
|
-
"ag-grid-community": "^35.3.0",
|
|
42
41
|
"fflate": "^0.8.3"
|
|
43
42
|
},
|
|
44
43
|
"repository": {
|
|
@@ -14,18 +14,17 @@ export interface ParsedPromptResourceUrl {
|
|
|
14
14
|
/** Path to the prompt within that bucket. */
|
|
15
15
|
path: string;
|
|
16
16
|
}
|
|
17
|
-
/**
|
|
18
|
-
* Qualifies a bucket-relative prompt path into a `prompts/{bucket}/{path}`
|
|
19
|
-
* resource URL. A path alone is ambiguous once prompts from more than one
|
|
20
|
-
* bucket share a list: the prompts endpoints resolve a bare path against the
|
|
21
|
-
* caller's own bucket, so a prompt shared out of someone else's bucket needs
|
|
22
|
-
* the bucket carried alongside it.
|
|
23
|
-
*/
|
|
24
|
-
export declare const buildPromptResourceUrl: ({ bucket, path, }: ParsedPromptResourceUrl) => string;
|
|
25
17
|
/**
|
|
26
18
|
* Splits a `prompts/{bucket}/{path}` resource URL into its parts, mirroring the
|
|
27
19
|
* backend's parser. Returns `null` for a different prefix, an empty bucket, or
|
|
28
|
-
* an empty path, so callers can treat "a
|
|
20
|
+
* an empty path, so callers can treat "not a prompt resource id" as one case.
|
|
21
|
+
*
|
|
22
|
+
* `CatalogItem.id` for a prompt is always this full resource path — the read,
|
|
23
|
+
* update, delete, and move endpoints all take it unmodified. The one caller
|
|
24
|
+
* that still needs the bucket-relative sub-path on its own is the
|
|
25
|
+
* organisation (public) prompt read, whose endpoint kept its bucket-relative
|
|
26
|
+
* `path` argument because it only ever operates on the fixed `public`
|
|
27
|
+
* namespace.
|
|
29
28
|
*/
|
|
30
29
|
export declare const parsePromptResourceUrl: (url: string) => ParsedPromptResourceUrl | null;
|
|
31
30
|
//# sourceMappingURL=prompt-resource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-resource.d.ts","sourceRoot":"","sources":["../../src/prompt/prompt-resource.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,oBAAY,YAAY;IACtB,+DAA+D;IAC/D,QAAQ,aAAa;IACrB,iFAAiF;IACjF,YAAY,iBAAiB;IAC7B,0DAA0D;IAC1D,MAAM,WAAW;CAClB;AAKD,0EAA0E;AAC1E,MAAM,WAAW,uBAAuB;IACtC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;CACd;AAED
|
|
1
|
+
{"version":3,"file":"prompt-resource.d.ts","sourceRoot":"","sources":["../../src/prompt/prompt-resource.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,oBAAY,YAAY;IACtB,+DAA+D;IAC/D,QAAQ,aAAa;IACrB,iFAAiF;IACjF,YAAY,iBAAiB;IAC7B,0DAA0D;IAC1D,MAAM,WAAW;CAClB;AAKD,0EAA0E;AAC1E,MAAM,WAAW,uBAAuB;IACtC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,KACV,uBAAuB,GAAG,IAS5B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SkillFileContent } from './skill-file-preview';
|
|
2
|
+
/** Discriminant for the kind of error a `useSkillFilePreview` load can produce. */
|
|
3
|
+
export declare enum SkillPreviewErrorKind {
|
|
4
|
+
/** HTTP 403 — the caller lacks permission to read this file. */
|
|
5
|
+
Forbidden = "forbidden",
|
|
6
|
+
/** Any non-403 load failure. */
|
|
7
|
+
Generic = "generic"
|
|
8
|
+
}
|
|
9
|
+
/** Options accepted by `useSkillFilePreview`. */
|
|
10
|
+
export interface UseSkillFilePreviewOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Opaque id of the selected skill file. Changing this resets all state
|
|
13
|
+
* and starts a new load; stale resolutions from the previous id are discarded.
|
|
14
|
+
*/
|
|
15
|
+
fileId: string;
|
|
16
|
+
/**
|
|
17
|
+
* App-owned loader; resolves with the raw file bytes when the request
|
|
18
|
+
* succeeds. The hook never constructs a URL or imports a REST client.
|
|
19
|
+
*/
|
|
20
|
+
onLoadFile: (fileId: string) => Promise<SkillFileContent>;
|
|
21
|
+
}
|
|
22
|
+
/** State returned by `useSkillFilePreview`. */
|
|
23
|
+
export interface UseSkillFilePreviewResult {
|
|
24
|
+
/** `true` while the async load is in flight. */
|
|
25
|
+
isLoading: boolean;
|
|
26
|
+
/** Resolved file content, or `null` while loading or after an error. */
|
|
27
|
+
content: SkillFileContent | null;
|
|
28
|
+
/** Classified load error, or `null` while loading or after a success. */
|
|
29
|
+
error: SkillPreviewErrorKind | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Headless hook that manages the skill-file preview loading lifecycle.
|
|
33
|
+
* Starts a new load on mount and whenever `fileId` changes; classifies errors
|
|
34
|
+
* as `Forbidden` (HTTP 403) or `Generic`; discards settlements from superseded
|
|
35
|
+
* or unmounted loads.
|
|
36
|
+
*/
|
|
37
|
+
export declare const useSkillFilePreview: ({ fileId, onLoadFile, }: UseSkillFilePreviewOptions) => UseSkillFilePreviewResult;
|
|
38
|
+
//# sourceMappingURL=useSkillFilePreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSkillFilePreview.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillFilePreview.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,mFAAmF;AACnF,oBAAY,qBAAqB;IAC/B,gEAAgE;IAChE,SAAS,cAAc;IACvB,gCAAgC;IAChC,OAAO,YAAY;CACpB;AAED,iDAAiD;AACjD,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC3D;AAED,+CAA+C;AAC/C,MAAM,WAAW,yBAAyB;IACxC,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,yEAAyE;IACzE,KAAK,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACrC;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,yBAGjC,0BAA0B,KAAG,yBAoC/B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShareApi } from '@epam/ai-dial-chat-api-client';
|
|
2
2
|
import { ShareLinkAccess, ShareLinkData } from '@epam/ai-dial-share';
|
|
3
3
|
/** Result returned by {@link useShareLink}. */
|
|
4
4
|
export interface UseShareLinkResult {
|
|
@@ -19,5 +19,5 @@ export interface UseShareLinkResult {
|
|
|
19
19
|
* re-fetch on access change), not the client's base URL, auth, or CSRF
|
|
20
20
|
* setup, which stay the caller's responsibility.
|
|
21
21
|
*/
|
|
22
|
-
export declare const useShareLink: (shareApi: Pick<ShareApi, "createShareLink">, itemId: string,
|
|
22
|
+
export declare const useShareLink: (shareApi: Pick<ShareApi, "createShareLink">, itemId: string, origin?: string) => UseShareLinkResult;
|
|
23
23
|
//# sourceMappingURL=useShareLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useShareLink.d.ts","sourceRoot":"","sources":["../../src/useShareLink/useShareLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,
|
|
1
|
+
{"version":3,"file":"useShareLink.d.ts","sourceRoot":"","sources":["../../src/useShareLink/useShareLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAYrE,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IAChC,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,6DAA6D;IAC7D,SAAS,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;CAChD;AAcD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GACvB,UAAU,IAAI,CAAC,QAAQ,EAAE,iBAAiB,CAAC,EAC3C,QAAQ,MAAM,EACd,SAAQ,MAA+B,KACtC,kBAwDF,CAAC"}
|
package/files/file-path.d.ts
DELETED
package/files/file-path.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-path.d.ts","sourceRoot":"","sources":["../../src/files/file-path.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,OACgB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** Lifecycle status of a single file within an upload batch. */
|
|
2
|
-
export declare enum FileUploadStatus {
|
|
3
|
-
Queued = "queued",
|
|
4
|
-
Uploading = "uploading",
|
|
5
|
-
Completed = "completed",
|
|
6
|
-
Failed = "failed",
|
|
7
|
-
Cancelled = "cancelled"
|
|
8
|
-
}
|
|
9
|
-
/** Progress state for a single file within an upload batch. */
|
|
10
|
-
export interface FileUploadEntry {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
status: FileUploadStatus;
|
|
14
|
-
/** 0–100 while uploading when the transport reports byte progress. */
|
|
15
|
-
percent?: number;
|
|
16
|
-
}
|
|
17
|
-
/** State of an in-progress or just-settled upload batch, as returned by `useDialFileUploadBatch`. */
|
|
18
|
-
export interface FileUploadBatchState {
|
|
19
|
-
files: FileUploadEntry[];
|
|
20
|
-
isOpen: boolean;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=upload-batch.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload-batch.types.d.ts","sourceRoot":"","sources":["../../src/files/upload-batch.types.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qGAAqG;AACrG,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;CACjB"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { FileManagerGridRow } from '@epam/ai-dial-react-file-manager';
|
|
2
|
-
import { GridApi, IRowNode } from 'ag-grid-community';
|
|
3
|
-
/** Options accepted by `useGridEditingScroll`. */
|
|
4
|
-
export interface UseGridEditingScrollOptions {
|
|
5
|
-
/** Picks the row to scroll to among the rows newly added since the last `rowDataUpdated`. Defaults to the first row flagged `isTemporary`, or the first new row. */
|
|
6
|
-
resolveTargetNode?: (newNodes: IRowNode<FileManagerGridRow>[]) => IRowNode<FileManagerGridRow> | null;
|
|
7
|
-
}
|
|
8
|
-
/** Values returned by `useGridEditingScroll`. */
|
|
9
|
-
export interface UseGridEditingScrollResult {
|
|
10
|
-
/** Pass to `DialFileManager`'s `onGridApiChange` prop. */
|
|
11
|
-
handleGridApiChange: (api: GridApi<FileManagerGridRow>) => void;
|
|
12
|
-
/** Re-seeds the known-row-id set without scrolling — call on a data-source change such as a tab switch. */
|
|
13
|
-
reset: () => void;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* `@epam/ai-dial-react-file-manager`'s `GridOptions` type does not forward raw AG Grid
|
|
17
|
-
* event callbacks (`onCellEditingStarted`/`onRowDataUpdated`), so this hook
|
|
18
|
-
* binds directly to the `GridApi` obtained via `DialFileManager`'s
|
|
19
|
-
* `onGridApiChange` prop and uses AG Grid's own `addEventListener` instead of
|
|
20
|
-
* a `gridOptions` fragment. Scrolls a newly inline-edited or newly-inserted
|
|
21
|
-
* row into view. `handleGridApiChange` takes the raw `GridApi` only to bind
|
|
22
|
-
* to `onGridApiChange` — the narrow AGENTS.md D9 exception for this hook —
|
|
23
|
-
* and never renders, themes, or otherwise exposes AG Grid beyond that one
|
|
24
|
-
* event-binding parameter.
|
|
25
|
-
*/
|
|
26
|
-
export declare const useGridEditingScroll: ({ resolveTargetNode, }?: UseGridEditingScrollOptions) => UseGridEditingScrollResult;
|
|
27
|
-
//# sourceMappingURL=useGridEditingScroll.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useGridEditingScroll.d.ts","sourceRoot":"","sources":["../../../src/files/useGridEditingScroll/useGridEditingScroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAEL,OAAO,EACP,QAAQ,EAET,MAAM,mBAAmB,CAAC;AAmC3B,kDAAkD;AAClD,MAAM,WAAW,2BAA2B;IAC1C,oKAAoK;IACpK,iBAAiB,CAAC,EAAE,CAClB,QAAQ,EAAE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,KACrC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;CAC1C;AAOD,iDAAiD;AACjD,MAAM,WAAW,0BAA0B;IACzC,0DAA0D;IAC1D,mBAAmB,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IAChE,2GAA2G;IAC3G,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAAI,yBAElC,2BAAgC,KAAG,0BAiFrC,CAAC"}
|