@fern-api/fdr-sdk 1.2.115-60bc9699d1 → 1.2.116-4e00acf721
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/js/client/FdrClient.js +262 -238
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +262 -238
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/index.js +528 -504
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +528 -504
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/orpc-client/mcp-hosting/schemas.js +106 -0
- package/dist/js/orpc-client/mcp-hosting/schemas.js.map +1 -0
- package/dist/js/orpc-client/mcp-hosting/schemas.mjs +68 -0
- package/dist/js/orpc-client/mcp-hosting/schemas.mjs.map +1 -0
- package/dist/js/orpc-client.js +519 -447
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +512 -447
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/types/orpc-client/mcp-hosting/contract.d.ts +9 -322
- package/dist/types/orpc-client/mcp-hosting/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/mcp-hosting/index.d.ts +1 -0
- package/dist/types/orpc-client/mcp-hosting/index.d.ts.map +1 -1
- package/dist/types/orpc-client/mcp-hosting/kv.d.ts +39 -0
- package/dist/types/orpc-client/mcp-hosting/kv.d.ts.map +1 -0
- package/dist/types/orpc-client/mcp-hosting/schemas.d.ts +424 -0
- package/dist/types/orpc-client/mcp-hosting/schemas.d.ts.map +1 -0
- package/package.json +7 -1
package/dist/js/orpc-client.js
CHANGED
|
@@ -280,6 +280,10 @@ __export(orpc_client_exports, {
|
|
|
280
280
|
JavaCoordinateSchema: () => JavaCoordinateSchema,
|
|
281
281
|
JqStringSchema: () => JqStringSchema,
|
|
282
282
|
JsonBodyShapeSchema: () => JsonBodyShapeSchema,
|
|
283
|
+
KV_KEY_PREFIXES: () => KV_KEY_PREFIXES,
|
|
284
|
+
KV_KEY_PREFIX_CONFIG: () => KV_KEY_PREFIX_CONFIG,
|
|
285
|
+
KV_KEY_PREFIX_META: () => KV_KEY_PREFIX_META,
|
|
286
|
+
KV_KEY_PREFIX_ORG: () => KV_KEY_PREFIX_ORG,
|
|
283
287
|
LEDGER_ARTIFACT_METADATA_SCHEMAS: () => LEDGER_ARTIFACT_METADATA_SCHEMAS,
|
|
284
288
|
LEDGER_MANIFEST_SCHEMA_VERSION: () => LEDGER_MANIFEST_SCHEMA_VERSION,
|
|
285
289
|
LEDGER_SHARD_SCHEMA_VERSION: () => LEDGER_SHARD_SCHEMA_VERSION,
|
|
@@ -681,6 +685,8 @@ __export(orpc_client_exports, {
|
|
|
681
685
|
createTokensClient: () => createTokensClient,
|
|
682
686
|
dashboardAgentContract: () => dashboardAgentContract,
|
|
683
687
|
dashboardContract: () => dashboardContract,
|
|
688
|
+
deploymentConfigFromParsed: () => deploymentConfigFromParsed,
|
|
689
|
+
deploymentMetaFromParsed: () => deploymentMetaFromParsed,
|
|
684
690
|
docsCacheContract: () => docsCacheContract,
|
|
685
691
|
docsDeploymentContract: () => docsDeploymentContract,
|
|
686
692
|
docsLedgerContract: () => docsLedgerContract,
|
|
@@ -703,6 +709,7 @@ __export(orpc_client_exports, {
|
|
|
703
709
|
mcpHostingContract: () => mcpHostingContract,
|
|
704
710
|
organizationContract: () => organizationContract,
|
|
705
711
|
pdfExportContract: () => pdfExportContract,
|
|
712
|
+
scriptNameFor: () => scriptNameFor,
|
|
706
713
|
sdksContract: () => sdksContract,
|
|
707
714
|
selectLedgerSegmentsForLocale: () => selectLedgerSegmentsForLocale,
|
|
708
715
|
slugsContract: () => slugsContract,
|
|
@@ -6298,9 +6305,10 @@ var import_fetch17 = require("@orpc/openapi-client/fetch");
|
|
|
6298
6305
|
|
|
6299
6306
|
// src/orpc-client/mcp-hosting/contract.ts
|
|
6300
6307
|
var import_contract31 = require("@orpc/contract");
|
|
6308
|
+
var z27 = __toESM(require("zod"), 1);
|
|
6309
|
+
|
|
6310
|
+
// src/orpc-client/mcp-hosting/schemas.ts
|
|
6301
6311
|
var z26 = __toESM(require("zod"), 1);
|
|
6302
|
-
var McpPathSegmentSchema = z26.string().min(1).max(30).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
6303
|
-
var McpDeploymentStatusSchema = z26.enum(["PUBLISHING", "SUCCEEDED", "FAILED"]);
|
|
6304
6312
|
var McpAuthSchemeSchema = z26.discriminatedUnion("type", [
|
|
6305
6313
|
z26.object({ type: z26.literal("bearer") }),
|
|
6306
6314
|
z26.object({
|
|
@@ -6310,6 +6318,9 @@ var McpAuthSchemeSchema = z26.discriminatedUnion("type", [
|
|
|
6310
6318
|
}),
|
|
6311
6319
|
z26.object({ type: z26.literal("basic") })
|
|
6312
6320
|
]);
|
|
6321
|
+
var HttpUrlSchema = z26.string().url().refine((value) => /^https?:\/\//i.test(value), {
|
|
6322
|
+
message: "must be an http(s) URL"
|
|
6323
|
+
});
|
|
6313
6324
|
var McpMetadataSchema = z26.object({
|
|
6314
6325
|
name: z26.string().min(1),
|
|
6315
6326
|
toolsets: z26.record(z26.string(), z26.array(z26.string())),
|
|
@@ -6333,47 +6344,67 @@ var McpMetadataSchema = z26.object({
|
|
|
6333
6344
|
required: z26.boolean()
|
|
6334
6345
|
}).strict()
|
|
6335
6346
|
),
|
|
6336
|
-
baseUrl:
|
|
6347
|
+
baseUrl: HttpUrlSchema,
|
|
6337
6348
|
followRedirects: z26.boolean(),
|
|
6338
6349
|
maxRedirects: z26.number().int().nonnegative(),
|
|
6339
6350
|
allowedRedirectHosts: z26.array(z26.string())
|
|
6340
6351
|
}).passthrough();
|
|
6341
|
-
var
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6352
|
+
var DeploymentConfigSchema = z26.object({
|
|
6353
|
+
serverName: z26.string().min(1),
|
|
6354
|
+
baseUrl: HttpUrlSchema,
|
|
6355
|
+
/**
|
|
6356
|
+
* Runtime rewrite of the upstream base URL. Part of the edge contract
|
|
6357
|
+
* (the outbound worker honors it) but not yet written by FDR.
|
|
6358
|
+
*/
|
|
6359
|
+
baseUrlOverride: HttpUrlSchema.optional(),
|
|
6360
|
+
followRedirects: z26.boolean(),
|
|
6361
|
+
maxRedirects: z26.number().int().nonnegative(),
|
|
6362
|
+
allowedRedirectHosts: z26.array(z26.string()),
|
|
6363
|
+
authSchemes: z26.array(McpAuthSchemeSchema),
|
|
6364
|
+
authRequired: z26.boolean(),
|
|
6365
|
+
toolsets: z26.record(z26.string(), z26.array(z26.string())),
|
|
6366
|
+
toolsetMetadata: McpMetadataSchema.shape.toolsetMetadata
|
|
6367
|
+
});
|
|
6368
|
+
|
|
6369
|
+
// src/orpc-client/mcp-hosting/contract.ts
|
|
6370
|
+
var McpPathSegmentSchema = z27.string().min(1).max(30).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
6371
|
+
var McpDeploymentStatusSchema = z27.enum(["PUBLISHING", "SUCCEEDED", "FAILED"]);
|
|
6372
|
+
var McpModuleSchema = z27.object({
|
|
6373
|
+
name: z27.string().regex(/^[A-Za-z0-9._/-]+$/),
|
|
6374
|
+
hash: z27.string().regex(/^[0-9a-f]{64}$/),
|
|
6375
|
+
contentType: z27.string().min(1)
|
|
6345
6376
|
}).strict();
|
|
6346
|
-
var McpGitInputSchema =
|
|
6347
|
-
repoUrl:
|
|
6348
|
-
branch:
|
|
6349
|
-
commitSha:
|
|
6377
|
+
var McpGitInputSchema = z27.object({
|
|
6378
|
+
repoUrl: z27.string(),
|
|
6379
|
+
branch: z27.string(),
|
|
6380
|
+
commitSha: z27.string().optional()
|
|
6350
6381
|
}).strict();
|
|
6351
|
-
var DeployMcpServerInputSchema =
|
|
6382
|
+
var DeployMcpServerInputSchema = z27.object({
|
|
6352
6383
|
orgId: McpPathSegmentSchema,
|
|
6353
6384
|
slug: McpPathSegmentSchema,
|
|
6354
|
-
mainModule:
|
|
6355
|
-
compatibilityDate:
|
|
6356
|
-
compatibilityFlags:
|
|
6385
|
+
mainModule: z27.string().min(1),
|
|
6386
|
+
compatibilityDate: z27.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
6387
|
+
compatibilityFlags: z27.array(z27.string()),
|
|
6357
6388
|
// Bounded so a single deploy request cannot fan out unbounded parallel
|
|
6358
6389
|
// CAS lookups and S3 reads. Generated MCP workers are 1-2 modules;
|
|
6359
6390
|
// 20 leaves room for wasm/sourcemap/chunk splitting.
|
|
6360
|
-
modules:
|
|
6391
|
+
modules: z27.array(McpModuleSchema).min(1).max(20),
|
|
6361
6392
|
metadata: McpMetadataSchema,
|
|
6362
6393
|
// Everything else in this schema is bounded; keep the opaque config
|
|
6363
6394
|
// blob bounded too so it cannot balloon the JSONB row.
|
|
6364
|
-
config:
|
|
6395
|
+
config: z27.unknown().optional().refine((value) => value === void 0 || (JSON.stringify(value)?.length ?? 0) <= 65536, {
|
|
6365
6396
|
message: "config must be at most 64KB serialized"
|
|
6366
6397
|
}),
|
|
6367
|
-
generatorName:
|
|
6368
|
-
generatorVersion:
|
|
6369
|
-
cliVersion:
|
|
6398
|
+
generatorName: z27.string().min(1),
|
|
6399
|
+
generatorVersion: z27.string().min(1),
|
|
6400
|
+
cliVersion: z27.string().optional(),
|
|
6370
6401
|
git: McpGitInputSchema.optional()
|
|
6371
6402
|
}).strict().superRefine((input, ctx) => {
|
|
6372
6403
|
const names = /* @__PURE__ */ new Set();
|
|
6373
6404
|
for (const module2 of input.modules) {
|
|
6374
6405
|
if (names.has(module2.name)) {
|
|
6375
6406
|
ctx.addIssue({
|
|
6376
|
-
code:
|
|
6407
|
+
code: z27.ZodIssueCode.custom,
|
|
6377
6408
|
path: ["modules"],
|
|
6378
6409
|
message: `duplicate module name: ${module2.name}`
|
|
6379
6410
|
});
|
|
@@ -6382,45 +6413,45 @@ var DeployMcpServerInputSchema = z26.object({
|
|
|
6382
6413
|
}
|
|
6383
6414
|
if (!names.has(input.mainModule)) {
|
|
6384
6415
|
ctx.addIssue({
|
|
6385
|
-
code:
|
|
6416
|
+
code: z27.ZodIssueCode.custom,
|
|
6386
6417
|
path: ["mainModule"],
|
|
6387
6418
|
message: `mainModule ${input.mainModule} is not among the submitted modules`
|
|
6388
6419
|
});
|
|
6389
6420
|
}
|
|
6390
6421
|
});
|
|
6391
|
-
var GetMcpServerInputSchema =
|
|
6422
|
+
var GetMcpServerInputSchema = z27.object({
|
|
6392
6423
|
orgId: McpPathSegmentSchema,
|
|
6393
6424
|
slug: McpPathSegmentSchema
|
|
6394
6425
|
});
|
|
6395
|
-
var ListMcpServersInputSchema =
|
|
6396
|
-
orgId:
|
|
6426
|
+
var ListMcpServersInputSchema = z27.object({
|
|
6427
|
+
orgId: z27.string()
|
|
6397
6428
|
});
|
|
6398
6429
|
var ListMcpDeploymentsInputSchema = GetMcpServerInputSchema;
|
|
6399
6430
|
var DeleteMcpServerInputSchema = GetMcpServerInputSchema;
|
|
6400
|
-
var McpDeploymentSummarySchema =
|
|
6401
|
-
id:
|
|
6431
|
+
var McpDeploymentSummarySchema = z27.object({
|
|
6432
|
+
id: z27.string(),
|
|
6402
6433
|
status: McpDeploymentStatusSchema,
|
|
6403
6434
|
/** True when this deployment is the one the server currently serves. */
|
|
6404
|
-
isActive:
|
|
6405
|
-
generatorVersion:
|
|
6406
|
-
createdAt:
|
|
6407
|
-
createdBy:
|
|
6408
|
-
error:
|
|
6409
|
-
});
|
|
6410
|
-
var McpServerSchema =
|
|
6411
|
-
id:
|
|
6412
|
-
orgId:
|
|
6413
|
-
slug:
|
|
6435
|
+
isActive: z27.boolean(),
|
|
6436
|
+
generatorVersion: z27.string(),
|
|
6437
|
+
createdAt: z27.string(),
|
|
6438
|
+
createdBy: z27.string().nullish(),
|
|
6439
|
+
error: z27.object({ name: z27.string(), message: z27.string() }).nullish()
|
|
6440
|
+
});
|
|
6441
|
+
var McpServerSchema = z27.object({
|
|
6442
|
+
id: z27.string(),
|
|
6443
|
+
orgId: z27.string(),
|
|
6444
|
+
slug: z27.string(),
|
|
6414
6445
|
/** The server is serving iff this is set; it names the serving deployment. */
|
|
6415
|
-
activeDeploymentId:
|
|
6446
|
+
activeDeploymentId: z27.string().nullish(),
|
|
6416
6447
|
/** Most recent publication attempt — how the last deploy went. */
|
|
6417
6448
|
latestDeployment: McpDeploymentSummarySchema.nullish(),
|
|
6418
|
-
url:
|
|
6419
|
-
createdAt:
|
|
6420
|
-
updatedAt:
|
|
6449
|
+
url: z27.string().url(),
|
|
6450
|
+
createdAt: z27.string(),
|
|
6451
|
+
updatedAt: z27.string()
|
|
6421
6452
|
});
|
|
6422
|
-
var ListMcpServersResponseSchema =
|
|
6423
|
-
var ListMcpDeploymentsResponseSchema =
|
|
6453
|
+
var ListMcpServersResponseSchema = z27.object({ servers: z27.array(McpServerSchema) });
|
|
6454
|
+
var ListMcpDeploymentsResponseSchema = z27.object({ deployments: z27.array(McpDeploymentSummarySchema) });
|
|
6424
6455
|
var mcpHostingContract = {
|
|
6425
6456
|
deploy: import_contract31.oc.route({ method: "POST", path: "/deploy" }).input(DeployMcpServerInputSchema).output(McpServerSchema),
|
|
6426
6457
|
getServer: import_contract31.oc.route({ method: "GET", path: "/servers/{slug}" }).input(GetMcpServerInputSchema).output(McpServerSchema),
|
|
@@ -6448,84 +6479,84 @@ var import_fetch18 = require("@orpc/openapi-client/fetch");
|
|
|
6448
6479
|
|
|
6449
6480
|
// src/orpc-client/pdf-export/contract.ts
|
|
6450
6481
|
var import_contract33 = require("@orpc/contract");
|
|
6451
|
-
var
|
|
6452
|
-
var PdfExportScopeSchema =
|
|
6453
|
-
pageSlugs:
|
|
6454
|
-
});
|
|
6455
|
-
var PdfExportOptionsV1Schema =
|
|
6456
|
-
coverTitle:
|
|
6457
|
-
coverSubtitle:
|
|
6458
|
-
hideCoverFooter:
|
|
6459
|
-
headerLeftTemplate:
|
|
6460
|
-
headerRightTemplate:
|
|
6461
|
-
footerLeftTemplate:
|
|
6462
|
-
footerRightTemplate:
|
|
6482
|
+
var z28 = __toESM(require("zod"), 1);
|
|
6483
|
+
var PdfExportScopeSchema = z28.object({
|
|
6484
|
+
pageSlugs: z28.array(z28.string())
|
|
6485
|
+
});
|
|
6486
|
+
var PdfExportOptionsV1Schema = z28.object({
|
|
6487
|
+
coverTitle: z28.string().nullish(),
|
|
6488
|
+
coverSubtitle: z28.string().nullish(),
|
|
6489
|
+
hideCoverFooter: z28.boolean().nullish(),
|
|
6490
|
+
headerLeftTemplate: z28.string().nullish(),
|
|
6491
|
+
headerRightTemplate: z28.string().nullish(),
|
|
6492
|
+
footerLeftTemplate: z28.string().nullish(),
|
|
6493
|
+
footerRightTemplate: z28.string().nullish(),
|
|
6463
6494
|
scope: PdfExportScopeSchema.nullish(),
|
|
6464
|
-
hideCover:
|
|
6465
|
-
hideToc:
|
|
6495
|
+
hideCover: z28.boolean().nullish(),
|
|
6496
|
+
hideToc: z28.boolean().nullish()
|
|
6466
6497
|
});
|
|
6467
|
-
var PdfExportOptionsSchema =
|
|
6468
|
-
|
|
6498
|
+
var PdfExportOptionsSchema = z28.discriminatedUnion("version", [
|
|
6499
|
+
z28.object({ version: z28.literal("v1") }).merge(PdfExportOptionsV1Schema)
|
|
6469
6500
|
]);
|
|
6470
|
-
var PdfExportTaskStatusSchema =
|
|
6471
|
-
var PdfExportTaskSchema =
|
|
6472
|
-
id:
|
|
6473
|
-
orgId:
|
|
6474
|
-
docsUrl:
|
|
6475
|
-
productId:
|
|
6476
|
-
versionId:
|
|
6477
|
-
requesterName:
|
|
6478
|
-
notifyEmails:
|
|
6501
|
+
var PdfExportTaskStatusSchema = z28.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED"]);
|
|
6502
|
+
var PdfExportTaskSchema = z28.object({
|
|
6503
|
+
id: z28.string(),
|
|
6504
|
+
orgId: z28.string(),
|
|
6505
|
+
docsUrl: z28.string(),
|
|
6506
|
+
productId: z28.string().nullish(),
|
|
6507
|
+
versionId: z28.string().nullish(),
|
|
6508
|
+
requesterName: z28.string().nullish(),
|
|
6509
|
+
notifyEmails: z28.array(z28.string()).nullish(),
|
|
6479
6510
|
status: PdfExportTaskStatusSchema,
|
|
6480
6511
|
options: PdfExportOptionsSchema.nullish(),
|
|
6481
|
-
createdAt:
|
|
6482
|
-
startedAt:
|
|
6483
|
-
completedAt:
|
|
6484
|
-
fileName:
|
|
6485
|
-
sizeBytes:
|
|
6486
|
-
errorMessage:
|
|
6487
|
-
});
|
|
6488
|
-
var ListPdfExportTasksResponseSchema =
|
|
6489
|
-
tasks:
|
|
6490
|
-
});
|
|
6491
|
-
var PdfExportDownloadResponseSchema =
|
|
6492
|
-
downloadUrl:
|
|
6493
|
-
fileName:
|
|
6494
|
-
sizeBytes:
|
|
6495
|
-
});
|
|
6496
|
-
var CreatePdfExportTaskInputSchema =
|
|
6497
|
-
orgId:
|
|
6498
|
-
docsUrl:
|
|
6499
|
-
productId:
|
|
6500
|
-
versionId:
|
|
6501
|
-
requesterName:
|
|
6512
|
+
createdAt: z28.string(),
|
|
6513
|
+
startedAt: z28.string().nullish(),
|
|
6514
|
+
completedAt: z28.string().nullish(),
|
|
6515
|
+
fileName: z28.string().nullish(),
|
|
6516
|
+
sizeBytes: z28.number().nullish(),
|
|
6517
|
+
errorMessage: z28.string().nullish()
|
|
6518
|
+
});
|
|
6519
|
+
var ListPdfExportTasksResponseSchema = z28.object({
|
|
6520
|
+
tasks: z28.array(PdfExportTaskSchema)
|
|
6521
|
+
});
|
|
6522
|
+
var PdfExportDownloadResponseSchema = z28.object({
|
|
6523
|
+
downloadUrl: z28.string(),
|
|
6524
|
+
fileName: z28.string(),
|
|
6525
|
+
sizeBytes: z28.number()
|
|
6526
|
+
});
|
|
6527
|
+
var CreatePdfExportTaskInputSchema = z28.object({
|
|
6528
|
+
orgId: z28.string(),
|
|
6529
|
+
docsUrl: z28.string(),
|
|
6530
|
+
productId: z28.string().nullish(),
|
|
6531
|
+
versionId: z28.string().nullish(),
|
|
6532
|
+
requesterName: z28.string().nullish(),
|
|
6502
6533
|
options: PdfExportOptionsSchema.nullish()
|
|
6503
6534
|
});
|
|
6504
|
-
var ListPdfExportTasksInputSchema =
|
|
6505
|
-
orgId:
|
|
6506
|
-
docsUrl:
|
|
6507
|
-
limit:
|
|
6535
|
+
var ListPdfExportTasksInputSchema = z28.object({
|
|
6536
|
+
orgId: z28.string(),
|
|
6537
|
+
docsUrl: z28.string(),
|
|
6538
|
+
limit: z28.coerce.number().nullish()
|
|
6508
6539
|
});
|
|
6509
|
-
var GetPdfExportTaskInputSchema =
|
|
6510
|
-
taskId:
|
|
6540
|
+
var GetPdfExportTaskInputSchema = z28.object({
|
|
6541
|
+
taskId: z28.string()
|
|
6511
6542
|
});
|
|
6512
|
-
var UpdatePdfExportTaskInputSchema =
|
|
6513
|
-
taskId:
|
|
6543
|
+
var UpdatePdfExportTaskInputSchema = z28.object({
|
|
6544
|
+
taskId: z28.string(),
|
|
6514
6545
|
status: PdfExportTaskStatusSchema,
|
|
6515
|
-
startedAt:
|
|
6516
|
-
completedAt:
|
|
6517
|
-
s3Key:
|
|
6518
|
-
fileName:
|
|
6519
|
-
sizeBytes:
|
|
6520
|
-
errorMessage:
|
|
6546
|
+
startedAt: z28.string().nullish(),
|
|
6547
|
+
completedAt: z28.string().nullish(),
|
|
6548
|
+
s3Key: z28.string().nullish(),
|
|
6549
|
+
fileName: z28.string().nullish(),
|
|
6550
|
+
sizeBytes: z28.number().nullish(),
|
|
6551
|
+
errorMessage: z28.string().nullish()
|
|
6521
6552
|
});
|
|
6522
|
-
var GetPdfExportDownloadUrlInputSchema =
|
|
6523
|
-
taskId:
|
|
6553
|
+
var GetPdfExportDownloadUrlInputSchema = z28.object({
|
|
6554
|
+
taskId: z28.string()
|
|
6524
6555
|
});
|
|
6525
|
-
var CleanupPdfExportsResponseSchema =
|
|
6526
|
-
expiredTasksDeleted:
|
|
6527
|
-
s3ObjectsDeleted:
|
|
6528
|
-
timedOutTasksFailed:
|
|
6556
|
+
var CleanupPdfExportsResponseSchema = z28.object({
|
|
6557
|
+
expiredTasksDeleted: z28.number(),
|
|
6558
|
+
s3ObjectsDeleted: z28.number(),
|
|
6559
|
+
timedOutTasksFailed: z28.number()
|
|
6529
6560
|
});
|
|
6530
6561
|
var pdfExportContract = {
|
|
6531
6562
|
createTask: import_contract33.oc.route({ method: "POST", path: "/task" }).input(CreatePdfExportTaskInputSchema).output(PdfExportTaskSchema),
|
|
@@ -6555,8 +6586,8 @@ var import_fetch19 = require("@orpc/openapi-client/fetch");
|
|
|
6555
6586
|
|
|
6556
6587
|
// src/orpc-client/sdks/contract.ts
|
|
6557
6588
|
var import_contract35 = require("@orpc/contract");
|
|
6558
|
-
var
|
|
6559
|
-
var LanguageEnumSchema =
|
|
6589
|
+
var z29 = __toESM(require("zod"), 1);
|
|
6590
|
+
var LanguageEnumSchema = z29.enum([
|
|
6560
6591
|
"Go",
|
|
6561
6592
|
"TypeScript",
|
|
6562
6593
|
"Java",
|
|
@@ -6567,14 +6598,14 @@ var LanguageEnumSchema = z28.enum([
|
|
|
6567
6598
|
"Swift",
|
|
6568
6599
|
"Rust"
|
|
6569
6600
|
]);
|
|
6570
|
-
var VersionBumpEnumSchema =
|
|
6571
|
-
var ComputeSemanticVersionInputSchema =
|
|
6572
|
-
package:
|
|
6601
|
+
var VersionBumpEnumSchema = z29.enum(["MAJOR", "MINOR", "PATCH"]);
|
|
6602
|
+
var ComputeSemanticVersionInputSchema = z29.object({
|
|
6603
|
+
package: z29.string(),
|
|
6573
6604
|
language: LanguageEnumSchema,
|
|
6574
|
-
githubRepository:
|
|
6605
|
+
githubRepository: z29.string().nullish()
|
|
6575
6606
|
});
|
|
6576
|
-
var ComputeSemanticVersionOutputSchema =
|
|
6577
|
-
version:
|
|
6607
|
+
var ComputeSemanticVersionOutputSchema = z29.object({
|
|
6608
|
+
version: z29.string(),
|
|
6578
6609
|
bump: VersionBumpEnumSchema
|
|
6579
6610
|
});
|
|
6580
6611
|
var sdksContract = {
|
|
@@ -6600,32 +6631,32 @@ var import_fetch20 = require("@orpc/openapi-client/fetch");
|
|
|
6600
6631
|
|
|
6601
6632
|
// src/orpc-client/slugs/contract.ts
|
|
6602
6633
|
var import_contract37 = require("@orpc/contract");
|
|
6603
|
-
var
|
|
6604
|
-
var SlugsInputSchema =
|
|
6605
|
-
domain:
|
|
6606
|
-
basepath:
|
|
6607
|
-
});
|
|
6608
|
-
var SlugEntrySchema =
|
|
6609
|
-
orgId:
|
|
6610
|
-
domain:
|
|
6611
|
-
basepath:
|
|
6612
|
-
slug:
|
|
6613
|
-
lastUpdated:
|
|
6614
|
-
});
|
|
6615
|
-
var MarkdownEntrySchema =
|
|
6616
|
-
orgId:
|
|
6617
|
-
domain:
|
|
6618
|
-
basepath:
|
|
6619
|
-
pageId:
|
|
6620
|
-
slug:
|
|
6621
|
-
hash:
|
|
6622
|
-
lastUpdated:
|
|
6623
|
-
});
|
|
6624
|
-
var GetSlugEntriesResponseSchema =
|
|
6625
|
-
entries:
|
|
6626
|
-
});
|
|
6627
|
-
var GetMarkdownEntriesResponseSchema =
|
|
6628
|
-
entries:
|
|
6634
|
+
var z30 = __toESM(require("zod"), 1);
|
|
6635
|
+
var SlugsInputSchema = z30.object({
|
|
6636
|
+
domain: z30.string(),
|
|
6637
|
+
basepath: z30.string().optional().default("")
|
|
6638
|
+
});
|
|
6639
|
+
var SlugEntrySchema = z30.object({
|
|
6640
|
+
orgId: z30.string(),
|
|
6641
|
+
domain: z30.string(),
|
|
6642
|
+
basepath: z30.string(),
|
|
6643
|
+
slug: z30.string(),
|
|
6644
|
+
lastUpdated: z30.string()
|
|
6645
|
+
});
|
|
6646
|
+
var MarkdownEntrySchema = z30.object({
|
|
6647
|
+
orgId: z30.string(),
|
|
6648
|
+
domain: z30.string(),
|
|
6649
|
+
basepath: z30.string(),
|
|
6650
|
+
pageId: z30.string(),
|
|
6651
|
+
slug: z30.string(),
|
|
6652
|
+
hash: z30.string(),
|
|
6653
|
+
lastUpdated: z30.string()
|
|
6654
|
+
});
|
|
6655
|
+
var GetSlugEntriesResponseSchema = z30.object({
|
|
6656
|
+
entries: z30.array(SlugEntrySchema)
|
|
6657
|
+
});
|
|
6658
|
+
var GetMarkdownEntriesResponseSchema = z30.object({
|
|
6659
|
+
entries: z30.array(MarkdownEntrySchema)
|
|
6629
6660
|
});
|
|
6630
6661
|
var slugsContract = {
|
|
6631
6662
|
getSlugEntries: import_contract37.oc.route({ method: "POST", path: "/slugs" }).input(SlugsInputSchema).output(GetSlugEntriesResponseSchema),
|
|
@@ -6651,102 +6682,102 @@ var import_fetch21 = require("@orpc/openapi-client/fetch");
|
|
|
6651
6682
|
|
|
6652
6683
|
// src/orpc-client/snippets/contract.ts
|
|
6653
6684
|
var import_contract39 = require("@orpc/contract");
|
|
6654
|
-
var
|
|
6655
|
-
var TypeScriptSdkSchema =
|
|
6656
|
-
var PythonSdkSchema =
|
|
6657
|
-
var GoSdkSchema =
|
|
6658
|
-
var RubySdkSchema =
|
|
6659
|
-
var JavaSdkSchema =
|
|
6660
|
-
var CsharpSdkSchema =
|
|
6661
|
-
var BaseSnippetCreateSchema =
|
|
6685
|
+
var z31 = __toESM(require("zod"), 1);
|
|
6686
|
+
var TypeScriptSdkSchema = z31.object({ package: z31.string(), version: z31.string() });
|
|
6687
|
+
var PythonSdkSchema = z31.object({ package: z31.string(), version: z31.string() });
|
|
6688
|
+
var GoSdkSchema = z31.object({ githubRepo: z31.string(), version: z31.string() });
|
|
6689
|
+
var RubySdkSchema = z31.object({ gem: z31.string(), version: z31.string() });
|
|
6690
|
+
var JavaSdkSchema = z31.object({ group: z31.string(), artifact: z31.string(), version: z31.string() });
|
|
6691
|
+
var CsharpSdkSchema = z31.object({ package: z31.string(), version: z31.string() });
|
|
6692
|
+
var BaseSnippetCreateSchema = z31.object({
|
|
6662
6693
|
endpoint: EndpointIdentifierSchema,
|
|
6663
|
-
exampleIdentifier:
|
|
6694
|
+
exampleIdentifier: z31.string().nullish()
|
|
6664
6695
|
});
|
|
6665
|
-
var SdkSnippetsCreateSchema =
|
|
6666
|
-
|
|
6667
|
-
type:
|
|
6696
|
+
var SdkSnippetsCreateSchema = z31.discriminatedUnion("type", [
|
|
6697
|
+
z31.object({
|
|
6698
|
+
type: z31.literal("typescript"),
|
|
6668
6699
|
sdk: TypeScriptSdkSchema,
|
|
6669
|
-
snippets:
|
|
6700
|
+
snippets: z31.array(BaseSnippetCreateSchema.extend({ snippet: z31.object({ client: z31.string() }) }))
|
|
6670
6701
|
}),
|
|
6671
|
-
|
|
6672
|
-
type:
|
|
6702
|
+
z31.object({
|
|
6703
|
+
type: z31.literal("python"),
|
|
6673
6704
|
sdk: PythonSdkSchema,
|
|
6674
|
-
snippets:
|
|
6705
|
+
snippets: z31.array(
|
|
6675
6706
|
BaseSnippetCreateSchema.extend({
|
|
6676
|
-
snippet:
|
|
6707
|
+
snippet: z31.object({ async_client: z31.string(), sync_client: z31.string() })
|
|
6677
6708
|
})
|
|
6678
6709
|
)
|
|
6679
6710
|
}),
|
|
6680
|
-
|
|
6681
|
-
type:
|
|
6711
|
+
z31.object({
|
|
6712
|
+
type: z31.literal("go"),
|
|
6682
6713
|
sdk: GoSdkSchema,
|
|
6683
|
-
snippets:
|
|
6714
|
+
snippets: z31.array(BaseSnippetCreateSchema.extend({ snippet: z31.object({ client: z31.string() }) }))
|
|
6684
6715
|
}),
|
|
6685
|
-
|
|
6686
|
-
type:
|
|
6716
|
+
z31.object({
|
|
6717
|
+
type: z31.literal("java"),
|
|
6687
6718
|
sdk: JavaSdkSchema,
|
|
6688
|
-
snippets:
|
|
6719
|
+
snippets: z31.array(
|
|
6689
6720
|
BaseSnippetCreateSchema.extend({
|
|
6690
|
-
snippet:
|
|
6721
|
+
snippet: z31.object({ async_client: z31.string(), sync_client: z31.string() })
|
|
6691
6722
|
})
|
|
6692
6723
|
)
|
|
6693
6724
|
}),
|
|
6694
|
-
|
|
6695
|
-
type:
|
|
6725
|
+
z31.object({
|
|
6726
|
+
type: z31.literal("ruby"),
|
|
6696
6727
|
sdk: RubySdkSchema,
|
|
6697
|
-
snippets:
|
|
6728
|
+
snippets: z31.array(BaseSnippetCreateSchema.extend({ snippet: z31.object({ client: z31.string() }) }))
|
|
6698
6729
|
}),
|
|
6699
|
-
|
|
6700
|
-
type:
|
|
6730
|
+
z31.object({
|
|
6731
|
+
type: z31.literal("csharp"),
|
|
6701
6732
|
sdk: CsharpSdkSchema,
|
|
6702
|
-
snippets:
|
|
6733
|
+
snippets: z31.array(BaseSnippetCreateSchema.extend({ snippet: z31.object({ client: z31.string() }) }))
|
|
6703
6734
|
})
|
|
6704
6735
|
]);
|
|
6705
6736
|
var snippetsFactoryContract = {
|
|
6706
6737
|
createSnippetsForSdk: import_contract39.oc.route({ method: "POST", path: "/create" }).input(
|
|
6707
|
-
|
|
6708
|
-
orgId:
|
|
6709
|
-
apiId:
|
|
6738
|
+
z31.object({
|
|
6739
|
+
orgId: z31.string(),
|
|
6740
|
+
apiId: z31.string(),
|
|
6710
6741
|
snippets: SdkSnippetsCreateSchema
|
|
6711
6742
|
})
|
|
6712
6743
|
)
|
|
6713
6744
|
};
|
|
6714
|
-
var ParameterPayloadSchema =
|
|
6715
|
-
name:
|
|
6716
|
-
value:
|
|
6745
|
+
var ParameterPayloadSchema = z31.object({
|
|
6746
|
+
name: z31.string(),
|
|
6747
|
+
value: z31.unknown()
|
|
6717
6748
|
});
|
|
6718
|
-
var AuthPayloadSchema =
|
|
6719
|
-
|
|
6720
|
-
|
|
6749
|
+
var AuthPayloadSchema = z31.discriminatedUnion("type", [
|
|
6750
|
+
z31.object({ type: z31.literal("bearer"), token: z31.string() }),
|
|
6751
|
+
z31.object({ type: z31.literal("basic"), username: z31.string(), password: z31.string() })
|
|
6721
6752
|
]);
|
|
6722
|
-
var CustomSnippetPayloadSchema =
|
|
6723
|
-
headers:
|
|
6724
|
-
pathParameters:
|
|
6725
|
-
queryParameters:
|
|
6726
|
-
requestBody:
|
|
6753
|
+
var CustomSnippetPayloadSchema = z31.object({
|
|
6754
|
+
headers: z31.array(ParameterPayloadSchema).nullish(),
|
|
6755
|
+
pathParameters: z31.array(ParameterPayloadSchema).nullish(),
|
|
6756
|
+
queryParameters: z31.array(ParameterPayloadSchema).nullish(),
|
|
6757
|
+
requestBody: z31.unknown().nullish(),
|
|
6727
6758
|
auth: AuthPayloadSchema.nullish()
|
|
6728
6759
|
});
|
|
6729
6760
|
var snippetsContract = {
|
|
6730
6761
|
get: import_contract39.oc.route({ method: "POST", path: "/" }).input(
|
|
6731
|
-
|
|
6732
|
-
orgId:
|
|
6733
|
-
apiId:
|
|
6734
|
-
sdks:
|
|
6762
|
+
z31.object({
|
|
6763
|
+
orgId: z31.string().nullish(),
|
|
6764
|
+
apiId: z31.string().nullish(),
|
|
6765
|
+
sdks: z31.array(SdkRequestSchema).nullish(),
|
|
6735
6766
|
endpoint: EndpointIdentifierSchema,
|
|
6736
|
-
exampleIdentifier:
|
|
6767
|
+
exampleIdentifier: z31.string().nullish(),
|
|
6737
6768
|
payload: CustomSnippetPayloadSchema.nullish()
|
|
6738
6769
|
})
|
|
6739
|
-
).output(
|
|
6770
|
+
).output(z31.array(z31.unknown())),
|
|
6740
6771
|
load: import_contract39.oc.route({ method: "POST", path: "/load" }).input(
|
|
6741
|
-
|
|
6742
|
-
orgId:
|
|
6743
|
-
apiId:
|
|
6744
|
-
sdks:
|
|
6772
|
+
z31.object({
|
|
6773
|
+
orgId: z31.string().nullish(),
|
|
6774
|
+
apiId: z31.string().nullish(),
|
|
6775
|
+
sdks: z31.array(SdkRequestSchema).nullish()
|
|
6745
6776
|
})
|
|
6746
6777
|
).output(
|
|
6747
|
-
|
|
6748
|
-
next:
|
|
6749
|
-
snippets:
|
|
6778
|
+
z31.object({
|
|
6779
|
+
next: z31.number().nullish(),
|
|
6780
|
+
snippets: z31.record(z31.string(), z31.unknown())
|
|
6750
6781
|
})
|
|
6751
6782
|
)
|
|
6752
6783
|
};
|
|
@@ -6781,44 +6812,44 @@ var import_fetch22 = require("@orpc/openapi-client/fetch");
|
|
|
6781
6812
|
|
|
6782
6813
|
// src/orpc-client/templates/contract.ts
|
|
6783
6814
|
var import_contract41 = require("@orpc/contract");
|
|
6784
|
-
var
|
|
6785
|
-
var SnippetRegistryEntrySchema =
|
|
6815
|
+
var z32 = __toESM(require("zod"), 1);
|
|
6816
|
+
var SnippetRegistryEntrySchema = z32.object({
|
|
6786
6817
|
sdk: SdkSchema,
|
|
6787
|
-
endpointId:
|
|
6788
|
-
path:
|
|
6818
|
+
endpointId: z32.object({
|
|
6819
|
+
path: z32.string(),
|
|
6789
6820
|
method: HttpMethodSchema,
|
|
6790
|
-
identifierOverride:
|
|
6821
|
+
identifierOverride: z32.string().nullish()
|
|
6791
6822
|
}),
|
|
6792
|
-
snippetTemplate:
|
|
6793
|
-
type:
|
|
6794
|
-
functionInvocation:
|
|
6795
|
-
clientInstantiation:
|
|
6823
|
+
snippetTemplate: z32.object({
|
|
6824
|
+
type: z32.literal("v1"),
|
|
6825
|
+
functionInvocation: z32.unknown(),
|
|
6826
|
+
clientInstantiation: z32.string()
|
|
6796
6827
|
}),
|
|
6797
|
-
additionalTemplates:
|
|
6828
|
+
additionalTemplates: z32.record(z32.string(), z32.unknown()).nullish()
|
|
6798
6829
|
});
|
|
6799
|
-
var RegisterInputSchema =
|
|
6800
|
-
orgId:
|
|
6801
|
-
apiId:
|
|
6802
|
-
apiDefinitionId:
|
|
6830
|
+
var RegisterInputSchema = z32.object({
|
|
6831
|
+
orgId: z32.string(),
|
|
6832
|
+
apiId: z32.string(),
|
|
6833
|
+
apiDefinitionId: z32.string(),
|
|
6803
6834
|
snippet: SnippetRegistryEntrySchema
|
|
6804
6835
|
});
|
|
6805
|
-
var RegisterBatchInputSchema =
|
|
6806
|
-
orgId:
|
|
6807
|
-
apiId:
|
|
6808
|
-
apiDefinitionId:
|
|
6809
|
-
snippets:
|
|
6836
|
+
var RegisterBatchInputSchema = z32.object({
|
|
6837
|
+
orgId: z32.string(),
|
|
6838
|
+
apiId: z32.string(),
|
|
6839
|
+
apiDefinitionId: z32.string(),
|
|
6840
|
+
snippets: z32.array(SnippetRegistryEntrySchema)
|
|
6810
6841
|
});
|
|
6811
|
-
var GetInputSchema =
|
|
6812
|
-
orgId:
|
|
6813
|
-
apiId:
|
|
6842
|
+
var GetInputSchema = z32.object({
|
|
6843
|
+
orgId: z32.string(),
|
|
6844
|
+
apiId: z32.string(),
|
|
6814
6845
|
sdk: SdkSchema,
|
|
6815
|
-
endpointId:
|
|
6816
|
-
path:
|
|
6846
|
+
endpointId: z32.object({
|
|
6847
|
+
path: z32.string(),
|
|
6817
6848
|
method: HttpMethodSchema,
|
|
6818
|
-
identifierOverride:
|
|
6849
|
+
identifierOverride: z32.string().nullish()
|
|
6819
6850
|
})
|
|
6820
6851
|
});
|
|
6821
|
-
var EndpointSnippetTemplateSchema =
|
|
6852
|
+
var EndpointSnippetTemplateSchema = z32.record(z32.string(), z32.unknown());
|
|
6822
6853
|
var templatesContract = {
|
|
6823
6854
|
register: import_contract41.oc.route({ method: "POST", path: "/register" }).input(RegisterInputSchema),
|
|
6824
6855
|
registerBatch: import_contract41.oc.route({ method: "POST", path: "/register/batch" }).input(RegisterBatchInputSchema),
|
|
@@ -6845,18 +6876,18 @@ var import_fetch23 = require("@orpc/openapi-client/fetch");
|
|
|
6845
6876
|
|
|
6846
6877
|
// src/orpc-client/tokens/contract.ts
|
|
6847
6878
|
var import_contract43 = require("@orpc/contract");
|
|
6848
|
-
var
|
|
6849
|
-
var GenerateTokenInputSchema =
|
|
6850
|
-
orgId:
|
|
6851
|
-
scope:
|
|
6879
|
+
var z33 = __toESM(require("zod"), 1);
|
|
6880
|
+
var GenerateTokenInputSchema = z33.object({
|
|
6881
|
+
orgId: z33.string(),
|
|
6882
|
+
scope: z33.string()
|
|
6852
6883
|
});
|
|
6853
|
-
var RevokeTokenInputSchema =
|
|
6854
|
-
orgId:
|
|
6855
|
-
tokenId:
|
|
6884
|
+
var RevokeTokenInputSchema = z33.object({
|
|
6885
|
+
orgId: z33.string(),
|
|
6886
|
+
tokenId: z33.string()
|
|
6856
6887
|
});
|
|
6857
|
-
var GenerateTokenOutputSchema =
|
|
6858
|
-
token:
|
|
6859
|
-
id:
|
|
6888
|
+
var GenerateTokenOutputSchema = z33.object({
|
|
6889
|
+
token: z33.string(),
|
|
6890
|
+
id: z33.string()
|
|
6860
6891
|
});
|
|
6861
6892
|
var tokensContract = {
|
|
6862
6893
|
generate: import_contract43.oc.route({ method: "POST", path: "/generate" }).input(GenerateTokenInputSchema).output(GenerateTokenOutputSchema),
|
|
@@ -6914,24 +6945,24 @@ var import_fetch24 = require("@orpc/openapi-client/fetch");
|
|
|
6914
6945
|
|
|
6915
6946
|
// src/orpc-client/docs/v1/write/contract.ts
|
|
6916
6947
|
var import_contract45 = require("@orpc/contract");
|
|
6917
|
-
var
|
|
6918
|
-
var StartDocsRegisterV1InputSchema =
|
|
6919
|
-
orgId:
|
|
6920
|
-
domain:
|
|
6921
|
-
filepaths:
|
|
6948
|
+
var z34 = __toESM(require("zod"), 1);
|
|
6949
|
+
var StartDocsRegisterV1InputSchema = z34.object({
|
|
6950
|
+
orgId: z34.string(),
|
|
6951
|
+
domain: z34.string(),
|
|
6952
|
+
filepaths: z34.array(z34.string())
|
|
6922
6953
|
});
|
|
6923
|
-
var StartDocsRegisterV1ResponseSchema =
|
|
6924
|
-
docsRegistrationId:
|
|
6925
|
-
uploadUrls:
|
|
6926
|
-
skippedFiles:
|
|
6954
|
+
var StartDocsRegisterV1ResponseSchema = z34.object({
|
|
6955
|
+
docsRegistrationId: z34.string(),
|
|
6956
|
+
uploadUrls: z34.record(z34.string(), FileS3UploadUrlSchema),
|
|
6957
|
+
skippedFiles: z34.array(z34.string())
|
|
6927
6958
|
});
|
|
6928
|
-
var FinishDocsRegisterV1InputSchema =
|
|
6929
|
-
docsRegistrationId:
|
|
6930
|
-
docsDefinition:
|
|
6959
|
+
var FinishDocsRegisterV1InputSchema = z34.object({
|
|
6960
|
+
docsRegistrationId: z34.string(),
|
|
6961
|
+
docsDefinition: z34.unknown()
|
|
6931
6962
|
});
|
|
6932
6963
|
var docsV1WriteContract = {
|
|
6933
6964
|
startDocsRegister: import_contract45.oc.route({ method: "POST", path: "/init" }).input(StartDocsRegisterV1InputSchema).output(StartDocsRegisterV1ResponseSchema),
|
|
6934
|
-
finishDocsRegister: import_contract45.oc.route({ method: "POST", path: "/register/{docsRegistrationId}" }).input(FinishDocsRegisterV1InputSchema).output(
|
|
6965
|
+
finishDocsRegister: import_contract45.oc.route({ method: "POST", path: "/register/{docsRegistrationId}" }).input(FinishDocsRegisterV1InputSchema).output(z34.void())
|
|
6935
6966
|
};
|
|
6936
6967
|
|
|
6937
6968
|
// src/orpc-client/docs/v1/write/client.ts
|
|
@@ -6948,7 +6979,7 @@ function createDocsV1WriteClient(options) {
|
|
|
6948
6979
|
}
|
|
6949
6980
|
|
|
6950
6981
|
// src/orpc-client/docs-ledger/config-files.ts
|
|
6951
|
-
var
|
|
6982
|
+
var z35 = __toESM(require("zod"), 1);
|
|
6952
6983
|
var PATH_OR_URL_METADATA_KEYS = [
|
|
6953
6984
|
"og:image",
|
|
6954
6985
|
"og:logo",
|
|
@@ -6956,57 +6987,57 @@ var PATH_OR_URL_METADATA_KEYS = [
|
|
|
6956
6987
|
"og:background-image",
|
|
6957
6988
|
"og:dynamic:background-image"
|
|
6958
6989
|
];
|
|
6959
|
-
var LogoViewSchema =
|
|
6960
|
-
var ThemeViewSchema =
|
|
6990
|
+
var LogoViewSchema = z35.union([z35.string(), z35.object({ path: z35.string() }).transform((v) => v.path)]);
|
|
6991
|
+
var ThemeViewSchema = z35.object({
|
|
6961
6992
|
logo: LogoViewSchema.optional().catch(void 0),
|
|
6962
|
-
backgroundImage:
|
|
6993
|
+
backgroundImage: z35.string().optional().catch(void 0)
|
|
6963
6994
|
});
|
|
6964
|
-
var ColorsViewSchema =
|
|
6965
|
-
|
|
6966
|
-
type:
|
|
6995
|
+
var ColorsViewSchema = z35.union([
|
|
6996
|
+
z35.object({
|
|
6997
|
+
type: z35.literal("darkAndLight"),
|
|
6967
6998
|
dark: ThemeViewSchema.optional().catch(void 0),
|
|
6968
6999
|
light: ThemeViewSchema.optional().catch(void 0)
|
|
6969
7000
|
}),
|
|
6970
7001
|
ThemeViewSchema.transform((theme) => ({ type: "single", theme }))
|
|
6971
7002
|
]);
|
|
6972
|
-
var FontViewSchema =
|
|
6973
|
-
variants:
|
|
7003
|
+
var FontViewSchema = z35.object({
|
|
7004
|
+
variants: z35.array(z35.object({ fontFile: z35.string().optional().catch(void 0) })).catch([])
|
|
6974
7005
|
});
|
|
6975
|
-
var TypographyViewSchema =
|
|
7006
|
+
var TypographyViewSchema = z35.object({
|
|
6976
7007
|
headingsFont: FontViewSchema.optional().catch(void 0),
|
|
6977
7008
|
bodyFont: FontViewSchema.optional().catch(void 0),
|
|
6978
7009
|
codeFont: FontViewSchema.optional().catch(void 0)
|
|
6979
7010
|
});
|
|
6980
|
-
var JsFileViewSchema =
|
|
6981
|
-
|
|
6982
|
-
|
|
7011
|
+
var JsFileViewSchema = z35.union([
|
|
7012
|
+
z35.object({ path: z35.string() }).transform((v) => v.path),
|
|
7013
|
+
z35.object({ fileId: z35.string() }).transform((v) => v.fileId)
|
|
6983
7014
|
]);
|
|
6984
|
-
var MetadataFileRefViewSchema =
|
|
6985
|
-
type:
|
|
6986
|
-
value:
|
|
7015
|
+
var MetadataFileRefViewSchema = z35.object({
|
|
7016
|
+
type: z35.enum(["path", "fileId"]),
|
|
7017
|
+
value: z35.string()
|
|
6987
7018
|
});
|
|
6988
|
-
var ConfigViewSchema =
|
|
6989
|
-
favicon:
|
|
7019
|
+
var ConfigViewSchema = z35.object({
|
|
7020
|
+
favicon: z35.string().optional().catch(void 0),
|
|
6990
7021
|
colorsV3: ColorsViewSchema.optional().catch(void 0),
|
|
6991
7022
|
typographyV2: TypographyViewSchema.optional().catch(void 0),
|
|
6992
|
-
js:
|
|
6993
|
-
metadata:
|
|
7023
|
+
js: z35.object({ files: z35.array(JsFileViewSchema.optional().catch(void 0)).catch([]) }).optional().catch(void 0),
|
|
7024
|
+
metadata: z35.record(z35.string(), z35.unknown()).optional().catch(void 0)
|
|
6994
7025
|
});
|
|
6995
7026
|
function isDarkAndLight(colors) {
|
|
6996
7027
|
return colors.type === "darkAndLight";
|
|
6997
7028
|
}
|
|
6998
7029
|
var NAV_ICON_FILE_PREFIX = "file:";
|
|
6999
|
-
var FileTokenTreeSchema =
|
|
7000
|
-
() =>
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7030
|
+
var FileTokenTreeSchema = z35.lazy(
|
|
7031
|
+
() => z35.union([
|
|
7032
|
+
z35.string(),
|
|
7033
|
+
z35.number(),
|
|
7034
|
+
z35.boolean(),
|
|
7035
|
+
z35.null(),
|
|
7036
|
+
z35.array(FileTokenTreeSchema),
|
|
7037
|
+
z35.record(z35.string(), FileTokenTreeSchema)
|
|
7007
7038
|
])
|
|
7008
7039
|
);
|
|
7009
|
-
var ConfigFileTokenViewSchema =
|
|
7040
|
+
var ConfigFileTokenViewSchema = z35.object({
|
|
7010
7041
|
landingPage: FileTokenTreeSchema.optional().catch(void 0)
|
|
7011
7042
|
});
|
|
7012
7043
|
function addFileTokenPath(paths, value) {
|
|
@@ -7028,17 +7059,17 @@ function addFileTokenPath(paths, value) {
|
|
|
7028
7059
|
}
|
|
7029
7060
|
}
|
|
7030
7061
|
}
|
|
7031
|
-
var SegmentDetailIconViewSchema =
|
|
7032
|
-
icon:
|
|
7033
|
-
metadata:
|
|
7034
|
-
icon:
|
|
7035
|
-
image:
|
|
7062
|
+
var SegmentDetailIconViewSchema = z35.object({
|
|
7063
|
+
icon: z35.string().nullish().catch(void 0),
|
|
7064
|
+
metadata: z35.object({
|
|
7065
|
+
icon: z35.string().nullish().catch(void 0),
|
|
7066
|
+
image: z35.string().nullish().catch(void 0)
|
|
7036
7067
|
}).nullish().catch(void 0)
|
|
7037
7068
|
});
|
|
7038
|
-
var SegmentIconViewSchema =
|
|
7039
|
-
metadata:
|
|
7040
|
-
icon:
|
|
7041
|
-
image:
|
|
7069
|
+
var SegmentIconViewSchema = z35.object({
|
|
7070
|
+
metadata: z35.object({
|
|
7071
|
+
icon: z35.string().nullish().catch(void 0),
|
|
7072
|
+
image: z35.string().nullish().catch(void 0)
|
|
7042
7073
|
}).nullish().catch(void 0),
|
|
7043
7074
|
product: SegmentDetailIconViewSchema.nullish().catch(void 0),
|
|
7044
7075
|
version: SegmentDetailIconViewSchema.nullish().catch(void 0),
|
|
@@ -7122,22 +7153,22 @@ function collectConfigFilePaths(config) {
|
|
|
7122
7153
|
}
|
|
7123
7154
|
|
|
7124
7155
|
// src/orpc-client/docs-ledger/ledger-manifest.ts
|
|
7125
|
-
var
|
|
7156
|
+
var z36 = __toESM(require("zod"), 1);
|
|
7126
7157
|
var LEDGER_MANIFEST_SCHEMA_VERSION = "docsledger/20260601";
|
|
7127
7158
|
var LEDGER_SHARD_SCHEMA_VERSION = "docsledger/shard/20260601";
|
|
7128
|
-
var ManifestBlobRefSchema =
|
|
7129
|
-
hash:
|
|
7130
|
-
contentType:
|
|
7159
|
+
var ManifestBlobRefSchema = z36.object({
|
|
7160
|
+
hash: z36.string(),
|
|
7161
|
+
contentType: z36.string()
|
|
7131
7162
|
});
|
|
7132
|
-
var ManifestSegmentSchema =
|
|
7163
|
+
var ManifestSegmentSchema = z36.object({
|
|
7133
7164
|
/** Synthetic stable id (= segmentHash). */
|
|
7134
|
-
segmentId:
|
|
7135
|
-
segmentHash:
|
|
7136
|
-
section:
|
|
7137
|
-
locale:
|
|
7165
|
+
segmentId: z36.string(),
|
|
7166
|
+
segmentHash: z36.string(),
|
|
7167
|
+
section: z36.string(),
|
|
7168
|
+
locale: z36.string(),
|
|
7138
7169
|
/** Sidebar order across segments (docs_ledger_deployment_segments.sort_order). */
|
|
7139
|
-
sortOrder:
|
|
7140
|
-
hidden:
|
|
7170
|
+
sortOrder: z36.number(),
|
|
7171
|
+
hidden: z36.boolean(),
|
|
7141
7172
|
/** Segment type descriptor: { type, title, icon, apiDefinitionId, overviewPageId, pointsTo, ... }. */
|
|
7142
7173
|
metadata: LedgerSegmentMetadataSchema,
|
|
7143
7174
|
product: SegmentDetailSchema.nullable(),
|
|
@@ -7186,23 +7217,23 @@ function selectLedgerSegmentsForLocale(segments, locale, defaultLocale) {
|
|
|
7186
7217
|
return [...byIdentity.values()];
|
|
7187
7218
|
}
|
|
7188
7219
|
var ManifestNavRouteSchema = LedgerNavRouteSchema;
|
|
7189
|
-
var ManifestRouteBaseSchema =
|
|
7190
|
-
segmentHash:
|
|
7220
|
+
var ManifestRouteBaseSchema = z36.object({
|
|
7221
|
+
segmentHash: z36.string(),
|
|
7191
7222
|
/** Key into the containing route index's sidebars map. */
|
|
7192
|
-
sidebarKey:
|
|
7193
|
-
section:
|
|
7194
|
-
locale:
|
|
7195
|
-
artifactId:
|
|
7196
|
-
pageId:
|
|
7223
|
+
sidebarKey: z36.string().nullable(),
|
|
7224
|
+
section: z36.string(),
|
|
7225
|
+
locale: z36.string(),
|
|
7226
|
+
artifactId: z36.string(),
|
|
7227
|
+
pageId: z36.string().optional(),
|
|
7197
7228
|
/** CAS hash of the page content blob, or null for link/redirect artifacts. */
|
|
7198
|
-
contentHash:
|
|
7199
|
-
contentType:
|
|
7229
|
+
contentHash: z36.string().nullable(),
|
|
7230
|
+
contentType: z36.string().nullable(),
|
|
7200
7231
|
/** ISO-8601 timestamp of when this artifact's content version was first created.
|
|
7201
7232
|
* Populated at publish time from `docs_ledger_artifacts.created_at`. Optional
|
|
7202
7233
|
* for backward compatibility with manifests built before this field existed. */
|
|
7203
|
-
createdAt:
|
|
7234
|
+
createdAt: z36.string().optional()
|
|
7204
7235
|
});
|
|
7205
|
-
var ManifestRouteSchema =
|
|
7236
|
+
var ManifestRouteSchema = z36.discriminatedUnion("artifactType", [
|
|
7206
7237
|
artifactTypeVariant(ManifestRouteBaseSchema, "markdown"),
|
|
7207
7238
|
artifactTypeVariant(ManifestRouteBaseSchema, "page"),
|
|
7208
7239
|
artifactTypeVariant(ManifestRouteBaseSchema, "rest"),
|
|
@@ -7217,60 +7248,60 @@ var ManifestRouteSchema = z35.discriminatedUnion("artifactType", [
|
|
|
7217
7248
|
artifactTypeVariant(ManifestRouteBaseSchema, "image"),
|
|
7218
7249
|
artifactTypeVariant(ManifestRouteBaseSchema, "redirect")
|
|
7219
7250
|
]);
|
|
7220
|
-
var ManifestPageSchema =
|
|
7221
|
-
fullPath:
|
|
7222
|
-
segmentHash:
|
|
7223
|
-
contentHash:
|
|
7224
|
-
contentType:
|
|
7251
|
+
var ManifestPageSchema = z36.object({
|
|
7252
|
+
fullPath: z36.string().nullable(),
|
|
7253
|
+
segmentHash: z36.string(),
|
|
7254
|
+
contentHash: z36.string(),
|
|
7255
|
+
contentType: z36.string()
|
|
7225
7256
|
});
|
|
7226
|
-
var ManifestApiDefSchema =
|
|
7257
|
+
var ManifestApiDefSchema = z36.object({
|
|
7227
7258
|
/** CAS hash of the full API definition blob. */
|
|
7228
|
-
hash:
|
|
7229
|
-
contentType:
|
|
7259
|
+
hash: z36.string(),
|
|
7260
|
+
contentType: z36.string(),
|
|
7230
7261
|
/** key = `${nodeType}:${nodeId}` (e.g. `endpoint:abc`) → pruned CAS blob. */
|
|
7231
|
-
prunedHashes:
|
|
7232
|
-
});
|
|
7233
|
-
var ManifestFileSchema =
|
|
7234
|
-
type:
|
|
7235
|
-
contentType:
|
|
7236
|
-
contentLength:
|
|
7237
|
-
filename:
|
|
7238
|
-
hash:
|
|
7262
|
+
prunedHashes: z36.record(z36.string(), ManifestBlobRefSchema)
|
|
7263
|
+
});
|
|
7264
|
+
var ManifestFileSchema = z36.object({
|
|
7265
|
+
type: z36.enum(["file", "image"]),
|
|
7266
|
+
contentType: z36.string(),
|
|
7267
|
+
contentLength: z36.number().optional(),
|
|
7268
|
+
filename: z36.string(),
|
|
7269
|
+
hash: z36.string(),
|
|
7239
7270
|
/** Canonical fern domain the bytes were uploaded under (ADR 0010 file anchor). */
|
|
7240
|
-
domain:
|
|
7241
|
-
bucket:
|
|
7242
|
-
width:
|
|
7243
|
-
height:
|
|
7244
|
-
blurDataURL:
|
|
7271
|
+
domain: z36.string(),
|
|
7272
|
+
bucket: z36.enum(["public_docs", "private_docs"]),
|
|
7273
|
+
width: z36.number().optional(),
|
|
7274
|
+
height: z36.number().optional(),
|
|
7275
|
+
blurDataURL: z36.string().optional()
|
|
7245
7276
|
});
|
|
7246
|
-
var LedgerShardFileSchema =
|
|
7277
|
+
var LedgerShardFileSchema = z36.object({
|
|
7247
7278
|
/** SHA-256 hex of the file bytes (docs-bucket key component). */
|
|
7248
|
-
hash:
|
|
7279
|
+
hash: z36.string(),
|
|
7249
7280
|
/** Fern-host-relative path; equals the `file:<fullPath>` token's suffix. */
|
|
7250
|
-
fullPath:
|
|
7251
|
-
contentType:
|
|
7252
|
-
contentLength:
|
|
7253
|
-
width:
|
|
7254
|
-
height:
|
|
7255
|
-
blurDataURL:
|
|
7281
|
+
fullPath: z36.string(),
|
|
7282
|
+
contentType: z36.string(),
|
|
7283
|
+
contentLength: z36.number().optional(),
|
|
7284
|
+
width: z36.number().optional(),
|
|
7285
|
+
height: z36.number().optional(),
|
|
7286
|
+
blurDataURL: z36.string().optional(),
|
|
7256
7287
|
/**
|
|
7257
7288
|
* Per-file bucket override. Absent ⇒ derive from the pointer's `isPrivate`
|
|
7258
7289
|
* (`private_docs` when private, else `public_docs`). Present only for the
|
|
7259
7290
|
* rare file whose bucket diverges from the deployment default.
|
|
7260
7291
|
*/
|
|
7261
|
-
bucket:
|
|
7262
|
-
});
|
|
7263
|
-
var LedgerConfigBlobSchema =
|
|
7264
|
-
version:
|
|
7265
|
-
git:
|
|
7266
|
-
repoUrl:
|
|
7267
|
-
branch:
|
|
7268
|
-
commitSha:
|
|
7292
|
+
bucket: z36.enum(["public_docs", "private_docs"]).optional()
|
|
7293
|
+
});
|
|
7294
|
+
var LedgerConfigBlobSchema = z36.object({
|
|
7295
|
+
version: z36.string().nullable(),
|
|
7296
|
+
git: z36.object({
|
|
7297
|
+
repoUrl: z36.string(),
|
|
7298
|
+
branch: z36.string(),
|
|
7299
|
+
commitSha: z36.string().nullable().optional()
|
|
7269
7300
|
}).optional(),
|
|
7270
7301
|
/** Structural config with hot-path chrome text inlined for ADR 0016 page reads. */
|
|
7271
7302
|
config: LedgerConfigSchema.nullable(),
|
|
7272
7303
|
/** Large or legacy extracted config blobs. New manifests inline header/footer/css.inline/js.inline. */
|
|
7273
|
-
configRefs:
|
|
7304
|
+
configRefs: z36.object({
|
|
7274
7305
|
header: ManifestBlobRefSchema.optional(),
|
|
7275
7306
|
footer: ManifestBlobRefSchema.optional(),
|
|
7276
7307
|
cssInline: ManifestBlobRefSchema.optional(),
|
|
@@ -7278,43 +7309,43 @@ var LedgerConfigBlobSchema = z35.object({
|
|
|
7278
7309
|
jsFiles: ManifestBlobRefSchema.optional()
|
|
7279
7310
|
})
|
|
7280
7311
|
});
|
|
7281
|
-
var LedgerChromeBlobSchema =
|
|
7282
|
-
apiNameToId:
|
|
7312
|
+
var LedgerChromeBlobSchema = z36.object({
|
|
7313
|
+
apiNameToId: z36.record(z36.string(), z36.string())
|
|
7283
7314
|
});
|
|
7284
|
-
var LedgerSidebarBundleSchema =
|
|
7285
|
-
locale:
|
|
7286
|
-
segmentHash:
|
|
7287
|
-
routes:
|
|
7315
|
+
var LedgerSidebarBundleSchema = z36.object({
|
|
7316
|
+
locale: z36.string(),
|
|
7317
|
+
segmentHash: z36.string(),
|
|
7318
|
+
routes: z36.array(ManifestNavRouteSchema)
|
|
7288
7319
|
});
|
|
7289
|
-
var LedgerSidebarMapEntrySchema =
|
|
7320
|
+
var LedgerSidebarMapEntrySchema = z36.discriminatedUnion("strategy", [
|
|
7290
7321
|
LedgerSidebarBundleSchema.extend({
|
|
7291
|
-
strategy:
|
|
7322
|
+
strategy: z36.literal("inline")
|
|
7292
7323
|
}),
|
|
7293
7324
|
ManifestBlobRefSchema.extend({
|
|
7294
|
-
strategy:
|
|
7325
|
+
strategy: z36.literal("ref")
|
|
7295
7326
|
})
|
|
7296
7327
|
]);
|
|
7297
|
-
var LedgerLocaleIndexSchema =
|
|
7298
|
-
locale:
|
|
7299
|
-
segments:
|
|
7328
|
+
var LedgerLocaleIndexSchema = z36.object({
|
|
7329
|
+
locale: z36.string(),
|
|
7330
|
+
segments: z36.array(ManifestSegmentSchema),
|
|
7300
7331
|
/** sidebarKey → inline sidebar routes, or a CAS ref when over budget. */
|
|
7301
|
-
sidebars:
|
|
7332
|
+
sidebars: z36.record(z36.string(), LedgerSidebarMapEntrySchema),
|
|
7302
7333
|
/** fullPath → route for this effective locale. */
|
|
7303
|
-
routes:
|
|
7334
|
+
routes: z36.record(z36.string(), ManifestRouteSchema),
|
|
7304
7335
|
/** pageId → page content reference for this effective locale. */
|
|
7305
|
-
pages:
|
|
7336
|
+
pages: z36.record(z36.string(), ManifestPageSchema),
|
|
7306
7337
|
/** apiDefinitionId → full + pruned API definition blobs. */
|
|
7307
|
-
apiDefs:
|
|
7338
|
+
apiDefs: z36.record(z36.string(), ManifestApiDefSchema),
|
|
7308
7339
|
/** fullPath → file/image artifact metadata. */
|
|
7309
|
-
files:
|
|
7340
|
+
files: z36.record(z36.string(), ManifestFileSchema)
|
|
7310
7341
|
});
|
|
7311
|
-
var LedgerRouteShardSchema =
|
|
7312
|
-
schema:
|
|
7313
|
-
locale:
|
|
7342
|
+
var LedgerRouteShardSchema = z36.object({
|
|
7343
|
+
schema: z36.literal(LEDGER_SHARD_SCHEMA_VERSION),
|
|
7344
|
+
locale: z36.string(),
|
|
7314
7345
|
/** fullPath → route for the scopes packed into this shard. */
|
|
7315
|
-
routes:
|
|
7346
|
+
routes: z36.record(z36.string(), ManifestRouteSchema),
|
|
7316
7347
|
/** segmentHash → inline sidebar (or CAS ref) for every segment in this shard's scopes. */
|
|
7317
|
-
sidebars:
|
|
7348
|
+
sidebars: z36.record(z36.string(), LedgerSidebarMapEntrySchema),
|
|
7318
7349
|
/**
|
|
7319
7350
|
* fileFullPath → lean file identity for every file/image referenced by a
|
|
7320
7351
|
* page routed into this shard (ADR 0016, "File metadata on the render
|
|
@@ -7323,32 +7354,32 @@ var LedgerRouteShardSchema = z35.object({
|
|
|
7323
7354
|
* existed or with no embedded files; the bundle then falls back to the
|
|
7324
7355
|
* pointer's `files` map (`fileMetadata`/`fileArtifact`).
|
|
7325
7356
|
*/
|
|
7326
|
-
files:
|
|
7357
|
+
files: z36.record(z36.string(), LedgerShardFileSchema).optional()
|
|
7327
7358
|
});
|
|
7328
|
-
var LedgerPagesBlobSchema =
|
|
7359
|
+
var LedgerPagesBlobSchema = z36.record(z36.string(), ManifestPageSchema);
|
|
7329
7360
|
var LedgerPointerSegmentSchema = ManifestSegmentSchema.omit({ product: true, version: true }).extend({
|
|
7330
7361
|
/** Index into the locale's `productCatalog`, or null when the segment has no product. */
|
|
7331
|
-
productIdx:
|
|
7362
|
+
productIdx: z36.number().nullable(),
|
|
7332
7363
|
/** Index into the locale's `versionCatalog`, or null when the segment has no version. */
|
|
7333
|
-
versionIdx:
|
|
7364
|
+
versionIdx: z36.number().nullable()
|
|
7334
7365
|
});
|
|
7335
|
-
var LedgerLocaleRoutingSchema =
|
|
7366
|
+
var LedgerLocaleRoutingSchema = z36.object({
|
|
7336
7367
|
/** Compact segments catalog for the switcher chrome (product/version by index). */
|
|
7337
|
-
segments:
|
|
7368
|
+
segments: z36.array(LedgerPointerSegmentSchema),
|
|
7338
7369
|
/** Deduplicated product details; `LedgerPointerSegment.productIdx` indexes into this. */
|
|
7339
|
-
productCatalog:
|
|
7370
|
+
productCatalog: z36.array(SegmentDetailSchema),
|
|
7340
7371
|
/** Deduplicated version details; `LedgerPointerSegment.versionIdx` indexes into this. */
|
|
7341
|
-
versionCatalog:
|
|
7372
|
+
versionCatalog: z36.array(SegmentDetailSchema),
|
|
7342
7373
|
/** fullPath → index into `shards`. */
|
|
7343
|
-
routing:
|
|
7374
|
+
routing: z36.record(z36.string(), z36.number()),
|
|
7344
7375
|
/** segmentHash → index into `shards`. */
|
|
7345
|
-
segmentShard:
|
|
7376
|
+
segmentShard: z36.record(z36.string(), z36.number()),
|
|
7346
7377
|
/** Ordered list of route shards; index matches `routing`/`segmentShard`. */
|
|
7347
|
-
shards:
|
|
7378
|
+
shards: z36.array(z36.object({ hash: z36.string() })),
|
|
7348
7379
|
/** versionId → first routable fullPath (version switcher). */
|
|
7349
|
-
versionFirstRoute:
|
|
7380
|
+
versionFirstRoute: z36.record(z36.string(), z36.string()),
|
|
7350
7381
|
/** CAS hash of the per-locale pages blob. */
|
|
7351
|
-
pagesHash:
|
|
7382
|
+
pagesHash: z36.string(),
|
|
7352
7383
|
/**
|
|
7353
7384
|
* fullPath → file/image artifact metadata for files NOT materialised into
|
|
7354
7385
|
* a route shard (ADR 0016, "File metadata on the render path"): config
|
|
@@ -7357,26 +7388,26 @@ var LedgerLocaleRoutingSchema = z35.object({
|
|
|
7357
7388
|
* Page-body images are pruned from here and live in their route shard's
|
|
7358
7389
|
* `files` map instead. Read via `fileMetadata` / `fileArtifact`.
|
|
7359
7390
|
*/
|
|
7360
|
-
files:
|
|
7391
|
+
files: z36.record(z36.string(), ManifestFileSchema),
|
|
7361
7392
|
/** apiDefinitionId → full + pruned API definition blobs. */
|
|
7362
|
-
apiDefs:
|
|
7393
|
+
apiDefs: z36.record(z36.string(), ManifestApiDefSchema)
|
|
7363
7394
|
});
|
|
7364
|
-
var LedgerManifestSchema =
|
|
7365
|
-
schema:
|
|
7395
|
+
var LedgerManifestSchema = z36.object({
|
|
7396
|
+
schema: z36.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
|
|
7366
7397
|
// ── Pointer / current-version fields ──────────────────────────────
|
|
7367
|
-
orgId:
|
|
7368
|
-
domain:
|
|
7369
|
-
basepath:
|
|
7370
|
-
deploymentId:
|
|
7371
|
-
deploymentHash:
|
|
7372
|
-
siteId:
|
|
7398
|
+
orgId: z36.string(),
|
|
7399
|
+
domain: z36.string(),
|
|
7400
|
+
basepath: z36.string(),
|
|
7401
|
+
deploymentId: z36.string(),
|
|
7402
|
+
deploymentHash: z36.string(),
|
|
7403
|
+
siteId: z36.string(),
|
|
7373
7404
|
/** ISO-8601 timestamp the publish became live (request time). */
|
|
7374
|
-
assignedAt:
|
|
7375
|
-
assignedBy:
|
|
7376
|
-
isPreview:
|
|
7377
|
-
isPrivate:
|
|
7405
|
+
assignedAt: z36.string(),
|
|
7406
|
+
assignedBy: z36.string().nullable(),
|
|
7407
|
+
isPreview: z36.boolean(),
|
|
7408
|
+
isPrivate: z36.boolean(),
|
|
7378
7409
|
/** Default locale for the deployment — read-path fallback when a translation is absent. */
|
|
7379
|
-
defaultLocale:
|
|
7410
|
+
defaultLocale: z36.string(),
|
|
7380
7411
|
/**
|
|
7381
7412
|
* Canonical fern domain all file bytes are anchored under (ADR 0010). The
|
|
7382
7413
|
* read client builds the public `/_files/{fileAnchorDomain}/{hash}/{fullPath}`
|
|
@@ -7385,19 +7416,19 @@ var LedgerManifestSchema = z35.object({
|
|
|
7385
7416
|
* written before shard-side files; absent ⇒ the client falls back to the
|
|
7386
7417
|
* pointer `files` map (which still carries per-file `domain`).
|
|
7387
7418
|
*/
|
|
7388
|
-
fileAnchorDomain:
|
|
7419
|
+
fileAnchorDomain: z36.string().optional(),
|
|
7389
7420
|
config: LedgerConfigBlobSchema,
|
|
7390
7421
|
chrome: LedgerChromeBlobSchema,
|
|
7391
|
-
locales:
|
|
7392
|
-
});
|
|
7393
|
-
var LedgerSiteArtifactSchema =
|
|
7394
|
-
|
|
7395
|
-
schema:
|
|
7396
|
-
unpublished:
|
|
7397
|
-
orgId:
|
|
7398
|
-
domain:
|
|
7399
|
-
basepath:
|
|
7400
|
-
isPreview:
|
|
7422
|
+
locales: z36.record(z36.string(), LedgerLocaleRoutingSchema)
|
|
7423
|
+
});
|
|
7424
|
+
var LedgerSiteArtifactSchema = z36.union([
|
|
7425
|
+
z36.object({
|
|
7426
|
+
schema: z36.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
|
|
7427
|
+
unpublished: z36.literal(true),
|
|
7428
|
+
orgId: z36.string(),
|
|
7429
|
+
domain: z36.string(),
|
|
7430
|
+
basepath: z36.string(),
|
|
7431
|
+
isPreview: z36.boolean()
|
|
7401
7432
|
}),
|
|
7402
7433
|
LedgerManifestSchema
|
|
7403
7434
|
]);
|
|
@@ -7414,26 +7445,26 @@ function stableStringify(value) {
|
|
|
7414
7445
|
|
|
7415
7446
|
// src/orpc-client/files/contract.ts
|
|
7416
7447
|
var import_contract48 = require("@orpc/contract");
|
|
7417
|
-
var
|
|
7418
|
-
var PutContentInputSchema =
|
|
7419
|
-
contentType:
|
|
7420
|
-
contentLength:
|
|
7448
|
+
var z37 = __toESM(require("zod"), 1);
|
|
7449
|
+
var PutContentInputSchema = z37.object({
|
|
7450
|
+
contentType: z37.string(),
|
|
7451
|
+
contentLength: z37.number().int().positive()
|
|
7421
7452
|
});
|
|
7422
|
-
var PutContentResponseSchema =
|
|
7453
|
+
var PutContentResponseSchema = z37.discriminatedUnion("status", [
|
|
7423
7454
|
/** Content already exists in storage — client can skip the S3 upload. */
|
|
7424
|
-
|
|
7455
|
+
z37.object({ status: z37.literal("exists") }),
|
|
7425
7456
|
/** Content is new — client should PUT the file bytes to uploadUrl, then call PUT /files. */
|
|
7426
|
-
|
|
7457
|
+
z37.object({ status: z37.literal("upload_required"), uploadUrl: z37.string() })
|
|
7427
7458
|
]);
|
|
7428
|
-
var PutFileInputSchema =
|
|
7429
|
-
hash:
|
|
7430
|
-
contentType:
|
|
7459
|
+
var PutFileInputSchema = z37.object({
|
|
7460
|
+
hash: z37.string(),
|
|
7461
|
+
contentType: z37.string()
|
|
7431
7462
|
});
|
|
7432
|
-
var FileResponseSchema =
|
|
7463
|
+
var FileResponseSchema = z37.object({
|
|
7433
7464
|
/** SHA-256 hex digest of the file content (64 characters). */
|
|
7434
|
-
hash:
|
|
7465
|
+
hash: z37.string(),
|
|
7435
7466
|
/** Presigned S3 GET URL. TTL is configurable (default 3600 seconds). */
|
|
7436
|
-
downloadUrl:
|
|
7467
|
+
downloadUrl: z37.string()
|
|
7437
7468
|
});
|
|
7438
7469
|
var contentContract = {
|
|
7439
7470
|
/**
|
|
@@ -7455,24 +7486,58 @@ var filesContract = {
|
|
|
7455
7486
|
getFile: import_contract48.oc.route({ method: "GET", path: "/" }).output(FileResponseSchema)
|
|
7456
7487
|
};
|
|
7457
7488
|
|
|
7489
|
+
// src/orpc-client/mcp-hosting/kv.ts
|
|
7490
|
+
function deploymentMetaFromParsed(parsed, deployedAt = /* @__PURE__ */ new Date()) {
|
|
7491
|
+
return {
|
|
7492
|
+
authSchemes: parsed.auth.schemes,
|
|
7493
|
+
toolCount: new Set(Object.values(parsed.toolsets).flat()).size,
|
|
7494
|
+
deployedAt: deployedAt.toISOString(),
|
|
7495
|
+
requirements: parsed.environmentVariables.map((v) => ({
|
|
7496
|
+
label: v.description,
|
|
7497
|
+
envVar: v.name,
|
|
7498
|
+
type: v.required ? "required" : "optional"
|
|
7499
|
+
}))
|
|
7500
|
+
};
|
|
7501
|
+
}
|
|
7502
|
+
function deploymentConfigFromParsed(parsed) {
|
|
7503
|
+
return {
|
|
7504
|
+
serverName: parsed.name,
|
|
7505
|
+
baseUrl: parsed.baseUrl,
|
|
7506
|
+
followRedirects: parsed.followRedirects,
|
|
7507
|
+
maxRedirects: parsed.maxRedirects,
|
|
7508
|
+
allowedRedirectHosts: parsed.allowedRedirectHosts,
|
|
7509
|
+
authSchemes: parsed.auth.schemes,
|
|
7510
|
+
authRequired: parsed.auth.required,
|
|
7511
|
+
toolsets: parsed.toolsets,
|
|
7512
|
+
toolsetMetadata: parsed.toolsetMetadata
|
|
7513
|
+
};
|
|
7514
|
+
}
|
|
7515
|
+
function scriptNameFor(input) {
|
|
7516
|
+
return `${input.orgId}--${input.slug}`;
|
|
7517
|
+
}
|
|
7518
|
+
var KV_KEY_PREFIX_ORG = "org:";
|
|
7519
|
+
var KV_KEY_PREFIX_CONFIG = "config:";
|
|
7520
|
+
var KV_KEY_PREFIX_META = "meta:";
|
|
7521
|
+
var KV_KEY_PREFIXES = [KV_KEY_PREFIX_ORG, KV_KEY_PREFIX_CONFIG, KV_KEY_PREFIX_META];
|
|
7522
|
+
|
|
7458
7523
|
// src/orpc-client/org-config/contract.ts
|
|
7459
|
-
var
|
|
7524
|
+
var z38 = __toESM(require("zod"), 1);
|
|
7460
7525
|
var SEMVER_RE = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z-.]+)?(?:\+[0-9A-Za-z-.]+)?$/;
|
|
7461
|
-
var UpsertOrgConfigBodySchema =
|
|
7526
|
+
var UpsertOrgConfigBodySchema = z38.object({
|
|
7462
7527
|
// A semver string sets the bound; `null` clears it; omitting leaves it unchanged.
|
|
7463
|
-
cliVersionMin:
|
|
7464
|
-
cliVersionMax:
|
|
7528
|
+
cliVersionMin: z38.union([z38.string().regex(SEMVER_RE, "cliVersionMin must be a valid semver (e.g. 5.45.0)"), z38.null()]).optional(),
|
|
7529
|
+
cliVersionMax: z38.union([z38.string().regex(SEMVER_RE, "cliVersionMax must be a valid semver (e.g. 5.45.0)"), z38.null()]).optional()
|
|
7465
7530
|
});
|
|
7466
|
-
var OrgConfigResponseSchema =
|
|
7467
|
-
orgId:
|
|
7468
|
-
cliVersionMin:
|
|
7469
|
-
cliVersionMax:
|
|
7531
|
+
var OrgConfigResponseSchema = z38.object({
|
|
7532
|
+
orgId: z38.string(),
|
|
7533
|
+
cliVersionMin: z38.string().optional(),
|
|
7534
|
+
cliVersionMax: z38.string().optional(),
|
|
7470
7535
|
// Absent when no config has been stored for the org yet.
|
|
7471
|
-
updatedAt:
|
|
7536
|
+
updatedAt: z38.string().optional()
|
|
7472
7537
|
});
|
|
7473
7538
|
|
|
7474
7539
|
// src/orpc-client/themes/contract.ts
|
|
7475
|
-
var
|
|
7540
|
+
var z39 = __toESM(require("zod"), 1);
|
|
7476
7541
|
var FERN_FILE_REF_KEY = "hash";
|
|
7477
7542
|
var SHA256_RE = /^[0-9a-f]{64}$/;
|
|
7478
7543
|
function isFernFileRef(value) {
|
|
@@ -7487,26 +7552,26 @@ function isFernFileRef(value) {
|
|
|
7487
7552
|
return typeof hash === "string" && SHA256_RE.test(hash);
|
|
7488
7553
|
}
|
|
7489
7554
|
var THEME_NAME_RE = /^[a-zA-Z0-9_-]{1,64}$/;
|
|
7490
|
-
var ThemeResponseSchema =
|
|
7491
|
-
id:
|
|
7492
|
-
orgId:
|
|
7493
|
-
name:
|
|
7494
|
-
config:
|
|
7495
|
-
updatedAt:
|
|
7555
|
+
var ThemeResponseSchema = z39.object({
|
|
7556
|
+
id: z39.string(),
|
|
7557
|
+
orgId: z39.string(),
|
|
7558
|
+
name: z39.string(),
|
|
7559
|
+
config: z39.unknown(),
|
|
7560
|
+
updatedAt: z39.string()
|
|
7496
7561
|
// ISO 8601 timestamp
|
|
7497
7562
|
});
|
|
7498
|
-
var ThemeListItemSchema =
|
|
7499
|
-
id:
|
|
7500
|
-
orgId:
|
|
7501
|
-
name:
|
|
7502
|
-
updatedAt:
|
|
7563
|
+
var ThemeListItemSchema = z39.object({
|
|
7564
|
+
id: z39.string(),
|
|
7565
|
+
orgId: z39.string(),
|
|
7566
|
+
name: z39.string(),
|
|
7567
|
+
updatedAt: z39.string()
|
|
7503
7568
|
});
|
|
7504
|
-
var ThemeListResponseSchema =
|
|
7505
|
-
themes:
|
|
7569
|
+
var ThemeListResponseSchema = z39.object({
|
|
7570
|
+
themes: z39.array(ThemeListItemSchema)
|
|
7506
7571
|
});
|
|
7507
|
-
var UpsertThemeBodySchema =
|
|
7508
|
-
name:
|
|
7509
|
-
config:
|
|
7572
|
+
var UpsertThemeBodySchema = z39.object({
|
|
7573
|
+
name: z39.string().min(1).max(64).regex(THEME_NAME_RE, "Theme name may only contain letters, digits, hyphens, and underscores"),
|
|
7574
|
+
config: z39.unknown()
|
|
7510
7575
|
});
|
|
7511
7576
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7512
7577
|
0 && (module.exports = {
|
|
@@ -7760,6 +7825,10 @@ var UpsertThemeBodySchema = z38.object({
|
|
|
7760
7825
|
JavaCoordinateSchema,
|
|
7761
7826
|
JqStringSchema,
|
|
7762
7827
|
JsonBodyShapeSchema,
|
|
7828
|
+
KV_KEY_PREFIXES,
|
|
7829
|
+
KV_KEY_PREFIX_CONFIG,
|
|
7830
|
+
KV_KEY_PREFIX_META,
|
|
7831
|
+
KV_KEY_PREFIX_ORG,
|
|
7763
7832
|
LEDGER_ARTIFACT_METADATA_SCHEMAS,
|
|
7764
7833
|
LEDGER_MANIFEST_SCHEMA_VERSION,
|
|
7765
7834
|
LEDGER_SHARD_SCHEMA_VERSION,
|
|
@@ -8161,6 +8230,8 @@ var UpsertThemeBodySchema = z38.object({
|
|
|
8161
8230
|
createTokensClient,
|
|
8162
8231
|
dashboardAgentContract,
|
|
8163
8232
|
dashboardContract,
|
|
8233
|
+
deploymentConfigFromParsed,
|
|
8234
|
+
deploymentMetaFromParsed,
|
|
8164
8235
|
docsCacheContract,
|
|
8165
8236
|
docsDeploymentContract,
|
|
8166
8237
|
docsLedgerContract,
|
|
@@ -8183,6 +8254,7 @@ var UpsertThemeBodySchema = z38.object({
|
|
|
8183
8254
|
mcpHostingContract,
|
|
8184
8255
|
organizationContract,
|
|
8185
8256
|
pdfExportContract,
|
|
8257
|
+
scriptNameFor,
|
|
8186
8258
|
sdksContract,
|
|
8187
8259
|
selectLedgerSegmentsForLocale,
|
|
8188
8260
|
slugsContract,
|