@timeback/caliper 0.1.4 → 0.1.6-beta.20260219190739
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/client.d.ts +10 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/index.d.ts +1384 -52
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1060 -316
- package/dist/public-types.d.ts +879 -0
- package/dist/public-types.d.ts.map +1 -0
- package/dist/{types.js → public-types.js} +1 -17
- package/dist/resources/events.d.ts +6 -3
- package/dist/resources/events.d.ts.map +1 -1
- package/package.json +7 -5
package/dist/index.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
4
1
|
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
-
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
-
for (let key of __getOwnPropNames(mod))
|
|
11
|
-
if (!__hasOwnProp.call(to, key))
|
|
12
|
-
__defProp(to, key, {
|
|
13
|
-
get: () => mod[key],
|
|
14
|
-
enumerable: true
|
|
15
|
-
});
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
2
|
var __export = (target, all) => {
|
|
19
3
|
for (var name in all)
|
|
20
4
|
__defProp(target, name, {
|
|
@@ -24,7 +8,417 @@ var __export = (target, all) => {
|
|
|
24
8
|
set: (newValue) => all[name] = () => newValue
|
|
25
9
|
});
|
|
26
10
|
};
|
|
27
|
-
var
|
|
11
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
12
|
+
|
|
13
|
+
// node:util
|
|
14
|
+
var exports_util = {};
|
|
15
|
+
__export(exports_util, {
|
|
16
|
+
types: () => types,
|
|
17
|
+
promisify: () => promisify,
|
|
18
|
+
log: () => log,
|
|
19
|
+
isUndefined: () => isUndefined,
|
|
20
|
+
isSymbol: () => isSymbol,
|
|
21
|
+
isString: () => isString,
|
|
22
|
+
isRegExp: () => isRegExp,
|
|
23
|
+
isPrimitive: () => isPrimitive,
|
|
24
|
+
isObject: () => isObject,
|
|
25
|
+
isNumber: () => isNumber,
|
|
26
|
+
isNullOrUndefined: () => isNullOrUndefined,
|
|
27
|
+
isNull: () => isNull,
|
|
28
|
+
isFunction: () => isFunction,
|
|
29
|
+
isError: () => isError,
|
|
30
|
+
isDate: () => isDate,
|
|
31
|
+
isBuffer: () => isBuffer,
|
|
32
|
+
isBoolean: () => isBoolean,
|
|
33
|
+
isArray: () => isArray,
|
|
34
|
+
inspect: () => inspect,
|
|
35
|
+
inherits: () => inherits,
|
|
36
|
+
format: () => format,
|
|
37
|
+
deprecate: () => deprecate,
|
|
38
|
+
default: () => util_default,
|
|
39
|
+
debuglog: () => debuglog,
|
|
40
|
+
callbackifyOnRejected: () => callbackifyOnRejected,
|
|
41
|
+
callbackify: () => callbackify,
|
|
42
|
+
_extend: () => _extend,
|
|
43
|
+
TextEncoder: () => TextEncoder,
|
|
44
|
+
TextDecoder: () => TextDecoder
|
|
45
|
+
});
|
|
46
|
+
function format(f, ...args) {
|
|
47
|
+
if (!isString(f)) {
|
|
48
|
+
var objects = [f];
|
|
49
|
+
for (var i = 0;i < args.length; i++)
|
|
50
|
+
objects.push(inspect(args[i]));
|
|
51
|
+
return objects.join(" ");
|
|
52
|
+
}
|
|
53
|
+
var i = 0, len = args.length, str = String(f).replace(formatRegExp, function(x2) {
|
|
54
|
+
if (x2 === "%%")
|
|
55
|
+
return "%";
|
|
56
|
+
if (i >= len)
|
|
57
|
+
return x2;
|
|
58
|
+
switch (x2) {
|
|
59
|
+
case "%s":
|
|
60
|
+
return String(args[i++]);
|
|
61
|
+
case "%d":
|
|
62
|
+
return Number(args[i++]);
|
|
63
|
+
case "%j":
|
|
64
|
+
try {
|
|
65
|
+
return JSON.stringify(args[i++]);
|
|
66
|
+
} catch (_) {
|
|
67
|
+
return "[Circular]";
|
|
68
|
+
}
|
|
69
|
+
default:
|
|
70
|
+
return x2;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
for (var x = args[i];i < len; x = args[++i])
|
|
74
|
+
if (isNull(x) || !isObject(x))
|
|
75
|
+
str += " " + x;
|
|
76
|
+
else
|
|
77
|
+
str += " " + inspect(x);
|
|
78
|
+
return str;
|
|
79
|
+
}
|
|
80
|
+
function deprecate(fn, msg) {
|
|
81
|
+
if (typeof process > "u" || process?.noDeprecation === true)
|
|
82
|
+
return fn;
|
|
83
|
+
var warned = false;
|
|
84
|
+
function deprecated(...args) {
|
|
85
|
+
if (!warned) {
|
|
86
|
+
if (process.throwDeprecation)
|
|
87
|
+
throw Error(msg);
|
|
88
|
+
else if (process.traceDeprecation)
|
|
89
|
+
console.trace(msg);
|
|
90
|
+
else
|
|
91
|
+
console.error(msg);
|
|
92
|
+
warned = true;
|
|
93
|
+
}
|
|
94
|
+
return fn.apply(this, ...args);
|
|
95
|
+
}
|
|
96
|
+
return deprecated;
|
|
97
|
+
}
|
|
98
|
+
function stylizeWithColor(str, styleType) {
|
|
99
|
+
var style = inspect.styles[styleType];
|
|
100
|
+
if (style)
|
|
101
|
+
return "\x1B[" + inspect.colors[style][0] + "m" + str + "\x1B[" + inspect.colors[style][1] + "m";
|
|
102
|
+
else
|
|
103
|
+
return str;
|
|
104
|
+
}
|
|
105
|
+
function stylizeNoColor(str, styleType) {
|
|
106
|
+
return str;
|
|
107
|
+
}
|
|
108
|
+
function arrayToHash(array) {
|
|
109
|
+
var hash = {};
|
|
110
|
+
return array.forEach(function(val, idx) {
|
|
111
|
+
hash[val] = true;
|
|
112
|
+
}), hash;
|
|
113
|
+
}
|
|
114
|
+
function formatValue(ctx, value, recurseTimes) {
|
|
115
|
+
if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== inspect && !(value.constructor && value.constructor.prototype === value)) {
|
|
116
|
+
var ret = value.inspect(recurseTimes, ctx);
|
|
117
|
+
if (!isString(ret))
|
|
118
|
+
ret = formatValue(ctx, ret, recurseTimes);
|
|
119
|
+
return ret;
|
|
120
|
+
}
|
|
121
|
+
var primitive = formatPrimitive(ctx, value);
|
|
122
|
+
if (primitive)
|
|
123
|
+
return primitive;
|
|
124
|
+
var keys = Object.keys(value), visibleKeys = arrayToHash(keys);
|
|
125
|
+
if (ctx.showHidden)
|
|
126
|
+
keys = Object.getOwnPropertyNames(value);
|
|
127
|
+
if (isError(value) && (keys.indexOf("message") >= 0 || keys.indexOf("description") >= 0))
|
|
128
|
+
return formatError(value);
|
|
129
|
+
if (keys.length === 0) {
|
|
130
|
+
if (isFunction(value)) {
|
|
131
|
+
var name = value.name ? ": " + value.name : "";
|
|
132
|
+
return ctx.stylize("[Function" + name + "]", "special");
|
|
133
|
+
}
|
|
134
|
+
if (isRegExp(value))
|
|
135
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
|
|
136
|
+
if (isDate(value))
|
|
137
|
+
return ctx.stylize(Date.prototype.toString.call(value), "date");
|
|
138
|
+
if (isError(value))
|
|
139
|
+
return formatError(value);
|
|
140
|
+
}
|
|
141
|
+
var base = "", array = false, braces = ["{", "}"];
|
|
142
|
+
if (isArray(value))
|
|
143
|
+
array = true, braces = ["[", "]"];
|
|
144
|
+
if (isFunction(value)) {
|
|
145
|
+
var n = value.name ? ": " + value.name : "";
|
|
146
|
+
base = " [Function" + n + "]";
|
|
147
|
+
}
|
|
148
|
+
if (isRegExp(value))
|
|
149
|
+
base = " " + RegExp.prototype.toString.call(value);
|
|
150
|
+
if (isDate(value))
|
|
151
|
+
base = " " + Date.prototype.toUTCString.call(value);
|
|
152
|
+
if (isError(value))
|
|
153
|
+
base = " " + formatError(value);
|
|
154
|
+
if (keys.length === 0 && (!array || value.length == 0))
|
|
155
|
+
return braces[0] + base + braces[1];
|
|
156
|
+
if (recurseTimes < 0)
|
|
157
|
+
if (isRegExp(value))
|
|
158
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
|
|
159
|
+
else
|
|
160
|
+
return ctx.stylize("[Object]", "special");
|
|
161
|
+
ctx.seen.push(value);
|
|
162
|
+
var output;
|
|
163
|
+
if (array)
|
|
164
|
+
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
|
|
165
|
+
else
|
|
166
|
+
output = keys.map(function(key) {
|
|
167
|
+
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
|
|
168
|
+
});
|
|
169
|
+
return ctx.seen.pop(), reduceToSingleString(output, base, braces);
|
|
170
|
+
}
|
|
171
|
+
function formatPrimitive(ctx, value) {
|
|
172
|
+
if (isUndefined(value))
|
|
173
|
+
return ctx.stylize("undefined", "undefined");
|
|
174
|
+
if (isString(value)) {
|
|
175
|
+
var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
176
|
+
return ctx.stylize(simple, "string");
|
|
177
|
+
}
|
|
178
|
+
if (isNumber(value))
|
|
179
|
+
return ctx.stylize("" + value, "number");
|
|
180
|
+
if (isBoolean(value))
|
|
181
|
+
return ctx.stylize("" + value, "boolean");
|
|
182
|
+
if (isNull(value))
|
|
183
|
+
return ctx.stylize("null", "null");
|
|
184
|
+
}
|
|
185
|
+
function formatError(value) {
|
|
186
|
+
return "[" + Error.prototype.toString.call(value) + "]";
|
|
187
|
+
}
|
|
188
|
+
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
|
189
|
+
var output = [];
|
|
190
|
+
for (var i = 0, l = value.length;i < l; ++i)
|
|
191
|
+
if (hasOwnProperty(value, String(i)))
|
|
192
|
+
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
|
|
193
|
+
else
|
|
194
|
+
output.push("");
|
|
195
|
+
return keys.forEach(function(key) {
|
|
196
|
+
if (!key.match(/^\d+$/))
|
|
197
|
+
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
|
|
198
|
+
}), output;
|
|
199
|
+
}
|
|
200
|
+
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
|
201
|
+
var name, str, desc;
|
|
202
|
+
if (desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }, desc.get)
|
|
203
|
+
if (desc.set)
|
|
204
|
+
str = ctx.stylize("[Getter/Setter]", "special");
|
|
205
|
+
else
|
|
206
|
+
str = ctx.stylize("[Getter]", "special");
|
|
207
|
+
else if (desc.set)
|
|
208
|
+
str = ctx.stylize("[Setter]", "special");
|
|
209
|
+
if (!hasOwnProperty(visibleKeys, key))
|
|
210
|
+
name = "[" + key + "]";
|
|
211
|
+
if (!str)
|
|
212
|
+
if (ctx.seen.indexOf(desc.value) < 0) {
|
|
213
|
+
if (isNull(recurseTimes))
|
|
214
|
+
str = formatValue(ctx, desc.value, null);
|
|
215
|
+
else
|
|
216
|
+
str = formatValue(ctx, desc.value, recurseTimes - 1);
|
|
217
|
+
if (str.indexOf(`
|
|
218
|
+
`) > -1)
|
|
219
|
+
if (array)
|
|
220
|
+
str = str.split(`
|
|
221
|
+
`).map(function(line) {
|
|
222
|
+
return " " + line;
|
|
223
|
+
}).join(`
|
|
224
|
+
`).slice(2);
|
|
225
|
+
else
|
|
226
|
+
str = `
|
|
227
|
+
` + str.split(`
|
|
228
|
+
`).map(function(line) {
|
|
229
|
+
return " " + line;
|
|
230
|
+
}).join(`
|
|
231
|
+
`);
|
|
232
|
+
} else
|
|
233
|
+
str = ctx.stylize("[Circular]", "special");
|
|
234
|
+
if (isUndefined(name)) {
|
|
235
|
+
if (array && key.match(/^\d+$/))
|
|
236
|
+
return str;
|
|
237
|
+
if (name = JSON.stringify("" + key), name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/))
|
|
238
|
+
name = name.slice(1, -1), name = ctx.stylize(name, "name");
|
|
239
|
+
else
|
|
240
|
+
name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), name = ctx.stylize(name, "string");
|
|
241
|
+
}
|
|
242
|
+
return name + ": " + str;
|
|
243
|
+
}
|
|
244
|
+
function reduceToSingleString(output, base, braces) {
|
|
245
|
+
var numLinesEst = 0, length = output.reduce(function(prev, cur) {
|
|
246
|
+
if (numLinesEst++, cur.indexOf(`
|
|
247
|
+
`) >= 0)
|
|
248
|
+
numLinesEst++;
|
|
249
|
+
return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
250
|
+
}, 0);
|
|
251
|
+
if (length > 60)
|
|
252
|
+
return braces[0] + (base === "" ? "" : base + `
|
|
253
|
+
`) + " " + output.join(`,
|
|
254
|
+
`) + " " + braces[1];
|
|
255
|
+
return braces[0] + base + " " + output.join(", ") + " " + braces[1];
|
|
256
|
+
}
|
|
257
|
+
function isArray(ar) {
|
|
258
|
+
return Array.isArray(ar);
|
|
259
|
+
}
|
|
260
|
+
function isBoolean(arg) {
|
|
261
|
+
return typeof arg === "boolean";
|
|
262
|
+
}
|
|
263
|
+
function isNull(arg) {
|
|
264
|
+
return arg === null;
|
|
265
|
+
}
|
|
266
|
+
function isNullOrUndefined(arg) {
|
|
267
|
+
return arg == null;
|
|
268
|
+
}
|
|
269
|
+
function isNumber(arg) {
|
|
270
|
+
return typeof arg === "number";
|
|
271
|
+
}
|
|
272
|
+
function isString(arg) {
|
|
273
|
+
return typeof arg === "string";
|
|
274
|
+
}
|
|
275
|
+
function isSymbol(arg) {
|
|
276
|
+
return typeof arg === "symbol";
|
|
277
|
+
}
|
|
278
|
+
function isUndefined(arg) {
|
|
279
|
+
return arg === undefined;
|
|
280
|
+
}
|
|
281
|
+
function isRegExp(re) {
|
|
282
|
+
return isObject(re) && objectToString(re) === "[object RegExp]";
|
|
283
|
+
}
|
|
284
|
+
function isObject(arg) {
|
|
285
|
+
return typeof arg === "object" && arg !== null;
|
|
286
|
+
}
|
|
287
|
+
function isDate(d) {
|
|
288
|
+
return isObject(d) && objectToString(d) === "[object Date]";
|
|
289
|
+
}
|
|
290
|
+
function isError(e) {
|
|
291
|
+
return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error);
|
|
292
|
+
}
|
|
293
|
+
function isFunction(arg) {
|
|
294
|
+
return typeof arg === "function";
|
|
295
|
+
}
|
|
296
|
+
function isPrimitive(arg) {
|
|
297
|
+
return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || typeof arg > "u";
|
|
298
|
+
}
|
|
299
|
+
function isBuffer(arg) {
|
|
300
|
+
return arg instanceof Buffer;
|
|
301
|
+
}
|
|
302
|
+
function objectToString(o) {
|
|
303
|
+
return Object.prototype.toString.call(o);
|
|
304
|
+
}
|
|
305
|
+
function pad(n) {
|
|
306
|
+
return n < 10 ? "0" + n.toString(10) : n.toString(10);
|
|
307
|
+
}
|
|
308
|
+
function timestamp() {
|
|
309
|
+
var d = new Date, time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(":");
|
|
310
|
+
return [d.getDate(), months[d.getMonth()], time].join(" ");
|
|
311
|
+
}
|
|
312
|
+
function log(...args) {
|
|
313
|
+
console.log("%s - %s", timestamp(), format.apply(null, args));
|
|
314
|
+
}
|
|
315
|
+
function inherits(ctor, superCtor) {
|
|
316
|
+
if (superCtor)
|
|
317
|
+
ctor.super_ = superCtor, ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } });
|
|
318
|
+
}
|
|
319
|
+
function _extend(origin, add) {
|
|
320
|
+
if (!add || !isObject(add))
|
|
321
|
+
return origin;
|
|
322
|
+
var keys = Object.keys(add), i = keys.length;
|
|
323
|
+
while (i--)
|
|
324
|
+
origin[keys[i]] = add[keys[i]];
|
|
325
|
+
return origin;
|
|
326
|
+
}
|
|
327
|
+
function hasOwnProperty(obj, prop) {
|
|
328
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
329
|
+
}
|
|
330
|
+
function callbackifyOnRejected(reason, cb) {
|
|
331
|
+
if (!reason) {
|
|
332
|
+
var newReason = Error("Promise was rejected with a falsy value");
|
|
333
|
+
newReason.reason = reason, reason = newReason;
|
|
334
|
+
}
|
|
335
|
+
return cb(reason);
|
|
336
|
+
}
|
|
337
|
+
function callbackify(original) {
|
|
338
|
+
if (typeof original !== "function")
|
|
339
|
+
throw TypeError('The "original" argument must be of type Function');
|
|
340
|
+
function callbackified(...args) {
|
|
341
|
+
var maybeCb = args.pop();
|
|
342
|
+
if (typeof maybeCb !== "function")
|
|
343
|
+
throw TypeError("The last argument must be of type Function");
|
|
344
|
+
var self = this, cb = function(...args2) {
|
|
345
|
+
return maybeCb.apply(self, ...args2);
|
|
346
|
+
};
|
|
347
|
+
original.apply(this, args).then(function(ret) {
|
|
348
|
+
process.nextTick(cb.bind(null, null, ret));
|
|
349
|
+
}, function(rej) {
|
|
350
|
+
process.nextTick(callbackifyOnRejected.bind(null, rej, cb));
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
return Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)), Object.defineProperties(callbackified, Object.getOwnPropertyDescriptors(original)), callbackified;
|
|
354
|
+
}
|
|
355
|
+
var formatRegExp, debuglog, inspect, types = () => {}, months, promisify, TextEncoder, TextDecoder, util_default;
|
|
356
|
+
var init_util = __esm(() => {
|
|
357
|
+
formatRegExp = /%[sdj%]/g;
|
|
358
|
+
debuglog = ((debugs = {}, debugEnvRegex = {}, debugEnv) => ((debugEnv = typeof process < "u" && false) && (debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase()), debugEnvRegex = new RegExp("^" + debugEnv + "$", "i"), (set) => {
|
|
359
|
+
if (set = set.toUpperCase(), !debugs[set])
|
|
360
|
+
if (debugEnvRegex.test(set))
|
|
361
|
+
debugs[set] = function(...args) {
|
|
362
|
+
console.error("%s: %s", set, pid, format.apply(null, ...args));
|
|
363
|
+
};
|
|
364
|
+
else
|
|
365
|
+
debugs[set] = function() {};
|
|
366
|
+
return debugs[set];
|
|
367
|
+
}))();
|
|
368
|
+
inspect = ((i) => (i.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, i.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, i.custom = Symbol.for("nodejs.util.inspect.custom"), i))(function(obj, opts, ...rest) {
|
|
369
|
+
var ctx = { seen: [], stylize: stylizeNoColor };
|
|
370
|
+
if (rest.length >= 1)
|
|
371
|
+
ctx.depth = rest[0];
|
|
372
|
+
if (rest.length >= 2)
|
|
373
|
+
ctx.colors = rest[1];
|
|
374
|
+
if (isBoolean(opts))
|
|
375
|
+
ctx.showHidden = opts;
|
|
376
|
+
else if (opts)
|
|
377
|
+
_extend(ctx, opts);
|
|
378
|
+
if (isUndefined(ctx.showHidden))
|
|
379
|
+
ctx.showHidden = false;
|
|
380
|
+
if (isUndefined(ctx.depth))
|
|
381
|
+
ctx.depth = 2;
|
|
382
|
+
if (isUndefined(ctx.colors))
|
|
383
|
+
ctx.colors = false;
|
|
384
|
+
if (ctx.colors)
|
|
385
|
+
ctx.stylize = stylizeWithColor;
|
|
386
|
+
return formatValue(ctx, obj, ctx.depth);
|
|
387
|
+
});
|
|
388
|
+
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
389
|
+
promisify = ((x) => (x.custom = Symbol.for("nodejs.util.promisify.custom"), x))(function(original) {
|
|
390
|
+
if (typeof original !== "function")
|
|
391
|
+
throw TypeError('The "original" argument must be of type Function');
|
|
392
|
+
if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
|
|
393
|
+
var fn = original[kCustomPromisifiedSymbol];
|
|
394
|
+
if (typeof fn !== "function")
|
|
395
|
+
throw TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');
|
|
396
|
+
return Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true }), fn;
|
|
397
|
+
}
|
|
398
|
+
function fn(...args) {
|
|
399
|
+
var promiseResolve, promiseReject, promise = new Promise(function(resolve, reject) {
|
|
400
|
+
promiseResolve = resolve, promiseReject = reject;
|
|
401
|
+
});
|
|
402
|
+
args.push(function(err, value) {
|
|
403
|
+
if (err)
|
|
404
|
+
promiseReject(err);
|
|
405
|
+
else
|
|
406
|
+
promiseResolve(value);
|
|
407
|
+
});
|
|
408
|
+
try {
|
|
409
|
+
original.apply(this, args);
|
|
410
|
+
} catch (err) {
|
|
411
|
+
promiseReject(err);
|
|
412
|
+
}
|
|
413
|
+
return promise;
|
|
414
|
+
}
|
|
415
|
+
if (Object.setPrototypeOf(fn, Object.getPrototypeOf(original)), kCustomPromisifiedSymbol)
|
|
416
|
+
Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true });
|
|
417
|
+
return Object.defineProperties(fn, Object.getOwnPropertyDescriptors(original));
|
|
418
|
+
});
|
|
419
|
+
({ TextEncoder, TextDecoder } = globalThis);
|
|
420
|
+
util_default = { TextEncoder, TextDecoder, promisify, log, inherits, _extend, callbackifyOnRejected, callbackify };
|
|
421
|
+
});
|
|
28
422
|
|
|
29
423
|
// ../../internal/constants/src/endpoints.ts
|
|
30
424
|
var DEFAULT_PLATFORM = "BEYOND_AI";
|
|
@@ -180,7 +574,7 @@ function detectEnvironment() {
|
|
|
180
574
|
var nodeInspect;
|
|
181
575
|
if (!isBrowser()) {
|
|
182
576
|
try {
|
|
183
|
-
const util = await
|
|
577
|
+
const util = await Promise.resolve().then(() => (init_util(), exports_util));
|
|
184
578
|
nodeInspect = util.inspect;
|
|
185
579
|
} catch {}
|
|
186
580
|
}
|
|
@@ -233,10 +627,10 @@ var terminalFormatter = (entry) => {
|
|
|
233
627
|
const consoleMethod = getConsoleMethod(entry.level);
|
|
234
628
|
const levelUpper = entry.level.toUpperCase().padEnd(5);
|
|
235
629
|
const isoString = entry.timestamp.toISOString().replace(/\.\d{3}Z$/, "");
|
|
236
|
-
const
|
|
630
|
+
const timestamp2 = `${colors.dim}[${isoString}]${colors.reset}`;
|
|
237
631
|
const level = `${levelColor}${levelUpper}${colors.reset}`;
|
|
238
632
|
const scope = entry.scope ? `${colors.bold}[${entry.scope}]${colors.reset} ` : "";
|
|
239
|
-
const prefix = `${
|
|
633
|
+
const prefix = `${timestamp2} ${level} ${scope}${entry.message}`;
|
|
240
634
|
if (entry.context && Object.keys(entry.context).length > 0) {
|
|
241
635
|
consoleMethod(prefix, formatContext(entry.context));
|
|
242
636
|
} else {
|
|
@@ -251,9 +645,9 @@ var LEVEL_PREFIX = {
|
|
|
251
645
|
error: "[ERROR]"
|
|
252
646
|
};
|
|
253
647
|
function formatContext2(context) {
|
|
254
|
-
return Object.entries(context).map(([key, value]) => `${key}=${
|
|
648
|
+
return Object.entries(context).map(([key, value]) => `${key}=${formatValue2(value)}`).join(" ");
|
|
255
649
|
}
|
|
256
|
-
function
|
|
650
|
+
function formatValue2(value) {
|
|
257
651
|
if (typeof value === "string")
|
|
258
652
|
return value;
|
|
259
653
|
if (typeof value === "number")
|
|
@@ -413,7 +807,7 @@ function isDebug() {
|
|
|
413
807
|
return false;
|
|
414
808
|
}
|
|
415
809
|
}
|
|
416
|
-
var
|
|
810
|
+
var log2 = createLogger({ scope: "auth", minLevel: isDebug() ? "debug" : "warn" });
|
|
417
811
|
|
|
418
812
|
class TokenManager {
|
|
419
813
|
config;
|
|
@@ -427,11 +821,11 @@ class TokenManager {
|
|
|
427
821
|
}
|
|
428
822
|
async getToken() {
|
|
429
823
|
if (this.accessToken && Date.now() < this.tokenExpiry) {
|
|
430
|
-
|
|
824
|
+
log2.debug("Using cached token");
|
|
431
825
|
return this.accessToken;
|
|
432
826
|
}
|
|
433
827
|
if (this.pendingRequest) {
|
|
434
|
-
|
|
828
|
+
log2.debug("Waiting for in-flight token request");
|
|
435
829
|
return this.pendingRequest;
|
|
436
830
|
}
|
|
437
831
|
this.pendingRequest = this.fetchToken();
|
|
@@ -442,7 +836,7 @@ class TokenManager {
|
|
|
442
836
|
}
|
|
443
837
|
}
|
|
444
838
|
async fetchToken() {
|
|
445
|
-
|
|
839
|
+
log2.debug("Fetching new access token...");
|
|
446
840
|
const { clientId, clientSecret } = this.config.credentials;
|
|
447
841
|
const credentials = btoa(`${clientId}:${clientSecret}`);
|
|
448
842
|
const start = performance.now();
|
|
@@ -456,17 +850,17 @@ class TokenManager {
|
|
|
456
850
|
});
|
|
457
851
|
const duration = Math.round(performance.now() - start);
|
|
458
852
|
if (!response.ok) {
|
|
459
|
-
|
|
853
|
+
log2.error(`Token request failed: ${response.status} ${response.statusText}`);
|
|
460
854
|
throw new Error(`Failed to obtain access token: ${response.status} ${response.statusText}`);
|
|
461
855
|
}
|
|
462
856
|
const data = await response.json();
|
|
463
857
|
this.accessToken = data.access_token;
|
|
464
858
|
this.tokenExpiry = Date.now() + (data.expires_in - 60) * 1000;
|
|
465
|
-
|
|
859
|
+
log2.debug(`Token acquired (${duration}ms, expires in ${data.expires_in}s)`);
|
|
466
860
|
return this.accessToken;
|
|
467
861
|
}
|
|
468
862
|
invalidate() {
|
|
469
|
-
|
|
863
|
+
log2.debug("Token invalidated");
|
|
470
864
|
this.accessToken = null;
|
|
471
865
|
this.tokenExpiry = 0;
|
|
472
866
|
}
|
|
@@ -490,6 +884,28 @@ var BEYONDAI_PATHS = {
|
|
|
490
884
|
},
|
|
491
885
|
powerpath: {
|
|
492
886
|
base: "/powerpath"
|
|
887
|
+
},
|
|
888
|
+
clr: {
|
|
889
|
+
credentials: "/ims/clr/v2p0/credentials",
|
|
890
|
+
discovery: "/ims/clr/v2p0/discovery"
|
|
891
|
+
},
|
|
892
|
+
case: {
|
|
893
|
+
base: "/ims/case/v1p1"
|
|
894
|
+
},
|
|
895
|
+
webhooks: {
|
|
896
|
+
webhookList: "/webhooks/",
|
|
897
|
+
webhookGet: "/webhooks/{id}",
|
|
898
|
+
webhookCreate: "/webhooks/",
|
|
899
|
+
webhookUpdate: "/webhooks/{id}",
|
|
900
|
+
webhookDelete: "/webhooks/{id}",
|
|
901
|
+
webhookActivate: "/webhooks/{id}/activate",
|
|
902
|
+
webhookDeactivate: "/webhooks/{id}/deactivate",
|
|
903
|
+
webhookFilterList: "/webhook-filters/",
|
|
904
|
+
webhookFilterGet: "/webhook-filters/{id}",
|
|
905
|
+
webhookFilterCreate: "/webhook-filters/",
|
|
906
|
+
webhookFilterUpdate: "/webhook-filters/{id}",
|
|
907
|
+
webhookFilterDelete: "/webhook-filters/{id}",
|
|
908
|
+
webhookFiltersByWebhook: "/webhook-filters/webhook/{webhookId}"
|
|
493
909
|
}
|
|
494
910
|
};
|
|
495
911
|
var LEARNWITHAI_PATHS = {
|
|
@@ -505,8 +921,11 @@ var LEARNWITHAI_PATHS = {
|
|
|
505
921
|
gradebook: "/gradebook/1.0",
|
|
506
922
|
resources: "/resources/1.0"
|
|
507
923
|
},
|
|
924
|
+
webhooks: null,
|
|
508
925
|
edubridge: null,
|
|
509
|
-
powerpath: null
|
|
926
|
+
powerpath: null,
|
|
927
|
+
clr: null,
|
|
928
|
+
case: null
|
|
510
929
|
};
|
|
511
930
|
var PLATFORM_PATHS = {
|
|
512
931
|
BEYOND_AI: BEYONDAI_PATHS,
|
|
@@ -528,8 +947,11 @@ function resolvePathProfiles(pathProfile, customPaths) {
|
|
|
528
947
|
return {
|
|
529
948
|
caliper: customPaths?.caliper ?? basePaths.caliper,
|
|
530
949
|
oneroster: customPaths?.oneroster ?? basePaths.oneroster,
|
|
950
|
+
webhooks: customPaths?.webhooks ?? basePaths.webhooks,
|
|
531
951
|
edubridge: customPaths?.edubridge ?? basePaths.edubridge,
|
|
532
|
-
powerpath: customPaths?.powerpath ?? basePaths.powerpath
|
|
952
|
+
powerpath: customPaths?.powerpath ?? basePaths.powerpath,
|
|
953
|
+
clr: customPaths?.clr ?? basePaths.clr,
|
|
954
|
+
case: customPaths?.case ?? basePaths.case
|
|
533
955
|
};
|
|
534
956
|
}
|
|
535
957
|
|
|
@@ -569,10 +991,22 @@ class TimebackProvider {
|
|
|
569
991
|
baseUrl: platformEndpoints.api[env],
|
|
570
992
|
authUrl: this.authUrl
|
|
571
993
|
},
|
|
994
|
+
clr: {
|
|
995
|
+
baseUrl: platformEndpoints.api[env],
|
|
996
|
+
authUrl: this.authUrl
|
|
997
|
+
},
|
|
998
|
+
case: {
|
|
999
|
+
baseUrl: platformEndpoints.api[env],
|
|
1000
|
+
authUrl: this.authUrl
|
|
1001
|
+
},
|
|
572
1002
|
caliper: {
|
|
573
1003
|
baseUrl: platformEndpoints.caliper[env],
|
|
574
1004
|
authUrl: this.authUrl
|
|
575
1005
|
},
|
|
1006
|
+
webhooks: {
|
|
1007
|
+
baseUrl: platformEndpoints.caliper[env],
|
|
1008
|
+
authUrl: this.authUrl
|
|
1009
|
+
},
|
|
576
1010
|
qti: {
|
|
577
1011
|
baseUrl: platformEndpoints.qti[env],
|
|
578
1012
|
authUrl: this.authUrl
|
|
@@ -586,7 +1020,10 @@ class TimebackProvider {
|
|
|
586
1020
|
oneroster: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
587
1021
|
edubridge: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
588
1022
|
powerpath: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
1023
|
+
clr: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
1024
|
+
case: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
589
1025
|
caliper: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
1026
|
+
webhooks: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
590
1027
|
qti: { baseUrl: config.baseUrl, authUrl: this.authUrl }
|
|
591
1028
|
};
|
|
592
1029
|
} else if (isServicesConfig(config)) {
|
|
@@ -605,10 +1042,19 @@ class TimebackProvider {
|
|
|
605
1042
|
} else {
|
|
606
1043
|
throw new Error("Invalid provider configuration");
|
|
607
1044
|
}
|
|
1045
|
+
for (const service of Object.keys(this.pathProfiles)) {
|
|
1046
|
+
if (this.pathProfiles[service] === null) {
|
|
1047
|
+
delete this.endpoints[service];
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
608
1050
|
}
|
|
609
1051
|
getEndpoint(service) {
|
|
610
1052
|
const endpoint = this.endpoints[service];
|
|
611
1053
|
if (!endpoint) {
|
|
1054
|
+
const pathKey = service;
|
|
1055
|
+
if (pathKey in this.pathProfiles && this.pathProfiles[pathKey] === null) {
|
|
1056
|
+
throw new Error(`Service "${service}" is not supported on ${this.platform ?? "this"} platform.`);
|
|
1057
|
+
}
|
|
612
1058
|
throw new Error(`Service "${service}" is not configured in this provider`);
|
|
613
1059
|
}
|
|
614
1060
|
return endpoint;
|
|
@@ -1279,43 +1725,43 @@ function escapeValue(value) {
|
|
|
1279
1725
|
}
|
|
1280
1726
|
return value.replaceAll("'", "''");
|
|
1281
1727
|
}
|
|
1282
|
-
function
|
|
1728
|
+
function formatValue3(value) {
|
|
1283
1729
|
const escaped = escapeValue(value);
|
|
1284
1730
|
const needsQuotes = typeof value === "string" || value instanceof Date;
|
|
1285
1731
|
return needsQuotes ? `'${escaped}'` : escaped;
|
|
1286
1732
|
}
|
|
1287
1733
|
function fieldToConditions(field, condition) {
|
|
1288
1734
|
if (typeof condition === "string" || typeof condition === "number" || typeof condition === "boolean" || condition instanceof Date) {
|
|
1289
|
-
return [`${field}=${
|
|
1735
|
+
return [`${field}=${formatValue3(condition)}`];
|
|
1290
1736
|
}
|
|
1291
1737
|
if (typeof condition === "object" && condition !== null) {
|
|
1292
1738
|
const ops = condition;
|
|
1293
1739
|
const conditions = [];
|
|
1294
1740
|
if (ops.ne !== undefined) {
|
|
1295
|
-
conditions.push(`${field}!=${
|
|
1741
|
+
conditions.push(`${field}!=${formatValue3(ops.ne)}`);
|
|
1296
1742
|
}
|
|
1297
1743
|
if (ops.gt !== undefined) {
|
|
1298
|
-
conditions.push(`${field}>${
|
|
1744
|
+
conditions.push(`${field}>${formatValue3(ops.gt)}`);
|
|
1299
1745
|
}
|
|
1300
1746
|
if (ops.gte !== undefined) {
|
|
1301
|
-
conditions.push(`${field}>=${
|
|
1747
|
+
conditions.push(`${field}>=${formatValue3(ops.gte)}`);
|
|
1302
1748
|
}
|
|
1303
1749
|
if (ops.lt !== undefined) {
|
|
1304
|
-
conditions.push(`${field}<${
|
|
1750
|
+
conditions.push(`${field}<${formatValue3(ops.lt)}`);
|
|
1305
1751
|
}
|
|
1306
1752
|
if (ops.lte !== undefined) {
|
|
1307
|
-
conditions.push(`${field}<=${
|
|
1753
|
+
conditions.push(`${field}<=${formatValue3(ops.lte)}`);
|
|
1308
1754
|
}
|
|
1309
1755
|
if (ops.contains !== undefined) {
|
|
1310
|
-
conditions.push(`${field}~${
|
|
1756
|
+
conditions.push(`${field}~${formatValue3(ops.contains)}`);
|
|
1311
1757
|
}
|
|
1312
1758
|
if (ops.in !== undefined && ops.in.length > 0) {
|
|
1313
|
-
const inConditions = ops.in.map((v) => `${field}=${
|
|
1759
|
+
const inConditions = ops.in.map((v) => `${field}=${formatValue3(v)}`);
|
|
1314
1760
|
const joined = inConditions.join(" OR ");
|
|
1315
1761
|
conditions.push(inConditions.length > 1 ? `(${joined})` : joined);
|
|
1316
1762
|
}
|
|
1317
1763
|
if (ops.notIn !== undefined && ops.notIn.length > 0) {
|
|
1318
|
-
const notInConditions = ops.notIn.map((v) => `${field}!=${
|
|
1764
|
+
const notInConditions = ops.notIn.map((v) => `${field}!=${formatValue3(v)}`);
|
|
1319
1765
|
conditions.push(notInConditions.join(" AND "));
|
|
1320
1766
|
}
|
|
1321
1767
|
return conditions;
|
|
@@ -1522,13 +1968,13 @@ function resolveToProvider2(config, registry = DEFAULT_PROVIDER_REGISTRY) {
|
|
|
1522
1968
|
}
|
|
1523
1969
|
|
|
1524
1970
|
// src/utils.ts
|
|
1525
|
-
var
|
|
1971
|
+
var log3 = createScopedLogger("caliper");
|
|
1526
1972
|
|
|
1527
1973
|
// src/lib/transport.ts
|
|
1528
1974
|
class Transport extends BaseTransport {
|
|
1529
1975
|
paths;
|
|
1530
1976
|
constructor(config) {
|
|
1531
|
-
super({ config, logger:
|
|
1977
|
+
super({ config, logger: log3 });
|
|
1532
1978
|
this.paths = config.paths;
|
|
1533
1979
|
}
|
|
1534
1980
|
async requestPaginated(path, options = {}) {
|
|
@@ -1554,7 +2000,7 @@ __export(exports_external, {
|
|
|
1554
2000
|
uuidv6: () => uuidv6,
|
|
1555
2001
|
uuidv4: () => uuidv4,
|
|
1556
2002
|
uuid: () => uuid2,
|
|
1557
|
-
util: () =>
|
|
2003
|
+
util: () => exports_util2,
|
|
1558
2004
|
url: () => url,
|
|
1559
2005
|
uppercase: () => _uppercase,
|
|
1560
2006
|
unknown: () => unknown,
|
|
@@ -1663,7 +2109,7 @@ __export(exports_external, {
|
|
|
1663
2109
|
getErrorMap: () => getErrorMap,
|
|
1664
2110
|
function: () => _function,
|
|
1665
2111
|
fromJSONSchema: () => fromJSONSchema,
|
|
1666
|
-
formatError: () =>
|
|
2112
|
+
formatError: () => formatError2,
|
|
1667
2113
|
float64: () => float64,
|
|
1668
2114
|
float32: () => float32,
|
|
1669
2115
|
flattenError: () => flattenError,
|
|
@@ -1789,7 +2235,7 @@ __export(exports_external, {
|
|
|
1789
2235
|
var exports_core2 = {};
|
|
1790
2236
|
__export(exports_core2, {
|
|
1791
2237
|
version: () => version,
|
|
1792
|
-
util: () =>
|
|
2238
|
+
util: () => exports_util2,
|
|
1793
2239
|
treeifyError: () => treeifyError,
|
|
1794
2240
|
toJSONSchema: () => toJSONSchema,
|
|
1795
2241
|
toDotPath: () => toDotPath,
|
|
@@ -1813,7 +2259,7 @@ __export(exports_core2, {
|
|
|
1813
2259
|
initializeContext: () => initializeContext,
|
|
1814
2260
|
globalRegistry: () => globalRegistry,
|
|
1815
2261
|
globalConfig: () => globalConfig,
|
|
1816
|
-
formatError: () =>
|
|
2262
|
+
formatError: () => formatError2,
|
|
1817
2263
|
flattenError: () => flattenError,
|
|
1818
2264
|
finalize: () => finalize,
|
|
1819
2265
|
extractDefs: () => extractDefs,
|
|
@@ -2140,8 +2586,8 @@ function config(newConfig) {
|
|
|
2140
2586
|
return globalConfig;
|
|
2141
2587
|
}
|
|
2142
2588
|
// ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/util.js
|
|
2143
|
-
var
|
|
2144
|
-
__export(
|
|
2589
|
+
var exports_util2 = {};
|
|
2590
|
+
__export(exports_util2, {
|
|
2145
2591
|
unwrapMessage: () => unwrapMessage,
|
|
2146
2592
|
uint8ArrayToHex: () => uint8ArrayToHex,
|
|
2147
2593
|
uint8ArrayToBase64url: () => uint8ArrayToBase64url,
|
|
@@ -2171,7 +2617,7 @@ __export(exports_util, {
|
|
|
2171
2617
|
joinValues: () => joinValues,
|
|
2172
2618
|
issue: () => issue2,
|
|
2173
2619
|
isPlainObject: () => isPlainObject,
|
|
2174
|
-
isObject: () =>
|
|
2620
|
+
isObject: () => isObject2,
|
|
2175
2621
|
hexToUint8Array: () => hexToUint8Array,
|
|
2176
2622
|
getSizableOrigin: () => getSizableOrigin,
|
|
2177
2623
|
getParsedType: () => getParsedType,
|
|
@@ -2340,7 +2786,7 @@ function slugify(input) {
|
|
|
2340
2786
|
return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
2341
2787
|
}
|
|
2342
2788
|
var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
|
|
2343
|
-
function
|
|
2789
|
+
function isObject2(data) {
|
|
2344
2790
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
2345
2791
|
}
|
|
2346
2792
|
var allowsEval = cached(() => {
|
|
@@ -2356,7 +2802,7 @@ var allowsEval = cached(() => {
|
|
|
2356
2802
|
}
|
|
2357
2803
|
});
|
|
2358
2804
|
function isPlainObject(o) {
|
|
2359
|
-
if (
|
|
2805
|
+
if (isObject2(o) === false)
|
|
2360
2806
|
return false;
|
|
2361
2807
|
const ctor = o.constructor;
|
|
2362
2808
|
if (ctor === undefined)
|
|
@@ -2364,7 +2810,7 @@ function isPlainObject(o) {
|
|
|
2364
2810
|
if (typeof ctor !== "function")
|
|
2365
2811
|
return true;
|
|
2366
2812
|
const prot = ctor.prototype;
|
|
2367
|
-
if (
|
|
2813
|
+
if (isObject2(prot) === false)
|
|
2368
2814
|
return false;
|
|
2369
2815
|
if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
|
|
2370
2816
|
return false;
|
|
@@ -2845,7 +3291,7 @@ function flattenError(error, mapper = (issue3) => issue3.message) {
|
|
|
2845
3291
|
}
|
|
2846
3292
|
return { formErrors, fieldErrors };
|
|
2847
3293
|
}
|
|
2848
|
-
function
|
|
3294
|
+
function formatError2(error, mapper = (issue3) => issue3.message) {
|
|
2849
3295
|
const fieldErrors = { _errors: [] };
|
|
2850
3296
|
const processError = (error2) => {
|
|
2851
3297
|
for (const issue3 of error2.issues) {
|
|
@@ -4370,15 +4816,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
|
|
|
4370
4816
|
} catch (_err) {}
|
|
4371
4817
|
}
|
|
4372
4818
|
const input = payload.value;
|
|
4373
|
-
const
|
|
4374
|
-
const isValidDate =
|
|
4819
|
+
const isDate2 = input instanceof Date;
|
|
4820
|
+
const isValidDate = isDate2 && !Number.isNaN(input.getTime());
|
|
4375
4821
|
if (isValidDate)
|
|
4376
4822
|
return payload;
|
|
4377
4823
|
payload.issues.push({
|
|
4378
4824
|
expected: "date",
|
|
4379
4825
|
code: "invalid_type",
|
|
4380
4826
|
input,
|
|
4381
|
-
...
|
|
4827
|
+
...isDate2 ? { received: "Invalid Date" } : {},
|
|
4382
4828
|
inst
|
|
4383
4829
|
});
|
|
4384
4830
|
return payload;
|
|
@@ -4517,13 +4963,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
4517
4963
|
}
|
|
4518
4964
|
return propValues;
|
|
4519
4965
|
});
|
|
4520
|
-
const
|
|
4966
|
+
const isObject3 = isObject2;
|
|
4521
4967
|
const catchall = def.catchall;
|
|
4522
4968
|
let value;
|
|
4523
4969
|
inst._zod.parse = (payload, ctx) => {
|
|
4524
4970
|
value ?? (value = _normalized.value);
|
|
4525
4971
|
const input = payload.value;
|
|
4526
|
-
if (!
|
|
4972
|
+
if (!isObject3(input)) {
|
|
4527
4973
|
payload.issues.push({
|
|
4528
4974
|
expected: "object",
|
|
4529
4975
|
code: "invalid_type",
|
|
@@ -4621,7 +5067,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
4621
5067
|
return (payload, ctx) => fn(shape, payload, ctx);
|
|
4622
5068
|
};
|
|
4623
5069
|
let fastpass;
|
|
4624
|
-
const
|
|
5070
|
+
const isObject3 = isObject2;
|
|
4625
5071
|
const jit = !globalConfig.jitless;
|
|
4626
5072
|
const allowsEval2 = allowsEval;
|
|
4627
5073
|
const fastEnabled = jit && allowsEval2.value;
|
|
@@ -4630,7 +5076,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
4630
5076
|
inst._zod.parse = (payload, ctx) => {
|
|
4631
5077
|
value ?? (value = _normalized.value);
|
|
4632
5078
|
const input = payload.value;
|
|
4633
|
-
if (!
|
|
5079
|
+
if (!isObject3(input)) {
|
|
4634
5080
|
payload.issues.push({
|
|
4635
5081
|
expected: "object",
|
|
4636
5082
|
code: "invalid_type",
|
|
@@ -4808,7 +5254,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
4808
5254
|
});
|
|
4809
5255
|
inst._zod.parse = (payload, ctx) => {
|
|
4810
5256
|
const input = payload.value;
|
|
4811
|
-
if (!
|
|
5257
|
+
if (!isObject2(input)) {
|
|
4812
5258
|
payload.issues.push({
|
|
4813
5259
|
code: "invalid_type",
|
|
4814
5260
|
expected: "object",
|
|
@@ -11902,10 +12348,10 @@ function _property(property, schema, params) {
|
|
|
11902
12348
|
...normalizeParams(params)
|
|
11903
12349
|
});
|
|
11904
12350
|
}
|
|
11905
|
-
function _mime(
|
|
12351
|
+
function _mime(types2, params) {
|
|
11906
12352
|
return new $ZodCheckMimeType({
|
|
11907
12353
|
check: "mime_type",
|
|
11908
|
-
mime:
|
|
12354
|
+
mime: types2,
|
|
11909
12355
|
...normalizeParams(params)
|
|
11910
12356
|
});
|
|
11911
12357
|
}
|
|
@@ -12228,13 +12674,13 @@ function _stringbool(Classes, _params) {
|
|
|
12228
12674
|
});
|
|
12229
12675
|
return codec;
|
|
12230
12676
|
}
|
|
12231
|
-
function _stringFormat(Class2,
|
|
12677
|
+
function _stringFormat(Class2, format2, fnOrRegex, _params = {}) {
|
|
12232
12678
|
const params = normalizeParams(_params);
|
|
12233
12679
|
const def = {
|
|
12234
12680
|
...normalizeParams(_params),
|
|
12235
12681
|
check: "string_format",
|
|
12236
12682
|
type: "string",
|
|
12237
|
-
format,
|
|
12683
|
+
format: format2,
|
|
12238
12684
|
fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
|
|
12239
12685
|
...params
|
|
12240
12686
|
};
|
|
@@ -12600,16 +13046,16 @@ var formatMap = {
|
|
|
12600
13046
|
var stringProcessor = (schema, ctx, _json, _params) => {
|
|
12601
13047
|
const json = _json;
|
|
12602
13048
|
json.type = "string";
|
|
12603
|
-
const { minimum, maximum, format, patterns: patterns2, contentEncoding } = schema._zod.bag;
|
|
13049
|
+
const { minimum, maximum, format: format2, patterns: patterns2, contentEncoding } = schema._zod.bag;
|
|
12604
13050
|
if (typeof minimum === "number")
|
|
12605
13051
|
json.minLength = minimum;
|
|
12606
13052
|
if (typeof maximum === "number")
|
|
12607
13053
|
json.maxLength = maximum;
|
|
12608
|
-
if (
|
|
12609
|
-
json.format = formatMap[
|
|
13054
|
+
if (format2) {
|
|
13055
|
+
json.format = formatMap[format2] ?? format2;
|
|
12610
13056
|
if (json.format === "")
|
|
12611
13057
|
delete json.format;
|
|
12612
|
-
if (
|
|
13058
|
+
if (format2 === "time") {
|
|
12613
13059
|
delete json.format;
|
|
12614
13060
|
}
|
|
12615
13061
|
}
|
|
@@ -12631,8 +13077,8 @@ var stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
12631
13077
|
};
|
|
12632
13078
|
var numberProcessor = (schema, ctx, _json, _params) => {
|
|
12633
13079
|
const json = _json;
|
|
12634
|
-
const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
|
|
12635
|
-
if (typeof
|
|
13080
|
+
const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
|
|
13081
|
+
if (typeof format2 === "string" && format2.includes("int"))
|
|
12636
13082
|
json.type = "integer";
|
|
12637
13083
|
else
|
|
12638
13084
|
json.type = "number";
|
|
@@ -13445,7 +13891,7 @@ var initializer2 = (inst, issues) => {
|
|
|
13445
13891
|
inst.name = "ZodError";
|
|
13446
13892
|
Object.defineProperties(inst, {
|
|
13447
13893
|
format: {
|
|
13448
|
-
value: (mapper) =>
|
|
13894
|
+
value: (mapper) => formatError2(inst, mapper)
|
|
13449
13895
|
},
|
|
13450
13896
|
flatten: {
|
|
13451
13897
|
value: (mapper) => flattenError(inst, mapper)
|
|
@@ -13502,7 +13948,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
13502
13948
|
inst.type = def.type;
|
|
13503
13949
|
Object.defineProperty(inst, "_def", { value: def });
|
|
13504
13950
|
inst.check = (...checks2) => {
|
|
13505
|
-
return inst.clone(
|
|
13951
|
+
return inst.clone(exports_util2.mergeDefs(def, {
|
|
13506
13952
|
checks: [
|
|
13507
13953
|
...def.checks ?? [],
|
|
13508
13954
|
...checks2.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
@@ -13675,7 +14121,7 @@ function httpUrl(params) {
|
|
|
13675
14121
|
return _url(ZodURL, {
|
|
13676
14122
|
protocol: /^https?$/,
|
|
13677
14123
|
hostname: exports_regexes.domain,
|
|
13678
|
-
...
|
|
14124
|
+
...exports_util2.normalizeParams(params)
|
|
13679
14125
|
});
|
|
13680
14126
|
}
|
|
13681
14127
|
var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
|
|
@@ -13794,8 +14240,8 @@ var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat"
|
|
|
13794
14240
|
$ZodCustomStringFormat.init(inst, def);
|
|
13795
14241
|
ZodStringFormat.init(inst, def);
|
|
13796
14242
|
});
|
|
13797
|
-
function stringFormat(
|
|
13798
|
-
return _stringFormat(ZodCustomStringFormat,
|
|
14243
|
+
function stringFormat(format2, fnOrRegex, _params = {}) {
|
|
14244
|
+
return _stringFormat(ZodCustomStringFormat, format2, fnOrRegex, _params);
|
|
13799
14245
|
}
|
|
13800
14246
|
function hostname2(_params) {
|
|
13801
14247
|
return _stringFormat(ZodCustomStringFormat, "hostname", exports_regexes.hostname, _params);
|
|
@@ -13805,11 +14251,11 @@ function hex2(_params) {
|
|
|
13805
14251
|
}
|
|
13806
14252
|
function hash(alg, params) {
|
|
13807
14253
|
const enc = params?.enc ?? "hex";
|
|
13808
|
-
const
|
|
13809
|
-
const regex = exports_regexes[
|
|
14254
|
+
const format2 = `${alg}_${enc}`;
|
|
14255
|
+
const regex = exports_regexes[format2];
|
|
13810
14256
|
if (!regex)
|
|
13811
|
-
throw new Error(`Unrecognized hash format: ${
|
|
13812
|
-
return _stringFormat(ZodCustomStringFormat,
|
|
14257
|
+
throw new Error(`Unrecognized hash format: ${format2}`);
|
|
14258
|
+
return _stringFormat(ZodCustomStringFormat, format2, regex, params);
|
|
13813
14259
|
}
|
|
13814
14260
|
var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
13815
14261
|
$ZodNumber.init(inst, def);
|
|
@@ -13993,7 +14439,7 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
13993
14439
|
$ZodObjectJIT.init(inst, def);
|
|
13994
14440
|
ZodType.init(inst, def);
|
|
13995
14441
|
inst._zod.processJSONSchema = (ctx, json, params) => objectProcessor(inst, ctx, json, params);
|
|
13996
|
-
|
|
14442
|
+
exports_util2.defineLazy(inst, "shape", () => {
|
|
13997
14443
|
return def.shape;
|
|
13998
14444
|
});
|
|
13999
14445
|
inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
|
|
@@ -14003,22 +14449,22 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
14003
14449
|
inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
|
|
14004
14450
|
inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
|
|
14005
14451
|
inst.extend = (incoming) => {
|
|
14006
|
-
return
|
|
14452
|
+
return exports_util2.extend(inst, incoming);
|
|
14007
14453
|
};
|
|
14008
14454
|
inst.safeExtend = (incoming) => {
|
|
14009
|
-
return
|
|
14455
|
+
return exports_util2.safeExtend(inst, incoming);
|
|
14010
14456
|
};
|
|
14011
|
-
inst.merge = (other) =>
|
|
14012
|
-
inst.pick = (mask) =>
|
|
14013
|
-
inst.omit = (mask) =>
|
|
14014
|
-
inst.partial = (...args) =>
|
|
14015
|
-
inst.required = (...args) =>
|
|
14457
|
+
inst.merge = (other) => exports_util2.merge(inst, other);
|
|
14458
|
+
inst.pick = (mask) => exports_util2.pick(inst, mask);
|
|
14459
|
+
inst.omit = (mask) => exports_util2.omit(inst, mask);
|
|
14460
|
+
inst.partial = (...args) => exports_util2.partial(ZodOptional, inst, args[0]);
|
|
14461
|
+
inst.required = (...args) => exports_util2.required(ZodNonOptional, inst, args[0]);
|
|
14016
14462
|
});
|
|
14017
14463
|
function object(shape, params) {
|
|
14018
14464
|
const def = {
|
|
14019
14465
|
type: "object",
|
|
14020
14466
|
shape: shape ?? {},
|
|
14021
|
-
...
|
|
14467
|
+
...exports_util2.normalizeParams(params)
|
|
14022
14468
|
};
|
|
14023
14469
|
return new ZodObject(def);
|
|
14024
14470
|
}
|
|
@@ -14027,7 +14473,7 @@ function strictObject(shape, params) {
|
|
|
14027
14473
|
type: "object",
|
|
14028
14474
|
shape,
|
|
14029
14475
|
catchall: never(),
|
|
14030
|
-
...
|
|
14476
|
+
...exports_util2.normalizeParams(params)
|
|
14031
14477
|
});
|
|
14032
14478
|
}
|
|
14033
14479
|
function looseObject(shape, params) {
|
|
@@ -14035,7 +14481,7 @@ function looseObject(shape, params) {
|
|
|
14035
14481
|
type: "object",
|
|
14036
14482
|
shape,
|
|
14037
14483
|
catchall: unknown(),
|
|
14038
|
-
...
|
|
14484
|
+
...exports_util2.normalizeParams(params)
|
|
14039
14485
|
});
|
|
14040
14486
|
}
|
|
14041
14487
|
var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
@@ -14048,7 +14494,7 @@ function union(options, params) {
|
|
|
14048
14494
|
return new ZodUnion({
|
|
14049
14495
|
type: "union",
|
|
14050
14496
|
options,
|
|
14051
|
-
...
|
|
14497
|
+
...exports_util2.normalizeParams(params)
|
|
14052
14498
|
});
|
|
14053
14499
|
}
|
|
14054
14500
|
var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => {
|
|
@@ -14062,7 +14508,7 @@ function xor(options, params) {
|
|
|
14062
14508
|
type: "union",
|
|
14063
14509
|
options,
|
|
14064
14510
|
inclusive: false,
|
|
14065
|
-
...
|
|
14511
|
+
...exports_util2.normalizeParams(params)
|
|
14066
14512
|
});
|
|
14067
14513
|
}
|
|
14068
14514
|
var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
|
|
@@ -14074,7 +14520,7 @@ function discriminatedUnion(discriminator, options, params) {
|
|
|
14074
14520
|
type: "union",
|
|
14075
14521
|
options,
|
|
14076
14522
|
discriminator,
|
|
14077
|
-
...
|
|
14523
|
+
...exports_util2.normalizeParams(params)
|
|
14078
14524
|
});
|
|
14079
14525
|
}
|
|
14080
14526
|
var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
|
|
@@ -14106,7 +14552,7 @@ function tuple(items, _paramsOrRest, _params) {
|
|
|
14106
14552
|
type: "tuple",
|
|
14107
14553
|
items,
|
|
14108
14554
|
rest,
|
|
14109
|
-
...
|
|
14555
|
+
...exports_util2.normalizeParams(params)
|
|
14110
14556
|
});
|
|
14111
14557
|
}
|
|
14112
14558
|
var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
@@ -14121,7 +14567,7 @@ function record(keyType, valueType, params) {
|
|
|
14121
14567
|
type: "record",
|
|
14122
14568
|
keyType,
|
|
14123
14569
|
valueType,
|
|
14124
|
-
...
|
|
14570
|
+
...exports_util2.normalizeParams(params)
|
|
14125
14571
|
});
|
|
14126
14572
|
}
|
|
14127
14573
|
function partialRecord(keyType, valueType, params) {
|
|
@@ -14131,7 +14577,7 @@ function partialRecord(keyType, valueType, params) {
|
|
|
14131
14577
|
type: "record",
|
|
14132
14578
|
keyType: k,
|
|
14133
14579
|
valueType,
|
|
14134
|
-
...
|
|
14580
|
+
...exports_util2.normalizeParams(params)
|
|
14135
14581
|
});
|
|
14136
14582
|
}
|
|
14137
14583
|
function looseRecord(keyType, valueType, params) {
|
|
@@ -14140,7 +14586,7 @@ function looseRecord(keyType, valueType, params) {
|
|
|
14140
14586
|
keyType,
|
|
14141
14587
|
valueType,
|
|
14142
14588
|
mode: "loose",
|
|
14143
|
-
...
|
|
14589
|
+
...exports_util2.normalizeParams(params)
|
|
14144
14590
|
});
|
|
14145
14591
|
}
|
|
14146
14592
|
var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
|
|
@@ -14159,7 +14605,7 @@ function map(keyType, valueType, params) {
|
|
|
14159
14605
|
type: "map",
|
|
14160
14606
|
keyType,
|
|
14161
14607
|
valueType,
|
|
14162
|
-
...
|
|
14608
|
+
...exports_util2.normalizeParams(params)
|
|
14163
14609
|
});
|
|
14164
14610
|
}
|
|
14165
14611
|
var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
|
|
@@ -14175,7 +14621,7 @@ function set(valueType, params) {
|
|
|
14175
14621
|
return new ZodSet({
|
|
14176
14622
|
type: "set",
|
|
14177
14623
|
valueType,
|
|
14178
|
-
...
|
|
14624
|
+
...exports_util2.normalizeParams(params)
|
|
14179
14625
|
});
|
|
14180
14626
|
}
|
|
14181
14627
|
var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
@@ -14196,7 +14642,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
|
14196
14642
|
return new ZodEnum({
|
|
14197
14643
|
...def,
|
|
14198
14644
|
checks: [],
|
|
14199
|
-
...
|
|
14645
|
+
...exports_util2.normalizeParams(params),
|
|
14200
14646
|
entries: newEntries
|
|
14201
14647
|
});
|
|
14202
14648
|
};
|
|
@@ -14211,7 +14657,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
|
14211
14657
|
return new ZodEnum({
|
|
14212
14658
|
...def,
|
|
14213
14659
|
checks: [],
|
|
14214
|
-
...
|
|
14660
|
+
...exports_util2.normalizeParams(params),
|
|
14215
14661
|
entries: newEntries
|
|
14216
14662
|
});
|
|
14217
14663
|
};
|
|
@@ -14221,14 +14667,14 @@ function _enum2(values, params) {
|
|
|
14221
14667
|
return new ZodEnum({
|
|
14222
14668
|
type: "enum",
|
|
14223
14669
|
entries,
|
|
14224
|
-
...
|
|
14670
|
+
...exports_util2.normalizeParams(params)
|
|
14225
14671
|
});
|
|
14226
14672
|
}
|
|
14227
14673
|
function nativeEnum(entries, params) {
|
|
14228
14674
|
return new ZodEnum({
|
|
14229
14675
|
type: "enum",
|
|
14230
14676
|
entries,
|
|
14231
|
-
...
|
|
14677
|
+
...exports_util2.normalizeParams(params)
|
|
14232
14678
|
});
|
|
14233
14679
|
}
|
|
14234
14680
|
var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
|
|
@@ -14249,7 +14695,7 @@ function literal(value, params) {
|
|
|
14249
14695
|
return new ZodLiteral({
|
|
14250
14696
|
type: "literal",
|
|
14251
14697
|
values: Array.isArray(value) ? value : [value],
|
|
14252
|
-
...
|
|
14698
|
+
...exports_util2.normalizeParams(params)
|
|
14253
14699
|
});
|
|
14254
14700
|
}
|
|
14255
14701
|
var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
|
|
@@ -14258,7 +14704,7 @@ var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
|
|
|
14258
14704
|
inst._zod.processJSONSchema = (ctx, json, params) => fileProcessor(inst, ctx, json, params);
|
|
14259
14705
|
inst.min = (size, params) => inst.check(_minSize(size, params));
|
|
14260
14706
|
inst.max = (size, params) => inst.check(_maxSize(size, params));
|
|
14261
|
-
inst.mime = (
|
|
14707
|
+
inst.mime = (types2, params) => inst.check(_mime(Array.isArray(types2) ? types2 : [types2], params));
|
|
14262
14708
|
});
|
|
14263
14709
|
function file(params) {
|
|
14264
14710
|
return _file(ZodFile, params);
|
|
@@ -14273,7 +14719,7 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
14273
14719
|
}
|
|
14274
14720
|
payload.addIssue = (issue3) => {
|
|
14275
14721
|
if (typeof issue3 === "string") {
|
|
14276
|
-
payload.issues.push(
|
|
14722
|
+
payload.issues.push(exports_util2.issue(issue3, payload.value, def));
|
|
14277
14723
|
} else {
|
|
14278
14724
|
const _issue = issue3;
|
|
14279
14725
|
if (_issue.fatal)
|
|
@@ -14281,7 +14727,7 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
14281
14727
|
_issue.code ?? (_issue.code = "custom");
|
|
14282
14728
|
_issue.input ?? (_issue.input = payload.value);
|
|
14283
14729
|
_issue.inst ?? (_issue.inst = inst);
|
|
14284
|
-
payload.issues.push(
|
|
14730
|
+
payload.issues.push(exports_util2.issue(_issue));
|
|
14285
14731
|
}
|
|
14286
14732
|
};
|
|
14287
14733
|
const output = def.transform(payload.value, payload);
|
|
@@ -14352,7 +14798,7 @@ function _default2(innerType, defaultValue) {
|
|
|
14352
14798
|
type: "default",
|
|
14353
14799
|
innerType,
|
|
14354
14800
|
get defaultValue() {
|
|
14355
|
-
return typeof defaultValue === "function" ? defaultValue() :
|
|
14801
|
+
return typeof defaultValue === "function" ? defaultValue() : exports_util2.shallowClone(defaultValue);
|
|
14356
14802
|
}
|
|
14357
14803
|
});
|
|
14358
14804
|
}
|
|
@@ -14367,7 +14813,7 @@ function prefault(innerType, defaultValue) {
|
|
|
14367
14813
|
type: "prefault",
|
|
14368
14814
|
innerType,
|
|
14369
14815
|
get defaultValue() {
|
|
14370
|
-
return typeof defaultValue === "function" ? defaultValue() :
|
|
14816
|
+
return typeof defaultValue === "function" ? defaultValue() : exports_util2.shallowClone(defaultValue);
|
|
14371
14817
|
}
|
|
14372
14818
|
});
|
|
14373
14819
|
}
|
|
@@ -14381,7 +14827,7 @@ function nonoptional(innerType, params) {
|
|
|
14381
14827
|
return new ZodNonOptional({
|
|
14382
14828
|
type: "nonoptional",
|
|
14383
14829
|
innerType,
|
|
14384
|
-
...
|
|
14830
|
+
...exports_util2.normalizeParams(params)
|
|
14385
14831
|
});
|
|
14386
14832
|
}
|
|
14387
14833
|
var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => {
|
|
@@ -14466,7 +14912,7 @@ function templateLiteral(parts, params) {
|
|
|
14466
14912
|
return new ZodTemplateLiteral({
|
|
14467
14913
|
type: "template_literal",
|
|
14468
14914
|
parts,
|
|
14469
|
-
...
|
|
14915
|
+
...exports_util2.normalizeParams(params)
|
|
14470
14916
|
});
|
|
14471
14917
|
}
|
|
14472
14918
|
var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
|
|
@@ -14534,7 +14980,7 @@ function _instanceof(cls, params = {}) {
|
|
|
14534
14980
|
check: "custom",
|
|
14535
14981
|
fn: (data) => data instanceof cls,
|
|
14536
14982
|
abort: true,
|
|
14537
|
-
...
|
|
14983
|
+
...exports_util2.normalizeParams(params)
|
|
14538
14984
|
});
|
|
14539
14985
|
inst._zod.bag.Class = cls;
|
|
14540
14986
|
inst._zod.check = (payload) => {
|
|
@@ -14768,52 +15214,52 @@ function convertBaseSchema(schema, ctx) {
|
|
|
14768
15214
|
case "string": {
|
|
14769
15215
|
let stringSchema = z.string();
|
|
14770
15216
|
if (schema.format) {
|
|
14771
|
-
const
|
|
14772
|
-
if (
|
|
15217
|
+
const format2 = schema.format;
|
|
15218
|
+
if (format2 === "email") {
|
|
14773
15219
|
stringSchema = stringSchema.check(z.email());
|
|
14774
|
-
} else if (
|
|
15220
|
+
} else if (format2 === "uri" || format2 === "uri-reference") {
|
|
14775
15221
|
stringSchema = stringSchema.check(z.url());
|
|
14776
|
-
} else if (
|
|
15222
|
+
} else if (format2 === "uuid" || format2 === "guid") {
|
|
14777
15223
|
stringSchema = stringSchema.check(z.uuid());
|
|
14778
|
-
} else if (
|
|
15224
|
+
} else if (format2 === "date-time") {
|
|
14779
15225
|
stringSchema = stringSchema.check(z.iso.datetime());
|
|
14780
|
-
} else if (
|
|
15226
|
+
} else if (format2 === "date") {
|
|
14781
15227
|
stringSchema = stringSchema.check(z.iso.date());
|
|
14782
|
-
} else if (
|
|
15228
|
+
} else if (format2 === "time") {
|
|
14783
15229
|
stringSchema = stringSchema.check(z.iso.time());
|
|
14784
|
-
} else if (
|
|
15230
|
+
} else if (format2 === "duration") {
|
|
14785
15231
|
stringSchema = stringSchema.check(z.iso.duration());
|
|
14786
|
-
} else if (
|
|
15232
|
+
} else if (format2 === "ipv4") {
|
|
14787
15233
|
stringSchema = stringSchema.check(z.ipv4());
|
|
14788
|
-
} else if (
|
|
15234
|
+
} else if (format2 === "ipv6") {
|
|
14789
15235
|
stringSchema = stringSchema.check(z.ipv6());
|
|
14790
|
-
} else if (
|
|
15236
|
+
} else if (format2 === "mac") {
|
|
14791
15237
|
stringSchema = stringSchema.check(z.mac());
|
|
14792
|
-
} else if (
|
|
15238
|
+
} else if (format2 === "cidr") {
|
|
14793
15239
|
stringSchema = stringSchema.check(z.cidrv4());
|
|
14794
|
-
} else if (
|
|
15240
|
+
} else if (format2 === "cidr-v6") {
|
|
14795
15241
|
stringSchema = stringSchema.check(z.cidrv6());
|
|
14796
|
-
} else if (
|
|
15242
|
+
} else if (format2 === "base64") {
|
|
14797
15243
|
stringSchema = stringSchema.check(z.base64());
|
|
14798
|
-
} else if (
|
|
15244
|
+
} else if (format2 === "base64url") {
|
|
14799
15245
|
stringSchema = stringSchema.check(z.base64url());
|
|
14800
|
-
} else if (
|
|
15246
|
+
} else if (format2 === "e164") {
|
|
14801
15247
|
stringSchema = stringSchema.check(z.e164());
|
|
14802
|
-
} else if (
|
|
15248
|
+
} else if (format2 === "jwt") {
|
|
14803
15249
|
stringSchema = stringSchema.check(z.jwt());
|
|
14804
|
-
} else if (
|
|
15250
|
+
} else if (format2 === "emoji") {
|
|
14805
15251
|
stringSchema = stringSchema.check(z.emoji());
|
|
14806
|
-
} else if (
|
|
15252
|
+
} else if (format2 === "nanoid") {
|
|
14807
15253
|
stringSchema = stringSchema.check(z.nanoid());
|
|
14808
|
-
} else if (
|
|
15254
|
+
} else if (format2 === "cuid") {
|
|
14809
15255
|
stringSchema = stringSchema.check(z.cuid());
|
|
14810
|
-
} else if (
|
|
15256
|
+
} else if (format2 === "cuid2") {
|
|
14811
15257
|
stringSchema = stringSchema.check(z.cuid2());
|
|
14812
|
-
} else if (
|
|
15258
|
+
} else if (format2 === "ulid") {
|
|
14813
15259
|
stringSchema = stringSchema.check(z.ulid());
|
|
14814
|
-
} else if (
|
|
15260
|
+
} else if (format2 === "xid") {
|
|
14815
15261
|
stringSchema = stringSchema.check(z.xid());
|
|
14816
|
-
} else if (
|
|
15262
|
+
} else if (format2 === "ksuid") {
|
|
14817
15263
|
stringSchema = stringSchema.check(z.ksuid());
|
|
14818
15264
|
}
|
|
14819
15265
|
}
|
|
@@ -15345,6 +15791,213 @@ var CaliperListEventsParams = exports_external.object({
|
|
|
15345
15791
|
actorId: exports_external.string().min(1).optional(),
|
|
15346
15792
|
actorEmail: exports_external.email().optional()
|
|
15347
15793
|
}).strict();
|
|
15794
|
+
// ../../types/src/zod/webhooks.ts
|
|
15795
|
+
var WebhookCreateInput = exports_external.object({
|
|
15796
|
+
name: exports_external.string().min(1, "name must be a non-empty string"),
|
|
15797
|
+
targetUrl: exports_external.url("targetUrl must be a valid URL"),
|
|
15798
|
+
secret: exports_external.string().min(1, "secret must be a non-empty string"),
|
|
15799
|
+
active: exports_external.boolean(),
|
|
15800
|
+
sensor: exports_external.string().nullable().optional(),
|
|
15801
|
+
description: exports_external.string().nullable().optional()
|
|
15802
|
+
}).strict();
|
|
15803
|
+
var WebhookFilterType = exports_external.enum(["string", "number", "boolean"]);
|
|
15804
|
+
var WebhookFilterOperation = exports_external.enum([
|
|
15805
|
+
"eq",
|
|
15806
|
+
"neq",
|
|
15807
|
+
"gt",
|
|
15808
|
+
"gte",
|
|
15809
|
+
"lt",
|
|
15810
|
+
"lte",
|
|
15811
|
+
"contains",
|
|
15812
|
+
"notContains",
|
|
15813
|
+
"in",
|
|
15814
|
+
"notIn",
|
|
15815
|
+
"startsWith",
|
|
15816
|
+
"endsWith",
|
|
15817
|
+
"regexp"
|
|
15818
|
+
]);
|
|
15819
|
+
var WebhookFilterCreateInput = exports_external.object({
|
|
15820
|
+
webhookId: exports_external.string().min(1, "webhookId must be a non-empty string"),
|
|
15821
|
+
filterKey: exports_external.string().min(1, "filterKey must be a non-empty string"),
|
|
15822
|
+
filterValue: exports_external.string().min(1, "filterValue must be a non-empty string"),
|
|
15823
|
+
filterType: WebhookFilterType,
|
|
15824
|
+
filterOperator: WebhookFilterOperation,
|
|
15825
|
+
active: exports_external.boolean()
|
|
15826
|
+
}).strict();
|
|
15827
|
+
// ../../types/src/zod/case.ts
|
|
15828
|
+
var NonEmptyString = exports_external.string().trim().min(1);
|
|
15829
|
+
var InputNodeURISchema = exports_external.object({
|
|
15830
|
+
title: NonEmptyString,
|
|
15831
|
+
identifier: NonEmptyString,
|
|
15832
|
+
uri: NonEmptyString
|
|
15833
|
+
});
|
|
15834
|
+
var CFDocumentInputSchema = exports_external.object({
|
|
15835
|
+
identifier: NonEmptyString,
|
|
15836
|
+
uri: NonEmptyString,
|
|
15837
|
+
lastChangeDateTime: NonEmptyString,
|
|
15838
|
+
title: NonEmptyString,
|
|
15839
|
+
creator: NonEmptyString,
|
|
15840
|
+
officialSourceURL: exports_external.string().optional(),
|
|
15841
|
+
publisher: exports_external.string().optional(),
|
|
15842
|
+
description: exports_external.string().optional(),
|
|
15843
|
+
language: exports_external.string().optional(),
|
|
15844
|
+
version: exports_external.string().optional(),
|
|
15845
|
+
caseVersion: exports_external.string().optional(),
|
|
15846
|
+
adoptionStatus: exports_external.string().optional(),
|
|
15847
|
+
statusStartDate: exports_external.string().optional(),
|
|
15848
|
+
statusEndDate: exports_external.string().optional(),
|
|
15849
|
+
licenseUri: exports_external.string().optional(),
|
|
15850
|
+
notes: exports_external.string().optional(),
|
|
15851
|
+
subject: exports_external.array(exports_external.string()).optional(),
|
|
15852
|
+
extensions: exports_external.unknown().optional()
|
|
15853
|
+
});
|
|
15854
|
+
var CFItemInputSchema = exports_external.object({
|
|
15855
|
+
identifier: NonEmptyString,
|
|
15856
|
+
uri: NonEmptyString,
|
|
15857
|
+
lastChangeDateTime: NonEmptyString,
|
|
15858
|
+
fullStatement: NonEmptyString,
|
|
15859
|
+
alternativeLabel: exports_external.string().optional(),
|
|
15860
|
+
CFItemType: exports_external.string().optional(),
|
|
15861
|
+
cfItemType: exports_external.string().optional(),
|
|
15862
|
+
humanCodingScheme: exports_external.string().optional(),
|
|
15863
|
+
listEnumeration: exports_external.string().optional(),
|
|
15864
|
+
abbreviatedStatement: exports_external.string().optional(),
|
|
15865
|
+
conceptKeywords: exports_external.array(exports_external.string()).optional(),
|
|
15866
|
+
notes: exports_external.string().optional(),
|
|
15867
|
+
subject: exports_external.array(exports_external.string()).optional(),
|
|
15868
|
+
language: exports_external.string().optional(),
|
|
15869
|
+
educationLevel: exports_external.array(exports_external.string()).optional(),
|
|
15870
|
+
CFItemTypeURI: exports_external.unknown().optional(),
|
|
15871
|
+
licenseURI: exports_external.unknown().optional(),
|
|
15872
|
+
statusStartDate: exports_external.string().optional(),
|
|
15873
|
+
statusEndDate: exports_external.string().optional(),
|
|
15874
|
+
extensions: exports_external.unknown().optional()
|
|
15875
|
+
});
|
|
15876
|
+
var CFAssociationInputSchema = exports_external.object({
|
|
15877
|
+
identifier: NonEmptyString,
|
|
15878
|
+
uri: NonEmptyString,
|
|
15879
|
+
lastChangeDateTime: NonEmptyString,
|
|
15880
|
+
associationType: NonEmptyString,
|
|
15881
|
+
originNodeURI: InputNodeURISchema,
|
|
15882
|
+
destinationNodeURI: InputNodeURISchema,
|
|
15883
|
+
sequenceNumber: exports_external.number().optional(),
|
|
15884
|
+
extensions: exports_external.unknown().optional()
|
|
15885
|
+
});
|
|
15886
|
+
var CFDefinitionsSchema = exports_external.object({
|
|
15887
|
+
CFItemTypes: exports_external.array(exports_external.unknown()).optional(),
|
|
15888
|
+
CFSubjects: exports_external.array(exports_external.unknown()).optional(),
|
|
15889
|
+
CFConcepts: exports_external.array(exports_external.unknown()).optional(),
|
|
15890
|
+
CFLicenses: exports_external.array(exports_external.unknown()).optional(),
|
|
15891
|
+
CFAssociationGroupings: exports_external.array(exports_external.unknown()).optional(),
|
|
15892
|
+
extensions: exports_external.unknown().optional()
|
|
15893
|
+
});
|
|
15894
|
+
var CasePackageInput = exports_external.object({
|
|
15895
|
+
CFDocument: CFDocumentInputSchema,
|
|
15896
|
+
CFItems: exports_external.array(CFItemInputSchema),
|
|
15897
|
+
CFAssociations: exports_external.array(CFAssociationInputSchema),
|
|
15898
|
+
CFDefinitions: CFDefinitionsSchema.optional(),
|
|
15899
|
+
extensions: exports_external.unknown().optional()
|
|
15900
|
+
});
|
|
15901
|
+
// ../../types/src/zod/clr.ts
|
|
15902
|
+
var NonEmptyString2 = exports_external.string().trim().min(1);
|
|
15903
|
+
var NonEmptyStringArray = exports_external.array(exports_external.string()).min(1);
|
|
15904
|
+
var ClrImageSchema = exports_external.object({
|
|
15905
|
+
id: NonEmptyString2,
|
|
15906
|
+
type: exports_external.literal("Image"),
|
|
15907
|
+
caption: exports_external.string().optional()
|
|
15908
|
+
});
|
|
15909
|
+
var ClrProfileSchema = exports_external.object({
|
|
15910
|
+
id: NonEmptyString2,
|
|
15911
|
+
type: NonEmptyStringArray,
|
|
15912
|
+
name: exports_external.string().optional(),
|
|
15913
|
+
url: exports_external.string().optional(),
|
|
15914
|
+
phone: exports_external.string().optional(),
|
|
15915
|
+
description: exports_external.string().optional(),
|
|
15916
|
+
image: ClrImageSchema.optional(),
|
|
15917
|
+
email: exports_external.string().optional()
|
|
15918
|
+
});
|
|
15919
|
+
var ClrProofSchema = exports_external.object({
|
|
15920
|
+
type: NonEmptyString2,
|
|
15921
|
+
proofPurpose: NonEmptyString2,
|
|
15922
|
+
verificationMethod: NonEmptyString2,
|
|
15923
|
+
created: NonEmptyString2,
|
|
15924
|
+
proofValue: NonEmptyString2,
|
|
15925
|
+
cryptosuite: exports_external.string().optional()
|
|
15926
|
+
});
|
|
15927
|
+
var ClrCredentialSchemaSchema = exports_external.object({
|
|
15928
|
+
id: NonEmptyString2,
|
|
15929
|
+
type: exports_external.literal("1EdTechJsonSchemaValidator2019")
|
|
15930
|
+
});
|
|
15931
|
+
var AchievementCriteriaSchema = exports_external.object({
|
|
15932
|
+
id: exports_external.string().optional(),
|
|
15933
|
+
narrative: exports_external.string().optional()
|
|
15934
|
+
});
|
|
15935
|
+
var AchievementSchema = exports_external.object({
|
|
15936
|
+
id: NonEmptyString2,
|
|
15937
|
+
type: NonEmptyStringArray,
|
|
15938
|
+
name: NonEmptyString2,
|
|
15939
|
+
description: NonEmptyString2,
|
|
15940
|
+
criteria: AchievementCriteriaSchema,
|
|
15941
|
+
image: ClrImageSchema.optional(),
|
|
15942
|
+
achievementType: exports_external.string().optional(),
|
|
15943
|
+
creator: ClrProfileSchema.optional()
|
|
15944
|
+
});
|
|
15945
|
+
var IdentityObjectSchema = exports_external.object({
|
|
15946
|
+
type: exports_external.literal("IdentityObject"),
|
|
15947
|
+
identityHash: NonEmptyString2,
|
|
15948
|
+
identityType: NonEmptyString2,
|
|
15949
|
+
hashed: exports_external.boolean(),
|
|
15950
|
+
salt: exports_external.string().optional()
|
|
15951
|
+
});
|
|
15952
|
+
var AssociationTypeSchema = exports_external.enum([
|
|
15953
|
+
"exactMatchOf",
|
|
15954
|
+
"isChildOf",
|
|
15955
|
+
"isParentOf",
|
|
15956
|
+
"isPartOf",
|
|
15957
|
+
"isPeerOf",
|
|
15958
|
+
"isRelatedTo",
|
|
15959
|
+
"precedes",
|
|
15960
|
+
"replacedBy"
|
|
15961
|
+
]);
|
|
15962
|
+
var AssociationSchema = exports_external.object({
|
|
15963
|
+
type: exports_external.literal("Association"),
|
|
15964
|
+
associationType: AssociationTypeSchema,
|
|
15965
|
+
sourceId: NonEmptyString2,
|
|
15966
|
+
targetId: NonEmptyString2
|
|
15967
|
+
});
|
|
15968
|
+
var VerifiableCredentialSchema = exports_external.object({
|
|
15969
|
+
"@context": NonEmptyStringArray,
|
|
15970
|
+
id: NonEmptyString2,
|
|
15971
|
+
type: NonEmptyStringArray,
|
|
15972
|
+
issuer: ClrProfileSchema,
|
|
15973
|
+
validFrom: NonEmptyString2,
|
|
15974
|
+
validUntil: exports_external.string().optional(),
|
|
15975
|
+
credentialSubject: exports_external.object({
|
|
15976
|
+
id: exports_external.string().optional()
|
|
15977
|
+
}),
|
|
15978
|
+
proof: exports_external.array(ClrProofSchema).optional()
|
|
15979
|
+
});
|
|
15980
|
+
var ClrCredentialSubjectSchema = exports_external.object({
|
|
15981
|
+
id: exports_external.string().optional(),
|
|
15982
|
+
type: NonEmptyStringArray,
|
|
15983
|
+
identifier: exports_external.array(IdentityObjectSchema).optional(),
|
|
15984
|
+
achievement: exports_external.array(AchievementSchema).optional(),
|
|
15985
|
+
verifiableCredential: exports_external.array(VerifiableCredentialSchema).min(1),
|
|
15986
|
+
association: exports_external.array(AssociationSchema).optional()
|
|
15987
|
+
});
|
|
15988
|
+
var ClrCredentialInput = exports_external.object({
|
|
15989
|
+
"@context": NonEmptyStringArray,
|
|
15990
|
+
id: NonEmptyString2,
|
|
15991
|
+
type: NonEmptyStringArray,
|
|
15992
|
+
issuer: ClrProfileSchema,
|
|
15993
|
+
name: NonEmptyString2,
|
|
15994
|
+
description: exports_external.string().optional(),
|
|
15995
|
+
validFrom: NonEmptyString2,
|
|
15996
|
+
validUntil: exports_external.string().optional(),
|
|
15997
|
+
credentialSubject: ClrCredentialSubjectSchema,
|
|
15998
|
+
proof: exports_external.array(ClrProofSchema).optional(),
|
|
15999
|
+
credentialSchema: exports_external.array(ClrCredentialSchemaSchema).optional()
|
|
16000
|
+
});
|
|
15348
16001
|
// ../../types/src/zod/config.ts
|
|
15349
16002
|
var CourseIds = exports_external.object({
|
|
15350
16003
|
staging: exports_external.string().meta({ description: "Course ID in staging environment" }).optional(),
|
|
@@ -15420,7 +16073,12 @@ var TimebackConfig = exports_external.object({
|
|
|
15420
16073
|
}).optional(),
|
|
15421
16074
|
courses: exports_external.array(CourseConfig).min(1, "At least one course is required").meta({ description: "Courses available in this app" }),
|
|
15422
16075
|
sensor: exports_external.url().meta({ description: "Default Caliper sensor endpoint URL for all courses" }).optional(),
|
|
15423
|
-
launchUrl: exports_external.url().meta({ description: "Default LTI launch URL for all courses" }).optional()
|
|
16076
|
+
launchUrl: exports_external.url().meta({ description: "Default LTI launch URL for all courses" }).optional(),
|
|
16077
|
+
studio: exports_external.object({
|
|
16078
|
+
telemetry: exports_external.boolean().meta({
|
|
16079
|
+
description: "Enable anonymous usage telemetry for Studio (default: true)"
|
|
16080
|
+
}).optional().default(true)
|
|
16081
|
+
}).meta({ description: "Studio-specific configuration" }).optional()
|
|
15424
16082
|
}).meta({
|
|
15425
16083
|
id: "TimebackConfig",
|
|
15426
16084
|
title: "Timeback Config",
|
|
@@ -15506,10 +16164,10 @@ var EduBridgeEnrollmentAnalyticsResponse = exports_external.object({
|
|
|
15506
16164
|
facts: EduBridgeAnalyticsFacts,
|
|
15507
16165
|
factsByApp: exports_external.unknown()
|
|
15508
16166
|
});
|
|
15509
|
-
var
|
|
16167
|
+
var NonEmptyString3 = exports_external.string().trim().min(1);
|
|
15510
16168
|
var EmailOrStudentId = exports_external.object({
|
|
15511
16169
|
email: exports_external.email().optional(),
|
|
15512
|
-
studentId:
|
|
16170
|
+
studentId: NonEmptyString3.optional()
|
|
15513
16171
|
}).superRefine((value, ctx) => {
|
|
15514
16172
|
if (!value.email && !value.studentId) {
|
|
15515
16173
|
ctx.addIssue({
|
|
@@ -15525,16 +16183,16 @@ var EmailOrStudentId = exports_external.object({
|
|
|
15525
16183
|
}
|
|
15526
16184
|
});
|
|
15527
16185
|
var SubjectTrackInput = exports_external.object({
|
|
15528
|
-
subject:
|
|
15529
|
-
grade:
|
|
15530
|
-
courseId:
|
|
15531
|
-
orgSourcedId:
|
|
16186
|
+
subject: NonEmptyString3,
|
|
16187
|
+
grade: NonEmptyString3,
|
|
16188
|
+
courseId: NonEmptyString3,
|
|
16189
|
+
orgSourcedId: NonEmptyString3.optional()
|
|
15532
16190
|
});
|
|
15533
16191
|
var EdubridgeListEnrollmentsParams = exports_external.object({
|
|
15534
|
-
userId:
|
|
16192
|
+
userId: NonEmptyString3
|
|
15535
16193
|
});
|
|
15536
16194
|
var EdubridgeEnrollOptions = exports_external.object({
|
|
15537
|
-
sourcedId:
|
|
16195
|
+
sourcedId: NonEmptyString3.optional(),
|
|
15538
16196
|
role: EnrollmentRole.optional(),
|
|
15539
16197
|
beginDate: EdubridgeDateString.optional(),
|
|
15540
16198
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
@@ -15548,7 +16206,7 @@ var EdubridgeUsersListParams = exports_external.object({
|
|
|
15548
16206
|
filter: exports_external.string().optional(),
|
|
15549
16207
|
search: exports_external.string().optional(),
|
|
15550
16208
|
roles: exports_external.array(OneRosterUserRole).min(1),
|
|
15551
|
-
orgSourcedIds: exports_external.array(
|
|
16209
|
+
orgSourcedIds: exports_external.array(NonEmptyString3).optional()
|
|
15552
16210
|
});
|
|
15553
16211
|
var EdubridgeActivityParams = EmailOrStudentId.extend({
|
|
15554
16212
|
startDate: EdubridgeDateString,
|
|
@@ -15560,17 +16218,94 @@ var EdubridgeWeeklyFactsParams = EmailOrStudentId.extend({
|
|
|
15560
16218
|
timezone: exports_external.string().optional()
|
|
15561
16219
|
});
|
|
15562
16220
|
var EdubridgeEnrollmentFactsParams = exports_external.object({
|
|
15563
|
-
enrollmentId:
|
|
16221
|
+
enrollmentId: NonEmptyString3,
|
|
15564
16222
|
startDate: EdubridgeDateString.optional(),
|
|
15565
16223
|
endDate: EdubridgeDateString.optional(),
|
|
15566
16224
|
timezone: exports_external.string().optional()
|
|
15567
16225
|
});
|
|
16226
|
+
// ../../types/src/zod/masterytrack.ts
|
|
16227
|
+
var NonEmptyString4 = exports_external.string().trim().min(1);
|
|
16228
|
+
var MasteryTrackAuthorizerInput = exports_external.object({
|
|
16229
|
+
email: exports_external.email()
|
|
16230
|
+
});
|
|
16231
|
+
var MasteryTrackInventorySearchParams = exports_external.object({
|
|
16232
|
+
name: NonEmptyString4.optional(),
|
|
16233
|
+
timeback_id: NonEmptyString4.optional(),
|
|
16234
|
+
grade: NonEmptyString4.optional(),
|
|
16235
|
+
subject: NonEmptyString4.optional(),
|
|
16236
|
+
all: exports_external.boolean().optional()
|
|
16237
|
+
});
|
|
16238
|
+
var MasteryTrackAssignmentInput = exports_external.object({
|
|
16239
|
+
student_email: exports_external.email(),
|
|
16240
|
+
timeback_id: NonEmptyString4.optional(),
|
|
16241
|
+
subject: NonEmptyString4.optional(),
|
|
16242
|
+
grade_rank: exports_external.number().int().min(0).max(12).optional(),
|
|
16243
|
+
assessment_line_item_sourced_id: NonEmptyString4.optional(),
|
|
16244
|
+
assessment_result_sourced_id: NonEmptyString4.optional()
|
|
16245
|
+
}).superRefine((value, ctx) => {
|
|
16246
|
+
const hasTimebackId = !!value.timeback_id;
|
|
16247
|
+
const hasSubject = !!value.subject;
|
|
16248
|
+
const hasGradeRank = value.grade_rank !== undefined;
|
|
16249
|
+
if (!hasTimebackId && !hasSubject) {
|
|
16250
|
+
ctx.addIssue({
|
|
16251
|
+
code: exports_external.ZodIssueCode.custom,
|
|
16252
|
+
message: "must provide either timeback_id or subject",
|
|
16253
|
+
path: ["timeback_id"]
|
|
16254
|
+
});
|
|
16255
|
+
ctx.addIssue({
|
|
16256
|
+
code: exports_external.ZodIssueCode.custom,
|
|
16257
|
+
message: "must provide either timeback_id or subject",
|
|
16258
|
+
path: ["subject"]
|
|
16259
|
+
});
|
|
16260
|
+
}
|
|
16261
|
+
if (hasGradeRank && !hasSubject) {
|
|
16262
|
+
ctx.addIssue({
|
|
16263
|
+
code: exports_external.ZodIssueCode.custom,
|
|
16264
|
+
message: "grade_rank requires subject",
|
|
16265
|
+
path: ["grade_rank"]
|
|
16266
|
+
});
|
|
16267
|
+
}
|
|
16268
|
+
const hasLineItem = !!value.assessment_line_item_sourced_id;
|
|
16269
|
+
const hasResultId = !!value.assessment_result_sourced_id;
|
|
16270
|
+
if (hasLineItem !== hasResultId) {
|
|
16271
|
+
ctx.addIssue({
|
|
16272
|
+
code: exports_external.ZodIssueCode.custom,
|
|
16273
|
+
message: "assessment_line_item_sourced_id and assessment_result_sourced_id must be provided together",
|
|
16274
|
+
path: hasLineItem ? ["assessment_result_sourced_id"] : ["assessment_line_item_sourced_id"]
|
|
16275
|
+
});
|
|
16276
|
+
}
|
|
16277
|
+
});
|
|
16278
|
+
var MasteryTrackInvalidateAssignmentInput = exports_external.object({
|
|
16279
|
+
student_email: exports_external.email(),
|
|
16280
|
+
assignment_id: exports_external.number().int().positive().optional(),
|
|
16281
|
+
timeback_id: NonEmptyString4.optional(),
|
|
16282
|
+
subject: NonEmptyString4.optional(),
|
|
16283
|
+
grade_rank: exports_external.number().int().min(0).max(12).optional()
|
|
16284
|
+
}).superRefine((value, ctx) => {
|
|
16285
|
+
const byAssignment = value.assignment_id !== undefined;
|
|
16286
|
+
const byTimeback = !!value.timeback_id;
|
|
16287
|
+
const bySubjectGrade = !!value.subject && value.grade_rank !== undefined;
|
|
16288
|
+
if (!byAssignment && !byTimeback && !bySubjectGrade) {
|
|
16289
|
+
ctx.addIssue({
|
|
16290
|
+
code: exports_external.ZodIssueCode.custom,
|
|
16291
|
+
message: "Either assignment_id, timeback_id, or (subject and grade_rank) is required",
|
|
16292
|
+
path: ["assignment_id"]
|
|
16293
|
+
});
|
|
16294
|
+
}
|
|
16295
|
+
if (value.grade_rank !== undefined && !value.subject) {
|
|
16296
|
+
ctx.addIssue({
|
|
16297
|
+
code: exports_external.ZodIssueCode.custom,
|
|
16298
|
+
message: "grade_rank requires subject",
|
|
16299
|
+
path: ["grade_rank"]
|
|
16300
|
+
});
|
|
16301
|
+
}
|
|
16302
|
+
});
|
|
15568
16303
|
// ../../types/src/zod/oneroster.ts
|
|
15569
|
-
var
|
|
16304
|
+
var NonEmptyString5 = exports_external.string().min(1);
|
|
15570
16305
|
var Status = exports_external.enum(["active", "tobedeleted"]);
|
|
15571
16306
|
var Metadata = exports_external.record(exports_external.string(), exports_external.unknown()).nullable().optional();
|
|
15572
16307
|
var Ref = exports_external.object({
|
|
15573
|
-
sourcedId:
|
|
16308
|
+
sourcedId: NonEmptyString5,
|
|
15574
16309
|
type: exports_external.string().optional(),
|
|
15575
16310
|
href: exports_external.string().optional()
|
|
15576
16311
|
}).strict();
|
|
@@ -15585,58 +16320,58 @@ var OneRosterUserRoleInput = exports_external.object({
|
|
|
15585
16320
|
endDate: OneRosterDateString.optional()
|
|
15586
16321
|
}).strict();
|
|
15587
16322
|
var OneRosterUserCreateInput = exports_external.object({
|
|
15588
|
-
sourcedId:
|
|
16323
|
+
sourcedId: NonEmptyString5.describe("sourcedId must be a non-empty string"),
|
|
15589
16324
|
status: Status.optional(),
|
|
15590
16325
|
enabledUser: exports_external.boolean(),
|
|
15591
|
-
givenName:
|
|
15592
|
-
familyName:
|
|
15593
|
-
middleName:
|
|
15594
|
-
username:
|
|
16326
|
+
givenName: NonEmptyString5.describe("givenName must be a non-empty string"),
|
|
16327
|
+
familyName: NonEmptyString5.describe("familyName must be a non-empty string"),
|
|
16328
|
+
middleName: NonEmptyString5.optional(),
|
|
16329
|
+
username: NonEmptyString5.optional(),
|
|
15595
16330
|
email: exports_external.email().optional(),
|
|
15596
16331
|
roles: exports_external.array(OneRosterUserRoleInput).min(1, "roles must include at least one role"),
|
|
15597
16332
|
userIds: exports_external.array(exports_external.object({
|
|
15598
|
-
type:
|
|
15599
|
-
identifier:
|
|
16333
|
+
type: NonEmptyString5,
|
|
16334
|
+
identifier: NonEmptyString5
|
|
15600
16335
|
}).strict()).optional(),
|
|
15601
16336
|
agents: exports_external.array(Ref).optional(),
|
|
15602
16337
|
grades: exports_external.array(TimebackGrade).optional(),
|
|
15603
|
-
identifier:
|
|
15604
|
-
sms:
|
|
15605
|
-
phone:
|
|
15606
|
-
pronouns:
|
|
15607
|
-
password:
|
|
16338
|
+
identifier: NonEmptyString5.optional(),
|
|
16339
|
+
sms: NonEmptyString5.optional(),
|
|
16340
|
+
phone: NonEmptyString5.optional(),
|
|
16341
|
+
pronouns: NonEmptyString5.optional(),
|
|
16342
|
+
password: NonEmptyString5.optional(),
|
|
15608
16343
|
metadata: Metadata
|
|
15609
16344
|
}).strict();
|
|
15610
16345
|
var OneRosterCourseCreateInput = exports_external.object({
|
|
15611
|
-
sourcedId:
|
|
16346
|
+
sourcedId: NonEmptyString5.describe("sourcedId must be a non-empty string").optional(),
|
|
15612
16347
|
status: Status.optional(),
|
|
15613
|
-
title:
|
|
16348
|
+
title: NonEmptyString5.describe("title must be a non-empty string"),
|
|
15614
16349
|
org: Ref,
|
|
15615
|
-
courseCode:
|
|
16350
|
+
courseCode: NonEmptyString5.optional(),
|
|
15616
16351
|
subjects: exports_external.array(TimebackSubject).optional(),
|
|
15617
16352
|
grades: exports_external.array(TimebackGrade).optional(),
|
|
15618
|
-
level:
|
|
16353
|
+
level: NonEmptyString5.optional(),
|
|
15619
16354
|
metadata: Metadata
|
|
15620
16355
|
}).strict();
|
|
15621
16356
|
var OneRosterClassCreateInput = exports_external.object({
|
|
15622
|
-
sourcedId:
|
|
16357
|
+
sourcedId: NonEmptyString5.describe("sourcedId must be a non-empty string").optional(),
|
|
15623
16358
|
status: Status.optional(),
|
|
15624
|
-
title:
|
|
16359
|
+
title: NonEmptyString5.describe("title must be a non-empty string"),
|
|
15625
16360
|
terms: exports_external.array(Ref).min(1, "terms must have at least one item"),
|
|
15626
16361
|
course: Ref,
|
|
15627
16362
|
org: Ref,
|
|
15628
|
-
classCode:
|
|
16363
|
+
classCode: NonEmptyString5.optional(),
|
|
15629
16364
|
classType: exports_external.enum(["homeroom", "scheduled"]).optional(),
|
|
15630
|
-
location:
|
|
16365
|
+
location: NonEmptyString5.optional(),
|
|
15631
16366
|
grades: exports_external.array(TimebackGrade).optional(),
|
|
15632
16367
|
subjects: exports_external.array(TimebackSubject).optional(),
|
|
15633
|
-
subjectCodes: exports_external.array(
|
|
15634
|
-
periods: exports_external.array(
|
|
16368
|
+
subjectCodes: exports_external.array(NonEmptyString5).optional(),
|
|
16369
|
+
periods: exports_external.array(NonEmptyString5).optional(),
|
|
15635
16370
|
metadata: Metadata
|
|
15636
16371
|
}).strict();
|
|
15637
16372
|
var StringBoolean = exports_external.enum(["true", "false"]);
|
|
15638
16373
|
var OneRosterEnrollmentCreateInput = exports_external.object({
|
|
15639
|
-
sourcedId:
|
|
16374
|
+
sourcedId: NonEmptyString5.describe("sourcedId must be a non-empty string").optional(),
|
|
15640
16375
|
status: Status.optional(),
|
|
15641
16376
|
user: Ref,
|
|
15642
16377
|
class: Ref,
|
|
@@ -15648,15 +16383,15 @@ var OneRosterEnrollmentCreateInput = exports_external.object({
|
|
|
15648
16383
|
metadata: Metadata
|
|
15649
16384
|
}).strict();
|
|
15650
16385
|
var OneRosterCategoryCreateInput = exports_external.object({
|
|
15651
|
-
sourcedId:
|
|
15652
|
-
title:
|
|
16386
|
+
sourcedId: NonEmptyString5.optional(),
|
|
16387
|
+
title: NonEmptyString5.describe("title must be a non-empty string"),
|
|
15653
16388
|
status: Status,
|
|
15654
16389
|
weight: exports_external.number().nullable().optional(),
|
|
15655
16390
|
metadata: Metadata
|
|
15656
16391
|
}).strict();
|
|
15657
16392
|
var OneRosterLineItemCreateInput = exports_external.object({
|
|
15658
|
-
sourcedId:
|
|
15659
|
-
title:
|
|
16393
|
+
sourcedId: NonEmptyString5.optional(),
|
|
16394
|
+
title: NonEmptyString5.describe("title must be a non-empty string"),
|
|
15660
16395
|
class: Ref,
|
|
15661
16396
|
school: Ref,
|
|
15662
16397
|
category: Ref,
|
|
@@ -15670,7 +16405,7 @@ var OneRosterLineItemCreateInput = exports_external.object({
|
|
|
15670
16405
|
metadata: Metadata
|
|
15671
16406
|
}).strict();
|
|
15672
16407
|
var OneRosterResultCreateInput = exports_external.object({
|
|
15673
|
-
sourcedId:
|
|
16408
|
+
sourcedId: NonEmptyString5.optional(),
|
|
15674
16409
|
lineItem: Ref,
|
|
15675
16410
|
student: Ref,
|
|
15676
16411
|
class: Ref.optional(),
|
|
@@ -15689,15 +16424,15 @@ var OneRosterResultCreateInput = exports_external.object({
|
|
|
15689
16424
|
metadata: Metadata
|
|
15690
16425
|
}).strict();
|
|
15691
16426
|
var OneRosterScoreScaleCreateInput = exports_external.object({
|
|
15692
|
-
sourcedId:
|
|
15693
|
-
title:
|
|
16427
|
+
sourcedId: NonEmptyString5.optional(),
|
|
16428
|
+
title: NonEmptyString5.describe("title must be a non-empty string"),
|
|
15694
16429
|
status: Status.optional(),
|
|
15695
16430
|
type: exports_external.string().optional(),
|
|
15696
16431
|
class: Ref.optional(),
|
|
15697
16432
|
course: Ref.nullable().optional(),
|
|
15698
16433
|
scoreScaleValue: exports_external.array(exports_external.object({
|
|
15699
|
-
itemValueLHS:
|
|
15700
|
-
itemValueRHS:
|
|
16434
|
+
itemValueLHS: NonEmptyString5,
|
|
16435
|
+
itemValueRHS: NonEmptyString5,
|
|
15701
16436
|
value: exports_external.string().optional(),
|
|
15702
16437
|
description: exports_external.string().optional()
|
|
15703
16438
|
}).strict()).optional(),
|
|
@@ -15706,10 +16441,10 @@ var OneRosterScoreScaleCreateInput = exports_external.object({
|
|
|
15706
16441
|
metadata: Metadata
|
|
15707
16442
|
}).strict();
|
|
15708
16443
|
var OneRosterAssessmentLineItemCreateInput = exports_external.object({
|
|
15709
|
-
sourcedId:
|
|
16444
|
+
sourcedId: NonEmptyString5.optional(),
|
|
15710
16445
|
status: Status.optional(),
|
|
15711
16446
|
dateLastModified: IsoDateTimeString.optional(),
|
|
15712
|
-
title:
|
|
16447
|
+
title: NonEmptyString5.describe("title must be a non-empty string"),
|
|
15713
16448
|
description: exports_external.string().nullable().optional(),
|
|
15714
16449
|
class: Ref.nullable().optional(),
|
|
15715
16450
|
parentAssessmentLineItem: Ref.nullable().optional(),
|
|
@@ -15735,7 +16470,7 @@ var LearningObjectiveScoreSetSchema = exports_external.array(exports_external.ob
|
|
|
15735
16470
|
learningObjectiveResults: exports_external.array(LearningObjectiveResult)
|
|
15736
16471
|
}));
|
|
15737
16472
|
var OneRosterAssessmentResultCreateInput = exports_external.object({
|
|
15738
|
-
sourcedId:
|
|
16473
|
+
sourcedId: NonEmptyString5.optional(),
|
|
15739
16474
|
status: Status.optional(),
|
|
15740
16475
|
dateLastModified: IsoDateTimeString.optional(),
|
|
15741
16476
|
metadata: Metadata,
|
|
@@ -15761,53 +16496,53 @@ var OneRosterAssessmentResultCreateInput = exports_external.object({
|
|
|
15761
16496
|
missing: exports_external.string().nullable().optional()
|
|
15762
16497
|
}).strict();
|
|
15763
16498
|
var OneRosterOrgCreateInput = exports_external.object({
|
|
15764
|
-
sourcedId:
|
|
16499
|
+
sourcedId: NonEmptyString5.optional(),
|
|
15765
16500
|
status: Status.optional(),
|
|
15766
|
-
name:
|
|
16501
|
+
name: NonEmptyString5.describe("name must be a non-empty string"),
|
|
15767
16502
|
type: OrganizationType,
|
|
15768
|
-
identifier:
|
|
16503
|
+
identifier: NonEmptyString5.optional(),
|
|
15769
16504
|
parent: Ref.optional(),
|
|
15770
16505
|
metadata: Metadata
|
|
15771
16506
|
}).strict();
|
|
15772
16507
|
var OneRosterSchoolCreateInput = exports_external.object({
|
|
15773
|
-
sourcedId:
|
|
16508
|
+
sourcedId: NonEmptyString5.optional(),
|
|
15774
16509
|
status: Status.optional(),
|
|
15775
|
-
name:
|
|
16510
|
+
name: NonEmptyString5.describe("name must be a non-empty string"),
|
|
15776
16511
|
type: exports_external.literal("school").optional(),
|
|
15777
|
-
identifier:
|
|
16512
|
+
identifier: NonEmptyString5.optional(),
|
|
15778
16513
|
parent: Ref.optional(),
|
|
15779
16514
|
metadata: Metadata
|
|
15780
16515
|
}).strict();
|
|
15781
16516
|
var OneRosterAcademicSessionCreateInput = exports_external.object({
|
|
15782
|
-
sourcedId:
|
|
16517
|
+
sourcedId: NonEmptyString5.describe("sourcedId must be a non-empty string"),
|
|
15783
16518
|
status: Status,
|
|
15784
|
-
title:
|
|
16519
|
+
title: NonEmptyString5.describe("title must be a non-empty string"),
|
|
15785
16520
|
startDate: OneRosterDateString,
|
|
15786
16521
|
endDate: OneRosterDateString,
|
|
15787
16522
|
type: exports_external.enum(["gradingPeriod", "semester", "schoolYear", "term"]),
|
|
15788
|
-
schoolYear:
|
|
16523
|
+
schoolYear: NonEmptyString5.describe("schoolYear must be a non-empty string"),
|
|
15789
16524
|
org: Ref,
|
|
15790
16525
|
parent: Ref.optional(),
|
|
15791
16526
|
children: exports_external.array(Ref).optional(),
|
|
15792
16527
|
metadata: Metadata
|
|
15793
16528
|
}).strict();
|
|
15794
16529
|
var OneRosterComponentResourceCreateInput = exports_external.object({
|
|
15795
|
-
sourcedId:
|
|
15796
|
-
title:
|
|
16530
|
+
sourcedId: NonEmptyString5.optional(),
|
|
16531
|
+
title: NonEmptyString5.describe("title must be a non-empty string"),
|
|
15797
16532
|
courseComponent: Ref,
|
|
15798
16533
|
resource: Ref,
|
|
15799
16534
|
status: Status,
|
|
15800
16535
|
metadata: Metadata
|
|
15801
16536
|
}).strict();
|
|
15802
16537
|
var OneRosterCourseComponentCreateInput = exports_external.object({
|
|
15803
|
-
sourcedId:
|
|
15804
|
-
title:
|
|
16538
|
+
sourcedId: NonEmptyString5.optional(),
|
|
16539
|
+
title: NonEmptyString5.describe("title must be a non-empty string"),
|
|
15805
16540
|
course: Ref,
|
|
15806
16541
|
status: Status,
|
|
15807
16542
|
metadata: Metadata
|
|
15808
16543
|
}).strict();
|
|
15809
16544
|
var OneRosterEnrollInput = exports_external.object({
|
|
15810
|
-
sourcedId:
|
|
16545
|
+
sourcedId: NonEmptyString5.describe("sourcedId must be a non-empty string"),
|
|
15811
16546
|
role: exports_external.enum(["student", "teacher"]),
|
|
15812
16547
|
primary: StringBoolean.optional(),
|
|
15813
16548
|
beginDate: OneRosterDateString.optional(),
|
|
@@ -15815,16 +16550,16 @@ var OneRosterEnrollInput = exports_external.object({
|
|
|
15815
16550
|
metadata: Metadata
|
|
15816
16551
|
}).strict();
|
|
15817
16552
|
var OneRosterAgentInput = exports_external.object({
|
|
15818
|
-
agentSourcedId:
|
|
16553
|
+
agentSourcedId: NonEmptyString5.describe("agentSourcedId must be a non-empty string")
|
|
15819
16554
|
}).strict();
|
|
15820
16555
|
var OneRosterCredentialInput = exports_external.object({
|
|
15821
|
-
type:
|
|
15822
|
-
username:
|
|
16556
|
+
type: NonEmptyString5.describe("type must be a non-empty string"),
|
|
16557
|
+
username: NonEmptyString5.describe("username must be a non-empty string"),
|
|
15823
16558
|
password: exports_external.string().optional(),
|
|
15824
16559
|
metadata: Metadata
|
|
15825
16560
|
}).strict();
|
|
15826
16561
|
var OneRosterDemographicsCreateInput = exports_external.object({
|
|
15827
|
-
sourcedId:
|
|
16562
|
+
sourcedId: NonEmptyString5.describe("sourcedId must be a non-empty string")
|
|
15828
16563
|
}).loose();
|
|
15829
16564
|
var CommonResourceMetadataSchema = exports_external.object({
|
|
15830
16565
|
type: ResourceType,
|
|
@@ -15896,9 +16631,9 @@ var ResourceMetadataSchema = exports_external.discriminatedUnion("type", [
|
|
|
15896
16631
|
AssessmentBankMetadataSchema
|
|
15897
16632
|
]);
|
|
15898
16633
|
var OneRosterResourceCreateInput = exports_external.object({
|
|
15899
|
-
sourcedId:
|
|
15900
|
-
title:
|
|
15901
|
-
vendorResourceId:
|
|
16634
|
+
sourcedId: NonEmptyString5.optional(),
|
|
16635
|
+
title: NonEmptyString5.describe("title must be a non-empty string"),
|
|
16636
|
+
vendorResourceId: NonEmptyString5.describe("vendorResourceId must be a non-empty string"),
|
|
15902
16637
|
roles: exports_external.array(exports_external.enum(["primary", "secondary"])).optional(),
|
|
15903
16638
|
importance: exports_external.enum(["primary", "secondary"]).optional(),
|
|
15904
16639
|
vendorId: exports_external.string().optional(),
|
|
@@ -15907,18 +16642,18 @@ var OneRosterResourceCreateInput = exports_external.object({
|
|
|
15907
16642
|
metadata: ResourceMetadataSchema.nullable().optional()
|
|
15908
16643
|
}).strict();
|
|
15909
16644
|
var CourseStructureItem = exports_external.object({
|
|
15910
|
-
url:
|
|
15911
|
-
skillCode:
|
|
15912
|
-
lessonCode:
|
|
15913
|
-
title:
|
|
15914
|
-
"unit-title":
|
|
15915
|
-
status:
|
|
16645
|
+
url: NonEmptyString5.describe("courseStructure.url must be a non-empty string"),
|
|
16646
|
+
skillCode: NonEmptyString5.describe("courseStructure.skillCode must be a non-empty string"),
|
|
16647
|
+
lessonCode: NonEmptyString5.describe("courseStructure.lessonCode must be a non-empty string"),
|
|
16648
|
+
title: NonEmptyString5.describe("courseStructure.title must be a non-empty string"),
|
|
16649
|
+
"unit-title": NonEmptyString5.describe("courseStructure.unit-title must be a non-empty string"),
|
|
16650
|
+
status: NonEmptyString5.describe("courseStructure.status must be a non-empty string"),
|
|
15916
16651
|
xp: exports_external.number()
|
|
15917
16652
|
}).loose();
|
|
15918
16653
|
var OneRosterCourseStructureInput = exports_external.object({
|
|
15919
16654
|
course: exports_external.object({
|
|
15920
|
-
sourcedId:
|
|
15921
|
-
title:
|
|
16655
|
+
sourcedId: NonEmptyString5.describe("course.sourcedId must be a non-empty string").optional(),
|
|
16656
|
+
title: NonEmptyString5.describe("course.title must be a non-empty string"),
|
|
15922
16657
|
org: Ref,
|
|
15923
16658
|
status: Status,
|
|
15924
16659
|
metadata: Metadata
|
|
@@ -15930,7 +16665,7 @@ var OneRosterBulkResultItem = exports_external.object({
|
|
|
15930
16665
|
}).loose();
|
|
15931
16666
|
var OneRosterBulkResultsInput = exports_external.array(OneRosterBulkResultItem).min(1, "results must have at least one item");
|
|
15932
16667
|
// ../../types/src/zod/powerpath.ts
|
|
15933
|
-
var
|
|
16668
|
+
var NonEmptyString6 = exports_external.string().trim().min(1);
|
|
15934
16669
|
var ToolProvider = exports_external.enum(["edulastic", "mastery-track"]);
|
|
15935
16670
|
var LessonTypeRequired = exports_external.enum([
|
|
15936
16671
|
"powerpath-100",
|
|
@@ -15943,14 +16678,14 @@ var LessonTypeRequired = exports_external.enum([
|
|
|
15943
16678
|
var GradeArray = exports_external.array(TimebackGrade);
|
|
15944
16679
|
var ResourceMetadata = exports_external.record(exports_external.string(), exports_external.unknown()).optional();
|
|
15945
16680
|
var ExternalTestBase = exports_external.object({
|
|
15946
|
-
courseId:
|
|
15947
|
-
lessonTitle:
|
|
16681
|
+
courseId: NonEmptyString6,
|
|
16682
|
+
lessonTitle: NonEmptyString6.optional(),
|
|
15948
16683
|
launchUrl: exports_external.url().optional(),
|
|
15949
16684
|
toolProvider: ToolProvider,
|
|
15950
|
-
unitTitle:
|
|
15951
|
-
courseComponentSourcedId:
|
|
15952
|
-
vendorId:
|
|
15953
|
-
description:
|
|
16685
|
+
unitTitle: NonEmptyString6.optional(),
|
|
16686
|
+
courseComponentSourcedId: NonEmptyString6.optional(),
|
|
16687
|
+
vendorId: NonEmptyString6.optional(),
|
|
16688
|
+
description: NonEmptyString6.optional(),
|
|
15954
16689
|
resourceMetadata: ResourceMetadata.nullable().optional(),
|
|
15955
16690
|
grades: GradeArray
|
|
15956
16691
|
});
|
|
@@ -15960,26 +16695,26 @@ var ExternalTestOut = ExternalTestBase.extend({
|
|
|
15960
16695
|
});
|
|
15961
16696
|
var ExternalPlacement = ExternalTestBase.extend({
|
|
15962
16697
|
lessonType: exports_external.literal("placement"),
|
|
15963
|
-
courseIdOnFail:
|
|
16698
|
+
courseIdOnFail: NonEmptyString6.optional(),
|
|
15964
16699
|
xp: exports_external.number().optional()
|
|
15965
16700
|
});
|
|
15966
16701
|
var InternalTestBase = exports_external.object({
|
|
15967
|
-
courseId:
|
|
16702
|
+
courseId: NonEmptyString6,
|
|
15968
16703
|
lessonType: LessonTypeRequired,
|
|
15969
|
-
lessonTitle:
|
|
15970
|
-
unitTitle:
|
|
15971
|
-
courseComponentSourcedId:
|
|
16704
|
+
lessonTitle: NonEmptyString6.optional(),
|
|
16705
|
+
unitTitle: NonEmptyString6.optional(),
|
|
16706
|
+
courseComponentSourcedId: NonEmptyString6.optional(),
|
|
15972
16707
|
resourceMetadata: ResourceMetadata.nullable().optional(),
|
|
15973
16708
|
xp: exports_external.number().optional(),
|
|
15974
16709
|
grades: GradeArray.optional(),
|
|
15975
|
-
courseIdOnFail:
|
|
16710
|
+
courseIdOnFail: NonEmptyString6.optional()
|
|
15976
16711
|
});
|
|
15977
16712
|
var PowerPathCreateInternalTestInput = exports_external.union([
|
|
15978
16713
|
InternalTestBase.extend({
|
|
15979
16714
|
testType: exports_external.literal("qti"),
|
|
15980
16715
|
qti: exports_external.object({
|
|
15981
16716
|
url: exports_external.url(),
|
|
15982
|
-
title:
|
|
16717
|
+
title: NonEmptyString6.optional(),
|
|
15983
16718
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
15984
16719
|
})
|
|
15985
16720
|
}),
|
|
@@ -15988,28 +16723,28 @@ var PowerPathCreateInternalTestInput = exports_external.union([
|
|
|
15988
16723
|
assessmentBank: exports_external.object({
|
|
15989
16724
|
resources: exports_external.array(exports_external.object({
|
|
15990
16725
|
url: exports_external.url(),
|
|
15991
|
-
title:
|
|
16726
|
+
title: NonEmptyString6.optional(),
|
|
15992
16727
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
15993
16728
|
}))
|
|
15994
16729
|
})
|
|
15995
16730
|
})
|
|
15996
16731
|
]);
|
|
15997
16732
|
var PowerPathCreateNewAttemptInput = exports_external.object({
|
|
15998
|
-
student:
|
|
15999
|
-
lesson:
|
|
16733
|
+
student: NonEmptyString6,
|
|
16734
|
+
lesson: NonEmptyString6
|
|
16000
16735
|
});
|
|
16001
16736
|
var PowerPathFinalStudentAssessmentResponseInput = exports_external.object({
|
|
16002
|
-
student:
|
|
16003
|
-
lesson:
|
|
16737
|
+
student: NonEmptyString6,
|
|
16738
|
+
lesson: NonEmptyString6
|
|
16004
16739
|
});
|
|
16005
16740
|
var PowerPathLessonPlansCreateInput = exports_external.object({
|
|
16006
|
-
courseId:
|
|
16007
|
-
userId:
|
|
16008
|
-
classId:
|
|
16741
|
+
courseId: NonEmptyString6,
|
|
16742
|
+
userId: NonEmptyString6,
|
|
16743
|
+
classId: NonEmptyString6.optional()
|
|
16009
16744
|
});
|
|
16010
16745
|
var LessonPlanTarget = exports_external.object({
|
|
16011
16746
|
type: exports_external.enum(["component", "resource"]),
|
|
16012
|
-
id:
|
|
16747
|
+
id: NonEmptyString6
|
|
16013
16748
|
});
|
|
16014
16749
|
var PowerPathLessonPlanOperationInput = exports_external.union([
|
|
16015
16750
|
exports_external.object({
|
|
@@ -16022,8 +16757,8 @@ var PowerPathLessonPlanOperationInput = exports_external.union([
|
|
|
16022
16757
|
exports_external.object({
|
|
16023
16758
|
type: exports_external.literal("add-custom-resource"),
|
|
16024
16759
|
payload: exports_external.object({
|
|
16025
|
-
resource_id:
|
|
16026
|
-
parent_component_id:
|
|
16760
|
+
resource_id: NonEmptyString6,
|
|
16761
|
+
parent_component_id: NonEmptyString6,
|
|
16027
16762
|
skipped: exports_external.boolean().optional()
|
|
16028
16763
|
})
|
|
16029
16764
|
}),
|
|
@@ -16031,14 +16766,14 @@ var PowerPathLessonPlanOperationInput = exports_external.union([
|
|
|
16031
16766
|
type: exports_external.literal("move-item-before"),
|
|
16032
16767
|
payload: exports_external.object({
|
|
16033
16768
|
target: LessonPlanTarget,
|
|
16034
|
-
reference_id:
|
|
16769
|
+
reference_id: NonEmptyString6
|
|
16035
16770
|
})
|
|
16036
16771
|
}),
|
|
16037
16772
|
exports_external.object({
|
|
16038
16773
|
type: exports_external.literal("move-item-after"),
|
|
16039
16774
|
payload: exports_external.object({
|
|
16040
16775
|
target: LessonPlanTarget,
|
|
16041
|
-
reference_id:
|
|
16776
|
+
reference_id: NonEmptyString6
|
|
16042
16777
|
})
|
|
16043
16778
|
}),
|
|
16044
16779
|
exports_external.object({
|
|
@@ -16057,135 +16792,135 @@ var PowerPathLessonPlanOperationInput = exports_external.union([
|
|
|
16057
16792
|
type: exports_external.literal("change-item-parent"),
|
|
16058
16793
|
payload: exports_external.object({
|
|
16059
16794
|
target: LessonPlanTarget,
|
|
16060
|
-
new_parent_id:
|
|
16795
|
+
new_parent_id: NonEmptyString6,
|
|
16061
16796
|
position: exports_external.enum(["start", "end"]).optional()
|
|
16062
16797
|
})
|
|
16063
16798
|
})
|
|
16064
16799
|
]);
|
|
16065
16800
|
var PowerPathLessonPlanOperationsInput = exports_external.object({
|
|
16066
16801
|
operation: exports_external.array(PowerPathLessonPlanOperationInput),
|
|
16067
|
-
reason:
|
|
16802
|
+
reason: NonEmptyString6.optional()
|
|
16068
16803
|
});
|
|
16069
16804
|
var PowerPathLessonPlanUpdateStudentItemResponseInput = exports_external.object({
|
|
16070
|
-
studentId:
|
|
16071
|
-
componentResourceId:
|
|
16805
|
+
studentId: NonEmptyString6,
|
|
16806
|
+
componentResourceId: NonEmptyString6,
|
|
16072
16807
|
result: exports_external.object({
|
|
16073
16808
|
status: exports_external.enum(["active", "tobedeleted"]),
|
|
16074
16809
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
|
|
16075
16810
|
score: exports_external.number().optional(),
|
|
16076
|
-
textScore:
|
|
16077
|
-
scoreDate:
|
|
16811
|
+
textScore: NonEmptyString6.optional(),
|
|
16812
|
+
scoreDate: NonEmptyString6,
|
|
16078
16813
|
scorePercentile: exports_external.number().optional(),
|
|
16079
16814
|
scoreStatus: ScoreStatus,
|
|
16080
|
-
comment:
|
|
16815
|
+
comment: NonEmptyString6.optional(),
|
|
16081
16816
|
learningObjectiveSet: exports_external.array(exports_external.object({
|
|
16082
|
-
source:
|
|
16817
|
+
source: NonEmptyString6,
|
|
16083
16818
|
learningObjectiveResults: exports_external.array(exports_external.object({
|
|
16084
|
-
learningObjectiveId:
|
|
16819
|
+
learningObjectiveId: NonEmptyString6,
|
|
16085
16820
|
score: exports_external.number().optional(),
|
|
16086
|
-
textScore:
|
|
16821
|
+
textScore: NonEmptyString6.optional()
|
|
16087
16822
|
}))
|
|
16088
16823
|
})).optional(),
|
|
16089
|
-
inProgress:
|
|
16090
|
-
incomplete:
|
|
16091
|
-
late:
|
|
16092
|
-
missing:
|
|
16824
|
+
inProgress: NonEmptyString6.optional(),
|
|
16825
|
+
incomplete: NonEmptyString6.optional(),
|
|
16826
|
+
late: NonEmptyString6.optional(),
|
|
16827
|
+
missing: NonEmptyString6.optional()
|
|
16093
16828
|
})
|
|
16094
16829
|
});
|
|
16095
16830
|
var PowerPathMakeExternalTestAssignmentInput = exports_external.object({
|
|
16096
|
-
student:
|
|
16097
|
-
lesson:
|
|
16098
|
-
applicationName:
|
|
16099
|
-
testId:
|
|
16831
|
+
student: NonEmptyString6,
|
|
16832
|
+
lesson: NonEmptyString6,
|
|
16833
|
+
applicationName: NonEmptyString6.optional(),
|
|
16834
|
+
testId: NonEmptyString6.optional(),
|
|
16100
16835
|
skipCourseEnrollment: exports_external.boolean().optional()
|
|
16101
16836
|
});
|
|
16102
16837
|
var PowerPathPlacementResetUserPlacementInput = exports_external.object({
|
|
16103
|
-
student:
|
|
16838
|
+
student: NonEmptyString6,
|
|
16104
16839
|
subject: TimebackSubject
|
|
16105
16840
|
});
|
|
16106
16841
|
var PowerPathResetAttemptInput = exports_external.object({
|
|
16107
|
-
student:
|
|
16108
|
-
lesson:
|
|
16842
|
+
student: NonEmptyString6,
|
|
16843
|
+
lesson: NonEmptyString6
|
|
16109
16844
|
});
|
|
16110
16845
|
var PowerPathScreeningResetSessionInput = exports_external.object({
|
|
16111
|
-
userId:
|
|
16846
|
+
userId: NonEmptyString6
|
|
16112
16847
|
});
|
|
16113
16848
|
var PowerPathScreeningAssignTestInput = exports_external.object({
|
|
16114
|
-
userId:
|
|
16849
|
+
userId: NonEmptyString6,
|
|
16115
16850
|
subject: exports_external.enum(["Math", "Reading", "Language", "Science"])
|
|
16116
16851
|
});
|
|
16117
16852
|
var PowerPathTestAssignmentsCreateInput = exports_external.object({
|
|
16118
|
-
student:
|
|
16853
|
+
student: NonEmptyString6,
|
|
16119
16854
|
subject: TimebackSubject,
|
|
16120
16855
|
grade: TimebackGrade,
|
|
16121
|
-
testName:
|
|
16856
|
+
testName: NonEmptyString6.optional()
|
|
16122
16857
|
});
|
|
16123
16858
|
var PowerPathTestAssignmentsUpdateInput = exports_external.object({
|
|
16124
|
-
testName:
|
|
16859
|
+
testName: NonEmptyString6
|
|
16125
16860
|
});
|
|
16126
16861
|
var PowerPathTestAssignmentItemInput = exports_external.object({
|
|
16127
|
-
student:
|
|
16862
|
+
student: NonEmptyString6,
|
|
16128
16863
|
subject: TimebackSubject,
|
|
16129
16864
|
grade: TimebackGrade,
|
|
16130
|
-
testName:
|
|
16865
|
+
testName: NonEmptyString6.optional()
|
|
16131
16866
|
});
|
|
16132
16867
|
var PowerPathTestAssignmentsBulkInput = exports_external.object({
|
|
16133
16868
|
items: exports_external.array(PowerPathTestAssignmentItemInput)
|
|
16134
16869
|
});
|
|
16135
16870
|
var PowerPathTestAssignmentsImportInput = exports_external.object({
|
|
16136
16871
|
spreadsheetUrl: exports_external.url(),
|
|
16137
|
-
sheet:
|
|
16872
|
+
sheet: NonEmptyString6
|
|
16138
16873
|
});
|
|
16139
16874
|
var PowerPathTestAssignmentsListParams = exports_external.object({
|
|
16140
|
-
student:
|
|
16875
|
+
student: NonEmptyString6,
|
|
16141
16876
|
status: exports_external.enum(["assigned", "in_progress", "completed", "failed", "expired", "cancelled"]).optional(),
|
|
16142
|
-
subject:
|
|
16877
|
+
subject: NonEmptyString6.optional(),
|
|
16143
16878
|
grade: TimebackGrade.optional(),
|
|
16144
16879
|
limit: exports_external.number().int().positive().max(3000).optional(),
|
|
16145
16880
|
offset: exports_external.number().int().nonnegative().optional()
|
|
16146
16881
|
});
|
|
16147
16882
|
var PowerPathTestAssignmentsAdminParams = exports_external.object({
|
|
16148
|
-
student:
|
|
16883
|
+
student: NonEmptyString6.optional(),
|
|
16149
16884
|
status: exports_external.enum(["assigned", "in_progress", "completed", "failed", "expired", "cancelled"]).optional(),
|
|
16150
|
-
subject:
|
|
16885
|
+
subject: NonEmptyString6.optional(),
|
|
16151
16886
|
grade: TimebackGrade.optional(),
|
|
16152
16887
|
limit: exports_external.number().int().positive().max(3000).optional(),
|
|
16153
16888
|
offset: exports_external.number().int().nonnegative().optional()
|
|
16154
16889
|
});
|
|
16155
16890
|
var PowerPathUpdateStudentQuestionResponseInput = exports_external.object({
|
|
16156
|
-
student:
|
|
16157
|
-
question:
|
|
16158
|
-
response: exports_external.union([
|
|
16159
|
-
responses: exports_external.record(exports_external.string(), exports_external.union([
|
|
16160
|
-
lesson:
|
|
16891
|
+
student: NonEmptyString6,
|
|
16892
|
+
question: NonEmptyString6,
|
|
16893
|
+
response: exports_external.union([NonEmptyString6, exports_external.array(NonEmptyString6)]).optional(),
|
|
16894
|
+
responses: exports_external.record(exports_external.string(), exports_external.union([NonEmptyString6, exports_external.array(NonEmptyString6)])).optional(),
|
|
16895
|
+
lesson: NonEmptyString6
|
|
16161
16896
|
});
|
|
16162
16897
|
var PowerPathGetAssessmentProgressParams = exports_external.object({
|
|
16163
|
-
student:
|
|
16164
|
-
lesson:
|
|
16898
|
+
student: NonEmptyString6,
|
|
16899
|
+
lesson: NonEmptyString6,
|
|
16165
16900
|
attempt: exports_external.number().int().positive().optional()
|
|
16166
16901
|
});
|
|
16167
16902
|
var PowerPathGetNextQuestionParams = exports_external.object({
|
|
16168
|
-
student:
|
|
16169
|
-
lesson:
|
|
16903
|
+
student: NonEmptyString6,
|
|
16904
|
+
lesson: NonEmptyString6
|
|
16170
16905
|
});
|
|
16171
16906
|
var PowerPathGetAttemptsParams = exports_external.object({
|
|
16172
|
-
student:
|
|
16173
|
-
lesson:
|
|
16907
|
+
student: NonEmptyString6,
|
|
16908
|
+
lesson: NonEmptyString6
|
|
16174
16909
|
});
|
|
16175
16910
|
var PowerPathTestOutParams = exports_external.object({
|
|
16176
|
-
student:
|
|
16177
|
-
lesson:
|
|
16911
|
+
student: NonEmptyString6,
|
|
16912
|
+
lesson: NonEmptyString6.optional(),
|
|
16178
16913
|
finalized: exports_external.boolean().optional(),
|
|
16179
|
-
toolProvider:
|
|
16914
|
+
toolProvider: NonEmptyString6.optional(),
|
|
16180
16915
|
attempt: exports_external.number().int().positive().optional()
|
|
16181
16916
|
});
|
|
16182
16917
|
var PowerPathImportExternalTestAssignmentResultsParams = exports_external.object({
|
|
16183
|
-
student:
|
|
16184
|
-
lesson:
|
|
16185
|
-
applicationName:
|
|
16918
|
+
student: NonEmptyString6,
|
|
16919
|
+
lesson: NonEmptyString6,
|
|
16920
|
+
applicationName: NonEmptyString6.optional()
|
|
16186
16921
|
});
|
|
16187
16922
|
var PowerPathPlacementQueryParams = exports_external.object({
|
|
16188
|
-
student:
|
|
16923
|
+
student: NonEmptyString6,
|
|
16189
16924
|
subject: TimebackSubject
|
|
16190
16925
|
});
|
|
16191
16926
|
var PowerPathSyllabusQueryParams = exports_external.object({
|
|
@@ -16276,7 +17011,7 @@ var QtiItemMetadata = exports_external.object({
|
|
|
16276
17011
|
grade: TimebackGrade.optional(),
|
|
16277
17012
|
difficulty: QtiDifficulty.optional(),
|
|
16278
17013
|
learningObjectiveSet: exports_external.array(QtiLearningObjectiveSet).optional()
|
|
16279
|
-
}).
|
|
17014
|
+
}).loose();
|
|
16280
17015
|
var QtiModalFeedback = exports_external.object({
|
|
16281
17016
|
outcomeIdentifier: exports_external.string().min(1),
|
|
16282
17017
|
identifier: exports_external.string().min(1),
|
|
@@ -16313,7 +17048,12 @@ var QtiPaginationParams = exports_external.object({
|
|
|
16313
17048
|
sort: exports_external.string().optional(),
|
|
16314
17049
|
order: exports_external.enum(["asc", "desc"]).optional()
|
|
16315
17050
|
}).strict();
|
|
16316
|
-
var
|
|
17051
|
+
var QtiAssessmentItemXmlCreateInput = exports_external.object({
|
|
17052
|
+
format: exports_external.string().pipe(exports_external.literal("xml")),
|
|
17053
|
+
xml: exports_external.string().min(1),
|
|
17054
|
+
metadata: QtiItemMetadata.optional()
|
|
17055
|
+
}).strict();
|
|
17056
|
+
var QtiAssessmentItemJsonCreateInput = exports_external.object({
|
|
16317
17057
|
identifier: exports_external.string().min(1),
|
|
16318
17058
|
title: exports_external.string().min(1),
|
|
16319
17059
|
type: QtiAssessmentItemType,
|
|
@@ -16328,6 +17068,10 @@ var QtiAssessmentItemCreateInput = exports_external.object({
|
|
|
16328
17068
|
feedbackInline: exports_external.array(QtiFeedbackInline).optional(),
|
|
16329
17069
|
feedbackBlock: exports_external.array(QtiFeedbackBlock).optional()
|
|
16330
17070
|
}).strict();
|
|
17071
|
+
var QtiAssessmentItemCreateInput = exports_external.union([
|
|
17072
|
+
QtiAssessmentItemXmlCreateInput,
|
|
17073
|
+
QtiAssessmentItemJsonCreateInput
|
|
17074
|
+
]);
|
|
16331
17075
|
var QtiAssessmentItemUpdateInput = exports_external.object({
|
|
16332
17076
|
identifier: exports_external.string().min(1).optional(),
|
|
16333
17077
|
title: exports_external.string().min(1),
|
|
@@ -16364,9 +17108,9 @@ var QtiAssessmentSection = exports_external.object({
|
|
|
16364
17108
|
}).strict();
|
|
16365
17109
|
var QtiTestPart = exports_external.object({
|
|
16366
17110
|
identifier: exports_external.string().min(1),
|
|
16367
|
-
navigationMode: QtiNavigationMode,
|
|
16368
|
-
submissionMode: QtiSubmissionMode,
|
|
16369
|
-
"qti-assessment-section": exports_external.
|
|
17111
|
+
navigationMode: exports_external.string().pipe(QtiNavigationMode),
|
|
17112
|
+
submissionMode: exports_external.string().pipe(QtiSubmissionMode),
|
|
17113
|
+
"qti-assessment-section": exports_external.array(QtiAssessmentSection)
|
|
16370
17114
|
}).strict();
|
|
16371
17115
|
var QtiReorderItemsInput = exports_external.object({
|
|
16372
17116
|
items: exports_external.array(QtiAssessmentItemRef).min(1)
|
|
@@ -16384,7 +17128,7 @@ var QtiAssessmentTestCreateInput = exports_external.object({
|
|
|
16384
17128
|
maxAttempts: exports_external.number().optional(),
|
|
16385
17129
|
toolsEnabled: exports_external.record(exports_external.string(), exports_external.boolean()).optional(),
|
|
16386
17130
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
|
|
16387
|
-
"qti-test-part": QtiTestPart,
|
|
17131
|
+
"qti-test-part": exports_external.array(QtiTestPart),
|
|
16388
17132
|
"qti-outcome-declaration": exports_external.array(QtiTestOutcomeDeclaration).optional()
|
|
16389
17133
|
}).strict();
|
|
16390
17134
|
var QtiAssessmentTestUpdateInput = exports_external.object({
|
|
@@ -16397,7 +17141,7 @@ var QtiAssessmentTestUpdateInput = exports_external.object({
|
|
|
16397
17141
|
maxAttempts: exports_external.number().optional(),
|
|
16398
17142
|
toolsEnabled: exports_external.record(exports_external.string(), exports_external.boolean()).optional(),
|
|
16399
17143
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
|
|
16400
|
-
"qti-test-part": QtiTestPart,
|
|
17144
|
+
"qti-test-part": exports_external.array(QtiTestPart),
|
|
16401
17145
|
"qti-outcome-declaration": exports_external.array(QtiTestOutcomeDeclaration).optional()
|
|
16402
17146
|
}).strict();
|
|
16403
17147
|
var QtiStimulusCreateInput = exports_external.object({
|
|
@@ -16499,7 +17243,7 @@ class Paginator2 extends Paginator {
|
|
|
16499
17243
|
path,
|
|
16500
17244
|
params: requestParams,
|
|
16501
17245
|
max,
|
|
16502
|
-
logger:
|
|
17246
|
+
logger: log3
|
|
16503
17247
|
});
|
|
16504
17248
|
}
|
|
16505
17249
|
}
|
|
@@ -16522,12 +17266,12 @@ class EventsResource {
|
|
|
16522
17266
|
}
|
|
16523
17267
|
async sendEnvelope(envelope) {
|
|
16524
17268
|
validateWithSchema(CaliperEnvelopeInput, envelope, "caliper envelope");
|
|
16525
|
-
|
|
17269
|
+
log3.debug("Sending Caliper envelope", {
|
|
16526
17270
|
sensor: envelope.sensor,
|
|
16527
17271
|
eventCount: envelope.data.length
|
|
16528
17272
|
});
|
|
16529
17273
|
const response = await this.transport.request(this.transport.paths.send, { method: "POST", body: envelope });
|
|
16530
|
-
|
|
17274
|
+
log3.debug("Events queued for processing", { jobId: response.jobId });
|
|
16531
17275
|
return { jobId: response.jobId };
|
|
16532
17276
|
}
|
|
16533
17277
|
async validate(envelope) {
|
|
@@ -16536,7 +17280,7 @@ class EventsResource {
|
|
|
16536
17280
|
throw new Error("validate() is not supported on this platform");
|
|
16537
17281
|
}
|
|
16538
17282
|
validateWithSchema(CaliperEnvelopeInput, envelope, "caliper envelope");
|
|
16539
|
-
|
|
17283
|
+
log3.debug("Validating Caliper envelope", {
|
|
16540
17284
|
sensor: envelope.sensor,
|
|
16541
17285
|
eventCount: envelope.data.length
|
|
16542
17286
|
});
|
|
@@ -16544,7 +17288,7 @@ class EventsResource {
|
|
|
16544
17288
|
method: "POST",
|
|
16545
17289
|
body: envelope
|
|
16546
17290
|
});
|
|
16547
|
-
|
|
17291
|
+
log3.debug("Validation complete", { status: response.status });
|
|
16548
17292
|
return response;
|
|
16549
17293
|
}
|
|
16550
17294
|
async list(params = {}) {
|
|
@@ -16553,7 +17297,7 @@ class EventsResource {
|
|
|
16553
17297
|
throw new Error("list() is not supported on this platform");
|
|
16554
17298
|
}
|
|
16555
17299
|
validateWithSchema(CaliperListEventsParams, params, "list events params");
|
|
16556
|
-
|
|
17300
|
+
log3.debug("Listing events", { params });
|
|
16557
17301
|
const queryParams = {};
|
|
16558
17302
|
if (params.limit !== undefined)
|
|
16559
17303
|
queryParams.limit = params.limit;
|
|
@@ -16585,7 +17329,7 @@ class EventsResource {
|
|
|
16585
17329
|
const { max, ...filterParams } = params;
|
|
16586
17330
|
validateWithSchema(CaliperListEventsParams, filterParams, "list events params");
|
|
16587
17331
|
validateOffsetListParams(params);
|
|
16588
|
-
|
|
17332
|
+
log3.debug("Streaming events", { params });
|
|
16589
17333
|
const queryParams = {};
|
|
16590
17334
|
if (filterParams.limit !== undefined)
|
|
16591
17335
|
queryParams.limit = filterParams.limit;
|
|
@@ -16612,7 +17356,7 @@ class EventsResource {
|
|
|
16612
17356
|
throw new Error("get() is not supported on this platform");
|
|
16613
17357
|
}
|
|
16614
17358
|
validateNonEmptyString(externalId, "externalId");
|
|
16615
|
-
|
|
17359
|
+
log3.debug("Getting event", { externalId });
|
|
16616
17360
|
const path = getPath.replace("{id}", encodeURIComponent(externalId));
|
|
16617
17361
|
const response = await this.transport.request(path);
|
|
16618
17362
|
if (!response.event) {
|
|
@@ -16623,7 +17367,7 @@ class EventsResource {
|
|
|
16623
17367
|
sendActivity(sensor, input) {
|
|
16624
17368
|
validateWithSchema(ActivityCompletedInput, input, "activity event");
|
|
16625
17369
|
const event = createActivityEvent(input);
|
|
16626
|
-
|
|
17370
|
+
log3.debug("Sending ActivityCompletedEvent", {
|
|
16627
17371
|
eventId: event.id,
|
|
16628
17372
|
actor: input.actor.email,
|
|
16629
17373
|
subject: input.object.subject,
|
|
@@ -16634,7 +17378,7 @@ class EventsResource {
|
|
|
16634
17378
|
sendTimeSpent(sensor, input) {
|
|
16635
17379
|
validateWithSchema(TimeSpentInput, input, "time spent event");
|
|
16636
17380
|
const event = createTimeSpentEvent(input);
|
|
16637
|
-
|
|
17381
|
+
log3.debug("Sending TimeSpentEvent", {
|
|
16638
17382
|
eventId: event.id,
|
|
16639
17383
|
actor: input.actor.email,
|
|
16640
17384
|
subject: input.object.subject,
|
|
@@ -16655,7 +17399,7 @@ class JobsResource {
|
|
|
16655
17399
|
throw new Error("getStatus() is not supported on this platform");
|
|
16656
17400
|
}
|
|
16657
17401
|
validateNonEmptyString(jobId, "jobId");
|
|
16658
|
-
|
|
17402
|
+
log3.debug("Getting job status", { jobId });
|
|
16659
17403
|
const path = jobStatusPath.replace("{id}", encodeURIComponent(jobId));
|
|
16660
17404
|
const response = await this.transport.request(path);
|
|
16661
17405
|
return response.job;
|
|
@@ -16665,15 +17409,15 @@ class JobsResource {
|
|
|
16665
17409
|
validateWaitForCompletionOptions(options);
|
|
16666
17410
|
const { timeoutMs = 30000, pollIntervalMs = 1000 } = options;
|
|
16667
17411
|
const startTime = Date.now();
|
|
16668
|
-
|
|
17412
|
+
log3.debug("Waiting for job completion", { jobId, timeoutMs, pollIntervalMs });
|
|
16669
17413
|
while (Date.now() - startTime < timeoutMs) {
|
|
16670
17414
|
const status = await this.getStatus(jobId);
|
|
16671
17415
|
if (status.state === "completed") {
|
|
16672
|
-
|
|
17416
|
+
log3.info("Job completed", { jobId });
|
|
16673
17417
|
return status;
|
|
16674
17418
|
}
|
|
16675
17419
|
if (status.state === "failed") {
|
|
16676
|
-
|
|
17420
|
+
log3.error("Job failed", { jobId });
|
|
16677
17421
|
throw new Error(`Job ${jobId} failed`);
|
|
16678
17422
|
}
|
|
16679
17423
|
await new Promise((resolve) => {
|
|
@@ -16713,7 +17457,7 @@ function createCaliperClient(registry2 = DEFAULT_PROVIDER_REGISTRY) {
|
|
|
16713
17457
|
const resolved = resolveToProvider2(config3, registry2);
|
|
16714
17458
|
if (resolved.mode === "transport") {
|
|
16715
17459
|
this.transport = resolved.transport;
|
|
16716
|
-
|
|
17460
|
+
log3.info("Client initialized with custom transport");
|
|
16717
17461
|
} else {
|
|
16718
17462
|
const { provider } = resolved;
|
|
16719
17463
|
const { baseUrl, paths } = provider.getEndpointWithPaths("caliper");
|
|
@@ -16728,7 +17472,7 @@ function createCaliperClient(registry2 = DEFAULT_PROVIDER_REGISTRY) {
|
|
|
16728
17472
|
timeout: provider.timeout,
|
|
16729
17473
|
paths
|
|
16730
17474
|
});
|
|
16731
|
-
|
|
17475
|
+
log3.info("Client initialized", {
|
|
16732
17476
|
platform: provider.platform,
|
|
16733
17477
|
env: provider.env,
|
|
16734
17478
|
baseUrl
|