@sinequa/atomic 2.8.0 → 2.10.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/README.md +1 -1
- package/dist/atomic.cjs +1 -1
- package/dist/atomic.js +1 -1
- package/dist/client/create-api.d.ts +8 -8
- package/dist/spfx/index.cjs +1 -1
- package/dist/spfx/index.js +1 -1
- package/dist/{src-DMsETv6_.cjs → src-CPlI3qi5.cjs} +1 -1
- package/dist/{src-C-nHTU3y.js → src-s3KlD6YE.js} +137 -92
- package/dist/types/agent-workspace/index.d.ts +4 -0
- package/dist/types/{document-upload → agent-workspace}/index.d.ts.map +1 -1
- package/dist/types/{document-upload → agent-workspace}/upload-status.d.ts +8 -8
- package/dist/types/{document-upload → agent-workspace}/upload-status.d.ts.map +1 -1
- package/dist/types/{document-upload/container-document.d.ts → agent-workspace/workspace-document.d.ts} +8 -8
- package/dist/types/{document-upload/container-document.d.ts.map → agent-workspace/workspace-document.d.ts.map} +1 -1
- package/dist/types/agent-workspace/workspace.d.ts +31 -0
- package/dist/types/{document-upload/container.d.ts.map → agent-workspace/workspace.d.ts.map} +1 -1
- package/dist/types/api-endpoints.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interfaces/Query.d.ts +9 -0
- package/dist/types/interfaces/Query.d.ts.map +1 -1
- package/dist/utils/aggregations.d.ts +16 -0
- package/dist/utils/aggregations.d.ts.map +1 -1
- package/dist/web-api/index.d.ts +2 -2
- package/dist/web-api/index.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-security-principal.d.ts +1 -1
- package/dist/web-api/v2/{fetch-document-upload-status.d.ts → fetch-agent-workspace-status.d.ts} +4 -4
- package/dist/web-api/v2/{fetch-document-upload-status.d.ts.map → fetch-agent-workspace-status.d.ts.map} +1 -1
- package/dist/web-api/v2/fetch-agent-workspace.d.ts +100 -0
- package/dist/web-api/v2/fetch-agent-workspace.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/types/document-upload/container.d.ts +0 -31
- package/dist/types/document-upload/index.d.ts +0 -4
- package/dist/web-api/v2/fetch-document-upload-container.d.ts +0 -98
- package/dist/web-api/v2/fetch-document-upload-container.d.ts.map +0 -1
|
@@ -1811,8 +1811,8 @@ async function ur(e, t, n = g) {
|
|
|
1811
1811
|
});
|
|
1812
1812
|
}
|
|
1813
1813
|
//#endregion
|
|
1814
|
-
//#region src/web-api/v2/fetch-
|
|
1815
|
-
var X = "api/v2/
|
|
1814
|
+
//#region src/web-api/v2/fetch-agent-workspace.ts
|
|
1815
|
+
var X = "api/v2/agent-workspace/workspace";
|
|
1816
1816
|
function dr(e) {
|
|
1817
1817
|
let t = new URLSearchParams();
|
|
1818
1818
|
return e.page !== void 0 && t.set("pageNumber", String(e.page)), e.pageSize !== void 0 && t.set("pageSize", String(e.pageSize)), t;
|
|
@@ -1837,7 +1837,7 @@ function gr(e, t, n = g) {
|
|
|
1837
1837
|
return V(n, `${X}/${encodeURIComponent(e)}`, t);
|
|
1838
1838
|
}
|
|
1839
1839
|
async function _r(e, t = g) {
|
|
1840
|
-
let n = (await z(t, "api/v2/
|
|
1840
|
+
let n = (await z(t, "api/v2/agent-workspace/workspaces", void 0, { body: { workspaceIds: e } }))?.failed ?? [], r = new Set(n.map((e) => e.workspaceId));
|
|
1841
1841
|
return {
|
|
1842
1842
|
succeeded: e.filter((e) => !r.has(e)),
|
|
1843
1843
|
failed: n
|
|
@@ -1853,10 +1853,10 @@ function br(e, t, n = g) {
|
|
|
1853
1853
|
return z(n, `${X}/${encodeURIComponent(e)}/documents`, void 0, { body: { fileIds: t } });
|
|
1854
1854
|
}
|
|
1855
1855
|
//#endregion
|
|
1856
|
-
//#region src/web-api/v2/fetch-
|
|
1856
|
+
//#region src/web-api/v2/fetch-agent-workspace-status.ts
|
|
1857
1857
|
async function xr(e, t, n = g) {
|
|
1858
1858
|
let r = new URLSearchParams();
|
|
1859
|
-
return e?.
|
|
1859
|
+
return e?.workspaceId !== void 0 && r.set("workspaceId", e.workspaceId), e?.initiatedBy !== void 0 && r.set("initiatedBy", e.initiatedBy), e?.skip !== void 0 && r.set("skip", String(e.skip)), e?.take !== void 0 && r.set("take", String(e.take)), R(n, "api/v2/agent-workspace/status", r, t);
|
|
1860
1860
|
}
|
|
1861
1861
|
//#endregion
|
|
1862
1862
|
//#region src/web-api/v2/fetch-forgot-password.ts
|
|
@@ -1955,7 +1955,7 @@ function kr(e) {
|
|
|
1955
1955
|
patch: Z(Er, e),
|
|
1956
1956
|
deleteProperty: Z(Dr, e)
|
|
1957
1957
|
},
|
|
1958
|
-
|
|
1958
|
+
workspaces: {
|
|
1959
1959
|
list: Z(pr, e),
|
|
1960
1960
|
get: Z(mr, e),
|
|
1961
1961
|
create: Z(hr, e),
|
|
@@ -2018,41 +2018,86 @@ function Nr() {
|
|
|
2018
2018
|
//#endregion
|
|
2019
2019
|
//#region src/utils/aggregations.ts
|
|
2020
2020
|
var Pr = /.*:\(?([><=\d\-.AND ]+)\)?/;
|
|
2021
|
-
function Fr(e
|
|
2021
|
+
function Fr(e) {
|
|
2022
|
+
if (typeof e == "string") {
|
|
2023
|
+
if (/^\d{4}$/.test(e)) return "YYYY";
|
|
2024
|
+
if (/^\d{4}-(0[1-9]|1[0-2])$/.test(e)) return "YYYY-MM";
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
function Ir(e, t) {
|
|
2028
|
+
let [n, r] = e.split("-").map(Number);
|
|
2029
|
+
return t === "YYYY" ? {
|
|
2030
|
+
from: `${e}-01-01`,
|
|
2031
|
+
to: `${n + 1}-01-01`
|
|
2032
|
+
} : {
|
|
2033
|
+
from: `${e}-01`,
|
|
2034
|
+
to: r === 12 ? `${n + 1}-01-01` : `${n}-${String(r + 1).padStart(2, "0")}-01`
|
|
2035
|
+
};
|
|
2036
|
+
}
|
|
2037
|
+
function Lr(e, t) {
|
|
2022
2038
|
return !e?.items || e?.items?.length === 0 ? [] : e.items.reduce((n, r) => {
|
|
2023
2039
|
if (!r.value || r.value === "") return n;
|
|
2024
|
-
let i =
|
|
2040
|
+
let i = Hr(r, e.column), a = Fr(r.value);
|
|
2041
|
+
if (a) {
|
|
2042
|
+
let { from: t, to: n } = Ir(r.value, a), o = e.column;
|
|
2043
|
+
i.operator = "and", i.filters = [{
|
|
2044
|
+
field: o,
|
|
2045
|
+
operator: "gte",
|
|
2046
|
+
value: t
|
|
2047
|
+
}, {
|
|
2048
|
+
field: o,
|
|
2049
|
+
operator: "lt",
|
|
2050
|
+
value: n
|
|
2051
|
+
}];
|
|
2052
|
+
}
|
|
2025
2053
|
return n.push({
|
|
2026
2054
|
operator: i.operator,
|
|
2027
2055
|
value: i.value,
|
|
2028
|
-
display: r.display || i.display,
|
|
2056
|
+
display: r.display || i.display || String(r.value),
|
|
2057
|
+
mask: a,
|
|
2029
2058
|
filters: i.filters,
|
|
2030
2059
|
disabled: r.count === 0,
|
|
2031
2060
|
hidden: r.count === 0 && e.isDistribution ? !t : !1
|
|
2032
2061
|
}), n;
|
|
2033
2062
|
}, []);
|
|
2034
2063
|
}
|
|
2035
|
-
function
|
|
2064
|
+
function Rr(e) {
|
|
2065
|
+
return e.match(/^[^`]*`([^`]*)`:/)?.[1] || void 0;
|
|
2066
|
+
}
|
|
2067
|
+
var zr = {
|
|
2068
|
+
gte: "≥",
|
|
2069
|
+
gt: ">",
|
|
2070
|
+
lte: "≤",
|
|
2071
|
+
lt: "<"
|
|
2072
|
+
};
|
|
2073
|
+
function Br(e) {
|
|
2074
|
+
let t = e.trim();
|
|
2075
|
+
return t.startsWith(">=") ? "gte" : t.startsWith(">") ? "gt" : t.startsWith("<=") ? "lte" : "lt";
|
|
2076
|
+
}
|
|
2077
|
+
function Vr(e) {
|
|
2078
|
+
return e.length === 2 ? `${e[0].value} → ${e[1].value}` : `${zr[e[0].operator]} ${e[0].value}`;
|
|
2079
|
+
}
|
|
2080
|
+
function Hr(e, t) {
|
|
2036
2081
|
let n = t, r = e.value.match(Pr);
|
|
2037
2082
|
if (r?.[1]) {
|
|
2038
|
-
let t = (r?.[1].split(" AND ")).map((
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
});
|
|
2047
|
-
if (
|
|
2083
|
+
let t = (r?.[1].split(" AND ")).map((e) => ({
|
|
2084
|
+
operator: Br(e),
|
|
2085
|
+
value: e.substring(e.indexOf(" ") + 1)
|
|
2086
|
+
})), i = e.display || Rr(e.value) || Vr(t), a = t.map(({ operator: e, value: t }) => ({
|
|
2087
|
+
field: n,
|
|
2088
|
+
operator: e,
|
|
2089
|
+
value: t,
|
|
2090
|
+
display: i
|
|
2091
|
+
}));
|
|
2092
|
+
if (a.length === 2) return {
|
|
2048
2093
|
field: n,
|
|
2049
2094
|
operator: "and",
|
|
2050
|
-
filters:
|
|
2095
|
+
filters: a,
|
|
2051
2096
|
value: e.value,
|
|
2052
|
-
display:
|
|
2097
|
+
display: a[0].display || a[0].value
|
|
2053
2098
|
};
|
|
2054
|
-
if (
|
|
2055
|
-
...
|
|
2099
|
+
if (a.length === 1) return {
|
|
2100
|
+
...a[0],
|
|
2056
2101
|
field: n
|
|
2057
2102
|
};
|
|
2058
2103
|
throw Error("Failed to parse distribution expression");
|
|
@@ -2064,26 +2109,26 @@ function Ir(e, t) {
|
|
|
2064
2109
|
display: e.display
|
|
2065
2110
|
};
|
|
2066
2111
|
}
|
|
2067
|
-
function
|
|
2112
|
+
function Ur(e, t, n) {
|
|
2068
2113
|
return e.valuesAreExpressions ? t.display === n.display : t.value === n.value;
|
|
2069
2114
|
}
|
|
2070
|
-
function
|
|
2071
|
-
return e.items &&= e.items.map((e) =>
|
|
2115
|
+
function Wr(e) {
|
|
2116
|
+
return e.items &&= e.items.map((e) => Wr(e)), e.items?.some((e) => e.$selected || e.$opened) && (e.$opened = !0), e;
|
|
2072
2117
|
}
|
|
2073
|
-
function
|
|
2118
|
+
function Gr(e, t) {
|
|
2074
2119
|
let n = [];
|
|
2075
2120
|
if (e.length > 0) {
|
|
2076
2121
|
let r = /* @__PURE__ */ new Map(), i = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g, ""), a = RegExp(`\\b${i}`, "i");
|
|
2077
2122
|
e.forEach((e) => {
|
|
2078
2123
|
if (e.display.length > 1) {
|
|
2079
2124
|
let i = e.display.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), o = a.exec(i);
|
|
2080
|
-
|
|
2125
|
+
Kr(n, r, "/", e.display, +(e.frequency || 0), 1, (o?.index || 0) + t.length);
|
|
2081
2126
|
}
|
|
2082
2127
|
});
|
|
2083
2128
|
}
|
|
2084
2129
|
return n;
|
|
2085
2130
|
}
|
|
2086
|
-
function
|
|
2131
|
+
function Kr(e, t, n, r, i, a, o) {
|
|
2087
2132
|
let s = r.indexOf("/", n.length), c = r.substring(0, s + 1), l = t.get(c);
|
|
2088
2133
|
if (!l) {
|
|
2089
2134
|
let u = c.replace(/^\/|\/$/g, "");
|
|
@@ -2097,11 +2142,11 @@ function Br(e, t, n, r, i, a, o) {
|
|
|
2097
2142
|
$path: u
|
|
2098
2143
|
}, t.set(c, l), e.push(l);
|
|
2099
2144
|
}
|
|
2100
|
-
c.length < r.length && (l.hasChildren = !0,
|
|
2145
|
+
c.length < r.length && (l.hasChildren = !0, Kr(l.items, t, c, r, i, a + 1, o));
|
|
2101
2146
|
}
|
|
2102
2147
|
//#endregion
|
|
2103
2148
|
//#region src/utils/bisect.ts
|
|
2104
|
-
function
|
|
2149
|
+
function qr(e, t) {
|
|
2105
2150
|
return e.reduce((e, n) => (t(n) ? e.true.push(n) : e.false.push(n), e), {
|
|
2106
2151
|
true: [],
|
|
2107
2152
|
false: []
|
|
@@ -2109,34 +2154,34 @@ function Vr(e, t) {
|
|
|
2109
2154
|
}
|
|
2110
2155
|
//#endregion
|
|
2111
2156
|
//#region src/utils/concepts.ts
|
|
2112
|
-
var
|
|
2157
|
+
var Jr = /(([+-])?\(([^)]+)\))|(([+-])?\[([^\]]+)\])|(([+-])?"([^"]+)")|(([+-])?\/([^/]+)\/)|(([+-])?(\S+))/g, Yr = 2, Xr = 3, Zr = 5, Qr = 6, $r = 8, ei = 9, ti = 11, ni = 12, ri = 14, ii = 15;
|
|
2113
2158
|
function Q(e) {
|
|
2114
2159
|
if (!e) return [];
|
|
2115
|
-
let t = [], n = e.matchAll(
|
|
2116
|
-
for (let e of n) e[
|
|
2160
|
+
let t = [], n = e.matchAll(Jr);
|
|
2161
|
+
for (let e of n) e[Xr] ? t.push({
|
|
2117
2162
|
type: "group",
|
|
2118
|
-
value: e[Wr],
|
|
2119
|
-
op: e[Ur]
|
|
2120
|
-
}) : e[Kr] ? t.push({
|
|
2121
|
-
type: "adjacent",
|
|
2122
|
-
value: e[Kr],
|
|
2123
|
-
op: e[Gr]
|
|
2124
|
-
}) : e[Jr] ? t.push({
|
|
2125
|
-
type: "exact",
|
|
2126
|
-
value: e[Jr],
|
|
2127
|
-
op: e[qr]
|
|
2128
|
-
}) : e[Xr] ? t.push({
|
|
2129
|
-
type: "regex",
|
|
2130
2163
|
value: e[Xr],
|
|
2131
2164
|
op: e[Yr]
|
|
2132
|
-
}) : e[Qr]
|
|
2133
|
-
type: "
|
|
2165
|
+
}) : e[Qr] ? t.push({
|
|
2166
|
+
type: "adjacent",
|
|
2134
2167
|
value: e[Qr],
|
|
2135
2168
|
op: e[Zr]
|
|
2169
|
+
}) : e[ei] ? t.push({
|
|
2170
|
+
type: "exact",
|
|
2171
|
+
value: e[ei],
|
|
2172
|
+
op: e[$r]
|
|
2173
|
+
}) : e[ni] ? t.push({
|
|
2174
|
+
type: "regex",
|
|
2175
|
+
value: e[ni],
|
|
2176
|
+
op: e[ti]
|
|
2177
|
+
}) : e[ii] && t.push({
|
|
2178
|
+
type: "token",
|
|
2179
|
+
value: e[ii],
|
|
2180
|
+
op: e[ri]
|
|
2136
2181
|
});
|
|
2137
2182
|
return t;
|
|
2138
2183
|
}
|
|
2139
|
-
function
|
|
2184
|
+
function ai(e) {
|
|
2140
2185
|
return e.map((e) => {
|
|
2141
2186
|
let t = e.op || "";
|
|
2142
2187
|
switch (e.type) {
|
|
@@ -2149,39 +2194,39 @@ function $r(e) {
|
|
|
2149
2194
|
}
|
|
2150
2195
|
}).join(" ");
|
|
2151
2196
|
}
|
|
2152
|
-
function
|
|
2197
|
+
function oi(e, t, n) {
|
|
2153
2198
|
let r = Q(e);
|
|
2154
2199
|
for (let e of t) r.push({
|
|
2155
2200
|
type: "adjacent",
|
|
2156
2201
|
value: e,
|
|
2157
2202
|
op: n
|
|
2158
2203
|
});
|
|
2159
|
-
return
|
|
2204
|
+
return ai(r);
|
|
2160
2205
|
}
|
|
2161
|
-
function
|
|
2206
|
+
function si(e, t) {
|
|
2162
2207
|
let n = Q(t), r = n.findIndex((t) => t.value === e);
|
|
2163
|
-
return r === -1 ? t : (n.splice(r, 1),
|
|
2208
|
+
return r === -1 ? t : (n.splice(r, 1), ai(n));
|
|
2164
2209
|
}
|
|
2165
|
-
function
|
|
2166
|
-
return
|
|
2210
|
+
function ci(e) {
|
|
2211
|
+
return ai(Q(e).filter((e) => e.type !== "adjacent"));
|
|
2167
2212
|
}
|
|
2168
|
-
function
|
|
2213
|
+
function li(e) {
|
|
2169
2214
|
return Q(e).filter((e) => e.type === "adjacent").map((e) => e.value);
|
|
2170
2215
|
}
|
|
2171
2216
|
//#endregion
|
|
2172
2217
|
//#region src/utils/date.ts
|
|
2173
|
-
function
|
|
2174
|
-
let r = new Intl.RelativeTimeFormat(e, { numeric: "auto" }), { offset: i, unit: a, isFuture: o } =
|
|
2218
|
+
function ui(e, t, n) {
|
|
2219
|
+
let r = new Intl.RelativeTimeFormat(e, { numeric: "auto" }), { offset: i, unit: a, isFuture: o } = fi(t, n);
|
|
2175
2220
|
return r.format(i * (o ? 1 : -1), a);
|
|
2176
2221
|
}
|
|
2177
|
-
var
|
|
2222
|
+
var di = [
|
|
2178
2223
|
["year", 365],
|
|
2179
2224
|
["month", 30],
|
|
2180
2225
|
["week", 7],
|
|
2181
2226
|
["day", 1]
|
|
2182
2227
|
];
|
|
2183
|
-
function
|
|
2184
|
-
let n = new Date(e), r = t ? new Date(t) : /* @__PURE__ */ new Date(), i = Math.abs(r.getTime() - n.getTime()), a = Math.floor(i / 864e5), [o, s] =
|
|
2228
|
+
function fi(e, t) {
|
|
2229
|
+
let n = new Date(e), r = t ? new Date(t) : /* @__PURE__ */ new Date(), i = Math.abs(r.getTime() - n.getTime()), a = Math.floor(i / 864e5), [o, s] = di.find(([, e]) => a >= e) ?? ["day", 1];
|
|
2185
2230
|
return {
|
|
2186
2231
|
offset: Math.floor(a / s),
|
|
2187
2232
|
unit: o,
|
|
@@ -2190,13 +2235,13 @@ function oi(e, t) {
|
|
|
2190
2235
|
}
|
|
2191
2236
|
//#endregion
|
|
2192
2237
|
//#region src/utils/is-not-input-event.ts
|
|
2193
|
-
function
|
|
2238
|
+
function pi(e) {
|
|
2194
2239
|
let t = e.target;
|
|
2195
2240
|
return t && t.nodeName !== "INPUT" && t.nodeName !== "TEXTAREA";
|
|
2196
2241
|
}
|
|
2197
2242
|
//#endregion
|
|
2198
2243
|
//#region src/utils/notification.ts
|
|
2199
|
-
function
|
|
2244
|
+
function mi(e) {
|
|
2200
2245
|
let t = new CustomEvent("notification", {
|
|
2201
2246
|
bubbles: !0,
|
|
2202
2247
|
cancelable: !1,
|
|
@@ -2204,30 +2249,30 @@ function ci(e) {
|
|
|
2204
2249
|
});
|
|
2205
2250
|
dispatchEvent(t);
|
|
2206
2251
|
}
|
|
2207
|
-
var
|
|
2252
|
+
var hi = {
|
|
2208
2253
|
success: (e, t) => {
|
|
2209
|
-
|
|
2254
|
+
mi({
|
|
2210
2255
|
type: "success",
|
|
2211
2256
|
message: e,
|
|
2212
2257
|
options: t
|
|
2213
2258
|
});
|
|
2214
2259
|
},
|
|
2215
2260
|
info: (e, t) => {
|
|
2216
|
-
|
|
2261
|
+
mi({
|
|
2217
2262
|
type: "info",
|
|
2218
2263
|
message: e,
|
|
2219
2264
|
options: t
|
|
2220
2265
|
});
|
|
2221
2266
|
},
|
|
2222
2267
|
warning: (e, t) => {
|
|
2223
|
-
|
|
2268
|
+
mi({
|
|
2224
2269
|
type: "warning",
|
|
2225
2270
|
message: e,
|
|
2226
2271
|
options: t
|
|
2227
2272
|
});
|
|
2228
2273
|
},
|
|
2229
2274
|
error: (e, t) => {
|
|
2230
|
-
|
|
2275
|
+
mi({
|
|
2231
2276
|
type: "error",
|
|
2232
2277
|
message: e,
|
|
2233
2278
|
options: t
|
|
@@ -2236,13 +2281,13 @@ var li = {
|
|
|
2236
2281
|
};
|
|
2237
2282
|
//#endregion
|
|
2238
2283
|
//#region src/utils/query-params.ts
|
|
2239
|
-
function
|
|
2284
|
+
function gi(e) {
|
|
2240
2285
|
if (e === void 0) return;
|
|
2241
2286
|
let { q: t, f: n, p: r, s: i, t: a, n: o, b: s } = $(e), [c] = e.split("?");
|
|
2242
2287
|
return {
|
|
2243
2288
|
path: c,
|
|
2244
2289
|
text: t,
|
|
2245
|
-
filters: n ?
|
|
2290
|
+
filters: n ? yi(n) : void 0,
|
|
2246
2291
|
page: r ? parseInt(r, 10) : void 0,
|
|
2247
2292
|
sort: i,
|
|
2248
2293
|
tab: a,
|
|
@@ -2250,17 +2295,17 @@ function ui(e) {
|
|
|
2250
2295
|
basket: s
|
|
2251
2296
|
};
|
|
2252
2297
|
}
|
|
2253
|
-
function
|
|
2298
|
+
function _i(e) {
|
|
2254
2299
|
if (!e) return "";
|
|
2255
2300
|
let { text: t, filters: n, page: r, sort: i, tab: a, name: o, basket: s } = e, c = {};
|
|
2256
2301
|
return t && (c.q = t), n && (c.f = JSON.stringify(n)), r && (c.p = r.toString()), i && (c.s = i), a && (c.t = a), o && (c.n = o), s && (c.b = s), new URLSearchParams(c).toString() || "";
|
|
2257
2302
|
}
|
|
2258
|
-
function
|
|
2303
|
+
function vi(e) {
|
|
2259
2304
|
if (e === void 0) return [];
|
|
2260
2305
|
let { f: t } = $(e);
|
|
2261
|
-
return
|
|
2306
|
+
return yi(t);
|
|
2262
2307
|
}
|
|
2263
|
-
function
|
|
2308
|
+
function yi(e) {
|
|
2264
2309
|
let t = decodeURIComponent(e);
|
|
2265
2310
|
try {
|
|
2266
2311
|
return JSON.parse(t ?? "[]");
|
|
@@ -2274,41 +2319,41 @@ function $(e) {
|
|
|
2274
2319
|
let n = new URLSearchParams(t);
|
|
2275
2320
|
return Object.fromEntries(n);
|
|
2276
2321
|
}
|
|
2277
|
-
function
|
|
2322
|
+
function bi(e) {
|
|
2278
2323
|
let { q: t = "" } = $(e);
|
|
2279
2324
|
return t;
|
|
2280
2325
|
}
|
|
2281
|
-
function
|
|
2326
|
+
function xi(e) {
|
|
2282
2327
|
let { id: t } = $(e);
|
|
2283
2328
|
return t === void 0 ? void 0 : decodeURIComponent(t);
|
|
2284
2329
|
}
|
|
2285
|
-
function
|
|
2330
|
+
function Si(e) {
|
|
2286
2331
|
let { p: t = "0" } = $(e);
|
|
2287
2332
|
return parseInt(t, 10);
|
|
2288
2333
|
}
|
|
2289
|
-
function
|
|
2334
|
+
function Ci(e) {
|
|
2290
2335
|
let { t } = $(e);
|
|
2291
2336
|
return t;
|
|
2292
2337
|
}
|
|
2293
2338
|
//#endregion
|
|
2294
2339
|
//#region src/utils/syslang.ts
|
|
2295
|
-
function
|
|
2340
|
+
function wi(e, t) {
|
|
2296
2341
|
if (!e) return e;
|
|
2297
2342
|
let n = 0, r = e.length, i = 0;
|
|
2298
2343
|
if (e[i] === "[") {
|
|
2299
2344
|
for (; i < r && /[0-9]/.test(e[i]);) i++;
|
|
2300
2345
|
e[i] === "]" && (n = i + 1);
|
|
2301
2346
|
}
|
|
2302
|
-
let a =
|
|
2347
|
+
let a = Ti(e, n, !1);
|
|
2303
2348
|
if (!a) return e;
|
|
2304
2349
|
let o = t.charCodeAt(0), s = t.charCodeAt(1), c = a;
|
|
2305
2350
|
for (; c;) if (o === c.lang1 && s === c.lang2) {
|
|
2306
|
-
let t =
|
|
2351
|
+
let t = Ti(e, c.end + 4, !0);
|
|
2307
2352
|
return e.substring(t.start, t.end);
|
|
2308
|
-
} else c =
|
|
2353
|
+
} else c = Ti(e, c.end + 4, !1);
|
|
2309
2354
|
return e.substring(a.start, a.end) || e;
|
|
2310
2355
|
}
|
|
2311
|
-
function
|
|
2356
|
+
function Ti(e, t, n) {
|
|
2312
2357
|
for (let n = t, r = e.length - 3; n < r; n++) if (e[n] === "[" && e[n + 3] === "]") return {
|
|
2313
2358
|
start: t,
|
|
2314
2359
|
end: n,
|
|
@@ -2324,7 +2369,7 @@ function yi(e, t, n) {
|
|
|
2324
2369
|
}
|
|
2325
2370
|
//#endregion
|
|
2326
2371
|
//#region src/utils/utilities.ts
|
|
2327
|
-
function
|
|
2372
|
+
function Ei(e, t) {
|
|
2328
2373
|
let { useLocale: n, useLocaleAsPrefix: r, indexFile: i, path: a, folder: o } = t, s = n ? `${e}/` : null, c = r ? `${e}.${i}` : i ?? "";
|
|
2329
2374
|
return [
|
|
2330
2375
|
a,
|
|
@@ -2334,24 +2379,24 @@ function bi(e, t) {
|
|
|
2334
2379
|
}
|
|
2335
2380
|
//#endregion
|
|
2336
2381
|
//#region src/web-api/helpers/utils/date-utils.ts
|
|
2337
|
-
function
|
|
2382
|
+
function Di(e) {
|
|
2338
2383
|
if (!e) return;
|
|
2339
2384
|
let t = new Date(e);
|
|
2340
2385
|
return Number.isNaN(t.getTime()) ? void 0 : t;
|
|
2341
2386
|
}
|
|
2342
|
-
function
|
|
2343
|
-
let t =
|
|
2387
|
+
function Oi(e) {
|
|
2388
|
+
let t = Di(e);
|
|
2344
2389
|
return !!t && t.getTime() <= Date.now();
|
|
2345
2390
|
}
|
|
2346
|
-
function
|
|
2347
|
-
let n =
|
|
2391
|
+
function ki(e, t = 7) {
|
|
2392
|
+
let n = Di(e);
|
|
2348
2393
|
if (!n) return !1;
|
|
2349
2394
|
let r = Date.now(), i = r + t * 24 * 60 * 60 * 1e3, a = n.getTime();
|
|
2350
2395
|
return a > r && a <= i;
|
|
2351
2396
|
}
|
|
2352
2397
|
//#endregion
|
|
2353
2398
|
//#region src/web-api/helpers/utils/with-retry.ts
|
|
2354
|
-
async function
|
|
2399
|
+
async function Ai(e, t = 0, n = 1e3) {
|
|
2355
2400
|
let r;
|
|
2356
2401
|
for (let i = 0; i <= t; i++) try {
|
|
2357
2402
|
return await e();
|
|
@@ -2362,4 +2407,4 @@ async function wi(e, t = 0, n = 1e3) {
|
|
|
2362
2407
|
throw r;
|
|
2363
2408
|
}
|
|
2364
2409
|
//#endregion
|
|
2365
|
-
export {
|
|
2410
|
+
export { lr as $, h as $n, Kt as $t, Ir as A, Ze as An, Cn as At, wr as B, Ne as Bn, sn as Bt, si as C, Ct as Cn, Ln as Ct, Pr as D, rt as Dn, Dn as Dt, qr as E, it as En, Tn as Et, jr as F, Ge as Fn, un as Ft, hr as G, ke as Gn, rn as Gt, Cr as H, je as Hn, q as Ht, Nr as I, L as In, dn as It, mr as J, Oe as Jn, K as Jt, br as K, A as Kn, tn as Kt, Or as L, Ve as Ln, mn as Lt, Hr as M, R as Mn, vn as Mt, Gr as N, Je as Nn, yn as Nt, Ur as O, tt as On, En as Ot, Lr as P, qe as Pn, fn as Pt, ur as Q, de as Qn, G as Qt, Tr as R, Be as Rn, an as Rt, Q as S, Tt as Sn, In as St, ai as T, mt as Tn, Y as Tt, xr as U, M as Un, cn as Ut, Er as V, N as Vn, ln as Vt, yr as W, Ae as Wn, pn as Wt, pr as X, De as Xn, $t as Xt, vr as Y, D as Yn, en as Yt, gr as Z, Ee as Zn, Xt as Zt, pi as _, Mt as _n, Hn as _t, Ei as a, Ut as an, ne as ar, ir as at, oi as b, kt as bn, Bn as bt, vi as c, Vt as cn, ee as cr, $n as ct, gi as d, It as dn, d as dr, Xn as dt, Gt as en, ue as er, or as et, Ci as f, Lt as fn, o as fr, Jn as ft, hi as g, B as gn, n as gr, Wn as gt, $ as h, Nt as hn, c as hr, Gn as ht, Di as i, H as in, f as ir, nr as it, Wr as j, Ye as jn, J as jt, Fr as k, et as kn, wn as kt, xi as l, Rt as ln, te as lr, Qn as lt, _i as m, V as mn, s as mr, Kn as mt, ki as n, W as nn, m as nr, sr as nt, wi as o, zt as on, re as or, rr as ot, bi as p, Pt as pn, l as pr, qn as pt, _r as q, k as qn, nn as qt, Oi as r, U as rn, ie as rr, ar as rt, yi as s, Ht as sn, p as sr, er as st, Ai as t, Wt as tn, ae as tr, cr as tt, Si as u, Ft as un, r as ur, Zn as ut, fi as v, z as vn, Rn as vt, ci as w, yt as wn, On as wt, li as x, Dt as xn, Vn as xt, ui as y, jt as yn, zn as yt, Dr as z, I as zn, on as zt };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/agent-workspace/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
|
|
@@ -40,17 +40,17 @@ export interface UploadJobStatus {
|
|
|
40
40
|
startedAt?: string;
|
|
41
41
|
completedAt?: string | null;
|
|
42
42
|
}
|
|
43
|
-
/** The jobs of one
|
|
44
|
-
export interface
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
/** The jobs of one workspace. */
|
|
44
|
+
export interface UploadStatusWorkspace {
|
|
45
|
+
workspaceId: string;
|
|
46
|
+
workspaceName: string;
|
|
47
47
|
jobs?: UploadJobStatus[];
|
|
48
48
|
}
|
|
49
|
-
/** Response of `GET api/v2/
|
|
49
|
+
/** Response of `GET api/v2/agent-workspace/status`. */
|
|
50
50
|
export interface UploadStatusResponse {
|
|
51
|
-
/** Only
|
|
52
|
-
|
|
53
|
-
/** Match count BEFORE paging — not the length of `
|
|
51
|
+
/** Only workspaces the caller can read that have at least one job in the page. */
|
|
52
|
+
workspaces?: UploadStatusWorkspace[];
|
|
53
|
+
/** Match count BEFORE paging — not the length of `workspaces`. */
|
|
54
54
|
totalJobCount: number;
|
|
55
55
|
}
|
|
56
56
|
//# sourceMappingURL=upload-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-status.d.ts","sourceRoot":"","sources":["../../../src/types/
|
|
1
|
+
{"version":3,"file":"upload-status.d.ts","sourceRoot":"","sources":["../../../src/types/agent-workspace/upload-status.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AAErF,sCAAsC;AACtC,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE/F,6CAA6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,+CAA+C;AAC/C,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,eAAe,CAAC;IAC9B,cAAc,EAAE,iBAAiB,CAAC;IAClC,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,iCAAiC;AACjC,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED,uDAAuD;AACvD,MAAM,WAAW,oBAAoB;IACnC,kFAAkF;IAClF,UAAU,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACrC,kEAAkE;IAClE,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Wire shape of a document stored inside
|
|
3
|
-
* "
|
|
2
|
+
* Wire shape of a document stored inside an Agent Workspace workspace, per the
|
|
3
|
+
* "Workspace management" API (ES-32400, Confluence space SNQARND). Only
|
|
4
4
|
* carries what the API returns — no `size`/`source`/`uploadedBy`, unlike a
|
|
5
5
|
* fully-featured upload-tracker document; callers deriving a richer view
|
|
6
6
|
* model must fill those in separately (e.g. `size` from a HEAD request,
|
|
7
7
|
* `type` from the file extension).
|
|
8
8
|
*/
|
|
9
|
-
export interface
|
|
9
|
+
export interface WorkspaceDocument {
|
|
10
10
|
id: string;
|
|
11
11
|
name: string;
|
|
12
|
-
|
|
12
|
+
workspaceId: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
}
|
|
15
|
-
/** Paginated response of `GET .../
|
|
16
|
-
export interface
|
|
15
|
+
/** Paginated response of `GET .../agent-workspace/workspace/{id}/documents`. */
|
|
16
|
+
export interface WorkspaceDocumentListResponse {
|
|
17
17
|
page: number;
|
|
18
18
|
pageSize: number;
|
|
19
19
|
total: number;
|
|
20
|
-
documents:
|
|
20
|
+
documents: WorkspaceDocument[];
|
|
21
21
|
}
|
|
22
|
-
//# sourceMappingURL=
|
|
22
|
+
//# sourceMappingURL=workspace-document.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"workspace-document.d.ts","sourceRoot":"","sources":["../../../src/types/agent-workspace/workspace-document.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,gFAAgF;AAChF,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAChC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The current user's role on a workspace, as returned by the API — drives
|
|
3
|
+
* which mutations a caller is allowed to attempt (only `owner`/`creator` can
|
|
4
|
+
* edit or share; only `creator` is fixed and never assignable).
|
|
5
|
+
*/
|
|
6
|
+
export type WorkspaceRole = "creator" | "owner" | "reader";
|
|
7
|
+
/**
|
|
8
|
+
* Wire shape of an Agent Workspace workspace, per the "Workspace management"
|
|
9
|
+
* API (ES-32400, Confluence space SNQARND). Consumed by
|
|
10
|
+
* `listWorkspaces`/`getWorkspace`/`createWorkspace`/`updateWorkspace` in
|
|
11
|
+
* `../../web-api/v2/fetch-agent-workspace`.
|
|
12
|
+
*/
|
|
13
|
+
export interface Workspace {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
tags: string[];
|
|
18
|
+
creator: string;
|
|
19
|
+
owners: string[];
|
|
20
|
+
readers: string[];
|
|
21
|
+
documentCount: number;
|
|
22
|
+
currentUserRole: WorkspaceRole;
|
|
23
|
+
}
|
|
24
|
+
/** Paginated response of `GET .../agent-workspace/workspace`. */
|
|
25
|
+
export interface WorkspaceListResponse {
|
|
26
|
+
page: number;
|
|
27
|
+
pageSize: number;
|
|
28
|
+
total: number;
|
|
29
|
+
workspaces: Workspace[];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=workspace.d.ts.map
|
package/dist/types/{document-upload/container.d.ts.map → agent-workspace/workspace.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/types/agent-workspace/workspace.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,aAAa,CAAC;CAChC;AAED,iEAAiE;AACjE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
type StringWithAutocomplete<T> = T | (string & Record<never, never>);
|
|
2
|
-
export type API_ENDPOINTS = StringWithAutocomplete<"api/v1/app" | "api/v1/audit.notify" | "api/v1/challenge" | "api/v1/doc.textchunks" | "api/v1/labels" | "api/v1/multi" | "api/v1/OriginalDocMerge" | "api/v1/plugin" | "api/v1/preview" | "api/v1/principal" | "api/v1/principal/list" | "api/v1/principal/userids" | "api/v1/query" | "api/v1/query.export" | "api/v1/query.links" | "api/v1/queryintent" | "api/v1/ratings" | "api/v1/recentqueries" | "api/v1/search.dataset" | "api/v1/search.rfm" | "api/v1/search.suggest" | "api/v1/search.queryexport" | "api/v1/similardocuments" | "api/v1/suggestfield" | "api/v1/suggestquery" | "api/v1/usersettings" | "api/v1/security.webtoken" | "api/v1/security.oauth" | "api/v1/security.saml" | "api/v1/security.principal" | "api/v2/
|
|
2
|
+
export type API_ENDPOINTS = StringWithAutocomplete<"api/v1/app" | "api/v1/audit.notify" | "api/v1/challenge" | "api/v1/doc.textchunks" | "api/v1/labels" | "api/v1/multi" | "api/v1/OriginalDocMerge" | "api/v1/plugin" | "api/v1/preview" | "api/v1/principal" | "api/v1/principal/list" | "api/v1/principal/userids" | "api/v1/query" | "api/v1/query.export" | "api/v1/query.links" | "api/v1/queryintent" | "api/v1/ratings" | "api/v1/recentqueries" | "api/v1/search.dataset" | "api/v1/search.rfm" | "api/v1/search.suggest" | "api/v1/search.queryexport" | "api/v1/similardocuments" | "api/v1/suggestfield" | "api/v1/suggestquery" | "api/v1/usersettings" | "api/v1/security.webtoken" | "api/v1/security.oauth" | "api/v1/security.saml" | "api/v1/security.principal" | "api/v2/agent-workspace/workspace" | "api/v2/agent-workspace/workspaces" | "api/v2/agent-workspace/status">;
|
|
3
3
|
export {};
|
|
4
4
|
//# sourceMappingURL=api-endpoints.d.ts.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export * from "./audit";
|
|
|
4
4
|
export * from "./chunks";
|
|
5
5
|
export * from "./config";
|
|
6
6
|
export * from "./credentials";
|
|
7
|
-
export * from "./
|
|
7
|
+
export * from "./agent-workspace";
|
|
8
8
|
export * from "./export/types";
|
|
9
9
|
export * from "./filters";
|
|
10
10
|
export * from "./interfaces";
|
|
@@ -65,6 +65,15 @@ export type Query = {
|
|
|
65
65
|
* Specifies the name of the current sort selection for the query. See {@link CCSortingChoice}
|
|
66
66
|
*/
|
|
67
67
|
sort?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Per-column overrides of the aggregation configuration, keyed by column name.
|
|
70
|
+
*
|
|
71
|
+
* `mask` makes the engine aggregate a date column at that granularity (`YYYY`, `YYYY-MM`…): the items
|
|
72
|
+
* then hold masked values, and a filter on that column is compared at the same granularity.
|
|
73
|
+
*/
|
|
74
|
+
aggregation_overrides?: Record<string, {
|
|
75
|
+
mask?: string;
|
|
76
|
+
}>;
|
|
68
77
|
/**
|
|
69
78
|
* Specifies the name of a basket of document results to retrieve. If specified then the search results will be
|
|
70
79
|
* trimmed to only contain documents included in the specified basket
|