@nivaro/react 0.3.137 → 0.3.139
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +95 -4
- package/dist/index.js +748 -743
- package/dist/shared/components/CollectionBrowserView.js +392 -389
- package/dist/shared/components/DelegateCoverLine.js +80 -87
- package/dist/shared/components/ItemEditForm.js +589 -588
- package/dist/shared/components/MyWorkView.js +284 -286
- package/dist/shared/components/NotificationBell.js +251 -205
- package/dist/shared/components/ai/AiAnalyticsView.js +878 -417
- package/dist/shared/components/ai/AiPlanCard.js +164 -122
- package/dist/shared/components/ai/AiPlanUndo.js +291 -0
- package/dist/shared/components/ai/call-log/CallDrawer.js +357 -0
- package/dist/shared/components/ai/call-log/RawJson.js +126 -0
- package/dist/shared/components/ai/call-log/ThreadView.js +223 -0
- package/dist/shared/components/ai/call-log/TranscriptView.js +227 -0
- package/dist/shared/components/ai/call-log/controls.js +364 -0
- package/dist/shared/components/ai/call-log/format.js +46 -0
- package/dist/shared/components/ai/call-log/url.js +105 -0
- package/dist/shared/components/chat/chat-core.js +422 -346
- package/dist/shared/components/integrations/IntegrationObligationsView.js +98 -98
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +102 -93
- package/dist/shared/components/integrations/console/api.js +11 -1
- package/dist/shared/components/item-edit/HeaderRollupExplainer.js +5 -1
- package/dist/shared/components/item-edit/RecordLiveSync.js +241 -229
- package/dist/shared/components/item-edit/RecordRecapChanges.js +166 -0
- package/dist/shared/components/item-edit/RecordRecapStrip.js +254 -84
- package/dist/shared/components/item-edit/live-related.js +34 -18
- package/dist/shared/components/panels/RevisionsPanel.js +735 -683
- package/dist/shared/components/queue/QueueWorklist.js +323 -316
- package/dist/shared/components/support/SupportRequestDialog.js +198 -181
- package/dist/shared/components/trackers/use-tracker-link.js +74 -65
- package/dist/shared/lib/activity-sentence.js +167 -151
- package/dist/shared/lib/config-update-refresh.js +34 -0
- package/dist/shared/lib/config-watch.js +17 -17
- package/dist/shared/lib/gap-refresh.js +49 -0
- package/dist/shared/lib/integration-dots.js +8 -8
- package/dist/shared/lib/live-ops.js +26 -23
- package/dist/shared/lib/live-pickers.js +1 -1
- package/dist/shared/lib/live-queries.js +223 -195
- package/dist/shared/lib/live.js +56 -51
- package/dist/shared/lib/obligation-banner.js +11 -10
- package/dist/shared/lib/obligation-filters.js +22 -18
- package/dist/shared/lib/obligation-reason-text.js +18 -8
- package/dist/shared/lib/presence-hooks.js +133 -132
- package/dist/shared/lib/reconnect-resync.js +90 -0
- package/dist/shared/lib/record-room-holds.js +43 -0
- package/dist/shared/lib/socket-realtime.js +116 -105
- package/dist/shared/lib/user-sync.js +1 -6
- package/package.json +1 -1
package/dist/shared/lib/live.js
CHANGED
|
@@ -4,7 +4,7 @@ import { releaseLiveOwner as x, deliverLive as T } from "./focus-mode.js";
|
|
|
4
4
|
import { liveEventQuiet as F } from "./live-preference.js";
|
|
5
5
|
import { getLiveMode as ne, liveMotionAllowed as re, useLiveBusy as oe, useLivePreference as ie } from "./live-preference.js";
|
|
6
6
|
import { isOwnWrite as M } from "./own-writes.js";
|
|
7
|
-
import { noteOwnWrite as
|
|
7
|
+
import { noteOwnWrite as ce, noteOwnWriteFromCommand as le } from "./own-writes.js";
|
|
8
8
|
import { useOptionalRealtime as O } from "./realtime.js";
|
|
9
9
|
const S = "nvr:live-event";
|
|
10
10
|
function U(t, ...o) {
|
|
@@ -39,7 +39,12 @@ const G = {
|
|
|
39
39
|
/** A banner-enabled threshold alert fired on the record (rt9 #20): banners re-read. */
|
|
40
40
|
alerts: "$alerts",
|
|
41
41
|
/** A support request raised from the record opened, moved or closed (rt9 #19). */
|
|
42
|
-
support: "$support"
|
|
42
|
+
support: "$support",
|
|
43
|
+
/** A change proposal on the record was made, accepted, declined or withdrawn (S10; sent beside
|
|
44
|
+
* `$comments`). */
|
|
45
|
+
proposals: "$proposals",
|
|
46
|
+
/** The record's dynamic attribute values changed (S13; sent beside `$related`). */
|
|
47
|
+
attributes: "$attributes"
|
|
43
48
|
};
|
|
44
49
|
function k(t) {
|
|
45
50
|
for (const o of ["by", "user", "user_id"]) {
|
|
@@ -59,7 +64,7 @@ function N(t, o) {
|
|
|
59
64
|
function Q(t) {
|
|
60
65
|
if (!t.coalesced) return [t];
|
|
61
66
|
const { coalesced: o, items: e, many: n, count: r, ...i } = t;
|
|
62
|
-
return n || !Array.isArray(e) ? [{ ...i, item: "*", ...typeof r == "number" ? { bulk: r } : {} }] : e.map((
|
|
67
|
+
return n || !Array.isArray(e) ? [{ ...i, item: "*", ...typeof r == "number" ? { bulk: r } : {} }] : e.map((s) => ({ ...i, item: s }));
|
|
63
68
|
}
|
|
64
69
|
function W(t) {
|
|
65
70
|
const o = [...new Set(t.map((r) => String(r.item)))];
|
|
@@ -70,7 +75,7 @@ function W(t) {
|
|
|
70
75
|
e = null, n = !1;
|
|
71
76
|
continue;
|
|
72
77
|
}
|
|
73
|
-
if (i.every((
|
|
78
|
+
if (i.every((s) => s.startsWith("$")) || (n = !1), e) for (const s of i) e.add(s);
|
|
74
79
|
}
|
|
75
80
|
return t.some((r) => r.action === "create" || r.action === "delete") && (n = !1), {
|
|
76
81
|
events: t,
|
|
@@ -85,41 +90,41 @@ function W(t) {
|
|
|
85
90
|
function V(t, o, e = {}) {
|
|
86
91
|
const n = O(), { userId: r } = _(j), i = h(o);
|
|
87
92
|
i.current = o;
|
|
88
|
-
const
|
|
89
|
-
|
|
93
|
+
const s = h(e);
|
|
94
|
+
s.current = e;
|
|
90
95
|
const l = h(r);
|
|
91
96
|
l.current = r;
|
|
92
|
-
const f = h({}),
|
|
97
|
+
const f = h({}), w = (t == null ? [] : Array.isArray(t) ? t : [t]).filter(Boolean).join(","), y = e.enabled !== !1;
|
|
93
98
|
A(() => {
|
|
94
|
-
if (!n || !
|
|
95
|
-
const g =
|
|
96
|
-
let a = [],
|
|
99
|
+
if (!n || !w || !y) return;
|
|
100
|
+
const g = w.split(",");
|
|
101
|
+
let a = [], p = null;
|
|
97
102
|
const R = () => {
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
a = [],
|
|
101
|
-
}, v = n.subscribeCollections(g, (
|
|
102
|
-
const u =
|
|
103
|
+
p = null;
|
|
104
|
+
const c = a;
|
|
105
|
+
a = [], c.length !== 0 && (s.current.focusable ? T(f.current, c, (u) => i.current(W(u))) : i.current(W(c)));
|
|
106
|
+
}, v = n.subscribeCollections(g, (c) => {
|
|
107
|
+
const u = c;
|
|
103
108
|
if (!u || !g.includes(String(u.collection))) return;
|
|
104
|
-
const d =
|
|
105
|
-
for (const
|
|
106
|
-
const
|
|
107
|
-
|
|
109
|
+
const d = s.current;
|
|
110
|
+
for (const $ of Q(u)) {
|
|
111
|
+
const b = { ...$, own: N($, l.current) };
|
|
112
|
+
b.own && !d.includeOwn || d.match && !d.match(b) || a.push(b);
|
|
108
113
|
}
|
|
109
114
|
if (a.length === 0) return;
|
|
110
115
|
const m = d.debounceMs ?? 250;
|
|
111
|
-
m <= 0 ? R() :
|
|
116
|
+
m <= 0 ? R() : p || (p = setTimeout(R, m));
|
|
112
117
|
});
|
|
113
118
|
return () => {
|
|
114
|
-
v(),
|
|
119
|
+
v(), p && clearTimeout(p), x(f.current);
|
|
115
120
|
};
|
|
116
|
-
}, [n,
|
|
121
|
+
}, [n, w, y]);
|
|
117
122
|
}
|
|
118
123
|
function q(t, o, e, n = {}) {
|
|
119
124
|
const r = o == null || o === "new" ? null : String(o), i = n.match;
|
|
120
125
|
V(t && r ? t : null, e, {
|
|
121
126
|
...n,
|
|
122
|
-
match: (
|
|
127
|
+
match: (s) => (String(s.item) === r || s.item === "*") && (!i || i(s))
|
|
123
128
|
});
|
|
124
129
|
}
|
|
125
130
|
function H(t, o, e, n = {}) {
|
|
@@ -129,11 +134,11 @@ function H(t, o, e, n = {}) {
|
|
|
129
134
|
i.current = n.client, q(
|
|
130
135
|
t,
|
|
131
136
|
o,
|
|
132
|
-
(
|
|
137
|
+
(s) => {
|
|
133
138
|
var f;
|
|
134
139
|
const l = n.aspects;
|
|
135
|
-
if (!(l && l.length > 0 &&
|
|
136
|
-
for (const
|
|
140
|
+
if (!(l && l.length > 0 && s.changedFields !== null && !U(s, ...l)))
|
|
141
|
+
for (const L of r.current) (f = i.current) == null || f.invalidateQueries({ queryKey: L });
|
|
137
142
|
},
|
|
138
143
|
n
|
|
139
144
|
);
|
|
@@ -141,57 +146,57 @@ function H(t, o, e, n = {}) {
|
|
|
141
146
|
function B(t, o, e = {}) {
|
|
142
147
|
const n = O(), { userId: r } = _(j), i = h(o);
|
|
143
148
|
i.current = o;
|
|
144
|
-
const
|
|
145
|
-
|
|
149
|
+
const s = h(e);
|
|
150
|
+
s.current = e;
|
|
146
151
|
const l = h(r);
|
|
147
152
|
l.current = r;
|
|
148
|
-
const f = (Array.isArray(t) ? t : [t]).join(","),
|
|
153
|
+
const f = (Array.isArray(t) ? t : [t]).join(","), L = e.enabled !== !1;
|
|
149
154
|
A(() => {
|
|
150
|
-
if (!
|
|
151
|
-
const
|
|
152
|
-
let
|
|
153
|
-
const
|
|
154
|
-
if (!
|
|
155
|
-
const d =
|
|
155
|
+
if (!L || !f) return;
|
|
156
|
+
const w = f.split(",");
|
|
157
|
+
let y = null, g = null, a = null;
|
|
158
|
+
const p = (c, u) => {
|
|
159
|
+
if (!w.includes(c) || F(c)) return;
|
|
160
|
+
const d = s.current, m = u ?? {};
|
|
156
161
|
if (!d.includeOwn && typeof m == "object") {
|
|
157
162
|
const C = k(m);
|
|
158
163
|
if (C && l.current && C.toUpperCase() === l.current.toUpperCase())
|
|
159
164
|
return;
|
|
160
165
|
}
|
|
161
166
|
if (d.match && !d.match(m)) return;
|
|
162
|
-
let
|
|
167
|
+
let $ = c;
|
|
163
168
|
try {
|
|
164
|
-
|
|
169
|
+
$ = `${c}|${JSON.stringify(m)}`;
|
|
165
170
|
} catch {
|
|
166
171
|
}
|
|
167
|
-
const
|
|
168
|
-
if (
|
|
169
|
-
|
|
172
|
+
const b = Date.now();
|
|
173
|
+
if (y && y.sig === $ && b - y.at < 150) return;
|
|
174
|
+
y = { sig: $, at: b };
|
|
170
175
|
const E = d.debounceMs ?? 0;
|
|
171
176
|
if (E <= 0) {
|
|
172
|
-
i.current(m,
|
|
177
|
+
i.current(m, c);
|
|
173
178
|
return;
|
|
174
179
|
}
|
|
175
|
-
a = { payload: m, event:
|
|
180
|
+
a = { payload: m, event: c }, g || (g = setTimeout(() => {
|
|
176
181
|
g = null, a && i.current(a.payload, a.event), a = null;
|
|
177
182
|
}, E));
|
|
178
|
-
}, R =
|
|
179
|
-
})), v = (
|
|
180
|
-
const u =
|
|
181
|
-
u != null && u.event &&
|
|
183
|
+
}, R = w.map((c) => (n == null ? void 0 : n.on(c, (u) => p(c, u))) ?? (() => {
|
|
184
|
+
})), v = (c) => {
|
|
185
|
+
const u = c.detail;
|
|
186
|
+
u != null && u.event && p(u.event, u.payload);
|
|
182
187
|
};
|
|
183
188
|
return window.addEventListener(S, v), () => {
|
|
184
|
-
for (const
|
|
189
|
+
for (const c of R) c();
|
|
185
190
|
window.removeEventListener(S, v), g && clearTimeout(g);
|
|
186
191
|
};
|
|
187
|
-
}, [n, f,
|
|
192
|
+
}, [n, f, L]);
|
|
188
193
|
}
|
|
189
194
|
function X(t, o, e, n, r = {}) {
|
|
190
|
-
const i = e == null || e === "new" ? null : String(e),
|
|
195
|
+
const i = e == null || e === "new" ? null : String(e), s = r.match;
|
|
191
196
|
B(t, n, {
|
|
192
197
|
...r,
|
|
193
198
|
enabled: r.enabled !== !1 && !!o && !!i,
|
|
194
|
-
match: (l) => (l == null ? void 0 : l.collection) === o && String(l == null ? void 0 : l.item) === i && (!
|
|
199
|
+
match: (l) => (l == null ? void 0 : l.collection) === o && String(l == null ? void 0 : l.item) === i && (!s || s(l))
|
|
195
200
|
});
|
|
196
201
|
}
|
|
197
202
|
function Y(t, o = !0) {
|
|
@@ -213,7 +218,7 @@ export {
|
|
|
213
218
|
N as isOwnEvent,
|
|
214
219
|
M as isOwnWrite,
|
|
215
220
|
re as liveMotionAllowed,
|
|
216
|
-
|
|
221
|
+
ce as noteOwnWrite,
|
|
217
222
|
le as noteOwnWriteFromCommand,
|
|
218
223
|
W as toLiveBatch,
|
|
219
224
|
Z as useLiveAvailable,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toneForObligation as p } from "./obligation-filters.js";
|
|
2
2
|
import { plainObligationReason as g } from "./obligation-reason-text.js";
|
|
3
3
|
import { partnerFailureText as _ } from "./partner-failure.js";
|
|
4
4
|
import { formatDate as h, getDisplayTimezone as b } from "./utils.js";
|
|
@@ -11,7 +11,7 @@ const w = (o) => {
|
|
|
11
11
|
}).format(new Date(o));
|
|
12
12
|
};
|
|
13
13
|
function D(o, t) {
|
|
14
|
-
const
|
|
14
|
+
const l = t.getTime() - new Date(o).getTime(), e = Math.floor(l / 6e4);
|
|
15
15
|
if (e < 1) return "just now";
|
|
16
16
|
if (e < 60) return `${e}m ago`;
|
|
17
17
|
const n = Math.floor(e / 60);
|
|
@@ -23,24 +23,24 @@ function T(o) {
|
|
|
23
23
|
return o.split(/[._-]+/).filter(Boolean).map((t) => t[0].toUpperCase() + t.slice(1)).join(" ");
|
|
24
24
|
}
|
|
25
25
|
function x(o, t = /* @__PURE__ */ new Date()) {
|
|
26
|
-
const
|
|
26
|
+
const l = /* @__PURE__ */ new Map();
|
|
27
27
|
for (const e of o) {
|
|
28
28
|
if (e.outcome === "superseded") continue;
|
|
29
|
-
const n =
|
|
30
|
-
(!n || e.id > n.id) &&
|
|
29
|
+
const n = l.get(e.api);
|
|
30
|
+
(!n || e.id > n.id) && l.set(e.api, e);
|
|
31
31
|
}
|
|
32
|
-
return [...
|
|
32
|
+
return [...l.values()].map((e) => {
|
|
33
33
|
var d, f;
|
|
34
|
-
const n = e.resolved_at ?? e.due_at, i = `${D(n, t)} (${w(n)})`,
|
|
34
|
+
const n = e.resolved_at ?? e.due_at, i = `${D(n, t)} (${w(n)})`, c = e.reason ? g(e.reason) : "", r = e.reason ? ` — ${c !== e.reason.trim() ? c : _(e.reason) ?? c}` : "", m = ((d = e.label) == null ? void 0 : d.trim()) || (e.trigger === "transition" ? T(e.kind) : ""), u = (f = e.subject) == null ? void 0 : f.trim(), a = m ? ` · ${m}${u ? ` (${u})` : ""}` : u ? ` · ${u}` : "";
|
|
35
35
|
let s;
|
|
36
36
|
if (e.outcome === "sent") s = `told ${i}${a}`;
|
|
37
37
|
else if (e.outcome === "pending") {
|
|
38
38
|
const $ = Math.round((t.getTime() - new Date(e.due_at).getTime()) / 6e4);
|
|
39
39
|
s = `sent ${i}${a}, awaiting acknowledgement (${$} min)`;
|
|
40
|
-
} else e.outcome === "skipped" ? s = `should have been told ${i}${a}${
|
|
40
|
+
} else e.outcome === "skipped" && e.not_needed ? s = `not sent ${i}${a}${r} — nothing owed` : e.outcome === "skipped" ? s = `should have been told ${i}${a}${r}` : e.outcome === "failed" ? s = `send failed ${i}${a}${r}` : e.outcome === "missing" ? s = `never told${a}${r}` : s = `still not told${a}${r}`;
|
|
41
41
|
return {
|
|
42
42
|
api: e.api,
|
|
43
|
-
tone: p(e
|
|
43
|
+
tone: p(e),
|
|
44
44
|
text: s,
|
|
45
45
|
obligation_id: e.id,
|
|
46
46
|
outcome: e.outcome,
|
|
@@ -49,7 +49,8 @@ function x(o, t = /* @__PURE__ */ new Date()) {
|
|
|
49
49
|
transition_label: e.transition_label ?? null,
|
|
50
50
|
// An older server sends neither: keep the one button it always had.
|
|
51
51
|
can_resend: e.can_resend ?? !0,
|
|
52
|
-
can_send_current: e.can_send_current ?? !1
|
|
52
|
+
can_send_current: e.can_send_current ?? !1,
|
|
53
|
+
not_needed: e.not_needed === !0
|
|
53
54
|
};
|
|
54
55
|
});
|
|
55
56
|
}
|
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
function
|
|
1
|
+
function l(t) {
|
|
2
2
|
const n = {};
|
|
3
3
|
return t.api && (n.api = t.api), t.kind && (n.kind = t.kind), t.collection && (n.collection = t.collection), t.outcome.length > 0 && (n.outcome = t.outcome.join(",")), t.ageHours != null && (n.age_hours = String(t.ageHours)), n;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function i(t) {
|
|
6
6
|
return t === "overdue" || t === "failed" || t === "missing" ? "danger" : t === "pending" || t === "skipped" ? "warning" : t === "sent" ? "positive" : "neutral";
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function p(t) {
|
|
9
|
+
return t.not_needed ? "neutral" : i(t.outcome);
|
|
10
|
+
}
|
|
11
|
+
function u(t) {
|
|
9
12
|
return !!t && !/^nivaro_/i.test(t);
|
|
10
13
|
}
|
|
11
|
-
function
|
|
14
|
+
function f(t, n) {
|
|
12
15
|
return !t || t.attempts == null ? "—" : typeof n == "string" && n.startsWith("gave up:") ? `${t.attempts} · gave up` : String(t.attempts);
|
|
13
16
|
}
|
|
14
|
-
function
|
|
17
|
+
function o(t, n = 60) {
|
|
15
18
|
if (!t) return null;
|
|
16
19
|
const e = t.trim();
|
|
17
20
|
return e ? e.length > n ? `${e.slice(0, n)}…` : e : null;
|
|
18
21
|
}
|
|
19
|
-
function
|
|
22
|
+
function c(t, n) {
|
|
20
23
|
if (t === "skipped" || !n || !n.status) return "—";
|
|
21
|
-
const e =
|
|
24
|
+
const e = o(n.response ?? n.last_error);
|
|
22
25
|
return e ? `${n.status.toUpperCase()} · ${e}` : n.status.toUpperCase();
|
|
23
26
|
}
|
|
24
|
-
function
|
|
27
|
+
function g(t) {
|
|
25
28
|
return t ? t.response ?? t.last_error ?? null : null;
|
|
26
29
|
}
|
|
27
30
|
function a(t) {
|
|
28
|
-
return t.inbound === !0 || !
|
|
31
|
+
return t.inbound === !0 || !u(t.collection);
|
|
29
32
|
}
|
|
30
|
-
function
|
|
33
|
+
function d(t, n) {
|
|
31
34
|
if (!n) return { waiting: [], inbound: [] };
|
|
32
35
|
const e = t.filter((r) => r.api === n);
|
|
33
36
|
return {
|
|
@@ -36,13 +39,14 @@ function g(t, n) {
|
|
|
36
39
|
};
|
|
37
40
|
}
|
|
38
41
|
export {
|
|
39
|
-
|
|
42
|
+
f as attemptsLabel,
|
|
40
43
|
a as isInboundKind,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
u as isRoutableRecord,
|
|
45
|
+
g as lastResponseFull,
|
|
46
|
+
c as lastResponseLabel,
|
|
47
|
+
l as obligationQueryParams,
|
|
48
|
+
d as obligationTabsFor,
|
|
49
|
+
o as responseSnippet,
|
|
50
|
+
p as toneForObligation,
|
|
51
|
+
i as toneForOutcome
|
|
48
52
|
};
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
const
|
|
2
|
-
function r(
|
|
3
|
-
const t =
|
|
4
|
-
return t.length === 0 ?
|
|
1
|
+
const o = /* @__PURE__ */ new Set(["id", "po", "req", "url", "sku", "uom", "erp", "api", "ids", "mwf"]);
|
|
2
|
+
function r(s) {
|
|
3
|
+
const t = s.trim().replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[_\s.-]+/).filter(Boolean).map((e) => e.toLowerCase());
|
|
4
|
+
return t.length === 0 ? s : t.map((e, n) => o.has(e) ? e === "ids" ? "IDs" : e.toUpperCase() : n === 0 ? e.charAt(0).toUpperCase() + e.slice(1) : e).join(" ");
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
const t = String(
|
|
6
|
+
function a(s) {
|
|
7
|
+
const t = String(s ?? "").trim();
|
|
8
8
|
let e = /^skip_when_empty: (.+) empty$/.exec(t);
|
|
9
|
-
|
|
9
|
+
if (e) return `this record has no ${r(e[1])} yet`;
|
|
10
|
+
if (e = /^skip_unless_any: none of (.+) is set$/.exec(t), e)
|
|
11
|
+
return `this record has none of ${e[1].split(/,\s*/).filter(Boolean).map(r).join(", ")} yet`;
|
|
12
|
+
if (e = /^guard unmet: (.+)$/.exec(t), e) return `its send condition was not met (${e[1]})`;
|
|
13
|
+
if (e = /^not configured: (.+) missing on the action$/.exec(t), e) return `the send is not set up yet (${e[1]} is missing)`;
|
|
14
|
+
if (e = /^payload template error: (.+)$/.exec(t), e) return `the message could not be built (${e[1]})`;
|
|
15
|
+
if (e = /^not sent: ([a-z][a-z0-9_]*(?:\.[a-z0-9_]+)*) (\S+)(?: — (.+))?$/.exec(t), e) {
|
|
16
|
+
const n = (e[3] ?? "").replace(/\s*\(skip_sends\)$/, "").trim(), i = `${r(e[1].split(".").pop() ?? e[1])} ${e[2]}`;
|
|
17
|
+
return n ? `${n} (${i})` : `this partner does not take ${i}`;
|
|
18
|
+
}
|
|
19
|
+
return e = /^flow condition rejected at "(.+)"$/.exec(t), e ? `a flow step ("${e[1]}") stopped it` : /^no send was ever attempted\b/.test(t) ? "nothing was sent when this changed" : t;
|
|
10
20
|
}
|
|
11
21
|
export {
|
|
12
|
-
|
|
22
|
+
a as plainObligationReason
|
|
13
23
|
};
|