react-semaphor 0.1.319 → 0.1.321
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/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +4 -4
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +657 -227
- package/dist/chunks/{braces-NfG5hX2c.js → braces-C7BeIXvM.js} +1 -1
- package/dist/chunks/{braces-CDPz6CF2.js → braces-Cy5NEBa8.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-DLKB05SY.js → calendar-preferences-dialog-CzoSmQNw.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-DPaVsZlk.js → calendar-preferences-dialog-D-0W76fR.js} +3 -3
- package/dist/chunks/{chevrons-up-down-DiWloubI.js → chevrons-up-down-Cuilz9aY.js} +1 -1
- package/dist/chunks/{chevrons-up-down-BsdQRmJL.js → chevrons-up-down-DZTs1oVD.js} +1 -1
- package/dist/chunks/dashboard-briefing-launcher-Cqm8NnVb.js +106 -0
- package/dist/chunks/{dashboard-briefing-launcher-DR_i0anv.js → dashboard-briefing-launcher-D5z1kf6J.js} +2238 -2139
- package/dist/chunks/{dashboard-controls-8J06Ot-K.js → dashboard-controls-CRIwHD59.js} +94 -94
- package/dist/chunks/{dashboard-controls-BNAIucBl.js → dashboard-controls-DSt7iwFC.js} +1 -1
- package/dist/chunks/{dashboard-json-DIsACFCO.js → dashboard-json-BRx9CbrK.js} +2 -2
- package/dist/chunks/{dashboard-json-B_Li7wO5.js → dashboard-json-ezFjz7Fc.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-2CBS2I52.js → edit-dashboard-visual-Cw0KmT4i.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-BGnC2DH7.js → edit-dashboard-visual-sI6ds8MP.js} +616 -616
- package/dist/chunks/{index-DYycYzpZ.js → index-BZg7rVe-.js} +27161 -26641
- package/dist/chunks/{index-cxoegFH9.js → index-DX6Krdga.js} +215 -210
- package/dist/chunks/{palette-BlxLchHy.js → palette-Bc-vOLSt.js} +1 -1
- package/dist/chunks/{palette-CJTdBzJB.js → palette-CanPG11m.js} +1 -1
- package/dist/chunks/resource-management-panel-CRRUcnVu.js +6 -0
- package/dist/chunks/{resource-management-panel-YtbKp2kW.js → resource-management-panel-pN81x7Gw.js} +451 -369
- package/dist/chunks/{save-DVRQBMeb.js → save-CXa6cKaY.js} +1 -1
- package/dist/chunks/{save-B8x5Vi0W.js → save-CqrBQKG6.js} +1 -1
- package/dist/chunks/{switch-DPaKnsb8.js → switch-BXICAlvS.js} +2 -2
- package/dist/chunks/{switch-sauemjyY.js → switch-DdTUsWgd.js} +127 -127
- package/dist/chunks/{use-create-flow-overlay-state-Qnd7FF6L.js → use-create-flow-overlay-state-B9ujZUon.js} +104 -104
- package/dist/chunks/{use-create-flow-overlay-state-DQZneUXL.js → use-create-flow-overlay-state-BfV5187a.js} +1 -1
- package/dist/chunks/{use-visual-utils-BdMhr0YR.js → use-visual-utils-D_uHFfTn.js} +1 -1
- package/dist/chunks/{use-visual-utils-t73RlvjS.js → use-visual-utils-PxijRlpS.js} +2 -2
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -0
- package/dist/dashboard-authoring/index.js +532 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +7 -7
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings.d.ts +111 -0
- package/dist/types/dashboard-authoring.d.ts +2703 -0
- package/package.json +6 -1
- package/dist/chunks/dashboard-briefing-launcher-F3qKyuGr.js +0 -106
- package/dist/chunks/resource-management-panel-BwNGxqrB.js +0 -6
package/dist/briefings/index.js
CHANGED
|
@@ -1,43 +1,76 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
const
|
|
1
|
+
var W = Object.defineProperty;
|
|
2
|
+
var Y = (n, t, e) => t in n ? W(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var F = (n, t, e) => Y(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
const w = "BRIEFING", Z = ["markdown", "html"], V = ["markdown"], De = 20, l = {
|
|
5
5
|
name: 500,
|
|
6
6
|
description: 2e3,
|
|
7
7
|
instruction: 5e4,
|
|
8
8
|
customMessage: 5e4,
|
|
9
|
+
contentTitle: 500,
|
|
10
|
+
contentSummary: 2e4,
|
|
11
|
+
contentText: 5e3,
|
|
12
|
+
contentItem: 2e3,
|
|
13
|
+
contentCell: 500,
|
|
9
14
|
attachmentTitle: 500,
|
|
10
15
|
presentationAudience: 1e3,
|
|
11
16
|
presentationTone: 500,
|
|
12
17
|
presentationFormat: 2e3,
|
|
13
18
|
id: 500
|
|
14
|
-
},
|
|
19
|
+
}, g = {
|
|
20
|
+
maxBlocks: 50,
|
|
21
|
+
maxTableRows: 100,
|
|
22
|
+
maxTableColumns: 20,
|
|
23
|
+
maxTableCellCharacters: l.contentCell,
|
|
24
|
+
maxParagraphCharacters: l.contentText,
|
|
25
|
+
maxFindingCharacters: l.contentText,
|
|
26
|
+
maxListItems: 100,
|
|
27
|
+
// A kpi_grid is rendered as a 2-up tile arrangement in emails. Cap at 8 so
|
|
28
|
+
// the visual stays at most 4 rows (4 columns wide on desktop would force
|
|
29
|
+
// tiny tiles in narrow client panels; 2-up was the chosen layout).
|
|
30
|
+
maxKpiTiles: 8
|
|
31
|
+
}, M = new Set(Z), Q = /* @__PURE__ */ new Set([
|
|
15
32
|
"EMAIL",
|
|
16
33
|
"WEBHOOK",
|
|
17
34
|
"SLACK",
|
|
18
35
|
"IN_APP",
|
|
19
36
|
"TELEGRAM"
|
|
20
|
-
]),
|
|
37
|
+
]), L = {
|
|
21
38
|
maxToolCalls: { min: 1, max: 100 },
|
|
22
39
|
maxRows: { min: 1, max: 1e5 },
|
|
23
40
|
timeoutMs: { min: 1e3, max: 30 * 6e4 }
|
|
24
|
-
},
|
|
41
|
+
}, ee = /* @__PURE__ */ new Set([
|
|
25
42
|
"letter",
|
|
26
43
|
"legal",
|
|
27
44
|
"a4",
|
|
28
45
|
"a3",
|
|
29
46
|
"tabloid"
|
|
30
|
-
]),
|
|
47
|
+
]), te = /* @__PURE__ */ new Set([
|
|
31
48
|
"portrait",
|
|
32
49
|
"landscape"
|
|
33
|
-
]),
|
|
50
|
+
]), ne = /* @__PURE__ */ new Set([",", ";", " "]), re = /* @__PURE__ */ new Set([
|
|
34
51
|
"current",
|
|
35
52
|
"all"
|
|
36
|
-
]),
|
|
53
|
+
]), oe = /* @__PURE__ */ new Set([
|
|
37
54
|
"concise",
|
|
38
55
|
"balanced",
|
|
39
56
|
"detailed"
|
|
40
|
-
]),
|
|
57
|
+
]), ie = /* @__PURE__ */ new Set([
|
|
58
|
+
"info",
|
|
59
|
+
"positive",
|
|
60
|
+
"warning",
|
|
61
|
+
"critical"
|
|
62
|
+
]), ae = /* @__PURE__ */ new Set([
|
|
63
|
+
"text",
|
|
64
|
+
"number",
|
|
65
|
+
"currency",
|
|
66
|
+
"percent",
|
|
67
|
+
"date",
|
|
68
|
+
"boolean"
|
|
69
|
+
]), ce = /* @__PURE__ */ new Set([
|
|
70
|
+
"left",
|
|
71
|
+
"center",
|
|
72
|
+
"right"
|
|
73
|
+
]), de = [
|
|
41
74
|
"pageSize",
|
|
42
75
|
"orientation",
|
|
43
76
|
"includeFilters",
|
|
@@ -62,23 +95,23 @@ const A = "BRIEFING", q = ["markdown", "html"], S = ["markdown"], Ie = 20, l = {
|
|
|
62
95
|
"cardType",
|
|
63
96
|
"theme"
|
|
64
97
|
];
|
|
65
|
-
class
|
|
98
|
+
class S extends Error {
|
|
66
99
|
constructor(e) {
|
|
67
100
|
super(e.map((r) => `${r.field}: ${r.message}`).join("; "));
|
|
68
|
-
|
|
101
|
+
F(this, "issues");
|
|
69
102
|
this.name = "BriefingContractError", this.issues = e;
|
|
70
103
|
}
|
|
71
104
|
}
|
|
72
|
-
function
|
|
105
|
+
function P(n) {
|
|
73
106
|
return typeof n == "object" && n !== null && !Array.isArray(n);
|
|
74
107
|
}
|
|
75
108
|
function c(n, t, e) {
|
|
76
109
|
n.push({ field: t, message: e });
|
|
77
110
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
111
|
+
function v(n, t, e) {
|
|
112
|
+
return P(n) ? n : (c(e, t, "Expected an object."), {});
|
|
80
113
|
}
|
|
81
|
-
function
|
|
114
|
+
function f(n, t, e, r) {
|
|
82
115
|
const o = new Set(e);
|
|
83
116
|
Object.keys(n).forEach((i) => {
|
|
84
117
|
o.has(i) || c(
|
|
@@ -94,7 +127,7 @@ function u(n, t, e, r) {
|
|
|
94
127
|
const o = n.trim();
|
|
95
128
|
return o ? (o.length > e && c(r, t, `Must be ${e} characters or fewer.`), o) : (c(r, t, "Required value cannot be empty."), "");
|
|
96
129
|
}
|
|
97
|
-
function
|
|
130
|
+
function y(n, t, e, r) {
|
|
98
131
|
if (n == null)
|
|
99
132
|
return;
|
|
100
133
|
if (typeof n != "string") {
|
|
@@ -105,20 +138,45 @@ function p(n, t, e, r) {
|
|
|
105
138
|
if (o)
|
|
106
139
|
return o.length > e && c(r, t, `Must be ${e} characters or fewer.`), o;
|
|
107
140
|
}
|
|
108
|
-
function
|
|
141
|
+
function le(n, t, e) {
|
|
142
|
+
if (n != null) {
|
|
143
|
+
if (!Number.isInteger(n) || Number(n) < 0) {
|
|
144
|
+
c(e, t, "Expected a non-negative integer.");
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
return Number(n);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function $(n, t, e, r = {}) {
|
|
151
|
+
if (n == null)
|
|
152
|
+
return r.required ? (c(e, t, "Expected at least one evidence id."), []) : void 0;
|
|
153
|
+
if (!Array.isArray(n))
|
|
154
|
+
return c(e, t, "Expected an array."), r.required ? [] : void 0;
|
|
155
|
+
const o = [];
|
|
156
|
+
return n.forEach((i, a) => {
|
|
157
|
+
const d = u(
|
|
158
|
+
i,
|
|
159
|
+
`${t}.${a}`,
|
|
160
|
+
l.id,
|
|
161
|
+
e
|
|
162
|
+
);
|
|
163
|
+
d && !o.includes(d) && o.push(d);
|
|
164
|
+
}), r.required && o.length === 0 && c(e, t, "Expected at least one evidence id."), o.length > 0 || r.required ? o : void 0;
|
|
165
|
+
}
|
|
166
|
+
function C(n, t, e, r) {
|
|
109
167
|
return n == null ? t : typeof n != "boolean" ? (c(r, e, "Expected a boolean."), t) : n;
|
|
110
168
|
}
|
|
111
|
-
function
|
|
169
|
+
function se(n, t) {
|
|
112
170
|
return n == null ? "ACTIVE" : n === "ACTIVE" || n === "PAUSED" || n === "DISABLED" ? n : (c(t, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
|
|
113
171
|
}
|
|
114
|
-
function
|
|
172
|
+
function fe(n) {
|
|
115
173
|
return n.includes("@") && n.includes(".") && !n.includes(" ");
|
|
116
174
|
}
|
|
117
|
-
function
|
|
175
|
+
function j(n, t) {
|
|
118
176
|
if (n == null)
|
|
119
177
|
return { type: "project" };
|
|
120
|
-
const e =
|
|
121
|
-
return r === "project" ? (
|
|
178
|
+
const e = v(n, "source", t), r = e.type;
|
|
179
|
+
return r === "project" ? (f(e, "source", ["type"], t), { type: "project" }) : r === "dashboard" ? (f(e, "source", ["type", "dashboardId"], t), {
|
|
122
180
|
type: "dashboard",
|
|
123
181
|
dashboardId: u(
|
|
124
182
|
e.dashboardId,
|
|
@@ -128,9 +186,9 @@ function B(n, t) {
|
|
|
128
186
|
)
|
|
129
187
|
}) : (c(t, "source.type", "Expected project or dashboard."), { type: "project" });
|
|
130
188
|
}
|
|
131
|
-
function
|
|
132
|
-
const e =
|
|
133
|
-
return r === "generated_analysis" ? (
|
|
189
|
+
function K(n, t) {
|
|
190
|
+
const e = v(n, "body", t), r = e.type;
|
|
191
|
+
return r === "generated_analysis" ? (f(e, "body", ["type", "instruction"], t), {
|
|
134
192
|
type: "generated_analysis",
|
|
135
193
|
instruction: u(
|
|
136
194
|
e.instruction,
|
|
@@ -138,7 +196,7 @@ function F(n, t) {
|
|
|
138
196
|
l.instruction,
|
|
139
197
|
t
|
|
140
198
|
)
|
|
141
|
-
}) : r === "custom_message" ? (
|
|
199
|
+
}) : r === "custom_message" ? (f(e, "body", ["type", "message"], t), {
|
|
142
200
|
type: "custom_message",
|
|
143
201
|
message: u(
|
|
144
202
|
e.message,
|
|
@@ -146,17 +204,17 @@ function F(n, t) {
|
|
|
146
204
|
l.customMessage,
|
|
147
205
|
t
|
|
148
206
|
)
|
|
149
|
-
}) : r === "none" ? (
|
|
207
|
+
}) : r === "none" ? (f(e, "body", ["type"], t), { type: "none" }) : (c(
|
|
150
208
|
t,
|
|
151
209
|
"body.type",
|
|
152
210
|
"Expected generated_analysis, custom_message, or none."
|
|
153
211
|
), { type: "none" });
|
|
154
212
|
}
|
|
155
|
-
function
|
|
213
|
+
function me(n, t) {
|
|
156
214
|
if (n == null)
|
|
157
|
-
return [...
|
|
215
|
+
return [...V];
|
|
158
216
|
if (!Array.isArray(n))
|
|
159
|
-
return c(t, "presentation.artifactFormats", "Expected an array."), [...
|
|
217
|
+
return c(t, "presentation.artifactFormats", "Expected an array."), [...V];
|
|
160
218
|
if (n.length === 0)
|
|
161
219
|
return c(
|
|
162
220
|
t,
|
|
@@ -165,7 +223,7 @@ function te(n, t) {
|
|
|
165
223
|
), [];
|
|
166
224
|
const e = [];
|
|
167
225
|
return n.forEach((r, o) => {
|
|
168
|
-
if (typeof r != "string" || !
|
|
226
|
+
if (typeof r != "string" || !M.has(r)) {
|
|
169
227
|
c(
|
|
170
228
|
t,
|
|
171
229
|
`presentation.artifactFormats.${o}`,
|
|
@@ -176,45 +234,45 @@ function te(n, t) {
|
|
|
176
234
|
e.includes(r) || e.push(r);
|
|
177
235
|
}), e;
|
|
178
236
|
}
|
|
179
|
-
function
|
|
237
|
+
function q(n, t) {
|
|
180
238
|
if (n == null)
|
|
181
239
|
return {
|
|
182
|
-
artifactFormats: [...
|
|
240
|
+
artifactFormats: [...V],
|
|
183
241
|
includeEvidence: !0,
|
|
184
242
|
includeSql: !0
|
|
185
243
|
};
|
|
186
|
-
const e =
|
|
187
|
-
|
|
244
|
+
const e = v(n, "presentation", t);
|
|
245
|
+
f(
|
|
188
246
|
e,
|
|
189
247
|
"presentation",
|
|
190
248
|
["artifactFormats", "includeEvidence", "includeSql", "audience", "tone", "format"],
|
|
191
249
|
t
|
|
192
250
|
);
|
|
193
251
|
const r = {
|
|
194
|
-
artifactFormats:
|
|
195
|
-
includeEvidence:
|
|
252
|
+
artifactFormats: me(e.artifactFormats, t),
|
|
253
|
+
includeEvidence: C(
|
|
196
254
|
e.includeEvidence,
|
|
197
255
|
!0,
|
|
198
256
|
"presentation.includeEvidence",
|
|
199
257
|
t
|
|
200
258
|
),
|
|
201
|
-
includeSql:
|
|
259
|
+
includeSql: C(
|
|
202
260
|
e.includeSql,
|
|
203
261
|
!0,
|
|
204
262
|
"presentation.includeSql",
|
|
205
263
|
t
|
|
206
264
|
)
|
|
207
|
-
}, o =
|
|
265
|
+
}, o = y(
|
|
208
266
|
e.audience,
|
|
209
267
|
"presentation.audience",
|
|
210
268
|
l.presentationAudience,
|
|
211
269
|
t
|
|
212
|
-
), i =
|
|
270
|
+
), i = y(
|
|
213
271
|
e.tone,
|
|
214
272
|
"presentation.tone",
|
|
215
273
|
l.presentationTone,
|
|
216
274
|
t
|
|
217
|
-
), a =
|
|
275
|
+
), a = y(
|
|
218
276
|
e.format,
|
|
219
277
|
"presentation.format",
|
|
220
278
|
l.presentationFormat,
|
|
@@ -222,17 +280,386 @@ function O(n, t) {
|
|
|
222
280
|
);
|
|
223
281
|
return o && (r.audience = o), i && (r.tone = i), a && (r.format = a), r;
|
|
224
282
|
}
|
|
225
|
-
function
|
|
283
|
+
function pe(n, t, e) {
|
|
284
|
+
return Array.isArray(n) ? (n.length === 0 && c(e, t, "Expected at least one item."), n.length > g.maxListItems && c(
|
|
285
|
+
e,
|
|
286
|
+
t,
|
|
287
|
+
`Must have ${g.maxListItems} items or fewer.`
|
|
288
|
+
), n.slice(0, g.maxListItems).map(
|
|
289
|
+
(r, o) => u(
|
|
290
|
+
r,
|
|
291
|
+
`${t}.${o}`,
|
|
292
|
+
l.contentItem,
|
|
293
|
+
e
|
|
294
|
+
)
|
|
295
|
+
).filter(Boolean)) : (c(e, t, "Expected an array."), []);
|
|
296
|
+
}
|
|
297
|
+
function ue(n, t, e) {
|
|
298
|
+
return n === null || typeof n == "string" || typeof n == "number" || typeof n == "boolean" ? typeof n == "string" && n.length > l.contentCell ? (c(
|
|
299
|
+
e,
|
|
300
|
+
t,
|
|
301
|
+
`Must be ${l.contentCell} characters or fewer.`
|
|
302
|
+
), n.slice(0, l.contentCell)) : typeof n == "number" && !Number.isFinite(n) ? (c(e, t, "Expected a finite number."), null) : n : (c(e, t, "Expected a string, number, boolean, or null."), null);
|
|
303
|
+
}
|
|
304
|
+
function ye(n, t, e) {
|
|
305
|
+
if (!Array.isArray(n))
|
|
306
|
+
return c(e, t, "Expected an array."), [];
|
|
307
|
+
n.length === 0 && c(e, t, "Expected at least one column."), n.length > g.maxTableColumns && c(
|
|
308
|
+
e,
|
|
309
|
+
t,
|
|
310
|
+
`Must have ${g.maxTableColumns} columns or fewer.`
|
|
311
|
+
);
|
|
312
|
+
const r = /* @__PURE__ */ new Set();
|
|
313
|
+
return n.slice(0, g.maxTableColumns).map((o, i) => {
|
|
314
|
+
const a = `${t}.${i}`, d = v(o, a, e);
|
|
315
|
+
f(d, a, ["key", "label", "kind", "align"], e);
|
|
316
|
+
const m = u(
|
|
317
|
+
d.key,
|
|
318
|
+
`${a}.key`,
|
|
319
|
+
l.id,
|
|
320
|
+
e
|
|
321
|
+
);
|
|
322
|
+
m && (r.has(m) && c(e, `${a}.key`, "Column key must be unique."), r.add(m));
|
|
323
|
+
const s = u(
|
|
324
|
+
d.label,
|
|
325
|
+
`${a}.label`,
|
|
326
|
+
l.contentTitle,
|
|
327
|
+
e
|
|
328
|
+
), p = E(
|
|
329
|
+
d.kind,
|
|
330
|
+
`${a}.kind`,
|
|
331
|
+
ae,
|
|
332
|
+
"text, number, currency, percent, date, or boolean",
|
|
333
|
+
e
|
|
334
|
+
), I = E(
|
|
335
|
+
d.align,
|
|
336
|
+
`${a}.align`,
|
|
337
|
+
ce,
|
|
338
|
+
"left, center, or right",
|
|
339
|
+
e
|
|
340
|
+
);
|
|
341
|
+
return {
|
|
342
|
+
key: m,
|
|
343
|
+
label: s,
|
|
344
|
+
...p ? { kind: p } : {},
|
|
345
|
+
...I ? { align: I } : {}
|
|
346
|
+
};
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
function he(n, t, e, r) {
|
|
350
|
+
if (!Array.isArray(n))
|
|
351
|
+
return c(r, t, "Expected an array."), [];
|
|
352
|
+
n.length > g.maxTableRows && c(
|
|
353
|
+
r,
|
|
354
|
+
t,
|
|
355
|
+
`Must have ${g.maxTableRows} rows or fewer.`
|
|
356
|
+
);
|
|
357
|
+
const o = new Set(e.map((i) => i.key).filter(Boolean));
|
|
358
|
+
return n.slice(0, g.maxTableRows).map((i, a) => {
|
|
359
|
+
const d = `${t}.${a}`, m = v(i, d, r);
|
|
360
|
+
return Object.keys(m).forEach((s) => {
|
|
361
|
+
o.has(s) || c(r, `${d}.${s}`, `Unexpected table cell "${s}".`);
|
|
362
|
+
}), Object.fromEntries(
|
|
363
|
+
e.map((s) => [
|
|
364
|
+
s.key,
|
|
365
|
+
ue(m[s.key] ?? null, `${d}.${s.key}`, r)
|
|
366
|
+
])
|
|
367
|
+
);
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
function ve(n, t, e) {
|
|
371
|
+
const r = `content.blocks.${t}`, o = v(n, r, e), i = o.type;
|
|
372
|
+
if (i === "heading") {
|
|
373
|
+
f(o, r, ["type", "text", "level", "evidenceIds"], e);
|
|
374
|
+
const a = o.level === void 0 || o.level === null ? void 0 : o.level === 2 || o.level === 3 ? o.level : void 0;
|
|
375
|
+
o.level !== void 0 && o.level !== null && a === void 0 && c(e, `${r}.level`, "Expected 2 or 3.");
|
|
376
|
+
const d = $(o.evidenceIds, `${r}.evidenceIds`, e);
|
|
377
|
+
return {
|
|
378
|
+
type: "heading",
|
|
379
|
+
text: u(
|
|
380
|
+
o.text,
|
|
381
|
+
`${r}.text`,
|
|
382
|
+
l.contentTitle,
|
|
383
|
+
e
|
|
384
|
+
),
|
|
385
|
+
...a ? { level: a } : {},
|
|
386
|
+
...d ? { evidenceIds: d } : {}
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
if (i === "paragraph") {
|
|
390
|
+
f(o, r, ["type", "text", "evidenceIds"], e);
|
|
391
|
+
const a = $(o.evidenceIds, `${r}.evidenceIds`, e);
|
|
392
|
+
return {
|
|
393
|
+
type: "paragraph",
|
|
394
|
+
text: u(
|
|
395
|
+
o.text,
|
|
396
|
+
`${r}.text`,
|
|
397
|
+
l.contentText,
|
|
398
|
+
e
|
|
399
|
+
),
|
|
400
|
+
...a ? { evidenceIds: a } : {}
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
if (i === "finding") {
|
|
404
|
+
f(o, r, ["type", "title", "text", "severity", "evidenceIds"], e);
|
|
405
|
+
const a = y(
|
|
406
|
+
o.title,
|
|
407
|
+
`${r}.title`,
|
|
408
|
+
l.contentTitle,
|
|
409
|
+
e
|
|
410
|
+
), d = E(
|
|
411
|
+
o.severity,
|
|
412
|
+
`${r}.severity`,
|
|
413
|
+
ie,
|
|
414
|
+
"info, positive, warning, or critical",
|
|
415
|
+
e
|
|
416
|
+
);
|
|
417
|
+
return {
|
|
418
|
+
type: "finding",
|
|
419
|
+
...a ? { title: a } : {},
|
|
420
|
+
text: u(
|
|
421
|
+
o.text,
|
|
422
|
+
`${r}.text`,
|
|
423
|
+
l.contentText,
|
|
424
|
+
e
|
|
425
|
+
),
|
|
426
|
+
...d ? { severity: d } : {},
|
|
427
|
+
evidenceIds: $(o.evidenceIds, `${r}.evidenceIds`, e, {
|
|
428
|
+
required: !0
|
|
429
|
+
}) ?? []
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
if (i === "bullets" || i === "actions" || i === "limitations") {
|
|
433
|
+
f(o, r, ["type", "title", "items", "evidenceIds"], e);
|
|
434
|
+
const a = y(
|
|
435
|
+
o.title,
|
|
436
|
+
`${r}.title`,
|
|
437
|
+
l.contentTitle,
|
|
438
|
+
e
|
|
439
|
+
), d = $(o.evidenceIds, `${r}.evidenceIds`, e);
|
|
440
|
+
return {
|
|
441
|
+
type: i,
|
|
442
|
+
...a ? { title: a } : {},
|
|
443
|
+
items: pe(o.items, `${r}.items`, e),
|
|
444
|
+
...d ? { evidenceIds: d } : {}
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
if (i === "metric") {
|
|
448
|
+
f(
|
|
449
|
+
o,
|
|
450
|
+
r,
|
|
451
|
+
["type", "label", "value", "previousValue", "delta", "unit", "evidenceIds"],
|
|
452
|
+
e
|
|
453
|
+
);
|
|
454
|
+
const a = typeof o.value == "string" || typeof o.value == "number" ? o.value : "";
|
|
455
|
+
a === "" && c(e, `${r}.value`, "Expected a string or number.");
|
|
456
|
+
const d = o.previousValue === void 0 || o.previousValue === null || typeof o.previousValue == "string" || typeof o.previousValue == "number" ? o.previousValue : void 0;
|
|
457
|
+
o.previousValue !== void 0 && o.previousValue !== null && d === void 0 && c(e, `${r}.previousValue`, "Expected a string, number, or null.");
|
|
458
|
+
const m = o.delta === void 0 || o.delta === null || typeof o.delta == "string" || typeof o.delta == "number" ? o.delta : void 0;
|
|
459
|
+
o.delta !== void 0 && o.delta !== null && m === void 0 && c(e, `${r}.delta`, "Expected a string, number, or null.");
|
|
460
|
+
const s = y(
|
|
461
|
+
o.unit,
|
|
462
|
+
`${r}.unit`,
|
|
463
|
+
l.contentTitle,
|
|
464
|
+
e
|
|
465
|
+
), p = $(o.evidenceIds, `${r}.evidenceIds`, e);
|
|
466
|
+
return {
|
|
467
|
+
type: "metric",
|
|
468
|
+
label: u(
|
|
469
|
+
o.label,
|
|
470
|
+
`${r}.label`,
|
|
471
|
+
l.contentTitle,
|
|
472
|
+
e
|
|
473
|
+
),
|
|
474
|
+
value: a,
|
|
475
|
+
...d !== void 0 ? { previousValue: d } : {},
|
|
476
|
+
...m !== void 0 ? { delta: m } : {},
|
|
477
|
+
...s ? { unit: s } : {},
|
|
478
|
+
...p ? { evidenceIds: p } : {}
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
if (i === "kpi_grid") {
|
|
482
|
+
f(o, r, ["type", "title", "tiles", "evidenceIds"], e);
|
|
483
|
+
const a = y(
|
|
484
|
+
o.title,
|
|
485
|
+
`${r}.title`,
|
|
486
|
+
l.contentTitle,
|
|
487
|
+
e
|
|
488
|
+
), d = Array.isArray(o.tiles) ? o.tiles : [];
|
|
489
|
+
Array.isArray(o.tiles) || c(e, `${r}.tiles`, "Expected an array."), d.length === 0 && c(e, `${r}.tiles`, "Expected at least one tile."), d.length > g.maxKpiTiles && c(
|
|
490
|
+
e,
|
|
491
|
+
`${r}.tiles`,
|
|
492
|
+
`Must have ${g.maxKpiTiles} tiles or fewer.`
|
|
493
|
+
);
|
|
494
|
+
const m = d.slice(0, g.maxKpiTiles).map((p, I) => {
|
|
495
|
+
const b = `${r}.tiles.${I}`, h = v(p, b, e);
|
|
496
|
+
f(
|
|
497
|
+
h,
|
|
498
|
+
b,
|
|
499
|
+
["label", "value", "previousValue", "delta", "unit", "evidenceIds"],
|
|
500
|
+
e
|
|
501
|
+
);
|
|
502
|
+
const N = typeof h.value == "string" || typeof h.value == "number" ? h.value : "";
|
|
503
|
+
N === "" && c(e, `${b}.value`, "Expected a string or number.");
|
|
504
|
+
const k = h.previousValue === void 0 || h.previousValue === null || typeof h.previousValue == "string" || typeof h.previousValue == "number" ? h.previousValue : void 0;
|
|
505
|
+
h.previousValue !== void 0 && h.previousValue !== null && k === void 0 && c(
|
|
506
|
+
e,
|
|
507
|
+
`${b}.previousValue`,
|
|
508
|
+
"Expected a string, number, or null."
|
|
509
|
+
);
|
|
510
|
+
const _ = h.delta === void 0 || h.delta === null || typeof h.delta == "string" || typeof h.delta == "number" ? h.delta : void 0;
|
|
511
|
+
h.delta !== void 0 && h.delta !== null && _ === void 0 && c(e, `${b}.delta`, "Expected a string, number, or null.");
|
|
512
|
+
const O = y(
|
|
513
|
+
h.unit,
|
|
514
|
+
`${b}.unit`,
|
|
515
|
+
l.contentTitle,
|
|
516
|
+
e
|
|
517
|
+
), R = $(
|
|
518
|
+
h.evidenceIds,
|
|
519
|
+
`${b}.evidenceIds`,
|
|
520
|
+
e
|
|
521
|
+
);
|
|
522
|
+
return {
|
|
523
|
+
label: u(
|
|
524
|
+
h.label,
|
|
525
|
+
`${b}.label`,
|
|
526
|
+
l.contentTitle,
|
|
527
|
+
e
|
|
528
|
+
),
|
|
529
|
+
value: N,
|
|
530
|
+
...k !== void 0 ? { previousValue: k } : {},
|
|
531
|
+
..._ !== void 0 ? { delta: _ } : {},
|
|
532
|
+
...O ? { unit: O } : {},
|
|
533
|
+
...R ? { evidenceIds: R } : {}
|
|
534
|
+
};
|
|
535
|
+
}), s = $(
|
|
536
|
+
o.evidenceIds,
|
|
537
|
+
`${r}.evidenceIds`,
|
|
538
|
+
e
|
|
539
|
+
);
|
|
540
|
+
return {
|
|
541
|
+
type: "kpi_grid",
|
|
542
|
+
...a ? { title: a } : {},
|
|
543
|
+
tiles: m,
|
|
544
|
+
...s ? { evidenceIds: s } : {}
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
if (i === "table") {
|
|
548
|
+
f(
|
|
549
|
+
o,
|
|
550
|
+
r,
|
|
551
|
+
["type", "id", "title", "columns", "rows", "caption", "totalRows", "evidenceIds"],
|
|
552
|
+
e
|
|
553
|
+
);
|
|
554
|
+
const a = ye(o.columns, `${r}.columns`, e), d = y(
|
|
555
|
+
o.title,
|
|
556
|
+
`${r}.title`,
|
|
557
|
+
l.contentTitle,
|
|
558
|
+
e
|
|
559
|
+
), m = y(
|
|
560
|
+
o.id,
|
|
561
|
+
`${r}.id`,
|
|
562
|
+
l.id,
|
|
563
|
+
e
|
|
564
|
+
), s = y(
|
|
565
|
+
o.caption,
|
|
566
|
+
`${r}.caption`,
|
|
567
|
+
l.contentItem,
|
|
568
|
+
e
|
|
569
|
+
), p = le(
|
|
570
|
+
o.totalRows,
|
|
571
|
+
`${r}.totalRows`,
|
|
572
|
+
e
|
|
573
|
+
), I = $(o.evidenceIds, `${r}.evidenceIds`, e);
|
|
574
|
+
return {
|
|
575
|
+
type: "table",
|
|
576
|
+
...m ? { id: m } : {},
|
|
577
|
+
...d ? { title: d } : {},
|
|
578
|
+
columns: a,
|
|
579
|
+
rows: he(o.rows, `${r}.rows`, a, e),
|
|
580
|
+
...s ? { caption: s } : {},
|
|
581
|
+
...p !== void 0 ? { totalRows: p } : {},
|
|
582
|
+
...I ? { evidenceIds: I } : {}
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
if (i === "evidence_appendix") {
|
|
586
|
+
f(o, r, ["type", "title", "evidenceIds"], e);
|
|
587
|
+
const a = y(
|
|
588
|
+
o.title,
|
|
589
|
+
`${r}.title`,
|
|
590
|
+
l.contentTitle,
|
|
591
|
+
e
|
|
592
|
+
);
|
|
593
|
+
return {
|
|
594
|
+
type: "evidence_appendix",
|
|
595
|
+
...a ? { title: a } : {},
|
|
596
|
+
evidenceIds: $(o.evidenceIds, `${r}.evidenceIds`, e, {
|
|
597
|
+
required: !0
|
|
598
|
+
}) ?? []
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
return c(
|
|
602
|
+
e,
|
|
603
|
+
`${r}.type`,
|
|
604
|
+
"Expected heading, paragraph, finding, bullets, metric, kpi_grid, table, actions, limitations, or evidence_appendix."
|
|
605
|
+
), {
|
|
606
|
+
type: "paragraph",
|
|
607
|
+
text: ""
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
function ge(n) {
|
|
611
|
+
const t = [], e = v(n, "content", t);
|
|
612
|
+
f(e, "content", ["version", "title", "summary", "blocks"], t), e.version !== 1 && c(t, "content.version", "Expected version 1.");
|
|
613
|
+
const r = y(
|
|
614
|
+
e.title,
|
|
615
|
+
"content.title",
|
|
616
|
+
l.contentTitle,
|
|
617
|
+
t
|
|
618
|
+
), o = y(
|
|
619
|
+
e.summary,
|
|
620
|
+
"content.summary",
|
|
621
|
+
l.contentSummary,
|
|
622
|
+
t
|
|
623
|
+
);
|
|
624
|
+
Array.isArray(e.blocks) || c(t, "content.blocks", "Expected an array.");
|
|
625
|
+
const i = Array.isArray(e.blocks) ? e.blocks : [];
|
|
626
|
+
i.length === 0 && c(t, "content.blocks", "Expected at least one block."), i.length > g.maxBlocks && c(
|
|
627
|
+
t,
|
|
628
|
+
"content.blocks",
|
|
629
|
+
`Must have ${g.maxBlocks} blocks or fewer.`
|
|
630
|
+
);
|
|
631
|
+
const a = i.slice(0, g.maxBlocks).map((d, m) => ve(d, m, t));
|
|
632
|
+
return B(t), {
|
|
633
|
+
version: 1,
|
|
634
|
+
...r ? { title: r } : {},
|
|
635
|
+
...o ? { summary: o } : {},
|
|
636
|
+
blocks: a
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
function Ne(n) {
|
|
640
|
+
try {
|
|
641
|
+
return {
|
|
642
|
+
valid: !0,
|
|
643
|
+
value: ge(n),
|
|
644
|
+
issues: []
|
|
645
|
+
};
|
|
646
|
+
} catch (t) {
|
|
647
|
+
if (t instanceof S)
|
|
648
|
+
return { valid: !1, issues: t.issues };
|
|
649
|
+
throw t;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
function x(n, t, e, r) {
|
|
226
653
|
return typeof n == "string" && e.includes(n) ? n : (c(r, t, `Expected ${e.join(" or ")}.`), e[0]);
|
|
227
654
|
}
|
|
228
|
-
function
|
|
655
|
+
function E(n, t, e, r, o) {
|
|
229
656
|
if (n != null) {
|
|
230
657
|
if (typeof n == "string" && e.has(n))
|
|
231
658
|
return n;
|
|
232
659
|
c(o, t, `Expected ${r}.`);
|
|
233
660
|
}
|
|
234
661
|
}
|
|
235
|
-
function
|
|
662
|
+
function Ie(n, t, e) {
|
|
236
663
|
if (n != null) {
|
|
237
664
|
if (!Array.isArray(n)) {
|
|
238
665
|
c(e, t, "Expected an array.");
|
|
@@ -241,60 +668,60 @@ function ne(n, t, e) {
|
|
|
241
668
|
return n;
|
|
242
669
|
}
|
|
243
670
|
}
|
|
244
|
-
function
|
|
671
|
+
function be(n, t, e) {
|
|
245
672
|
if (n != null) {
|
|
246
|
-
if (!
|
|
673
|
+
if (!P(n)) {
|
|
247
674
|
c(e, t, "Expected an object.");
|
|
248
675
|
return;
|
|
249
676
|
}
|
|
250
677
|
return n;
|
|
251
678
|
}
|
|
252
679
|
}
|
|
253
|
-
function
|
|
680
|
+
function $e(n, t, e) {
|
|
254
681
|
if (n == null)
|
|
255
682
|
return;
|
|
256
|
-
const r =
|
|
257
|
-
|
|
258
|
-
const o = {}, i =
|
|
683
|
+
const r = v(n, t, e);
|
|
684
|
+
f(r, t, de, e);
|
|
685
|
+
const o = {}, i = E(
|
|
259
686
|
r.pageSize,
|
|
260
687
|
`${t}.pageSize`,
|
|
261
|
-
|
|
688
|
+
ee,
|
|
262
689
|
"letter, legal, a4, a3, or tabloid",
|
|
263
690
|
e
|
|
264
|
-
), a =
|
|
691
|
+
), a = E(
|
|
265
692
|
r.orientation,
|
|
266
693
|
`${t}.orientation`,
|
|
267
|
-
|
|
694
|
+
te,
|
|
268
695
|
"portrait or landscape",
|
|
269
696
|
e
|
|
270
|
-
),
|
|
697
|
+
), d = E(
|
|
271
698
|
r.delimiter,
|
|
272
699
|
`${t}.delimiter`,
|
|
273
|
-
|
|
700
|
+
ne,
|
|
274
701
|
"comma, semicolon, or tab",
|
|
275
702
|
e
|
|
276
|
-
),
|
|
703
|
+
), m = E(
|
|
277
704
|
r.sheetSelection,
|
|
278
705
|
`${t}.sheetSelection`,
|
|
279
|
-
|
|
706
|
+
re,
|
|
280
707
|
"current or all",
|
|
281
708
|
e
|
|
282
709
|
);
|
|
283
|
-
i && (o.pageSize = i), a && (o.orientation = a),
|
|
284
|
-
for (const
|
|
710
|
+
i && (o.pageSize = i), a && (o.orientation = a), d && (o.delimiter = d), m && (o.sheetSelection = m);
|
|
711
|
+
for (const s of [
|
|
285
712
|
"includeFilters",
|
|
286
713
|
"includeTimestamp",
|
|
287
714
|
"includeHeaders",
|
|
288
715
|
"useFormattedValues"
|
|
289
716
|
])
|
|
290
|
-
if (!(r[
|
|
291
|
-
if (typeof r[
|
|
292
|
-
c(e, `${t}.${
|
|
717
|
+
if (!(r[s] === void 0 || r[s] === null)) {
|
|
718
|
+
if (typeof r[s] != "boolean") {
|
|
719
|
+
c(e, `${t}.${s}`, "Expected a boolean.");
|
|
293
720
|
continue;
|
|
294
721
|
}
|
|
295
|
-
o[
|
|
722
|
+
o[s] = r[s];
|
|
296
723
|
}
|
|
297
|
-
for (const
|
|
724
|
+
for (const s of [
|
|
298
725
|
"currentSheetId",
|
|
299
726
|
"currentSheetName",
|
|
300
727
|
"filterLine",
|
|
@@ -302,15 +729,15 @@ function oe(n, t, e) {
|
|
|
302
729
|
"cardType",
|
|
303
730
|
"theme"
|
|
304
731
|
]) {
|
|
305
|
-
const
|
|
306
|
-
r[
|
|
307
|
-
`${t}.${
|
|
732
|
+
const p = y(
|
|
733
|
+
r[s],
|
|
734
|
+
`${t}.${s}`,
|
|
308
735
|
l.id,
|
|
309
736
|
e
|
|
310
737
|
);
|
|
311
|
-
|
|
738
|
+
p && (o[s] = p);
|
|
312
739
|
}
|
|
313
|
-
for (const
|
|
740
|
+
for (const s of [
|
|
314
741
|
"filterValues",
|
|
315
742
|
"inlineFilterValues",
|
|
316
743
|
"sheetFilterValues",
|
|
@@ -318,21 +745,21 @@ function oe(n, t, e) {
|
|
|
318
745
|
"cardControlDefinitions",
|
|
319
746
|
"controlBindings"
|
|
320
747
|
]) {
|
|
321
|
-
const
|
|
322
|
-
|
|
748
|
+
const p = Ie(r[s], `${t}.${s}`, e);
|
|
749
|
+
p && (o[s] = p);
|
|
323
750
|
}
|
|
324
|
-
for (const
|
|
751
|
+
for (const s of [
|
|
325
752
|
"controlValues",
|
|
326
753
|
"tablePreferences",
|
|
327
754
|
"dashboardInputExecutionSnapshot"
|
|
328
755
|
]) {
|
|
329
|
-
const
|
|
330
|
-
|
|
756
|
+
const p = be(r[s], `${t}.${s}`, e);
|
|
757
|
+
p && (o[s] = p);
|
|
331
758
|
}
|
|
332
759
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
333
760
|
}
|
|
334
|
-
function
|
|
335
|
-
const o =
|
|
761
|
+
function T(n, t, e, r) {
|
|
762
|
+
const o = y(
|
|
336
763
|
t,
|
|
337
764
|
e,
|
|
338
765
|
l.attachmentTitle,
|
|
@@ -340,20 +767,20 @@ function E(n, t, e, r) {
|
|
|
340
767
|
);
|
|
341
768
|
return o && (n.title = o), n;
|
|
342
769
|
}
|
|
343
|
-
function
|
|
344
|
-
const o =
|
|
770
|
+
function A(n, t, e, r) {
|
|
771
|
+
const o = $e(t, e, r);
|
|
345
772
|
return o && (n.settings = o), n;
|
|
346
773
|
}
|
|
347
|
-
function
|
|
348
|
-
const r = `attachments.${t}`, o =
|
|
774
|
+
function Ee(n, t, e) {
|
|
775
|
+
const r = `attachments.${t}`, o = v(n, r, e), i = o.type;
|
|
349
776
|
if (i === "dashboard") {
|
|
350
|
-
|
|
777
|
+
f(
|
|
351
778
|
o,
|
|
352
779
|
r,
|
|
353
780
|
["type", "dashboardId", "format", "title", "settings"],
|
|
354
781
|
e
|
|
355
782
|
);
|
|
356
|
-
const a =
|
|
783
|
+
const a = T(
|
|
357
784
|
{
|
|
358
785
|
type: "dashboard",
|
|
359
786
|
dashboardId: u(
|
|
@@ -362,22 +789,22 @@ function ie(n, t, e) {
|
|
|
362
789
|
l.id,
|
|
363
790
|
e
|
|
364
791
|
),
|
|
365
|
-
format:
|
|
792
|
+
format: x(o.format, `${r}.format`, ["pdf"], e)
|
|
366
793
|
},
|
|
367
794
|
o.title,
|
|
368
795
|
`${r}.title`,
|
|
369
796
|
e
|
|
370
797
|
);
|
|
371
|
-
return
|
|
798
|
+
return A(a, o.settings, `${r}.settings`, e);
|
|
372
799
|
}
|
|
373
800
|
if (i === "dashboard_sheet" || i === "document_sheet") {
|
|
374
|
-
|
|
801
|
+
f(
|
|
375
802
|
o,
|
|
376
803
|
r,
|
|
377
804
|
["type", "dashboardId", "sheetId", "format", "title", "settings"],
|
|
378
805
|
e
|
|
379
806
|
);
|
|
380
|
-
const a =
|
|
807
|
+
const a = T(
|
|
381
808
|
{
|
|
382
809
|
type: i,
|
|
383
810
|
dashboardId: u(
|
|
@@ -392,22 +819,22 @@ function ie(n, t, e) {
|
|
|
392
819
|
l.id,
|
|
393
820
|
e
|
|
394
821
|
),
|
|
395
|
-
format:
|
|
822
|
+
format: x(o.format, `${r}.format`, ["pdf"], e)
|
|
396
823
|
},
|
|
397
824
|
o.title,
|
|
398
825
|
`${r}.title`,
|
|
399
826
|
e
|
|
400
827
|
);
|
|
401
|
-
return
|
|
828
|
+
return A(a, o.settings, `${r}.settings`, e);
|
|
402
829
|
}
|
|
403
830
|
if (i === "visual") {
|
|
404
|
-
|
|
831
|
+
f(
|
|
405
832
|
o,
|
|
406
833
|
r,
|
|
407
834
|
["type", "dashboardId", "visualId", "format", "title", "settings"],
|
|
408
835
|
e
|
|
409
836
|
);
|
|
410
|
-
const a =
|
|
837
|
+
const a = T(
|
|
411
838
|
{
|
|
412
839
|
type: "visual",
|
|
413
840
|
dashboardId: u(
|
|
@@ -422,7 +849,7 @@ function ie(n, t, e) {
|
|
|
422
849
|
l.id,
|
|
423
850
|
e
|
|
424
851
|
),
|
|
425
|
-
format:
|
|
852
|
+
format: x(
|
|
426
853
|
o.format,
|
|
427
854
|
`${r}.format`,
|
|
428
855
|
["pdf", "png"],
|
|
@@ -433,16 +860,16 @@ function ie(n, t, e) {
|
|
|
433
860
|
`${r}.title`,
|
|
434
861
|
e
|
|
435
862
|
);
|
|
436
|
-
return
|
|
863
|
+
return A(a, o.settings, `${r}.settings`, e);
|
|
437
864
|
}
|
|
438
865
|
if (i === "card") {
|
|
439
|
-
|
|
866
|
+
f(
|
|
440
867
|
o,
|
|
441
868
|
r,
|
|
442
869
|
["type", "dashboardId", "cardId", "format", "title", "settings"],
|
|
443
870
|
e
|
|
444
871
|
);
|
|
445
|
-
const a =
|
|
872
|
+
const a = T(
|
|
446
873
|
{
|
|
447
874
|
type: "card",
|
|
448
875
|
dashboardId: u(
|
|
@@ -457,7 +884,7 @@ function ie(n, t, e) {
|
|
|
457
884
|
l.id,
|
|
458
885
|
e
|
|
459
886
|
),
|
|
460
|
-
format:
|
|
887
|
+
format: x(
|
|
461
888
|
o.format,
|
|
462
889
|
`${r}.format`,
|
|
463
890
|
["csv", "pdf", "png"],
|
|
@@ -468,7 +895,7 @@ function ie(n, t, e) {
|
|
|
468
895
|
`${r}.title`,
|
|
469
896
|
e
|
|
470
897
|
);
|
|
471
|
-
return
|
|
898
|
+
return A(a, o.settings, `${r}.settings`, e);
|
|
472
899
|
}
|
|
473
900
|
return c(
|
|
474
901
|
e,
|
|
@@ -476,7 +903,7 @@ function ie(n, t, e) {
|
|
|
476
903
|
"Expected dashboard, dashboard_sheet, document_sheet, visual, or card."
|
|
477
904
|
), { type: "dashboard", dashboardId: "", format: "pdf" };
|
|
478
905
|
}
|
|
479
|
-
function
|
|
906
|
+
function Ce(n) {
|
|
480
907
|
switch (n.type) {
|
|
481
908
|
case "dashboard":
|
|
482
909
|
return `${n.type}:${n.dashboardId}:${n.format}`;
|
|
@@ -489,7 +916,7 @@ function ae(n) {
|
|
|
489
916
|
return `${n.type}:${n.dashboardId}:${n.cardId}:${n.format}`;
|
|
490
917
|
}
|
|
491
918
|
}
|
|
492
|
-
function
|
|
919
|
+
function G(n, t) {
|
|
493
920
|
if (n == null)
|
|
494
921
|
return [];
|
|
495
922
|
if (!Array.isArray(n))
|
|
@@ -499,23 +926,23 @@ function R(n, t) {
|
|
|
499
926
|
"attachments",
|
|
500
927
|
"Choose 20 attachments or fewer."
|
|
501
928
|
);
|
|
502
|
-
const e = n.slice(0, 20).map((o, i) =>
|
|
929
|
+
const e = n.slice(0, 20).map((o, i) => Ee(o, i, t)), r = /* @__PURE__ */ new Set();
|
|
503
930
|
return e.forEach((o, i) => {
|
|
504
|
-
const a =
|
|
931
|
+
const a = Ce(o);
|
|
505
932
|
r.has(a) && c(t, `attachments.${i}`, "Duplicate attachment."), r.add(a);
|
|
506
933
|
}), e;
|
|
507
934
|
}
|
|
508
|
-
function
|
|
935
|
+
function U(n, t) {
|
|
509
936
|
if (n == null)
|
|
510
937
|
return;
|
|
511
|
-
const e =
|
|
512
|
-
|
|
938
|
+
const e = v(n, "limits", t);
|
|
939
|
+
f(e, "limits", Object.keys(L), t);
|
|
513
940
|
const r = {};
|
|
514
|
-
return Object.keys(
|
|
941
|
+
return Object.keys(L).forEach((o) => {
|
|
515
942
|
const i = e[o];
|
|
516
943
|
if (i == null)
|
|
517
944
|
return;
|
|
518
|
-
const a =
|
|
945
|
+
const a = L[o];
|
|
519
946
|
if (typeof i != "number" || !Number.isInteger(i) || i < a.min || i > a.max) {
|
|
520
947
|
c(
|
|
521
948
|
t,
|
|
@@ -527,63 +954,63 @@ function M(n, t) {
|
|
|
527
954
|
r[o] = i;
|
|
528
955
|
}), Object.keys(r).length > 0 ? r : void 0;
|
|
529
956
|
}
|
|
530
|
-
function
|
|
957
|
+
function B(n) {
|
|
531
958
|
if (n.length > 0)
|
|
532
|
-
throw new
|
|
959
|
+
throw new S(n);
|
|
533
960
|
}
|
|
534
|
-
function
|
|
961
|
+
function H(n, t, e) {
|
|
535
962
|
n.type === "none" && t.length === 0 && c(
|
|
536
963
|
e,
|
|
537
964
|
"body",
|
|
538
965
|
"Add briefing instructions, a custom message, or at least one attachment."
|
|
539
966
|
);
|
|
540
967
|
}
|
|
541
|
-
function
|
|
542
|
-
const t = [], e =
|
|
543
|
-
|
|
968
|
+
function X(n) {
|
|
969
|
+
const t = [], e = v(n, "jobConfig", t);
|
|
970
|
+
f(
|
|
544
971
|
e,
|
|
545
972
|
"jobConfig",
|
|
546
973
|
["kind", "source", "body", "attachments", "presentation", "limits"],
|
|
547
974
|
t
|
|
548
|
-
), e.kind !==
|
|
549
|
-
const r =
|
|
550
|
-
return
|
|
551
|
-
kind:
|
|
975
|
+
), e.kind !== w && c(t, "kind", "Expected BRIEFING.");
|
|
976
|
+
const r = j(e.source, t), o = K(e.body, t), i = G(e.attachments, t), a = q(e.presentation, t), d = U(e.limits, t);
|
|
977
|
+
return H(o, i, t), B(t), {
|
|
978
|
+
kind: w,
|
|
552
979
|
source: r,
|
|
553
980
|
body: o,
|
|
554
981
|
attachments: i,
|
|
555
982
|
presentation: a,
|
|
556
|
-
...
|
|
983
|
+
...d ? { limits: d } : {}
|
|
557
984
|
};
|
|
558
985
|
}
|
|
559
|
-
function
|
|
560
|
-
return
|
|
986
|
+
function Oe(n) {
|
|
987
|
+
return X({
|
|
561
988
|
...n,
|
|
562
|
-
kind:
|
|
989
|
+
kind: w
|
|
563
990
|
});
|
|
564
991
|
}
|
|
565
|
-
function
|
|
566
|
-
const o = `${r}.${t}`, i =
|
|
992
|
+
function z(n, t, e, r = "deliveryConfig.recipients") {
|
|
993
|
+
const o = `${r}.${t}`, i = v(n, o, e), a = i.type;
|
|
567
994
|
if (a === "email") {
|
|
568
|
-
|
|
569
|
-
const
|
|
995
|
+
f(i, o, ["type", "address", "name"], e);
|
|
996
|
+
const d = u(
|
|
570
997
|
i.address,
|
|
571
998
|
`${o}.address`,
|
|
572
999
|
l.id,
|
|
573
1000
|
e
|
|
574
|
-
),
|
|
1001
|
+
), m = y(
|
|
575
1002
|
i.name,
|
|
576
1003
|
`${o}.name`,
|
|
577
1004
|
l.attachmentTitle,
|
|
578
1005
|
e
|
|
579
1006
|
);
|
|
580
|
-
return
|
|
1007
|
+
return d && !fe(d) && c(e, `${o}.address`, "Email address is invalid."), {
|
|
581
1008
|
type: "email",
|
|
582
|
-
address:
|
|
583
|
-
...
|
|
1009
|
+
address: d,
|
|
1010
|
+
...m ? { name: m } : {}
|
|
584
1011
|
};
|
|
585
1012
|
}
|
|
586
|
-
return a === "user" ? (
|
|
1013
|
+
return a === "user" ? (f(i, o, ["type", "userId"], e), {
|
|
587
1014
|
type: "user",
|
|
588
1015
|
userId: u(
|
|
589
1016
|
i.userId,
|
|
@@ -591,7 +1018,7 @@ function _(n, t, e, r = "deliveryConfig.recipients") {
|
|
|
591
1018
|
l.id,
|
|
592
1019
|
e
|
|
593
1020
|
)
|
|
594
|
-
}) : a === "tenant_user" ? (
|
|
1021
|
+
}) : a === "tenant_user" ? (f(i, o, ["type", "tenantUserId"], e), {
|
|
595
1022
|
type: "tenant_user",
|
|
596
1023
|
tenantUserId: u(
|
|
597
1024
|
i.tenantUserId,
|
|
@@ -599,7 +1026,7 @@ function _(n, t, e, r = "deliveryConfig.recipients") {
|
|
|
599
1026
|
l.id,
|
|
600
1027
|
e
|
|
601
1028
|
)
|
|
602
|
-
}) : a === "group" ? (
|
|
1029
|
+
}) : a === "group" ? (f(i, o, ["type", "groupId"], e), {
|
|
603
1030
|
type: "group",
|
|
604
1031
|
groupId: u(
|
|
605
1032
|
i.groupId,
|
|
@@ -613,17 +1040,17 @@ function _(n, t, e, r = "deliveryConfig.recipients") {
|
|
|
613
1040
|
"Expected email, user, tenant_user, or group."
|
|
614
1041
|
), { type: "email", address: "" });
|
|
615
1042
|
}
|
|
616
|
-
function
|
|
1043
|
+
function xe(n, t) {
|
|
617
1044
|
return n == null ? [] : Array.isArray(n) ? n.map(
|
|
618
|
-
(e, r) =>
|
|
1045
|
+
(e, r) => z(e, r, t)
|
|
619
1046
|
) : (c(t, "deliveryConfig.recipients", "Expected an array."), []);
|
|
620
1047
|
}
|
|
621
|
-
function
|
|
1048
|
+
function Te(n, t) {
|
|
622
1049
|
if (!Array.isArray(n))
|
|
623
1050
|
return c(t, "deliveryConfig.channels", "Expected an array."), [];
|
|
624
1051
|
const e = [];
|
|
625
1052
|
return n.forEach((r, o) => {
|
|
626
|
-
if (!
|
|
1053
|
+
if (!J(r)) {
|
|
627
1054
|
c(
|
|
628
1055
|
t,
|
|
629
1056
|
`deliveryConfig.channels.${o}`,
|
|
@@ -634,10 +1061,10 @@ function de(n, t) {
|
|
|
634
1061
|
e.includes(r) || e.push(r);
|
|
635
1062
|
}), e;
|
|
636
1063
|
}
|
|
637
|
-
function
|
|
1064
|
+
function Ae(n, t, e) {
|
|
638
1065
|
if (n == null)
|
|
639
1066
|
return;
|
|
640
|
-
const r =
|
|
1067
|
+
const r = v(n, t, e), o = {};
|
|
641
1068
|
return Object.entries(r).forEach(([i, a]) => {
|
|
642
1069
|
if (typeof a != "string") {
|
|
643
1070
|
c(e, `${t}.${i}`, "Expected a string.");
|
|
@@ -646,17 +1073,17 @@ function le(n, t, e) {
|
|
|
646
1073
|
o[i] = a.trim();
|
|
647
1074
|
}), Object.keys(o).length > 0 ? o : void 0;
|
|
648
1075
|
}
|
|
649
|
-
function
|
|
1076
|
+
function Se(n, t, e) {
|
|
650
1077
|
if (n == null)
|
|
651
1078
|
return;
|
|
652
|
-
const r =
|
|
653
|
-
|
|
1079
|
+
const r = v(n, t, e);
|
|
1080
|
+
f(
|
|
654
1081
|
r,
|
|
655
1082
|
t,
|
|
656
1083
|
["url", "method", "headers", "secretEncrypted"],
|
|
657
1084
|
e
|
|
658
1085
|
);
|
|
659
|
-
const o = r.method === void 0 || r.method === null ? void 0 :
|
|
1086
|
+
const o = r.method === void 0 || r.method === null ? void 0 : x(r.method, `${t}.method`, ["POST", "PUT"], e), i = Ae(r.headers, `${t}.headers`, e), a = y(
|
|
660
1087
|
r.secretEncrypted,
|
|
661
1088
|
`${t}.secretEncrypted`,
|
|
662
1089
|
2e3,
|
|
@@ -669,21 +1096,21 @@ function se(n, t, e) {
|
|
|
669
1096
|
...a ? { secretEncrypted: a } : {}
|
|
670
1097
|
};
|
|
671
1098
|
}
|
|
672
|
-
function
|
|
673
|
-
const r =
|
|
1099
|
+
function ke(n, t, e) {
|
|
1100
|
+
const r = v(n, t, e), o = r.type;
|
|
674
1101
|
if (o === "channel") {
|
|
675
|
-
|
|
1102
|
+
f(
|
|
676
1103
|
r,
|
|
677
1104
|
t,
|
|
678
1105
|
["type", "channelId", "channelName", "isPrivate"],
|
|
679
1106
|
e
|
|
680
1107
|
);
|
|
681
|
-
const i =
|
|
1108
|
+
const i = y(
|
|
682
1109
|
r.channelName,
|
|
683
1110
|
`${t}.channelName`,
|
|
684
1111
|
l.attachmentTitle,
|
|
685
1112
|
e
|
|
686
|
-
), a = r.isPrivate === void 0 || r.isPrivate === null ? void 0 :
|
|
1113
|
+
), a = r.isPrivate === void 0 || r.isPrivate === null ? void 0 : C(
|
|
687
1114
|
r.isPrivate,
|
|
688
1115
|
!1,
|
|
689
1116
|
`${t}.isPrivate`,
|
|
@@ -701,16 +1128,16 @@ function fe(n, t, e) {
|
|
|
701
1128
|
...a !== void 0 ? { isPrivate: a } : {}
|
|
702
1129
|
};
|
|
703
1130
|
}
|
|
704
|
-
return o === "dm" ? (
|
|
1131
|
+
return o === "dm" ? (f(r, t, ["type", "recipient"], e), c(
|
|
705
1132
|
e,
|
|
706
1133
|
`${t}.type`,
|
|
707
1134
|
"Slack DM delivery is not supported in V1."
|
|
708
1135
|
), {
|
|
709
1136
|
type: "dm",
|
|
710
|
-
recipient:
|
|
1137
|
+
recipient: z(r.recipient, 0, e, `${t}.recipient`)
|
|
711
1138
|
}) : (c(e, `${t}.type`, "Expected channel."), { type: "channel", channelId: "" });
|
|
712
1139
|
}
|
|
713
|
-
function
|
|
1140
|
+
function _e(n, t, e) {
|
|
714
1141
|
if (n == null)
|
|
715
1142
|
return;
|
|
716
1143
|
if (!Array.isArray(n)) {
|
|
@@ -718,15 +1145,15 @@ function me(n, t, e) {
|
|
|
718
1145
|
return;
|
|
719
1146
|
}
|
|
720
1147
|
const r = n.map(
|
|
721
|
-
(o, i) =>
|
|
1148
|
+
(o, i) => z(o, i, e, t)
|
|
722
1149
|
);
|
|
723
1150
|
return r.length > 0 ? r : void 0;
|
|
724
1151
|
}
|
|
725
|
-
function
|
|
1152
|
+
function Le(n, t, e) {
|
|
726
1153
|
if (n == null)
|
|
727
1154
|
return;
|
|
728
|
-
const r =
|
|
729
|
-
|
|
1155
|
+
const r = v(n, t, e);
|
|
1156
|
+
f(
|
|
730
1157
|
r,
|
|
731
1158
|
t,
|
|
732
1159
|
[
|
|
@@ -738,28 +1165,28 @@ function ue(n, t, e) {
|
|
|
738
1165
|
],
|
|
739
1166
|
e
|
|
740
1167
|
);
|
|
741
|
-
const o =
|
|
1168
|
+
const o = _e(
|
|
742
1169
|
r.threadMentions,
|
|
743
1170
|
`${t}.threadMentions`,
|
|
744
1171
|
e
|
|
745
|
-
), i =
|
|
1172
|
+
), i = C(
|
|
746
1173
|
r.postThreadDetail,
|
|
747
1174
|
!0,
|
|
748
1175
|
`${t}.postThreadDetail`,
|
|
749
1176
|
e
|
|
750
|
-
), a =
|
|
1177
|
+
), a = C(
|
|
751
1178
|
r.includeDashboardLink,
|
|
752
1179
|
!0,
|
|
753
1180
|
`${t}.includeDashboardLink`,
|
|
754
1181
|
e
|
|
755
|
-
),
|
|
1182
|
+
), d = C(
|
|
756
1183
|
r.includeBriefingLink,
|
|
757
1184
|
!0,
|
|
758
1185
|
`${t}.includeBriefingLink`,
|
|
759
1186
|
e
|
|
760
1187
|
);
|
|
761
1188
|
return {
|
|
762
|
-
destination:
|
|
1189
|
+
destination: ke(
|
|
763
1190
|
r.destination,
|
|
764
1191
|
`${t}.destination`,
|
|
765
1192
|
e
|
|
@@ -767,12 +1194,12 @@ function ue(n, t, e) {
|
|
|
767
1194
|
...o ? { threadMentions: o } : {},
|
|
768
1195
|
...r.postThreadDetail !== void 0 ? { postThreadDetail: i } : {},
|
|
769
1196
|
...r.includeDashboardLink !== void 0 ? { includeDashboardLink: a } : {},
|
|
770
|
-
...r.includeBriefingLink !== void 0 ? { includeBriefingLink:
|
|
1197
|
+
...r.includeBriefingLink !== void 0 ? { includeBriefingLink: d } : {}
|
|
771
1198
|
};
|
|
772
1199
|
}
|
|
773
|
-
function
|
|
774
|
-
const r =
|
|
775
|
-
|
|
1200
|
+
function we(n, t, e) {
|
|
1201
|
+
const r = v(n, t, e);
|
|
1202
|
+
f(
|
|
776
1203
|
r,
|
|
777
1204
|
t,
|
|
778
1205
|
[
|
|
@@ -786,37 +1213,37 @@ function he(n, t, e) {
|
|
|
786
1213
|
],
|
|
787
1214
|
e
|
|
788
1215
|
);
|
|
789
|
-
const o =
|
|
1216
|
+
const o = E(
|
|
790
1217
|
r.formatProfile,
|
|
791
1218
|
`${t}.formatProfile`,
|
|
792
|
-
|
|
1219
|
+
oe,
|
|
793
1220
|
"concise, balanced, or detailed",
|
|
794
1221
|
e
|
|
795
|
-
), i =
|
|
1222
|
+
), i = y(
|
|
796
1223
|
r.subjectOverride,
|
|
797
1224
|
`${t}.subjectOverride`,
|
|
798
1225
|
500,
|
|
799
1226
|
e
|
|
800
|
-
), a =
|
|
1227
|
+
), a = y(
|
|
801
1228
|
r.titleOverride,
|
|
802
1229
|
`${t}.titleOverride`,
|
|
803
1230
|
500,
|
|
804
1231
|
e
|
|
805
|
-
),
|
|
1232
|
+
), d = y(
|
|
806
1233
|
r.summaryOverride,
|
|
807
1234
|
`${t}.summaryOverride`,
|
|
808
1235
|
2e3,
|
|
809
1236
|
e
|
|
810
|
-
),
|
|
1237
|
+
), m = C(
|
|
811
1238
|
r.actionBlockVisible,
|
|
812
1239
|
!0,
|
|
813
1240
|
`${t}.actionBlockVisible`,
|
|
814
1241
|
e
|
|
815
|
-
),
|
|
1242
|
+
), s = Se(
|
|
816
1243
|
r.webhookConfig,
|
|
817
1244
|
`${t}.webhookConfig`,
|
|
818
1245
|
e
|
|
819
|
-
),
|
|
1246
|
+
), p = Le(
|
|
820
1247
|
r.slackConfig,
|
|
821
1248
|
`${t}.slackConfig`,
|
|
822
1249
|
e
|
|
@@ -825,18 +1252,18 @@ function he(n, t, e) {
|
|
|
825
1252
|
...o ? { formatProfile: o } : {},
|
|
826
1253
|
...i ? { subjectOverride: i } : {},
|
|
827
1254
|
...a ? { titleOverride: a } : {},
|
|
828
|
-
...
|
|
829
|
-
...r.actionBlockVisible !== void 0 ? { actionBlockVisible:
|
|
830
|
-
...
|
|
831
|
-
...
|
|
1255
|
+
...d ? { summaryOverride: d } : {},
|
|
1256
|
+
...r.actionBlockVisible !== void 0 ? { actionBlockVisible: m } : {},
|
|
1257
|
+
...p ? { slackConfig: p } : {},
|
|
1258
|
+
...s ? { webhookConfig: s } : {}
|
|
832
1259
|
};
|
|
833
1260
|
}
|
|
834
|
-
function
|
|
1261
|
+
function Ve(n, t) {
|
|
835
1262
|
if (n == null)
|
|
836
1263
|
return;
|
|
837
|
-
const e =
|
|
1264
|
+
const e = v(n, "deliveryConfig.channelConfigs", t), r = {};
|
|
838
1265
|
return Object.entries(e).forEach(([o, i]) => {
|
|
839
|
-
if (!
|
|
1266
|
+
if (!J(o)) {
|
|
840
1267
|
c(
|
|
841
1268
|
t,
|
|
842
1269
|
`deliveryConfig.channelConfigs.${o}`,
|
|
@@ -844,27 +1271,27 @@ function pe(n, t) {
|
|
|
844
1271
|
);
|
|
845
1272
|
return;
|
|
846
1273
|
}
|
|
847
|
-
r[o] =
|
|
1274
|
+
r[o] = we(
|
|
848
1275
|
i,
|
|
849
1276
|
`deliveryConfig.channelConfigs.${o}`,
|
|
850
1277
|
t
|
|
851
1278
|
);
|
|
852
1279
|
}), Object.keys(r).length > 0 ? r : void 0;
|
|
853
1280
|
}
|
|
854
|
-
function
|
|
855
|
-
var
|
|
1281
|
+
function Be(n, t) {
|
|
1282
|
+
var m, s, p;
|
|
856
1283
|
if (n == null)
|
|
857
1284
|
return null;
|
|
858
|
-
const e =
|
|
859
|
-
|
|
1285
|
+
const e = v(n, "deliveryConfig", t);
|
|
1286
|
+
f(
|
|
860
1287
|
e,
|
|
861
1288
|
"deliveryConfig",
|
|
862
1289
|
["recipients", "channels", "channelConfigs"],
|
|
863
1290
|
t
|
|
864
1291
|
);
|
|
865
|
-
const r =
|
|
1292
|
+
const r = Ve(e.channelConfigs, t), o = xe(e.recipients, t), i = Te(e.channels, t), a = ((s = (m = r == null ? void 0 : r.SLACK) == null ? void 0 : m.slackConfig) == null ? void 0 : s.destination.type) === "channel" && !!r.SLACK.slackConfig.destination.channelId.trim();
|
|
866
1293
|
return i.some(
|
|
867
|
-
(
|
|
1294
|
+
(I) => I !== "SLACK"
|
|
868
1295
|
) && o.length === 0 && c(
|
|
869
1296
|
t,
|
|
870
1297
|
"deliveryConfig.recipients",
|
|
@@ -877,7 +1304,7 @@ function ye(n, t) {
|
|
|
877
1304
|
t,
|
|
878
1305
|
"deliveryConfig.channelConfigs.SLACK.slackConfig.destination.channelId",
|
|
879
1306
|
"Choose a Slack channel destination."
|
|
880
|
-
), !i.includes("SLACK") && ((
|
|
1307
|
+
), !i.includes("SLACK") && ((p = r == null ? void 0 : r.SLACK) != null && p.slackConfig) && c(
|
|
881
1308
|
t,
|
|
882
1309
|
"deliveryConfig.channelConfigs.SLACK",
|
|
883
1310
|
"Slack config requires SLACK in deliveryConfig.channels."
|
|
@@ -887,9 +1314,9 @@ function ye(n, t) {
|
|
|
887
1314
|
...r ? { channelConfigs: r } : {}
|
|
888
1315
|
};
|
|
889
1316
|
}
|
|
890
|
-
function
|
|
891
|
-
const t = [], e =
|
|
892
|
-
|
|
1317
|
+
function D(n) {
|
|
1318
|
+
const t = [], e = v(n, "draft", t);
|
|
1319
|
+
f(
|
|
893
1320
|
e,
|
|
894
1321
|
"draft",
|
|
895
1322
|
[
|
|
@@ -912,70 +1339,73 @@ function k(n) {
|
|
|
912
1339
|
"name",
|
|
913
1340
|
l.name,
|
|
914
1341
|
t
|
|
915
|
-
), o =
|
|
1342
|
+
), o = y(
|
|
916
1343
|
e.description,
|
|
917
1344
|
"description",
|
|
918
1345
|
l.description,
|
|
919
1346
|
t
|
|
920
|
-
) ?? null, i =
|
|
921
|
-
return
|
|
1347
|
+
) ?? null, i = y(e.scheduleExpr, "scheduleExpr", 500, t) ?? null, a = y(e.timezone, "timezone", 200, t) ?? "UTC", d = se(e.status, t), m = j(e.source, t), s = K(e.body, t), p = G(e.attachments, t), I = q(e.presentation, t), b = U(e.limits, t), h = Be(e.deliveryConfig, t);
|
|
1348
|
+
return H(s, p, t), B(t), {
|
|
922
1349
|
name: r,
|
|
923
1350
|
description: o,
|
|
924
|
-
status:
|
|
1351
|
+
status: d,
|
|
925
1352
|
scheduleExpr: i,
|
|
926
1353
|
timezone: a,
|
|
927
|
-
source:
|
|
928
|
-
body:
|
|
929
|
-
attachments:
|
|
930
|
-
presentation:
|
|
931
|
-
...
|
|
932
|
-
deliveryConfig:
|
|
1354
|
+
source: m,
|
|
1355
|
+
body: s,
|
|
1356
|
+
attachments: p,
|
|
1357
|
+
presentation: I,
|
|
1358
|
+
...b ? { limits: b } : {},
|
|
1359
|
+
deliveryConfig: h
|
|
933
1360
|
};
|
|
934
1361
|
}
|
|
935
|
-
function
|
|
936
|
-
return
|
|
1362
|
+
function Re(n) {
|
|
1363
|
+
return D(n);
|
|
937
1364
|
}
|
|
938
|
-
function
|
|
939
|
-
return
|
|
1365
|
+
function Fe(n) {
|
|
1366
|
+
return D(n);
|
|
940
1367
|
}
|
|
941
|
-
function
|
|
1368
|
+
function Me(n) {
|
|
942
1369
|
try {
|
|
943
|
-
return { valid: !0, value:
|
|
1370
|
+
return { valid: !0, value: D(n), issues: [] };
|
|
944
1371
|
} catch (t) {
|
|
945
|
-
if (t instanceof
|
|
1372
|
+
if (t instanceof S)
|
|
946
1373
|
return { valid: !1, issues: t.issues };
|
|
947
1374
|
throw t;
|
|
948
1375
|
}
|
|
949
1376
|
}
|
|
950
|
-
function
|
|
1377
|
+
function Pe(n) {
|
|
951
1378
|
try {
|
|
952
|
-
return { valid: !0, value:
|
|
1379
|
+
return { valid: !0, value: X(n), issues: [] };
|
|
953
1380
|
} catch (t) {
|
|
954
|
-
if (t instanceof
|
|
1381
|
+
if (t instanceof S)
|
|
955
1382
|
return { valid: !1, issues: t.issues };
|
|
956
1383
|
throw t;
|
|
957
1384
|
}
|
|
958
1385
|
}
|
|
959
|
-
function
|
|
960
|
-
return typeof n == "string" &&
|
|
1386
|
+
function je(n) {
|
|
1387
|
+
return typeof n == "string" && M.has(n);
|
|
961
1388
|
}
|
|
962
|
-
function
|
|
963
|
-
return typeof n == "string" &&
|
|
1389
|
+
function J(n) {
|
|
1390
|
+
return typeof n == "string" && Q.has(n);
|
|
964
1391
|
}
|
|
965
1392
|
export {
|
|
966
|
-
|
|
967
|
-
|
|
1393
|
+
Z as BRIEFING_ARTIFACT_FORMATS,
|
|
1394
|
+
g as BRIEFING_CONTENT_LIMITS,
|
|
1395
|
+
w as BRIEFING_KIND,
|
|
968
1396
|
l as BRIEFING_TEXT_LIMITS,
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1397
|
+
S as BriefingContractError,
|
|
1398
|
+
V as DEFAULT_BRIEFING_ARTIFACT_FORMATS,
|
|
1399
|
+
De as MAX_BRIEFING_ATTACHMENTS,
|
|
1400
|
+
Oe as buildBriefingJobConfig,
|
|
1401
|
+
Re as buildCreateBriefingRequest,
|
|
1402
|
+
Fe as buildUpdateBriefingRequest,
|
|
1403
|
+
je as isBriefingArtifactFormat,
|
|
1404
|
+
J as isBriefingDeliveryChannel,
|
|
1405
|
+
ge as normalizeBriefingContentDocument,
|
|
1406
|
+
D as normalizeBriefingDraft,
|
|
1407
|
+
X as normalizeBriefingJobConfig,
|
|
1408
|
+
Ne as validateBriefingContentDocument,
|
|
1409
|
+
Me as validateBriefingDraft,
|
|
1410
|
+
Pe as validateBriefingJobConfig
|
|
981
1411
|
};
|