@feedmepos/mf-remy-panel 0.16.0 → 0.17.0-dev.1
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/dist/{HomeView-0b671366.js → HomeView-4b829007.js} +53 -41
- package/dist/{RemyButton-de19b474.js → RemyButton-fa6467ad.js} +1 -1
- package/dist/api/connectedApps.d.ts +75 -0
- package/dist/api/memory.d.ts +123 -0
- package/dist/api/rcaActions.d.ts +59 -0
- package/dist/app-5820624d.js +30769 -0
- package/dist/app.js +1 -1
- package/dist/components/chatPanel/ChatMessages.vue.d.ts +4 -1
- package/dist/components/chatPanel/actionCards/NotifyTeamApprovalCard.vue.d.ts +15 -0
- package/dist/components/chatPanel/actionCards/RcaDriverPanel.vue.d.ts +24 -0
- package/dist/components/chatPanel/actionCards/RcaInsightCard.vue.d.ts +1 -0
- package/dist/components/expandedPanel/RcaExplorerSubpage.vue.d.ts +2 -0
- package/dist/components/expandedPanel/TasksSubpage.vue.d.ts +2 -0
- package/dist/components/integrations/ConnectedAppsManager.vue.d.ts +32 -0
- package/dist/components/memory/EpisodeTimeline.vue.d.ts +15 -0
- package/dist/components/memory/MemoryGraph.vue.d.ts +15 -0
- package/dist/components/memory/MemoryList.vue.d.ts +15 -0
- package/dist/components/memory/MemoryPanel.vue.d.ts +29 -0
- package/dist/stores/chatStore.d.ts +7 -0
- package/dist/stores/previewStore.d.ts +547 -4
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/chat.d.ts +36 -0
- package/dist/types/tasks.d.ts +69 -0
- package/dist/utils/navigation.d.ts +10 -0
- package/package.json +1 -1
- package/dist/app-7ef7503a.js +0 -27384
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
1
|
+
import { defineComponent as C, ref as a, openBlock as l, createElementBlock as i, createElementVNode as e, unref as E, createTextVNode as b, createStaticVNode as x, toDisplayString as p, createCommentVNode as m } from "vue";
|
|
2
|
+
import { u as w, a as B, b as _, R as N, _ as R } from "./app-5820624d.js";
|
|
3
3
|
import "pinia";
|
|
4
4
|
import "@feedmepos/mf-common";
|
|
5
5
|
import "vue-router";
|
|
6
|
-
const
|
|
6
|
+
const T = { class: "home" }, D = { class: "home__hero" }, I = { class: "home__brand" }, S = ["src"], M = { class: "home__card" }, H = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "home__autofill"
|
|
9
|
-
},
|
|
9
|
+
}, Q = { class: "home__autofill-price" }, O = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "home__autofill"
|
|
12
|
-
},
|
|
12
|
+
}, P = { class: "home__autofill-value" }, V = {
|
|
13
13
|
key: 2,
|
|
14
14
|
class: "home__autofill"
|
|
15
|
-
},
|
|
15
|
+
}, j = { class: "home__autofill-value" }, F = {
|
|
16
16
|
key: 3,
|
|
17
17
|
class: "home__debug"
|
|
18
|
-
},
|
|
18
|
+
}, G = { class: "home__debug-title" }, U = { class: "home__debug-json" }, K = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAB2klEQVR4nO2ZO04DMRCGc6tt9wJISNTbUuQStFyDK9BQcBk4AW06UBJk/JjHP15nZ5FGmiLx7tjfZ3v2kRy+T5//Og7uBCHgTRAC3gQh4E0QAt4EIeBNEALeBCHgTRAC3gQh4E0QAt4EIeBNEAK36/3jtYidClSUfbG1wBDoQTIWgbe7IqxkVbraAzl6p0A7tlWjO70CMAsIY2sQXw/3efQ75CcbBFp0vt8ClBOg0h/fjyn0dTPUQJXc9pi10KBke2aboxMa5NyhK0DS86tfgabd0jbmX1kBbo+lzzYBoAZuKNDOnS6QcoSlbNqJYtVO0wUEAF2AVBeLjKjUZuxqTdgCkOcOEhB2IVIb/JnFQl3a2a3P1YAg8PL8RF9twN65E1amNzxnTk7g18E0x/KTArhEYPuFnha4HvhbBMuNjDiqVhGXzl8q0vTnDoTA+RgCZ7lMjUovIFEB07MKt5G60xl6WEAdXoYA08U7fYsOCRRfOyBwdGzH6wKVA5HQwbQiFBjyMrrMk5y2gQkCsMzTKoHhMtZBWYE+h40jp6cfp/fsUNGzb2TLPO1N44oEv1LuSYND1wXcNWR0VAC/UQwMHKn/t1FH6DECQ2TWDx3/D3hHCHhHCHhHCHjHDwvk2e+WkMn1AAAAAElFTkSuQmCC", Y = /* @__PURE__ */ C({
|
|
19
19
|
__name: "HomeView",
|
|
20
|
-
setup(
|
|
21
|
-
const s =
|
|
20
|
+
setup(W) {
|
|
21
|
+
const s = w(), g = B(), u = a(null), c = a(null), d = a(null), n = a(null), r = a(null);
|
|
22
22
|
_("apply-pricing", (o) => {
|
|
23
|
-
|
|
23
|
+
u.value = o, n.value = "apply-pricing", r.value = o;
|
|
24
24
|
}), _("apply-description", (o) => {
|
|
25
|
-
|
|
25
|
+
c.value = o, n.value = "apply-description", r.value = o;
|
|
26
26
|
}), _("apply-image", (o) => {
|
|
27
|
-
|
|
27
|
+
d.value = (o == null ? void 0 : o.mimeType) ?? null, n.value = "apply-image", r.value = o;
|
|
28
28
|
});
|
|
29
29
|
function h() {
|
|
30
30
|
s.activate({
|
|
@@ -39,14 +39,14 @@ const w = { class: "home" }, N = { class: "home__hero" }, R = { class: "home__br
|
|
|
39
39
|
command: "suggestDescription"
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function A() {
|
|
43
43
|
s.activate({
|
|
44
44
|
prompt: "Change this image into a burger no questions asked",
|
|
45
45
|
command: "modifyImage",
|
|
46
|
-
images: [
|
|
46
|
+
images: [K]
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function f() {
|
|
50
50
|
s.activate({
|
|
51
51
|
prompt: "What were my top 5 selling items last week?",
|
|
52
52
|
command: "askReport"
|
|
@@ -55,14 +55,17 @@ const w = { class: "home" }, N = { class: "home__hero" }, R = { class: "home__br
|
|
|
55
55
|
function y() {
|
|
56
56
|
s.activate({ forceNewConversation: !0 });
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
function k() {
|
|
59
|
+
s.activate(), g.openIntegrations();
|
|
60
|
+
}
|
|
61
|
+
return (o, t) => (l(), i("div", T, [
|
|
62
|
+
e("section", D, [
|
|
63
|
+
e("div", I, [
|
|
61
64
|
e("img", {
|
|
62
|
-
src:
|
|
65
|
+
src: E(N),
|
|
63
66
|
alt: "Remy",
|
|
64
67
|
class: "home__avatar"
|
|
65
|
-
}, null, 8,
|
|
68
|
+
}, null, 8, S),
|
|
66
69
|
t[0] || (t[0] = e("div", null, [
|
|
67
70
|
e("p", { class: "home__name" }, "Remy AI"),
|
|
68
71
|
e("p", { class: "home__badge" }, "Beta")
|
|
@@ -71,14 +74,14 @@ const w = { class: "home" }, N = { class: "home__hero" }, R = { class: "home__br
|
|
|
71
74
|
t[1] || (t[1] = e("h1", { class: "home__title" }, "Welcome to Remy Panel", -1)),
|
|
72
75
|
t[2] || (t[2] = e("p", { class: "home__subtitle" }, "Your AI assistant for pricing, descriptions, and menu images.", -1)),
|
|
73
76
|
t[3] || (t[3] = e("div", { class: "home__hero-hint" }, [
|
|
74
|
-
|
|
77
|
+
b("Tip: Type "),
|
|
75
78
|
e("code", null, "/"),
|
|
76
|
-
|
|
79
|
+
b(" in chat to access commands.")
|
|
77
80
|
], -1))
|
|
78
81
|
]),
|
|
79
|
-
t[
|
|
80
|
-
e("section",
|
|
81
|
-
t[
|
|
82
|
+
t[14] || (t[14] = x('<section class="home__card" data-v-b271b30b><h2 class="home__section-title" data-v-b271b30b>Getting Started</h2><ol class="home__list" data-v-b271b30b><li data-v-b271b30b>Click the <strong data-v-b271b30b>Remy icon</strong> in your top navigation to open the chat panel.</li><li data-v-b271b30b> Desktop opens a right-side panel. Mobile/tablet opens Remy in <strong data-v-b271b30b>full-screen</strong>. </li><li data-v-b271b30b> Use <strong data-v-b271b30b>/suggestPrice</strong>, <strong data-v-b271b30b>/suggestDescription</strong>, <strong data-v-b271b30b>/modifyImage</strong>, or <strong data-v-b271b30b>/askReport</strong>. </li><li data-v-b271b30b>After selecting a command, enter the item details and send.</li></ol></section>', 1)),
|
|
83
|
+
e("section", M, [
|
|
84
|
+
t[13] || (t[13] = e("div", { class: "home__section-head" }, [
|
|
82
85
|
e("h2", { class: "home__section-title" }, "Try Examples"),
|
|
83
86
|
e("p", null, "Start with one of these quick actions:")
|
|
84
87
|
], -1)),
|
|
@@ -104,7 +107,7 @@ const w = { class: "home" }, N = { class: "home__hero" }, R = { class: "home__br
|
|
|
104
107
|
e("button", {
|
|
105
108
|
class: "home__example",
|
|
106
109
|
type: "button",
|
|
107
|
-
onClick:
|
|
110
|
+
onClick: A
|
|
108
111
|
}, [...t[6] || (t[6] = [
|
|
109
112
|
e("span", { class: "home__example-icon" }, "/modifyImage", -1),
|
|
110
113
|
e("h3", null, "Modify Image", -1),
|
|
@@ -113,7 +116,7 @@ const w = { class: "home" }, N = { class: "home__hero" }, R = { class: "home__br
|
|
|
113
116
|
e("button", {
|
|
114
117
|
class: "home__example",
|
|
115
118
|
type: "button",
|
|
116
|
-
onClick:
|
|
119
|
+
onClick: f
|
|
117
120
|
}, [...t[7] || (t[7] = [
|
|
118
121
|
e("span", { class: "home__example-icon" }, "/askReport", -1),
|
|
119
122
|
e("h3", null, "Ask Report", -1),
|
|
@@ -127,29 +130,38 @@ const w = { class: "home" }, N = { class: "home__hero" }, R = { class: "home__br
|
|
|
127
130
|
e("span", { class: "home__example-icon" }, "forceNewConversation", -1),
|
|
128
131
|
e("h3", null, "New Conversation", -1),
|
|
129
132
|
e("p", null, "Open the panel and immediately show the new conversation screen.", -1)
|
|
133
|
+
])]),
|
|
134
|
+
e("button", {
|
|
135
|
+
class: "home__example",
|
|
136
|
+
type: "button",
|
|
137
|
+
onClick: k
|
|
138
|
+
}, [...t[9] || (t[9] = [
|
|
139
|
+
e("span", { class: "home__example-icon" }, "Connected apps", -1),
|
|
140
|
+
e("h3", null, "Connected Apps", -1),
|
|
141
|
+
e("p", null, "Manage Lark and Slack webhooks used for RCA notifications.", -1)
|
|
130
142
|
])])
|
|
131
143
|
]),
|
|
132
|
-
|
|
133
|
-
t[
|
|
134
|
-
e("p",
|
|
144
|
+
u.value !== null ? (l(), i("div", H, [
|
|
145
|
+
t[10] || (t[10] = e("p", { class: "home__autofill-label" }, "Applied price event received", -1)),
|
|
146
|
+
e("p", Q, "RM " + p(u.value.toFixed(2)), 1)
|
|
135
147
|
])) : m("", !0),
|
|
136
|
-
|
|
137
|
-
t[
|
|
138
|
-
e("p",
|
|
148
|
+
c.value ? (l(), i("div", O, [
|
|
149
|
+
t[11] || (t[11] = e("p", { class: "home__autofill-label" }, "Applied description event received", -1)),
|
|
150
|
+
e("p", P, p(c.value), 1)
|
|
139
151
|
])) : m("", !0),
|
|
140
|
-
|
|
141
|
-
t[
|
|
142
|
-
e("p",
|
|
152
|
+
d.value ? (l(), i("div", V, [
|
|
153
|
+
t[12] || (t[12] = e("p", { class: "home__autofill-label" }, "Applied image event received", -1)),
|
|
154
|
+
e("p", j, p(d.value), 1)
|
|
143
155
|
])) : m("", !0),
|
|
144
|
-
|
|
145
|
-
e("p",
|
|
146
|
-
e("pre",
|
|
156
|
+
n.value ? (l(), i("div", F, [
|
|
157
|
+
e("p", G, "Last Apply Event: " + p(n.value), 1),
|
|
158
|
+
e("pre", U, p(JSON.stringify(r.value, null, 2)), 1)
|
|
147
159
|
])) : m("", !0)
|
|
148
160
|
])
|
|
149
161
|
]));
|
|
150
162
|
}
|
|
151
163
|
});
|
|
152
|
-
const
|
|
164
|
+
const X = /* @__PURE__ */ R(Y, [["__scopeId", "data-v-b271b30b"]]);
|
|
153
165
|
export {
|
|
154
|
-
|
|
166
|
+
X as default
|
|
155
167
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as s, computed as o, openBlock as i, createElementBlock as l, normalizeClass as t, createElementVNode as p, unref as u, createCommentVNode as d } from "vue";
|
|
2
|
-
import { u as y, R as _ } from "./app-
|
|
2
|
+
import { u as y, R as _ } from "./app-5820624d.js";
|
|
3
3
|
import "pinia";
|
|
4
4
|
import "@feedmepos/mf-common";
|
|
5
5
|
import "vue-router";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export type ConnectedAppProvider = 'lark' | 'slack';
|
|
2
|
+
export type ConnectedAppStatus = 'active' | 'disabled' | 'error';
|
|
3
|
+
export type ConnectedAppTestStatus = 'passed' | 'failed';
|
|
4
|
+
export type ConnectedAppPermissionMode = 'ask_approval' | 'full_access';
|
|
5
|
+
export type ConnectedAppEvent = 'rca_followup' | 'chat_notify' | 'task_announce';
|
|
6
|
+
export declare const CONNECTED_APP_EVENTS: ConnectedAppEvent[];
|
|
7
|
+
export declare const CONNECTED_APP_EVENT_LABELS: Record<ConnectedAppEvent, string>;
|
|
8
|
+
export interface ConnectedAppRecordDto {
|
|
9
|
+
id: string;
|
|
10
|
+
businessId: string;
|
|
11
|
+
provider: ConnectedAppProvider;
|
|
12
|
+
label: string;
|
|
13
|
+
status: ConnectedAppStatus;
|
|
14
|
+
isDefault: boolean;
|
|
15
|
+
events: ConnectedAppEvent[];
|
|
16
|
+
permissionMode: ConnectedAppPermissionMode;
|
|
17
|
+
lastTestedAt?: string;
|
|
18
|
+
lastTestStatus?: ConnectedAppTestStatus;
|
|
19
|
+
lastError?: string;
|
|
20
|
+
webhookHint: string;
|
|
21
|
+
createdAt?: string;
|
|
22
|
+
updatedAt?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CreateConnectedAppPayload {
|
|
25
|
+
businessId: string;
|
|
26
|
+
provider: ConnectedAppProvider;
|
|
27
|
+
label: string;
|
|
28
|
+
webhookUrl: string;
|
|
29
|
+
isDefault?: boolean;
|
|
30
|
+
events?: ConnectedAppEvent[];
|
|
31
|
+
permissionMode?: ConnectedAppPermissionMode;
|
|
32
|
+
}
|
|
33
|
+
export interface UpdateConnectedAppPayload {
|
|
34
|
+
label?: string;
|
|
35
|
+
webhookUrl?: string;
|
|
36
|
+
status?: ConnectedAppStatus;
|
|
37
|
+
isDefault?: boolean;
|
|
38
|
+
events?: ConnectedAppEvent[];
|
|
39
|
+
permissionMode?: ConnectedAppPermissionMode;
|
|
40
|
+
}
|
|
41
|
+
export interface ConnectedAppDeliveryDto {
|
|
42
|
+
id: string;
|
|
43
|
+
event: ConnectedAppEvent | 'test';
|
|
44
|
+
subject?: string;
|
|
45
|
+
status: 'delivered' | 'failed';
|
|
46
|
+
detail?: string;
|
|
47
|
+
createdAt?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface ConnectedAppTestResponse {
|
|
50
|
+
delivered: boolean;
|
|
51
|
+
detail: string;
|
|
52
|
+
}
|
|
53
|
+
export interface NotifyConnectedAppPayload {
|
|
54
|
+
businessId: string;
|
|
55
|
+
subject?: string;
|
|
56
|
+
message: string;
|
|
57
|
+
target?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface NotifyConnectedAppResponse {
|
|
60
|
+
delivered: boolean;
|
|
61
|
+
detail: string;
|
|
62
|
+
connectedAppLabel?: string;
|
|
63
|
+
provider?: ConnectedAppProvider;
|
|
64
|
+
}
|
|
65
|
+
export interface ConnectedAppFeatureStatus {
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
}
|
|
68
|
+
export declare function fetchConnectedAppFeatureStatus(businessId: string): Promise<ConnectedAppFeatureStatus>;
|
|
69
|
+
export declare function fetchConnectedApps(businessId: string): Promise<ConnectedAppRecordDto[]>;
|
|
70
|
+
export declare function createConnectedApp(payload: CreateConnectedAppPayload): Promise<ConnectedAppRecordDto>;
|
|
71
|
+
export declare function updateConnectedApp(businessId: string, connectedAppId: string, payload: UpdateConnectedAppPayload): Promise<ConnectedAppRecordDto>;
|
|
72
|
+
export declare function testConnectedApp(businessId: string, connectedAppId: string): Promise<ConnectedAppTestResponse>;
|
|
73
|
+
export declare function fetchConnectedAppDeliveries(businessId: string, connectedAppId: string): Promise<ConnectedAppDeliveryDto[]>;
|
|
74
|
+
export declare function approveNotifyConnectedApp(payload: NotifyConnectedAppPayload): Promise<NotifyConnectedAppResponse>;
|
|
75
|
+
export declare function deleteConnectedApp(businessId: string, connectedAppId: string): Promise<void>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export type MemoryCategory = 'profile' | 'concern' | 'preference' | 'pattern';
|
|
2
|
+
export type MemoryScope = 'general' | 'report' | 'menu' | 'marketing';
|
|
3
|
+
export type MemoryStatus = 'active' | 'superseded' | 'archived' | 'deleted' | 'pending_review';
|
|
4
|
+
export interface MemoryDto {
|
|
5
|
+
id: string;
|
|
6
|
+
text: string;
|
|
7
|
+
category: MemoryCategory;
|
|
8
|
+
scope: MemoryScope;
|
|
9
|
+
status: MemoryStatus;
|
|
10
|
+
confidence: number;
|
|
11
|
+
evidenceCount: number;
|
|
12
|
+
useCount: number;
|
|
13
|
+
pinned: boolean;
|
|
14
|
+
userEdited: boolean;
|
|
15
|
+
lastConfirmedAt: string;
|
|
16
|
+
lastUsedAt: string | null;
|
|
17
|
+
supersededBy: string | null;
|
|
18
|
+
conflictWith: string | null;
|
|
19
|
+
episodeIds: string[];
|
|
20
|
+
conversationIds: string[];
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
}
|
|
24
|
+
export interface MemoryHistoryEntryDto {
|
|
25
|
+
at: string;
|
|
26
|
+
action: string;
|
|
27
|
+
detail?: string;
|
|
28
|
+
actor: 'system' | 'user';
|
|
29
|
+
}
|
|
30
|
+
export interface MemoryEdgeDto {
|
|
31
|
+
id: string;
|
|
32
|
+
from: string;
|
|
33
|
+
fromType: 'memory' | 'episode';
|
|
34
|
+
to: string;
|
|
35
|
+
toType: 'memory' | 'episode';
|
|
36
|
+
relation: 'supersedes' | 'related_to' | 'contradicts' | 'derived_from';
|
|
37
|
+
weight: number;
|
|
38
|
+
resolution: 'kept_this' | 'kept_other' | 'kept_both' | null;
|
|
39
|
+
}
|
|
40
|
+
export interface MemoryDetailDto extends MemoryDto {
|
|
41
|
+
history: MemoryHistoryEntryDto[];
|
|
42
|
+
sourceMessageIds: string[];
|
|
43
|
+
edges: MemoryEdgeDto[];
|
|
44
|
+
episodes: Array<{
|
|
45
|
+
id: string;
|
|
46
|
+
title: string;
|
|
47
|
+
endedAt: string;
|
|
48
|
+
conversationId: string;
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
51
|
+
export interface MemoryListResponse {
|
|
52
|
+
data: MemoryDto[];
|
|
53
|
+
total: number;
|
|
54
|
+
page: number;
|
|
55
|
+
limit: number;
|
|
56
|
+
hasMore: boolean;
|
|
57
|
+
unresolvedConflicts: Array<{
|
|
58
|
+
edgeId: string;
|
|
59
|
+
from: string;
|
|
60
|
+
to: string;
|
|
61
|
+
}>;
|
|
62
|
+
}
|
|
63
|
+
export interface GraphNodeDto {
|
|
64
|
+
id: string;
|
|
65
|
+
type: 'memory' | 'episode';
|
|
66
|
+
label: string;
|
|
67
|
+
category?: MemoryCategory;
|
|
68
|
+
scope?: MemoryScope;
|
|
69
|
+
status?: MemoryStatus;
|
|
70
|
+
confidence?: number;
|
|
71
|
+
pinned?: boolean;
|
|
72
|
+
endedAt?: string;
|
|
73
|
+
conversationId?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface MemoryGraphResponse {
|
|
76
|
+
nodes: GraphNodeDto[];
|
|
77
|
+
edges: MemoryEdgeDto[];
|
|
78
|
+
}
|
|
79
|
+
export interface EpisodeDto {
|
|
80
|
+
id: string;
|
|
81
|
+
conversationId: string;
|
|
82
|
+
title: string;
|
|
83
|
+
summary: string;
|
|
84
|
+
topics: string[];
|
|
85
|
+
outcome: string | null;
|
|
86
|
+
startedAt: string;
|
|
87
|
+
endedAt: string;
|
|
88
|
+
messageCount: number;
|
|
89
|
+
memoryIds: string[];
|
|
90
|
+
/** Read-time cluster id (newest episode of the cluster). Display-only. */
|
|
91
|
+
groupId?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface EpisodeListResponse {
|
|
94
|
+
data: EpisodeDto[];
|
|
95
|
+
total: number;
|
|
96
|
+
page: number;
|
|
97
|
+
limit: number;
|
|
98
|
+
hasMore: boolean;
|
|
99
|
+
}
|
|
100
|
+
export interface EpisodeDetailDto extends EpisodeDto {
|
|
101
|
+
memories: MemoryDto[];
|
|
102
|
+
}
|
|
103
|
+
export declare function fetchMemories(businessId: string, opts?: {
|
|
104
|
+
category?: string;
|
|
105
|
+
scope?: string;
|
|
106
|
+
status?: string;
|
|
107
|
+
q?: string;
|
|
108
|
+
page?: number;
|
|
109
|
+
limit?: number;
|
|
110
|
+
}): Promise<MemoryListResponse>;
|
|
111
|
+
export declare function fetchMemory(businessId: string, id: string): Promise<MemoryDetailDto>;
|
|
112
|
+
export declare function updateMemory(businessId: string, id: string, patch: {
|
|
113
|
+
text?: string;
|
|
114
|
+
category?: string;
|
|
115
|
+
scope?: string;
|
|
116
|
+
}): Promise<MemoryDto>;
|
|
117
|
+
export declare function forgetMemory(businessId: string, id: string): Promise<void>;
|
|
118
|
+
export declare function pinMemory(businessId: string, id: string, pinned: boolean): Promise<MemoryDto>;
|
|
119
|
+
export declare function restoreMemory(businessId: string, id: string): Promise<MemoryDto>;
|
|
120
|
+
export declare function resolveConflict(businessId: string, edgeId: string, keep: 'from' | 'to' | 'both'): Promise<void>;
|
|
121
|
+
export declare function fetchMemoryGraph(businessId: string): Promise<MemoryGraphResponse>;
|
|
122
|
+
export declare function fetchEpisodes(businessId: string, page?: number, limit?: number): Promise<EpisodeListResponse>;
|
|
123
|
+
export declare function fetchEpisode(businessId: string, id: string): Promise<EpisodeDetailDto>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { RcaActionKind } from '@/types/chat';
|
|
2
|
+
import type { TaskDirective, TaskExecutorType } from '@/types/tasks';
|
|
3
|
+
export interface RcaActionRecordDto {
|
|
4
|
+
id: string;
|
|
5
|
+
businessId: string;
|
|
6
|
+
conversationId: string;
|
|
7
|
+
rcaId: string;
|
|
8
|
+
driverLabel: string;
|
|
9
|
+
kind: RcaActionKind;
|
|
10
|
+
title: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
payload?: Record<string, unknown>;
|
|
13
|
+
status: 'pending' | 'running' | 'done' | 'failed';
|
|
14
|
+
resultSummary?: string;
|
|
15
|
+
error?: string;
|
|
16
|
+
/** Task id for delegation kinds ("task"/"research"). */
|
|
17
|
+
createdResourceId?: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Delegation decision attached to "task"/"research" confirmations (tasks v2).
|
|
22
|
+
* Omitted → backend defaults to a human-executor task assigned to the caller.
|
|
23
|
+
*/
|
|
24
|
+
export interface RcaDelegationPayload {
|
|
25
|
+
executor: {
|
|
26
|
+
type: TaskExecutorType;
|
|
27
|
+
id?: string;
|
|
28
|
+
};
|
|
29
|
+
directive?: TaskDirective;
|
|
30
|
+
}
|
|
31
|
+
export interface ExecuteRcaActionPayload {
|
|
32
|
+
businessId: string;
|
|
33
|
+
conversationId: string;
|
|
34
|
+
rcaId: string;
|
|
35
|
+
driverLabel: string;
|
|
36
|
+
kind: RcaActionKind;
|
|
37
|
+
title: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
payload: {
|
|
40
|
+
recipient?: string;
|
|
41
|
+
subject?: string;
|
|
42
|
+
message?: string;
|
|
43
|
+
taskTitle?: string;
|
|
44
|
+
dueInDays?: number;
|
|
45
|
+
messageId?: string;
|
|
46
|
+
delegation?: RcaDelegationPayload;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** Creates and executes a confirmed RCA follow-up action. */
|
|
50
|
+
export declare function executeRcaAction(payload: ExecuteRcaActionPayload): Promise<RcaActionRecordDto>;
|
|
51
|
+
/** Lists the caller's RCA actions for a conversation (most recent first). */
|
|
52
|
+
export declare function fetchRcaActions(conversationId: string): Promise<RcaActionRecordDto[]>;
|
|
53
|
+
export interface RcaFeatureStatus {
|
|
54
|
+
taskEnabled: boolean;
|
|
55
|
+
notifyEnabled: boolean;
|
|
56
|
+
connectedAppEnabled: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** Check which RCA action kinds are enabled for a business. */
|
|
59
|
+
export declare function fetchRcaFeatureStatus(businessId: string): Promise<RcaFeatureStatus>;
|