@akagilnc/pi-workflow-roles 0.1.4759 → 0.1.4772
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/acp-host/production-host.js +227 -428
- package/dist/headless-host/production-host.js +233 -434
- package/dist/migrate-book-topology.js +1255 -1087
- package/dist/notary-source-run.js +12 -2
- package/dist/public-cli/invocation.js +11 -8
- package/dist/public-cli/main.js +198 -399
- package/dist/public-cli/post-admission.js +27 -1
- package/dist/public-cli/run-lifecycle.js +25 -4
- package/dist/role-run-relocation.js +19 -18
- package/package.json +1 -1
- package/src/book-topology-migration-placement.ts +9 -1
- package/src/book-topology-runs-migrator.ts +156 -4
- package/src/notary-source-run.ts +18 -2
- package/src/public-cli/invocation.ts +13 -9
- package/src/public-cli/post-admission.ts +36 -0
- package/src/public-cli/run-lifecycle.ts +42 -4
- package/src/role-run-relocation.ts +27 -30
|
@@ -153,7 +153,44 @@ var init_run_ticket_number = __esm({
|
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
// src/role-run-placement.ts
|
|
156
|
+
import { readdir } from "node:fs/promises";
|
|
156
157
|
import { join as join3 } from "node:path";
|
|
158
|
+
function isMissingPathError(error51) {
|
|
159
|
+
return error51 instanceof Error && "code" in error51 && error51.code === "ENOENT";
|
|
160
|
+
}
|
|
161
|
+
async function listBookRunDirectories(bookDir) {
|
|
162
|
+
const out = [];
|
|
163
|
+
const seen = /* @__PURE__ */ new Set();
|
|
164
|
+
const collect = async (runsDir) => {
|
|
165
|
+
let entries;
|
|
166
|
+
try {
|
|
167
|
+
entries = await readdir(runsDir, { withFileTypes: true });
|
|
168
|
+
} catch (error51) {
|
|
169
|
+
if (isMissingPathError(error51)) return;
|
|
170
|
+
throw error51;
|
|
171
|
+
}
|
|
172
|
+
for (const entry of entries) {
|
|
173
|
+
if (!entry.isDirectory()) continue;
|
|
174
|
+
const runDir = join3(runsDir, entry.name);
|
|
175
|
+
if (seen.has(runDir)) continue;
|
|
176
|
+
seen.add(runDir);
|
|
177
|
+
out.push(runDir);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
await collect(join3(bookDir, "runs"));
|
|
181
|
+
let subjects;
|
|
182
|
+
try {
|
|
183
|
+
subjects = await readdir(bookDir, { withFileTypes: true });
|
|
184
|
+
} catch (error51) {
|
|
185
|
+
if (isMissingPathError(error51)) return out.sort();
|
|
186
|
+
throw error51;
|
|
187
|
+
}
|
|
188
|
+
for (const subject of subjects) {
|
|
189
|
+
if (!subject.isDirectory() || subject.name === "runs") continue;
|
|
190
|
+
await collect(join3(bookDir, subject.name, "runs"));
|
|
191
|
+
}
|
|
192
|
+
return out.sort();
|
|
193
|
+
}
|
|
157
194
|
function roleRunPlacement(ledgerHome, input) {
|
|
158
195
|
const subjectDirectory = "ticketNumber" in input.subject ? String(requireSafePositiveTicketNumber(
|
|
159
196
|
input.subject.ticketNumber,
|
|
@@ -213,8 +250,8 @@ function isRecord(value2) {
|
|
|
213
250
|
function positiveInteger(value2) {
|
|
214
251
|
if (typeof value2 === "number" && Number.isSafeInteger(value2) && value2 >= 1) return value2;
|
|
215
252
|
if (typeof value2 === "string" && /^[1-9][0-9]*$/.test(value2)) {
|
|
216
|
-
const
|
|
217
|
-
if (Number.isSafeInteger(
|
|
253
|
+
const parsed2 = Number(value2);
|
|
254
|
+
if (Number.isSafeInteger(parsed2)) return parsed2;
|
|
218
255
|
}
|
|
219
256
|
return void 0;
|
|
220
257
|
}
|
|
@@ -279,20 +316,6 @@ var init_diarist_contracts = __esm({
|
|
|
279
316
|
}
|
|
280
317
|
});
|
|
281
318
|
|
|
282
|
-
// src/package-resources/engine-material.ts
|
|
283
|
-
var init_engine_material = __esm({
|
|
284
|
-
"src/package-resources/engine-material.ts"() {
|
|
285
|
-
"use strict";
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
// src/activation-ledger-git.ts
|
|
290
|
-
var init_activation_ledger_git = __esm({
|
|
291
|
-
"src/activation-ledger-git.ts"() {
|
|
292
|
-
"use strict";
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
|
|
296
319
|
// node_modules/.pnpm/typebox@1.3.8/node_modules/typebox/build/system/memory/metrics.mjs
|
|
297
320
|
var Metrics;
|
|
298
321
|
var init_metrics = __esm({
|
|
@@ -2271,8 +2294,8 @@ var init_union = __esm({
|
|
|
2271
2294
|
|
|
2272
2295
|
// node_modules/.pnpm/typebox@1.3.8/node_modules/typebox/build/type/engine/patterns/pattern.mjs
|
|
2273
2296
|
function ParsePatternIntoTypes(pattern) {
|
|
2274
|
-
const
|
|
2275
|
-
const result = guard_exports.IsEqual(
|
|
2297
|
+
const parsed2 = Pattern(pattern);
|
|
2298
|
+
const result = guard_exports.IsEqual(parsed2.length, 2) ? parsed2[0] : [];
|
|
2276
2299
|
return result;
|
|
2277
2300
|
}
|
|
2278
2301
|
var init_pattern = __esm({
|
|
@@ -4080,8 +4103,8 @@ var init_parser = __esm({
|
|
|
4080
4103
|
|
|
4081
4104
|
// node_modules/.pnpm/typebox@1.3.8/node_modules/typebox/build/type/engine/patterns/template.mjs
|
|
4082
4105
|
function ParseTemplateIntoTypes(template) {
|
|
4083
|
-
const
|
|
4084
|
-
const result = guard_exports.IsEqual(
|
|
4106
|
+
const parsed2 = TemplateLiteralTypes(`\`${template}\``);
|
|
4107
|
+
const result = guard_exports.IsEqual(parsed2.length, 2) ? parsed2[0] : Unreachable();
|
|
4085
4108
|
return result;
|
|
4086
4109
|
}
|
|
4087
4110
|
var init_template = __esm({
|
|
@@ -7809,8 +7832,8 @@ function Script2(...args) {
|
|
|
7809
7832
|
1: (script) => [{}, script, {}]
|
|
7810
7833
|
});
|
|
7811
7834
|
const result = Script(input);
|
|
7812
|
-
const
|
|
7813
|
-
return memory_exports.Update(
|
|
7835
|
+
const parsed2 = guard_exports.IsArray(result) && guard_exports.IsEqual(result.length, 2) ? InstantiateType(context2, State([], []), result[0]) : Never();
|
|
7836
|
+
return memory_exports.Update(parsed2, {}, options);
|
|
7814
7837
|
}
|
|
7815
7838
|
var init_script = __esm({
|
|
7816
7839
|
"node_modules/.pnpm/typebox@1.3.8/node_modules/typebox/build/type/script/script.mjs"() {
|
|
@@ -8224,7 +8247,7 @@ var init_compliance_transport = __esm({
|
|
|
8224
8247
|
|
|
8225
8248
|
// src/role-run-relocation.ts
|
|
8226
8249
|
import { existsSync } from "node:fs";
|
|
8227
|
-
import { readdir, readFile as readFile2, writeFile } from "node:fs/promises";
|
|
8250
|
+
import { readdir as readdir2, readFile as readFile2, writeFile } from "node:fs/promises";
|
|
8228
8251
|
import { join as join4, sep as sep2 } from "node:path";
|
|
8229
8252
|
function isEnoent2(error51) {
|
|
8230
8253
|
return error51 instanceof Error && "code" in error51 && error51.code === "ENOENT";
|
|
@@ -8307,6 +8330,24 @@ function rewriteSummonsMaterials(value2, rewrites) {
|
|
|
8307
8330
|
);
|
|
8308
8331
|
}
|
|
8309
8332
|
}
|
|
8333
|
+
function rewriteAdmittedRoleRunPage(page, rewrites) {
|
|
8334
|
+
rewriteRunDirectoryPathFieldsAgainstRewrites(page, ADMITTED_PAGE_FIELDS, rewrites);
|
|
8335
|
+
rewriteSourceRunLocator(page.sourceRun, rewrites);
|
|
8336
|
+
if (Array.isArray(page.attachments)) {
|
|
8337
|
+
for (const attachment of page.attachments) {
|
|
8338
|
+
if (isPlainObject(attachment)) {
|
|
8339
|
+
rewriteRunDirectoryPathFieldsAgainstRewrites(attachment, ["frozenPath"], rewrites);
|
|
8340
|
+
}
|
|
8341
|
+
}
|
|
8342
|
+
}
|
|
8343
|
+
if (isPlainObject(page.principal)) {
|
|
8344
|
+
rewriteRunDirectoryPathFieldsAgainstRewrites(
|
|
8345
|
+
page.principal,
|
|
8346
|
+
["sessionDirectory", "sessionFile"],
|
|
8347
|
+
rewrites
|
|
8348
|
+
);
|
|
8349
|
+
}
|
|
8350
|
+
}
|
|
8310
8351
|
async function rewriteJsonObjectFile(path7, fields, rewrites) {
|
|
8311
8352
|
if (!existsSync(path7)) return;
|
|
8312
8353
|
const page = JSON.parse(await readFile2(path7, "utf8"));
|
|
@@ -8346,29 +8387,29 @@ async function rewriteSitianRecordsJsonl(path7, rewrites) {
|
|
|
8346
8387
|
out.push(line);
|
|
8347
8388
|
continue;
|
|
8348
8389
|
}
|
|
8349
|
-
let
|
|
8390
|
+
let parsed2;
|
|
8350
8391
|
try {
|
|
8351
|
-
|
|
8392
|
+
parsed2 = JSON.parse(line);
|
|
8352
8393
|
} catch {
|
|
8353
8394
|
out.push(line);
|
|
8354
8395
|
continue;
|
|
8355
8396
|
}
|
|
8356
|
-
if (!isPlainObject(
|
|
8397
|
+
if (!isPlainObject(parsed2)) {
|
|
8357
8398
|
out.push(line);
|
|
8358
8399
|
continue;
|
|
8359
8400
|
}
|
|
8360
|
-
if (!("sessionParent" in
|
|
8401
|
+
if (!("sessionParent" in parsed2)) {
|
|
8361
8402
|
out.push(line);
|
|
8362
8403
|
continue;
|
|
8363
8404
|
}
|
|
8364
|
-
const before =
|
|
8405
|
+
const before = parsed2.sessionParent;
|
|
8365
8406
|
rewriteRunDirectoryPathFieldsAgainstRewrites(
|
|
8366
|
-
|
|
8407
|
+
parsed2,
|
|
8367
8408
|
SITIAN_RECORD_FIELDS,
|
|
8368
8409
|
rewrites
|
|
8369
8410
|
);
|
|
8370
|
-
if (
|
|
8371
|
-
out.push(JSON.stringify(
|
|
8411
|
+
if (parsed2.sessionParent !== before) changed = true;
|
|
8412
|
+
out.push(JSON.stringify(parsed2));
|
|
8372
8413
|
}
|
|
8373
8414
|
if (!changed) return;
|
|
8374
8415
|
const body = out.join("\n");
|
|
@@ -8397,28 +8438,28 @@ async function rewriteSessionTranscriptBindings(path7, rewrites) {
|
|
|
8397
8438
|
out.push(line);
|
|
8398
8439
|
continue;
|
|
8399
8440
|
}
|
|
8400
|
-
let
|
|
8441
|
+
let parsed2;
|
|
8401
8442
|
try {
|
|
8402
|
-
|
|
8443
|
+
parsed2 = JSON.parse(line);
|
|
8403
8444
|
} catch {
|
|
8404
8445
|
out.push(line);
|
|
8405
8446
|
continue;
|
|
8406
8447
|
}
|
|
8407
|
-
if (!isPlainObject(
|
|
8448
|
+
if (!isPlainObject(parsed2)) {
|
|
8408
8449
|
out.push(line);
|
|
8409
8450
|
continue;
|
|
8410
8451
|
}
|
|
8411
8452
|
let lineChanged = false;
|
|
8412
|
-
if (
|
|
8413
|
-
const before =
|
|
8453
|
+
if (parsed2.type === "session" && "parentSession" in parsed2) {
|
|
8454
|
+
const before = parsed2.parentSession;
|
|
8414
8455
|
rewriteRunDirectoryPathFieldsAgainstRewrites(
|
|
8415
|
-
|
|
8456
|
+
parsed2,
|
|
8416
8457
|
SESSION_HEADER_FIELDS,
|
|
8417
8458
|
rewrites
|
|
8418
8459
|
);
|
|
8419
|
-
if (
|
|
8420
|
-
} else if (
|
|
8421
|
-
const parent =
|
|
8460
|
+
if (parsed2.parentSession !== before) lineChanged = true;
|
|
8461
|
+
} else if (parsed2.type === "custom" && parsed2.customType === AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE && isPlainObject(parsed2.data) && isPlainObject(parsed2.data.parent)) {
|
|
8462
|
+
const parent = parsed2.data.parent;
|
|
8422
8463
|
const before = parent.sessionFile;
|
|
8423
8464
|
rewriteRunDirectoryPathFieldsAgainstRewrites(
|
|
8424
8465
|
parent,
|
|
@@ -8428,7 +8469,7 @@ async function rewriteSessionTranscriptBindings(path7, rewrites) {
|
|
|
8428
8469
|
if (parent.sessionFile !== before) lineChanged = true;
|
|
8429
8470
|
}
|
|
8430
8471
|
if (lineChanged) changed = true;
|
|
8431
|
-
out.push(lineChanged ? JSON.stringify(
|
|
8472
|
+
out.push(lineChanged ? JSON.stringify(parsed2) : line);
|
|
8432
8473
|
}
|
|
8433
8474
|
if (!changed) return;
|
|
8434
8475
|
const body = out.join("\n");
|
|
@@ -8444,7 +8485,7 @@ async function rewriteNestedMachinePathPages(pagesDirectory, rewrites) {
|
|
|
8444
8485
|
async function walk(directory) {
|
|
8445
8486
|
let entries;
|
|
8446
8487
|
try {
|
|
8447
|
-
entries = await
|
|
8488
|
+
entries = await readdir2(directory, { withFileTypes: true });
|
|
8448
8489
|
} catch (error51) {
|
|
8449
8490
|
if (isEnoent2(error51)) return;
|
|
8450
8491
|
throw error51;
|
|
@@ -8475,30 +8516,7 @@ async function rewriteRoleRunDurablePages(input) {
|
|
|
8475
8516
|
const admittedPath = join4(pagesDirectory, "admitted-request.json");
|
|
8476
8517
|
if (existsSync(admittedPath)) {
|
|
8477
8518
|
const page = JSON.parse(await readFile2(admittedPath, "utf8"));
|
|
8478
|
-
|
|
8479
|
-
page,
|
|
8480
|
-
ADMITTED_PAGE_FIELDS,
|
|
8481
|
-
rewrites
|
|
8482
|
-
);
|
|
8483
|
-
rewriteSourceRunLocator(page.sourceRun, rewrites);
|
|
8484
|
-
if (Array.isArray(page.attachments)) {
|
|
8485
|
-
for (const attachment of page.attachments) {
|
|
8486
|
-
if (isPlainObject(attachment)) {
|
|
8487
|
-
rewriteRunDirectoryPathFieldsAgainstRewrites(
|
|
8488
|
-
attachment,
|
|
8489
|
-
["frozenPath"],
|
|
8490
|
-
rewrites
|
|
8491
|
-
);
|
|
8492
|
-
}
|
|
8493
|
-
}
|
|
8494
|
-
}
|
|
8495
|
-
if (isPlainObject(page.principal)) {
|
|
8496
|
-
rewriteRunDirectoryPathFieldsAgainstRewrites(
|
|
8497
|
-
page.principal,
|
|
8498
|
-
["sessionDirectory", "sessionFile"],
|
|
8499
|
-
rewrites
|
|
8500
|
-
);
|
|
8501
|
-
}
|
|
8519
|
+
rewriteAdmittedRoleRunPage(page, rewrites);
|
|
8502
8520
|
await writeFile(admittedPath, `${JSON.stringify(page, null, 2)}
|
|
8503
8521
|
`, "utf8");
|
|
8504
8522
|
}
|
|
@@ -8578,6 +8596,20 @@ var init_role_run_relocation = __esm({
|
|
|
8578
8596
|
}
|
|
8579
8597
|
});
|
|
8580
8598
|
|
|
8599
|
+
// src/package-resources/engine-material.ts
|
|
8600
|
+
var init_engine_material = __esm({
|
|
8601
|
+
"src/package-resources/engine-material.ts"() {
|
|
8602
|
+
"use strict";
|
|
8603
|
+
}
|
|
8604
|
+
});
|
|
8605
|
+
|
|
8606
|
+
// src/activation-ledger-git.ts
|
|
8607
|
+
var init_activation_ledger_git = __esm({
|
|
8608
|
+
"src/activation-ledger-git.ts"() {
|
|
8609
|
+
"use strict";
|
|
8610
|
+
}
|
|
8611
|
+
});
|
|
8612
|
+
|
|
8581
8613
|
// src/sha256.ts
|
|
8582
8614
|
var init_sha256 = __esm({
|
|
8583
8615
|
"src/sha256.ts"() {
|
|
@@ -14962,7 +14994,7 @@ var init_invocation = __esm({
|
|
|
14962
14994
|
});
|
|
14963
14995
|
|
|
14964
14996
|
// src/public-cli/run-lifecycle.ts
|
|
14965
|
-
import { chmod, lstat, open, readdir as
|
|
14997
|
+
import { chmod, lstat, open, readdir as readdir3, readFile as readFile3, unlink, writeFile as writeFile2 } from "node:fs/promises";
|
|
14966
14998
|
function describeErrorIdentity(error51) {
|
|
14967
14999
|
const candidate = error51;
|
|
14968
15000
|
const name = typeof candidate?.name === "string" && candidate.name !== "" ? candidate.name : typeof error51;
|
|
@@ -15010,6 +15042,7 @@ var init_run_lifecycle = __esm({
|
|
|
15010
15042
|
init_typed_provider_http();
|
|
15011
15043
|
init_collector_config();
|
|
15012
15044
|
init_diarist_contracts();
|
|
15045
|
+
init_role_run_relocation();
|
|
15013
15046
|
init_engine_material();
|
|
15014
15047
|
init_invocation();
|
|
15015
15048
|
}
|
|
@@ -15263,20 +15296,20 @@ var require_resolveCommand = __commonJS({
|
|
|
15263
15296
|
var path7 = __require("path");
|
|
15264
15297
|
var which = require_which();
|
|
15265
15298
|
var getPathKey = require_path_key();
|
|
15266
|
-
function resolveCommandAttempt(
|
|
15267
|
-
const env2 =
|
|
15299
|
+
function resolveCommandAttempt(parsed2, withoutPathExt) {
|
|
15300
|
+
const env2 = parsed2.options.env || process.env;
|
|
15268
15301
|
const cwd = process.cwd();
|
|
15269
|
-
const hasCustomCwd =
|
|
15302
|
+
const hasCustomCwd = parsed2.options.cwd != null;
|
|
15270
15303
|
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
15271
15304
|
if (shouldSwitchCwd) {
|
|
15272
15305
|
try {
|
|
15273
|
-
process.chdir(
|
|
15306
|
+
process.chdir(parsed2.options.cwd);
|
|
15274
15307
|
} catch (err2) {
|
|
15275
15308
|
}
|
|
15276
15309
|
}
|
|
15277
15310
|
let resolved;
|
|
15278
15311
|
try {
|
|
15279
|
-
resolved = which.sync(
|
|
15312
|
+
resolved = which.sync(parsed2.command, {
|
|
15280
15313
|
path: env2[getPathKey({ env: env2 })],
|
|
15281
15314
|
pathExt: withoutPathExt ? path7.delimiter : void 0
|
|
15282
15315
|
});
|
|
@@ -15287,12 +15320,12 @@ var require_resolveCommand = __commonJS({
|
|
|
15287
15320
|
}
|
|
15288
15321
|
}
|
|
15289
15322
|
if (resolved) {
|
|
15290
|
-
resolved = path7.resolve(hasCustomCwd ?
|
|
15323
|
+
resolved = path7.resolve(hasCustomCwd ? parsed2.options.cwd : "", resolved);
|
|
15291
15324
|
}
|
|
15292
15325
|
return resolved;
|
|
15293
15326
|
}
|
|
15294
|
-
function resolveCommand(
|
|
15295
|
-
return resolveCommandAttempt(
|
|
15327
|
+
function resolveCommand(parsed2) {
|
|
15328
|
+
return resolveCommandAttempt(parsed2) || resolveCommandAttempt(parsed2, true);
|
|
15296
15329
|
}
|
|
15297
15330
|
module.exports = resolveCommand;
|
|
15298
15331
|
}
|
|
@@ -15384,33 +15417,33 @@ var require_parse = __commonJS({
|
|
|
15384
15417
|
var isWin = process.platform === "win32";
|
|
15385
15418
|
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
15386
15419
|
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
15387
|
-
function detectShebang(
|
|
15388
|
-
|
|
15389
|
-
const shebang =
|
|
15420
|
+
function detectShebang(parsed2) {
|
|
15421
|
+
parsed2.file = resolveCommand(parsed2);
|
|
15422
|
+
const shebang = parsed2.file && readShebang(parsed2.file);
|
|
15390
15423
|
if (shebang) {
|
|
15391
|
-
|
|
15392
|
-
|
|
15393
|
-
return resolveCommand(
|
|
15424
|
+
parsed2.args.unshift(parsed2.file);
|
|
15425
|
+
parsed2.command = shebang;
|
|
15426
|
+
return resolveCommand(parsed2);
|
|
15394
15427
|
}
|
|
15395
|
-
return
|
|
15428
|
+
return parsed2.file;
|
|
15396
15429
|
}
|
|
15397
|
-
function parseNonShell(
|
|
15430
|
+
function parseNonShell(parsed2) {
|
|
15398
15431
|
if (!isWin) {
|
|
15399
|
-
return
|
|
15432
|
+
return parsed2;
|
|
15400
15433
|
}
|
|
15401
|
-
const commandFile = detectShebang(
|
|
15434
|
+
const commandFile = detectShebang(parsed2);
|
|
15402
15435
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
15403
|
-
if (
|
|
15436
|
+
if (parsed2.options.forceShell || needsShell) {
|
|
15404
15437
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
15405
|
-
|
|
15406
|
-
|
|
15407
|
-
|
|
15408
|
-
const shellCommand = [
|
|
15409
|
-
|
|
15410
|
-
|
|
15411
|
-
|
|
15438
|
+
parsed2.command = path7.normalize(parsed2.command);
|
|
15439
|
+
parsed2.command = escape3.command(parsed2.command);
|
|
15440
|
+
parsed2.args = parsed2.args.map((arg) => escape3.argument(arg, needsDoubleEscapeMetaChars));
|
|
15441
|
+
const shellCommand = [parsed2.command].concat(parsed2.args).join(" ");
|
|
15442
|
+
parsed2.args = ["/d", "/s", "/c", `"${shellCommand}"`];
|
|
15443
|
+
parsed2.command = process.env.comspec || "cmd.exe";
|
|
15444
|
+
parsed2.options.windowsVerbatimArguments = true;
|
|
15412
15445
|
}
|
|
15413
|
-
return
|
|
15446
|
+
return parsed2;
|
|
15414
15447
|
}
|
|
15415
15448
|
function parse6(command, args, options) {
|
|
15416
15449
|
if (args && !Array.isArray(args)) {
|
|
@@ -15419,7 +15452,7 @@ var require_parse = __commonJS({
|
|
|
15419
15452
|
}
|
|
15420
15453
|
args = args ? args.slice(0) : [];
|
|
15421
15454
|
options = Object.assign({}, options);
|
|
15422
|
-
const
|
|
15455
|
+
const parsed2 = {
|
|
15423
15456
|
command,
|
|
15424
15457
|
args,
|
|
15425
15458
|
options,
|
|
@@ -15429,7 +15462,7 @@ var require_parse = __commonJS({
|
|
|
15429
15462
|
args
|
|
15430
15463
|
}
|
|
15431
15464
|
};
|
|
15432
|
-
return options.shell ?
|
|
15465
|
+
return options.shell ? parsed2 : parseNonShell(parsed2);
|
|
15433
15466
|
}
|
|
15434
15467
|
module.exports = parse6;
|
|
15435
15468
|
}
|
|
@@ -15449,14 +15482,14 @@ var require_enoent = __commonJS({
|
|
|
15449
15482
|
spawnargs: original.args
|
|
15450
15483
|
});
|
|
15451
15484
|
}
|
|
15452
|
-
function hookChildProcess(cp4,
|
|
15485
|
+
function hookChildProcess(cp4, parsed2) {
|
|
15453
15486
|
if (!isWin) {
|
|
15454
15487
|
return;
|
|
15455
15488
|
}
|
|
15456
15489
|
const originalEmit = cp4.emit;
|
|
15457
15490
|
cp4.emit = function(name, arg1) {
|
|
15458
15491
|
if (name === "exit") {
|
|
15459
|
-
const err2 = verifyENOENT(arg1,
|
|
15492
|
+
const err2 = verifyENOENT(arg1, parsed2);
|
|
15460
15493
|
if (err2) {
|
|
15461
15494
|
return originalEmit.call(cp4, "error", err2);
|
|
15462
15495
|
}
|
|
@@ -15464,15 +15497,15 @@ var require_enoent = __commonJS({
|
|
|
15464
15497
|
return originalEmit.apply(cp4, arguments);
|
|
15465
15498
|
};
|
|
15466
15499
|
}
|
|
15467
|
-
function verifyENOENT(status,
|
|
15468
|
-
if (isWin && status === 1 && !
|
|
15469
|
-
return notFoundError(
|
|
15500
|
+
function verifyENOENT(status, parsed2) {
|
|
15501
|
+
if (isWin && status === 1 && !parsed2.file) {
|
|
15502
|
+
return notFoundError(parsed2.original, "spawn");
|
|
15470
15503
|
}
|
|
15471
15504
|
return null;
|
|
15472
15505
|
}
|
|
15473
|
-
function verifyENOENTSync(status,
|
|
15474
|
-
if (isWin && status === 1 && !
|
|
15475
|
-
return notFoundError(
|
|
15506
|
+
function verifyENOENTSync(status, parsed2) {
|
|
15507
|
+
if (isWin && status === 1 && !parsed2.file) {
|
|
15508
|
+
return notFoundError(parsed2.original, "spawnSync");
|
|
15476
15509
|
}
|
|
15477
15510
|
return null;
|
|
15478
15511
|
}
|
|
@@ -15493,15 +15526,15 @@ var require_cross_spawn = __commonJS({
|
|
|
15493
15526
|
var parse6 = require_parse();
|
|
15494
15527
|
var enoent = require_enoent();
|
|
15495
15528
|
function spawn(command, args, options) {
|
|
15496
|
-
const
|
|
15497
|
-
const spawned = cp4.spawn(
|
|
15498
|
-
enoent.hookChildProcess(spawned,
|
|
15529
|
+
const parsed2 = parse6(command, args, options);
|
|
15530
|
+
const spawned = cp4.spawn(parsed2.command, parsed2.args, parsed2.options);
|
|
15531
|
+
enoent.hookChildProcess(spawned, parsed2);
|
|
15499
15532
|
return spawned;
|
|
15500
15533
|
}
|
|
15501
15534
|
function spawnSync(command, args, options) {
|
|
15502
|
-
const
|
|
15503
|
-
const result = cp4.spawnSync(
|
|
15504
|
-
result.error = result.error || enoent.verifyENOENTSync(result.status,
|
|
15535
|
+
const parsed2 = parse6(command, args, options);
|
|
15536
|
+
const result = cp4.spawnSync(parsed2.command, parsed2.args, parsed2.options);
|
|
15537
|
+
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed2);
|
|
15505
15538
|
return result;
|
|
15506
15539
|
}
|
|
15507
15540
|
module.exports = spawn;
|
|
@@ -27629,15 +27662,15 @@ var init_AbstractChatCompletionRunner = __esm({
|
|
|
27629
27662
|
this._addMessage({ role, tool_call_id, content: content2 });
|
|
27630
27663
|
continue;
|
|
27631
27664
|
}
|
|
27632
|
-
let
|
|
27665
|
+
let parsed2;
|
|
27633
27666
|
try {
|
|
27634
|
-
|
|
27667
|
+
parsed2 = isRunnableFunctionWithParse(fn) ? await fn.parse(args) : args;
|
|
27635
27668
|
} catch (error51) {
|
|
27636
27669
|
const content2 = error51 instanceof Error ? error51.message : String(error51);
|
|
27637
27670
|
this._addMessage({ role, tool_call_id, content: content2 });
|
|
27638
27671
|
continue;
|
|
27639
27672
|
}
|
|
27640
|
-
const rawContent = await fn.function(
|
|
27673
|
+
const rawContent = await fn.function(parsed2, this);
|
|
27641
27674
|
const content = __classPrivateFieldGet4(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent);
|
|
27642
27675
|
this._addMessage({ role, tool_call_id, content });
|
|
27643
27676
|
if (singleFunctionToCall) {
|
|
@@ -31262,14 +31295,14 @@ function parseResponse(response, params) {
|
|
|
31262
31295
|
}
|
|
31263
31296
|
return item;
|
|
31264
31297
|
});
|
|
31265
|
-
const
|
|
31298
|
+
const parsed2 = Object.assign({}, response, { output });
|
|
31266
31299
|
if (!Object.getOwnPropertyDescriptor(response, "output_text")) {
|
|
31267
|
-
addOutputText(
|
|
31300
|
+
addOutputText(parsed2);
|
|
31268
31301
|
}
|
|
31269
|
-
Object.defineProperty(
|
|
31302
|
+
Object.defineProperty(parsed2, "output_parsed", {
|
|
31270
31303
|
enumerable: true,
|
|
31271
31304
|
get() {
|
|
31272
|
-
for (const output2 of
|
|
31305
|
+
for (const output2 of parsed2.output) {
|
|
31273
31306
|
if (output2.type !== "message") {
|
|
31274
31307
|
continue;
|
|
31275
31308
|
}
|
|
@@ -31282,7 +31315,7 @@ function parseResponse(response, params) {
|
|
|
31282
31315
|
return null;
|
|
31283
31316
|
}
|
|
31284
31317
|
});
|
|
31285
|
-
return
|
|
31318
|
+
return parsed2;
|
|
31286
31319
|
}
|
|
31287
31320
|
function parseTextFormat(params, content) {
|
|
31288
31321
|
if (params.text?.format?.type !== "json_schema") {
|
|
@@ -33334,12 +33367,12 @@ function parseTextSignature(signature) {
|
|
|
33334
33367
|
return void 0;
|
|
33335
33368
|
if (signature.startsWith("{")) {
|
|
33336
33369
|
try {
|
|
33337
|
-
const
|
|
33338
|
-
if (
|
|
33339
|
-
if (
|
|
33340
|
-
return { id:
|
|
33370
|
+
const parsed2 = JSON.parse(signature);
|
|
33371
|
+
if (parsed2.v === 1 && typeof parsed2.id === "string") {
|
|
33372
|
+
if (parsed2.phase === "commentary" || parsed2.phase === "final_answer") {
|
|
33373
|
+
return { id: parsed2.id, phase: parsed2.phase };
|
|
33341
33374
|
}
|
|
33342
|
-
return { id:
|
|
33375
|
+
return { id: parsed2.id };
|
|
33343
33376
|
}
|
|
33344
33377
|
} catch {
|
|
33345
33378
|
}
|
|
@@ -97591,9 +97624,9 @@ function better(a, b2) {
|
|
|
97591
97624
|
}
|
|
97592
97625
|
return a.inexactCount < b2.inexactCount ? a : b2;
|
|
97593
97626
|
}
|
|
97594
|
-
function countFieldsRecursive(
|
|
97627
|
+
function countFieldsRecursive(parsed2) {
|
|
97595
97628
|
let fieldCount = 0;
|
|
97596
|
-
const queue = [
|
|
97629
|
+
const queue = [parsed2];
|
|
97597
97630
|
let index3 = 0;
|
|
97598
97631
|
while (index3 < queue.length) {
|
|
97599
97632
|
const value2 = queue[index3++];
|
|
@@ -98083,11 +98116,11 @@ var init_completionchunk = __esm({
|
|
|
98083
98116
|
|
|
98084
98117
|
// node_modules/.pnpm/@mistralai+mistralai@2.2.6_@opentelemetry+api@1.9.0/node_modules/@mistralai/mistralai/esm/extra/observability/streaming.js
|
|
98085
98118
|
function normalizeCompletionChunkPayload(payload) {
|
|
98086
|
-
const
|
|
98087
|
-
if (typeof
|
|
98119
|
+
const parsed2 = JSON.parse(payload);
|
|
98120
|
+
if (typeof parsed2 !== "object" || parsed2 === null || Array.isArray(parsed2)) {
|
|
98088
98121
|
return payload;
|
|
98089
98122
|
}
|
|
98090
|
-
const chunk =
|
|
98123
|
+
const chunk = parsed2;
|
|
98091
98124
|
for (const field of ["object", "created", "usage"]) {
|
|
98092
98125
|
if (chunk[field] === null) {
|
|
98093
98126
|
delete chunk[field];
|
|
@@ -113895,11 +113928,11 @@ function agentsComplete(client, request, options) {
|
|
|
113895
113928
|
return new APIPromise4($do(client, request, options));
|
|
113896
113929
|
}
|
|
113897
113930
|
async function $do(client, request, options) {
|
|
113898
|
-
const
|
|
113899
|
-
if (!
|
|
113900
|
-
return [
|
|
113931
|
+
const parsed2 = safeParse3(request, (value2) => AgentsCompletionRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
113932
|
+
if (!parsed2.ok) {
|
|
113933
|
+
return [parsed2, { status: "invalid" }];
|
|
113901
113934
|
}
|
|
113902
|
-
const payload =
|
|
113935
|
+
const payload = parsed2.value;
|
|
113903
113936
|
const body = encodeJSON("body", payload, { explode: true });
|
|
113904
113937
|
const path7 = pathToFunc("/v1/agents/completions")();
|
|
113905
113938
|
const headers = new Headers(compactMap({
|
|
@@ -114129,11 +114162,11 @@ function agentsStream(client, request, options) {
|
|
|
114129
114162
|
return new APIPromise4($do2(client, request, options));
|
|
114130
114163
|
}
|
|
114131
114164
|
async function $do2(client, request, options) {
|
|
114132
|
-
const
|
|
114133
|
-
if (!
|
|
114134
|
-
return [
|
|
114165
|
+
const parsed2 = safeParse3(request, (value2) => AgentsCompletionStreamRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
114166
|
+
if (!parsed2.ok) {
|
|
114167
|
+
return [parsed2, { status: "invalid" }];
|
|
114135
114168
|
}
|
|
114136
|
-
const payload =
|
|
114169
|
+
const payload = parsed2.value;
|
|
114137
114170
|
const body = encodeJSON("body", payload, { explode: true });
|
|
114138
114171
|
const path7 = pathToFunc("/v1/agents/completions#stream")();
|
|
114139
114172
|
const headers = new Headers(compactMap({
|
|
@@ -117996,11 +118029,11 @@ function audioSpeechComplete(client, request, options) {
|
|
|
117996
118029
|
return new APIPromise4($do3(client, request, options));
|
|
117997
118030
|
}
|
|
117998
118031
|
async function $do3(client, request, options) {
|
|
117999
|
-
const
|
|
118000
|
-
if (!
|
|
118001
|
-
return [
|
|
118032
|
+
const parsed2 = safeParse3(request, (value2) => SpeechRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
118033
|
+
if (!parsed2.ok) {
|
|
118034
|
+
return [parsed2, { status: "invalid" }];
|
|
118002
118035
|
}
|
|
118003
|
-
const payload =
|
|
118036
|
+
const payload = parsed2.value;
|
|
118004
118037
|
const body = encodeJSON("body", payload, { explode: true });
|
|
118005
118038
|
const path7 = pathToFunc("/v1/audio/speech")();
|
|
118006
118039
|
const headers = new Headers(compactMap({
|
|
@@ -118107,11 +118140,11 @@ function audioTranscriptionsComplete(client, request, options) {
|
|
|
118107
118140
|
return new APIPromise4($do4(client, request, options));
|
|
118108
118141
|
}
|
|
118109
118142
|
async function $do4(client, request, options) {
|
|
118110
|
-
const
|
|
118111
|
-
if (!
|
|
118112
|
-
return [
|
|
118143
|
+
const parsed2 = safeParse3(request, (value2) => AudioTranscriptionRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
118144
|
+
if (!parsed2.ok) {
|
|
118145
|
+
return [parsed2, { status: "invalid" }];
|
|
118113
118146
|
}
|
|
118114
|
-
const payload =
|
|
118147
|
+
const payload = parsed2.value;
|
|
118115
118148
|
const body = new FormData();
|
|
118116
118149
|
appendForm(body, "model", payload.model);
|
|
118117
118150
|
if (payload.context_bias !== void 0) {
|
|
@@ -118222,11 +118255,11 @@ function audioTranscriptionsStream(client, request, options) {
|
|
|
118222
118255
|
return new APIPromise4($do5(client, request, options));
|
|
118223
118256
|
}
|
|
118224
118257
|
async function $do5(client, request, options) {
|
|
118225
|
-
const
|
|
118226
|
-
if (!
|
|
118227
|
-
return [
|
|
118258
|
+
const parsed2 = safeParse3(request, (value2) => AudioTranscriptionRequestStream$outboundSchema.parse(value2), "Input validation failed");
|
|
118259
|
+
if (!parsed2.ok) {
|
|
118260
|
+
return [parsed2, { status: "invalid" }];
|
|
118228
118261
|
}
|
|
118229
|
-
const payload =
|
|
118262
|
+
const payload = parsed2.value;
|
|
118230
118263
|
const body = new FormData();
|
|
118231
118264
|
appendForm(body, "model", payload.model);
|
|
118232
118265
|
if (payload.context_bias !== void 0) {
|
|
@@ -118371,11 +118404,11 @@ function audioVoicesCreate(client, request, options) {
|
|
|
118371
118404
|
return new APIPromise4($do6(client, request, options));
|
|
118372
118405
|
}
|
|
118373
118406
|
async function $do6(client, request, options) {
|
|
118374
|
-
const
|
|
118375
|
-
if (!
|
|
118376
|
-
return [
|
|
118407
|
+
const parsed2 = safeParse3(request, (value2) => VoiceCreateRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
118408
|
+
if (!parsed2.ok) {
|
|
118409
|
+
return [parsed2, { status: "invalid" }];
|
|
118377
118410
|
}
|
|
118378
|
-
const payload =
|
|
118411
|
+
const payload = parsed2.value;
|
|
118379
118412
|
const body = encodeJSON("body", payload, { explode: true });
|
|
118380
118413
|
const path7 = pathToFunc("/v1/audio/voices")();
|
|
118381
118414
|
const headers = new Headers(compactMap({
|
|
@@ -118448,11 +118481,11 @@ function audioVoicesDelete(client, request, options) {
|
|
|
118448
118481
|
return new APIPromise4($do7(client, request, options));
|
|
118449
118482
|
}
|
|
118450
118483
|
async function $do7(client, request, options) {
|
|
118451
|
-
const
|
|
118452
|
-
if (!
|
|
118453
|
-
return [
|
|
118484
|
+
const parsed2 = safeParse3(request, (value2) => DeleteVoiceV1AudioVoicesVoiceIdDeleteRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
118485
|
+
if (!parsed2.ok) {
|
|
118486
|
+
return [parsed2, { status: "invalid" }];
|
|
118454
118487
|
}
|
|
118455
|
-
const payload =
|
|
118488
|
+
const payload = parsed2.value;
|
|
118456
118489
|
const body = null;
|
|
118457
118490
|
const pathParams = {
|
|
118458
118491
|
voice_id: encodeSimple("voice_id", payload.voice_id, {
|
|
@@ -118531,11 +118564,11 @@ function audioVoicesGet(client, request, options) {
|
|
|
118531
118564
|
return new APIPromise4($do8(client, request, options));
|
|
118532
118565
|
}
|
|
118533
118566
|
async function $do8(client, request, options) {
|
|
118534
|
-
const
|
|
118535
|
-
if (!
|
|
118536
|
-
return [
|
|
118567
|
+
const parsed2 = safeParse3(request, (value2) => GetVoiceV1AudioVoicesVoiceIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
118568
|
+
if (!parsed2.ok) {
|
|
118569
|
+
return [parsed2, { status: "invalid" }];
|
|
118537
118570
|
}
|
|
118538
|
-
const payload =
|
|
118571
|
+
const payload = parsed2.value;
|
|
118539
118572
|
const body = null;
|
|
118540
118573
|
const pathParams = {
|
|
118541
118574
|
voice_id: encodeSimple("voice_id", payload.voice_id, {
|
|
@@ -118614,11 +118647,11 @@ function audioVoicesGetSampleAudio(client, request, options) {
|
|
|
118614
118647
|
return new APIPromise4($do9(client, request, options));
|
|
118615
118648
|
}
|
|
118616
118649
|
async function $do9(client, request, options) {
|
|
118617
|
-
const
|
|
118618
|
-
if (!
|
|
118619
|
-
return [
|
|
118650
|
+
const parsed2 = safeParse3(request, (value2) => GetVoiceSampleAudioV1AudioVoicesVoiceIdSampleGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
118651
|
+
if (!parsed2.ok) {
|
|
118652
|
+
return [parsed2, { status: "invalid" }];
|
|
118620
118653
|
}
|
|
118621
|
-
const payload =
|
|
118654
|
+
const payload = parsed2.value;
|
|
118622
118655
|
const body = null;
|
|
118623
118656
|
const pathParams = {
|
|
118624
118657
|
voice_id: encodeSimple("voice_id", payload.voice_id, {
|
|
@@ -118697,11 +118730,11 @@ function audioVoicesList(client, request, options) {
|
|
|
118697
118730
|
return new APIPromise4($do10(client, request, options));
|
|
118698
118731
|
}
|
|
118699
118732
|
async function $do10(client, request, options) {
|
|
118700
|
-
const
|
|
118701
|
-
if (!
|
|
118702
|
-
return [
|
|
118733
|
+
const parsed2 = safeParse3(request, (value2) => ListVoicesV1AudioVoicesGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
118734
|
+
if (!parsed2.ok) {
|
|
118735
|
+
return [parsed2, { status: "invalid" }];
|
|
118703
118736
|
}
|
|
118704
|
-
const payload =
|
|
118737
|
+
const payload = parsed2.value;
|
|
118705
118738
|
const body = null;
|
|
118706
118739
|
const path7 = pathToFunc("/v1/audio/voices")();
|
|
118707
118740
|
const query = encodeFormQuery({
|
|
@@ -118780,11 +118813,11 @@ function audioVoicesUpdate(client, request, options) {
|
|
|
118780
118813
|
return new APIPromise4($do11(client, request, options));
|
|
118781
118814
|
}
|
|
118782
118815
|
async function $do11(client, request, options) {
|
|
118783
|
-
const
|
|
118784
|
-
if (!
|
|
118785
|
-
return [
|
|
118816
|
+
const parsed2 = safeParse3(request, (value2) => UpdateVoiceV1AudioVoicesVoiceIdPatchRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
118817
|
+
if (!parsed2.ok) {
|
|
118818
|
+
return [parsed2, { status: "invalid" }];
|
|
118786
118819
|
}
|
|
118787
|
-
const payload =
|
|
118820
|
+
const payload = parsed2.value;
|
|
118788
118821
|
const body = encodeJSON("body", payload.VoiceUpdateRequest, {
|
|
118789
118822
|
explode: true
|
|
118790
118823
|
});
|
|
@@ -118962,11 +118995,11 @@ function batchJobsCancel(client, request, options) {
|
|
|
118962
118995
|
return new APIPromise4($do12(client, request, options));
|
|
118963
118996
|
}
|
|
118964
118997
|
async function $do12(client, request, options) {
|
|
118965
|
-
const
|
|
118966
|
-
if (!
|
|
118967
|
-
return [
|
|
118998
|
+
const parsed2 = safeParse3(request, (value2) => JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
118999
|
+
if (!parsed2.ok) {
|
|
119000
|
+
return [parsed2, { status: "invalid" }];
|
|
118968
119001
|
}
|
|
118969
|
-
const payload =
|
|
119002
|
+
const payload = parsed2.value;
|
|
118970
119003
|
const body = null;
|
|
118971
119004
|
const pathParams = {
|
|
118972
119005
|
job_id: encodeSimple("job_id", payload.job_id, {
|
|
@@ -119041,11 +119074,11 @@ function batchJobsCreate(client, request, options) {
|
|
|
119041
119074
|
return new APIPromise4($do13(client, request, options));
|
|
119042
119075
|
}
|
|
119043
119076
|
async function $do13(client, request, options) {
|
|
119044
|
-
const
|
|
119045
|
-
if (!
|
|
119046
|
-
return [
|
|
119077
|
+
const parsed2 = safeParse3(request, (value2) => CreateBatchJobRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
119078
|
+
if (!parsed2.ok) {
|
|
119079
|
+
return [parsed2, { status: "invalid" }];
|
|
119047
119080
|
}
|
|
119048
|
-
const payload =
|
|
119081
|
+
const payload = parsed2.value;
|
|
119049
119082
|
const body = encodeJSON("body", payload, { explode: true });
|
|
119050
119083
|
const path7 = pathToFunc("/v1/batch/jobs")();
|
|
119051
119084
|
const headers = new Headers(compactMap({
|
|
@@ -119114,11 +119147,11 @@ function batchJobsDelete(client, request, options) {
|
|
|
119114
119147
|
return new APIPromise4($do14(client, request, options));
|
|
119115
119148
|
}
|
|
119116
119149
|
async function $do14(client, request, options) {
|
|
119117
|
-
const
|
|
119118
|
-
if (!
|
|
119119
|
-
return [
|
|
119150
|
+
const parsed2 = safeParse3(request, (value2) => JobsApiRoutesBatchDeleteBatchJobRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
119151
|
+
if (!parsed2.ok) {
|
|
119152
|
+
return [parsed2, { status: "invalid" }];
|
|
119120
119153
|
}
|
|
119121
|
-
const payload =
|
|
119154
|
+
const payload = parsed2.value;
|
|
119122
119155
|
const body = null;
|
|
119123
119156
|
const pathParams = {
|
|
119124
119157
|
job_id: encodeSimple("job_id", payload.job_id, {
|
|
@@ -119193,11 +119226,11 @@ function batchJobsGet(client, request, options) {
|
|
|
119193
119226
|
return new APIPromise4($do15(client, request, options));
|
|
119194
119227
|
}
|
|
119195
119228
|
async function $do15(client, request, options) {
|
|
119196
|
-
const
|
|
119197
|
-
if (!
|
|
119198
|
-
return [
|
|
119229
|
+
const parsed2 = safeParse3(request, (value2) => JobsApiRoutesBatchGetBatchJobRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
119230
|
+
if (!parsed2.ok) {
|
|
119231
|
+
return [parsed2, { status: "invalid" }];
|
|
119199
119232
|
}
|
|
119200
|
-
const payload =
|
|
119233
|
+
const payload = parsed2.value;
|
|
119201
119234
|
const body = null;
|
|
119202
119235
|
const pathParams = {
|
|
119203
119236
|
job_id: encodeSimple("job_id", payload.job_id, {
|
|
@@ -119276,11 +119309,11 @@ function batchJobsList(client, request, options) {
|
|
|
119276
119309
|
return new APIPromise4($do16(client, request, options));
|
|
119277
119310
|
}
|
|
119278
119311
|
async function $do16(client, request, options) {
|
|
119279
|
-
const
|
|
119280
|
-
if (!
|
|
119281
|
-
return [
|
|
119312
|
+
const parsed2 = safeParse3(request, (value2) => JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
119313
|
+
if (!parsed2.ok) {
|
|
119314
|
+
return [parsed2, { status: "invalid" }];
|
|
119282
119315
|
}
|
|
119283
|
-
const payload =
|
|
119316
|
+
const payload = parsed2.value;
|
|
119284
119317
|
const body = null;
|
|
119285
119318
|
const path7 = pathToFunc("/v1/batch/jobs")();
|
|
119286
119319
|
const query = encodeFormQuery({
|
|
@@ -119440,11 +119473,11 @@ function betaAgentsCreate(client, request, options) {
|
|
|
119440
119473
|
return new APIPromise4($do17(client, request, options));
|
|
119441
119474
|
}
|
|
119442
119475
|
async function $do17(client, request, options) {
|
|
119443
|
-
const
|
|
119444
|
-
if (!
|
|
119445
|
-
return [
|
|
119476
|
+
const parsed2 = safeParse3(request, (value2) => CreateAgentRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
119477
|
+
if (!parsed2.ok) {
|
|
119478
|
+
return [parsed2, { status: "invalid" }];
|
|
119446
119479
|
}
|
|
119447
|
-
const payload =
|
|
119480
|
+
const payload = parsed2.value;
|
|
119448
119481
|
const body = encodeJSON("body", payload, { explode: true });
|
|
119449
119482
|
const path7 = pathToFunc("/v1/agents")();
|
|
119450
119483
|
const headers = new Headers(compactMap({
|
|
@@ -119517,11 +119550,11 @@ function betaAgentsCreateVersionAlias(client, request, options) {
|
|
|
119517
119550
|
return new APIPromise4($do18(client, request, options));
|
|
119518
119551
|
}
|
|
119519
119552
|
async function $do18(client, request, options) {
|
|
119520
|
-
const
|
|
119521
|
-
if (!
|
|
119522
|
-
return [
|
|
119553
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1AgentsCreateOrUpdateAliasRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
119554
|
+
if (!parsed2.ok) {
|
|
119555
|
+
return [parsed2, { status: "invalid" }];
|
|
119523
119556
|
}
|
|
119524
|
-
const payload =
|
|
119557
|
+
const payload = parsed2.value;
|
|
119525
119558
|
const body = null;
|
|
119526
119559
|
const pathParams = {
|
|
119527
119560
|
agent_id: encodeSimple("agent_id", payload.agent_id, {
|
|
@@ -119605,11 +119638,11 @@ function betaAgentsDelete(client, request, options) {
|
|
|
119605
119638
|
return new APIPromise4($do19(client, request, options));
|
|
119606
119639
|
}
|
|
119607
119640
|
async function $do19(client, request, options) {
|
|
119608
|
-
const
|
|
119609
|
-
if (!
|
|
119610
|
-
return [
|
|
119641
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1AgentsDeleteRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
119642
|
+
if (!parsed2.ok) {
|
|
119643
|
+
return [parsed2, { status: "invalid" }];
|
|
119611
119644
|
}
|
|
119612
|
-
const payload =
|
|
119645
|
+
const payload = parsed2.value;
|
|
119613
119646
|
const body = null;
|
|
119614
119647
|
const pathParams = {
|
|
119615
119648
|
agent_id: encodeSimple("agent_id", payload.agent_id, {
|
|
@@ -119688,11 +119721,11 @@ function betaAgentsDeleteVersionAlias(client, request, options) {
|
|
|
119688
119721
|
return new APIPromise4($do20(client, request, options));
|
|
119689
119722
|
}
|
|
119690
119723
|
async function $do20(client, request, options) {
|
|
119691
|
-
const
|
|
119692
|
-
if (!
|
|
119693
|
-
return [
|
|
119724
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1AgentsDeleteAliasRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
119725
|
+
if (!parsed2.ok) {
|
|
119726
|
+
return [parsed2, { status: "invalid" }];
|
|
119694
119727
|
}
|
|
119695
|
-
const payload =
|
|
119728
|
+
const payload = parsed2.value;
|
|
119696
119729
|
const body = null;
|
|
119697
119730
|
const pathParams = {
|
|
119698
119731
|
agent_id: encodeSimple("agent_id", payload.agent_id, {
|
|
@@ -119775,11 +119808,11 @@ function betaAgentsGet(client, request, options) {
|
|
|
119775
119808
|
return new APIPromise4($do21(client, request, options));
|
|
119776
119809
|
}
|
|
119777
119810
|
async function $do21(client, request, options) {
|
|
119778
|
-
const
|
|
119779
|
-
if (!
|
|
119780
|
-
return [
|
|
119811
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1AgentsGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
119812
|
+
if (!parsed2.ok) {
|
|
119813
|
+
return [parsed2, { status: "invalid" }];
|
|
119781
119814
|
}
|
|
119782
|
-
const payload =
|
|
119815
|
+
const payload = parsed2.value;
|
|
119783
119816
|
const body = null;
|
|
119784
119817
|
const pathParams = {
|
|
119785
119818
|
agent_id: encodeSimple("agent_id", payload.agent_id, {
|
|
@@ -119862,11 +119895,11 @@ function betaAgentsGetVersion(client, request, options) {
|
|
|
119862
119895
|
return new APIPromise4($do22(client, request, options));
|
|
119863
119896
|
}
|
|
119864
119897
|
async function $do22(client, request, options) {
|
|
119865
|
-
const
|
|
119866
|
-
if (!
|
|
119867
|
-
return [
|
|
119898
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1AgentsGetVersionRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
119899
|
+
if (!parsed2.ok) {
|
|
119900
|
+
return [parsed2, { status: "invalid" }];
|
|
119868
119901
|
}
|
|
119869
|
-
const payload =
|
|
119902
|
+
const payload = parsed2.value;
|
|
119870
119903
|
const body = null;
|
|
119871
119904
|
const pathParams = {
|
|
119872
119905
|
agent_id: encodeSimple("agent_id", payload.agent_id, {
|
|
@@ -119949,11 +119982,11 @@ function betaAgentsList(client, request, options) {
|
|
|
119949
119982
|
return new APIPromise4($do23(client, request, options));
|
|
119950
119983
|
}
|
|
119951
119984
|
async function $do23(client, request, options) {
|
|
119952
|
-
const
|
|
119953
|
-
if (!
|
|
119954
|
-
return [
|
|
119985
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1AgentsListRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
119986
|
+
if (!parsed2.ok) {
|
|
119987
|
+
return [parsed2, { status: "invalid" }];
|
|
119955
119988
|
}
|
|
119956
|
-
const payload =
|
|
119989
|
+
const payload = parsed2.value;
|
|
119957
119990
|
const body = null;
|
|
119958
119991
|
const path7 = pathToFunc("/v1/agents")();
|
|
119959
119992
|
const query = queryJoin(encodeFormQuery({
|
|
@@ -120039,11 +120072,11 @@ function betaAgentsListVersionAliases(client, request, options) {
|
|
|
120039
120072
|
return new APIPromise4($do24(client, request, options));
|
|
120040
120073
|
}
|
|
120041
120074
|
async function $do24(client, request, options) {
|
|
120042
|
-
const
|
|
120043
|
-
if (!
|
|
120044
|
-
return [
|
|
120075
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1AgentsListVersionAliasesRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
120076
|
+
if (!parsed2.ok) {
|
|
120077
|
+
return [parsed2, { status: "invalid" }];
|
|
120045
120078
|
}
|
|
120046
|
-
const payload =
|
|
120079
|
+
const payload = parsed2.value;
|
|
120047
120080
|
const body = null;
|
|
120048
120081
|
const pathParams = {
|
|
120049
120082
|
agent_id: encodeSimple("agent_id", payload.agent_id, {
|
|
@@ -120123,11 +120156,11 @@ function betaAgentsListVersions(client, request, options) {
|
|
|
120123
120156
|
return new APIPromise4($do25(client, request, options));
|
|
120124
120157
|
}
|
|
120125
120158
|
async function $do25(client, request, options) {
|
|
120126
|
-
const
|
|
120127
|
-
if (!
|
|
120128
|
-
return [
|
|
120159
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1AgentsListVersionsRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
120160
|
+
if (!parsed2.ok) {
|
|
120161
|
+
return [parsed2, { status: "invalid" }];
|
|
120129
120162
|
}
|
|
120130
|
-
const payload =
|
|
120163
|
+
const payload = parsed2.value;
|
|
120131
120164
|
const body = null;
|
|
120132
120165
|
const pathParams = {
|
|
120133
120166
|
agent_id: encodeSimple("agent_id", payload.agent_id, {
|
|
@@ -120212,11 +120245,11 @@ function betaAgentsUpdate(client, request, options) {
|
|
|
120212
120245
|
return new APIPromise4($do26(client, request, options));
|
|
120213
120246
|
}
|
|
120214
120247
|
async function $do26(client, request, options) {
|
|
120215
|
-
const
|
|
120216
|
-
if (!
|
|
120217
|
-
return [
|
|
120248
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1AgentsUpdateRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
120249
|
+
if (!parsed2.ok) {
|
|
120250
|
+
return [parsed2, { status: "invalid" }];
|
|
120218
120251
|
}
|
|
120219
|
-
const payload =
|
|
120252
|
+
const payload = parsed2.value;
|
|
120220
120253
|
const body = encodeJSON("body", payload.UpdateAgentRequest, {
|
|
120221
120254
|
explode: true
|
|
120222
120255
|
});
|
|
@@ -120298,11 +120331,11 @@ function betaAgentsUpdateVersion(client, request, options) {
|
|
|
120298
120331
|
return new APIPromise4($do27(client, request, options));
|
|
120299
120332
|
}
|
|
120300
120333
|
async function $do27(client, request, options) {
|
|
120301
|
-
const
|
|
120302
|
-
if (!
|
|
120303
|
-
return [
|
|
120334
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1AgentsUpdateVersionRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
120335
|
+
if (!parsed2.ok) {
|
|
120336
|
+
return [parsed2, { status: "invalid" }];
|
|
120304
120337
|
}
|
|
120305
|
-
const payload =
|
|
120338
|
+
const payload = parsed2.value;
|
|
120306
120339
|
const body = null;
|
|
120307
120340
|
const pathParams = {
|
|
120308
120341
|
agent_id: encodeSimple("agent_id", payload.agent_id, {
|
|
@@ -120503,11 +120536,11 @@ function betaConnectorsActivateForOrganization(client, request, options) {
|
|
|
120503
120536
|
return new APIPromise4($do28(client, request, options));
|
|
120504
120537
|
}
|
|
120505
120538
|
async function $do28(client, request, options) {
|
|
120506
|
-
const
|
|
120507
|
-
if (!
|
|
120508
|
-
return [
|
|
120539
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorActivateForOrganizationV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
120540
|
+
if (!parsed2.ok) {
|
|
120541
|
+
return [parsed2, { status: "invalid" }];
|
|
120509
120542
|
}
|
|
120510
|
-
const payload =
|
|
120543
|
+
const payload = parsed2.value;
|
|
120511
120544
|
const body = encodeJSON("body", payload.ToolExecutionConfiguration, {
|
|
120512
120545
|
explode: true
|
|
120513
120546
|
});
|
|
@@ -120589,11 +120622,11 @@ function betaConnectorsActivateForUser(client, request, options) {
|
|
|
120589
120622
|
return new APIPromise4($do29(client, request, options));
|
|
120590
120623
|
}
|
|
120591
120624
|
async function $do29(client, request, options) {
|
|
120592
|
-
const
|
|
120593
|
-
if (!
|
|
120594
|
-
return [
|
|
120625
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorActivateForUserV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
120626
|
+
if (!parsed2.ok) {
|
|
120627
|
+
return [parsed2, { status: "invalid" }];
|
|
120595
120628
|
}
|
|
120596
|
-
const payload =
|
|
120629
|
+
const payload = parsed2.value;
|
|
120597
120630
|
const body = encodeJSON("body", payload.ToolExecutionConfiguration, {
|
|
120598
120631
|
explode: true
|
|
120599
120632
|
});
|
|
@@ -120675,11 +120708,11 @@ function betaConnectorsActivateForWorkspace(client, request, options) {
|
|
|
120675
120708
|
return new APIPromise4($do30(client, request, options));
|
|
120676
120709
|
}
|
|
120677
120710
|
async function $do30(client, request, options) {
|
|
120678
|
-
const
|
|
120679
|
-
if (!
|
|
120680
|
-
return [
|
|
120711
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorActivateForWorkspaceV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
120712
|
+
if (!parsed2.ok) {
|
|
120713
|
+
return [parsed2, { status: "invalid" }];
|
|
120681
120714
|
}
|
|
120682
|
-
const payload =
|
|
120715
|
+
const payload = parsed2.value;
|
|
120683
120716
|
const body = encodeJSON("body", payload.ToolExecutionConfiguration, {
|
|
120684
120717
|
explode: true
|
|
120685
120718
|
});
|
|
@@ -120761,11 +120794,11 @@ function betaConnectorsCallTool(client, request, options) {
|
|
|
120761
120794
|
return new APIPromise4($do31(client, request, options));
|
|
120762
120795
|
}
|
|
120763
120796
|
async function $do31(client, request, options) {
|
|
120764
|
-
const
|
|
120765
|
-
if (!
|
|
120766
|
-
return [
|
|
120797
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorCallToolV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
120798
|
+
if (!parsed2.ok) {
|
|
120799
|
+
return [parsed2, { status: "invalid" }];
|
|
120767
120800
|
}
|
|
120768
|
-
const payload =
|
|
120801
|
+
const payload = parsed2.value;
|
|
120769
120802
|
const body = encodeJSON("body", payload.ConnectorCallToolRequest, {
|
|
120770
120803
|
explode: true
|
|
120771
120804
|
});
|
|
@@ -120852,11 +120885,11 @@ function betaConnectorsCreate(client, request, options) {
|
|
|
120852
120885
|
return new APIPromise4($do32(client, request, options));
|
|
120853
120886
|
}
|
|
120854
120887
|
async function $do32(client, request, options) {
|
|
120855
|
-
const
|
|
120856
|
-
if (!
|
|
120857
|
-
return [
|
|
120888
|
+
const parsed2 = safeParse3(request, (value2) => CreateConnectorRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
120889
|
+
if (!parsed2.ok) {
|
|
120890
|
+
return [parsed2, { status: "invalid" }];
|
|
120858
120891
|
}
|
|
120859
|
-
const payload =
|
|
120892
|
+
const payload = parsed2.value;
|
|
120860
120893
|
const body = encodeJSON("body", payload, { explode: true });
|
|
120861
120894
|
const path7 = pathToFunc("/v1/connectors")();
|
|
120862
120895
|
const headers = new Headers(compactMap({
|
|
@@ -120929,11 +120962,11 @@ function betaConnectorsCreateOrUpdateOrganizationCredentials(client, request, op
|
|
|
120929
120962
|
return new APIPromise4($do33(client, request, options));
|
|
120930
120963
|
}
|
|
120931
120964
|
async function $do33(client, request, options) {
|
|
120932
|
-
const
|
|
120933
|
-
if (!
|
|
120934
|
-
return [
|
|
120965
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorCreateOrUpdateOrganizationCredentialsV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
120966
|
+
if (!parsed2.ok) {
|
|
120967
|
+
return [parsed2, { status: "invalid" }];
|
|
120935
120968
|
}
|
|
120936
|
-
const payload =
|
|
120969
|
+
const payload = parsed2.value;
|
|
120937
120970
|
const body = encodeJSON("body", payload.CredentialsCreateOrUpdate, {
|
|
120938
120971
|
explode: true
|
|
120939
120972
|
});
|
|
@@ -121012,11 +121045,11 @@ function betaConnectorsCreateOrUpdateUserCredentials(client, request, options) {
|
|
|
121012
121045
|
return new APIPromise4($do34(client, request, options));
|
|
121013
121046
|
}
|
|
121014
121047
|
async function $do34(client, request, options) {
|
|
121015
|
-
const
|
|
121016
|
-
if (!
|
|
121017
|
-
return [
|
|
121048
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorCreateOrUpdateUserCredentialsV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121049
|
+
if (!parsed2.ok) {
|
|
121050
|
+
return [parsed2, { status: "invalid" }];
|
|
121018
121051
|
}
|
|
121019
|
-
const payload =
|
|
121052
|
+
const payload = parsed2.value;
|
|
121020
121053
|
const body = encodeJSON("body", payload.CredentialsCreateOrUpdate, {
|
|
121021
121054
|
explode: true
|
|
121022
121055
|
});
|
|
@@ -121095,11 +121128,11 @@ function betaConnectorsCreateOrUpdateWorkspaceCredentials(client, request, optio
|
|
|
121095
121128
|
return new APIPromise4($do35(client, request, options));
|
|
121096
121129
|
}
|
|
121097
121130
|
async function $do35(client, request, options) {
|
|
121098
|
-
const
|
|
121099
|
-
if (!
|
|
121100
|
-
return [
|
|
121131
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorCreateOrUpdateWorkspaceCredentialsV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121132
|
+
if (!parsed2.ok) {
|
|
121133
|
+
return [parsed2, { status: "invalid" }];
|
|
121101
121134
|
}
|
|
121102
|
-
const payload =
|
|
121135
|
+
const payload = parsed2.value;
|
|
121103
121136
|
const body = encodeJSON("body", payload.CredentialsCreateOrUpdate, {
|
|
121104
121137
|
explode: true
|
|
121105
121138
|
});
|
|
@@ -121178,11 +121211,11 @@ function betaConnectorsDeactivateForOrganization(client, request, options) {
|
|
|
121178
121211
|
return new APIPromise4($do36(client, request, options));
|
|
121179
121212
|
}
|
|
121180
121213
|
async function $do36(client, request, options) {
|
|
121181
|
-
const
|
|
121182
|
-
if (!
|
|
121183
|
-
return [
|
|
121214
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorDeactivateForOrganizationV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121215
|
+
if (!parsed2.ok) {
|
|
121216
|
+
return [parsed2, { status: "invalid" }];
|
|
121184
121217
|
}
|
|
121185
|
-
const payload =
|
|
121218
|
+
const payload = parsed2.value;
|
|
121186
121219
|
const body = null;
|
|
121187
121220
|
const pathParams = {
|
|
121188
121221
|
connector_id: encodeSimple("connector_id", payload.connector_id, {
|
|
@@ -121261,11 +121294,11 @@ function betaConnectorsDeactivateForUser(client, request, options) {
|
|
|
121261
121294
|
return new APIPromise4($do37(client, request, options));
|
|
121262
121295
|
}
|
|
121263
121296
|
async function $do37(client, request, options) {
|
|
121264
|
-
const
|
|
121265
|
-
if (!
|
|
121266
|
-
return [
|
|
121297
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorDeactivateForUserV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121298
|
+
if (!parsed2.ok) {
|
|
121299
|
+
return [parsed2, { status: "invalid" }];
|
|
121267
121300
|
}
|
|
121268
|
-
const payload =
|
|
121301
|
+
const payload = parsed2.value;
|
|
121269
121302
|
const body = null;
|
|
121270
121303
|
const pathParams = {
|
|
121271
121304
|
connector_id: encodeSimple("connector_id", payload.connector_id, {
|
|
@@ -121344,11 +121377,11 @@ function betaConnectorsDeactivateForWorkspace(client, request, options) {
|
|
|
121344
121377
|
return new APIPromise4($do38(client, request, options));
|
|
121345
121378
|
}
|
|
121346
121379
|
async function $do38(client, request, options) {
|
|
121347
|
-
const
|
|
121348
|
-
if (!
|
|
121349
|
-
return [
|
|
121380
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorDeactivateForWorkspaceV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121381
|
+
if (!parsed2.ok) {
|
|
121382
|
+
return [parsed2, { status: "invalid" }];
|
|
121350
121383
|
}
|
|
121351
|
-
const payload =
|
|
121384
|
+
const payload = parsed2.value;
|
|
121352
121385
|
const body = null;
|
|
121353
121386
|
const pathParams = {
|
|
121354
121387
|
connector_id: encodeSimple("connector_id", payload.connector_id, {
|
|
@@ -121427,11 +121460,11 @@ function betaConnectorsDelete(client, request, options) {
|
|
|
121427
121460
|
return new APIPromise4($do39(client, request, options));
|
|
121428
121461
|
}
|
|
121429
121462
|
async function $do39(client, request, options) {
|
|
121430
|
-
const
|
|
121431
|
-
if (!
|
|
121432
|
-
return [
|
|
121463
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorDeleteV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121464
|
+
if (!parsed2.ok) {
|
|
121465
|
+
return [parsed2, { status: "invalid" }];
|
|
121433
121466
|
}
|
|
121434
|
-
const payload =
|
|
121467
|
+
const payload = parsed2.value;
|
|
121435
121468
|
const body = null;
|
|
121436
121469
|
const pathParams = {
|
|
121437
121470
|
connector_id: encodeSimple("connector_id", payload.connector_id, {
|
|
@@ -121510,11 +121543,11 @@ function betaConnectorsDeleteOrganizationCredentials(client, request, options) {
|
|
|
121510
121543
|
return new APIPromise4($do40(client, request, options));
|
|
121511
121544
|
}
|
|
121512
121545
|
async function $do40(client, request, options) {
|
|
121513
|
-
const
|
|
121514
|
-
if (!
|
|
121515
|
-
return [
|
|
121546
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorDeleteOrganizationCredentialsV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121547
|
+
if (!parsed2.ok) {
|
|
121548
|
+
return [parsed2, { status: "invalid" }];
|
|
121516
121549
|
}
|
|
121517
|
-
const payload =
|
|
121550
|
+
const payload = parsed2.value;
|
|
121518
121551
|
const body = null;
|
|
121519
121552
|
const pathParams = {
|
|
121520
121553
|
connector_id_or_name: encodeSimple("connector_id_or_name", payload.connector_id_or_name, { explode: false, charEncoding: "percent" }),
|
|
@@ -121591,11 +121624,11 @@ function betaConnectorsDeleteUserCredentials(client, request, options) {
|
|
|
121591
121624
|
return new APIPromise4($do41(client, request, options));
|
|
121592
121625
|
}
|
|
121593
121626
|
async function $do41(client, request, options) {
|
|
121594
|
-
const
|
|
121595
|
-
if (!
|
|
121596
|
-
return [
|
|
121627
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorDeleteUserCredentialsV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121628
|
+
if (!parsed2.ok) {
|
|
121629
|
+
return [parsed2, { status: "invalid" }];
|
|
121597
121630
|
}
|
|
121598
|
-
const payload =
|
|
121631
|
+
const payload = parsed2.value;
|
|
121599
121632
|
const body = null;
|
|
121600
121633
|
const pathParams = {
|
|
121601
121634
|
connector_id_or_name: encodeSimple("connector_id_or_name", payload.connector_id_or_name, { explode: false, charEncoding: "percent" }),
|
|
@@ -121672,11 +121705,11 @@ function betaConnectorsDeleteWorkspaceCredentials(client, request, options) {
|
|
|
121672
121705
|
return new APIPromise4($do42(client, request, options));
|
|
121673
121706
|
}
|
|
121674
121707
|
async function $do42(client, request, options) {
|
|
121675
|
-
const
|
|
121676
|
-
if (!
|
|
121677
|
-
return [
|
|
121708
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorDeleteWorkspaceCredentialsV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121709
|
+
if (!parsed2.ok) {
|
|
121710
|
+
return [parsed2, { status: "invalid" }];
|
|
121678
121711
|
}
|
|
121679
|
-
const payload =
|
|
121712
|
+
const payload = parsed2.value;
|
|
121680
121713
|
const body = null;
|
|
121681
121714
|
const pathParams = {
|
|
121682
121715
|
connector_id_or_name: encodeSimple("connector_id_or_name", payload.connector_id_or_name, { explode: false, charEncoding: "percent" }),
|
|
@@ -121753,11 +121786,11 @@ function betaConnectorsGet(client, request, options) {
|
|
|
121753
121786
|
return new APIPromise4($do43(client, request, options));
|
|
121754
121787
|
}
|
|
121755
121788
|
async function $do43(client, request, options) {
|
|
121756
|
-
const
|
|
121757
|
-
if (!
|
|
121758
|
-
return [
|
|
121789
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorGetV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121790
|
+
if (!parsed2.ok) {
|
|
121791
|
+
return [parsed2, { status: "invalid" }];
|
|
121759
121792
|
}
|
|
121760
|
-
const payload =
|
|
121793
|
+
const payload = parsed2.value;
|
|
121761
121794
|
const body = null;
|
|
121762
121795
|
const pathParams = {
|
|
121763
121796
|
connector_id_or_name: encodeSimple("connector_id_or_name", payload.connector_id_or_name, { explode: false, charEncoding: "percent" })
|
|
@@ -121838,11 +121871,11 @@ function betaConnectorsGetAuthenticationMethods(client, request, options) {
|
|
|
121838
121871
|
return new APIPromise4($do44(client, request, options));
|
|
121839
121872
|
}
|
|
121840
121873
|
async function $do44(client, request, options) {
|
|
121841
|
-
const
|
|
121842
|
-
if (!
|
|
121843
|
-
return [
|
|
121874
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorGetAuthenticationMethodsV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121875
|
+
if (!parsed2.ok) {
|
|
121876
|
+
return [parsed2, { status: "invalid" }];
|
|
121844
121877
|
}
|
|
121845
|
-
const payload =
|
|
121878
|
+
const payload = parsed2.value;
|
|
121846
121879
|
const body = null;
|
|
121847
121880
|
const pathParams = {
|
|
121848
121881
|
connector_id_or_name: encodeSimple("connector_id_or_name", payload.connector_id_or_name, { explode: false, charEncoding: "percent" })
|
|
@@ -121915,11 +121948,11 @@ function betaConnectorsGetAuthUrl(client, request, options) {
|
|
|
121915
121948
|
return new APIPromise4($do45(client, request, options));
|
|
121916
121949
|
}
|
|
121917
121950
|
async function $do45(client, request, options) {
|
|
121918
|
-
const
|
|
121919
|
-
if (!
|
|
121920
|
-
return [
|
|
121951
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorGetAuthUrlV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
121952
|
+
if (!parsed2.ok) {
|
|
121953
|
+
return [parsed2, { status: "invalid" }];
|
|
121921
121954
|
}
|
|
121922
|
-
const payload =
|
|
121955
|
+
const payload = parsed2.value;
|
|
121923
121956
|
const body = null;
|
|
121924
121957
|
const pathParams = {
|
|
121925
121958
|
connector_id_or_name: encodeSimple("connector_id_or_name", payload.connector_id_or_name, { explode: false, charEncoding: "percent" })
|
|
@@ -122002,11 +122035,11 @@ function betaConnectorsList(client, request, options) {
|
|
|
122002
122035
|
return new APIPromise4($do46(client, request, options));
|
|
122003
122036
|
}
|
|
122004
122037
|
async function $do46(client, request, options) {
|
|
122005
|
-
const
|
|
122006
|
-
if (!
|
|
122007
|
-
return [
|
|
122038
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorListV1Request$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
122039
|
+
if (!parsed2.ok) {
|
|
122040
|
+
return [parsed2, { status: "invalid" }];
|
|
122008
122041
|
}
|
|
122009
|
-
const payload =
|
|
122042
|
+
const payload = parsed2.value;
|
|
122010
122043
|
const body = null;
|
|
122011
122044
|
const path7 = pathToFunc("/v1/connectors")();
|
|
122012
122045
|
const query = encodeFormQuery({
|
|
@@ -122085,11 +122118,11 @@ function betaConnectorsListOrganizationCredentials(client, request, options) {
|
|
|
122085
122118
|
return new APIPromise4($do47(client, request, options));
|
|
122086
122119
|
}
|
|
122087
122120
|
async function $do47(client, request, options) {
|
|
122088
|
-
const
|
|
122089
|
-
if (!
|
|
122090
|
-
return [
|
|
122121
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorListOrganizationCredentialsV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
122122
|
+
if (!parsed2.ok) {
|
|
122123
|
+
return [parsed2, { status: "invalid" }];
|
|
122091
122124
|
}
|
|
122092
|
-
const payload =
|
|
122125
|
+
const payload = parsed2.value;
|
|
122093
122126
|
const body = null;
|
|
122094
122127
|
const pathParams = {
|
|
122095
122128
|
connector_id_or_name: encodeSimple("connector_id_or_name", payload.connector_id_or_name, { explode: false, charEncoding: "percent" })
|
|
@@ -122170,11 +122203,11 @@ function betaConnectorsListTools(client, request, options) {
|
|
|
122170
122203
|
return new APIPromise4($do48(client, request, options));
|
|
122171
122204
|
}
|
|
122172
122205
|
async function $do48(client, request, options) {
|
|
122173
|
-
const
|
|
122174
|
-
if (!
|
|
122175
|
-
return [
|
|
122206
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorListToolsV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
122207
|
+
if (!parsed2.ok) {
|
|
122208
|
+
return [parsed2, { status: "invalid" }];
|
|
122176
122209
|
}
|
|
122177
|
-
const payload =
|
|
122210
|
+
const payload = parsed2.value;
|
|
122178
122211
|
const body = null;
|
|
122179
122212
|
const pathParams = {
|
|
122180
122213
|
connector_id_or_name: encodeSimple("connector_id_or_name", payload.connector_id_or_name, { explode: false, charEncoding: "percent" })
|
|
@@ -122257,11 +122290,11 @@ function betaConnectorsListUserCredentials(client, request, options) {
|
|
|
122257
122290
|
return new APIPromise4($do49(client, request, options));
|
|
122258
122291
|
}
|
|
122259
122292
|
async function $do49(client, request, options) {
|
|
122260
|
-
const
|
|
122261
|
-
if (!
|
|
122262
|
-
return [
|
|
122293
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorListUserCredentialsV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
122294
|
+
if (!parsed2.ok) {
|
|
122295
|
+
return [parsed2, { status: "invalid" }];
|
|
122263
122296
|
}
|
|
122264
|
-
const payload =
|
|
122297
|
+
const payload = parsed2.value;
|
|
122265
122298
|
const body = null;
|
|
122266
122299
|
const pathParams = {
|
|
122267
122300
|
connector_id_or_name: encodeSimple("connector_id_or_name", payload.connector_id_or_name, { explode: false, charEncoding: "percent" })
|
|
@@ -122342,11 +122375,11 @@ function betaConnectorsListWorkspaceCredentials(client, request, options) {
|
|
|
122342
122375
|
return new APIPromise4($do50(client, request, options));
|
|
122343
122376
|
}
|
|
122344
122377
|
async function $do50(client, request, options) {
|
|
122345
|
-
const
|
|
122346
|
-
if (!
|
|
122347
|
-
return [
|
|
122378
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorListWorkspaceCredentialsV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
122379
|
+
if (!parsed2.ok) {
|
|
122380
|
+
return [parsed2, { status: "invalid" }];
|
|
122348
122381
|
}
|
|
122349
|
-
const payload =
|
|
122382
|
+
const payload = parsed2.value;
|
|
122350
122383
|
const body = null;
|
|
122351
122384
|
const pathParams = {
|
|
122352
122385
|
connector_id_or_name: encodeSimple("connector_id_or_name", payload.connector_id_or_name, { explode: false, charEncoding: "percent" })
|
|
@@ -122427,11 +122460,11 @@ function betaConnectorsUpdate(client, request, options) {
|
|
|
122427
122460
|
return new APIPromise4($do51(client, request, options));
|
|
122428
122461
|
}
|
|
122429
122462
|
async function $do51(client, request, options) {
|
|
122430
|
-
const
|
|
122431
|
-
if (!
|
|
122432
|
-
return [
|
|
122463
|
+
const parsed2 = safeParse3(request, (value2) => ConnectorUpdateV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
122464
|
+
if (!parsed2.ok) {
|
|
122465
|
+
return [parsed2, { status: "invalid" }];
|
|
122433
122466
|
}
|
|
122434
|
-
const payload =
|
|
122467
|
+
const payload = parsed2.value;
|
|
122435
122468
|
const body = encodeJSON("body", payload.UpdateConnectorRequest, {
|
|
122436
122469
|
explode: true
|
|
122437
122470
|
});
|
|
@@ -122764,11 +122797,11 @@ function betaConversationsAppend(client, request, options) {
|
|
|
122764
122797
|
return new APIPromise4($do52(client, request, options));
|
|
122765
122798
|
}
|
|
122766
122799
|
async function $do52(client, request, options) {
|
|
122767
|
-
const
|
|
122768
|
-
if (!
|
|
122769
|
-
return [
|
|
122800
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1ConversationsAppendRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
122801
|
+
if (!parsed2.ok) {
|
|
122802
|
+
return [parsed2, { status: "invalid" }];
|
|
122770
122803
|
}
|
|
122771
|
-
const payload =
|
|
122804
|
+
const payload = parsed2.value;
|
|
122772
122805
|
const body = encodeJSON("body", payload.ConversationAppendRequest, {
|
|
122773
122806
|
explode: true
|
|
122774
122807
|
});
|
|
@@ -122850,11 +122883,11 @@ function betaConversationsAppendStream(client, request, options) {
|
|
|
122850
122883
|
return new APIPromise4($do53(client, request, options));
|
|
122851
122884
|
}
|
|
122852
122885
|
async function $do53(client, request, options) {
|
|
122853
|
-
const
|
|
122854
|
-
if (!
|
|
122855
|
-
return [
|
|
122886
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1ConversationsAppendStreamRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
122887
|
+
if (!parsed2.ok) {
|
|
122888
|
+
return [parsed2, { status: "invalid" }];
|
|
122856
122889
|
}
|
|
122857
|
-
const payload =
|
|
122890
|
+
const payload = parsed2.value;
|
|
122858
122891
|
const body = encodeJSON("body", payload.ConversationAppendStreamRequest, {
|
|
122859
122892
|
explode: true
|
|
122860
122893
|
});
|
|
@@ -122945,11 +122978,11 @@ function betaConversationsDelete(client, request, options) {
|
|
|
122945
122978
|
return new APIPromise4($do54(client, request, options));
|
|
122946
122979
|
}
|
|
122947
122980
|
async function $do54(client, request, options) {
|
|
122948
|
-
const
|
|
122949
|
-
if (!
|
|
122950
|
-
return [
|
|
122981
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1ConversationsDeleteRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
122982
|
+
if (!parsed2.ok) {
|
|
122983
|
+
return [parsed2, { status: "invalid" }];
|
|
122951
122984
|
}
|
|
122952
|
-
const payload =
|
|
122985
|
+
const payload = parsed2.value;
|
|
122953
122986
|
const body = null;
|
|
122954
122987
|
const pathParams = {
|
|
122955
122988
|
conversation_id: encodeSimple("conversation_id", payload.conversation_id, {
|
|
@@ -123028,11 +123061,11 @@ function betaConversationsGet(client, request, options) {
|
|
|
123028
123061
|
return new APIPromise4($do55(client, request, options));
|
|
123029
123062
|
}
|
|
123030
123063
|
async function $do55(client, request, options) {
|
|
123031
|
-
const
|
|
123032
|
-
if (!
|
|
123033
|
-
return [
|
|
123064
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1ConversationsGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
123065
|
+
if (!parsed2.ok) {
|
|
123066
|
+
return [parsed2, { status: "invalid" }];
|
|
123034
123067
|
}
|
|
123035
|
-
const payload =
|
|
123068
|
+
const payload = parsed2.value;
|
|
123036
123069
|
const body = null;
|
|
123037
123070
|
const pathParams = {
|
|
123038
123071
|
conversation_id: encodeSimple("conversation_id", payload.conversation_id, {
|
|
@@ -123110,11 +123143,11 @@ function betaConversationsGetHistory(client, request, options) {
|
|
|
123110
123143
|
return new APIPromise4($do56(client, request, options));
|
|
123111
123144
|
}
|
|
123112
123145
|
async function $do56(client, request, options) {
|
|
123113
|
-
const
|
|
123114
|
-
if (!
|
|
123115
|
-
return [
|
|
123146
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1ConversationsHistoryRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
123147
|
+
if (!parsed2.ok) {
|
|
123148
|
+
return [parsed2, { status: "invalid" }];
|
|
123116
123149
|
}
|
|
123117
|
-
const payload =
|
|
123150
|
+
const payload = parsed2.value;
|
|
123118
123151
|
const body = null;
|
|
123119
123152
|
const pathParams = {
|
|
123120
123153
|
conversation_id: encodeSimple("conversation_id", payload.conversation_id, {
|
|
@@ -123193,11 +123226,11 @@ function betaConversationsGetMessages(client, request, options) {
|
|
|
123193
123226
|
return new APIPromise4($do57(client, request, options));
|
|
123194
123227
|
}
|
|
123195
123228
|
async function $do57(client, request, options) {
|
|
123196
|
-
const
|
|
123197
|
-
if (!
|
|
123198
|
-
return [
|
|
123229
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1ConversationsMessagesRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
123230
|
+
if (!parsed2.ok) {
|
|
123231
|
+
return [parsed2, { status: "invalid" }];
|
|
123199
123232
|
}
|
|
123200
|
-
const payload =
|
|
123233
|
+
const payload = parsed2.value;
|
|
123201
123234
|
const body = null;
|
|
123202
123235
|
const pathParams = {
|
|
123203
123236
|
conversation_id: encodeSimple("conversation_id", payload.conversation_id, {
|
|
@@ -123276,11 +123309,11 @@ function betaConversationsList(client, request, options) {
|
|
|
123276
123309
|
return new APIPromise4($do58(client, request, options));
|
|
123277
123310
|
}
|
|
123278
123311
|
async function $do58(client, request, options) {
|
|
123279
|
-
const
|
|
123280
|
-
if (!
|
|
123281
|
-
return [
|
|
123312
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1ConversationsListRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
123313
|
+
if (!parsed2.ok) {
|
|
123314
|
+
return [parsed2, { status: "invalid" }];
|
|
123282
123315
|
}
|
|
123283
|
-
const payload =
|
|
123316
|
+
const payload = parsed2.value;
|
|
123284
123317
|
const body = null;
|
|
123285
123318
|
const path7 = pathToFunc("/v1/conversations")();
|
|
123286
123319
|
const query = queryJoin(encodeFormQuery({
|
|
@@ -123360,11 +123393,11 @@ function betaConversationsRestart(client, request, options) {
|
|
|
123360
123393
|
return new APIPromise4($do59(client, request, options));
|
|
123361
123394
|
}
|
|
123362
123395
|
async function $do59(client, request, options) {
|
|
123363
|
-
const
|
|
123364
|
-
if (!
|
|
123365
|
-
return [
|
|
123396
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1ConversationsRestartRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
123397
|
+
if (!parsed2.ok) {
|
|
123398
|
+
return [parsed2, { status: "invalid" }];
|
|
123366
123399
|
}
|
|
123367
|
-
const payload =
|
|
123400
|
+
const payload = parsed2.value;
|
|
123368
123401
|
const body = encodeJSON("body", payload.ConversationRestartRequest, {
|
|
123369
123402
|
explode: true
|
|
123370
123403
|
});
|
|
@@ -123446,11 +123479,11 @@ function betaConversationsRestartStream(client, request, options) {
|
|
|
123446
123479
|
return new APIPromise4($do60(client, request, options));
|
|
123447
123480
|
}
|
|
123448
123481
|
async function $do60(client, request, options) {
|
|
123449
|
-
const
|
|
123450
|
-
if (!
|
|
123451
|
-
return [
|
|
123482
|
+
const parsed2 = safeParse3(request, (value2) => AgentsApiV1ConversationsRestartStreamRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
123483
|
+
if (!parsed2.ok) {
|
|
123484
|
+
return [parsed2, { status: "invalid" }];
|
|
123452
123485
|
}
|
|
123453
|
-
const payload =
|
|
123486
|
+
const payload = parsed2.value;
|
|
123454
123487
|
const body = encodeJSON("body", payload.ConversationRestartStreamRequest, {
|
|
123455
123488
|
explode: true
|
|
123456
123489
|
});
|
|
@@ -123541,11 +123574,11 @@ function betaConversationsStart(client, request, options) {
|
|
|
123541
123574
|
return new APIPromise4($do61(client, request, options));
|
|
123542
123575
|
}
|
|
123543
123576
|
async function $do61(client, request, options) {
|
|
123544
|
-
const
|
|
123545
|
-
if (!
|
|
123546
|
-
return [
|
|
123577
|
+
const parsed2 = safeParse3(request, (value2) => ConversationRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
123578
|
+
if (!parsed2.ok) {
|
|
123579
|
+
return [parsed2, { status: "invalid" }];
|
|
123547
123580
|
}
|
|
123548
|
-
const payload =
|
|
123581
|
+
const payload = parsed2.value;
|
|
123549
123582
|
const body = encodeJSON("body", payload, { explode: true });
|
|
123550
123583
|
const path7 = pathToFunc("/v1/conversations")();
|
|
123551
123584
|
const headers = new Headers(compactMap({
|
|
@@ -123618,11 +123651,11 @@ function betaConversationsStartStream(client, request, options) {
|
|
|
123618
123651
|
return new APIPromise4($do62(client, request, options));
|
|
123619
123652
|
}
|
|
123620
123653
|
async function $do62(client, request, options) {
|
|
123621
|
-
const
|
|
123622
|
-
if (!
|
|
123623
|
-
return [
|
|
123654
|
+
const parsed2 = safeParse3(request, (value2) => ConversationStreamRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
123655
|
+
if (!parsed2.ok) {
|
|
123656
|
+
return [parsed2, { status: "invalid" }];
|
|
123624
123657
|
}
|
|
123625
|
-
const payload =
|
|
123658
|
+
const payload = parsed2.value;
|
|
123626
123659
|
const body = encodeJSON("body", payload, { explode: true });
|
|
123627
123660
|
const path7 = pathToFunc("/v1/conversations#stream")();
|
|
123628
123661
|
const headers = new Headers(compactMap({
|
|
@@ -123825,11 +123858,11 @@ function betaLibrariesCreate(client, request, options) {
|
|
|
123825
123858
|
return new APIPromise4($do63(client, request, options));
|
|
123826
123859
|
}
|
|
123827
123860
|
async function $do63(client, request, options) {
|
|
123828
|
-
const
|
|
123829
|
-
if (!
|
|
123830
|
-
return [
|
|
123861
|
+
const parsed2 = safeParse3(request, (value2) => CreateLibraryRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
123862
|
+
if (!parsed2.ok) {
|
|
123863
|
+
return [parsed2, { status: "invalid" }];
|
|
123831
123864
|
}
|
|
123832
|
-
const payload =
|
|
123865
|
+
const payload = parsed2.value;
|
|
123833
123866
|
const body = encodeJSON("body", payload, { explode: true });
|
|
123834
123867
|
const path7 = pathToFunc("/v1/libraries")();
|
|
123835
123868
|
const headers = new Headers(compactMap({
|
|
@@ -123902,11 +123935,11 @@ function betaLibrariesDelete(client, request, options) {
|
|
|
123902
123935
|
return new APIPromise4($do64(client, request, options));
|
|
123903
123936
|
}
|
|
123904
123937
|
async function $do64(client, request, options) {
|
|
123905
|
-
const
|
|
123906
|
-
if (!
|
|
123907
|
-
return [
|
|
123938
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDeleteV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
123939
|
+
if (!parsed2.ok) {
|
|
123940
|
+
return [parsed2, { status: "invalid" }];
|
|
123908
123941
|
}
|
|
123909
|
-
const payload =
|
|
123942
|
+
const payload = parsed2.value;
|
|
123910
123943
|
const body = null;
|
|
123911
123944
|
const pathParams = {
|
|
123912
123945
|
library_id: encodeSimple("library_id", payload.library_id, {
|
|
@@ -123985,11 +124018,11 @@ function betaLibrariesGet(client, request, options) {
|
|
|
123985
124018
|
return new APIPromise4($do65(client, request, options));
|
|
123986
124019
|
}
|
|
123987
124020
|
async function $do65(client, request, options) {
|
|
123988
|
-
const
|
|
123989
|
-
if (!
|
|
123990
|
-
return [
|
|
124021
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesGetV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
124022
|
+
if (!parsed2.ok) {
|
|
124023
|
+
return [parsed2, { status: "invalid" }];
|
|
123991
124024
|
}
|
|
123992
|
-
const payload =
|
|
124025
|
+
const payload = parsed2.value;
|
|
123993
124026
|
const body = null;
|
|
123994
124027
|
const pathParams = {
|
|
123995
124028
|
library_id: encodeSimple("library_id", payload.library_id, {
|
|
@@ -124068,11 +124101,11 @@ function betaLibrariesLibrariesUpdateV1(client, request, options) {
|
|
|
124068
124101
|
return new APIPromise4($do66(client, request, options));
|
|
124069
124102
|
}
|
|
124070
124103
|
async function $do66(client, request, options) {
|
|
124071
|
-
const
|
|
124072
|
-
if (!
|
|
124073
|
-
return [
|
|
124104
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesUpdateV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
124105
|
+
if (!parsed2.ok) {
|
|
124106
|
+
return [parsed2, { status: "invalid" }];
|
|
124074
124107
|
}
|
|
124075
|
-
const payload =
|
|
124108
|
+
const payload = parsed2.value;
|
|
124076
124109
|
const body = encodeJSON("body", payload.UpdateLibraryRequest, {
|
|
124077
124110
|
explode: true
|
|
124078
124111
|
});
|
|
@@ -124154,11 +124187,11 @@ function betaLibrariesList(client, request, options) {
|
|
|
124154
124187
|
return new APIPromise4($do67(client, request, options));
|
|
124155
124188
|
}
|
|
124156
124189
|
async function $do67(client, request, options) {
|
|
124157
|
-
const
|
|
124158
|
-
if (!
|
|
124159
|
-
return [
|
|
124190
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesListV1Request$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
124191
|
+
if (!parsed2.ok) {
|
|
124192
|
+
return [parsed2, { status: "invalid" }];
|
|
124160
124193
|
}
|
|
124161
|
-
const payload =
|
|
124194
|
+
const payload = parsed2.value;
|
|
124162
124195
|
const body = null;
|
|
124163
124196
|
const path7 = pathToFunc("/v1/libraries")();
|
|
124164
124197
|
const query = encodeFormQuery({
|
|
@@ -124238,11 +124271,11 @@ function betaLibrariesUpdate(client, request, options) {
|
|
|
124238
124271
|
return new APIPromise4($do68(client, request, options));
|
|
124239
124272
|
}
|
|
124240
124273
|
async function $do68(client, request, options) {
|
|
124241
|
-
const
|
|
124242
|
-
if (!
|
|
124243
|
-
return [
|
|
124274
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesPatchV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
124275
|
+
if (!parsed2.ok) {
|
|
124276
|
+
return [parsed2, { status: "invalid" }];
|
|
124244
124277
|
}
|
|
124245
|
-
const payload =
|
|
124278
|
+
const payload = parsed2.value;
|
|
124246
124279
|
const body = encodeJSON("body", payload.UpdateLibraryRequest, {
|
|
124247
124280
|
explode: true
|
|
124248
124281
|
});
|
|
@@ -124324,11 +124357,11 @@ function betaLibrariesAccessesDelete(client, request, options) {
|
|
|
124324
124357
|
return new APIPromise4($do69(client, request, options));
|
|
124325
124358
|
}
|
|
124326
124359
|
async function $do69(client, request, options) {
|
|
124327
|
-
const
|
|
124328
|
-
if (!
|
|
124329
|
-
return [
|
|
124360
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesShareDeleteV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
124361
|
+
if (!parsed2.ok) {
|
|
124362
|
+
return [parsed2, { status: "invalid" }];
|
|
124330
124363
|
}
|
|
124331
|
-
const payload =
|
|
124364
|
+
const payload = parsed2.value;
|
|
124332
124365
|
const body = encodeJSON("body", payload.SharingDelete, { explode: true });
|
|
124333
124366
|
const pathParams = {
|
|
124334
124367
|
library_id: encodeSimple("library_id", payload.library_id, {
|
|
@@ -124408,11 +124441,11 @@ function betaLibrariesAccessesList(client, request, options) {
|
|
|
124408
124441
|
return new APIPromise4($do70(client, request, options));
|
|
124409
124442
|
}
|
|
124410
124443
|
async function $do70(client, request, options) {
|
|
124411
|
-
const
|
|
124412
|
-
if (!
|
|
124413
|
-
return [
|
|
124444
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesShareListV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
124445
|
+
if (!parsed2.ok) {
|
|
124446
|
+
return [parsed2, { status: "invalid" }];
|
|
124414
124447
|
}
|
|
124415
|
-
const payload =
|
|
124448
|
+
const payload = parsed2.value;
|
|
124416
124449
|
const body = null;
|
|
124417
124450
|
const pathParams = {
|
|
124418
124451
|
library_id: encodeSimple("library_id", payload.library_id, {
|
|
@@ -124491,11 +124524,11 @@ function betaLibrariesAccessesUpdateOrCreate(client, request, options) {
|
|
|
124491
124524
|
return new APIPromise4($do71(client, request, options));
|
|
124492
124525
|
}
|
|
124493
124526
|
async function $do71(client, request, options) {
|
|
124494
|
-
const
|
|
124495
|
-
if (!
|
|
124496
|
-
return [
|
|
124527
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesShareCreateV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
124528
|
+
if (!parsed2.ok) {
|
|
124529
|
+
return [parsed2, { status: "invalid" }];
|
|
124497
124530
|
}
|
|
124498
|
-
const payload =
|
|
124531
|
+
const payload = parsed2.value;
|
|
124499
124532
|
const body = encodeJSON("body", payload.SharingRequest, { explode: true });
|
|
124500
124533
|
const pathParams = {
|
|
124501
124534
|
library_id: encodeSimple("library_id", payload.library_id, {
|
|
@@ -124616,11 +124649,11 @@ function betaLibrariesDocumentsDelete(client, request, options) {
|
|
|
124616
124649
|
return new APIPromise4($do72(client, request, options));
|
|
124617
124650
|
}
|
|
124618
124651
|
async function $do72(client, request, options) {
|
|
124619
|
-
const
|
|
124620
|
-
if (!
|
|
124621
|
-
return [
|
|
124652
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDocumentsDeleteV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
124653
|
+
if (!parsed2.ok) {
|
|
124654
|
+
return [parsed2, { status: "invalid" }];
|
|
124622
124655
|
}
|
|
124623
|
-
const payload =
|
|
124656
|
+
const payload = parsed2.value;
|
|
124624
124657
|
const body = null;
|
|
124625
124658
|
const pathParams = {
|
|
124626
124659
|
document_id: encodeSimple("document_id", payload.document_id, {
|
|
@@ -124703,11 +124736,11 @@ function betaLibrariesDocumentsExtractedTextSignedUrl(client, request, options)
|
|
|
124703
124736
|
return new APIPromise4($do73(client, request, options));
|
|
124704
124737
|
}
|
|
124705
124738
|
async function $do73(client, request, options) {
|
|
124706
|
-
const
|
|
124707
|
-
if (!
|
|
124708
|
-
return [
|
|
124739
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDocumentsGetExtractedTextSignedUrlV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
124740
|
+
if (!parsed2.ok) {
|
|
124741
|
+
return [parsed2, { status: "invalid" }];
|
|
124709
124742
|
}
|
|
124710
|
-
const payload =
|
|
124743
|
+
const payload = parsed2.value;
|
|
124711
124744
|
const body = null;
|
|
124712
124745
|
const pathParams = {
|
|
124713
124746
|
document_id: encodeSimple("document_id", payload.document_id, {
|
|
@@ -124790,11 +124823,11 @@ function betaLibrariesDocumentsGet(client, request, options) {
|
|
|
124790
124823
|
return new APIPromise4($do74(client, request, options));
|
|
124791
124824
|
}
|
|
124792
124825
|
async function $do74(client, request, options) {
|
|
124793
|
-
const
|
|
124794
|
-
if (!
|
|
124795
|
-
return [
|
|
124826
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDocumentsGetV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
124827
|
+
if (!parsed2.ok) {
|
|
124828
|
+
return [parsed2, { status: "invalid" }];
|
|
124796
124829
|
}
|
|
124797
|
-
const payload =
|
|
124830
|
+
const payload = parsed2.value;
|
|
124798
124831
|
const body = null;
|
|
124799
124832
|
const pathParams = {
|
|
124800
124833
|
document_id: encodeSimple("document_id", payload.document_id, {
|
|
@@ -124877,11 +124910,11 @@ function betaLibrariesDocumentsGetSignedUrl(client, request, options) {
|
|
|
124877
124910
|
return new APIPromise4($do75(client, request, options));
|
|
124878
124911
|
}
|
|
124879
124912
|
async function $do75(client, request, options) {
|
|
124880
|
-
const
|
|
124881
|
-
if (!
|
|
124882
|
-
return [
|
|
124913
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDocumentsGetSignedUrlV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
124914
|
+
if (!parsed2.ok) {
|
|
124915
|
+
return [parsed2, { status: "invalid" }];
|
|
124883
124916
|
}
|
|
124884
|
-
const payload =
|
|
124917
|
+
const payload = parsed2.value;
|
|
124885
124918
|
const body = null;
|
|
124886
124919
|
const pathParams = {
|
|
124887
124920
|
document_id: encodeSimple("document_id", payload.document_id, {
|
|
@@ -124964,11 +124997,11 @@ function betaLibrariesDocumentsLibrariesDocumentsUpdateV1(client, request, optio
|
|
|
124964
124997
|
return new APIPromise4($do76(client, request, options));
|
|
124965
124998
|
}
|
|
124966
124999
|
async function $do76(client, request, options) {
|
|
124967
|
-
const
|
|
124968
|
-
if (!
|
|
124969
|
-
return [
|
|
125000
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDocumentsUpdateV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
125001
|
+
if (!parsed2.ok) {
|
|
125002
|
+
return [parsed2, { status: "invalid" }];
|
|
124970
125003
|
}
|
|
124971
|
-
const payload =
|
|
125004
|
+
const payload = parsed2.value;
|
|
124972
125005
|
const body = encodeJSON("body", payload.UpdateDocumentRequest, {
|
|
124973
125006
|
explode: true
|
|
124974
125007
|
});
|
|
@@ -125054,11 +125087,11 @@ function betaLibrariesDocumentsList(client, request, options) {
|
|
|
125054
125087
|
return new APIPromise4($do77(client, request, options));
|
|
125055
125088
|
}
|
|
125056
125089
|
async function $do77(client, request, options) {
|
|
125057
|
-
const
|
|
125058
|
-
if (!
|
|
125059
|
-
return [
|
|
125090
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDocumentsListV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
125091
|
+
if (!parsed2.ok) {
|
|
125092
|
+
return [parsed2, { status: "invalid" }];
|
|
125060
125093
|
}
|
|
125061
|
-
const payload =
|
|
125094
|
+
const payload = parsed2.value;
|
|
125062
125095
|
const body = null;
|
|
125063
125096
|
const pathParams = {
|
|
125064
125097
|
library_id: encodeSimple("library_id", payload.library_id, {
|
|
@@ -125146,11 +125179,11 @@ function betaLibrariesDocumentsReprocess(client, request, options) {
|
|
|
125146
125179
|
return new APIPromise4($do78(client, request, options));
|
|
125147
125180
|
}
|
|
125148
125181
|
async function $do78(client, request, options) {
|
|
125149
|
-
const
|
|
125150
|
-
if (!
|
|
125151
|
-
return [
|
|
125182
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDocumentsReprocessV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
125183
|
+
if (!parsed2.ok) {
|
|
125184
|
+
return [parsed2, { status: "invalid" }];
|
|
125152
125185
|
}
|
|
125153
|
-
const payload =
|
|
125186
|
+
const payload = parsed2.value;
|
|
125154
125187
|
const body = null;
|
|
125155
125188
|
const pathParams = {
|
|
125156
125189
|
document_id: encodeSimple("document_id", payload.document_id, {
|
|
@@ -125233,11 +125266,11 @@ function betaLibrariesDocumentsStatus(client, request, options) {
|
|
|
125233
125266
|
return new APIPromise4($do79(client, request, options));
|
|
125234
125267
|
}
|
|
125235
125268
|
async function $do79(client, request, options) {
|
|
125236
|
-
const
|
|
125237
|
-
if (!
|
|
125238
|
-
return [
|
|
125269
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDocumentsGetStatusV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
125270
|
+
if (!parsed2.ok) {
|
|
125271
|
+
return [parsed2, { status: "invalid" }];
|
|
125239
125272
|
}
|
|
125240
|
-
const payload =
|
|
125273
|
+
const payload = parsed2.value;
|
|
125241
125274
|
const body = null;
|
|
125242
125275
|
const pathParams = {
|
|
125243
125276
|
document_id: encodeSimple("document_id", payload.document_id, {
|
|
@@ -125320,11 +125353,11 @@ function betaLibrariesDocumentsTextContent(client, request, options) {
|
|
|
125320
125353
|
return new APIPromise4($do80(client, request, options));
|
|
125321
125354
|
}
|
|
125322
125355
|
async function $do80(client, request, options) {
|
|
125323
|
-
const
|
|
125324
|
-
if (!
|
|
125325
|
-
return [
|
|
125356
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDocumentsGetTextContentV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
125357
|
+
if (!parsed2.ok) {
|
|
125358
|
+
return [parsed2, { status: "invalid" }];
|
|
125326
125359
|
}
|
|
125327
|
-
const payload =
|
|
125360
|
+
const payload = parsed2.value;
|
|
125328
125361
|
const body = null;
|
|
125329
125362
|
const pathParams = {
|
|
125330
125363
|
document_id: encodeSimple("document_id", payload.document_id, {
|
|
@@ -125412,11 +125445,11 @@ function betaLibrariesDocumentsUpdate(client, request, options) {
|
|
|
125412
125445
|
return new APIPromise4($do81(client, request, options));
|
|
125413
125446
|
}
|
|
125414
125447
|
async function $do81(client, request, options) {
|
|
125415
|
-
const
|
|
125416
|
-
if (!
|
|
125417
|
-
return [
|
|
125448
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDocumentsPatchV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
125449
|
+
if (!parsed2.ok) {
|
|
125450
|
+
return [parsed2, { status: "invalid" }];
|
|
125418
125451
|
}
|
|
125419
|
-
const payload =
|
|
125452
|
+
const payload = parsed2.value;
|
|
125420
125453
|
const body = encodeJSON("body", payload.UpdateDocumentRequest, {
|
|
125421
125454
|
explode: true
|
|
125422
125455
|
});
|
|
@@ -125502,11 +125535,11 @@ function betaLibrariesDocumentsUpload(client, request, options) {
|
|
|
125502
125535
|
return new APIPromise4($do82(client, request, options));
|
|
125503
125536
|
}
|
|
125504
125537
|
async function $do82(client, request, options) {
|
|
125505
|
-
const
|
|
125506
|
-
if (!
|
|
125507
|
-
return [
|
|
125538
|
+
const parsed2 = safeParse3(request, (value2) => LibrariesDocumentsUploadV1Request$outboundSchema.parse(value2), "Input validation failed");
|
|
125539
|
+
if (!parsed2.ok) {
|
|
125540
|
+
return [parsed2, { status: "invalid" }];
|
|
125508
125541
|
}
|
|
125509
|
-
const payload =
|
|
125542
|
+
const payload = parsed2.value;
|
|
125510
125543
|
const body = new FormData();
|
|
125511
125544
|
if (isBlobLike5(payload.RequestBody.file)) {
|
|
125512
125545
|
const file2 = payload.RequestBody.file;
|
|
@@ -125807,11 +125840,11 @@ function betaObservabilityCampaignsCreate(client, request, options) {
|
|
|
125807
125840
|
return new APIPromise4($do83(client, request, options));
|
|
125808
125841
|
}
|
|
125809
125842
|
async function $do83(client, request, options) {
|
|
125810
|
-
const
|
|
125811
|
-
if (!
|
|
125812
|
-
return [
|
|
125843
|
+
const parsed2 = safeParse3(request, (value2) => CreateCampaignRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
125844
|
+
if (!parsed2.ok) {
|
|
125845
|
+
return [parsed2, { status: "invalid" }];
|
|
125813
125846
|
}
|
|
125814
|
-
const payload =
|
|
125847
|
+
const payload = parsed2.value;
|
|
125815
125848
|
const body = encodeJSON("body", payload, { explode: true });
|
|
125816
125849
|
const path7 = pathToFunc("/v1/observability/campaigns")();
|
|
125817
125850
|
const headers = new Headers(compactMap({
|
|
@@ -125884,11 +125917,11 @@ function betaObservabilityCampaignsDelete(client, request, options) {
|
|
|
125884
125917
|
return new APIPromise4($do84(client, request, options));
|
|
125885
125918
|
}
|
|
125886
125919
|
async function $do84(client, request, options) {
|
|
125887
|
-
const
|
|
125888
|
-
if (!
|
|
125889
|
-
return [
|
|
125920
|
+
const parsed2 = safeParse3(request, (value2) => DeleteCampaignV1ObservabilityCampaignsCampaignIdDeleteRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
125921
|
+
if (!parsed2.ok) {
|
|
125922
|
+
return [parsed2, { status: "invalid" }];
|
|
125890
125923
|
}
|
|
125891
|
-
const payload =
|
|
125924
|
+
const payload = parsed2.value;
|
|
125892
125925
|
const body = null;
|
|
125893
125926
|
const pathParams = {
|
|
125894
125927
|
campaign_id: encodeSimple("campaign_id", payload.campaign_id, {
|
|
@@ -125967,11 +126000,11 @@ function betaObservabilityCampaignsFetch(client, request, options) {
|
|
|
125967
126000
|
return new APIPromise4($do85(client, request, options));
|
|
125968
126001
|
}
|
|
125969
126002
|
async function $do85(client, request, options) {
|
|
125970
|
-
const
|
|
125971
|
-
if (!
|
|
125972
|
-
return [
|
|
126003
|
+
const parsed2 = safeParse3(request, (value2) => GetCampaignByIdV1ObservabilityCampaignsCampaignIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
126004
|
+
if (!parsed2.ok) {
|
|
126005
|
+
return [parsed2, { status: "invalid" }];
|
|
125973
126006
|
}
|
|
125974
|
-
const payload =
|
|
126007
|
+
const payload = parsed2.value;
|
|
125975
126008
|
const body = null;
|
|
125976
126009
|
const pathParams = {
|
|
125977
126010
|
campaign_id: encodeSimple("campaign_id", payload.campaign_id, {
|
|
@@ -126050,11 +126083,11 @@ function betaObservabilityCampaignsFetchStatus(client, request, options) {
|
|
|
126050
126083
|
return new APIPromise4($do86(client, request, options));
|
|
126051
126084
|
}
|
|
126052
126085
|
async function $do86(client, request, options) {
|
|
126053
|
-
const
|
|
126054
|
-
if (!
|
|
126055
|
-
return [
|
|
126086
|
+
const parsed2 = safeParse3(request, (value2) => GetCampaignStatusByIdV1ObservabilityCampaignsCampaignIdStatusGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
126087
|
+
if (!parsed2.ok) {
|
|
126088
|
+
return [parsed2, { status: "invalid" }];
|
|
126056
126089
|
}
|
|
126057
|
-
const payload =
|
|
126090
|
+
const payload = parsed2.value;
|
|
126058
126091
|
const body = null;
|
|
126059
126092
|
const pathParams = {
|
|
126060
126093
|
campaign_id: encodeSimple("campaign_id", payload.campaign_id, {
|
|
@@ -126133,11 +126166,11 @@ function betaObservabilityCampaignsList(client, request, options) {
|
|
|
126133
126166
|
return new APIPromise4($do87(client, request, options));
|
|
126134
126167
|
}
|
|
126135
126168
|
async function $do87(client, request, options) {
|
|
126136
|
-
const
|
|
126137
|
-
if (!
|
|
126138
|
-
return [
|
|
126169
|
+
const parsed2 = safeParse3(request, (value2) => GetCampaignsV1ObservabilityCampaignsGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
126170
|
+
if (!parsed2.ok) {
|
|
126171
|
+
return [parsed2, { status: "invalid" }];
|
|
126139
126172
|
}
|
|
126140
|
-
const payload =
|
|
126173
|
+
const payload = parsed2.value;
|
|
126141
126174
|
const body = null;
|
|
126142
126175
|
const path7 = pathToFunc("/v1/observability/campaigns")();
|
|
126143
126176
|
const query = encodeFormQuery({
|
|
@@ -126216,11 +126249,11 @@ function betaObservabilityCampaignsListEvents(client, request, options) {
|
|
|
126216
126249
|
return new APIPromise4($do88(client, request, options));
|
|
126217
126250
|
}
|
|
126218
126251
|
async function $do88(client, request, options) {
|
|
126219
|
-
const
|
|
126220
|
-
if (!
|
|
126221
|
-
return [
|
|
126252
|
+
const parsed2 = safeParse3(request, (value2) => GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIdSelectedEventsGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
126253
|
+
if (!parsed2.ok) {
|
|
126254
|
+
return [parsed2, { status: "invalid" }];
|
|
126222
126255
|
}
|
|
126223
|
-
const payload =
|
|
126256
|
+
const payload = parsed2.value;
|
|
126224
126257
|
const body = null;
|
|
126225
126258
|
const pathParams = {
|
|
126226
126259
|
campaign_id: encodeSimple("campaign_id", payload.campaign_id, {
|
|
@@ -126357,11 +126390,11 @@ function betaObservabilityChatCompletionEventsFetch(client, request, options) {
|
|
|
126357
126390
|
return new APIPromise4($do89(client, request, options));
|
|
126358
126391
|
}
|
|
126359
126392
|
async function $do89(client, request, options) {
|
|
126360
|
-
const
|
|
126361
|
-
if (!
|
|
126362
|
-
return [
|
|
126393
|
+
const parsed2 = safeParse3(request, (value2) => GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
126394
|
+
if (!parsed2.ok) {
|
|
126395
|
+
return [parsed2, { status: "invalid" }];
|
|
126363
126396
|
}
|
|
126364
|
-
const payload =
|
|
126397
|
+
const payload = parsed2.value;
|
|
126365
126398
|
const body = null;
|
|
126366
126399
|
const pathParams = {
|
|
126367
126400
|
event_id: encodeSimple("event_id", payload.event_id, {
|
|
@@ -126440,11 +126473,11 @@ function betaObservabilityChatCompletionEventsFetchSimilarEvents(client, request
|
|
|
126440
126473
|
return new APIPromise4($do90(client, request, options));
|
|
126441
126474
|
}
|
|
126442
126475
|
async function $do90(client, request, options) {
|
|
126443
|
-
const
|
|
126444
|
-
if (!
|
|
126445
|
-
return [
|
|
126476
|
+
const parsed2 = safeParse3(request, (value2) => GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIdSimilarEventsGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
126477
|
+
if (!parsed2.ok) {
|
|
126478
|
+
return [parsed2, { status: "invalid" }];
|
|
126446
126479
|
}
|
|
126447
|
-
const payload =
|
|
126480
|
+
const payload = parsed2.value;
|
|
126448
126481
|
const body = null;
|
|
126449
126482
|
const pathParams = {
|
|
126450
126483
|
event_id: encodeSimple("event_id", payload.event_id, {
|
|
@@ -126523,11 +126556,11 @@ function betaObservabilityChatCompletionEventsJudge(client, request, options) {
|
|
|
126523
126556
|
return new APIPromise4($do91(client, request, options));
|
|
126524
126557
|
}
|
|
126525
126558
|
async function $do91(client, request, options) {
|
|
126526
|
-
const
|
|
126527
|
-
if (!
|
|
126528
|
-
return [
|
|
126559
|
+
const parsed2 = safeParse3(request, (value2) => JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIdLiveJudgingPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
126560
|
+
if (!parsed2.ok) {
|
|
126561
|
+
return [parsed2, { status: "invalid" }];
|
|
126529
126562
|
}
|
|
126530
|
-
const payload =
|
|
126563
|
+
const payload = parsed2.value;
|
|
126531
126564
|
const body = encodeJSON("body", payload.JudgeChatCompletionEventRequest, {
|
|
126532
126565
|
explode: true
|
|
126533
126566
|
});
|
|
@@ -126609,11 +126642,11 @@ function betaObservabilityChatCompletionEventsSearch(client, request, options) {
|
|
|
126609
126642
|
return new APIPromise4($do92(client, request, options));
|
|
126610
126643
|
}
|
|
126611
126644
|
async function $do92(client, request, options) {
|
|
126612
|
-
const
|
|
126613
|
-
if (!
|
|
126614
|
-
return [
|
|
126645
|
+
const parsed2 = safeParse3(request, (value2) => GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
126646
|
+
if (!parsed2.ok) {
|
|
126647
|
+
return [parsed2, { status: "invalid" }];
|
|
126615
126648
|
}
|
|
126616
|
-
const payload =
|
|
126649
|
+
const payload = parsed2.value;
|
|
126617
126650
|
const body = encodeJSON("body", payload.SearchChatCompletionEventsRequest, {
|
|
126618
126651
|
explode: true
|
|
126619
126652
|
});
|
|
@@ -126694,11 +126727,11 @@ function betaObservabilityChatCompletionEventsSearchIds(client, request, options
|
|
|
126694
126727
|
return new APIPromise4($do93(client, request, options));
|
|
126695
126728
|
}
|
|
126696
126729
|
async function $do93(client, request, options) {
|
|
126697
|
-
const
|
|
126698
|
-
if (!
|
|
126699
|
-
return [
|
|
126730
|
+
const parsed2 = safeParse3(request, (value2) => SearchChatCompletionEventIdsRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
126731
|
+
if (!parsed2.ok) {
|
|
126732
|
+
return [parsed2, { status: "invalid" }];
|
|
126700
126733
|
}
|
|
126701
|
-
const payload =
|
|
126734
|
+
const payload = parsed2.value;
|
|
126702
126735
|
const body = encodeJSON("body", payload, { explode: true });
|
|
126703
126736
|
const path7 = pathToFunc("/v1/observability/chat-completion-events/search-ids")();
|
|
126704
126737
|
const headers = new Headers(compactMap({
|
|
@@ -126771,11 +126804,11 @@ function betaObservabilityChatCompletionEventsFieldsFetchOptionCounts(client, re
|
|
|
126771
126804
|
return new APIPromise4($do94(client, request, options));
|
|
126772
126805
|
}
|
|
126773
126806
|
async function $do94(client, request, options) {
|
|
126774
|
-
const
|
|
126775
|
-
if (!
|
|
126776
|
-
return [
|
|
126807
|
+
const parsed2 = safeParse3(request, (value2) => GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
126808
|
+
if (!parsed2.ok) {
|
|
126809
|
+
return [parsed2, { status: "invalid" }];
|
|
126777
126810
|
}
|
|
126778
|
-
const payload =
|
|
126811
|
+
const payload = parsed2.value;
|
|
126779
126812
|
const body = encodeJSON("body", payload.FetchFieldOptionCountsRequest, {
|
|
126780
126813
|
explode: true
|
|
126781
126814
|
});
|
|
@@ -126857,11 +126890,11 @@ function betaObservabilityChatCompletionEventsFieldsFetchOptions(client, request
|
|
|
126857
126890
|
return new APIPromise4($do95(client, request, options));
|
|
126858
126891
|
}
|
|
126859
126892
|
async function $do95(client, request, options) {
|
|
126860
|
-
const
|
|
126861
|
-
if (!
|
|
126862
|
-
return [
|
|
126893
|
+
const parsed2 = safeParse3(request, (value2) => GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
126894
|
+
if (!parsed2.ok) {
|
|
126895
|
+
return [parsed2, { status: "invalid" }];
|
|
126863
126896
|
}
|
|
126864
|
-
const payload =
|
|
126897
|
+
const payload = parsed2.value;
|
|
126865
126898
|
const body = null;
|
|
126866
126899
|
const pathParams = {
|
|
126867
126900
|
field_name: encodeSimple("field_name", payload.field_name, {
|
|
@@ -127094,11 +127127,11 @@ function betaObservabilityDatasetsCreate(client, request, options) {
|
|
|
127094
127127
|
return new APIPromise4($do97(client, request, options));
|
|
127095
127128
|
}
|
|
127096
127129
|
async function $do97(client, request, options) {
|
|
127097
|
-
const
|
|
127098
|
-
if (!
|
|
127099
|
-
return [
|
|
127130
|
+
const parsed2 = safeParse3(request, (value2) => CreateDatasetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
127131
|
+
if (!parsed2.ok) {
|
|
127132
|
+
return [parsed2, { status: "invalid" }];
|
|
127100
127133
|
}
|
|
127101
|
-
const payload =
|
|
127134
|
+
const payload = parsed2.value;
|
|
127102
127135
|
const body = encodeJSON("body", payload, { explode: true });
|
|
127103
127136
|
const path7 = pathToFunc("/v1/observability/datasets")();
|
|
127104
127137
|
const headers = new Headers(compactMap({
|
|
@@ -127171,11 +127204,11 @@ function betaObservabilityDatasetsCreateRecord(client, request, options) {
|
|
|
127171
127204
|
return new APIPromise4($do98(client, request, options));
|
|
127172
127205
|
}
|
|
127173
127206
|
async function $do98(client, request, options) {
|
|
127174
|
-
const
|
|
127175
|
-
if (!
|
|
127176
|
-
return [
|
|
127207
|
+
const parsed2 = safeParse3(request, (value2) => CreateDatasetRecordV1ObservabilityDatasetsDatasetIdRecordsPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
127208
|
+
if (!parsed2.ok) {
|
|
127209
|
+
return [parsed2, { status: "invalid" }];
|
|
127177
127210
|
}
|
|
127178
|
-
const payload =
|
|
127211
|
+
const payload = parsed2.value;
|
|
127179
127212
|
const body = encodeJSON("body", payload.CreateDatasetRecordRequest, {
|
|
127180
127213
|
explode: true
|
|
127181
127214
|
});
|
|
@@ -127257,11 +127290,11 @@ function betaObservabilityDatasetsDelete(client, request, options) {
|
|
|
127257
127290
|
return new APIPromise4($do99(client, request, options));
|
|
127258
127291
|
}
|
|
127259
127292
|
async function $do99(client, request, options) {
|
|
127260
|
-
const
|
|
127261
|
-
if (!
|
|
127262
|
-
return [
|
|
127293
|
+
const parsed2 = safeParse3(request, (value2) => DeleteDatasetV1ObservabilityDatasetsDatasetIdDeleteRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
127294
|
+
if (!parsed2.ok) {
|
|
127295
|
+
return [parsed2, { status: "invalid" }];
|
|
127263
127296
|
}
|
|
127264
|
-
const payload =
|
|
127297
|
+
const payload = parsed2.value;
|
|
127265
127298
|
const body = null;
|
|
127266
127299
|
const pathParams = {
|
|
127267
127300
|
dataset_id: encodeSimple("dataset_id", payload.dataset_id, {
|
|
@@ -127340,11 +127373,11 @@ function betaObservabilityDatasetsExportToJsonl(client, request, options) {
|
|
|
127340
127373
|
return new APIPromise4($do100(client, request, options));
|
|
127341
127374
|
}
|
|
127342
127375
|
async function $do100(client, request, options) {
|
|
127343
|
-
const
|
|
127344
|
-
if (!
|
|
127345
|
-
return [
|
|
127376
|
+
const parsed2 = safeParse3(request, (value2) => ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIdExportsToJsonlGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
127377
|
+
if (!parsed2.ok) {
|
|
127378
|
+
return [parsed2, { status: "invalid" }];
|
|
127346
127379
|
}
|
|
127347
|
-
const payload =
|
|
127380
|
+
const payload = parsed2.value;
|
|
127348
127381
|
const body = null;
|
|
127349
127382
|
const pathParams = {
|
|
127350
127383
|
dataset_id: encodeSimple("dataset_id", payload.dataset_id, {
|
|
@@ -127423,11 +127456,11 @@ function betaObservabilityDatasetsFetch(client, request, options) {
|
|
|
127423
127456
|
return new APIPromise4($do101(client, request, options));
|
|
127424
127457
|
}
|
|
127425
127458
|
async function $do101(client, request, options) {
|
|
127426
|
-
const
|
|
127427
|
-
if (!
|
|
127428
|
-
return [
|
|
127459
|
+
const parsed2 = safeParse3(request, (value2) => GetDatasetByIdV1ObservabilityDatasetsDatasetIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
127460
|
+
if (!parsed2.ok) {
|
|
127461
|
+
return [parsed2, { status: "invalid" }];
|
|
127429
127462
|
}
|
|
127430
|
-
const payload =
|
|
127463
|
+
const payload = parsed2.value;
|
|
127431
127464
|
const body = null;
|
|
127432
127465
|
const pathParams = {
|
|
127433
127466
|
dataset_id: encodeSimple("dataset_id", payload.dataset_id, {
|
|
@@ -127506,11 +127539,11 @@ function betaObservabilityDatasetsFetchTask(client, request, options) {
|
|
|
127506
127539
|
return new APIPromise4($do102(client, request, options));
|
|
127507
127540
|
}
|
|
127508
127541
|
async function $do102(client, request, options) {
|
|
127509
|
-
const
|
|
127510
|
-
if (!
|
|
127511
|
-
return [
|
|
127542
|
+
const parsed2 = safeParse3(request, (value2) => GetDatasetImportTaskV1ObservabilityDatasetsDatasetIdTasksTaskIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
127543
|
+
if (!parsed2.ok) {
|
|
127544
|
+
return [parsed2, { status: "invalid" }];
|
|
127512
127545
|
}
|
|
127513
|
-
const payload =
|
|
127546
|
+
const payload = parsed2.value;
|
|
127514
127547
|
const body = null;
|
|
127515
127548
|
const pathParams = {
|
|
127516
127549
|
dataset_id: encodeSimple("dataset_id", payload.dataset_id, {
|
|
@@ -127593,11 +127626,11 @@ function betaObservabilityDatasetsImportFromCampaign(client, request, options) {
|
|
|
127593
127626
|
return new APIPromise4($do103(client, request, options));
|
|
127594
127627
|
}
|
|
127595
127628
|
async function $do103(client, request, options) {
|
|
127596
|
-
const
|
|
127597
|
-
if (!
|
|
127598
|
-
return [
|
|
127629
|
+
const parsed2 = safeParse3(request, (value2) => PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIdImportsFromCampaignPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
127630
|
+
if (!parsed2.ok) {
|
|
127631
|
+
return [parsed2, { status: "invalid" }];
|
|
127599
127632
|
}
|
|
127600
|
-
const payload =
|
|
127633
|
+
const payload = parsed2.value;
|
|
127601
127634
|
const body = encodeJSON("body", payload.ImportDatasetFromCampaignRequest, {
|
|
127602
127635
|
explode: true
|
|
127603
127636
|
});
|
|
@@ -127679,11 +127712,11 @@ function betaObservabilityDatasetsImportFromDatasetRecords(client, request, opti
|
|
|
127679
127712
|
return new APIPromise4($do104(client, request, options));
|
|
127680
127713
|
}
|
|
127681
127714
|
async function $do104(client, request, options) {
|
|
127682
|
-
const
|
|
127683
|
-
if (!
|
|
127684
|
-
return [
|
|
127715
|
+
const parsed2 = safeParse3(request, (value2) => PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIdImportsFromDatasetPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
127716
|
+
if (!parsed2.ok) {
|
|
127717
|
+
return [parsed2, { status: "invalid" }];
|
|
127685
127718
|
}
|
|
127686
|
-
const payload =
|
|
127719
|
+
const payload = parsed2.value;
|
|
127687
127720
|
const body = encodeJSON("body", payload.ImportDatasetFromDatasetRequest, {
|
|
127688
127721
|
explode: true
|
|
127689
127722
|
});
|
|
@@ -127765,11 +127798,11 @@ function betaObservabilityDatasetsImportFromExplorer(client, request, options) {
|
|
|
127765
127798
|
return new APIPromise4($do105(client, request, options));
|
|
127766
127799
|
}
|
|
127767
127800
|
async function $do105(client, request, options) {
|
|
127768
|
-
const
|
|
127769
|
-
if (!
|
|
127770
|
-
return [
|
|
127801
|
+
const parsed2 = safeParse3(request, (value2) => PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIdImportsFromExplorerPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
127802
|
+
if (!parsed2.ok) {
|
|
127803
|
+
return [parsed2, { status: "invalid" }];
|
|
127771
127804
|
}
|
|
127772
|
-
const payload =
|
|
127805
|
+
const payload = parsed2.value;
|
|
127773
127806
|
const body = encodeJSON("body", payload.ImportDatasetFromExplorerRequest, {
|
|
127774
127807
|
explode: true
|
|
127775
127808
|
});
|
|
@@ -127851,11 +127884,11 @@ function betaObservabilityDatasetsImportFromFile(client, request, options) {
|
|
|
127851
127884
|
return new APIPromise4($do106(client, request, options));
|
|
127852
127885
|
}
|
|
127853
127886
|
async function $do106(client, request, options) {
|
|
127854
|
-
const
|
|
127855
|
-
if (!
|
|
127856
|
-
return [
|
|
127887
|
+
const parsed2 = safeParse3(request, (value2) => PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIdImportsFromFilePostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
127888
|
+
if (!parsed2.ok) {
|
|
127889
|
+
return [parsed2, { status: "invalid" }];
|
|
127857
127890
|
}
|
|
127858
|
-
const payload =
|
|
127891
|
+
const payload = parsed2.value;
|
|
127859
127892
|
const body = encodeJSON("body", payload.ImportDatasetFromFileRequest, {
|
|
127860
127893
|
explode: true
|
|
127861
127894
|
});
|
|
@@ -127937,11 +127970,11 @@ function betaObservabilityDatasetsImportFromPlayground(client, request, options)
|
|
|
127937
127970
|
return new APIPromise4($do107(client, request, options));
|
|
127938
127971
|
}
|
|
127939
127972
|
async function $do107(client, request, options) {
|
|
127940
|
-
const
|
|
127941
|
-
if (!
|
|
127942
|
-
return [
|
|
127973
|
+
const parsed2 = safeParse3(request, (value2) => PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIdImportsFromPlaygroundPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
127974
|
+
if (!parsed2.ok) {
|
|
127975
|
+
return [parsed2, { status: "invalid" }];
|
|
127943
127976
|
}
|
|
127944
|
-
const payload =
|
|
127977
|
+
const payload = parsed2.value;
|
|
127945
127978
|
const body = encodeJSON("body", payload.ImportDatasetFromPlaygroundRequest, {
|
|
127946
127979
|
explode: true
|
|
127947
127980
|
});
|
|
@@ -128023,11 +128056,11 @@ function betaObservabilityDatasetsList(client, request, options) {
|
|
|
128023
128056
|
return new APIPromise4($do108(client, request, options));
|
|
128024
128057
|
}
|
|
128025
128058
|
async function $do108(client, request, options) {
|
|
128026
|
-
const
|
|
128027
|
-
if (!
|
|
128028
|
-
return [
|
|
128059
|
+
const parsed2 = safeParse3(request, (value2) => GetDatasetsV1ObservabilityDatasetsGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
128060
|
+
if (!parsed2.ok) {
|
|
128061
|
+
return [parsed2, { status: "invalid" }];
|
|
128029
128062
|
}
|
|
128030
|
-
const payload =
|
|
128063
|
+
const payload = parsed2.value;
|
|
128031
128064
|
const body = null;
|
|
128032
128065
|
const path7 = pathToFunc("/v1/observability/datasets")();
|
|
128033
128066
|
const query = encodeFormQuery({
|
|
@@ -128106,11 +128139,11 @@ function betaObservabilityDatasetsListRecords(client, request, options) {
|
|
|
128106
128139
|
return new APIPromise4($do109(client, request, options));
|
|
128107
128140
|
}
|
|
128108
128141
|
async function $do109(client, request, options) {
|
|
128109
|
-
const
|
|
128110
|
-
if (!
|
|
128111
|
-
return [
|
|
128142
|
+
const parsed2 = safeParse3(request, (value2) => GetDatasetRecordsV1ObservabilityDatasetsDatasetIdRecordsGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
128143
|
+
if (!parsed2.ok) {
|
|
128144
|
+
return [parsed2, { status: "invalid" }];
|
|
128112
128145
|
}
|
|
128113
|
-
const payload =
|
|
128146
|
+
const payload = parsed2.value;
|
|
128114
128147
|
const body = null;
|
|
128115
128148
|
const pathParams = {
|
|
128116
128149
|
dataset_id: encodeSimple("dataset_id", payload.dataset_id, {
|
|
@@ -128194,11 +128227,11 @@ function betaObservabilityDatasetsListTasks(client, request, options) {
|
|
|
128194
128227
|
return new APIPromise4($do110(client, request, options));
|
|
128195
128228
|
}
|
|
128196
128229
|
async function $do110(client, request, options) {
|
|
128197
|
-
const
|
|
128198
|
-
if (!
|
|
128199
|
-
return [
|
|
128230
|
+
const parsed2 = safeParse3(request, (value2) => GetDatasetImportTasksV1ObservabilityDatasetsDatasetIdTasksGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
128231
|
+
if (!parsed2.ok) {
|
|
128232
|
+
return [parsed2, { status: "invalid" }];
|
|
128200
128233
|
}
|
|
128201
|
-
const payload =
|
|
128234
|
+
const payload = parsed2.value;
|
|
128202
128235
|
const body = null;
|
|
128203
128236
|
const pathParams = {
|
|
128204
128237
|
dataset_id: encodeSimple("dataset_id", payload.dataset_id, {
|
|
@@ -128282,11 +128315,11 @@ function betaObservabilityDatasetsUpdate(client, request, options) {
|
|
|
128282
128315
|
return new APIPromise4($do111(client, request, options));
|
|
128283
128316
|
}
|
|
128284
128317
|
async function $do111(client, request, options) {
|
|
128285
|
-
const
|
|
128286
|
-
if (!
|
|
128287
|
-
return [
|
|
128318
|
+
const parsed2 = safeParse3(request, (value2) => UpdateDatasetV1ObservabilityDatasetsDatasetIdPatchRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
128319
|
+
if (!parsed2.ok) {
|
|
128320
|
+
return [parsed2, { status: "invalid" }];
|
|
128288
128321
|
}
|
|
128289
|
-
const payload =
|
|
128322
|
+
const payload = parsed2.value;
|
|
128290
128323
|
const body = encodeJSON("body", payload.UpdateDatasetRequest, {
|
|
128291
128324
|
explode: true
|
|
128292
128325
|
});
|
|
@@ -128368,11 +128401,11 @@ function betaObservabilityDatasetsRecordsBulkDelete(client, request, options) {
|
|
|
128368
128401
|
return new APIPromise4($do112(client, request, options));
|
|
128369
128402
|
}
|
|
128370
128403
|
async function $do112(client, request, options) {
|
|
128371
|
-
const
|
|
128372
|
-
if (!
|
|
128373
|
-
return [
|
|
128404
|
+
const parsed2 = safeParse3(request, (value2) => DeleteDatasetRecordsRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
128405
|
+
if (!parsed2.ok) {
|
|
128406
|
+
return [parsed2, { status: "invalid" }];
|
|
128374
128407
|
}
|
|
128375
|
-
const payload =
|
|
128408
|
+
const payload = parsed2.value;
|
|
128376
128409
|
const body = encodeJSON("body", payload, { explode: true });
|
|
128377
128410
|
const path7 = pathToFunc("/v1/observability/dataset-records/bulk-delete")();
|
|
128378
128411
|
const headers = new Headers(compactMap({
|
|
@@ -128446,11 +128479,11 @@ function betaObservabilityDatasetsRecordsDelete(client, request, options) {
|
|
|
128446
128479
|
return new APIPromise4($do113(client, request, options));
|
|
128447
128480
|
}
|
|
128448
128481
|
async function $do113(client, request, options) {
|
|
128449
|
-
const
|
|
128450
|
-
if (!
|
|
128451
|
-
return [
|
|
128482
|
+
const parsed2 = safeParse3(request, (value2) => DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIdDeleteRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
128483
|
+
if (!parsed2.ok) {
|
|
128484
|
+
return [parsed2, { status: "invalid" }];
|
|
128452
128485
|
}
|
|
128453
|
-
const payload =
|
|
128486
|
+
const payload = parsed2.value;
|
|
128454
128487
|
const body = null;
|
|
128455
128488
|
const pathParams = {
|
|
128456
128489
|
dataset_record_id: encodeSimple("dataset_record_id", payload.dataset_record_id, { explode: false, charEncoding: "percent" })
|
|
@@ -128526,11 +128559,11 @@ function betaObservabilityDatasetsRecordsFetch(client, request, options) {
|
|
|
128526
128559
|
return new APIPromise4($do114(client, request, options));
|
|
128527
128560
|
}
|
|
128528
128561
|
async function $do114(client, request, options) {
|
|
128529
|
-
const
|
|
128530
|
-
if (!
|
|
128531
|
-
return [
|
|
128562
|
+
const parsed2 = safeParse3(request, (value2) => GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
128563
|
+
if (!parsed2.ok) {
|
|
128564
|
+
return [parsed2, { status: "invalid" }];
|
|
128532
128565
|
}
|
|
128533
|
-
const payload =
|
|
128566
|
+
const payload = parsed2.value;
|
|
128534
128567
|
const body = null;
|
|
128535
128568
|
const pathParams = {
|
|
128536
128569
|
dataset_record_id: encodeSimple("dataset_record_id", payload.dataset_record_id, { explode: false, charEncoding: "percent" })
|
|
@@ -128606,11 +128639,11 @@ function betaObservabilityDatasetsRecordsJudge(client, request, options) {
|
|
|
128606
128639
|
return new APIPromise4($do115(client, request, options));
|
|
128607
128640
|
}
|
|
128608
128641
|
async function $do115(client, request, options) {
|
|
128609
|
-
const
|
|
128610
|
-
if (!
|
|
128611
|
-
return [
|
|
128642
|
+
const parsed2 = safeParse3(request, (value2) => JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIdLiveJudgingPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
128643
|
+
if (!parsed2.ok) {
|
|
128644
|
+
return [parsed2, { status: "invalid" }];
|
|
128612
128645
|
}
|
|
128613
|
-
const payload =
|
|
128646
|
+
const payload = parsed2.value;
|
|
128614
128647
|
const body = encodeJSON("body", payload.JudgeDatasetRecordRequest, {
|
|
128615
128648
|
explode: true
|
|
128616
128649
|
});
|
|
@@ -128689,11 +128722,11 @@ function betaObservabilityDatasetsRecordsUpdatePayload(client, request, options)
|
|
|
128689
128722
|
return new APIPromise4($do116(client, request, options));
|
|
128690
128723
|
}
|
|
128691
128724
|
async function $do116(client, request, options) {
|
|
128692
|
-
const
|
|
128693
|
-
if (!
|
|
128694
|
-
return [
|
|
128725
|
+
const parsed2 = safeParse3(request, (value2) => UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIdPayloadPutRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
128726
|
+
if (!parsed2.ok) {
|
|
128727
|
+
return [parsed2, { status: "invalid" }];
|
|
128695
128728
|
}
|
|
128696
|
-
const payload =
|
|
128729
|
+
const payload = parsed2.value;
|
|
128697
128730
|
const body = encodeJSON("body", payload.UpdateDatasetRecordPayloadRequest, {
|
|
128698
128731
|
explode: true
|
|
128699
128732
|
});
|
|
@@ -128772,11 +128805,11 @@ function betaObservabilityDatasetsRecordsUpdateProperties(client, request, optio
|
|
|
128772
128805
|
return new APIPromise4($do117(client, request, options));
|
|
128773
128806
|
}
|
|
128774
128807
|
async function $do117(client, request, options) {
|
|
128775
|
-
const
|
|
128776
|
-
if (!
|
|
128777
|
-
return [
|
|
128808
|
+
const parsed2 = safeParse3(request, (value2) => UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIdPropertiesPutRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
128809
|
+
if (!parsed2.ok) {
|
|
128810
|
+
return [parsed2, { status: "invalid" }];
|
|
128778
128811
|
}
|
|
128779
|
-
const payload =
|
|
128812
|
+
const payload = parsed2.value;
|
|
128780
128813
|
const body = encodeJSON("body", payload.UpdateDatasetRecordPropertiesRequest, { explode: true });
|
|
128781
128814
|
const pathParams = {
|
|
128782
128815
|
dataset_record_id: encodeSimple("dataset_record_id", payload.dataset_record_id, { explode: false, charEncoding: "percent" })
|
|
@@ -129027,11 +129060,11 @@ function betaObservabilityJudgesCreate(client, request, options) {
|
|
|
129027
129060
|
return new APIPromise4($do118(client, request, options));
|
|
129028
129061
|
}
|
|
129029
129062
|
async function $do118(client, request, options) {
|
|
129030
|
-
const
|
|
129031
|
-
if (!
|
|
129032
|
-
return [
|
|
129063
|
+
const parsed2 = safeParse3(request, (value2) => CreateJudgeRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
129064
|
+
if (!parsed2.ok) {
|
|
129065
|
+
return [parsed2, { status: "invalid" }];
|
|
129033
129066
|
}
|
|
129034
|
-
const payload =
|
|
129067
|
+
const payload = parsed2.value;
|
|
129035
129068
|
const body = encodeJSON("body", payload, { explode: true });
|
|
129036
129069
|
const path7 = pathToFunc("/v1/observability/judges")();
|
|
129037
129070
|
const headers = new Headers(compactMap({
|
|
@@ -129104,11 +129137,11 @@ function betaObservabilityJudgesDelete(client, request, options) {
|
|
|
129104
129137
|
return new APIPromise4($do119(client, request, options));
|
|
129105
129138
|
}
|
|
129106
129139
|
async function $do119(client, request, options) {
|
|
129107
|
-
const
|
|
129108
|
-
if (!
|
|
129109
|
-
return [
|
|
129140
|
+
const parsed2 = safeParse3(request, (value2) => DeleteJudgeV1ObservabilityJudgesJudgeIdDeleteRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
129141
|
+
if (!parsed2.ok) {
|
|
129142
|
+
return [parsed2, { status: "invalid" }];
|
|
129110
129143
|
}
|
|
129111
|
-
const payload =
|
|
129144
|
+
const payload = parsed2.value;
|
|
129112
129145
|
const body = null;
|
|
129113
129146
|
const pathParams = {
|
|
129114
129147
|
judge_id: encodeSimple("judge_id", payload.judge_id, {
|
|
@@ -129187,11 +129220,11 @@ function betaObservabilityJudgesFetch(client, request, options) {
|
|
|
129187
129220
|
return new APIPromise4($do120(client, request, options));
|
|
129188
129221
|
}
|
|
129189
129222
|
async function $do120(client, request, options) {
|
|
129190
|
-
const
|
|
129191
|
-
if (!
|
|
129192
|
-
return [
|
|
129223
|
+
const parsed2 = safeParse3(request, (value2) => GetJudgeByIdV1ObservabilityJudgesJudgeIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
129224
|
+
if (!parsed2.ok) {
|
|
129225
|
+
return [parsed2, { status: "invalid" }];
|
|
129193
129226
|
}
|
|
129194
|
-
const payload =
|
|
129227
|
+
const payload = parsed2.value;
|
|
129195
129228
|
const body = null;
|
|
129196
129229
|
const pathParams = {
|
|
129197
129230
|
judge_id: encodeSimple("judge_id", payload.judge_id, {
|
|
@@ -129270,11 +129303,11 @@ function betaObservabilityJudgesJudgeConversation(client, request, options) {
|
|
|
129270
129303
|
return new APIPromise4($do121(client, request, options));
|
|
129271
129304
|
}
|
|
129272
129305
|
async function $do121(client, request, options) {
|
|
129273
|
-
const
|
|
129274
|
-
if (!
|
|
129275
|
-
return [
|
|
129306
|
+
const parsed2 = safeParse3(request, (value2) => JudgeConversationV1ObservabilityJudgesJudgeIdLiveJudgingPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
129307
|
+
if (!parsed2.ok) {
|
|
129308
|
+
return [parsed2, { status: "invalid" }];
|
|
129276
129309
|
}
|
|
129277
|
-
const payload =
|
|
129310
|
+
const payload = parsed2.value;
|
|
129278
129311
|
const body = encodeJSON("body", payload.JudgeConversationRequest, {
|
|
129279
129312
|
explode: true
|
|
129280
129313
|
});
|
|
@@ -129356,11 +129389,11 @@ function betaObservabilityJudgesList(client, request, options) {
|
|
|
129356
129389
|
return new APIPromise4($do122(client, request, options));
|
|
129357
129390
|
}
|
|
129358
129391
|
async function $do122(client, request, options) {
|
|
129359
|
-
const
|
|
129360
|
-
if (!
|
|
129361
|
-
return [
|
|
129392
|
+
const parsed2 = safeParse3(request, (value2) => GetJudgesV1ObservabilityJudgesGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
129393
|
+
if (!parsed2.ok) {
|
|
129394
|
+
return [parsed2, { status: "invalid" }];
|
|
129362
129395
|
}
|
|
129363
|
-
const payload =
|
|
129396
|
+
const payload = parsed2.value;
|
|
129364
129397
|
const body = null;
|
|
129365
129398
|
const path7 = pathToFunc("/v1/observability/judges")();
|
|
129366
129399
|
const query = encodeFormQuery({
|
|
@@ -129441,11 +129474,11 @@ function betaObservabilityJudgesUpdate(client, request, options) {
|
|
|
129441
129474
|
return new APIPromise4($do123(client, request, options));
|
|
129442
129475
|
}
|
|
129443
129476
|
async function $do123(client, request, options) {
|
|
129444
|
-
const
|
|
129445
|
-
if (!
|
|
129446
|
-
return [
|
|
129477
|
+
const parsed2 = safeParse3(request, (value2) => UpdateJudgeV1ObservabilityJudgesJudgeIdPutRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
129478
|
+
if (!parsed2.ok) {
|
|
129479
|
+
return [parsed2, { status: "invalid" }];
|
|
129447
129480
|
}
|
|
129448
|
-
const payload =
|
|
129481
|
+
const payload = parsed2.value;
|
|
129449
129482
|
const body = encodeJSON("body", payload.UpdateJudgeRequest, {
|
|
129450
129483
|
explode: true
|
|
129451
129484
|
});
|
|
@@ -129580,11 +129613,11 @@ function betaObservabilityLogsFetchOptions(client, request, options) {
|
|
|
129580
129613
|
return new APIPromise4($do124(client, request, options));
|
|
129581
129614
|
}
|
|
129582
129615
|
async function $do124(client, request, options) {
|
|
129583
|
-
const
|
|
129584
|
-
if (!
|
|
129585
|
-
return [
|
|
129616
|
+
const parsed2 = safeParse3(request, (value2) => GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
129617
|
+
if (!parsed2.ok) {
|
|
129618
|
+
return [parsed2, { status: "invalid" }];
|
|
129586
129619
|
}
|
|
129587
|
-
const payload =
|
|
129620
|
+
const payload = parsed2.value;
|
|
129588
129621
|
const body = null;
|
|
129589
129622
|
const pathParams = {
|
|
129590
129623
|
field_name: encodeSimple("field_name", payload.field_name, {
|
|
@@ -129735,11 +129768,11 @@ function betaObservabilityLogsSearch(client, request, options) {
|
|
|
129735
129768
|
return new APIPromise4($do126(client, request, options));
|
|
129736
129769
|
}
|
|
129737
129770
|
async function $do126(client, request, options) {
|
|
129738
|
-
const
|
|
129739
|
-
if (!
|
|
129740
|
-
return [
|
|
129771
|
+
const parsed2 = safeParse3(request, (value2) => SearchLogsV1ObservabilityLogsSearchPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
129772
|
+
if (!parsed2.ok) {
|
|
129773
|
+
return [parsed2, { status: "invalid" }];
|
|
129741
129774
|
}
|
|
129742
|
-
const payload =
|
|
129775
|
+
const payload = parsed2.value;
|
|
129743
129776
|
const body = encodeJSON("body", payload.LogsRequest, { explode: true });
|
|
129744
129777
|
const path7 = pathToFunc("/v1/observability/logs/search")();
|
|
129745
129778
|
const query = encodeFormQuery({
|
|
@@ -129852,11 +129885,11 @@ function betaObservabilitySpansFetchSpanEvalFieldOptions(client, request, option
|
|
|
129852
129885
|
return new APIPromise4($do127(client, request, options));
|
|
129853
129886
|
}
|
|
129854
129887
|
async function $do127(client, request, options) {
|
|
129855
|
-
const
|
|
129856
|
-
if (!
|
|
129857
|
-
return [
|
|
129888
|
+
const parsed2 = safeParse3(request, (value2) => GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
129889
|
+
if (!parsed2.ok) {
|
|
129890
|
+
return [parsed2, { status: "invalid" }];
|
|
129858
129891
|
}
|
|
129859
|
-
const payload =
|
|
129892
|
+
const payload = parsed2.value;
|
|
129860
129893
|
const body = null;
|
|
129861
129894
|
const pathParams = {
|
|
129862
129895
|
field_name: encodeSimple("field_name", payload.field_name, {
|
|
@@ -129940,11 +129973,11 @@ function betaObservabilitySpansFetchSpanFieldOptions(client, request, options) {
|
|
|
129940
129973
|
return new APIPromise4($do128(client, request, options));
|
|
129941
129974
|
}
|
|
129942
129975
|
async function $do128(client, request, options) {
|
|
129943
|
-
const
|
|
129944
|
-
if (!
|
|
129945
|
-
return [
|
|
129976
|
+
const parsed2 = safeParse3(request, (value2) => GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
129977
|
+
if (!parsed2.ok) {
|
|
129978
|
+
return [parsed2, { status: "invalid" }];
|
|
129946
129979
|
}
|
|
129947
|
-
const payload =
|
|
129980
|
+
const payload = parsed2.value;
|
|
129948
129981
|
const body = null;
|
|
129949
129982
|
const pathParams = {
|
|
129950
129983
|
field_name: encodeSimple("field_name", payload.field_name, {
|
|
@@ -130162,11 +130195,11 @@ function betaObservabilitySpansSearchLatestSpanEvaluations(client, request, opti
|
|
|
130162
130195
|
return new APIPromise4($do131(client, request, options));
|
|
130163
130196
|
}
|
|
130164
130197
|
async function $do131(client, request, options) {
|
|
130165
|
-
const
|
|
130166
|
-
if (!
|
|
130167
|
-
return [
|
|
130198
|
+
const parsed2 = safeParse3(request, (value2) => SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
130199
|
+
if (!parsed2.ok) {
|
|
130200
|
+
return [parsed2, { status: "invalid" }];
|
|
130168
130201
|
}
|
|
130169
|
-
const payload =
|
|
130202
|
+
const payload = parsed2.value;
|
|
130170
130203
|
const body = encodeJSON("body", payload.SpanEvaluationsRequest, {
|
|
130171
130204
|
explode: true
|
|
130172
130205
|
});
|
|
@@ -130249,11 +130282,11 @@ function betaObservabilitySpansSearchSpanEvaluations(client, request, options) {
|
|
|
130249
130282
|
return new APIPromise4($do132(client, request, options));
|
|
130250
130283
|
}
|
|
130251
130284
|
async function $do132(client, request, options) {
|
|
130252
|
-
const
|
|
130253
|
-
if (!
|
|
130254
|
-
return [
|
|
130285
|
+
const parsed2 = safeParse3(request, (value2) => SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
130286
|
+
if (!parsed2.ok) {
|
|
130287
|
+
return [parsed2, { status: "invalid" }];
|
|
130255
130288
|
}
|
|
130256
|
-
const payload =
|
|
130289
|
+
const payload = parsed2.value;
|
|
130257
130290
|
const body = encodeJSON("body", payload.SpanEvaluationsRequest, {
|
|
130258
130291
|
explode: true
|
|
130259
130292
|
});
|
|
@@ -130336,11 +130369,11 @@ function betaObservabilitySpansSearchSpans(client, request, options) {
|
|
|
130336
130369
|
return new APIPromise4($do133(client, request, options));
|
|
130337
130370
|
}
|
|
130338
130371
|
async function $do133(client, request, options) {
|
|
130339
|
-
const
|
|
130340
|
-
if (!
|
|
130341
|
-
return [
|
|
130372
|
+
const parsed2 = safeParse3(request, (value2) => SearchSpansV1ObservabilitySpansSearchPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
130373
|
+
if (!parsed2.ok) {
|
|
130374
|
+
return [parsed2, { status: "invalid" }];
|
|
130342
130375
|
}
|
|
130343
|
-
const payload =
|
|
130376
|
+
const payload = parsed2.value;
|
|
130344
130377
|
const body = encodeJSON("body", payload.SpansRequest, { explode: true });
|
|
130345
130378
|
const path7 = pathToFunc("/v1/observability/spans/search")();
|
|
130346
130379
|
const query = encodeFormQuery({
|
|
@@ -130481,11 +130514,11 @@ function betaObservabilityTracesFetchOptions(client, request, options) {
|
|
|
130481
130514
|
return new APIPromise4($do134(client, request, options));
|
|
130482
130515
|
}
|
|
130483
130516
|
async function $do134(client, request, options) {
|
|
130484
|
-
const
|
|
130485
|
-
if (!
|
|
130486
|
-
return [
|
|
130517
|
+
const parsed2 = safeParse3(request, (value2) => GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
130518
|
+
if (!parsed2.ok) {
|
|
130519
|
+
return [parsed2, { status: "invalid" }];
|
|
130487
130520
|
}
|
|
130488
|
-
const payload =
|
|
130521
|
+
const payload = parsed2.value;
|
|
130489
130522
|
const body = null;
|
|
130490
130523
|
const pathParams = {
|
|
130491
130524
|
field_name: encodeSimple("field_name", payload.field_name, {
|
|
@@ -130569,11 +130602,11 @@ function betaObservabilityTracesGetSpanById(client, request, options) {
|
|
|
130569
130602
|
return new APIPromise4($do135(client, request, options));
|
|
130570
130603
|
}
|
|
130571
130604
|
async function $do135(client, request, options) {
|
|
130572
|
-
const
|
|
130573
|
-
if (!
|
|
130574
|
-
return [
|
|
130605
|
+
const parsed2 = safeParse3(request, (value2) => GetSpanByIdV1ObservabilityTracesTraceIdSpansSpanIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
130606
|
+
if (!parsed2.ok) {
|
|
130607
|
+
return [parsed2, { status: "invalid" }];
|
|
130575
130608
|
}
|
|
130576
|
-
const payload =
|
|
130609
|
+
const payload = parsed2.value;
|
|
130577
130610
|
const body = null;
|
|
130578
130611
|
const pathParams = {
|
|
130579
130612
|
span_id: encodeSimple("span_id", payload.span_id, {
|
|
@@ -130661,11 +130694,11 @@ function betaObservabilityTracesGetTraceById(client, request, options) {
|
|
|
130661
130694
|
return new APIPromise4($do136(client, request, options));
|
|
130662
130695
|
}
|
|
130663
130696
|
async function $do136(client, request, options) {
|
|
130664
|
-
const
|
|
130665
|
-
if (!
|
|
130666
|
-
return [
|
|
130697
|
+
const parsed2 = safeParse3(request, (value2) => GetTraceByIdV1ObservabilityTracesTraceIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
130698
|
+
if (!parsed2.ok) {
|
|
130699
|
+
return [parsed2, { status: "invalid" }];
|
|
130667
130700
|
}
|
|
130668
|
-
const payload =
|
|
130701
|
+
const payload = parsed2.value;
|
|
130669
130702
|
const body = null;
|
|
130670
130703
|
const pathParams = {
|
|
130671
130704
|
trace_id: encodeSimple("trace_id", payload.trace_id, {
|
|
@@ -130811,11 +130844,11 @@ function betaObservabilityTracesGetTraceSpans(client, request, options) {
|
|
|
130811
130844
|
return new APIPromise4($do138(client, request, options));
|
|
130812
130845
|
}
|
|
130813
130846
|
async function $do138(client, request, options) {
|
|
130814
|
-
const
|
|
130815
|
-
if (!
|
|
130816
|
-
return [
|
|
130847
|
+
const parsed2 = safeParse3(request, (value2) => GetTraceSpansV1ObservabilityTracesTraceIdSpansGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
130848
|
+
if (!parsed2.ok) {
|
|
130849
|
+
return [parsed2, { status: "invalid" }];
|
|
130817
130850
|
}
|
|
130818
|
-
const payload =
|
|
130851
|
+
const payload = parsed2.value;
|
|
130819
130852
|
const body = null;
|
|
130820
130853
|
const pathParams = {
|
|
130821
130854
|
trace_id: encodeSimple("trace_id", payload.trace_id, {
|
|
@@ -130901,11 +130934,11 @@ function betaObservabilityTracesSearch(client, request, options) {
|
|
|
130901
130934
|
return new APIPromise4($do139(client, request, options));
|
|
130902
130935
|
}
|
|
130903
130936
|
async function $do139(client, request, options) {
|
|
130904
|
-
const
|
|
130905
|
-
if (!
|
|
130906
|
-
return [
|
|
130937
|
+
const parsed2 = safeParse3(request, (value2) => SearchTracesV1ObservabilityTracesSearchPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
130938
|
+
if (!parsed2.ok) {
|
|
130939
|
+
return [parsed2, { status: "invalid" }];
|
|
130907
130940
|
}
|
|
130908
|
-
const payload =
|
|
130941
|
+
const payload = parsed2.value;
|
|
130909
130942
|
const body = encodeJSON("body", payload.TracesRequest, { explode: true });
|
|
130910
130943
|
const path7 = pathToFunc("/v1/observability/traces/search")();
|
|
130911
130944
|
const query = encodeFormQuery({
|
|
@@ -131148,11 +131181,11 @@ function betaRagIngestionPipelineConfigurationsRegister(client, request, options
|
|
|
131148
131181
|
return new APIPromise4($do141(client, request, options));
|
|
131149
131182
|
}
|
|
131150
131183
|
async function $do141(client, request, options) {
|
|
131151
|
-
const
|
|
131152
|
-
if (!
|
|
131153
|
-
return [
|
|
131184
|
+
const parsed2 = safeParse3(request, (value2) => CreateIngestionPipelineConfigurationRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
131185
|
+
if (!parsed2.ok) {
|
|
131186
|
+
return [parsed2, { status: "invalid" }];
|
|
131154
131187
|
}
|
|
131155
|
-
const payload =
|
|
131188
|
+
const payload = parsed2.value;
|
|
131156
131189
|
const body = encodeJSON("body", payload, { explode: true });
|
|
131157
131190
|
const path7 = pathToFunc("/v1/rag/ingestion_pipeline_configurations")();
|
|
131158
131191
|
const headers = new Headers(compactMap({
|
|
@@ -131225,11 +131258,11 @@ function betaRagIngestionPipelineConfigurationsUpdateRunInfo(client, request, op
|
|
|
131225
131258
|
return new APIPromise4($do142(client, request, options));
|
|
131226
131259
|
}
|
|
131227
131260
|
async function $do142(client, request, options) {
|
|
131228
|
-
const
|
|
131229
|
-
if (!
|
|
131230
|
-
return [
|
|
131261
|
+
const parsed2 = safeParse3(request, (value2) => UpdateRunInfoV1RagIngestionPipelineConfigurationsIdRunInfoPutRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
131262
|
+
if (!parsed2.ok) {
|
|
131263
|
+
return [parsed2, { status: "invalid" }];
|
|
131231
131264
|
}
|
|
131232
|
-
const payload =
|
|
131265
|
+
const payload = parsed2.value;
|
|
131233
131266
|
const body = encodeJSON("body", payload.UpdateRunInfo, { explode: true });
|
|
131234
131267
|
const pathParams = {
|
|
131235
131268
|
id: encodeSimple("id", payload.id, {
|
|
@@ -131411,11 +131444,11 @@ function betaRagSearchIndexesRegister(client, request, options) {
|
|
|
131411
131444
|
return new APIPromise4($do144(client, request, options));
|
|
131412
131445
|
}
|
|
131413
131446
|
async function $do144(client, request, options) {
|
|
131414
|
-
const
|
|
131415
|
-
if (!
|
|
131416
|
-
return [
|
|
131447
|
+
const parsed2 = safeParse3(request, (value2) => CreateSearchIndexInfoRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
131448
|
+
if (!parsed2.ok) {
|
|
131449
|
+
return [parsed2, { status: "invalid" }];
|
|
131417
131450
|
}
|
|
131418
|
-
const payload =
|
|
131451
|
+
const payload = parsed2.value;
|
|
131419
131452
|
const body = encodeJSON("body", payload, { explode: true });
|
|
131420
131453
|
const path7 = pathToFunc("/v1/rag/search_index")();
|
|
131421
131454
|
const headers = new Headers(compactMap({
|
|
@@ -131573,11 +131606,11 @@ function chatComplete(client, request, options) {
|
|
|
131573
131606
|
return new APIPromise4($do145(client, request, options));
|
|
131574
131607
|
}
|
|
131575
131608
|
async function $do145(client, request, options) {
|
|
131576
|
-
const
|
|
131577
|
-
if (!
|
|
131578
|
-
return [
|
|
131609
|
+
const parsed2 = safeParse3(request, (value2) => ChatCompletionRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
131610
|
+
if (!parsed2.ok) {
|
|
131611
|
+
return [parsed2, { status: "invalid" }];
|
|
131579
131612
|
}
|
|
131580
|
-
const payload =
|
|
131613
|
+
const payload = parsed2.value;
|
|
131581
131614
|
const body = encodeJSON("body", payload, { explode: true });
|
|
131582
131615
|
const path7 = pathToFunc("/v1/chat/completions")();
|
|
131583
131616
|
const headers = new Headers(compactMap({
|
|
@@ -131650,11 +131683,11 @@ function chatStream(client, request, options) {
|
|
|
131650
131683
|
return new APIPromise4($do146(client, request, options));
|
|
131651
131684
|
}
|
|
131652
131685
|
async function $do146(client, request, options) {
|
|
131653
|
-
const
|
|
131654
|
-
if (!
|
|
131655
|
-
return [
|
|
131686
|
+
const parsed2 = safeParse3(request, (value2) => ChatCompletionStreamRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
131687
|
+
if (!parsed2.ok) {
|
|
131688
|
+
return [parsed2, { status: "invalid" }];
|
|
131656
131689
|
}
|
|
131657
|
-
const payload =
|
|
131690
|
+
const payload = parsed2.value;
|
|
131658
131691
|
const body = encodeJSON("body", payload, { explode: true });
|
|
131659
131692
|
const path7 = pathToFunc("/v1/chat/completions#stream")();
|
|
131660
131693
|
const headers = new Headers(compactMap({
|
|
@@ -137330,17 +137363,17 @@ function convertToParsedChatCompletionResponse(response, responseFormat) {
|
|
|
137330
137363
|
if (_choice.message === null || typeof _choice.message === "undefined") {
|
|
137331
137364
|
parsedChoices.push({ ..._choice, message: void 0 });
|
|
137332
137365
|
} else if (_choice.message.content !== null && typeof _choice.message.content !== "undefined" && !Array.isArray(_choice.message.content)) {
|
|
137333
|
-
let
|
|
137366
|
+
let parsed2;
|
|
137334
137367
|
try {
|
|
137335
|
-
|
|
137368
|
+
parsed2 = responseFormat.safeParse(JSON.parse(_choice.message.content)).data;
|
|
137336
137369
|
} catch {
|
|
137337
|
-
|
|
137370
|
+
parsed2 = void 0;
|
|
137338
137371
|
}
|
|
137339
137372
|
parsedChoices.push({
|
|
137340
137373
|
..._choice,
|
|
137341
137374
|
message: {
|
|
137342
137375
|
..._choice.message,
|
|
137343
|
-
parsed
|
|
137376
|
+
parsed: parsed2
|
|
137344
137377
|
}
|
|
137345
137378
|
});
|
|
137346
137379
|
} else {
|
|
@@ -137436,11 +137469,11 @@ function classifiersClassify(client, request, options) {
|
|
|
137436
137469
|
return new APIPromise4($do147(client, request, options));
|
|
137437
137470
|
}
|
|
137438
137471
|
async function $do147(client, request, options) {
|
|
137439
|
-
const
|
|
137440
|
-
if (!
|
|
137441
|
-
return [
|
|
137472
|
+
const parsed2 = safeParse3(request, (value2) => ClassificationRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
137473
|
+
if (!parsed2.ok) {
|
|
137474
|
+
return [parsed2, { status: "invalid" }];
|
|
137442
137475
|
}
|
|
137443
|
-
const payload =
|
|
137476
|
+
const payload = parsed2.value;
|
|
137444
137477
|
const body = encodeJSON("body", payload, { explode: true });
|
|
137445
137478
|
const path7 = pathToFunc("/v1/classifications")();
|
|
137446
137479
|
const headers = new Headers(compactMap({
|
|
@@ -137513,11 +137546,11 @@ function classifiersClassifyChat(client, request, options) {
|
|
|
137513
137546
|
return new APIPromise4($do148(client, request, options));
|
|
137514
137547
|
}
|
|
137515
137548
|
async function $do148(client, request, options) {
|
|
137516
|
-
const
|
|
137517
|
-
if (!
|
|
137518
|
-
return [
|
|
137549
|
+
const parsed2 = safeParse3(request, (value2) => ChatClassificationRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
137550
|
+
if (!parsed2.ok) {
|
|
137551
|
+
return [parsed2, { status: "invalid" }];
|
|
137519
137552
|
}
|
|
137520
|
-
const payload =
|
|
137553
|
+
const payload = parsed2.value;
|
|
137521
137554
|
const body = encodeJSON("body", payload, { explode: true });
|
|
137522
137555
|
const path7 = pathToFunc("/v1/chat/classifications")();
|
|
137523
137556
|
const headers = new Headers(compactMap({
|
|
@@ -137590,11 +137623,11 @@ function classifiersModerate(client, request, options) {
|
|
|
137590
137623
|
return new APIPromise4($do149(client, request, options));
|
|
137591
137624
|
}
|
|
137592
137625
|
async function $do149(client, request, options) {
|
|
137593
|
-
const
|
|
137594
|
-
if (!
|
|
137595
|
-
return [
|
|
137626
|
+
const parsed2 = safeParse3(request, (value2) => ClassificationRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
137627
|
+
if (!parsed2.ok) {
|
|
137628
|
+
return [parsed2, { status: "invalid" }];
|
|
137596
137629
|
}
|
|
137597
|
-
const payload =
|
|
137630
|
+
const payload = parsed2.value;
|
|
137598
137631
|
const body = encodeJSON("body", payload, { explode: true });
|
|
137599
137632
|
const path7 = pathToFunc("/v1/moderations")();
|
|
137600
137633
|
const headers = new Headers(compactMap({
|
|
@@ -137667,11 +137700,11 @@ function classifiersModerateChat(client, request, options) {
|
|
|
137667
137700
|
return new APIPromise4($do150(client, request, options));
|
|
137668
137701
|
}
|
|
137669
137702
|
async function $do150(client, request, options) {
|
|
137670
|
-
const
|
|
137671
|
-
if (!
|
|
137672
|
-
return [
|
|
137703
|
+
const parsed2 = safeParse3(request, (value2) => ChatModerationRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
137704
|
+
if (!parsed2.ok) {
|
|
137705
|
+
return [parsed2, { status: "invalid" }];
|
|
137673
137706
|
}
|
|
137674
|
-
const payload =
|
|
137707
|
+
const payload = parsed2.value;
|
|
137675
137708
|
const body = encodeJSON("body", payload, { explode: true });
|
|
137676
137709
|
const path7 = pathToFunc("/v1/chat/moderations")();
|
|
137677
137710
|
const headers = new Headers(compactMap({
|
|
@@ -137783,11 +137816,11 @@ function embeddingsCreate(client, request, options) {
|
|
|
137783
137816
|
return new APIPromise4($do151(client, request, options));
|
|
137784
137817
|
}
|
|
137785
137818
|
async function $do151(client, request, options) {
|
|
137786
|
-
const
|
|
137787
|
-
if (!
|
|
137788
|
-
return [
|
|
137819
|
+
const parsed2 = safeParse3(request, (value2) => EmbeddingRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
137820
|
+
if (!parsed2.ok) {
|
|
137821
|
+
return [parsed2, { status: "invalid" }];
|
|
137789
137822
|
}
|
|
137790
|
-
const payload =
|
|
137823
|
+
const payload = parsed2.value;
|
|
137791
137824
|
const body = encodeJSON("body", payload, { explode: true });
|
|
137792
137825
|
const path7 = pathToFunc("/v1/embeddings")();
|
|
137793
137826
|
const headers = new Headers(compactMap({
|
|
@@ -137881,11 +137914,11 @@ function eventsGetStreamEvents(client, request, options) {
|
|
|
137881
137914
|
return new APIPromise4($do152(client, request, options));
|
|
137882
137915
|
}
|
|
137883
137916
|
async function $do152(client, request, options) {
|
|
137884
|
-
const
|
|
137885
|
-
if (!
|
|
137886
|
-
return [
|
|
137917
|
+
const parsed2 = safeParse3(request, (value2) => GetStreamEventsV1WorkflowsEventsStreamGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
137918
|
+
if (!parsed2.ok) {
|
|
137919
|
+
return [parsed2, { status: "invalid" }];
|
|
137887
137920
|
}
|
|
137888
|
-
const payload =
|
|
137921
|
+
const payload = parsed2.value;
|
|
137889
137922
|
const body = null;
|
|
137890
137923
|
const path7 = pathToFunc("/v1/workflows/events/stream")();
|
|
137891
137924
|
const query = encodeFormQuery({
|
|
@@ -137984,11 +138017,11 @@ function eventsGetWorkflowEvents(client, request, options) {
|
|
|
137984
138017
|
return new APIPromise4($do153(client, request, options));
|
|
137985
138018
|
}
|
|
137986
138019
|
async function $do153(client, request, options) {
|
|
137987
|
-
const
|
|
137988
|
-
if (!
|
|
137989
|
-
return [
|
|
138020
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowEventsV1WorkflowsEventsListGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
138021
|
+
if (!parsed2.ok) {
|
|
138022
|
+
return [parsed2, { status: "invalid" }];
|
|
137990
138023
|
}
|
|
137991
|
-
const payload =
|
|
138024
|
+
const payload = parsed2.value;
|
|
137992
138025
|
const body = null;
|
|
137993
138026
|
const path7 = pathToFunc("/v1/workflows/events/list")();
|
|
137994
138027
|
const query = encodeFormQuery({
|
|
@@ -138094,11 +138127,11 @@ function filesDelete(client, request, options) {
|
|
|
138094
138127
|
return new APIPromise4($do154(client, request, options));
|
|
138095
138128
|
}
|
|
138096
138129
|
async function $do154(client, request, options) {
|
|
138097
|
-
const
|
|
138098
|
-
if (!
|
|
138099
|
-
return [
|
|
138130
|
+
const parsed2 = safeParse3(request, (value2) => FilesApiRoutesDeleteFileRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
138131
|
+
if (!parsed2.ok) {
|
|
138132
|
+
return [parsed2, { status: "invalid" }];
|
|
138100
138133
|
}
|
|
138101
|
-
const payload =
|
|
138134
|
+
const payload = parsed2.value;
|
|
138102
138135
|
const body = null;
|
|
138103
138136
|
const pathParams = {
|
|
138104
138137
|
file_id: encodeSimple("file_id", payload.file_id, {
|
|
@@ -138173,11 +138206,11 @@ function filesDownload(client, request, options) {
|
|
|
138173
138206
|
return new APIPromise4($do155(client, request, options));
|
|
138174
138207
|
}
|
|
138175
138208
|
async function $do155(client, request, options) {
|
|
138176
|
-
const
|
|
138177
|
-
if (!
|
|
138178
|
-
return [
|
|
138209
|
+
const parsed2 = safeParse3(request, (value2) => FilesApiRoutesDownloadFileRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
138210
|
+
if (!parsed2.ok) {
|
|
138211
|
+
return [parsed2, { status: "invalid" }];
|
|
138179
138212
|
}
|
|
138180
|
-
const payload =
|
|
138213
|
+
const payload = parsed2.value;
|
|
138181
138214
|
const body = null;
|
|
138182
138215
|
const pathParams = {
|
|
138183
138216
|
file_id: encodeSimple("file_id", payload.file_id, {
|
|
@@ -138252,11 +138285,11 @@ function filesGetSignedUrl(client, request, options) {
|
|
|
138252
138285
|
return new APIPromise4($do156(client, request, options));
|
|
138253
138286
|
}
|
|
138254
138287
|
async function $do156(client, request, options) {
|
|
138255
|
-
const
|
|
138256
|
-
if (!
|
|
138257
|
-
return [
|
|
138288
|
+
const parsed2 = safeParse3(request, (value2) => FilesApiRoutesGetSignedUrlRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
138289
|
+
if (!parsed2.ok) {
|
|
138290
|
+
return [parsed2, { status: "invalid" }];
|
|
138258
138291
|
}
|
|
138259
|
-
const payload =
|
|
138292
|
+
const payload = parsed2.value;
|
|
138260
138293
|
const body = null;
|
|
138261
138294
|
const pathParams = {
|
|
138262
138295
|
file_id: encodeSimple("file_id", payload.file_id, {
|
|
@@ -138335,11 +138368,11 @@ function filesList(client, request, options) {
|
|
|
138335
138368
|
return new APIPromise4($do157(client, request, options));
|
|
138336
138369
|
}
|
|
138337
138370
|
async function $do157(client, request, options) {
|
|
138338
|
-
const
|
|
138339
|
-
if (!
|
|
138340
|
-
return [
|
|
138371
|
+
const parsed2 = safeParse3(request, (value2) => FilesApiRoutesListFilesRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
138372
|
+
if (!parsed2.ok) {
|
|
138373
|
+
return [parsed2, { status: "invalid" }];
|
|
138341
138374
|
}
|
|
138342
|
-
const payload =
|
|
138375
|
+
const payload = parsed2.value;
|
|
138343
138376
|
const body = null;
|
|
138344
138377
|
const path7 = pathToFunc("/v1/files")();
|
|
138345
138378
|
const query = encodeFormQuery({
|
|
@@ -138419,11 +138452,11 @@ function filesRetrieve(client, request, options) {
|
|
|
138419
138452
|
return new APIPromise4($do158(client, request, options));
|
|
138420
138453
|
}
|
|
138421
138454
|
async function $do158(client, request, options) {
|
|
138422
|
-
const
|
|
138423
|
-
if (!
|
|
138424
|
-
return [
|
|
138455
|
+
const parsed2 = safeParse3(request, (value2) => FilesApiRoutesRetrieveFileRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
138456
|
+
if (!parsed2.ok) {
|
|
138457
|
+
return [parsed2, { status: "invalid" }];
|
|
138425
138458
|
}
|
|
138426
|
-
const payload =
|
|
138459
|
+
const payload = parsed2.value;
|
|
138427
138460
|
const body = null;
|
|
138428
138461
|
const pathParams = {
|
|
138429
138462
|
file_id: encodeSimple("file_id", payload.file_id, {
|
|
@@ -138498,11 +138531,11 @@ function filesUpload(client, request, options) {
|
|
|
138498
138531
|
return new APIPromise4($do159(client, request, options));
|
|
138499
138532
|
}
|
|
138500
138533
|
async function $do159(client, request, options) {
|
|
138501
|
-
const
|
|
138502
|
-
if (!
|
|
138503
|
-
return [
|
|
138534
|
+
const parsed2 = safeParse3(request, (value2) => MultiPartBodyParams$outboundSchema.parse(value2), "Input validation failed");
|
|
138535
|
+
if (!parsed2.ok) {
|
|
138536
|
+
return [parsed2, { status: "invalid" }];
|
|
138504
138537
|
}
|
|
138505
|
-
const payload =
|
|
138538
|
+
const payload = parsed2.value;
|
|
138506
138539
|
const body = new FormData();
|
|
138507
138540
|
if (isBlobLike5(payload.file)) {
|
|
138508
138541
|
const file2 = payload.file;
|
|
@@ -138668,11 +138701,11 @@ function fimComplete(client, request, options) {
|
|
|
138668
138701
|
return new APIPromise4($do160(client, request, options));
|
|
138669
138702
|
}
|
|
138670
138703
|
async function $do160(client, request, options) {
|
|
138671
|
-
const
|
|
138672
|
-
if (!
|
|
138673
|
-
return [
|
|
138704
|
+
const parsed2 = safeParse3(request, (value2) => FIMCompletionRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
138705
|
+
if (!parsed2.ok) {
|
|
138706
|
+
return [parsed2, { status: "invalid" }];
|
|
138674
138707
|
}
|
|
138675
|
-
const payload =
|
|
138708
|
+
const payload = parsed2.value;
|
|
138676
138709
|
const body = encodeJSON("body", payload, { explode: true });
|
|
138677
138710
|
const path7 = pathToFunc("/v1/fim/completions")();
|
|
138678
138711
|
const headers = new Headers(compactMap({
|
|
@@ -138745,11 +138778,11 @@ function fimStream(client, request, options) {
|
|
|
138745
138778
|
return new APIPromise4($do161(client, request, options));
|
|
138746
138779
|
}
|
|
138747
138780
|
async function $do161(client, request, options) {
|
|
138748
|
-
const
|
|
138749
|
-
if (!
|
|
138750
|
-
return [
|
|
138781
|
+
const parsed2 = safeParse3(request, (value2) => FIMCompletionStreamRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
138782
|
+
if (!parsed2.ok) {
|
|
138783
|
+
return [parsed2, { status: "invalid" }];
|
|
138751
138784
|
}
|
|
138752
|
-
const payload =
|
|
138785
|
+
const payload = parsed2.value;
|
|
138753
138786
|
const body = encodeJSON("body", payload, { explode: true });
|
|
138754
138787
|
const path7 = pathToFunc("/v1/fim/completions#stream")();
|
|
138755
138788
|
const headers = new Headers(compactMap({
|
|
@@ -138865,11 +138898,11 @@ function fineTuningJobsCancel(client, request, options) {
|
|
|
138865
138898
|
return new APIPromise4($do162(client, request, options));
|
|
138866
138899
|
}
|
|
138867
138900
|
async function $do162(client, request, options) {
|
|
138868
|
-
const
|
|
138869
|
-
if (!
|
|
138870
|
-
return [
|
|
138901
|
+
const parsed2 = safeParse3(request, (value2) => JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
138902
|
+
if (!parsed2.ok) {
|
|
138903
|
+
return [parsed2, { status: "invalid" }];
|
|
138871
138904
|
}
|
|
138872
|
-
const payload =
|
|
138905
|
+
const payload = parsed2.value;
|
|
138873
138906
|
const body = null;
|
|
138874
138907
|
const pathParams = {
|
|
138875
138908
|
job_id: encodeSimple("job_id", payload.job_id, {
|
|
@@ -138943,11 +138976,11 @@ function fineTuningJobsCreate(client, request, options) {
|
|
|
138943
138976
|
return new APIPromise4($do163(client, request, options));
|
|
138944
138977
|
}
|
|
138945
138978
|
async function $do163(client, request, options) {
|
|
138946
|
-
const
|
|
138947
|
-
if (!
|
|
138948
|
-
return [
|
|
138979
|
+
const parsed2 = safeParse3(request, (value2) => CreateFineTuningJobRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
138980
|
+
if (!parsed2.ok) {
|
|
138981
|
+
return [parsed2, { status: "invalid" }];
|
|
138949
138982
|
}
|
|
138950
|
-
const payload =
|
|
138983
|
+
const payload = parsed2.value;
|
|
138951
138984
|
const body = encodeJSON("body", payload, { explode: true });
|
|
138952
138985
|
const path7 = pathToFunc("/v1/fine_tuning/jobs")();
|
|
138953
138986
|
const headers = new Headers(compactMap({
|
|
@@ -139017,11 +139050,11 @@ function fineTuningJobsGet(client, request, options) {
|
|
|
139017
139050
|
return new APIPromise4($do164(client, request, options));
|
|
139018
139051
|
}
|
|
139019
139052
|
async function $do164(client, request, options) {
|
|
139020
|
-
const
|
|
139021
|
-
if (!
|
|
139022
|
-
return [
|
|
139053
|
+
const parsed2 = safeParse3(request, (value2) => JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
139054
|
+
if (!parsed2.ok) {
|
|
139055
|
+
return [parsed2, { status: "invalid" }];
|
|
139023
139056
|
}
|
|
139024
|
-
const payload =
|
|
139057
|
+
const payload = parsed2.value;
|
|
139025
139058
|
const body = null;
|
|
139026
139059
|
const pathParams = {
|
|
139027
139060
|
job_id: encodeSimple("job_id", payload.job_id, {
|
|
@@ -139095,11 +139128,11 @@ function fineTuningJobsList(client, request, options) {
|
|
|
139095
139128
|
return new APIPromise4($do165(client, request, options));
|
|
139096
139129
|
}
|
|
139097
139130
|
async function $do165(client, request, options) {
|
|
139098
|
-
const
|
|
139099
|
-
if (!
|
|
139100
|
-
return [
|
|
139131
|
+
const parsed2 = safeParse3(request, (value2) => JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
139132
|
+
if (!parsed2.ok) {
|
|
139133
|
+
return [parsed2, { status: "invalid" }];
|
|
139101
139134
|
}
|
|
139102
|
-
const payload =
|
|
139135
|
+
const payload = parsed2.value;
|
|
139103
139136
|
const body = null;
|
|
139104
139137
|
const path7 = pathToFunc("/v1/fine_tuning/jobs")();
|
|
139105
139138
|
const query = encodeFormQuery({
|
|
@@ -139181,11 +139214,11 @@ function fineTuningJobsStart(client, request, options) {
|
|
|
139181
139214
|
return new APIPromise4($do166(client, request, options));
|
|
139182
139215
|
}
|
|
139183
139216
|
async function $do166(client, request, options) {
|
|
139184
|
-
const
|
|
139185
|
-
if (!
|
|
139186
|
-
return [
|
|
139217
|
+
const parsed2 = safeParse3(request, (value2) => JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
139218
|
+
if (!parsed2.ok) {
|
|
139219
|
+
return [parsed2, { status: "invalid" }];
|
|
139187
139220
|
}
|
|
139188
|
-
const payload =
|
|
139221
|
+
const payload = parsed2.value;
|
|
139189
139222
|
const body = null;
|
|
139190
139223
|
const pathParams = {
|
|
139191
139224
|
job_id: encodeSimple("job_id", payload.job_id, {
|
|
@@ -139335,11 +139368,11 @@ function modelsArchive(client, request, options) {
|
|
|
139335
139368
|
return new APIPromise4($do167(client, request, options));
|
|
139336
139369
|
}
|
|
139337
139370
|
async function $do167(client, request, options) {
|
|
139338
|
-
const
|
|
139339
|
-
if (!
|
|
139340
|
-
return [
|
|
139371
|
+
const parsed2 = safeParse3(request, (value2) => JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
139372
|
+
if (!parsed2.ok) {
|
|
139373
|
+
return [parsed2, { status: "invalid" }];
|
|
139341
139374
|
}
|
|
139342
|
-
const payload =
|
|
139375
|
+
const payload = parsed2.value;
|
|
139343
139376
|
const body = null;
|
|
139344
139377
|
const pathParams = {
|
|
139345
139378
|
model_id: encodeSimple("model_id", payload.model_id, {
|
|
@@ -139414,11 +139447,11 @@ function modelsDelete(client, request, options) {
|
|
|
139414
139447
|
return new APIPromise4($do168(client, request, options));
|
|
139415
139448
|
}
|
|
139416
139449
|
async function $do168(client, request, options) {
|
|
139417
|
-
const
|
|
139418
|
-
if (!
|
|
139419
|
-
return [
|
|
139450
|
+
const parsed2 = safeParse3(request, (value2) => DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
139451
|
+
if (!parsed2.ok) {
|
|
139452
|
+
return [parsed2, { status: "invalid" }];
|
|
139420
139453
|
}
|
|
139421
|
-
const payload =
|
|
139454
|
+
const payload = parsed2.value;
|
|
139422
139455
|
const body = null;
|
|
139423
139456
|
const pathParams = {
|
|
139424
139457
|
model_id: encodeSimple("model_id", payload.model_id, {
|
|
@@ -139497,11 +139530,11 @@ function modelsList(client, request, options) {
|
|
|
139497
139530
|
return new APIPromise4($do169(client, request, options));
|
|
139498
139531
|
}
|
|
139499
139532
|
async function $do169(client, request, options) {
|
|
139500
|
-
const
|
|
139501
|
-
if (!
|
|
139502
|
-
return [
|
|
139533
|
+
const parsed2 = safeParse3(request, (value2) => ListModelsV1ModelsGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
139534
|
+
if (!parsed2.ok) {
|
|
139535
|
+
return [parsed2, { status: "invalid" }];
|
|
139503
139536
|
}
|
|
139504
|
-
const payload =
|
|
139537
|
+
const payload = parsed2.value;
|
|
139505
139538
|
const body = null;
|
|
139506
139539
|
const path7 = pathToFunc("/v1/models")();
|
|
139507
139540
|
const query = encodeFormQuery({
|
|
@@ -139579,11 +139612,11 @@ function modelsRetrieve(client, request, options) {
|
|
|
139579
139612
|
return new APIPromise4($do170(client, request, options));
|
|
139580
139613
|
}
|
|
139581
139614
|
async function $do170(client, request, options) {
|
|
139582
|
-
const
|
|
139583
|
-
if (!
|
|
139584
|
-
return [
|
|
139615
|
+
const parsed2 = safeParse3(request, (value2) => RetrieveModelV1ModelsModelIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
139616
|
+
if (!parsed2.ok) {
|
|
139617
|
+
return [parsed2, { status: "invalid" }];
|
|
139585
139618
|
}
|
|
139586
|
-
const payload =
|
|
139619
|
+
const payload = parsed2.value;
|
|
139587
139620
|
const body = null;
|
|
139588
139621
|
const pathParams = {
|
|
139589
139622
|
model_id: encodeSimple("model_id", payload.model_id, {
|
|
@@ -139661,11 +139694,11 @@ function modelsUnarchive(client, request, options) {
|
|
|
139661
139694
|
return new APIPromise4($do171(client, request, options));
|
|
139662
139695
|
}
|
|
139663
139696
|
async function $do171(client, request, options) {
|
|
139664
|
-
const
|
|
139665
|
-
if (!
|
|
139666
|
-
return [
|
|
139697
|
+
const parsed2 = safeParse3(request, (value2) => JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
139698
|
+
if (!parsed2.ok) {
|
|
139699
|
+
return [parsed2, { status: "invalid" }];
|
|
139667
139700
|
}
|
|
139668
|
-
const payload =
|
|
139701
|
+
const payload = parsed2.value;
|
|
139669
139702
|
const body = null;
|
|
139670
139703
|
const pathParams = {
|
|
139671
139704
|
model_id: encodeSimple("model_id", payload.model_id, {
|
|
@@ -139740,11 +139773,11 @@ function modelsUpdate(client, request, options) {
|
|
|
139740
139773
|
return new APIPromise4($do172(client, request, options));
|
|
139741
139774
|
}
|
|
139742
139775
|
async function $do172(client, request, options) {
|
|
139743
|
-
const
|
|
139744
|
-
if (!
|
|
139745
|
-
return [
|
|
139776
|
+
const parsed2 = safeParse3(request, (value2) => JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
139777
|
+
if (!parsed2.ok) {
|
|
139778
|
+
return [parsed2, { status: "invalid" }];
|
|
139746
139779
|
}
|
|
139747
|
-
const payload =
|
|
139780
|
+
const payload = parsed2.value;
|
|
139748
139781
|
const body = encodeJSON("body", payload.UpdateModelRequest, {
|
|
139749
139782
|
explode: true
|
|
139750
139783
|
});
|
|
@@ -139892,11 +139925,11 @@ function ocrProcess(client, request, options) {
|
|
|
139892
139925
|
return new APIPromise4($do173(client, request, options));
|
|
139893
139926
|
}
|
|
139894
139927
|
async function $do173(client, request, options) {
|
|
139895
|
-
const
|
|
139896
|
-
if (!
|
|
139897
|
-
return [
|
|
139928
|
+
const parsed2 = safeParse3(request, (value2) => OCRRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
139929
|
+
if (!parsed2.ok) {
|
|
139930
|
+
return [parsed2, { status: "invalid" }];
|
|
139898
139931
|
}
|
|
139899
|
-
const payload =
|
|
139932
|
+
const payload = parsed2.value;
|
|
139900
139933
|
const body = encodeJSON("body", payload, { explode: true });
|
|
139901
139934
|
const path7 = pathToFunc("/v1/ocr")();
|
|
139902
139935
|
const headers = new Headers(compactMap({
|
|
@@ -139987,11 +140020,11 @@ function workflowsArchiveWorkflow(client, request, options) {
|
|
|
139987
140020
|
return new APIPromise4($do174(client, request, options));
|
|
139988
140021
|
}
|
|
139989
140022
|
async function $do174(client, request, options) {
|
|
139990
|
-
const
|
|
139991
|
-
if (!
|
|
139992
|
-
return [
|
|
140023
|
+
const parsed2 = safeParse3(request, (value2) => ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
140024
|
+
if (!parsed2.ok) {
|
|
140025
|
+
return [parsed2, { status: "invalid" }];
|
|
139993
140026
|
}
|
|
139994
|
-
const payload =
|
|
140027
|
+
const payload = parsed2.value;
|
|
139995
140028
|
const body = null;
|
|
139996
140029
|
const pathParams = {
|
|
139997
140030
|
workflow_identifier: encodeSimple("workflow_identifier", payload.workflow_identifier, { explode: false, charEncoding: "percent" })
|
|
@@ -140067,11 +140100,11 @@ function workflowsBulkArchiveWorkflows(client, request, options) {
|
|
|
140067
140100
|
return new APIPromise4($do175(client, request, options));
|
|
140068
140101
|
}
|
|
140069
140102
|
async function $do175(client, request, options) {
|
|
140070
|
-
const
|
|
140071
|
-
if (!
|
|
140072
|
-
return [
|
|
140103
|
+
const parsed2 = safeParse3(request, (value2) => WorkflowBulkArchiveRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
140104
|
+
if (!parsed2.ok) {
|
|
140105
|
+
return [parsed2, { status: "invalid" }];
|
|
140073
140106
|
}
|
|
140074
|
-
const payload =
|
|
140107
|
+
const payload = parsed2.value;
|
|
140075
140108
|
const body = encodeJSON("body", payload, { explode: true });
|
|
140076
140109
|
const path7 = pathToFunc("/v1/workflows/archive")();
|
|
140077
140110
|
const headers = new Headers(compactMap({
|
|
@@ -140144,11 +140177,11 @@ function workflowsBulkUnarchiveWorkflows(client, request, options) {
|
|
|
140144
140177
|
return new APIPromise4($do176(client, request, options));
|
|
140145
140178
|
}
|
|
140146
140179
|
async function $do176(client, request, options) {
|
|
140147
|
-
const
|
|
140148
|
-
if (!
|
|
140149
|
-
return [
|
|
140180
|
+
const parsed2 = safeParse3(request, (value2) => WorkflowBulkUnarchiveRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
140181
|
+
if (!parsed2.ok) {
|
|
140182
|
+
return [parsed2, { status: "invalid" }];
|
|
140150
140183
|
}
|
|
140151
|
-
const payload =
|
|
140184
|
+
const payload = parsed2.value;
|
|
140152
140185
|
const body = encodeJSON("body", payload, { explode: true });
|
|
140153
140186
|
const path7 = pathToFunc("/v1/workflows/unarchive")();
|
|
140154
140187
|
const headers = new Headers(compactMap({
|
|
@@ -140221,11 +140254,11 @@ function workflowsExecuteWorkflow(client, request, options) {
|
|
|
140221
140254
|
return new APIPromise4($do177(client, request, options));
|
|
140222
140255
|
}
|
|
140223
140256
|
async function $do177(client, request, options) {
|
|
140224
|
-
const
|
|
140225
|
-
if (!
|
|
140226
|
-
return [
|
|
140257
|
+
const parsed2 = safeParse3(request, (value2) => ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
140258
|
+
if (!parsed2.ok) {
|
|
140259
|
+
return [parsed2, { status: "invalid" }];
|
|
140227
140260
|
}
|
|
140228
|
-
const payload =
|
|
140261
|
+
const payload = parsed2.value;
|
|
140229
140262
|
const body = encodeJSON("body", payload.WorkflowExecutionRequest, {
|
|
140230
140263
|
explode: true
|
|
140231
140264
|
});
|
|
@@ -140303,11 +140336,11 @@ function workflowsExecuteWorkflowRegistration(client, request, options) {
|
|
|
140303
140336
|
return new APIPromise4($do178(client, request, options));
|
|
140304
140337
|
}
|
|
140305
140338
|
async function $do178(client, request, options) {
|
|
140306
|
-
const
|
|
140307
|
-
if (!
|
|
140308
|
-
return [
|
|
140339
|
+
const parsed2 = safeParse3(request, (value2) => ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
140340
|
+
if (!parsed2.ok) {
|
|
140341
|
+
return [parsed2, { status: "invalid" }];
|
|
140309
140342
|
}
|
|
140310
|
-
const payload =
|
|
140343
|
+
const payload = parsed2.value;
|
|
140311
140344
|
const body = encodeJSON("body", payload.WorkflowExecutionRequest, {
|
|
140312
140345
|
explode: true
|
|
140313
140346
|
});
|
|
@@ -140385,11 +140418,11 @@ function workflowsGetWorkflow(client, request, options) {
|
|
|
140385
140418
|
return new APIPromise4($do179(client, request, options));
|
|
140386
140419
|
}
|
|
140387
140420
|
async function $do179(client, request, options) {
|
|
140388
|
-
const
|
|
140389
|
-
if (!
|
|
140390
|
-
return [
|
|
140421
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
140422
|
+
if (!parsed2.ok) {
|
|
140423
|
+
return [parsed2, { status: "invalid" }];
|
|
140391
140424
|
}
|
|
140392
|
-
const payload =
|
|
140425
|
+
const payload = parsed2.value;
|
|
140393
140426
|
const body = null;
|
|
140394
140427
|
const pathParams = {
|
|
140395
140428
|
workflow_identifier: encodeSimple("workflow_identifier", payload.workflow_identifier, { explode: false, charEncoding: "percent" })
|
|
@@ -140465,11 +140498,11 @@ function workflowsGetWorkflowRegistration(client, request, options) {
|
|
|
140465
140498
|
return new APIPromise4($do180(client, request, options));
|
|
140466
140499
|
}
|
|
140467
140500
|
async function $do180(client, request, options) {
|
|
140468
|
-
const
|
|
140469
|
-
if (!
|
|
140470
|
-
return [
|
|
140501
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
140502
|
+
if (!parsed2.ok) {
|
|
140503
|
+
return [parsed2, { status: "invalid" }];
|
|
140471
140504
|
}
|
|
140472
|
-
const payload =
|
|
140505
|
+
const payload = parsed2.value;
|
|
140473
140506
|
const body = null;
|
|
140474
140507
|
const pathParams = {
|
|
140475
140508
|
workflow_registration_id: encodeSimple("workflow_registration_id", payload.workflow_registration_id, { explode: false, charEncoding: "percent" })
|
|
@@ -140550,11 +140583,11 @@ function workflowsGetWorkflowRegistrations(client, request, options) {
|
|
|
140550
140583
|
return new APIPromise4($do181(client, request, options));
|
|
140551
140584
|
}
|
|
140552
140585
|
async function $do181(client, request, options) {
|
|
140553
|
-
const
|
|
140554
|
-
if (!
|
|
140555
|
-
return [
|
|
140586
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
140587
|
+
if (!parsed2.ok) {
|
|
140588
|
+
return [parsed2, { status: "invalid" }];
|
|
140556
140589
|
}
|
|
140557
|
-
const payload =
|
|
140590
|
+
const payload = parsed2.value;
|
|
140558
140591
|
const body = null;
|
|
140559
140592
|
const path7 = pathToFunc("/v1/workflows/registrations")();
|
|
140560
140593
|
const query = encodeFormQuery({
|
|
@@ -140709,11 +140742,11 @@ function workflowsGetWorkflows(client, request, options) {
|
|
|
140709
140742
|
return new APIPromise4($do182(client, request, options));
|
|
140710
140743
|
}
|
|
140711
140744
|
async function $do182(client, request, options) {
|
|
140712
|
-
const
|
|
140713
|
-
if (!
|
|
140714
|
-
return [haltIterator(
|
|
140745
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowsV1WorkflowsGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
140746
|
+
if (!parsed2.ok) {
|
|
140747
|
+
return [haltIterator(parsed2), { status: "invalid" }];
|
|
140715
140748
|
}
|
|
140716
|
-
const payload =
|
|
140749
|
+
const payload = parsed2.value;
|
|
140717
140750
|
const body = null;
|
|
140718
140751
|
const path7 = pathToFunc("/v1/workflows")();
|
|
140719
140752
|
const query = encodeFormQuery({
|
|
@@ -140835,11 +140868,11 @@ function workflowsUnarchiveWorkflow(client, request, options) {
|
|
|
140835
140868
|
return new APIPromise4($do183(client, request, options));
|
|
140836
140869
|
}
|
|
140837
140870
|
async function $do183(client, request, options) {
|
|
140838
|
-
const
|
|
140839
|
-
if (!
|
|
140840
|
-
return [
|
|
140871
|
+
const parsed2 = safeParse3(request, (value2) => UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
140872
|
+
if (!parsed2.ok) {
|
|
140873
|
+
return [parsed2, { status: "invalid" }];
|
|
140841
140874
|
}
|
|
140842
|
-
const payload =
|
|
140875
|
+
const payload = parsed2.value;
|
|
140843
140876
|
const body = null;
|
|
140844
140877
|
const pathParams = {
|
|
140845
140878
|
workflow_identifier: encodeSimple("workflow_identifier", payload.workflow_identifier, { explode: false, charEncoding: "percent" })
|
|
@@ -140915,11 +140948,11 @@ function workflowsUpdateWorkflow(client, request, options) {
|
|
|
140915
140948
|
return new APIPromise4($do184(client, request, options));
|
|
140916
140949
|
}
|
|
140917
140950
|
async function $do184(client, request, options) {
|
|
140918
|
-
const
|
|
140919
|
-
if (!
|
|
140920
|
-
return [
|
|
140951
|
+
const parsed2 = safeParse3(request, (value2) => UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
140952
|
+
if (!parsed2.ok) {
|
|
140953
|
+
return [parsed2, { status: "invalid" }];
|
|
140921
140954
|
}
|
|
140922
|
-
const payload =
|
|
140955
|
+
const payload = parsed2.value;
|
|
140923
140956
|
const body = encodeJSON("body", payload.WorkflowUpdateRequest, {
|
|
140924
140957
|
explode: true
|
|
140925
140958
|
});
|
|
@@ -140998,11 +141031,11 @@ function workflowsDeploymentsGetDeployment(client, request, options) {
|
|
|
140998
141031
|
return new APIPromise4($do185(client, request, options));
|
|
140999
141032
|
}
|
|
141000
141033
|
async function $do185(client, request, options) {
|
|
141001
|
-
const
|
|
141002
|
-
if (!
|
|
141003
|
-
return [
|
|
141034
|
+
const parsed2 = safeParse3(request, (value2) => GetDeploymentV1WorkflowsDeploymentsNameGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
141035
|
+
if (!parsed2.ok) {
|
|
141036
|
+
return [parsed2, { status: "invalid" }];
|
|
141004
141037
|
}
|
|
141005
|
-
const payload =
|
|
141038
|
+
const payload = parsed2.value;
|
|
141006
141039
|
const body = null;
|
|
141007
141040
|
const pathParams = {
|
|
141008
141041
|
name: encodeSimple("name", payload.name, {
|
|
@@ -141081,11 +141114,11 @@ function workflowsDeploymentsListDeployments(client, request, options) {
|
|
|
141081
141114
|
return new APIPromise4($do186(client, request, options));
|
|
141082
141115
|
}
|
|
141083
141116
|
async function $do186(client, request, options) {
|
|
141084
|
-
const
|
|
141085
|
-
if (!
|
|
141086
|
-
return [
|
|
141117
|
+
const parsed2 = safeParse3(request, (value2) => ListDeploymentsV1WorkflowsDeploymentsGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
141118
|
+
if (!parsed2.ok) {
|
|
141119
|
+
return [parsed2, { status: "invalid" }];
|
|
141087
141120
|
}
|
|
141088
|
-
const payload =
|
|
141121
|
+
const payload = parsed2.value;
|
|
141089
141122
|
const body = null;
|
|
141090
141123
|
const path7 = pathToFunc("/v1/workflows/deployments")();
|
|
141091
141124
|
const query = encodeFormQuery({
|
|
@@ -141193,11 +141226,11 @@ function workflowsExecutionsBatchCancelWorkflowExecutions(client, request, optio
|
|
|
141193
141226
|
return new APIPromise4($do187(client, request, options));
|
|
141194
141227
|
}
|
|
141195
141228
|
async function $do187(client, request, options) {
|
|
141196
|
-
const
|
|
141197
|
-
if (!
|
|
141198
|
-
return [
|
|
141229
|
+
const parsed2 = safeParse3(request, (value2) => BatchExecutionBody$outboundSchema.parse(value2), "Input validation failed");
|
|
141230
|
+
if (!parsed2.ok) {
|
|
141231
|
+
return [parsed2, { status: "invalid" }];
|
|
141199
141232
|
}
|
|
141200
|
-
const payload =
|
|
141233
|
+
const payload = parsed2.value;
|
|
141201
141234
|
const body = encodeJSON("body", payload, { explode: true });
|
|
141202
141235
|
const path7 = pathToFunc("/v1/workflows/executions/cancel")();
|
|
141203
141236
|
const headers = new Headers(compactMap({
|
|
@@ -141270,11 +141303,11 @@ function workflowsExecutionsBatchTerminateWorkflowExecutions(client, request, op
|
|
|
141270
141303
|
return new APIPromise4($do188(client, request, options));
|
|
141271
141304
|
}
|
|
141272
141305
|
async function $do188(client, request, options) {
|
|
141273
|
-
const
|
|
141274
|
-
if (!
|
|
141275
|
-
return [
|
|
141306
|
+
const parsed2 = safeParse3(request, (value2) => BatchExecutionBody$outboundSchema.parse(value2), "Input validation failed");
|
|
141307
|
+
if (!parsed2.ok) {
|
|
141308
|
+
return [parsed2, { status: "invalid" }];
|
|
141276
141309
|
}
|
|
141277
|
-
const payload =
|
|
141310
|
+
const payload = parsed2.value;
|
|
141278
141311
|
const body = encodeJSON("body", payload, { explode: true });
|
|
141279
141312
|
const path7 = pathToFunc("/v1/workflows/executions/terminate")();
|
|
141280
141313
|
const headers = new Headers(compactMap({
|
|
@@ -141347,11 +141380,11 @@ function workflowsExecutionsCancelWorkflowExecution(client, request, options) {
|
|
|
141347
141380
|
return new APIPromise4($do189(client, request, options));
|
|
141348
141381
|
}
|
|
141349
141382
|
async function $do189(client, request, options) {
|
|
141350
|
-
const
|
|
141351
|
-
if (!
|
|
141352
|
-
return [
|
|
141383
|
+
const parsed2 = safeParse3(request, (value2) => CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIdCancelPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
141384
|
+
if (!parsed2.ok) {
|
|
141385
|
+
return [parsed2, { status: "invalid" }];
|
|
141353
141386
|
}
|
|
141354
|
-
const payload =
|
|
141387
|
+
const payload = parsed2.value;
|
|
141355
141388
|
const body = null;
|
|
141356
141389
|
const pathParams = {
|
|
141357
141390
|
execution_id: encodeSimple("execution_id", payload.execution_id, {
|
|
@@ -141430,11 +141463,11 @@ function workflowsExecutionsGetWorkflowExecution(client, request, options) {
|
|
|
141430
141463
|
return new APIPromise4($do190(client, request, options));
|
|
141431
141464
|
}
|
|
141432
141465
|
async function $do190(client, request, options) {
|
|
141433
|
-
const
|
|
141434
|
-
if (!
|
|
141435
|
-
return [
|
|
141466
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowExecutionV1WorkflowsExecutionsExecutionIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
141467
|
+
if (!parsed2.ok) {
|
|
141468
|
+
return [parsed2, { status: "invalid" }];
|
|
141436
141469
|
}
|
|
141437
|
-
const payload =
|
|
141470
|
+
const payload = parsed2.value;
|
|
141438
141471
|
const body = null;
|
|
141439
141472
|
const pathParams = {
|
|
141440
141473
|
execution_id: encodeSimple("execution_id", payload.execution_id, {
|
|
@@ -141513,11 +141546,11 @@ function workflowsExecutionsGetWorkflowExecutionHistory(client, request, options
|
|
|
141513
141546
|
return new APIPromise4($do191(client, request, options));
|
|
141514
141547
|
}
|
|
141515
141548
|
async function $do191(client, request, options) {
|
|
141516
|
-
const
|
|
141517
|
-
if (!
|
|
141518
|
-
return [
|
|
141549
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
141550
|
+
if (!parsed2.ok) {
|
|
141551
|
+
return [parsed2, { status: "invalid" }];
|
|
141519
141552
|
}
|
|
141520
|
-
const payload =
|
|
141553
|
+
const payload = parsed2.value;
|
|
141521
141554
|
const body = null;
|
|
141522
141555
|
const pathParams = {
|
|
141523
141556
|
execution_id: encodeSimple("execution_id", payload.execution_id, {
|
|
@@ -141600,11 +141633,11 @@ function workflowsExecutionsGetWorkflowExecutionLogs(client, request, options) {
|
|
|
141600
141633
|
return new APIPromise4($do192(client, request, options));
|
|
141601
141634
|
}
|
|
141602
141635
|
async function $do192(client, request, options) {
|
|
141603
|
-
const
|
|
141604
|
-
if (!
|
|
141605
|
-
return [
|
|
141636
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowExecutionLogsRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
141637
|
+
if (!parsed2.ok) {
|
|
141638
|
+
return [parsed2, { status: "invalid" }];
|
|
141606
141639
|
}
|
|
141607
|
-
const payload =
|
|
141640
|
+
const payload = parsed2.value;
|
|
141608
141641
|
const body = null;
|
|
141609
141642
|
const pathParams = {
|
|
141610
141643
|
execution_id: encodeSimple("execution_id", payload.execution_id, {
|
|
@@ -141693,11 +141726,11 @@ function workflowsExecutionsGetWorkflowExecutionTraceEvents(client, request, opt
|
|
|
141693
141726
|
return new APIPromise4($do193(client, request, options));
|
|
141694
141727
|
}
|
|
141695
141728
|
async function $do193(client, request, options) {
|
|
141696
|
-
const
|
|
141697
|
-
if (!
|
|
141698
|
-
return [
|
|
141729
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowExecutionTraceEventsRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
141730
|
+
if (!parsed2.ok) {
|
|
141731
|
+
return [parsed2, { status: "invalid" }];
|
|
141699
141732
|
}
|
|
141700
|
-
const payload =
|
|
141733
|
+
const payload = parsed2.value;
|
|
141701
141734
|
const body = null;
|
|
141702
141735
|
const pathParams = {
|
|
141703
141736
|
execution_id: encodeSimple("execution_id", payload.execution_id, {
|
|
@@ -141781,11 +141814,11 @@ function workflowsExecutionsGetWorkflowExecutionTraceOtel(client, request, optio
|
|
|
141781
141814
|
return new APIPromise4($do194(client, request, options));
|
|
141782
141815
|
}
|
|
141783
141816
|
async function $do194(client, request, options) {
|
|
141784
|
-
const
|
|
141785
|
-
if (!
|
|
141786
|
-
return [
|
|
141817
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowExecutionTraceOtelRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
141818
|
+
if (!parsed2.ok) {
|
|
141819
|
+
return [parsed2, { status: "invalid" }];
|
|
141787
141820
|
}
|
|
141788
|
-
const payload =
|
|
141821
|
+
const payload = parsed2.value;
|
|
141789
141822
|
const body = null;
|
|
141790
141823
|
const pathParams = {
|
|
141791
141824
|
execution_id: encodeSimple("execution_id", payload.execution_id, {
|
|
@@ -141864,11 +141897,11 @@ function workflowsExecutionsGetWorkflowExecutionTraceSummary(client, request, op
|
|
|
141864
141897
|
return new APIPromise4($do195(client, request, options));
|
|
141865
141898
|
}
|
|
141866
141899
|
async function $do195(client, request, options) {
|
|
141867
|
-
const
|
|
141868
|
-
if (!
|
|
141869
|
-
return [
|
|
141900
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowExecutionTraceSummaryRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
141901
|
+
if (!parsed2.ok) {
|
|
141902
|
+
return [parsed2, { status: "invalid" }];
|
|
141870
141903
|
}
|
|
141871
|
-
const payload =
|
|
141904
|
+
const payload = parsed2.value;
|
|
141872
141905
|
const body = null;
|
|
141873
141906
|
const pathParams = {
|
|
141874
141907
|
execution_id: encodeSimple("execution_id", payload.execution_id, {
|
|
@@ -141947,11 +141980,11 @@ function workflowsExecutionsQueryWorkflowExecution(client, request, options) {
|
|
|
141947
141980
|
return new APIPromise4($do196(client, request, options));
|
|
141948
141981
|
}
|
|
141949
141982
|
async function $do196(client, request, options) {
|
|
141950
|
-
const
|
|
141951
|
-
if (!
|
|
141952
|
-
return [
|
|
141983
|
+
const parsed2 = safeParse3(request, (value2) => QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
141984
|
+
if (!parsed2.ok) {
|
|
141985
|
+
return [parsed2, { status: "invalid" }];
|
|
141953
141986
|
}
|
|
141954
|
-
const payload =
|
|
141987
|
+
const payload = parsed2.value;
|
|
141955
141988
|
const body = encodeJSON("body", payload.QueryInvocationBody, {
|
|
141956
141989
|
explode: true
|
|
141957
141990
|
});
|
|
@@ -142033,11 +142066,11 @@ function workflowsExecutionsResetWorkflow(client, request, options) {
|
|
|
142033
142066
|
return new APIPromise4($do197(client, request, options));
|
|
142034
142067
|
}
|
|
142035
142068
|
async function $do197(client, request, options) {
|
|
142036
|
-
const
|
|
142037
|
-
if (!
|
|
142038
|
-
return [
|
|
142069
|
+
const parsed2 = safeParse3(request, (value2) => ResetWorkflowV1WorkflowsExecutionsExecutionIdResetPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
142070
|
+
if (!parsed2.ok) {
|
|
142071
|
+
return [parsed2, { status: "invalid" }];
|
|
142039
142072
|
}
|
|
142040
|
-
const payload =
|
|
142073
|
+
const payload = parsed2.value;
|
|
142041
142074
|
const body = encodeJSON("body", payload.ResetInvocationBody, {
|
|
142042
142075
|
explode: true
|
|
142043
142076
|
});
|
|
@@ -142119,11 +142152,11 @@ function workflowsExecutionsSignalWorkflowExecution(client, request, options) {
|
|
|
142119
142152
|
return new APIPromise4($do198(client, request, options));
|
|
142120
142153
|
}
|
|
142121
142154
|
async function $do198(client, request, options) {
|
|
142122
|
-
const
|
|
142123
|
-
if (!
|
|
142124
|
-
return [
|
|
142155
|
+
const parsed2 = safeParse3(request, (value2) => SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIdSignalsPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
142156
|
+
if (!parsed2.ok) {
|
|
142157
|
+
return [parsed2, { status: "invalid" }];
|
|
142125
142158
|
}
|
|
142126
|
-
const payload =
|
|
142159
|
+
const payload = parsed2.value;
|
|
142127
142160
|
const body = encodeJSON("body", payload.SignalInvocationBody, {
|
|
142128
142161
|
explode: true
|
|
142129
142162
|
});
|
|
@@ -142205,11 +142238,11 @@ function workflowsExecutionsStream(client, request, options) {
|
|
|
142205
142238
|
return new APIPromise4($do199(client, request, options));
|
|
142206
142239
|
}
|
|
142207
142240
|
async function $do199(client, request, options) {
|
|
142208
|
-
const
|
|
142209
|
-
if (!
|
|
142210
|
-
return [
|
|
142241
|
+
const parsed2 = safeParse3(request, (value2) => StreamV1WorkflowsExecutionsExecutionIdStreamGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
142242
|
+
if (!parsed2.ok) {
|
|
142243
|
+
return [parsed2, { status: "invalid" }];
|
|
142211
142244
|
}
|
|
142212
|
-
const payload =
|
|
142245
|
+
const payload = parsed2.value;
|
|
142213
142246
|
const body = null;
|
|
142214
142247
|
const pathParams = {
|
|
142215
142248
|
execution_id: encodeSimple("execution_id", payload.execution_id, {
|
|
@@ -142301,11 +142334,11 @@ function workflowsExecutionsStreamWorkflowExecutionLogs(client, request, options
|
|
|
142301
142334
|
return new APIPromise4($do200(client, request, options));
|
|
142302
142335
|
}
|
|
142303
142336
|
async function $do200(client, request, options) {
|
|
142304
|
-
const
|
|
142305
|
-
if (!
|
|
142306
|
-
return [
|
|
142337
|
+
const parsed2 = safeParse3(request, (value2) => StreamWorkflowExecutionLogsRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
142338
|
+
if (!parsed2.ok) {
|
|
142339
|
+
return [parsed2, { status: "invalid" }];
|
|
142307
142340
|
}
|
|
142308
|
-
const payload =
|
|
142341
|
+
const payload = parsed2.value;
|
|
142309
142342
|
const body = null;
|
|
142310
142343
|
const pathParams = {
|
|
142311
142344
|
execution_id: encodeSimple("execution_id", payload.execution_id, {
|
|
@@ -142399,11 +142432,11 @@ function workflowsExecutionsTerminateWorkflowExecution(client, request, options)
|
|
|
142399
142432
|
return new APIPromise4($do201(client, request, options));
|
|
142400
142433
|
}
|
|
142401
142434
|
async function $do201(client, request, options) {
|
|
142402
|
-
const
|
|
142403
|
-
if (!
|
|
142404
|
-
return [
|
|
142435
|
+
const parsed2 = safeParse3(request, (value2) => TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIdTerminatePostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
142436
|
+
if (!parsed2.ok) {
|
|
142437
|
+
return [parsed2, { status: "invalid" }];
|
|
142405
142438
|
}
|
|
142406
|
-
const payload =
|
|
142439
|
+
const payload = parsed2.value;
|
|
142407
142440
|
const body = null;
|
|
142408
142441
|
const pathParams = {
|
|
142409
142442
|
execution_id: encodeSimple("execution_id", payload.execution_id, {
|
|
@@ -142482,11 +142515,11 @@ function workflowsExecutionsUpdateWorkflowExecution(client, request, options) {
|
|
|
142482
142515
|
return new APIPromise4($do202(client, request, options));
|
|
142483
142516
|
}
|
|
142484
142517
|
async function $do202(client, request, options) {
|
|
142485
|
-
const
|
|
142486
|
-
if (!
|
|
142487
|
-
return [
|
|
142518
|
+
const parsed2 = safeParse3(request, (value2) => UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIdUpdatesPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
142519
|
+
if (!parsed2.ok) {
|
|
142520
|
+
return [parsed2, { status: "invalid" }];
|
|
142488
142521
|
}
|
|
142489
|
-
const payload =
|
|
142522
|
+
const payload = parsed2.value;
|
|
142490
142523
|
const body = encodeJSON("body", payload.UpdateInvocationBody, {
|
|
142491
142524
|
explode: true
|
|
142492
142525
|
});
|
|
@@ -142705,11 +142738,11 @@ function workflowsMetricsGetWorkflowMetrics(client, request, options) {
|
|
|
142705
142738
|
return new APIPromise4($do203(client, request, options));
|
|
142706
142739
|
}
|
|
142707
142740
|
async function $do203(client, request, options) {
|
|
142708
|
-
const
|
|
142709
|
-
if (!
|
|
142710
|
-
return [
|
|
142741
|
+
const parsed2 = safeParse3(request, (value2) => GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
142742
|
+
if (!parsed2.ok) {
|
|
142743
|
+
return [parsed2, { status: "invalid" }];
|
|
142711
142744
|
}
|
|
142712
|
-
const payload =
|
|
142745
|
+
const payload = parsed2.value;
|
|
142713
142746
|
const body = null;
|
|
142714
142747
|
const pathParams = {
|
|
142715
142748
|
workflow_name: encodeSimple("workflow_name", payload.workflow_name, {
|
|
@@ -142833,11 +142866,11 @@ function workflowsRunsGetRun(client, request, options) {
|
|
|
142833
142866
|
return new APIPromise4($do204(client, request, options));
|
|
142834
142867
|
}
|
|
142835
142868
|
async function $do204(client, request, options) {
|
|
142836
|
-
const
|
|
142837
|
-
if (!
|
|
142838
|
-
return [
|
|
142869
|
+
const parsed2 = safeParse3(request, (value2) => GetRunV1WorkflowsRunsRunIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
142870
|
+
if (!parsed2.ok) {
|
|
142871
|
+
return [parsed2, { status: "invalid" }];
|
|
142839
142872
|
}
|
|
142840
|
-
const payload =
|
|
142873
|
+
const payload = parsed2.value;
|
|
142841
142874
|
const body = null;
|
|
142842
142875
|
const pathParams = {
|
|
142843
142876
|
run_id: encodeSimple("run_id", payload.run_id, {
|
|
@@ -142916,11 +142949,11 @@ function workflowsRunsGetRunHistory(client, request, options) {
|
|
|
142916
142949
|
return new APIPromise4($do205(client, request, options));
|
|
142917
142950
|
}
|
|
142918
142951
|
async function $do205(client, request, options) {
|
|
142919
|
-
const
|
|
142920
|
-
if (!
|
|
142921
|
-
return [
|
|
142952
|
+
const parsed2 = safeParse3(request, (value2) => GetRunHistoryV1WorkflowsRunsRunIdHistoryGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
142953
|
+
if (!parsed2.ok) {
|
|
142954
|
+
return [parsed2, { status: "invalid" }];
|
|
142922
142955
|
}
|
|
142923
|
-
const payload =
|
|
142956
|
+
const payload = parsed2.value;
|
|
142924
142957
|
const body = null;
|
|
142925
142958
|
const pathParams = {
|
|
142926
142959
|
run_id: encodeSimple("run_id", payload.run_id, {
|
|
@@ -143003,11 +143036,11 @@ function workflowsRunsListRuns(client, request, options) {
|
|
|
143003
143036
|
return new APIPromise4($do206(client, request, options));
|
|
143004
143037
|
}
|
|
143005
143038
|
async function $do206(client, request, options) {
|
|
143006
|
-
const
|
|
143007
|
-
if (!
|
|
143008
|
-
return [haltIterator(
|
|
143039
|
+
const parsed2 = safeParse3(request, (value2) => ListRunsV1WorkflowsRunsGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
143040
|
+
if (!parsed2.ok) {
|
|
143041
|
+
return [haltIterator(parsed2), { status: "invalid" }];
|
|
143009
143042
|
}
|
|
143010
|
-
const payload =
|
|
143043
|
+
const payload = parsed2.value;
|
|
143011
143044
|
const body = null;
|
|
143012
143045
|
const path7 = pathToFunc("/v1/workflows/runs")();
|
|
143013
143046
|
const query = encodeFormQuery({
|
|
@@ -143163,11 +143196,11 @@ function workflowsSchedulesGetSchedule(client, request, options) {
|
|
|
143163
143196
|
return new APIPromise4($do207(client, request, options));
|
|
143164
143197
|
}
|
|
143165
143198
|
async function $do207(client, request, options) {
|
|
143166
|
-
const
|
|
143167
|
-
if (!
|
|
143168
|
-
return [
|
|
143199
|
+
const parsed2 = safeParse3(request, (value2) => GetScheduleV1WorkflowsSchedulesScheduleIdGetRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
143200
|
+
if (!parsed2.ok) {
|
|
143201
|
+
return [parsed2, { status: "invalid" }];
|
|
143169
143202
|
}
|
|
143170
|
-
const payload =
|
|
143203
|
+
const payload = parsed2.value;
|
|
143171
143204
|
const body = null;
|
|
143172
143205
|
const pathParams = {
|
|
143173
143206
|
schedule_id: encodeSimple("schedule_id", payload.schedule_id, {
|
|
@@ -143246,11 +143279,11 @@ function workflowsSchedulesGetSchedules(client, request, options) {
|
|
|
143246
143279
|
return new APIPromise4($do208(client, request, options));
|
|
143247
143280
|
}
|
|
143248
143281
|
async function $do208(client, request, options) {
|
|
143249
|
-
const
|
|
143250
|
-
if (!
|
|
143251
|
-
return [haltIterator(
|
|
143282
|
+
const parsed2 = safeParse3(request, (value2) => GetSchedulesV1WorkflowsSchedulesGetRequest$outboundSchema.optional().parse(value2), "Input validation failed");
|
|
143283
|
+
if (!parsed2.ok) {
|
|
143284
|
+
return [haltIterator(parsed2), { status: "invalid" }];
|
|
143252
143285
|
}
|
|
143253
|
-
const payload =
|
|
143286
|
+
const payload = parsed2.value;
|
|
143254
143287
|
const body = null;
|
|
143255
143288
|
const path7 = pathToFunc("/v1/workflows/schedules")();
|
|
143256
143289
|
const query = encodeFormQuery({
|
|
@@ -143363,11 +143396,11 @@ function workflowsSchedulesPauseSchedule(client, request, options) {
|
|
|
143363
143396
|
return new APIPromise4($do209(client, request, options));
|
|
143364
143397
|
}
|
|
143365
143398
|
async function $do209(client, request, options) {
|
|
143366
|
-
const
|
|
143367
|
-
if (!
|
|
143368
|
-
return [
|
|
143399
|
+
const parsed2 = safeParse3(request, (value2) => PauseScheduleV1WorkflowsSchedulesScheduleIdPausePostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
143400
|
+
if (!parsed2.ok) {
|
|
143401
|
+
return [parsed2, { status: "invalid" }];
|
|
143369
143402
|
}
|
|
143370
|
-
const payload =
|
|
143403
|
+
const payload = parsed2.value;
|
|
143371
143404
|
const body = encodeJSON("body", payload.WorkflowSchedulePauseRequest, {
|
|
143372
143405
|
explode: true
|
|
143373
143406
|
});
|
|
@@ -143449,11 +143482,11 @@ function workflowsSchedulesResumeSchedule(client, request, options) {
|
|
|
143449
143482
|
return new APIPromise4($do210(client, request, options));
|
|
143450
143483
|
}
|
|
143451
143484
|
async function $do210(client, request, options) {
|
|
143452
|
-
const
|
|
143453
|
-
if (!
|
|
143454
|
-
return [
|
|
143485
|
+
const parsed2 = safeParse3(request, (value2) => ResumeScheduleV1WorkflowsSchedulesScheduleIdResumePostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
143486
|
+
if (!parsed2.ok) {
|
|
143487
|
+
return [parsed2, { status: "invalid" }];
|
|
143455
143488
|
}
|
|
143456
|
-
const payload =
|
|
143489
|
+
const payload = parsed2.value;
|
|
143457
143490
|
const body = encodeJSON("body", payload.WorkflowSchedulePauseRequest, {
|
|
143458
143491
|
explode: true
|
|
143459
143492
|
});
|
|
@@ -143535,11 +143568,11 @@ function workflowsSchedulesScheduleWorkflow(client, request, options) {
|
|
|
143535
143568
|
return new APIPromise4($do211(client, request, options));
|
|
143536
143569
|
}
|
|
143537
143570
|
async function $do211(client, request, options) {
|
|
143538
|
-
const
|
|
143539
|
-
if (!
|
|
143540
|
-
return [
|
|
143571
|
+
const parsed2 = safeParse3(request, (value2) => WorkflowScheduleRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
143572
|
+
if (!parsed2.ok) {
|
|
143573
|
+
return [parsed2, { status: "invalid" }];
|
|
143541
143574
|
}
|
|
143542
|
-
const payload =
|
|
143575
|
+
const payload = parsed2.value;
|
|
143543
143576
|
const body = encodeJSON("body", payload, { explode: true });
|
|
143544
143577
|
const path7 = pathToFunc("/v1/workflows/schedules")();
|
|
143545
143578
|
const headers = new Headers(compactMap({
|
|
@@ -143612,11 +143645,11 @@ function workflowsSchedulesTriggerSchedule(client, request, options) {
|
|
|
143612
143645
|
return new APIPromise4($do212(client, request, options));
|
|
143613
143646
|
}
|
|
143614
143647
|
async function $do212(client, request, options) {
|
|
143615
|
-
const
|
|
143616
|
-
if (!
|
|
143617
|
-
return [
|
|
143648
|
+
const parsed2 = safeParse3(request, (value2) => TriggerScheduleV1WorkflowsSchedulesScheduleIdTriggerPostRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
143649
|
+
if (!parsed2.ok) {
|
|
143650
|
+
return [parsed2, { status: "invalid" }];
|
|
143618
143651
|
}
|
|
143619
|
-
const payload =
|
|
143652
|
+
const payload = parsed2.value;
|
|
143620
143653
|
const body = encodeJSON("body", payload.WorkflowScheduleTriggerRequest, {
|
|
143621
143654
|
explode: true
|
|
143622
143655
|
});
|
|
@@ -143698,11 +143731,11 @@ function workflowsSchedulesUnscheduleWorkflow(client, request, options) {
|
|
|
143698
143731
|
return new APIPromise4($do213(client, request, options));
|
|
143699
143732
|
}
|
|
143700
143733
|
async function $do213(client, request, options) {
|
|
143701
|
-
const
|
|
143702
|
-
if (!
|
|
143703
|
-
return [
|
|
143734
|
+
const parsed2 = safeParse3(request, (value2) => UnscheduleWorkflowV1WorkflowsSchedulesScheduleIdDeleteRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
143735
|
+
if (!parsed2.ok) {
|
|
143736
|
+
return [parsed2, { status: "invalid" }];
|
|
143704
143737
|
}
|
|
143705
|
-
const payload =
|
|
143738
|
+
const payload = parsed2.value;
|
|
143706
143739
|
const body = null;
|
|
143707
143740
|
const pathParams = {
|
|
143708
143741
|
schedule_id: encodeSimple("schedule_id", payload.schedule_id, {
|
|
@@ -143781,11 +143814,11 @@ function workflowsSchedulesUpdateSchedule(client, request, options) {
|
|
|
143781
143814
|
return new APIPromise4($do214(client, request, options));
|
|
143782
143815
|
}
|
|
143783
143816
|
async function $do214(client, request, options) {
|
|
143784
|
-
const
|
|
143785
|
-
if (!
|
|
143786
|
-
return [
|
|
143817
|
+
const parsed2 = safeParse3(request, (value2) => UpdateScheduleV1WorkflowsSchedulesScheduleIdPatchRequest$outboundSchema.parse(value2), "Input validation failed");
|
|
143818
|
+
if (!parsed2.ok) {
|
|
143819
|
+
return [parsed2, { status: "invalid" }];
|
|
143787
143820
|
}
|
|
143788
|
-
const payload =
|
|
143821
|
+
const payload = parsed2.value;
|
|
143789
143822
|
const body = encodeJSON("body", payload.WorkflowScheduleUpdateRequest, {
|
|
143790
143823
|
explode: true
|
|
143791
143824
|
});
|
|
@@ -145523,13 +145556,13 @@ async function* parseWebSocket(socket, signal, idleTimeoutMs) {
|
|
|
145523
145556
|
text = await decodeWebSocketData(event.data);
|
|
145524
145557
|
if (!text)
|
|
145525
145558
|
return;
|
|
145526
|
-
const
|
|
145527
|
-
const type = typeof
|
|
145559
|
+
const parsed2 = JSON.parse(text);
|
|
145560
|
+
const type = typeof parsed2.type === "string" ? parsed2.type : "";
|
|
145528
145561
|
if (type === "response.completed" || type === "response.done" || type === "response.incomplete") {
|
|
145529
145562
|
sawCompletion = true;
|
|
145530
145563
|
done = true;
|
|
145531
145564
|
}
|
|
145532
|
-
queue.push(
|
|
145565
|
+
queue.push(parsed2);
|
|
145533
145566
|
wake();
|
|
145534
145567
|
} catch (cause) {
|
|
145535
145568
|
failed = new CodexProtocolError(`Invalid Codex WebSocket JSON: ${formatThrownValue(cause)}`, {
|
|
@@ -145725,8 +145758,8 @@ async function parseErrorResponse(response) {
|
|
|
145725
145758
|
let message = raw || response.statusText || "Request failed";
|
|
145726
145759
|
let friendlyMessage;
|
|
145727
145760
|
try {
|
|
145728
|
-
const
|
|
145729
|
-
const err2 =
|
|
145761
|
+
const parsed2 = JSON.parse(raw);
|
|
145762
|
+
const err2 = parsed2?.error;
|
|
145730
145763
|
if (err2) {
|
|
145731
145764
|
const code = err2.code || err2.type || "";
|
|
145732
145765
|
if (/usage_limit_reached|usage_not_included|rate_limit_exceeded/i.test(code) || response.status === 429) {
|
|
@@ -147471,9 +147504,9 @@ __export(pi_messages_exports, {
|
|
|
147471
147504
|
});
|
|
147472
147505
|
function parsePiMessagesErrorBody(body) {
|
|
147473
147506
|
try {
|
|
147474
|
-
const
|
|
147475
|
-
const error51 =
|
|
147476
|
-
return
|
|
147507
|
+
const parsed2 = JSON.parse(body);
|
|
147508
|
+
const error51 = parsed2?.error;
|
|
147509
|
+
return parsed2 && typeof error51 === "object" && error51 !== null && !Array.isArray(error51) ? parsed2 : void 0;
|
|
147477
147510
|
} catch {
|
|
147478
147511
|
return void 0;
|
|
147479
147512
|
}
|
|
@@ -148155,7 +148188,7 @@ var require_core = __commonJS({
|
|
|
148155
148188
|
return match3 && match3.index === 0;
|
|
148156
148189
|
}
|
|
148157
148190
|
var BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
148158
|
-
function
|
|
148191
|
+
function join17(regexps, separator = "|") {
|
|
148159
148192
|
let numCaptures = 0;
|
|
148160
148193
|
return regexps.map((regex2) => {
|
|
148161
148194
|
numCaptures += 1;
|
|
@@ -148459,7 +148492,7 @@ var require_core = __commonJS({
|
|
|
148459
148492
|
this.exec = () => null;
|
|
148460
148493
|
}
|
|
148461
148494
|
const terminators = this.regexes.map((el) => el[1]);
|
|
148462
|
-
this.matcherRe = langRe(
|
|
148495
|
+
this.matcherRe = langRe(join17(terminators), true);
|
|
148463
148496
|
this.lastIndex = 0;
|
|
148464
148497
|
}
|
|
148465
148498
|
/** @param {string} s */
|
|
@@ -223270,7 +223303,7 @@ var require_polyfills = __commonJS({
|
|
|
223270
223303
|
}
|
|
223271
223304
|
if (platform === "win32") {
|
|
223272
223305
|
fs5.rename = typeof fs5.rename !== "function" ? fs5.rename : (function(fs$rename) {
|
|
223273
|
-
function
|
|
223306
|
+
function rename3(from, to, cb) {
|
|
223274
223307
|
var start = Date.now();
|
|
223275
223308
|
var backoff = 0;
|
|
223276
223309
|
fs$rename(from, to, function CB(er) {
|
|
@@ -223290,8 +223323,8 @@ var require_polyfills = __commonJS({
|
|
|
223290
223323
|
if (cb) cb(er);
|
|
223291
223324
|
});
|
|
223292
223325
|
}
|
|
223293
|
-
if (Object.setPrototypeOf) Object.setPrototypeOf(
|
|
223294
|
-
return
|
|
223326
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(rename3, fs$rename);
|
|
223327
|
+
return rename3;
|
|
223295
223328
|
})(fs5.rename);
|
|
223296
223329
|
}
|
|
223297
223330
|
fs5.read = typeof fs5.read !== "function" ? fs5.read : (function(fs$read) {
|
|
@@ -223767,9 +223800,9 @@ var require_graceful_fs = __commonJS({
|
|
|
223767
223800
|
}
|
|
223768
223801
|
}
|
|
223769
223802
|
var fs$readdir = fs6.readdir;
|
|
223770
|
-
fs6.readdir =
|
|
223803
|
+
fs6.readdir = readdir7;
|
|
223771
223804
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
223772
|
-
function
|
|
223805
|
+
function readdir7(path7, options, cb) {
|
|
223773
223806
|
if (typeof options === "function")
|
|
223774
223807
|
cb = options, options = null;
|
|
223775
223808
|
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path8, options2, cb2, startTime) {
|
|
@@ -225385,8 +225418,8 @@ var require_prerelease = __commonJS({
|
|
|
225385
225418
|
"use strict";
|
|
225386
225419
|
var parse6 = require_parse3();
|
|
225387
225420
|
var prerelease = (version2, options) => {
|
|
225388
|
-
const
|
|
225389
|
-
return
|
|
225421
|
+
const parsed2 = parse6(version2, options);
|
|
225422
|
+
return parsed2 && parsed2.prerelease.length ? parsed2.prerelease : null;
|
|
225390
225423
|
};
|
|
225391
225424
|
module.exports = prerelease;
|
|
225392
225425
|
}
|
|
@@ -227596,20 +227629,20 @@ var require_from_url = __commonJS({
|
|
|
227596
227629
|
return;
|
|
227597
227630
|
}
|
|
227598
227631
|
const correctedUrl = isGitHubShorthand(giturl) ? `github:${giturl}` : giturl;
|
|
227599
|
-
const
|
|
227600
|
-
if (!
|
|
227632
|
+
const parsed2 = parseUrl(correctedUrl, protocols);
|
|
227633
|
+
if (!parsed2) {
|
|
227601
227634
|
return;
|
|
227602
227635
|
}
|
|
227603
|
-
const gitHostShortcut = gitHosts.byShortcut[
|
|
227604
|
-
const gitHostDomain = gitHosts.byDomain[
|
|
227636
|
+
const gitHostShortcut = gitHosts.byShortcut[parsed2.protocol];
|
|
227637
|
+
const gitHostDomain = gitHosts.byDomain[parsed2.hostname.startsWith("www.") ? parsed2.hostname.slice(4) : parsed2.hostname];
|
|
227605
227638
|
const gitHostName = gitHostShortcut || gitHostDomain;
|
|
227606
227639
|
if (!gitHostName) {
|
|
227607
227640
|
return;
|
|
227608
227641
|
}
|
|
227609
227642
|
const gitHostInfo = gitHosts[gitHostShortcut || gitHostDomain];
|
|
227610
227643
|
let auth = null;
|
|
227611
|
-
if (protocols[
|
|
227612
|
-
auth = `${
|
|
227644
|
+
if (protocols[parsed2.protocol]?.auth && (parsed2.username || parsed2.password)) {
|
|
227645
|
+
auth = `${parsed2.username}${parsed2.password ? ":" + parsed2.password : ""}`;
|
|
227613
227646
|
}
|
|
227614
227647
|
let committish = null;
|
|
227615
227648
|
let user = null;
|
|
@@ -227617,7 +227650,7 @@ var require_from_url = __commonJS({
|
|
|
227617
227650
|
let defaultRepresentation = null;
|
|
227618
227651
|
try {
|
|
227619
227652
|
if (gitHostShortcut) {
|
|
227620
|
-
let pathname =
|
|
227653
|
+
let pathname = parsed2.pathname.startsWith("/") ? parsed2.pathname.slice(1) : parsed2.pathname;
|
|
227621
227654
|
const firstAt = pathname.indexOf("@");
|
|
227622
227655
|
if (firstAt > -1) {
|
|
227623
227656
|
pathname = pathname.slice(firstAt + 1);
|
|
@@ -227635,22 +227668,22 @@ var require_from_url = __commonJS({
|
|
|
227635
227668
|
if (project.endsWith(".git")) {
|
|
227636
227669
|
project = project.slice(0, -4);
|
|
227637
227670
|
}
|
|
227638
|
-
if (
|
|
227639
|
-
committish = decodeURIComponent(
|
|
227671
|
+
if (parsed2.hash) {
|
|
227672
|
+
committish = decodeURIComponent(parsed2.hash.slice(1));
|
|
227640
227673
|
}
|
|
227641
227674
|
defaultRepresentation = "shortcut";
|
|
227642
227675
|
} else {
|
|
227643
|
-
if (!gitHostInfo.protocols.includes(
|
|
227676
|
+
if (!gitHostInfo.protocols.includes(parsed2.protocol)) {
|
|
227644
227677
|
return;
|
|
227645
227678
|
}
|
|
227646
|
-
const segments = gitHostInfo.extract(
|
|
227679
|
+
const segments = gitHostInfo.extract(parsed2);
|
|
227647
227680
|
if (!segments) {
|
|
227648
227681
|
return;
|
|
227649
227682
|
}
|
|
227650
227683
|
user = segments.user && decodeURIComponent(segments.user);
|
|
227651
227684
|
project = decodeURIComponent(segments.project);
|
|
227652
227685
|
committish = decodeURIComponent(segments.committish);
|
|
227653
|
-
defaultRepresentation = protocols[
|
|
227686
|
+
defaultRepresentation = protocols[parsed2.protocol]?.name || parsed2.protocol.slice(0, -1);
|
|
227654
227687
|
}
|
|
227655
227688
|
} catch (err2) {
|
|
227656
227689
|
if (err2 instanceof URIError) {
|
|
@@ -234214,9 +234247,9 @@ Content-Type: ${value2.type || "application/octet-stream"}\r
|
|
|
234214
234247
|
if (mimeType !== null) {
|
|
234215
234248
|
switch (mimeType.essence) {
|
|
234216
234249
|
case "multipart/form-data": {
|
|
234217
|
-
const
|
|
234250
|
+
const parsed2 = multipartFormDataParser(value2, mimeType);
|
|
234218
234251
|
const fd = new FormData4();
|
|
234219
|
-
setFormDataState(fd,
|
|
234252
|
+
setFormDataState(fd, parsed2);
|
|
234220
234253
|
return fd;
|
|
234221
234254
|
}
|
|
234222
234255
|
case "application/x-www-form-urlencoded": {
|
|
@@ -239290,11 +239323,11 @@ var require_env_http_proxy_agent = __commonJS({
|
|
|
239290
239323
|
if (!entry) {
|
|
239291
239324
|
continue;
|
|
239292
239325
|
}
|
|
239293
|
-
const
|
|
239326
|
+
const parsed2 = entry.match(/^(.+):(\d+)$/);
|
|
239294
239327
|
noProxyEntries.push({
|
|
239295
239328
|
// strip leading dot or asterisk with dot
|
|
239296
|
-
hostname: (
|
|
239297
|
-
port:
|
|
239329
|
+
hostname: (parsed2 ? parsed2[1] : entry).replace(/^\*?\./, "").toLowerCase(),
|
|
239330
|
+
port: parsed2 ? Number.parseInt(parsed2[2], 10) : 0
|
|
239298
239331
|
});
|
|
239299
239332
|
}
|
|
239300
239333
|
this.#noProxyValue = noProxyValue;
|
|
@@ -242563,14 +242596,14 @@ var require_snapshot_recorder = __commonJS({
|
|
|
242563
242596
|
}
|
|
242564
242597
|
try {
|
|
242565
242598
|
const data = await readFile8(resolve9(path7), "utf8");
|
|
242566
|
-
const
|
|
242567
|
-
if (Array.isArray(
|
|
242599
|
+
const parsed2 = JSON.parse(data);
|
|
242600
|
+
if (Array.isArray(parsed2)) {
|
|
242568
242601
|
this.#snapshots.clear();
|
|
242569
|
-
for (const { hash: hash2, snapshot } of
|
|
242602
|
+
for (const { hash: hash2, snapshot } of parsed2) {
|
|
242570
242603
|
this.#snapshots.set(hash2, snapshot);
|
|
242571
242604
|
}
|
|
242572
242605
|
} else {
|
|
242573
|
-
this.#snapshots = new Map(Object.entries(
|
|
242606
|
+
this.#snapshots = new Map(Object.entries(parsed2));
|
|
242574
242607
|
}
|
|
242575
242608
|
} catch (error51) {
|
|
242576
242609
|
if (error51.code === "ENOENT") {
|
|
@@ -254499,12 +254532,13 @@ var init_sitian_appender = __esm({
|
|
|
254499
254532
|
});
|
|
254500
254533
|
|
|
254501
254534
|
// scripts/migrate-book-topology.ts
|
|
254502
|
-
import {
|
|
254535
|
+
import { homedir as homedir5 } from "node:os";
|
|
254536
|
+
import { join as join16, resolve as resolve8 } from "node:path";
|
|
254503
254537
|
|
|
254504
254538
|
// src/book-topology-migration.ts
|
|
254505
254539
|
init_activation_ledger_topology();
|
|
254506
254540
|
init_run_lifecycle();
|
|
254507
|
-
import { mkdir, readdir as
|
|
254541
|
+
import { mkdir, readdir as readdir4, rename } from "node:fs/promises";
|
|
254508
254542
|
import { homedir } from "node:os";
|
|
254509
254543
|
import { basename as basename2, dirname as dirname2, join as join5, resolve as resolve2 } from "node:path";
|
|
254510
254544
|
function reconcileMigrationPartition(partition4, unit, outcomes) {
|
|
@@ -254533,7 +254567,7 @@ function reconcileMigrationPartition(partition4, unit, outcomes) {
|
|
|
254533
254567
|
async function findWriterLocks(root) {
|
|
254534
254568
|
const locks = [];
|
|
254535
254569
|
async function walk(directory) {
|
|
254536
|
-
for (const entry of await
|
|
254570
|
+
for (const entry of await readdir4(directory, { withFileTypes: true })) {
|
|
254537
254571
|
const path7 = join5(directory, entry.name);
|
|
254538
254572
|
if (entry.name === "writer.lock") {
|
|
254539
254573
|
const kind = entry.isFile() ? "file" : entry.isDirectory() ? "directory" : entry.isSymbolicLink() ? "symbolic link" : entry.isFIFO() ? "FIFO" : entry.isSocket() ? "socket" : entry.isCharacterDevice() ? "character device" : entry.isBlockDevice() ? "block device" : "unknown filesystem object";
|
|
@@ -254598,14 +254632,14 @@ async function migrateBookTopology(input) {
|
|
|
254598
254632
|
};
|
|
254599
254633
|
const partitions = [];
|
|
254600
254634
|
for (const migrator of input.migrators) {
|
|
254601
|
-
const
|
|
254602
|
-
if (
|
|
254603
|
-
throw new Error(`partition report mismatch: expected ${migrator.partition}, received ${
|
|
254635
|
+
const report = await migrator.migrate(context2);
|
|
254636
|
+
if (report.partition !== migrator.partition) {
|
|
254637
|
+
throw new Error(`partition report mismatch: expected ${migrator.partition}, received ${report.partition}`);
|
|
254604
254638
|
}
|
|
254605
|
-
if (
|
|
254606
|
-
throw new Error(`partition reconciliation did not close: ${
|
|
254639
|
+
if (report.before !== report.placed + report.unbound + report.discarded) {
|
|
254640
|
+
throw new Error(`partition reconciliation did not close: ${report.partition}`);
|
|
254607
254641
|
}
|
|
254608
|
-
partitions.push(
|
|
254642
|
+
partitions.push(report);
|
|
254609
254643
|
}
|
|
254610
254644
|
return { backupBooksDirectory, booksDirectory, partitions };
|
|
254611
254645
|
}
|
|
@@ -256167,8 +256201,8 @@ function UnionOptions2(type) {
|
|
|
256167
256201
|
|
|
256168
256202
|
// node_modules/.pnpm/typebox@1.3.7/node_modules/typebox/build/type/engine/patterns/pattern.mjs
|
|
256169
256203
|
function ParsePatternIntoTypes2(pattern) {
|
|
256170
|
-
const
|
|
256171
|
-
const result = guard_exports2.IsEqual(
|
|
256204
|
+
const parsed2 = Pattern2(pattern);
|
|
256205
|
+
const result = guard_exports2.IsEqual(parsed2.length, 2) ? parsed2[0] : [];
|
|
256172
256206
|
return result;
|
|
256173
256207
|
}
|
|
256174
256208
|
|
|
@@ -257454,8 +257488,8 @@ var Script3 = (input) => If3(If3(Module3(input), ([_0, input2]) => [_0, input2],
|
|
|
257454
257488
|
|
|
257455
257489
|
// node_modules/.pnpm/typebox@1.3.7/node_modules/typebox/build/type/engine/patterns/template.mjs
|
|
257456
257490
|
function ParseTemplateIntoTypes2(template) {
|
|
257457
|
-
const
|
|
257458
|
-
const result = guard_exports2.IsEqual(
|
|
257491
|
+
const parsed2 = TemplateLiteralTypes2(`\`${template}\``);
|
|
257492
|
+
const result = guard_exports2.IsEqual(parsed2.length, 2) ? parsed2[0] : Unreachable3();
|
|
257459
257493
|
return result;
|
|
257460
257494
|
}
|
|
257461
257495
|
|
|
@@ -259388,8 +259422,8 @@ function Script4(...args) {
|
|
|
259388
259422
|
1: (script) => [{}, script, {}]
|
|
259389
259423
|
});
|
|
259390
259424
|
const result = Script3(input);
|
|
259391
|
-
const
|
|
259392
|
-
return memory_exports2.Update(
|
|
259425
|
+
const parsed2 = guard_exports2.IsArray(result) && guard_exports2.IsEqual(result.length, 2) ? InstantiateType2(context2, State2([], []), result[0]) : Never2();
|
|
259426
|
+
return memory_exports2.Update(parsed2, {}, options);
|
|
259393
259427
|
}
|
|
259394
259428
|
|
|
259395
259429
|
// node_modules/.pnpm/typebox@1.3.7/node_modules/typebox/build/typebox.mjs
|
|
@@ -267695,18 +267729,18 @@ function parseKittySequence(data) {
|
|
|
267695
267729
|
return null;
|
|
267696
267730
|
}
|
|
267697
267731
|
function matchesKittySequence(data, expectedCodepoint, expectedModifier) {
|
|
267698
|
-
const
|
|
267699
|
-
if (!
|
|
267732
|
+
const parsed2 = parseKittySequence(data);
|
|
267733
|
+
if (!parsed2)
|
|
267700
267734
|
return false;
|
|
267701
|
-
const actualMod =
|
|
267735
|
+
const actualMod = parsed2.modifier & ~LOCK_MASK;
|
|
267702
267736
|
const expectedMod = expectedModifier & ~LOCK_MASK;
|
|
267703
267737
|
if (actualMod !== expectedMod)
|
|
267704
267738
|
return false;
|
|
267705
|
-
const normalizedCodepoint = normalizeShiftedLetterIdentityCodepoint(normalizeKittyFunctionalCodepoint(
|
|
267739
|
+
const normalizedCodepoint = normalizeShiftedLetterIdentityCodepoint(normalizeKittyFunctionalCodepoint(parsed2.codepoint), parsed2.modifier);
|
|
267706
267740
|
const normalizedExpectedCodepoint = normalizeShiftedLetterIdentityCodepoint(normalizeKittyFunctionalCodepoint(expectedCodepoint), expectedModifier);
|
|
267707
267741
|
if (normalizedCodepoint === normalizedExpectedCodepoint)
|
|
267708
267742
|
return true;
|
|
267709
|
-
if (
|
|
267743
|
+
if (parsed2.baseLayoutKey !== void 0 && parsed2.baseLayoutKey === expectedCodepoint) {
|
|
267710
267744
|
const cp4 = normalizedCodepoint;
|
|
267711
267745
|
const isLatinLetter = cp4 >= 97 && cp4 <= 122;
|
|
267712
267746
|
const isKnownSymbol = SYMBOL_KEYS.has(String.fromCharCode(cp4));
|
|
@@ -267724,10 +267758,10 @@ function parseModifyOtherKeysSequence(data) {
|
|
|
267724
267758
|
return { codepoint, modifier: modValue - 1 };
|
|
267725
267759
|
}
|
|
267726
267760
|
function matchesModifyOtherKeys(data, expectedKeycode, expectedModifier) {
|
|
267727
|
-
const
|
|
267728
|
-
if (!
|
|
267761
|
+
const parsed2 = parseModifyOtherKeysSequence(data);
|
|
267762
|
+
if (!parsed2)
|
|
267729
267763
|
return false;
|
|
267730
|
-
return
|
|
267764
|
+
return parsed2.codepoint === expectedKeycode && parsed2.modifier === expectedModifier;
|
|
267731
267765
|
}
|
|
267732
267766
|
function isWindowsTerminalSession() {
|
|
267733
267767
|
return Boolean(process.env.WT_SESSION) && !process.env.SSH_CONNECTION && !process.env.SSH_CLIENT && !process.env.SSH_TTY;
|
|
@@ -267756,10 +267790,10 @@ function isDigitKey(key) {
|
|
|
267756
267790
|
function matchesPrintableModifyOtherKeys(data, expectedKeycode, expectedModifier) {
|
|
267757
267791
|
if (expectedModifier === 0)
|
|
267758
267792
|
return false;
|
|
267759
|
-
const
|
|
267760
|
-
if (!
|
|
267793
|
+
const parsed2 = parseModifyOtherKeysSequence(data);
|
|
267794
|
+
if (!parsed2 || parsed2.modifier !== expectedModifier)
|
|
267761
267795
|
return false;
|
|
267762
|
-
return normalizeShiftedLetterIdentityCodepoint(
|
|
267796
|
+
return normalizeShiftedLetterIdentityCodepoint(parsed2.codepoint, parsed2.modifier) === normalizeShiftedLetterIdentityCodepoint(expectedKeycode, expectedModifier);
|
|
267763
267797
|
}
|
|
267764
267798
|
function parseKeyId(keyId) {
|
|
267765
267799
|
const parts = keyId.toLowerCase().split("+");
|
|
@@ -267775,10 +267809,10 @@ function parseKeyId(keyId) {
|
|
|
267775
267809
|
};
|
|
267776
267810
|
}
|
|
267777
267811
|
function matchesKey(data, keyId) {
|
|
267778
|
-
const
|
|
267779
|
-
if (!
|
|
267812
|
+
const parsed2 = parseKeyId(keyId);
|
|
267813
|
+
if (!parsed2)
|
|
267780
267814
|
return false;
|
|
267781
|
-
const { key, ctrl, shift, alt, super: superModifier } =
|
|
267815
|
+
const { key, ctrl, shift, alt, super: superModifier } = parsed2;
|
|
267782
267816
|
let modifier = 0;
|
|
267783
267817
|
if (shift)
|
|
267784
267818
|
modifier |= MODIFIERS.shift;
|
|
@@ -276888,7 +276922,7 @@ var WORKER_SUBMISSION_GATE_KIND = "worker-submission-gate";
|
|
|
276888
276922
|
init_activation_ledger_topology();
|
|
276889
276923
|
init_role_run_placement();
|
|
276890
276924
|
init_run_ticket_number();
|
|
276891
|
-
import { readdir as
|
|
276925
|
+
import { readdir as readdir5, readFile as readFile4 } from "node:fs/promises";
|
|
276892
276926
|
import { basename as basename6, dirname as dirname6, isAbsolute as isAbsolute3, join as join11, relative as relative3, resolve as resolve5, sep as sep6 } from "node:path";
|
|
276893
276927
|
var TICKET_NUMBER_RE = /^[1-9][0-9]*$/;
|
|
276894
276928
|
var RUN_DIR_NAME_RE = /^([^@]+)@([^@]+)$/;
|
|
@@ -276900,7 +276934,7 @@ function isMigrationEnoent(error51) {
|
|
|
276900
276934
|
}
|
|
276901
276935
|
async function listMigrationBookKeys(booksDirectory) {
|
|
276902
276936
|
try {
|
|
276903
|
-
const entries = await
|
|
276937
|
+
const entries = await readdir5(booksDirectory, { withFileTypes: true });
|
|
276904
276938
|
return entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort((a, b2) => a.localeCompare(b2));
|
|
276905
276939
|
} catch (error51) {
|
|
276906
276940
|
if (isMigrationEnoent(error51)) return [];
|
|
@@ -276909,7 +276943,7 @@ async function listMigrationBookKeys(booksDirectory) {
|
|
|
276909
276943
|
}
|
|
276910
276944
|
async function listMigrationDirents(directory) {
|
|
276911
276945
|
try {
|
|
276912
|
-
const entries = await
|
|
276946
|
+
const entries = await readdir5(directory, { withFileTypes: true });
|
|
276913
276947
|
return [...entries].sort((a, b2) => a.name.localeCompare(b2.name));
|
|
276914
276948
|
} catch (error51) {
|
|
276915
276949
|
if (isMigrationEnoent(error51)) return [];
|
|
@@ -277128,7 +277162,11 @@ async function findPlacedMigratingRun(booksDirectory, bookKey, leafName, sourceR
|
|
|
277128
277162
|
const preferred = destPathFromSourceRelative(booksDirectory, bookKey, sourceRelative2);
|
|
277129
277163
|
if (preferred !== void 0) {
|
|
277130
277164
|
const hit = matches.find((path7) => path7 === preferred);
|
|
277131
|
-
|
|
277165
|
+
if (hit !== void 0) return placedRunFromPath(hit);
|
|
277166
|
+
if (sourceRelative2.replaceAll("\\", "/").startsWith("unbound/runs/")) {
|
|
277167
|
+
return uniquePlacedRun(leafName, matches);
|
|
277168
|
+
}
|
|
277169
|
+
return void 0;
|
|
277132
277170
|
}
|
|
277133
277171
|
if (isFlatRunsRelative(sourceRelative2, leafName)) {
|
|
277134
277172
|
return uniquePlacedRun(leafName, matches);
|
|
@@ -277267,19 +277305,19 @@ function inspectWorkerSubmissionGateVolume(text, bookRoots) {
|
|
|
277267
277305
|
for (const row of jsonlRows(text)) {
|
|
277268
277306
|
const isHeader = firstRecord;
|
|
277269
277307
|
firstRecord = false;
|
|
277270
|
-
let
|
|
277308
|
+
let parsed2;
|
|
277271
277309
|
try {
|
|
277272
|
-
|
|
277310
|
+
parsed2 = JSON.parse(row.raw);
|
|
277273
277311
|
} catch {
|
|
277274
277312
|
malformedRows.push({ lineNumber: row.lineNumber, raw: row.raw });
|
|
277275
277313
|
continue;
|
|
277276
277314
|
}
|
|
277277
|
-
if (!isRecord3(
|
|
277315
|
+
if (!isRecord3(parsed2)) {
|
|
277278
277316
|
malformedRows.push({ lineNumber: row.lineNumber, raw: row.raw });
|
|
277279
277317
|
continue;
|
|
277280
277318
|
}
|
|
277281
|
-
if (isHeader &&
|
|
277282
|
-
const ref = runRefFromBoundPath(
|
|
277319
|
+
if (isHeader && parsed2.type === "session" && typeof parsed2.parentSession === "string") {
|
|
277320
|
+
const ref = runRefFromBoundPath(parsed2.parentSession, bookRoots);
|
|
277283
277321
|
leaf = ref?.leaf;
|
|
277284
277322
|
sourceRelative2 = ref?.sourceRelative;
|
|
277285
277323
|
}
|
|
@@ -277326,9 +277364,9 @@ async function migrateCurrentSessionPointer(input) {
|
|
|
277326
277364
|
if (raw === void 0) return;
|
|
277327
277365
|
let sessionFile;
|
|
277328
277366
|
try {
|
|
277329
|
-
const
|
|
277330
|
-
if (isRecord3(
|
|
277331
|
-
sessionFile =
|
|
277367
|
+
const parsed2 = JSON.parse(raw);
|
|
277368
|
+
if (isRecord3(parsed2) && typeof parsed2.sessionFile === "string" && parsed2.sessionFile.length > 0) {
|
|
277369
|
+
sessionFile = parsed2.sessionFile;
|
|
277332
277370
|
}
|
|
277333
277371
|
} catch {
|
|
277334
277372
|
sessionFile = void 0;
|
|
@@ -277384,9 +277422,9 @@ async function migrateSitianMixedVolume(partition4, context2) {
|
|
|
277384
277422
|
const sourceIdentity2 = posixRelative(backupBooksDirectory, recordsFile);
|
|
277385
277423
|
for (const row of jsonlRows(text)) {
|
|
277386
277424
|
const source = `${sourceIdentity2}:${row.lineNumber}`;
|
|
277387
|
-
let
|
|
277425
|
+
let parsed2;
|
|
277388
277426
|
try {
|
|
277389
|
-
|
|
277427
|
+
parsed2 = JSON.parse(row.raw);
|
|
277390
277428
|
} catch {
|
|
277391
277429
|
const dest2 = volumeDestinationFile(
|
|
277392
277430
|
booksDirectory,
|
|
@@ -277405,7 +277443,7 @@ async function migrateSitianMixedVolume(partition4, context2) {
|
|
|
277405
277443
|
});
|
|
277406
277444
|
continue;
|
|
277407
277445
|
}
|
|
277408
|
-
if (!isRecord3(
|
|
277446
|
+
if (!isRecord3(parsed2)) {
|
|
277409
277447
|
const dest2 = volumeDestinationFile(
|
|
277410
277448
|
booksDirectory,
|
|
277411
277449
|
bookKey,
|
|
@@ -277423,7 +277461,7 @@ async function migrateSitianMixedVolume(partition4, context2) {
|
|
|
277423
277461
|
});
|
|
277424
277462
|
continue;
|
|
277425
277463
|
}
|
|
277426
|
-
const ref = runRefFromRecord(
|
|
277464
|
+
const ref = runRefFromRecord(parsed2, bookRoots);
|
|
277427
277465
|
const destRun = ref === void 0 ? void 0 : await placedRunForLeaf(
|
|
277428
277466
|
placedCache,
|
|
277429
277467
|
booksDirectory,
|
|
@@ -277528,11 +277566,11 @@ async function migrateWorkerSubmissionGate(context2) {
|
|
|
277528
277566
|
)
|
|
277529
277567
|
});
|
|
277530
277568
|
}
|
|
277531
|
-
const
|
|
277569
|
+
const report = reconcileMigrationPartition(kind, "entries", outcomes);
|
|
277532
277570
|
return {
|
|
277533
|
-
...
|
|
277571
|
+
...report,
|
|
277534
277572
|
// Malformed rows are evidence on the volume bytes, not extra entry units.
|
|
277535
|
-
malformedRows: [...
|
|
277573
|
+
malformedRows: [...report.malformedRows, ...volumeMalformedRows]
|
|
277536
277574
|
};
|
|
277537
277575
|
}
|
|
277538
277576
|
var bookTopologySitianMixedVolumeMigrators = SITIAN_MIXED_VOLUME_PARTITIONS.map((partition4) => ({
|
|
@@ -277810,21 +277848,21 @@ async function readSessionFileField(path7) {
|
|
|
277810
277848
|
if (isMigrationEnoent(error51)) return void 0;
|
|
277811
277849
|
throw error51;
|
|
277812
277850
|
}
|
|
277813
|
-
let
|
|
277851
|
+
let parsed2;
|
|
277814
277852
|
try {
|
|
277815
|
-
|
|
277853
|
+
parsed2 = JSON.parse(raw);
|
|
277816
277854
|
} catch (error51) {
|
|
277817
277855
|
throw new Error(
|
|
277818
277856
|
`book topology migration cannot read current-session pointer at ${path7}: invalid JSON (${error51 instanceof Error ? error51.message : String(error51)})`,
|
|
277819
277857
|
{ cause: error51 }
|
|
277820
277858
|
);
|
|
277821
277859
|
}
|
|
277822
|
-
if (
|
|
277860
|
+
if (parsed2 === null || typeof parsed2 !== "object" || Array.isArray(parsed2)) {
|
|
277823
277861
|
throw new Error(
|
|
277824
277862
|
`book topology migration cannot read current-session pointer at ${path7}: expected a JSON object`
|
|
277825
277863
|
);
|
|
277826
277864
|
}
|
|
277827
|
-
const sessionFile =
|
|
277865
|
+
const sessionFile = parsed2.sessionFile;
|
|
277828
277866
|
if (typeof sessionFile !== "string") {
|
|
277829
277867
|
throw new Error(
|
|
277830
277868
|
`book topology migration cannot read current-session pointer at ${path7}: sessionFile must be a string`
|
|
@@ -277865,9 +277903,9 @@ async function mergeRewrittenCurrentSession(volumeDirectory, historicalVolume, d
|
|
|
277865
277903
|
`;
|
|
277866
277904
|
let nextSessionFile;
|
|
277867
277905
|
try {
|
|
277868
|
-
const
|
|
277869
|
-
if (
|
|
277870
|
-
const record2 =
|
|
277906
|
+
const parsed2 = JSON.parse(srcRaw);
|
|
277907
|
+
if (parsed2 !== null && typeof parsed2 === "object" && !Array.isArray(parsed2)) {
|
|
277908
|
+
const record2 = parsed2;
|
|
277871
277909
|
if (typeof record2.sessionFile === "string") {
|
|
277872
277910
|
const rewritten = rewritePathIntoDestination(
|
|
277873
277911
|
record2.sessionFile,
|
|
@@ -278230,8 +278268,8 @@ var RecordWriteCache = class {
|
|
|
278230
278268
|
const set2 = /* @__PURE__ */ new Set();
|
|
278231
278269
|
for (const line of await readJsonlLines(recordFile)) {
|
|
278232
278270
|
if (line.trim() === "") continue;
|
|
278233
|
-
const
|
|
278234
|
-
if (
|
|
278271
|
+
const parsed2 = parseJsonlLine(line);
|
|
278272
|
+
if (parsed2.ok && typeof parsed2.value.identity === "string") set2.add(parsed2.value.identity);
|
|
278235
278273
|
}
|
|
278236
278274
|
this.identities.set(recordFile, set2);
|
|
278237
278275
|
return set2;
|
|
@@ -278278,11 +278316,11 @@ var RecordWriteCache = class {
|
|
|
278278
278316
|
await ensureDir(dirname9(recordFile));
|
|
278279
278317
|
const line = raw.endsWith("\n") ? raw : `${raw}
|
|
278280
278318
|
`;
|
|
278281
|
-
const
|
|
278282
|
-
if (
|
|
278319
|
+
const parsed2 = parseJsonlLine(raw);
|
|
278320
|
+
if (parsed2.ok && typeof parsed2.value.identity === "string") {
|
|
278283
278321
|
const existing = await this.load(recordFile);
|
|
278284
|
-
if (!existing.has(
|
|
278285
|
-
existing.add(
|
|
278322
|
+
if (!existing.has(parsed2.value.identity)) {
|
|
278323
|
+
existing.add(parsed2.value.identity);
|
|
278286
278324
|
await appendFile2(recordFile, line, "utf8");
|
|
278287
278325
|
}
|
|
278288
278326
|
} else {
|
|
@@ -278554,8 +278592,8 @@ async function migrateJsonlFileByKind(context2, bookKey, writes, filePath, fallb
|
|
|
278554
278592
|
const raw = lines[index3];
|
|
278555
278593
|
if (raw.trim() === "") continue;
|
|
278556
278594
|
const source = lineSource(context2.backupBooksDirectory, filePath, index3);
|
|
278557
|
-
const
|
|
278558
|
-
if (!
|
|
278595
|
+
const parsed2 = parseJsonlLine(raw);
|
|
278596
|
+
if (!parsed2.ok) {
|
|
278559
278597
|
if (fallbackCategory === TICKET_PROVENANCE) {
|
|
278560
278598
|
outcomes.push(
|
|
278561
278599
|
await placeTicketProvenanceLine(
|
|
@@ -278580,7 +278618,7 @@ async function migrateJsonlFileByKind(context2, bookKey, writes, filePath, fallb
|
|
|
278580
278618
|
writes,
|
|
278581
278619
|
source,
|
|
278582
278620
|
raw,
|
|
278583
|
-
|
|
278621
|
+
parsed2.value,
|
|
278584
278622
|
fallbackCategory,
|
|
278585
278623
|
outcomes.length
|
|
278586
278624
|
)
|
|
@@ -278612,10 +278650,10 @@ async function ticketNumbersInVolume(volumeDir) {
|
|
|
278612
278650
|
const seen = /* @__PURE__ */ new Set();
|
|
278613
278651
|
for (const raw of lines) {
|
|
278614
278652
|
if (raw.trim() === "") continue;
|
|
278615
|
-
const
|
|
278616
|
-
if (!
|
|
278617
|
-
if (recordClassOfKind(
|
|
278618
|
-
const ticketNumber = ticketNumberFromSubject(
|
|
278653
|
+
const parsed2 = parseJsonlLine(raw);
|
|
278654
|
+
if (!parsed2.ok) continue;
|
|
278655
|
+
if (recordClassOfKind(parsed2.value.kind) !== TICKET_PROVENANCE) continue;
|
|
278656
|
+
const ticketNumber = ticketNumberFromSubject(parsed2.value.subject);
|
|
278619
278657
|
if (ticketNumber === void 0 || seen.has(ticketNumber)) continue;
|
|
278620
278658
|
seen.add(ticketNumber);
|
|
278621
278659
|
out.push(ticketNumber);
|
|
@@ -278693,11 +278731,11 @@ async function migrateMisplacedBook(context2, bookKey, writes, outcomes) {
|
|
|
278693
278731
|
for (let index3 = 0; index3 < lines.length; index3 += 1) {
|
|
278694
278732
|
const raw = lines[index3];
|
|
278695
278733
|
if (raw.trim() === "") continue;
|
|
278696
|
-
const
|
|
278697
|
-
if (!
|
|
278698
|
-
const recordClass = recordClassOfKind(
|
|
278734
|
+
const parsed2 = parseJsonlLine(raw);
|
|
278735
|
+
if (!parsed2.ok) continue;
|
|
278736
|
+
const recordClass = recordClassOfKind(parsed2.value.kind);
|
|
278699
278737
|
if (recordClass === void 0) continue;
|
|
278700
|
-
if (isAlreadyHomeUnderOwningRun(withinBook, recordClass,
|
|
278738
|
+
if (isAlreadyHomeUnderOwningRun(withinBook, recordClass, parsed2.value)) continue;
|
|
278701
278739
|
const source = lineSource(context2.backupBooksDirectory, filePath, index3);
|
|
278702
278740
|
if (recordClass === TICKET_PROVENANCE) {
|
|
278703
278741
|
outcomes.push(
|
|
@@ -278707,13 +278745,13 @@ async function migrateMisplacedBook(context2, bookKey, writes, outcomes) {
|
|
|
278707
278745
|
writes,
|
|
278708
278746
|
source,
|
|
278709
278747
|
raw,
|
|
278710
|
-
|
|
278748
|
+
parsed2.value,
|
|
278711
278749
|
outcomes.length
|
|
278712
278750
|
)
|
|
278713
278751
|
);
|
|
278714
278752
|
} else {
|
|
278715
278753
|
outcomes.push(
|
|
278716
|
-
await placeRunOwnedLine(context2, bookKey, writes, recordClass, source, raw,
|
|
278754
|
+
await placeRunOwnedLine(context2, bookKey, writes, recordClass, source, raw, parsed2.value)
|
|
278717
278755
|
);
|
|
278718
278756
|
}
|
|
278719
278757
|
if (withinBook.includes("/runs/") || withinBook.startsWith("runs/")) {
|
|
@@ -278784,8 +278822,9 @@ var BOOK_TOPOLOGY_RECORD_CLASS_MIGRATORS = [
|
|
|
278784
278822
|
];
|
|
278785
278823
|
|
|
278786
278824
|
// src/book-topology-runs-migrator.ts
|
|
278787
|
-
import { cp as cp3, mkdir as mkdir5, stat as stat5, writeFile as writeFile7 } from "node:fs/promises";
|
|
278825
|
+
import { cp as cp3, mkdir as mkdir5, rename as rename2, readdir as readdir6, stat as stat5, writeFile as writeFile7 } from "node:fs/promises";
|
|
278788
278826
|
import { basename as basename8, dirname as dirname10, join as join15, relative as relative7, sep as sep10 } from "node:path";
|
|
278827
|
+
init_role_run_placement();
|
|
278789
278828
|
init_role_run_relocation();
|
|
278790
278829
|
init_run_ticket_number();
|
|
278791
278830
|
var RUNS_PARTITION = "runs";
|
|
@@ -278836,7 +278875,7 @@ async function planBookMoves(backupBooksDirectory, booksDirectory, bookKey) {
|
|
|
278836
278875
|
const planned = [];
|
|
278837
278876
|
for (const leaf of await listBackupRunLeaves(backupBook)) {
|
|
278838
278877
|
const sourceIdentity2 = relative7(backupBooksDirectory, leaf.sourcePath).split(sep10).join("/");
|
|
278839
|
-
const
|
|
278878
|
+
const parsed2 = leaf.isDirectory ? parseRunLeaf2(leaf.leafName) : void 0;
|
|
278840
278879
|
let targetPath;
|
|
278841
278880
|
let disposition;
|
|
278842
278881
|
let historicalRunDirectory;
|
|
@@ -278861,12 +278900,36 @@ async function planBookMoves(backupBooksDirectory, booksDirectory, bookKey) {
|
|
|
278861
278900
|
historicalRunDirectory = join15(booksDirectory, bookKey, leaf.relativePath);
|
|
278862
278901
|
}
|
|
278863
278902
|
derivation = void 0;
|
|
278903
|
+
} else if (leaf.layout === "unbound") {
|
|
278904
|
+
const boardTicket = leaf.isDirectory ? await readBoardTicketNumber(leaf.sourcePath) : void 0;
|
|
278905
|
+
if (parsed2 !== void 0 && boardTicket !== void 0) {
|
|
278906
|
+
targetPath = destinationRunDirectory(
|
|
278907
|
+
booksDirectory,
|
|
278908
|
+
bookKey,
|
|
278909
|
+
boardTicket,
|
|
278910
|
+
parsed2.runId,
|
|
278911
|
+
parsed2.role
|
|
278912
|
+
);
|
|
278913
|
+
disposition = "placed";
|
|
278914
|
+
historicalRunDirectory = join15(
|
|
278915
|
+
booksDirectory,
|
|
278916
|
+
bookKey,
|
|
278917
|
+
"unbound",
|
|
278918
|
+
"runs",
|
|
278919
|
+
leaf.leafName
|
|
278920
|
+
);
|
|
278921
|
+
} else {
|
|
278922
|
+
targetPath = join15(booksDirectory, bookKey, leaf.relativePath);
|
|
278923
|
+
disposition = "unbound";
|
|
278924
|
+
historicalRunDirectory = void 0;
|
|
278925
|
+
}
|
|
278926
|
+
derivation = void 0;
|
|
278864
278927
|
} else if (leaf.layout !== "flat") {
|
|
278865
278928
|
targetPath = join15(booksDirectory, bookKey, leaf.relativePath);
|
|
278866
|
-
disposition =
|
|
278929
|
+
disposition = "placed";
|
|
278867
278930
|
historicalRunDirectory = void 0;
|
|
278868
278931
|
derivation = void 0;
|
|
278869
|
-
} else if (
|
|
278932
|
+
} else if (parsed2 === void 0) {
|
|
278870
278933
|
targetPath = join15(booksDirectory, bookKey, "unbound", "runs", leaf.leafName);
|
|
278871
278934
|
disposition = "unbound";
|
|
278872
278935
|
historicalRunDirectory = join15(booksDirectory, bookKey, "runs", leaf.leafName);
|
|
@@ -278877,8 +278940,8 @@ async function planBookMoves(backupBooksDirectory, booksDirectory, bookKey) {
|
|
|
278877
278940
|
booksDirectory,
|
|
278878
278941
|
bookKey,
|
|
278879
278942
|
ticket.ticketNumber,
|
|
278880
|
-
|
|
278881
|
-
|
|
278943
|
+
parsed2.runId,
|
|
278944
|
+
parsed2.role
|
|
278882
278945
|
);
|
|
278883
278946
|
disposition = ticket.ticketNumber === void 0 ? "unbound" : "placed";
|
|
278884
278947
|
historicalRunDirectory = join15(booksDirectory, bookKey, "runs", leaf.leafName);
|
|
@@ -278949,6 +279012,83 @@ var bookTopologyRunsMigrator = {
|
|
|
278949
279012
|
return reconcileMigrationPartition(RUNS_PARTITION, "entries", outcomes);
|
|
278950
279013
|
}
|
|
278951
279014
|
};
|
|
279015
|
+
async function relocateBoardBoundUnboundRunsInBook(bookDirectory) {
|
|
279016
|
+
const bookKey = basename8(bookDirectory);
|
|
279017
|
+
const booksDirectory = dirname10(bookDirectory);
|
|
279018
|
+
const unboundRuns = join15(bookDirectory, "unbound", "runs");
|
|
279019
|
+
let entries;
|
|
279020
|
+
try {
|
|
279021
|
+
entries = await readdir6(unboundRuns, { withFileTypes: true });
|
|
279022
|
+
} catch (error51) {
|
|
279023
|
+
if (isMigrationEnoent(error51)) return [];
|
|
279024
|
+
throw error51;
|
|
279025
|
+
}
|
|
279026
|
+
const planned = [];
|
|
279027
|
+
for (const entry of entries) {
|
|
279028
|
+
if (!entry.isDirectory()) continue;
|
|
279029
|
+
const parsed2 = parseRunLeaf2(entry.name);
|
|
279030
|
+
if (parsed2 === void 0) continue;
|
|
279031
|
+
const sourcePath = join15(unboundRuns, entry.name);
|
|
279032
|
+
const boardTicket = await readBoardTicketNumber(sourcePath);
|
|
279033
|
+
if (boardTicket === void 0) continue;
|
|
279034
|
+
const targetPath = destinationRunDirectory(
|
|
279035
|
+
booksDirectory,
|
|
279036
|
+
bookKey,
|
|
279037
|
+
boardTicket,
|
|
279038
|
+
parsed2.runId,
|
|
279039
|
+
parsed2.role
|
|
279040
|
+
);
|
|
279041
|
+
planned.push({
|
|
279042
|
+
sourcePath,
|
|
279043
|
+
targetPath,
|
|
279044
|
+
ticketNumber: boardTicket
|
|
279045
|
+
});
|
|
279046
|
+
}
|
|
279047
|
+
if (planned.length === 0) return [];
|
|
279048
|
+
for (const move of planned) {
|
|
279049
|
+
if (await pathExists2(move.targetPath)) {
|
|
279050
|
+
throw new Error(
|
|
279051
|
+
`board-bound unbound relocate refuses to overwrite ${move.targetPath} with ${move.sourcePath}`
|
|
279052
|
+
);
|
|
279053
|
+
}
|
|
279054
|
+
}
|
|
279055
|
+
const crossRunRewrites = planned.map((move) => ({
|
|
279056
|
+
oldRunDirectory: move.sourcePath,
|
|
279057
|
+
newRunDirectory: move.targetPath
|
|
279058
|
+
}));
|
|
279059
|
+
const relocatedBySource = new Map(
|
|
279060
|
+
planned.map((move) => [move.sourcePath, move])
|
|
279061
|
+
);
|
|
279062
|
+
for (const runDir of await listBookRunDirectories(bookDirectory)) {
|
|
279063
|
+
const move = relocatedBySource.get(runDir);
|
|
279064
|
+
await rewriteRoleRunDurablePages({
|
|
279065
|
+
pagesDirectory: runDir,
|
|
279066
|
+
oldRunDirectory: move?.sourcePath ?? runDir,
|
|
279067
|
+
newRunDirectory: move?.targetPath ?? runDir,
|
|
279068
|
+
crossRunRewrites
|
|
279069
|
+
});
|
|
279070
|
+
}
|
|
279071
|
+
for (const move of planned) {
|
|
279072
|
+
await mkdir5(dirname10(move.targetPath), { recursive: true });
|
|
279073
|
+
await rename2(move.sourcePath, move.targetPath);
|
|
279074
|
+
}
|
|
279075
|
+
return planned.map((move) => ({
|
|
279076
|
+
from: move.sourcePath,
|
|
279077
|
+
to: move.targetPath,
|
|
279078
|
+
ticketNumber: move.ticketNumber
|
|
279079
|
+
}));
|
|
279080
|
+
}
|
|
279081
|
+
async function relocateBoardBoundUnboundRunsInBooks(booksDirectory, env2 = process.env) {
|
|
279082
|
+
await assertBookTopologyMigrationPrerequisites(booksDirectory, env2);
|
|
279083
|
+
const relocated = [];
|
|
279084
|
+
for (const bookKey of await listMigrationBookKeys(booksDirectory)) {
|
|
279085
|
+
const batch = await relocateBoardBoundUnboundRunsInBook(
|
|
279086
|
+
join15(booksDirectory, bookKey)
|
|
279087
|
+
);
|
|
279088
|
+
relocated.push(...batch);
|
|
279089
|
+
}
|
|
279090
|
+
return relocated;
|
|
279091
|
+
}
|
|
278952
279092
|
|
|
278953
279093
|
// src/book-topology-partition-migrators.ts
|
|
278954
279094
|
var BOOK_TOPOLOGY_PARTITION_MIGRATORS = [
|
|
@@ -278959,17 +279099,45 @@ var BOOK_TOPOLOGY_PARTITION_MIGRATORS = [
|
|
|
278959
279099
|
];
|
|
278960
279100
|
|
|
278961
279101
|
// scripts/migrate-book-topology.ts
|
|
278962
|
-
|
|
278963
|
-
|
|
278964
|
-
|
|
278965
|
-
|
|
279102
|
+
var USAGE = "usage: node dist/migrate-book-topology.js [--ledger-home <path>]\n node dist/migrate-book-topology.js --relocate-board-bound-unbound [--ledger-home <path>]";
|
|
279103
|
+
function parseMigrateArgv(argv) {
|
|
279104
|
+
let relocateBoardBoundUnbound = false;
|
|
279105
|
+
let ledgerHome;
|
|
279106
|
+
for (let i2 = 0; i2 < argv.length; i2 += 1) {
|
|
279107
|
+
const arg = argv[i2];
|
|
279108
|
+
if (arg === "--relocate-board-bound-unbound") {
|
|
279109
|
+
relocateBoardBoundUnbound = true;
|
|
279110
|
+
continue;
|
|
279111
|
+
}
|
|
279112
|
+
if (arg === "--ledger-home") {
|
|
279113
|
+
const value2 = argv[i2 + 1];
|
|
279114
|
+
if (value2 === void 0) throw new Error(USAGE);
|
|
279115
|
+
ledgerHome = resolve8(value2);
|
|
279116
|
+
i2 += 1;
|
|
279117
|
+
continue;
|
|
279118
|
+
}
|
|
279119
|
+
throw new Error(USAGE);
|
|
279120
|
+
}
|
|
279121
|
+
return { relocateBoardBoundUnbound, ledgerHome };
|
|
278966
279122
|
}
|
|
278967
|
-
var
|
|
278968
|
-
|
|
278969
|
-
|
|
278970
|
-
|
|
278971
|
-
|
|
279123
|
+
var parsed = parseMigrateArgv(process.argv.slice(2));
|
|
279124
|
+
if (parsed.relocateBoardBoundUnbound) {
|
|
279125
|
+
const ledgerHome = parsed.ledgerHome ?? join16(homedir5(), ".ak-roles");
|
|
279126
|
+
const relocated = await relocateBoardBoundUnboundRunsInBooks(
|
|
279127
|
+
join16(ledgerHome, "books")
|
|
279128
|
+
);
|
|
279129
|
+
process.stdout.write(
|
|
279130
|
+
`${JSON.stringify({ ledgerHome, relocatedCount: relocated.length, relocated }, null, 2)}
|
|
279131
|
+
`
|
|
279132
|
+
);
|
|
279133
|
+
} else {
|
|
279134
|
+
const report = await migrateBookTopology({
|
|
279135
|
+
ledgerHome: parsed.ledgerHome,
|
|
279136
|
+
migrators: BOOK_TOPOLOGY_PARTITION_MIGRATORS
|
|
279137
|
+
});
|
|
279138
|
+
process.stdout.write(`${JSON.stringify(report, null, 2)}
|
|
278972
279139
|
`);
|
|
279140
|
+
}
|
|
278973
279141
|
/*! Bundled license information:
|
|
278974
279142
|
|
|
278975
279143
|
web-streams-polyfill/dist/ponyfill.es2018.js:
|