@epam/ai-dial-chat-hooks 1.4.0-dev.95 → 1.4.0-rc.0
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/map-api-error.d.ts +10 -0
- package/api-error/map-api-error.d.ts.map +1 -0
- package/api-error/map-api-error.js +11 -0
- package/catalog/create-publish-api.d.ts +14 -10
- package/catalog/create-publish-api.d.ts.map +1 -1
- package/catalog/create-publish-api.js +8 -9
- package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -1
- package/catalog/map-deployment-to-catalog-item.js +1 -0
- package/catalog/publish-target-taken.d.ts +31 -0
- package/catalog/publish-target-taken.d.ts.map +1 -0
- package/catalog/publish-target-taken.js +14 -0
- package/catalog/resource-name-conflict.d.ts.map +1 -1
- package/catalog/resource-name-conflict.js +19 -22
- package/catalog/resource-save.d.ts +2 -4
- package/catalog/resource-save.d.ts.map +1 -1
- package/catalog/resource-save.js +38 -32
- package/catalog/use-publish-target-guard.d.ts +45 -0
- package/catalog/use-publish-target-guard.d.ts.map +1 -0
- package/catalog/use-publish-target-guard.js +18 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts +11 -3
- package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
- package/catalog/usePublishFolders/usePublishFolders.js +41 -31
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts +27 -11
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -1
- package/catalog/useResourceSavePanel/useResourceSavePanel.js +163 -138
- package/catalog.js +51 -49
- package/conversation/conversation-list.d.ts +7 -1
- package/conversation/conversation-list.d.ts.map +1 -1
- package/conversation/conversation-list.js +11 -2
- package/conversation/conversation-transfer/zip-export.d.ts +1 -1
- package/conversation/conversation-transfer/zip-export.d.ts.map +1 -1
- package/conversation/conversation-transfer/zip-export.js +7 -8
- package/conversation/conversation-transfer/zip-import.d.ts.map +1 -1
- package/conversation/conversation-transfer/zip-import.js +8 -9
- package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -1
- package/conversation/useConversationExport/useConversationExport.js +3 -1
- package/conversation.js +3 -3
- package/entry-points/catalog.d.ts +2 -0
- package/entry-points/catalog.d.ts.map +1 -1
- package/entry-points/scheduled-tasks.d.ts +1 -0
- package/entry-points/scheduled-tasks.d.ts.map +1 -1
- package/entry-points/skill-editor.d.ts +1 -0
- package/entry-points/skill-editor.d.ts.map +1 -1
- package/entry-points/utils.d.ts +1 -0
- package/entry-points/utils.d.ts.map +1 -1
- package/file-manager.js +33 -33
- package/files/dial-file-manager.types.d.ts +4 -2
- package/files/dial-file-manager.types.d.ts.map +1 -1
- package/files/dial-file.d.ts +6 -0
- package/files/dial-file.d.ts.map +1 -1
- package/files/dial-file.js +17 -12
- package/files/useDialFileListing/useDialFileListing.d.ts +9 -1
- package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -1
- package/files/useDialFileListing/useDialFileListing.js +205 -183
- package/files/useDialFileManager/useDialFileManager.d.ts +1 -1
- package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -1
- package/files/useDialFileManager/useDialFileManager.js +114 -113
- package/files/useDialFileMutations/useDialFileMutations.d.ts +2 -1
- package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -1
- package/files/useDialFileMutations/useDialFileMutations.js +5 -5
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -1
- package/index.js +267 -262
- package/org-units/org-unit-guards.d.ts +95 -1
- package/org-units/org-unit-guards.d.ts.map +1 -1
- package/org-units/org-unit-guards.js +51 -16
- package/org-units/useOrgUnits/useOrgUnits.d.ts +12 -4
- package/org-units/useOrgUnits/useOrgUnits.d.ts.map +1 -1
- package/org-units/useOrgUnits/useOrgUnits.js +44 -35
- package/package.json +20 -20
- package/project/project-conversation-data-source.js +4 -4
- package/project/project-refresh.d.ts +2 -0
- package/project/project-refresh.d.ts.map +1 -1
- package/project/project-refresh.js +1 -1
- package/project/use-project-actions.d.ts +3 -1
- package/project/use-project-actions.d.ts.map +1 -1
- package/project/use-project-actions.js +39 -38
- package/project/use-project.d.ts +3 -1
- package/project/use-project.d.ts.map +1 -1
- package/project/use-project.js +57 -44
- package/scheduled-task/scheduled-task-display.d.ts +51 -4
- package/scheduled-task/scheduled-task-display.d.ts.map +1 -1
- package/scheduled-task/scheduled-task-display.js +53 -46
- package/scheduled-task/scheduled-task-next-occurrence.d.ts +2 -0
- package/scheduled-task/scheduled-task-next-occurrence.d.ts.map +1 -1
- package/scheduled-task/scheduled-task-next-occurrence.js +2 -2
- package/scheduled-task/scheduled-task-time-format.d.ts +36 -0
- package/scheduled-task/scheduled-task-time-format.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-time-format.js +34 -0
- package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -1
- package/scheduled-task/scheduled-task-trigger.js +13 -14
- package/scheduled-tasks.js +14 -13
- package/skill/skill-archive.d.ts.map +1 -1
- package/skill/skill-archive.js +6 -7
- package/skill/skill-file-batch-validation.d.ts +6 -0
- package/skill/skill-file-batch-validation.d.ts.map +1 -1
- package/skill/skill-file-batch-validation.js +39 -37
- package/skill/skill-types.d.ts +0 -6
- package/skill/skill-types.d.ts.map +1 -1
- package/skill/skill-types.js +7 -8
- package/skill/skill.d.ts +2 -9
- package/skill/skill.d.ts.map +1 -1
- package/skill/skill.js +33 -34
- package/skill/types/skill-editor-submit.d.ts +8 -0
- package/skill/types/skill-editor-submit.d.ts.map +1 -0
- package/skill/types/skill-editor-submit.js +6 -0
- package/skill/useSkillEditorLoad.js +1 -1
- package/skill/useSkillEditorSubmit.d.ts +2 -3
- package/skill/useSkillEditorSubmit.d.ts.map +1 -1
- package/skill/useSkillEditorSubmit.js +103 -102
- package/skill/useSkillFileActions.d.ts +7 -1
- package/skill/useSkillFileActions.d.ts.map +1 -1
- package/skill/useSkillFileActions.js +55 -49
- package/skill-editor.js +7 -6
- package/utils.js +28 -27
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ResourceFoldersResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
-
import {
|
|
2
|
+
import { OrgUnitNamespace } from '@epam/ai-dial-chat-shared';
|
|
3
|
+
import { PublishDependency, StandaloneSaveToFolderPanelProps } from '@epam/ai-dial-publish-panel';
|
|
3
4
|
import { PublishApiClient } from '../create-publish-api';
|
|
4
5
|
import { ResourceSaveVersionError, SaveDestinationRoot, ResourceSaveAdapter, ResourceSaveChoice, ResourceSaveResult } from '../resource-save';
|
|
5
6
|
import { UsePublishFoldersResult } from '../usePublishFolders/usePublishFolders';
|
|
@@ -15,8 +16,6 @@ export interface UseResourceSavePanelLabels {
|
|
|
15
16
|
saveError: string;
|
|
16
17
|
/** Returns the error shown under the new version input for `error` and the typed `version`. */
|
|
17
18
|
getVersionError: (error: ResourceSaveVersionError, version: string) => string;
|
|
18
|
-
/** Text overrides for the access-rules section. */
|
|
19
|
-
accessRules?: PublishAccessRulesLabels;
|
|
20
19
|
}
|
|
21
20
|
/** Parameters for {@link useResourceSavePanel}. */
|
|
22
21
|
export interface UseResourceSavePanelParams {
|
|
@@ -37,20 +36,36 @@ export interface UseResourceSavePanelParams {
|
|
|
37
36
|
/** The Organization folder tree state; omit when the user may not publish, which hides that root. */
|
|
38
37
|
organizationFolders?: UsePublishFoldersResult;
|
|
39
38
|
/** Publish operations used for an Organization destination. */
|
|
40
|
-
publishClient: Pick<PublishApiClient, 'publishCatalogEntity'
|
|
39
|
+
publishClient: Pick<PublishApiClient, 'publishCatalogEntity'> & Partial<Pick<PublishApiClient, 'checkPublishTarget'>>;
|
|
41
40
|
/** Whether an Organization destination takes a direct write into an org unit (the user may write there); omit while the org-unit rule does not apply, which keeps every Organization destination on the publish path. */
|
|
42
41
|
canSaveDirectlyTo?: (folderPath: string[], root: SaveDestinationRoot) => boolean;
|
|
43
42
|
/** Reason a folder is unavailable as a destination in the given root, or `undefined` when usable; omit while the org-unit rule does not apply. A committed destination with a reason shows it and disables Save. */
|
|
44
43
|
getDisabledReason?: (folderPath: string[], root: SaveDestinationRoot) => string | undefined;
|
|
45
|
-
/**
|
|
46
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Reads the private dependencies of what is being saved, already mapped to the panel's model; omit for a resource that has none to list. Called when the panel is open and the destination is under the Organization root, whichever way the save then goes (a publication request or a direct write); the list is advisory, so a failed read leaves it empty. The host reads the values it saves when called, so it should return the form's state at that moment.
|
|
46
|
+
*/
|
|
47
|
+
loadDependencies?: () => Promise<PublishDependency[]>;
|
|
48
|
+
/** The namespaces, among those asked, in which the user may not write straight into the unit that owns the folder; omit while the org-unit rule does not apply. Used for the dependencies the panel lists and for the icon's `files` namespace, on a destination that takes a direct write. */
|
|
49
|
+
getMissingNamespaces?: (folderPath: string[], namespaces: OrgUnitNamespace[]) => OrgUnitNamespace[];
|
|
50
|
+
/** Reason shown for a folder where the dependencies' namespaces are missing; receives the missing namespaces. Without it a missing namespace disables nothing. */
|
|
51
|
+
getMissingNamespacesReason?: (missing: OrgUnitNamespace[]) => string;
|
|
52
|
+
/** One sentence for the dependencies section while the panel cannot list them (an application whose form state is inside an embedded editor); passed through only under the Organization root. */
|
|
53
|
+
dependenciesNote?: string;
|
|
54
|
+
/** Whether the user is a DIAL admin, the only caller DIAL Core lets copy an application that refers to a folder of files; omit while the org-unit rule does not apply, which leaves the direct-write decision as it is. With it, a listed folder dependency of a user who is not a DIAL admin takes an Organization destination off the direct write and onto the publication request. */
|
|
55
|
+
hasAdminAccess?: boolean;
|
|
56
|
+
/** One sentence shown under the committed destination, instead of the icon notice, when a direct-write folder takes the publication request because the application refers to a folder of files; without it nothing is shown. */
|
|
57
|
+
folderReferenceNote?: string;
|
|
58
|
+
/** Notice about the application's uploaded icon, shown under the committed destination when it is a unit folder where the user may not write `files`; pass it only when the saved resource has an uploaded icon. */
|
|
59
|
+
iconNote?: string;
|
|
60
|
+
/** Reason shown, and Save disabled, while the committed direct-write folder already holds the name this save would write; receives that folder and, for "Save as new version", the typed version. It is returned through `getDisabledReason`, so it needs that parameter too; without it, or without `publishClient.checkPublishTarget`, no target check is made. */
|
|
61
|
+
getTargetTakenReason?: (folderPath: string[], version?: string) => string;
|
|
47
62
|
/** Translated copy. */
|
|
48
63
|
labels: UseResourceSavePanelLabels;
|
|
49
64
|
/** Called once a save whose first step succeeded has finished, with the choice it ran. */
|
|
50
65
|
onSaved: (result: ResourceSaveResult, choice: ResourceSaveChoice) => void;
|
|
51
66
|
}
|
|
52
67
|
/** The {@link StandaloneSaveToFolderPanelProps} the Save flow owns; the host adds the open state, resource summary and labels. */
|
|
53
|
-
export type ResourceSavePanelStateProps = Pick<StandaloneSaveToFolderPanelProps, 'onSubmit' | 'isSubmitDisabled' | 'isSubmitting' | 'submitError' | 'roots' | 'destination' | 'onDestinationChange' | 'onCreateFolder' | 'getDisabledReason' | 'version' | '
|
|
68
|
+
export type ResourceSavePanelStateProps = Pick<StandaloneSaveToFolderPanelProps, 'onSubmit' | 'isSubmitDisabled' | 'isSubmitting' | 'submitError' | 'roots' | 'destination' | 'onDestinationChange' | 'onCreateFolder' | 'getDisabledReason' | 'version' | 'onPendingDestinationChange' | 'foldersError' | 'onRetryFolders' | 'dependencies' | 'dependenciesNote' | 'destinationNote'>;
|
|
54
69
|
/** Result of {@link useResourceSavePanel}. */
|
|
55
70
|
export interface UseResourceSavePanelResult {
|
|
56
71
|
/** Props to spread on `StandaloneSaveToFolderPanel`. */
|
|
@@ -60,9 +75,10 @@ export interface UseResourceSavePanelResult {
|
|
|
60
75
|
}
|
|
61
76
|
/**
|
|
62
77
|
* Owns the Save panel's flow for one resource — the Personal and
|
|
63
|
-
* Organization destination tree, the version choice
|
|
64
|
-
*
|
|
65
|
-
*
|
|
78
|
+
* Organization destination tree, and the version choice — and runs the choice through the resource's
|
|
79
|
+
* adapter. Notifications stay with the host through `onSaved`. For a resource
|
|
80
|
+
* with private dependencies it also reads them while an Organization
|
|
81
|
+
* destination is chosen and returns them as `panelProps.dependencies`.
|
|
66
82
|
*/
|
|
67
|
-
export declare const useResourceSavePanel: ({ isOpen, adapter, resourceId, currentFolderPath, currentVersion, versionPattern, listPersonalFolders, organizationFolders, publishClient, canSaveDirectlyTo, getDisabledReason: getFolderDisabledReason,
|
|
83
|
+
export declare const useResourceSavePanel: ({ isOpen, adapter, resourceId, currentFolderPath, currentVersion, versionPattern, listPersonalFolders, organizationFolders, publishClient, canSaveDirectlyTo, getDisabledReason: getFolderDisabledReason, loadDependencies, getMissingNamespaces, getMissingNamespacesReason, dependenciesNote, hasAdminAccess, folderReferenceNote, iconNote, getTargetTakenReason, labels, onSaved, }: UseResourceSavePanelParams) => UseResourceSavePanelResult;
|
|
68
84
|
//# sourceMappingURL=useResourceSavePanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResourceSavePanel.d.ts","sourceRoot":"","sources":["../../../src/catalog/useResourceSavePanel/useResourceSavePanel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,
|
|
1
|
+
{"version":3,"file":"useResourceSavePanel.d.ts","sourceRoot":"","sources":["../../../src/catalog/useResourceSavePanel/useResourceSavePanel.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,182 +1,207 @@
|
|
|
1
1
|
import { getApiErrorDetails as e } from "../../api-error/api-error.js";
|
|
2
2
|
import { useResourceFolders as t } from "../useResourceFolders/useResourceFolders.js";
|
|
3
|
-
import { ResourceSaveError as n } from "../resource-save-adapter.js";
|
|
4
|
-
import { SaveDestinationRoot as
|
|
5
|
-
import { ResourceSaveVersionError as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { ResourceSaveError as n, isResourceCreateAdapter as r } from "../resource-save-adapter.js";
|
|
4
|
+
import { SaveDestinationRoot as i } from "../save-destination-root.js";
|
|
5
|
+
import { ResourceSaveVersionError as a, createPublishSavedResource as ee, runResourceSave as te, toSaveDestinationRoot as ne } from "../resource-save.js";
|
|
6
|
+
import { getDependencyOrgUnitNamespaces as re, getOrgUnitNamespace as ie, hasBlockingFolderReference as ae } from "../../org-units/org-unit-guards.js";
|
|
7
|
+
import { OrgUnitNamespace as oe } from "@epam/ai-dial-chat-shared";
|
|
8
|
+
import { useCallback as o, useEffect as s, useMemo as c, useRef as se, useState as l } from "react";
|
|
9
|
+
import { SaveVersionMode as u } from "@epam/ai-dial-publish-panel";
|
|
8
10
|
//#region src/catalog/useResourceSavePanel/useResourceSavePanel.ts
|
|
9
|
-
var
|
|
10
|
-
let
|
|
11
|
-
listFolders:
|
|
12
|
-
isEnabled:
|
|
13
|
-
}), {
|
|
14
|
-
rootKey:
|
|
15
|
-
path:
|
|
16
|
-
}), [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
var d = [], ce = 400, f = ({ isOpen: f, adapter: p, resourceId: m, currentFolderPath: h, currentVersion: g, versionPattern: _, listPersonalFolders: le, organizationFolders: v, publishClient: y, canSaveDirectlyTo: b, getDisabledReason: x, loadDependencies: S, getMissingNamespaces: C, getMissingNamespacesReason: w, dependenciesNote: ue, hasAdminAccess: de, folderReferenceNote: fe, iconNote: pe, getTargetTakenReason: T, labels: E, onSaved: me }) => {
|
|
12
|
+
let D = t({
|
|
13
|
+
listFolders: le,
|
|
14
|
+
isEnabled: f
|
|
15
|
+
}), { checkPublishTarget: O } = y, he = c(() => ee(y), [y]), ge = c(() => ({
|
|
16
|
+
rootKey: i.Personal,
|
|
17
|
+
path: h
|
|
18
|
+
}), [h]), [k, _e] = l(ge), [A, ve] = l(u.Keep), [j, M] = l(""), [N, P] = l(!1), [F, I] = l(), [ye, be] = l(!1), [xe, L] = l(), [Se, Ce] = l(!1), [we, Te] = l(), R = se(/* @__PURE__ */ new Set()), [z, Ee] = l(d), De = ie(p.publishEntityType), B = de != null && De != null && ae(De, z, de), V = o((e) => e.rootKey === i.Organization && p.saveIntoOrgUnit != null && b?.(e.path, i.Organization) === !0, [p.saveIntoOrgUnit, b]), H = o((e) => !B && V(e), [B, V]), Oe = o((e) => {
|
|
19
|
+
Ce(e?.rootKey === i.Organization);
|
|
20
|
+
}, []);
|
|
21
|
+
s(() => {
|
|
22
|
+
f && (Ce(!1), Te(void 0), R.current.clear(), _e(ge), ve(u.Keep), M(""), P(!1), I(void 0), L(void 0));
|
|
23
|
+
}, [f]);
|
|
24
|
+
let ke = se(S);
|
|
25
|
+
s(() => {
|
|
26
|
+
ke.current = S;
|
|
27
|
+
}, [S]);
|
|
28
|
+
let Ae = f && S != null && (k.rootKey === i.Organization || Se);
|
|
29
|
+
s(() => {
|
|
30
|
+
if (Ee(d), !Ae) return;
|
|
31
|
+
let e = !1;
|
|
32
|
+
return (async () => {
|
|
20
33
|
try {
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
} catch {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [S, H]);
|
|
30
|
-
re(() => {
|
|
31
|
-
l && (V.current = void 0, I([]), R(!1), B(!1), E(w), O(c.Keep), ce(""), A(!1), M(void 0), P(void 0));
|
|
32
|
-
}, [l]);
|
|
33
|
-
let U = u.isVersioned && D === c.New, W = k.trim(), G = o(() => {
|
|
34
|
+
let t = await ke.current?.();
|
|
35
|
+
!e && t && Ee(t);
|
|
36
|
+
} catch {}
|
|
37
|
+
})(), () => {
|
|
38
|
+
e = !0;
|
|
39
|
+
};
|
|
40
|
+
}, [Ae]);
|
|
41
|
+
let U = p.isVersioned && A === u.New, W = j.trim(), G = c(() => {
|
|
34
42
|
if (U) {
|
|
35
|
-
if (!
|
|
36
|
-
if (W ===
|
|
37
|
-
if (W ===
|
|
43
|
+
if (!_.test(W)) return a.Invalid;
|
|
44
|
+
if (W === g) return a.Unchanged;
|
|
45
|
+
if (W === F) return a.Exists;
|
|
38
46
|
}
|
|
39
47
|
}, [
|
|
40
48
|
U,
|
|
41
|
-
|
|
49
|
+
_,
|
|
42
50
|
W,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
]), K =
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
g,
|
|
52
|
+
F
|
|
53
|
+
]), je = r(p), K = k.path.join("/"), Me = [...R.current].some((e) => K === e || K.startsWith(`${e}/`)), Ne = _.test(W) && W !== g, q = U ? W : void 0, J = T != null && x != null && O != null && !je && H(k) && !Me && (!U || Ne) ? `${K}\u0000${q ?? ""}` : void 0, Pe = p.publishEntityType;
|
|
54
|
+
s(() => {
|
|
55
|
+
if (J == null || O == null) return;
|
|
56
|
+
let e = !1, t = async () => {
|
|
57
|
+
try {
|
|
58
|
+
let { taken: t } = await O(Pe, m, K, q);
|
|
59
|
+
if (e) return;
|
|
60
|
+
Te((e) => t ? J : e === J ? void 0 : e);
|
|
61
|
+
} catch {}
|
|
62
|
+
}, n = setTimeout(() => void t(), q == null ? 0 : ce);
|
|
63
|
+
return () => {
|
|
64
|
+
e = !0, clearTimeout(n);
|
|
65
|
+
};
|
|
66
|
+
}, [J]);
|
|
67
|
+
let Fe = J != null && we === J, Y = c(() => re(z), [z]), Ie = c(() => {
|
|
68
|
+
if (x) return (e) => {
|
|
69
|
+
let t = ne(e.rootKey);
|
|
70
|
+
if (!t) return;
|
|
71
|
+
let n = x(e.path, t);
|
|
72
|
+
if (n != null) return n;
|
|
73
|
+
let r = e.rootKey === k.rootKey && e.path.join("/") === K;
|
|
74
|
+
if (Fe && r && T) return T(e.path, q);
|
|
75
|
+
if (!C || !w || Y.length === 0 || !H(e)) return;
|
|
76
|
+
let i = C(e.path, Y);
|
|
77
|
+
return i.length > 0 ? w(i) : void 0;
|
|
78
|
+
};
|
|
79
|
+
}, [
|
|
80
|
+
Y,
|
|
81
|
+
k.rootKey,
|
|
82
|
+
x,
|
|
83
|
+
C,
|
|
84
|
+
w,
|
|
85
|
+
T,
|
|
86
|
+
H,
|
|
87
|
+
Fe,
|
|
88
|
+
K,
|
|
89
|
+
q
|
|
90
|
+
]), X = Ie?.(k), Z = H(k), Le = k.rootKey === i.Organization, Re = pe != null && Z && C?.(k.path, [oe.Files]).length ? pe : void 0, ze = B && V(k) ? fe : Re, Be = o((e) => {
|
|
91
|
+
M(e), L(void 0);
|
|
92
|
+
}, []), Ve = o(() => P(!0), []), He = v?.rememberPublishFolder, { saveError: Q } = E, $ = o(async () => {
|
|
93
|
+
if (P(!0), G || X) return;
|
|
94
|
+
be(!0), L(void 0);
|
|
53
95
|
let t = {
|
|
54
|
-
resourceId:
|
|
55
|
-
currentFolderPath:
|
|
56
|
-
currentVersion:
|
|
57
|
-
destination:
|
|
58
|
-
versionMode:
|
|
96
|
+
resourceId: m,
|
|
97
|
+
currentFolderPath: h,
|
|
98
|
+
currentVersion: g,
|
|
99
|
+
destination: k,
|
|
100
|
+
versionMode: A,
|
|
59
101
|
newVersion: W,
|
|
60
|
-
|
|
61
|
-
isDirectWrite: J
|
|
102
|
+
isDirectWrite: Z
|
|
62
103
|
};
|
|
63
104
|
try {
|
|
64
|
-
let e = await te(
|
|
65
|
-
e.isPublished &&
|
|
105
|
+
let e = await te(p, t, he);
|
|
106
|
+
e.isPublished && He?.(k.path), me(e, t);
|
|
66
107
|
} catch (t) {
|
|
67
108
|
if (t instanceof n) {
|
|
68
|
-
|
|
109
|
+
L(t.message);
|
|
69
110
|
return;
|
|
70
111
|
}
|
|
71
112
|
let { message: r, status: i } = await e(t);
|
|
72
113
|
if (U && i === 409) {
|
|
73
|
-
|
|
114
|
+
I(W);
|
|
74
115
|
return;
|
|
75
116
|
}
|
|
76
|
-
|
|
117
|
+
L(r ?? Q);
|
|
77
118
|
} finally {
|
|
78
|
-
|
|
119
|
+
be(!1);
|
|
79
120
|
}
|
|
80
121
|
}, [
|
|
81
|
-
u,
|
|
82
|
-
f,
|
|
83
122
|
p,
|
|
84
|
-
|
|
123
|
+
h,
|
|
124
|
+
g,
|
|
125
|
+
k,
|
|
85
126
|
U,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
q,
|
|
89
|
-
b,
|
|
90
|
-
C,
|
|
127
|
+
Z,
|
|
128
|
+
X,
|
|
91
129
|
me,
|
|
92
|
-
d,
|
|
93
|
-
F,
|
|
94
130
|
he,
|
|
131
|
+
He,
|
|
132
|
+
m,
|
|
133
|
+
Q,
|
|
95
134
|
W,
|
|
96
|
-
|
|
135
|
+
A,
|
|
97
136
|
G
|
|
98
|
-
]),
|
|
137
|
+
]), Ue = o(() => void $(), [$]), { personalRoot: We, organizationRoot: Ge } = E, Ke = c(() => {
|
|
99
138
|
let e = {
|
|
100
|
-
key:
|
|
101
|
-
label:
|
|
102
|
-
items:
|
|
103
|
-
expandedPaths:
|
|
104
|
-
onExpandedPathsChange:
|
|
105
|
-
loadingPaths:
|
|
139
|
+
key: i.Personal,
|
|
140
|
+
label: We,
|
|
141
|
+
items: D.folderItems,
|
|
142
|
+
expandedPaths: D.expandedPaths,
|
|
143
|
+
onExpandedPathsChange: D.onExpandedPathsChange,
|
|
144
|
+
loadingPaths: D.loadingPaths
|
|
106
145
|
};
|
|
107
|
-
return
|
|
108
|
-
key:
|
|
109
|
-
label:
|
|
110
|
-
items:
|
|
111
|
-
expandedPaths:
|
|
112
|
-
onExpandedPathsChange:
|
|
113
|
-
loadingPaths:
|
|
114
|
-
hasAccessRules: !0
|
|
146
|
+
return v ? [e, {
|
|
147
|
+
key: i.Organization,
|
|
148
|
+
label: Ge,
|
|
149
|
+
items: v.folderItems,
|
|
150
|
+
expandedPaths: v.expandedPaths,
|
|
151
|
+
onExpandedPathsChange: v.onExpandedPathsChange,
|
|
152
|
+
loadingPaths: v.loadingPaths
|
|
115
153
|
}] : [e];
|
|
116
154
|
}, [
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
]), { onCreateFolder:
|
|
125
|
-
e ===
|
|
126
|
-
}, [
|
|
127
|
-
versionMode:
|
|
128
|
-
onVersionModeChange:
|
|
129
|
-
currentVersion:
|
|
130
|
-
newVersion:
|
|
131
|
-
onNewVersionChange:
|
|
132
|
-
onNewVersionBlur:
|
|
133
|
-
newVersionError:
|
|
155
|
+
v,
|
|
156
|
+
Ge,
|
|
157
|
+
D.expandedPaths,
|
|
158
|
+
D.folderItems,
|
|
159
|
+
D.loadingPaths,
|
|
160
|
+
D.onExpandedPathsChange,
|
|
161
|
+
We
|
|
162
|
+
]), { onCreateFolder: qe } = D, Je = v?.onCreatePublishFolder, Ye = o(async (e, t, n) => {
|
|
163
|
+
e === i.Organization ? (R.current.add([...t, n].join("/")), await Je?.(t, n)) : await qe(t, n);
|
|
164
|
+
}, [qe, Je]), { getVersionError: Xe } = E, Ze = c(() => p.isVersioned && g != null ? {
|
|
165
|
+
versionMode: A,
|
|
166
|
+
onVersionModeChange: ve,
|
|
167
|
+
currentVersion: g,
|
|
168
|
+
newVersion: j,
|
|
169
|
+
onNewVersionChange: Be,
|
|
170
|
+
onNewVersionBlur: Ve,
|
|
171
|
+
newVersionError: N && G ? Xe(G, W) : void 0
|
|
134
172
|
} : void 0, [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
173
|
+
p.isVersioned,
|
|
174
|
+
g,
|
|
175
|
+
Xe,
|
|
176
|
+
N,
|
|
177
|
+
Ve,
|
|
178
|
+
j,
|
|
179
|
+
Be,
|
|
142
180
|
W,
|
|
143
181
|
G,
|
|
144
|
-
|
|
145
|
-
]), { accessRules: $ } = y, we = o(() => ({
|
|
146
|
-
rules: F,
|
|
147
|
-
onRulesChange: I,
|
|
148
|
-
sourceOptions: v,
|
|
149
|
-
isLoading: L,
|
|
150
|
-
hasLoadError: z,
|
|
151
|
-
labels: $,
|
|
152
|
-
isHiddenFor: H
|
|
153
|
-
}), [
|
|
154
|
-
$,
|
|
155
|
-
z,
|
|
156
|
-
H,
|
|
157
|
-
L,
|
|
158
|
-
v,
|
|
159
|
-
F
|
|
182
|
+
A
|
|
160
183
|
]);
|
|
161
184
|
return {
|
|
162
185
|
panelProps: {
|
|
163
|
-
onSubmit:
|
|
164
|
-
isSubmitDisabled: U && !!G ||
|
|
165
|
-
isSubmitting:
|
|
166
|
-
submitError:
|
|
167
|
-
roots:
|
|
168
|
-
destination:
|
|
169
|
-
onDestinationChange:
|
|
170
|
-
onCreateFolder:
|
|
171
|
-
getDisabledReason:
|
|
172
|
-
version:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
186
|
+
onSubmit: Ue,
|
|
187
|
+
isSubmitDisabled: U && !!G || X != null,
|
|
188
|
+
isSubmitting: ye,
|
|
189
|
+
submitError: xe,
|
|
190
|
+
roots: Ke,
|
|
191
|
+
destination: k,
|
|
192
|
+
onDestinationChange: _e,
|
|
193
|
+
onCreateFolder: Ye,
|
|
194
|
+
getDisabledReason: Ie,
|
|
195
|
+
version: Ze,
|
|
196
|
+
onPendingDestinationChange: Oe,
|
|
197
|
+
foldersError: D.hasError ? E.foldersLoadError : void 0,
|
|
198
|
+
onRetryFolders: D.retry,
|
|
199
|
+
dependencies: Le ? z : d,
|
|
200
|
+
dependenciesNote: Le ? ue : void 0,
|
|
201
|
+
destinationNote: ze
|
|
177
202
|
},
|
|
178
|
-
submit:
|
|
203
|
+
submit: $
|
|
179
204
|
};
|
|
180
205
|
};
|
|
181
206
|
//#endregion
|
|
182
|
-
export {
|
|
207
|
+
export { f as useResourceSavePanel };
|
package/catalog.js
CHANGED
|
@@ -1,49 +1,51 @@
|
|
|
1
|
-
import { createPublishApiClient as e
|
|
2
|
-
import { buildChatCompletionsUrl as
|
|
3
|
-
import { createDeploymentLookup as
|
|
4
|
-
import { AuthenticationType as
|
|
5
|
-
import { buildResetFields as
|
|
6
|
-
import { mapDeploymentLimitsDtoToCatalogLimits as
|
|
7
|
-
import { DEFAULT_ENTITY_DETAILS_LABELS as
|
|
8
|
-
import { mapDeploymentToCatalogItem as
|
|
9
|
-
import { buildPromptOverview as
|
|
10
|
-
import {
|
|
11
|
-
import { buildSkillContentTree as
|
|
12
|
-
import { McpResourceKind as
|
|
13
|
-
import { getPublicCatalogEntityFolderPath as
|
|
14
|
-
import { createPublishDependencyIconResolver as
|
|
15
|
-
import { usePublishHistory as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
|
|
1
|
+
import { createPublishApiClient as e } from "./catalog/create-publish-api.js";
|
|
2
|
+
import { buildChatCompletionsUrl as t, buildDeploymentConnectApi as n, buildResponsesUrl as r } from "./catalog/deployment-endpoint-url.js";
|
|
3
|
+
import { createDeploymentLookup as i, decodeDeploymentId as a, encodeDeploymentId as o, findDeploymentByIdOrReference as s, normalizeDeploymentId as c } from "./catalog/deployment-id.js";
|
|
4
|
+
import { AuthenticationType as l } from "./catalog/entity-details.js";
|
|
5
|
+
import { buildResetFields as u, mapDeploymentLimitsToInput as d } from "./catalog/map-deployment-limits-to-input.js";
|
|
6
|
+
import { mapDeploymentLimitsDtoToCatalogLimits as f } from "./catalog/map-deployment-limits-to-catalog.js";
|
|
7
|
+
import { DEFAULT_ENTITY_DETAILS_LABELS as p, mapDeploymentDetailsDtoToEntityDetails as m, mapEntityDetailsToCatalogDetails as h, mapToolsetCredentials as g } from "./catalog/map-entity-details-to-catalog.js";
|
|
8
|
+
import { mapDeploymentToCatalogItem as _, mapDeploymentToolsetCredentials as v, mapToolsetToCatalogItem as y, resolveDeploymentFolder as b, supportsChatInterface as x } from "./catalog/map-deployment-to-catalog-item.js";
|
|
9
|
+
import { buildPromptOverview as S, isOrganisationPromptItem as C, mapPromptToCatalogItem as w } from "./catalog/map-prompt-to-catalog-item.js";
|
|
10
|
+
import { SKILL_LISTING_MAX_PAGES as T, SKILL_LISTING_PAGE_SIZE as E, SKILL_MANIFEST_MAX_BYTES as D, SkillSource as O, parseSkillResourceUrl as k } from "./skill/skill-types.js";
|
|
11
|
+
import { buildSkillContentTree as A, buildSkillOverview as j, mapSkillToCatalogItem as M, readSkillFileBytes as N, readSkillFilePreviewBytes as P, readSkillManifest as F, resolveSkillFileDownloadPath as I, resolveSkillManifestFileId as L } from "./catalog/map-skill-to-catalog-item.js";
|
|
12
|
+
import { McpResourceKind as R, buildApplicationMcpUrl as z, buildConnectApi as B, buildToolsetMcpUrl as V, resolveMcpResourceKind as H } from "./catalog/mcp-endpoint-url.js";
|
|
13
|
+
import { getPublicCatalogEntityFolderPath as U, isPublicCatalogEntityId as W, isVersionedCatalogEntityType as G, mapPublishConversationResultDto as K, mapPublishHistoryEntryDto as q, mapResourceDependencyDto as J, toPublishEntityType as Y } from "./catalog/publish.js";
|
|
14
|
+
import { createPublishDependencyIconResolver as X } from "./catalog/publish-dependency-icons.js";
|
|
15
|
+
import { usePublishHistory as Z } from "./catalog/use-publish-history.js";
|
|
16
|
+
import { PublishTargetTakenError as Q, isPublishInProgressDetails as $, isPublishTargetTakenResponse as ee, wrapPublishTargetTaken as te } from "./catalog/publish-target-taken.js";
|
|
17
|
+
import { usePublishTargetGuard as ne } from "./catalog/use-publish-target-guard.js";
|
|
18
|
+
import { usePublishDependencies as re } from "./catalog/use-publish-dependencies.js";
|
|
19
|
+
import { resolveUnpublishableFolders as ie } from "./catalog/unpublishable-folders.js";
|
|
20
|
+
import { useUnpublishableFolders as ae } from "./catalog/useUnpublishableFolders/useUnpublishableFolders.js";
|
|
21
|
+
import { useUnpublishConfirmation as oe } from "./catalog/useUnpublishConfirmation/useUnpublishConfirmation.js";
|
|
22
|
+
import { canEditShareAccess as se, deriveAvailableTabIds as ce, deriveFavoriteItems as le, filterCatalogItemsBySelector as ue, filterHiddenOwnedItems as de, reconcileFilterTopics as fe } from "./catalog/catalog-derivations.js";
|
|
23
|
+
import { CatalogEntityKind as pe, findSchemaDisplayName as me, resolveCatalogEntityKind as he } from "./catalog/catalog-entity-kind.js";
|
|
24
|
+
import { FavoriteEntityType as ge, useFavoriteEntitiesState as _e } from "./catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js";
|
|
25
|
+
import { resolveFavoriteEntityType as ve } from "./catalog/favorite-entity-type.js";
|
|
26
|
+
import { parseCatalogFilterTopics as ye, resolveCatalogActiveTab as be, resolveCatalogSortKey as xe } from "./catalog/catalog-preferences.js";
|
|
27
|
+
import { findWorstCappedRow as Se } from "./catalog/usage-limit-rows.js";
|
|
28
|
+
import { CatalogPrimaryActionType as Ce, resolveCatalogPrimaryAction as we } from "./catalog/catalog-primary-action.js";
|
|
29
|
+
import { useCatalogItemDelete as Te } from "./catalog/useCatalogItemDelete/useCatalogItemDelete.js";
|
|
30
|
+
import { useCatalogEditNavigation as Ee } from "./catalog/useCatalogEditNavigation/useCatalogEditNavigation.js";
|
|
31
|
+
import { useSkillItemDetails as De } from "./catalog/useSkillItemDetails.js";
|
|
32
|
+
import { useCatalogItemDetails as Oe } from "./catalog/useCatalogItemDetails.js";
|
|
33
|
+
import { useCatalogToolsetCredentials as ke } from "./catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js";
|
|
34
|
+
import { buildApplicationCredentialLoginParams as Ae, mapApplicationCredentials as je } from "./catalog/application-credentials.js";
|
|
35
|
+
import { useApplicationCredentials as Me } from "./catalog/useApplicationCredentials/useApplicationCredentials.js";
|
|
36
|
+
import { DEFAULT_APPLICATION_CREDENTIAL_ACTIONS_LABELS as Ne, useApplicationCredentialActions as Pe } from "./catalog/useApplicationCredentialActions/useApplicationCredentialActions.js";
|
|
37
|
+
import { useSkillDetailsPanelData as Fe } from "./catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js";
|
|
38
|
+
import { hasPublishFolderWriteAccess as Ie, rememberPublishFolderKey as Le, usePublishFolders as Re } from "./catalog/usePublishFolders/usePublishFolders.js";
|
|
39
|
+
import { useResourceFolders as ze } from "./catalog/useResourceFolders/useResourceFolders.js";
|
|
40
|
+
import { parseResourceFolderPath as Be } from "./catalog/resource-folder.js";
|
|
41
|
+
import { ResourceSaveError as Ve, isResourceCreateAdapter as He } from "./catalog/resource-save-adapter.js";
|
|
42
|
+
import { ResourceNameConflictKind as Ue, getResourceNameConflictKind as We, withResourceNameConflictMessages as Ge } from "./catalog/resource-name-conflict.js";
|
|
43
|
+
import { SaveDestinationRoot as Ke } from "./catalog/save-destination-root.js";
|
|
44
|
+
import { ResourceSaveOutcome as qe, ResourceSaveVersionError as Je, createPublishSavedResource as Ye, runResourceSave as Xe, toSaveDestinationRoot as Ze } from "./catalog/resource-save.js";
|
|
45
|
+
import { createEmbeddedApplicationSaveAdapter as Qe, createHostApplicationSaveAdapter as $e, createOrgUnitWriter as et, createPromptCreateAdapter as tt, createPromptFolderLister as nt, createPromptSaveAdapter as rt, createSkillFolderLister as it, createToolsetCreateAdapter as at, createToolsetSaveAdapter as ot } from "./catalog/resource-save-adapters.js";
|
|
46
|
+
import { useResourceSavePanel as st } from "./catalog/useResourceSavePanel/useResourceSavePanel.js";
|
|
47
|
+
import { buildVersionHistoryRows as ct, selectOtherVersions as lt } from "./catalog/version-history.js";
|
|
48
|
+
import { useVersionHistory as ut } from "./catalog/useVersionHistory/useVersionHistory.js";
|
|
49
|
+
import { useVersionHistorySection as dt } from "./catalog/useVersionHistory/useVersionHistorySection.js";
|
|
50
|
+
import { SkillPreviewErrorKind as ft, useSkillFilePreview as pt } from "./skill/useSkillFilePreview.js";
|
|
51
|
+
export { l as AuthenticationType, pe as CatalogEntityKind, Ce as CatalogPrimaryActionType, Ne as DEFAULT_APPLICATION_CREDENTIAL_ACTIONS_LABELS, p as DEFAULT_ENTITY_DETAILS_LABELS, ge as FavoriteEntityType, R as McpResourceKind, Q as PublishTargetTakenError, Ue as ResourceNameConflictKind, Ve as ResourceSaveError, qe as ResourceSaveOutcome, Je as ResourceSaveVersionError, T as SKILL_LISTING_MAX_PAGES, E as SKILL_LISTING_PAGE_SIZE, D as SKILL_MANIFEST_MAX_BYTES, Ke as SaveDestinationRoot, ft as SkillPreviewErrorKind, O as SkillSource, Ae as buildApplicationCredentialLoginParams, z as buildApplicationMcpUrl, t as buildChatCompletionsUrl, B as buildConnectApi, n as buildDeploymentConnectApi, S as buildPromptOverview, u as buildResetFields, r as buildResponsesUrl, A as buildSkillContentTree, j as buildSkillOverview, V as buildToolsetMcpUrl, ct as buildVersionHistoryRows, se as canEditShareAccess, i as createDeploymentLookup, Qe as createEmbeddedApplicationSaveAdapter, $e as createHostApplicationSaveAdapter, et as createOrgUnitWriter, tt as createPromptCreateAdapter, nt as createPromptFolderLister, rt as createPromptSaveAdapter, e as createPublishApiClient, X as createPublishDependencyIconResolver, Ye as createPublishSavedResource, it as createSkillFolderLister, at as createToolsetCreateAdapter, ot as createToolsetSaveAdapter, a as decodeDeploymentId, ce as deriveAvailableTabIds, le as deriveFavoriteItems, o as encodeDeploymentId, ue as filterCatalogItemsBySelector, de as filterHiddenOwnedItems, s as findDeploymentByIdOrReference, me as findSchemaDisplayName, Se as findWorstCappedRow, U as getPublicCatalogEntityFolderPath, We as getResourceNameConflictKind, Ie as hasPublishFolderWriteAccess, C as isOrganisationPromptItem, W as isPublicCatalogEntityId, $ as isPublishInProgressDetails, ee as isPublishTargetTakenResponse, He as isResourceCreateAdapter, G as isVersionedCatalogEntityType, je as mapApplicationCredentials, m as mapDeploymentDetailsDtoToEntityDetails, f as mapDeploymentLimitsDtoToCatalogLimits, d as mapDeploymentLimitsToInput, _ as mapDeploymentToCatalogItem, v as mapDeploymentToolsetCredentials, h as mapEntityDetailsToCatalogDetails, w as mapPromptToCatalogItem, K as mapPublishConversationResultDto, q as mapPublishHistoryEntryDto, J as mapResourceDependencyDto, M as mapSkillToCatalogItem, g as mapToolsetCredentials, y as mapToolsetToCatalogItem, c as normalizeDeploymentId, ye as parseCatalogFilterTopics, Be as parseResourceFolderPath, k as parseSkillResourceUrl, N as readSkillFileBytes, P as readSkillFilePreviewBytes, F as readSkillManifest, fe as reconcileFilterTopics, Le as rememberPublishFolderKey, be as resolveCatalogActiveTab, he as resolveCatalogEntityKind, we as resolveCatalogPrimaryAction, xe as resolveCatalogSortKey, b as resolveDeploymentFolder, ve as resolveFavoriteEntityType, H as resolveMcpResourceKind, I as resolveSkillFileDownloadPath, L as resolveSkillManifestFileId, ie as resolveUnpublishableFolders, Xe as runResourceSave, lt as selectOtherVersions, x as supportsChatInterface, Y as toPublishEntityType, Ze as toSaveDestinationRoot, Pe as useApplicationCredentialActions, Me as useApplicationCredentials, Ee as useCatalogEditNavigation, Te as useCatalogItemDelete, Oe as useCatalogItemDetails, ke as useCatalogToolsetCredentials, _e as useFavoriteEntitiesState, re as usePublishDependencies, Re as usePublishFolders, Z as usePublishHistory, ne as usePublishTargetGuard, ze as useResourceFolders, st as useResourceSavePanel, Fe as useSkillDetailsPanelData, pt as useSkillFilePreview, De as useSkillItemDetails, oe as useUnpublishConfirmation, ae as useUnpublishableFolders, ut as useVersionHistory, dt as useVersionHistorySection, Ge as withResourceNameConflictMessages, te as wrapPublishTargetTaken };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import { ConversationDeletionResultDto } from '@epam/ai-dial-chat-api-client';
|
|
1
|
+
import { ConversationDeletionResultDto, ConversationListItemDto, ConversationResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Returns the list endpoint's id (`conversations/<bucket>/<encoded path>`) for a decoded `<bucket>/<path>` conversation id. */
|
|
3
|
+
export declare const toConversationListId: (conversationId: string) => string;
|
|
4
|
+
/** Returns whether a decoded `<bucket>/<path>` conversation id lives in `bucket`. */
|
|
5
|
+
export declare const isConversationInBucket: (conversationId: string, bucket: string | undefined) => boolean;
|
|
6
|
+
/** Returns the list row for a conversation in the user's own bucket, titled `title`. */
|
|
7
|
+
export declare const toOwnConversationListItem: (conversationId: string, conversation: Pick<ConversationResponseDto, "updatedAt">, title: string) => ConversationListItemDto;
|
|
2
8
|
/** Returns `true` when a delete-all request removed nothing: some conversations failed and none was deleted or already gone. */
|
|
3
9
|
export declare const isTotalDeletionFailure: (result: Pick<ConversationDeletionResultDto, "failed" | "deleted" | "alreadyAbsent">) => boolean;
|
|
4
10
|
/** Returns the pin state a dragged conversation takes in its target group: `true` to pin, `false` to unpin, `undefined` to leave it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-list.d.ts","sourceRoot":"","sources":["../../src/conversation/conversation-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"conversation-list.d.ts","sourceRoot":"","sources":["../../src/conversation/conversation-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,+BAA+B,CAAC;AAGvC,gIAAgI;AAChI,eAAO,MAAM,oBAAoB,GAAI,gBAAgB,MAAM,KAAG,MAI9C,CAAC;AAEjB,qFAAqF;AACrF,eAAO,MAAM,sBAAsB,GACjC,gBAAgB,MAAM,EACtB,QAAQ,MAAM,GAAG,SAAS,KACzB,OAA8D,CAAC;AAElE,wFAAwF;AACxF,eAAO,MAAM,yBAAyB,GACpC,gBAAgB,MAAM,EACtB,cAAc,IAAI,CAAC,uBAAuB,EAAE,WAAW,CAAC,EACxD,OAAO,MAAM,KACZ,uBASD,CAAC;AAEH,gIAAgI;AAChI,eAAO,MAAM,sBAAsB,GACjC,QAAQ,IAAI,CACV,6BAA6B,EAC7B,QAAQ,GAAG,SAAS,GAAG,eAAe,CACvC,KACA,OAGyB,CAAC;AAE7B,wIAAwI;AACxI,eAAO,MAAM,4BAA4B,GACvC,gBAAgB,MAAM,EACtB,UAAU,OAAO,GAAG,SAAS,KAC5B,OAAO,GAAG,SAIZ,CAAC"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { FilterTab as e } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
//#region src/conversation/conversation-list.ts
|
|
3
|
-
var t = (e) => e.
|
|
3
|
+
var t = (e) => `conversations/${e.split("/").map((e) => encodeURIComponent(e)).join("/")}`, n = (e, t) => !!t && e.startsWith(`${t}/`), r = (e, n, r) => ({
|
|
4
|
+
id: t(e),
|
|
5
|
+
title: r,
|
|
6
|
+
updatedAt: n.updatedAt || Date.now(),
|
|
7
|
+
sharedWithMe: !1,
|
|
8
|
+
publishedWithMe: !1,
|
|
9
|
+
isPinned: !1,
|
|
10
|
+
isReadonly: !1,
|
|
11
|
+
isScheduledTask: !1
|
|
12
|
+
}), i = (e) => e.failed.length > 0 && e.deleted === 0 && e.alreadyAbsent === 0, a = (t, n) => t === e.Pinned || !n && void 0;
|
|
4
13
|
//#endregion
|
|
5
|
-
export {
|
|
14
|
+
export { n as isConversationInBucket, i as isTotalDeletionFailure, a as resolveConversationPinChange, t as toConversationListId, r as toOwnConversationListItem };
|