@fern-api/fdr-sdk 1.2.174-94f3833ee6 → 1.2.174-950bdb766f
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 +366 -303
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +366 -303
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/index.js +641 -578
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +641 -578
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/orpc-client/dashboard/sdkVersion.js +3 -1
- package/dist/js/orpc-client/dashboard/sdkVersion.js.map +1 -1
- package/dist/js/orpc-client/dashboard/sdkVersion.mjs +3 -1
- package/dist/js/orpc-client/dashboard/sdkVersion.mjs.map +1 -1
- package/dist/js/orpc-client.js +743 -634
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +729 -634
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/orpc-client/dashboard/sdkVersion.d.ts +3 -1
- package/dist/orpc-client/dashboard/sdkVersion.d.ts.map +1 -1
- package/dist/orpc-client/dashboard/sdkVersion.js +6 -2
- package/dist/orpc-client/dashboard/sdkVersion.js.map +1 -1
- package/dist/orpc-client/dashboard/sdkVersion.test.js +5 -1
- package/dist/orpc-client/dashboard/sdkVersion.test.js.map +1 -1
- package/dist/orpc-client/mcp-hosting/contract.d.ts +138 -0
- package/dist/orpc-client/mcp-hosting/contract.d.ts.map +1 -1
- package/dist/orpc-client/mcp-hosting/contract.js +17 -1
- package/dist/orpc-client/mcp-hosting/contract.js.map +1 -1
- package/dist/orpc-client/mcp-hosting/index.d.ts +1 -0
- package/dist/orpc-client/mcp-hosting/index.d.ts.map +1 -1
- package/dist/orpc-client/mcp-hosting/index.js +1 -0
- package/dist/orpc-client/mcp-hosting/index.js.map +1 -1
- package/dist/orpc-client/mcp-hosting/usage.d.ts +194 -0
- package/dist/orpc-client/mcp-hosting/usage.d.ts.map +1 -0
- package/dist/orpc-client/mcp-hosting/usage.js +116 -0
- package/dist/orpc-client/mcp-hosting/usage.js.map +1 -0
- package/dist/types/orpc-client/dashboard/sdkVersion.d.ts +3 -1
- package/dist/types/orpc-client/dashboard/sdkVersion.d.ts.map +1 -1
- package/dist/types/orpc-client/mcp-hosting/contract.d.ts +138 -0
- 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/usage.d.ts +194 -0
- package/dist/types/orpc-client/mcp-hosting/usage.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/js/orpc-client.mjs
CHANGED
|
@@ -6318,7 +6318,7 @@ import { OpenAPILink as OpenAPILink17 } from "@orpc/openapi-client/fetch";
|
|
|
6318
6318
|
|
|
6319
6319
|
// src/orpc-client/mcp-hosting/contract.ts
|
|
6320
6320
|
import { oc as oc15 } from "@orpc/contract";
|
|
6321
|
-
import * as
|
|
6321
|
+
import * as z30 from "zod";
|
|
6322
6322
|
|
|
6323
6323
|
// src/orpc-client/mcp-hosting/analytics.ts
|
|
6324
6324
|
import * as z26 from "zod";
|
|
@@ -7188,46 +7188,115 @@ function deploymentSkippedToolsFromParsed(metadata) {
|
|
|
7188
7188
|
}));
|
|
7189
7189
|
}
|
|
7190
7190
|
|
|
7191
|
+
// src/orpc-client/mcp-hosting/usage.ts
|
|
7192
|
+
import * as z29 from "zod";
|
|
7193
|
+
var MCP_FREE_TOOL_CALLS_PER_MONTH = 1e3;
|
|
7194
|
+
var MCP_QUOTA_EXCEEDED_CODE = -32002;
|
|
7195
|
+
var MCP_SALES_CONTACT_URL = "https://buildwithfern.com/book-demo";
|
|
7196
|
+
var KV_KEY_PREFIX_QUOTA = "quota:";
|
|
7197
|
+
var McpOrgQuotaSchema = z29.object({
|
|
7198
|
+
/** Tool calls per month; null means no limit. */
|
|
7199
|
+
limit: z29.number().int().nonnegative().nullable(),
|
|
7200
|
+
/**
|
|
7201
|
+
* Sales approved the org to go over its limit. The dispatcher keeps
|
|
7202
|
+
* counting but never refuses a call.
|
|
7203
|
+
*/
|
|
7204
|
+
approved: z29.boolean()
|
|
7205
|
+
});
|
|
7206
|
+
var DEFAULT_MCP_ORG_QUOTA = { limit: MCP_FREE_TOOL_CALLS_PER_MONTH, approved: false };
|
|
7207
|
+
function usageMonth(date) {
|
|
7208
|
+
return date.toISOString().slice(0, 7);
|
|
7209
|
+
}
|
|
7210
|
+
function usageMonthResetsAt(month) {
|
|
7211
|
+
const [year, monthIndex] = month.split("-").map(Number);
|
|
7212
|
+
return new Date(Date.UTC(year, monthIndex, 1));
|
|
7213
|
+
}
|
|
7214
|
+
var UsageMonthSchema = z29.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/, "Expected yyyy-mm");
|
|
7215
|
+
var McpUsageCountsSchema = z29.object({
|
|
7216
|
+
month: UsageMonthSchema,
|
|
7217
|
+
toolCalls: z29.number().int().nonnegative(),
|
|
7218
|
+
/** Calls refused because the allowance was used up. */
|
|
7219
|
+
blockedCalls: z29.number().int().nonnegative(),
|
|
7220
|
+
servers: z29.array(z29.object({ slug: z29.string(), toolCalls: z29.number().int().nonnegative() })),
|
|
7221
|
+
/** Whether this dispatcher refuses calls over the allowance (QUOTA_ENFORCE), or only counts them. */
|
|
7222
|
+
enforced: z29.boolean()
|
|
7223
|
+
});
|
|
7224
|
+
var McpOrgIdSchema = z29.string().min(1).max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
7225
|
+
var GetMcpUsageInputSchema = z29.object({
|
|
7226
|
+
orgId: McpOrgIdSchema,
|
|
7227
|
+
month: UsageMonthSchema.optional()
|
|
7228
|
+
});
|
|
7229
|
+
var SetMcpUsageAllowanceInputSchema = z29.object({
|
|
7230
|
+
orgId: McpOrgIdSchema,
|
|
7231
|
+
/** Tool calls per month; null means no limit. */
|
|
7232
|
+
limit: z29.number().int().nonnegative().max(1e9).nullable(),
|
|
7233
|
+
/** Approved to go over the limit: calls are counted but never refused. */
|
|
7234
|
+
approved: z29.boolean(),
|
|
7235
|
+
note: z29.string().max(500).optional()
|
|
7236
|
+
});
|
|
7237
|
+
var McpOrgUsageSchema = z29.object({
|
|
7238
|
+
month: UsageMonthSchema,
|
|
7239
|
+
resetsAt: z29.string(),
|
|
7240
|
+
toolCalls: z29.number().int().nonnegative(),
|
|
7241
|
+
blockedCalls: z29.number().int().nonnegative(),
|
|
7242
|
+
/** Tool calls per month; null means no limit. */
|
|
7243
|
+
limit: z29.number().int().nonnegative().nullable(),
|
|
7244
|
+
approved: z29.boolean(),
|
|
7245
|
+
/** The org has the free allowance (no allowance set by Fern). */
|
|
7246
|
+
isFreeAllowance: z29.boolean(),
|
|
7247
|
+
blocked: z29.boolean(),
|
|
7248
|
+
/** Whether calls over the allowance are refused in this environment, or only counted. */
|
|
7249
|
+
enforced: z29.boolean(),
|
|
7250
|
+
servers: z29.array(z29.object({ slug: z29.string(), toolCalls: z29.number().int().nonnegative() })),
|
|
7251
|
+
contactUrl: z29.string()
|
|
7252
|
+
});
|
|
7253
|
+
function mcpSalesContactUrl(orgId, base = MCP_SALES_CONTACT_URL) {
|
|
7254
|
+
const url = new URL(base);
|
|
7255
|
+
url.searchParams.set("product", "mcp");
|
|
7256
|
+
url.searchParams.set("org", orgId);
|
|
7257
|
+
return url.toString();
|
|
7258
|
+
}
|
|
7259
|
+
|
|
7191
7260
|
// src/orpc-client/mcp-hosting/contract.ts
|
|
7192
|
-
var McpPathSegmentSchema =
|
|
7193
|
-
var McpDeploymentStatusSchema =
|
|
7194
|
-
var McpModuleSchema =
|
|
7195
|
-
name:
|
|
7261
|
+
var McpPathSegmentSchema = z30.string().min(1).max(30).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
7262
|
+
var McpDeploymentStatusSchema = z30.enum(["PUBLISHING", "SUCCEEDED", "FAILED"]);
|
|
7263
|
+
var McpModuleSchema = z30.object({
|
|
7264
|
+
name: z30.string().regex(/^[A-Za-z0-9._/-]+$/),
|
|
7196
7265
|
hash: Sha256Schema,
|
|
7197
|
-
contentType:
|
|
7266
|
+
contentType: z30.string().min(1)
|
|
7198
7267
|
}).strict();
|
|
7199
|
-
var McpGitInputSchema =
|
|
7200
|
-
repoUrl:
|
|
7268
|
+
var McpGitInputSchema = z30.object({
|
|
7269
|
+
repoUrl: z30.string(),
|
|
7201
7270
|
/** Absent on a detached HEAD (a CI checkout of a commit, say). */
|
|
7202
|
-
branch:
|
|
7203
|
-
commitSha:
|
|
7271
|
+
branch: z30.string().optional(),
|
|
7272
|
+
commitSha: z30.string().optional()
|
|
7204
7273
|
}).strict();
|
|
7205
|
-
var McpInputFileSchema =
|
|
7206
|
-
|
|
7274
|
+
var McpInputFileSchema = z30.discriminatedUnion("name", [
|
|
7275
|
+
z30.object({
|
|
7207
7276
|
/** The `sources` part of the build request, verbatim. */
|
|
7208
|
-
name:
|
|
7209
|
-
contentType:
|
|
7277
|
+
name: z30.literal("specs.tar.gz"),
|
|
7278
|
+
contentType: z30.literal("application/gzip"),
|
|
7210
7279
|
hash: Sha256Schema
|
|
7211
7280
|
}).strict(),
|
|
7212
|
-
|
|
7281
|
+
z30.object({
|
|
7213
7282
|
/** This target's sdk-config payload. */
|
|
7214
|
-
name:
|
|
7215
|
-
contentType:
|
|
7283
|
+
name: z30.literal("sdk-config.json"),
|
|
7284
|
+
contentType: z30.literal("application/json"),
|
|
7216
7285
|
hash: Sha256Schema
|
|
7217
7286
|
}).strict(),
|
|
7218
|
-
|
|
7287
|
+
z30.object({
|
|
7219
7288
|
/** The build request narrowed to this target. */
|
|
7220
|
-
name:
|
|
7221
|
-
contentType:
|
|
7289
|
+
name: z30.literal("build-request.json"),
|
|
7290
|
+
contentType: z30.literal("application/json"),
|
|
7222
7291
|
hash: Sha256Schema
|
|
7223
7292
|
}).strict()
|
|
7224
7293
|
]);
|
|
7225
|
-
var McpInputFilesSchema =
|
|
7294
|
+
var McpInputFilesSchema = z30.array(McpInputFileSchema).max(3).superRefine((inputs, ctx) => {
|
|
7226
7295
|
const names = /* @__PURE__ */ new Set();
|
|
7227
7296
|
for (const input of inputs) {
|
|
7228
7297
|
if (names.has(input.name)) {
|
|
7229
7298
|
ctx.addIssue({
|
|
7230
|
-
code:
|
|
7299
|
+
code: z30.ZodIssueCode.custom,
|
|
7231
7300
|
message: `duplicate input name: ${input.name}`
|
|
7232
7301
|
});
|
|
7233
7302
|
}
|
|
@@ -7258,7 +7327,7 @@ function deployMetadataChecks(metadata, ctx) {
|
|
|
7258
7327
|
for (const [toolset, members] of Object.entries(metadata.toolsets)) {
|
|
7259
7328
|
if (!TOOLSET_NAME_PATTERN.test(toolset)) {
|
|
7260
7329
|
ctx.addIssue({
|
|
7261
|
-
code:
|
|
7330
|
+
code: z30.ZodIssueCode.custom,
|
|
7262
7331
|
path: ["toolsets", toolset],
|
|
7263
7332
|
message: `toolset name "${toolset}" must match ${TOOLSET_NAME_PATTERN}`
|
|
7264
7333
|
});
|
|
@@ -7266,7 +7335,7 @@ function deployMetadataChecks(metadata, ctx) {
|
|
|
7266
7335
|
members.forEach((member, index) => {
|
|
7267
7336
|
if (!TOOL_NAME_PATTERN.test(member)) {
|
|
7268
7337
|
ctx.addIssue({
|
|
7269
|
-
code:
|
|
7338
|
+
code: z30.ZodIssueCode.custom,
|
|
7270
7339
|
path: ["toolsets", toolset, index],
|
|
7271
7340
|
message: `tool name "${member}" must match ${TOOL_NAME_PATTERN}`
|
|
7272
7341
|
});
|
|
@@ -7276,28 +7345,28 @@ function deployMetadataChecks(metadata, ctx) {
|
|
|
7276
7345
|
(metadata.tools ?? []).forEach((tool, index) => {
|
|
7277
7346
|
if (!TOOL_NAME_PATTERN.test(tool.name)) {
|
|
7278
7347
|
ctx.addIssue({
|
|
7279
|
-
code:
|
|
7348
|
+
code: z30.ZodIssueCode.custom,
|
|
7280
7349
|
path: ["tools", index, "name"],
|
|
7281
7350
|
message: `tool name "${tool.name}" must match ${TOOL_NAME_PATTERN}`
|
|
7282
7351
|
});
|
|
7283
7352
|
}
|
|
7284
7353
|
if (tool.operationId != null && tool.operationId.length > MAX_OPERATION_ID_LENGTH) {
|
|
7285
7354
|
ctx.addIssue({
|
|
7286
|
-
code:
|
|
7355
|
+
code: z30.ZodIssueCode.custom,
|
|
7287
7356
|
path: ["tools", index, "operationId"],
|
|
7288
7357
|
message: `operationId must be at most ${MAX_OPERATION_ID_LENGTH} characters`
|
|
7289
7358
|
});
|
|
7290
7359
|
}
|
|
7291
7360
|
if (tool.method.length > MAX_METHOD_LENGTH) {
|
|
7292
7361
|
ctx.addIssue({
|
|
7293
|
-
code:
|
|
7362
|
+
code: z30.ZodIssueCode.custom,
|
|
7294
7363
|
path: ["tools", index, "method"],
|
|
7295
7364
|
message: `method must be at most ${MAX_METHOD_LENGTH} characters`
|
|
7296
7365
|
});
|
|
7297
7366
|
}
|
|
7298
7367
|
if (tool.path.length > MAX_PATH_LENGTH) {
|
|
7299
7368
|
ctx.addIssue({
|
|
7300
|
-
code:
|
|
7369
|
+
code: z30.ZodIssueCode.custom,
|
|
7301
7370
|
path: ["tools", index, "path"],
|
|
7302
7371
|
message: `path must be at most ${MAX_PATH_LENGTH} characters`
|
|
7303
7372
|
});
|
|
@@ -7306,7 +7375,7 @@ function deployMetadataChecks(metadata, ctx) {
|
|
|
7306
7375
|
metadata.auth.schemes.forEach((scheme, index) => {
|
|
7307
7376
|
if (scheme.type === "apiKey" && !HEADER_TOKEN_PATTERN.test(scheme.paramName)) {
|
|
7308
7377
|
ctx.addIssue({
|
|
7309
|
-
code:
|
|
7378
|
+
code: z30.ZodIssueCode.custom,
|
|
7310
7379
|
path: ["auth", "schemes", index, "paramName"],
|
|
7311
7380
|
message: `paramName "${scheme.paramName}" must be an RFC 7230 token of at most 128 characters`
|
|
7312
7381
|
});
|
|
@@ -7314,30 +7383,30 @@ function deployMetadataChecks(metadata, ctx) {
|
|
|
7314
7383
|
});
|
|
7315
7384
|
if (!maxSerializedBytes(MCP_METADATA_MAX_BYTES)(metadata)) {
|
|
7316
7385
|
ctx.addIssue({
|
|
7317
|
-
code:
|
|
7386
|
+
code: z30.ZodIssueCode.custom,
|
|
7318
7387
|
message: `metadata must be at most ${MCP_METADATA_MAX_BYTES} bytes serialized`
|
|
7319
7388
|
});
|
|
7320
7389
|
}
|
|
7321
7390
|
}
|
|
7322
|
-
var DeployMcpServerInputSchema =
|
|
7391
|
+
var DeployMcpServerInputSchema = z30.object({
|
|
7323
7392
|
orgId: McpPathSegmentSchema,
|
|
7324
7393
|
slug: McpPathSegmentSchema,
|
|
7325
|
-
mainModule:
|
|
7326
|
-
compatibilityDate:
|
|
7327
|
-
compatibilityFlags:
|
|
7394
|
+
mainModule: z30.string().min(1),
|
|
7395
|
+
compatibilityDate: z30.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
7396
|
+
compatibilityFlags: z30.array(z30.string()),
|
|
7328
7397
|
// Bounded so a single deploy request cannot fan out unbounded parallel
|
|
7329
7398
|
// CAS lookups and S3 reads. Generated MCP workers are 1-2 modules;
|
|
7330
7399
|
// 20 leaves room for wasm/sourcemap/chunk splitting.
|
|
7331
|
-
modules:
|
|
7400
|
+
modules: z30.array(McpModuleSchema).min(1).max(20),
|
|
7332
7401
|
metadata: McpMetadataSchema.superRefine(deployMetadataChecks),
|
|
7333
7402
|
// Everything else in this schema is bounded; keep the opaque config
|
|
7334
7403
|
// blob bounded too so it cannot balloon the JSONB row.
|
|
7335
|
-
config:
|
|
7404
|
+
config: z30.unknown().optional().refine(maxSerializedBytes(MCP_CONFIG_MAX_BYTES), {
|
|
7336
7405
|
message: `config must be at most ${MCP_CONFIG_MAX_BYTES} bytes serialized`
|
|
7337
7406
|
}),
|
|
7338
|
-
generatorName:
|
|
7339
|
-
generatorVersion:
|
|
7340
|
-
cliVersion:
|
|
7407
|
+
generatorName: z30.string().min(1),
|
|
7408
|
+
generatorVersion: z30.string().min(1),
|
|
7409
|
+
cliVersion: z30.string().optional(),
|
|
7341
7410
|
git: McpGitInputSchema.optional(),
|
|
7342
7411
|
inputs: McpInputFilesSchema.optional()
|
|
7343
7412
|
}).strict().superRefine((input, ctx) => {
|
|
@@ -7345,7 +7414,7 @@ var DeployMcpServerInputSchema = z29.object({
|
|
|
7345
7414
|
for (const module of input.modules) {
|
|
7346
7415
|
if (names.has(module.name)) {
|
|
7347
7416
|
ctx.addIssue({
|
|
7348
|
-
code:
|
|
7417
|
+
code: z30.ZodIssueCode.custom,
|
|
7349
7418
|
path: ["modules"],
|
|
7350
7419
|
message: `duplicate module name: ${module.name}`
|
|
7351
7420
|
});
|
|
@@ -7354,18 +7423,18 @@ var DeployMcpServerInputSchema = z29.object({
|
|
|
7354
7423
|
}
|
|
7355
7424
|
if (!names.has(input.mainModule)) {
|
|
7356
7425
|
ctx.addIssue({
|
|
7357
|
-
code:
|
|
7426
|
+
code: z30.ZodIssueCode.custom,
|
|
7358
7427
|
path: ["mainModule"],
|
|
7359
7428
|
message: `mainModule ${input.mainModule} is not among the submitted modules`
|
|
7360
7429
|
});
|
|
7361
7430
|
}
|
|
7362
7431
|
});
|
|
7363
|
-
var GetMcpServerInputSchema =
|
|
7432
|
+
var GetMcpServerInputSchema = z30.object({
|
|
7364
7433
|
orgId: McpPathSegmentSchema,
|
|
7365
7434
|
slug: McpPathSegmentSchema
|
|
7366
7435
|
});
|
|
7367
7436
|
var GetMcpServerBrandingInputSchema = GetMcpServerInputSchema;
|
|
7368
|
-
var GetMcpServerBrandingResponseSchema =
|
|
7437
|
+
var GetMcpServerBrandingResponseSchema = z30.object({
|
|
7369
7438
|
branding: McpServerBrandingSchema,
|
|
7370
7439
|
inherited: DeploymentThemeSchema.nullable()
|
|
7371
7440
|
});
|
|
@@ -7378,35 +7447,35 @@ var UpdateMcpServerAuthInputSchema = GetMcpServerInputSchema.extend(
|
|
|
7378
7447
|
).superRefine(mcpServerAuthChecks);
|
|
7379
7448
|
var MCP_EXCHANGE_SECRET_MAX_LENGTH = 4096;
|
|
7380
7449
|
var SetMcpServerExchangeSecretInputSchema = GetMcpServerInputSchema.extend({
|
|
7381
|
-
secret:
|
|
7450
|
+
secret: z30.string().min(1).max(MCP_EXCHANGE_SECRET_MAX_LENGTH).nullable()
|
|
7382
7451
|
});
|
|
7383
7452
|
var SetMcpServerIpAllowListInputSchema = GetMcpServerInputSchema.extend({
|
|
7384
7453
|
ranges: McpIpAllowListSchema
|
|
7385
7454
|
});
|
|
7386
|
-
var ListMcpServersInputSchema =
|
|
7387
|
-
orgId:
|
|
7455
|
+
var ListMcpServersInputSchema = z30.object({
|
|
7456
|
+
orgId: z30.string()
|
|
7388
7457
|
});
|
|
7389
7458
|
var ListMcpDeploymentsInputSchema = GetMcpServerInputSchema;
|
|
7390
7459
|
var DeleteMcpServerInputSchema = GetMcpServerInputSchema;
|
|
7391
7460
|
var PauseMcpServerInputSchema = GetMcpServerInputSchema;
|
|
7392
7461
|
var ResumeMcpServerInputSchema = GetMcpServerInputSchema;
|
|
7393
7462
|
var RenameMcpServerInputSchema = GetMcpServerInputSchema.extend({ newSlug: McpPathSegmentSchema });
|
|
7394
|
-
var GetMcpDeploymentInputSchema =
|
|
7463
|
+
var GetMcpDeploymentInputSchema = z30.object({
|
|
7395
7464
|
orgId: McpPathSegmentSchema,
|
|
7396
7465
|
slug: McpPathSegmentSchema,
|
|
7397
7466
|
/** Id of one of the server's attempts (the rows are uuid v7). */
|
|
7398
|
-
deploymentId:
|
|
7467
|
+
deploymentId: z30.string().uuid()
|
|
7399
7468
|
});
|
|
7400
|
-
var RollbackMcpServerInputSchema =
|
|
7469
|
+
var RollbackMcpServerInputSchema = z30.object({
|
|
7401
7470
|
orgId: McpPathSegmentSchema,
|
|
7402
7471
|
slug: McpPathSegmentSchema,
|
|
7403
7472
|
/** Id of the SUCCEEDED deployment whose payload should serve again. */
|
|
7404
|
-
deploymentId:
|
|
7473
|
+
deploymentId: z30.string().min(1).max(64)
|
|
7405
7474
|
});
|
|
7406
7475
|
var GetMcpCustomDomainInputSchema = GetMcpServerInputSchema;
|
|
7407
7476
|
var RefreshMcpCustomDomainInputSchema = GetMcpServerInputSchema;
|
|
7408
7477
|
var RemoveMcpCustomDomainInputSchema = GetMcpServerInputSchema;
|
|
7409
|
-
var SetMcpCustomDomainInputSchema =
|
|
7478
|
+
var SetMcpCustomDomainInputSchema = z30.object({
|
|
7410
7479
|
orgId: McpPathSegmentSchema,
|
|
7411
7480
|
slug: McpPathSegmentSchema,
|
|
7412
7481
|
/**
|
|
@@ -7414,52 +7483,52 @@ var SetMcpCustomDomainInputSchema = z29.object({
|
|
|
7414
7483
|
* against validateCustomDomain (customDomain.ts) and normalized by FDR;
|
|
7415
7484
|
* the length cap only bounds what is parsed.
|
|
7416
7485
|
*/
|
|
7417
|
-
hostname:
|
|
7486
|
+
hostname: z30.string().min(1).max(512)
|
|
7418
7487
|
});
|
|
7419
|
-
var GetMcpAnalyticsInputSchema =
|
|
7488
|
+
var GetMcpAnalyticsInputSchema = z30.object({
|
|
7420
7489
|
orgId: McpPathSegmentSchema,
|
|
7421
7490
|
slug: McpPathSegmentSchema,
|
|
7422
7491
|
window: McpAnalyticsWindowSchema.default("24h")
|
|
7423
7492
|
});
|
|
7424
|
-
var McpDeploymentGitSchema =
|
|
7425
|
-
repoUrl:
|
|
7426
|
-
branch:
|
|
7427
|
-
commitSha:
|
|
7493
|
+
var McpDeploymentGitSchema = z30.object({
|
|
7494
|
+
repoUrl: z30.string(),
|
|
7495
|
+
branch: z30.string().nullish(),
|
|
7496
|
+
commitSha: z30.string().nullish()
|
|
7428
7497
|
});
|
|
7429
|
-
var McpDeploymentSummarySchema =
|
|
7430
|
-
id:
|
|
7498
|
+
var McpDeploymentSummarySchema = z30.object({
|
|
7499
|
+
id: z30.string(),
|
|
7431
7500
|
status: McpDeploymentStatusSchema,
|
|
7432
7501
|
/** True when this deployment is the one the server currently serves. */
|
|
7433
|
-
isActive:
|
|
7502
|
+
isActive: z30.boolean(),
|
|
7434
7503
|
/**
|
|
7435
7504
|
* Docker image name of the generator that produced this attempt's payload
|
|
7436
7505
|
* (DeployMcpServerInputSchema.generatorName). Null only on the wire from
|
|
7437
7506
|
* an FDR that predates the field; the column itself is required.
|
|
7438
7507
|
*/
|
|
7439
|
-
generatorName:
|
|
7440
|
-
generatorVersion:
|
|
7441
|
-
createdAt:
|
|
7442
|
-
createdBy:
|
|
7443
|
-
error:
|
|
7508
|
+
generatorName: z30.string().nullish(),
|
|
7509
|
+
generatorVersion: z30.string(),
|
|
7510
|
+
createdAt: z30.string(),
|
|
7511
|
+
createdBy: z30.string().nullish(),
|
|
7512
|
+
error: z30.object({ name: z30.string(), message: z30.string() }).nullish(),
|
|
7444
7513
|
/**
|
|
7445
7514
|
* Set when this attempt republished an earlier deployment's payload
|
|
7446
7515
|
* (rollbackServer): the id of that source deployment. Null for attempts
|
|
7447
7516
|
* that came from a deploy.
|
|
7448
7517
|
*/
|
|
7449
|
-
rolledBackFromDeploymentId:
|
|
7518
|
+
rolledBackFromDeploymentId: z30.string().nullish(),
|
|
7450
7519
|
/**
|
|
7451
7520
|
* Headline tool count of this attempt's payload, by the same rule as
|
|
7452
7521
|
* McpServerCatalogSummarySchema.toolCount. Null when the stored payload
|
|
7453
7522
|
* predates the current metadata schema.
|
|
7454
7523
|
*/
|
|
7455
|
-
toolCount:
|
|
7524
|
+
toolCount: z30.number().int().nullish(),
|
|
7456
7525
|
/**
|
|
7457
7526
|
* Version of the Fern CLI that submitted this attempt, when one identified
|
|
7458
7527
|
* itself (DeployMcpServerInputSchema.cliVersion). Null for attempts that
|
|
7459
7528
|
* reached the deploy endpoint without it, and for rollbacks, which FDR
|
|
7460
7529
|
* records on its own behalf.
|
|
7461
7530
|
*/
|
|
7462
|
-
cliVersion:
|
|
7531
|
+
cliVersion: z30.string().nullish(),
|
|
7463
7532
|
/**
|
|
7464
7533
|
* The CI run that submitted this attempt, as the CLI described it in the
|
|
7465
7534
|
* `X-CI-Source` header and FDR sanitized it (the same treatment docs
|
|
@@ -7468,7 +7537,7 @@ var McpDeploymentSummarySchema = z29.object({
|
|
|
7468
7537
|
* and, like the deployer headers, self-asserted by the caller. Null for
|
|
7469
7538
|
* local deploys and rollbacks.
|
|
7470
7539
|
*/
|
|
7471
|
-
ciSource:
|
|
7540
|
+
ciSource: z30.record(z30.string(), z30.unknown()).nullish(),
|
|
7472
7541
|
/**
|
|
7473
7542
|
* The repository this attempt's payload was generated from, as the CLI
|
|
7474
7543
|
* reported it (DeployMcpServerInputSchema.git). A rollback carries its
|
|
@@ -7484,47 +7553,47 @@ var McpDeploymentSummarySchema = z29.object({
|
|
|
7484
7553
|
* deployment it restored always do — so it names what a version *is* rather
|
|
7485
7554
|
* than which row it was. Null when the stored module list does not parse.
|
|
7486
7555
|
*/
|
|
7487
|
-
bundleDigest:
|
|
7556
|
+
bundleDigest: z30.string().nullish()
|
|
7488
7557
|
});
|
|
7489
|
-
var McpDeploymentInputFileSchema =
|
|
7490
|
-
name:
|
|
7491
|
-
contentType:
|
|
7492
|
-
hash:
|
|
7493
|
-
downloadUrl:
|
|
7558
|
+
var McpDeploymentInputFileSchema = z30.object({
|
|
7559
|
+
name: z30.string(),
|
|
7560
|
+
contentType: z30.string(),
|
|
7561
|
+
hash: z30.string(),
|
|
7562
|
+
downloadUrl: z30.string()
|
|
7494
7563
|
});
|
|
7495
7564
|
var McpDeploymentDetailSchema = McpDeploymentSummarySchema.extend({
|
|
7496
7565
|
/** Empty when the stored metadata carries no `tools` (generators before provenance). */
|
|
7497
|
-
tools:
|
|
7498
|
-
skippedTools:
|
|
7566
|
+
tools: z30.array(McpDeploymentToolSchema),
|
|
7567
|
+
skippedTools: z30.array(McpDeploymentSkippedToolSchema),
|
|
7499
7568
|
/** The stored toolset membership map, as deployed. */
|
|
7500
|
-
toolsets:
|
|
7569
|
+
toolsets: z30.record(z30.string(), z30.array(z30.string())),
|
|
7501
7570
|
/** The raw generators.yml `config:` block the CLI sent, or null. Visible to org members. */
|
|
7502
|
-
config:
|
|
7571
|
+
config: z30.unknown().nullable(),
|
|
7503
7572
|
/** Null when the attempt recorded no inputs (older CLIs, rollbacks of such rows). */
|
|
7504
|
-
inputs:
|
|
7573
|
+
inputs: z30.array(McpDeploymentInputFileSchema).nullable()
|
|
7505
7574
|
});
|
|
7506
|
-
var McpCustomDomainStatusSchema =
|
|
7507
|
-
var McpCustomDomainRecordSchema =
|
|
7508
|
-
type:
|
|
7509
|
-
name:
|
|
7510
|
-
value:
|
|
7575
|
+
var McpCustomDomainStatusSchema = z30.enum(["PENDING", "ACTIVE", "FAILED"]);
|
|
7576
|
+
var McpCustomDomainRecordSchema = z30.object({
|
|
7577
|
+
type: z30.enum(["CNAME", "TXT"]),
|
|
7578
|
+
name: z30.string(),
|
|
7579
|
+
value: z30.string(),
|
|
7511
7580
|
/** What the record is for, in a sentence the dashboard can show beside it. */
|
|
7512
|
-
purpose:
|
|
7581
|
+
purpose: z30.string()
|
|
7513
7582
|
});
|
|
7514
|
-
var McpCustomDomainSchema =
|
|
7515
|
-
hostname:
|
|
7583
|
+
var McpCustomDomainSchema = z30.object({
|
|
7584
|
+
hostname: z30.string(),
|
|
7516
7585
|
status: McpCustomDomainStatusSchema,
|
|
7517
7586
|
/** Records still to add; empty once the domain is ACTIVE. */
|
|
7518
|
-
records:
|
|
7587
|
+
records: z30.array(McpCustomDomainRecordSchema),
|
|
7519
7588
|
/** Why Cloudflare could not verify the domain or issue its certificate, when it said. */
|
|
7520
|
-
errors:
|
|
7521
|
-
createdAt:
|
|
7522
|
-
updatedAt:
|
|
7523
|
-
});
|
|
7524
|
-
var McpServerSchema =
|
|
7525
|
-
id:
|
|
7526
|
-
orgId:
|
|
7527
|
-
slug:
|
|
7589
|
+
errors: z30.array(z30.string()),
|
|
7590
|
+
createdAt: z30.string(),
|
|
7591
|
+
updatedAt: z30.string()
|
|
7592
|
+
});
|
|
7593
|
+
var McpServerSchema = z30.object({
|
|
7594
|
+
id: z30.string(),
|
|
7595
|
+
orgId: z30.string(),
|
|
7596
|
+
slug: z30.string(),
|
|
7528
7597
|
/** Per-server custom branding; empty when no values are set. */
|
|
7529
7598
|
branding: McpServerBrandingSchema,
|
|
7530
7599
|
/**
|
|
@@ -7538,9 +7607,9 @@ var McpServerSchema = z29.object({
|
|
|
7538
7607
|
* setServerIpAllowList. Empty means open. Kept across deploys and
|
|
7539
7608
|
* rollbacks. Absent only on the wire from an FDR that predates the field.
|
|
7540
7609
|
*/
|
|
7541
|
-
ipAllowList:
|
|
7610
|
+
ipAllowList: z30.array(z30.string()).optional(),
|
|
7542
7611
|
/** The server is serving iff this is set; it names the serving deployment. */
|
|
7543
|
-
activeDeploymentId:
|
|
7612
|
+
activeDeploymentId: z30.string().nullish(),
|
|
7544
7613
|
/** Most recent publication attempt — how the last deploy went. */
|
|
7545
7614
|
latestDeployment: McpDeploymentSummarySchema.nullish(),
|
|
7546
7615
|
/**
|
|
@@ -7549,7 +7618,7 @@ var McpServerSchema = z29.object({
|
|
|
7549
7618
|
* (KV_KEY_PREFIX_PAUSED in kv.ts). Independent of activeDeploymentId: a
|
|
7550
7619
|
* paused server keeps its serving deployment and resumes exactly there.
|
|
7551
7620
|
*/
|
|
7552
|
-
pausedAt:
|
|
7621
|
+
pausedAt: z30.string().nullish(),
|
|
7553
7622
|
/**
|
|
7554
7623
|
* What the server offers, derived from the ACTIVE deployment's stored
|
|
7555
7624
|
* metadata (tools, toolsets, auth, configuration). Null when nothing is
|
|
@@ -7563,14 +7632,14 @@ var McpServerSchema = z29.object({
|
|
|
7563
7632
|
* a UI shows both. Only an ACTIVE domain serves: read `customDomainStatus`
|
|
7564
7633
|
* to tell a pending one from a live one.
|
|
7565
7634
|
*/
|
|
7566
|
-
customDomain:
|
|
7635
|
+
customDomain: z30.string().nullish(),
|
|
7567
7636
|
customDomainStatus: McpCustomDomainStatusSchema.nullish(),
|
|
7568
|
-
url:
|
|
7569
|
-
createdAt:
|
|
7570
|
-
updatedAt:
|
|
7637
|
+
url: z30.string().url(),
|
|
7638
|
+
createdAt: z30.string(),
|
|
7639
|
+
updatedAt: z30.string()
|
|
7571
7640
|
});
|
|
7572
|
-
var ListMcpServersResponseSchema =
|
|
7573
|
-
var ListMcpDeploymentsResponseSchema =
|
|
7641
|
+
var ListMcpServersResponseSchema = z30.object({ servers: z30.array(McpServerSchema) });
|
|
7642
|
+
var ListMcpDeploymentsResponseSchema = z30.object({ deployments: z30.array(McpDeploymentSummarySchema) });
|
|
7574
7643
|
var mcpHostingContract = {
|
|
7575
7644
|
deploy: oc15.route({ method: "POST", path: "/deploy" }).input(DeployMcpServerInputSchema).output(McpServerSchema),
|
|
7576
7645
|
getServer: oc15.route({ method: "GET", path: "/servers/{slug}" }).input(GetMcpServerInputSchema).output(McpServerSchema),
|
|
@@ -7658,7 +7727,19 @@ var mcpHostingContract = {
|
|
|
7658
7727
|
* Analytics Engine by FDR (the tenant filter is applied server-side, so no
|
|
7659
7728
|
* Cloudflare credential reaches the browser). See analytics.ts.
|
|
7660
7729
|
*/
|
|
7661
|
-
getAnalytics: oc15.route({ method: "GET", path: "/servers/{slug}/analytics" }).input(GetMcpAnalyticsInputSchema).output(McpAnalyticsSchema)
|
|
7730
|
+
getAnalytics: oc15.route({ method: "GET", path: "/servers/{slug}/analytics" }).input(GetMcpAnalyticsInputSchema).output(McpAnalyticsSchema),
|
|
7731
|
+
/**
|
|
7732
|
+
* The org's exact tool-call count for a month against its allowance
|
|
7733
|
+
* (usage.ts). Any member. NOT_IMPLEMENTED when FDR has no usage read
|
|
7734
|
+
* token for the dispatcher.
|
|
7735
|
+
*/
|
|
7736
|
+
getUsage: oc15.route({ method: "GET", path: "/usage" }).input(GetMcpUsageInputSchema).output(McpOrgUsageSchema),
|
|
7737
|
+
/**
|
|
7738
|
+
* Set the org's monthly allowance (sales raising a limit or approving an
|
|
7739
|
+
* org to go over). Fern staff (super-users) only. Applies at the
|
|
7740
|
+
* dispatcher within KV's propagation time plus its one-minute cache.
|
|
7741
|
+
*/
|
|
7742
|
+
setUsageAllowance: oc15.route({ method: "PUT", path: "/usage/allowance" }).input(SetMcpUsageAllowanceInputSchema).output(McpOrgUsageSchema)
|
|
7662
7743
|
};
|
|
7663
7744
|
|
|
7664
7745
|
// src/orpc-client/mcp-hosting/client.ts
|
|
@@ -7680,87 +7761,87 @@ import { OpenAPILink as OpenAPILink18 } from "@orpc/openapi-client/fetch";
|
|
|
7680
7761
|
|
|
7681
7762
|
// src/orpc-client/pdf-export/contract.ts
|
|
7682
7763
|
import { oc as oc16 } from "@orpc/contract";
|
|
7683
|
-
import * as
|
|
7684
|
-
var PdfExportScopeSchema =
|
|
7685
|
-
pageSlugs:
|
|
7686
|
-
});
|
|
7687
|
-
var PdfExportOptionsV1Schema =
|
|
7688
|
-
coverTitle:
|
|
7689
|
-
coverSubtitle:
|
|
7690
|
-
hideCoverFooter:
|
|
7691
|
-
headerLeftTemplate:
|
|
7692
|
-
headerRightTemplate:
|
|
7693
|
-
footerLeftTemplate:
|
|
7694
|
-
footerRightTemplate:
|
|
7764
|
+
import * as z31 from "zod";
|
|
7765
|
+
var PdfExportScopeSchema = z31.object({
|
|
7766
|
+
pageSlugs: z31.array(z31.string())
|
|
7767
|
+
});
|
|
7768
|
+
var PdfExportOptionsV1Schema = z31.object({
|
|
7769
|
+
coverTitle: z31.string().nullish(),
|
|
7770
|
+
coverSubtitle: z31.string().nullish(),
|
|
7771
|
+
hideCoverFooter: z31.boolean().nullish(),
|
|
7772
|
+
headerLeftTemplate: z31.string().nullish(),
|
|
7773
|
+
headerRightTemplate: z31.string().nullish(),
|
|
7774
|
+
footerLeftTemplate: z31.string().nullish(),
|
|
7775
|
+
footerRightTemplate: z31.string().nullish(),
|
|
7695
7776
|
scope: PdfExportScopeSchema.nullish(),
|
|
7696
|
-
hideCover:
|
|
7697
|
-
hideToc:
|
|
7777
|
+
hideCover: z31.boolean().nullish(),
|
|
7778
|
+
hideToc: z31.boolean().nullish()
|
|
7698
7779
|
});
|
|
7699
|
-
var PdfExportOptionsSchema =
|
|
7700
|
-
|
|
7780
|
+
var PdfExportOptionsSchema = z31.discriminatedUnion("version", [
|
|
7781
|
+
z31.object({ version: z31.literal("v1") }).merge(PdfExportOptionsV1Schema)
|
|
7701
7782
|
]);
|
|
7702
|
-
var PdfExportTaskStatusSchema =
|
|
7703
|
-
var PdfExportFormatSchema =
|
|
7704
|
-
var PdfExportTaskSchema =
|
|
7705
|
-
id:
|
|
7706
|
-
orgId:
|
|
7707
|
-
docsUrl:
|
|
7708
|
-
productId:
|
|
7709
|
-
versionId:
|
|
7710
|
-
requesterName:
|
|
7711
|
-
notifyEmails:
|
|
7783
|
+
var PdfExportTaskStatusSchema = z31.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED"]);
|
|
7784
|
+
var PdfExportFormatSchema = z31.enum(["pdf", "html", "md"]);
|
|
7785
|
+
var PdfExportTaskSchema = z31.object({
|
|
7786
|
+
id: z31.string(),
|
|
7787
|
+
orgId: z31.string(),
|
|
7788
|
+
docsUrl: z31.string(),
|
|
7789
|
+
productId: z31.string().nullish(),
|
|
7790
|
+
versionId: z31.string().nullish(),
|
|
7791
|
+
requesterName: z31.string().nullish(),
|
|
7792
|
+
notifyEmails: z31.array(z31.string()).nullish(),
|
|
7712
7793
|
status: PdfExportTaskStatusSchema,
|
|
7713
7794
|
format: PdfExportFormatSchema.nullish(),
|
|
7714
7795
|
options: PdfExportOptionsSchema.nullish(),
|
|
7715
|
-
createdAt:
|
|
7716
|
-
startedAt:
|
|
7717
|
-
completedAt:
|
|
7718
|
-
fileName:
|
|
7719
|
-
sizeBytes:
|
|
7720
|
-
errorMessage:
|
|
7721
|
-
});
|
|
7722
|
-
var ListPdfExportTasksResponseSchema =
|
|
7723
|
-
tasks:
|
|
7724
|
-
});
|
|
7725
|
-
var PdfExportDownloadResponseSchema =
|
|
7726
|
-
downloadUrl:
|
|
7727
|
-
fileName:
|
|
7728
|
-
sizeBytes:
|
|
7729
|
-
});
|
|
7730
|
-
var CreatePdfExportTaskInputSchema =
|
|
7731
|
-
orgId:
|
|
7732
|
-
docsUrl:
|
|
7733
|
-
productId:
|
|
7734
|
-
versionId:
|
|
7735
|
-
requesterName:
|
|
7796
|
+
createdAt: z31.string(),
|
|
7797
|
+
startedAt: z31.string().nullish(),
|
|
7798
|
+
completedAt: z31.string().nullish(),
|
|
7799
|
+
fileName: z31.string().nullish(),
|
|
7800
|
+
sizeBytes: z31.number().nullish(),
|
|
7801
|
+
errorMessage: z31.string().nullish()
|
|
7802
|
+
});
|
|
7803
|
+
var ListPdfExportTasksResponseSchema = z31.object({
|
|
7804
|
+
tasks: z31.array(PdfExportTaskSchema)
|
|
7805
|
+
});
|
|
7806
|
+
var PdfExportDownloadResponseSchema = z31.object({
|
|
7807
|
+
downloadUrl: z31.string(),
|
|
7808
|
+
fileName: z31.string(),
|
|
7809
|
+
sizeBytes: z31.number()
|
|
7810
|
+
});
|
|
7811
|
+
var CreatePdfExportTaskInputSchema = z31.object({
|
|
7812
|
+
orgId: z31.string(),
|
|
7813
|
+
docsUrl: z31.string(),
|
|
7814
|
+
productId: z31.string().nullish(),
|
|
7815
|
+
versionId: z31.string().nullish(),
|
|
7816
|
+
requesterName: z31.string().nullish(),
|
|
7736
7817
|
format: PdfExportFormatSchema.nullish(),
|
|
7737
7818
|
options: PdfExportOptionsSchema.nullish()
|
|
7738
7819
|
});
|
|
7739
|
-
var ListPdfExportTasksInputSchema =
|
|
7740
|
-
orgId:
|
|
7741
|
-
docsUrl:
|
|
7742
|
-
limit:
|
|
7820
|
+
var ListPdfExportTasksInputSchema = z31.object({
|
|
7821
|
+
orgId: z31.string(),
|
|
7822
|
+
docsUrl: z31.string(),
|
|
7823
|
+
limit: z31.coerce.number().nullish()
|
|
7743
7824
|
});
|
|
7744
|
-
var GetPdfExportTaskInputSchema =
|
|
7745
|
-
taskId:
|
|
7825
|
+
var GetPdfExportTaskInputSchema = z31.object({
|
|
7826
|
+
taskId: z31.string()
|
|
7746
7827
|
});
|
|
7747
|
-
var UpdatePdfExportTaskInputSchema =
|
|
7748
|
-
taskId:
|
|
7828
|
+
var UpdatePdfExportTaskInputSchema = z31.object({
|
|
7829
|
+
taskId: z31.string(),
|
|
7749
7830
|
status: PdfExportTaskStatusSchema,
|
|
7750
|
-
startedAt:
|
|
7751
|
-
completedAt:
|
|
7752
|
-
s3Key:
|
|
7753
|
-
fileName:
|
|
7754
|
-
sizeBytes:
|
|
7755
|
-
errorMessage:
|
|
7831
|
+
startedAt: z31.string().nullish(),
|
|
7832
|
+
completedAt: z31.string().nullish(),
|
|
7833
|
+
s3Key: z31.string().nullish(),
|
|
7834
|
+
fileName: z31.string().nullish(),
|
|
7835
|
+
sizeBytes: z31.number().nullish(),
|
|
7836
|
+
errorMessage: z31.string().nullish()
|
|
7756
7837
|
});
|
|
7757
|
-
var GetPdfExportDownloadUrlInputSchema =
|
|
7758
|
-
taskId:
|
|
7838
|
+
var GetPdfExportDownloadUrlInputSchema = z31.object({
|
|
7839
|
+
taskId: z31.string()
|
|
7759
7840
|
});
|
|
7760
|
-
var CleanupPdfExportsResponseSchema =
|
|
7761
|
-
expiredTasksDeleted:
|
|
7762
|
-
s3ObjectsDeleted:
|
|
7763
|
-
timedOutTasksFailed:
|
|
7841
|
+
var CleanupPdfExportsResponseSchema = z31.object({
|
|
7842
|
+
expiredTasksDeleted: z31.number(),
|
|
7843
|
+
s3ObjectsDeleted: z31.number(),
|
|
7844
|
+
timedOutTasksFailed: z31.number()
|
|
7764
7845
|
});
|
|
7765
7846
|
var pdfExportContract = {
|
|
7766
7847
|
createTask: oc16.route({ method: "POST", path: "/task" }).input(CreatePdfExportTaskInputSchema).output(PdfExportTaskSchema),
|
|
@@ -7796,8 +7877,8 @@ import { OpenAPILink as OpenAPILink19 } from "@orpc/openapi-client/fetch";
|
|
|
7796
7877
|
|
|
7797
7878
|
// src/orpc-client/sdks/contract.ts
|
|
7798
7879
|
import { oc as oc17 } from "@orpc/contract";
|
|
7799
|
-
import * as
|
|
7800
|
-
var LanguageEnumSchema =
|
|
7880
|
+
import * as z32 from "zod";
|
|
7881
|
+
var LanguageEnumSchema = z32.enum([
|
|
7801
7882
|
"Go",
|
|
7802
7883
|
"TypeScript",
|
|
7803
7884
|
"Java",
|
|
@@ -7808,14 +7889,14 @@ var LanguageEnumSchema = z31.enum([
|
|
|
7808
7889
|
"Swift",
|
|
7809
7890
|
"Rust"
|
|
7810
7891
|
]);
|
|
7811
|
-
var VersionBumpEnumSchema =
|
|
7812
|
-
var ComputeSemanticVersionInputSchema =
|
|
7813
|
-
package:
|
|
7892
|
+
var VersionBumpEnumSchema = z32.enum(["MAJOR", "MINOR", "PATCH"]);
|
|
7893
|
+
var ComputeSemanticVersionInputSchema = z32.object({
|
|
7894
|
+
package: z32.string(),
|
|
7814
7895
|
language: LanguageEnumSchema,
|
|
7815
|
-
githubRepository:
|
|
7896
|
+
githubRepository: z32.string().nullish()
|
|
7816
7897
|
});
|
|
7817
|
-
var ComputeSemanticVersionOutputSchema =
|
|
7818
|
-
version:
|
|
7898
|
+
var ComputeSemanticVersionOutputSchema = z32.object({
|
|
7899
|
+
version: z32.string(),
|
|
7819
7900
|
bump: VersionBumpEnumSchema
|
|
7820
7901
|
});
|
|
7821
7902
|
var sdksContract = {
|
|
@@ -7841,32 +7922,32 @@ import { OpenAPILink as OpenAPILink20 } from "@orpc/openapi-client/fetch";
|
|
|
7841
7922
|
|
|
7842
7923
|
// src/orpc-client/slugs/contract.ts
|
|
7843
7924
|
import { oc as oc18 } from "@orpc/contract";
|
|
7844
|
-
import * as
|
|
7845
|
-
var SlugsInputSchema =
|
|
7846
|
-
domain:
|
|
7847
|
-
basepath:
|
|
7848
|
-
});
|
|
7849
|
-
var SlugEntrySchema =
|
|
7850
|
-
orgId:
|
|
7851
|
-
domain:
|
|
7852
|
-
basepath:
|
|
7853
|
-
slug:
|
|
7854
|
-
lastUpdated:
|
|
7855
|
-
});
|
|
7856
|
-
var MarkdownEntrySchema =
|
|
7857
|
-
orgId:
|
|
7858
|
-
domain:
|
|
7859
|
-
basepath:
|
|
7860
|
-
pageId:
|
|
7861
|
-
slug:
|
|
7862
|
-
hash:
|
|
7863
|
-
lastUpdated:
|
|
7864
|
-
});
|
|
7865
|
-
var GetSlugEntriesResponseSchema =
|
|
7866
|
-
entries:
|
|
7867
|
-
});
|
|
7868
|
-
var GetMarkdownEntriesResponseSchema =
|
|
7869
|
-
entries:
|
|
7925
|
+
import * as z33 from "zod";
|
|
7926
|
+
var SlugsInputSchema = z33.object({
|
|
7927
|
+
domain: z33.string(),
|
|
7928
|
+
basepath: z33.string().optional().default("")
|
|
7929
|
+
});
|
|
7930
|
+
var SlugEntrySchema = z33.object({
|
|
7931
|
+
orgId: z33.string(),
|
|
7932
|
+
domain: z33.string(),
|
|
7933
|
+
basepath: z33.string(),
|
|
7934
|
+
slug: z33.string(),
|
|
7935
|
+
lastUpdated: z33.string()
|
|
7936
|
+
});
|
|
7937
|
+
var MarkdownEntrySchema = z33.object({
|
|
7938
|
+
orgId: z33.string(),
|
|
7939
|
+
domain: z33.string(),
|
|
7940
|
+
basepath: z33.string(),
|
|
7941
|
+
pageId: z33.string(),
|
|
7942
|
+
slug: z33.string(),
|
|
7943
|
+
hash: z33.string(),
|
|
7944
|
+
lastUpdated: z33.string()
|
|
7945
|
+
});
|
|
7946
|
+
var GetSlugEntriesResponseSchema = z33.object({
|
|
7947
|
+
entries: z33.array(SlugEntrySchema)
|
|
7948
|
+
});
|
|
7949
|
+
var GetMarkdownEntriesResponseSchema = z33.object({
|
|
7950
|
+
entries: z33.array(MarkdownEntrySchema)
|
|
7870
7951
|
});
|
|
7871
7952
|
var slugsContract = {
|
|
7872
7953
|
getSlugEntries: oc18.route({ method: "POST", path: "/slugs" }).input(SlugsInputSchema).output(GetSlugEntriesResponseSchema),
|
|
@@ -7892,102 +7973,102 @@ import { OpenAPILink as OpenAPILink21 } from "@orpc/openapi-client/fetch";
|
|
|
7892
7973
|
|
|
7893
7974
|
// src/orpc-client/snippets/contract.ts
|
|
7894
7975
|
import { oc as oc19 } from "@orpc/contract";
|
|
7895
|
-
import * as
|
|
7896
|
-
var TypeScriptSdkSchema =
|
|
7897
|
-
var PythonSdkSchema =
|
|
7898
|
-
var GoSdkSchema =
|
|
7899
|
-
var RubySdkSchema =
|
|
7900
|
-
var JavaSdkSchema =
|
|
7901
|
-
var CsharpSdkSchema =
|
|
7902
|
-
var BaseSnippetCreateSchema =
|
|
7976
|
+
import * as z34 from "zod";
|
|
7977
|
+
var TypeScriptSdkSchema = z34.object({ package: z34.string(), version: z34.string() });
|
|
7978
|
+
var PythonSdkSchema = z34.object({ package: z34.string(), version: z34.string() });
|
|
7979
|
+
var GoSdkSchema = z34.object({ githubRepo: z34.string(), version: z34.string() });
|
|
7980
|
+
var RubySdkSchema = z34.object({ gem: z34.string(), version: z34.string() });
|
|
7981
|
+
var JavaSdkSchema = z34.object({ group: z34.string(), artifact: z34.string(), version: z34.string() });
|
|
7982
|
+
var CsharpSdkSchema = z34.object({ package: z34.string(), version: z34.string() });
|
|
7983
|
+
var BaseSnippetCreateSchema = z34.object({
|
|
7903
7984
|
endpoint: EndpointIdentifierSchema,
|
|
7904
|
-
exampleIdentifier:
|
|
7985
|
+
exampleIdentifier: z34.string().nullish()
|
|
7905
7986
|
});
|
|
7906
|
-
var SdkSnippetsCreateSchema =
|
|
7907
|
-
|
|
7908
|
-
type:
|
|
7987
|
+
var SdkSnippetsCreateSchema = z34.discriminatedUnion("type", [
|
|
7988
|
+
z34.object({
|
|
7989
|
+
type: z34.literal("typescript"),
|
|
7909
7990
|
sdk: TypeScriptSdkSchema,
|
|
7910
|
-
snippets:
|
|
7991
|
+
snippets: z34.array(BaseSnippetCreateSchema.extend({ snippet: z34.object({ client: z34.string() }) }))
|
|
7911
7992
|
}),
|
|
7912
|
-
|
|
7913
|
-
type:
|
|
7993
|
+
z34.object({
|
|
7994
|
+
type: z34.literal("python"),
|
|
7914
7995
|
sdk: PythonSdkSchema,
|
|
7915
|
-
snippets:
|
|
7996
|
+
snippets: z34.array(
|
|
7916
7997
|
BaseSnippetCreateSchema.extend({
|
|
7917
|
-
snippet:
|
|
7998
|
+
snippet: z34.object({ async_client: z34.string(), sync_client: z34.string() })
|
|
7918
7999
|
})
|
|
7919
8000
|
)
|
|
7920
8001
|
}),
|
|
7921
|
-
|
|
7922
|
-
type:
|
|
8002
|
+
z34.object({
|
|
8003
|
+
type: z34.literal("go"),
|
|
7923
8004
|
sdk: GoSdkSchema,
|
|
7924
|
-
snippets:
|
|
8005
|
+
snippets: z34.array(BaseSnippetCreateSchema.extend({ snippet: z34.object({ client: z34.string() }) }))
|
|
7925
8006
|
}),
|
|
7926
|
-
|
|
7927
|
-
type:
|
|
8007
|
+
z34.object({
|
|
8008
|
+
type: z34.literal("java"),
|
|
7928
8009
|
sdk: JavaSdkSchema,
|
|
7929
|
-
snippets:
|
|
8010
|
+
snippets: z34.array(
|
|
7930
8011
|
BaseSnippetCreateSchema.extend({
|
|
7931
|
-
snippet:
|
|
8012
|
+
snippet: z34.object({ async_client: z34.string(), sync_client: z34.string() })
|
|
7932
8013
|
})
|
|
7933
8014
|
)
|
|
7934
8015
|
}),
|
|
7935
|
-
|
|
7936
|
-
type:
|
|
8016
|
+
z34.object({
|
|
8017
|
+
type: z34.literal("ruby"),
|
|
7937
8018
|
sdk: RubySdkSchema,
|
|
7938
|
-
snippets:
|
|
8019
|
+
snippets: z34.array(BaseSnippetCreateSchema.extend({ snippet: z34.object({ client: z34.string() }) }))
|
|
7939
8020
|
}),
|
|
7940
|
-
|
|
7941
|
-
type:
|
|
8021
|
+
z34.object({
|
|
8022
|
+
type: z34.literal("csharp"),
|
|
7942
8023
|
sdk: CsharpSdkSchema,
|
|
7943
|
-
snippets:
|
|
8024
|
+
snippets: z34.array(BaseSnippetCreateSchema.extend({ snippet: z34.object({ client: z34.string() }) }))
|
|
7944
8025
|
})
|
|
7945
8026
|
]);
|
|
7946
8027
|
var snippetsFactoryContract = {
|
|
7947
8028
|
createSnippetsForSdk: oc19.route({ method: "POST", path: "/create" }).input(
|
|
7948
|
-
|
|
7949
|
-
orgId:
|
|
7950
|
-
apiId:
|
|
8029
|
+
z34.object({
|
|
8030
|
+
orgId: z34.string(),
|
|
8031
|
+
apiId: z34.string(),
|
|
7951
8032
|
snippets: SdkSnippetsCreateSchema
|
|
7952
8033
|
})
|
|
7953
8034
|
)
|
|
7954
8035
|
};
|
|
7955
|
-
var ParameterPayloadSchema =
|
|
7956
|
-
name:
|
|
7957
|
-
value:
|
|
8036
|
+
var ParameterPayloadSchema = z34.object({
|
|
8037
|
+
name: z34.string(),
|
|
8038
|
+
value: z34.unknown()
|
|
7958
8039
|
});
|
|
7959
|
-
var AuthPayloadSchema =
|
|
7960
|
-
|
|
7961
|
-
|
|
8040
|
+
var AuthPayloadSchema = z34.discriminatedUnion("type", [
|
|
8041
|
+
z34.object({ type: z34.literal("bearer"), token: z34.string() }),
|
|
8042
|
+
z34.object({ type: z34.literal("basic"), username: z34.string(), password: z34.string() })
|
|
7962
8043
|
]);
|
|
7963
|
-
var CustomSnippetPayloadSchema =
|
|
7964
|
-
headers:
|
|
7965
|
-
pathParameters:
|
|
7966
|
-
queryParameters:
|
|
7967
|
-
requestBody:
|
|
8044
|
+
var CustomSnippetPayloadSchema = z34.object({
|
|
8045
|
+
headers: z34.array(ParameterPayloadSchema).nullish(),
|
|
8046
|
+
pathParameters: z34.array(ParameterPayloadSchema).nullish(),
|
|
8047
|
+
queryParameters: z34.array(ParameterPayloadSchema).nullish(),
|
|
8048
|
+
requestBody: z34.unknown().nullish(),
|
|
7968
8049
|
auth: AuthPayloadSchema.nullish()
|
|
7969
8050
|
});
|
|
7970
8051
|
var snippetsContract = {
|
|
7971
8052
|
get: oc19.route({ method: "POST", path: "/" }).input(
|
|
7972
|
-
|
|
7973
|
-
orgId:
|
|
7974
|
-
apiId:
|
|
7975
|
-
sdks:
|
|
8053
|
+
z34.object({
|
|
8054
|
+
orgId: z34.string().nullish(),
|
|
8055
|
+
apiId: z34.string().nullish(),
|
|
8056
|
+
sdks: z34.array(SdkRequestSchema).nullish(),
|
|
7976
8057
|
endpoint: EndpointIdentifierSchema,
|
|
7977
|
-
exampleIdentifier:
|
|
8058
|
+
exampleIdentifier: z34.string().nullish(),
|
|
7978
8059
|
payload: CustomSnippetPayloadSchema.nullish()
|
|
7979
8060
|
})
|
|
7980
|
-
).output(
|
|
8061
|
+
).output(z34.array(z34.unknown())),
|
|
7981
8062
|
load: oc19.route({ method: "POST", path: "/load" }).input(
|
|
7982
|
-
|
|
7983
|
-
orgId:
|
|
7984
|
-
apiId:
|
|
7985
|
-
sdks:
|
|
8063
|
+
z34.object({
|
|
8064
|
+
orgId: z34.string().nullish(),
|
|
8065
|
+
apiId: z34.string().nullish(),
|
|
8066
|
+
sdks: z34.array(SdkRequestSchema).nullish()
|
|
7986
8067
|
})
|
|
7987
8068
|
).output(
|
|
7988
|
-
|
|
7989
|
-
next:
|
|
7990
|
-
snippets:
|
|
8069
|
+
z34.object({
|
|
8070
|
+
next: z34.number().nullish(),
|
|
8071
|
+
snippets: z34.record(z34.string(), z34.unknown())
|
|
7991
8072
|
})
|
|
7992
8073
|
)
|
|
7993
8074
|
};
|
|
@@ -8022,44 +8103,44 @@ import { OpenAPILink as OpenAPILink22 } from "@orpc/openapi-client/fetch";
|
|
|
8022
8103
|
|
|
8023
8104
|
// src/orpc-client/templates/contract.ts
|
|
8024
8105
|
import { oc as oc20 } from "@orpc/contract";
|
|
8025
|
-
import * as
|
|
8026
|
-
var SnippetRegistryEntrySchema =
|
|
8106
|
+
import * as z35 from "zod";
|
|
8107
|
+
var SnippetRegistryEntrySchema = z35.object({
|
|
8027
8108
|
sdk: SdkSchema,
|
|
8028
|
-
endpointId:
|
|
8029
|
-
path:
|
|
8109
|
+
endpointId: z35.object({
|
|
8110
|
+
path: z35.string(),
|
|
8030
8111
|
method: HttpMethodSchema,
|
|
8031
|
-
identifierOverride:
|
|
8112
|
+
identifierOverride: z35.string().nullish()
|
|
8032
8113
|
}),
|
|
8033
|
-
snippetTemplate:
|
|
8034
|
-
type:
|
|
8035
|
-
functionInvocation:
|
|
8036
|
-
clientInstantiation:
|
|
8114
|
+
snippetTemplate: z35.object({
|
|
8115
|
+
type: z35.literal("v1"),
|
|
8116
|
+
functionInvocation: z35.unknown(),
|
|
8117
|
+
clientInstantiation: z35.string()
|
|
8037
8118
|
}),
|
|
8038
|
-
additionalTemplates:
|
|
8119
|
+
additionalTemplates: z35.record(z35.string(), z35.unknown()).nullish()
|
|
8039
8120
|
});
|
|
8040
|
-
var RegisterInputSchema =
|
|
8041
|
-
orgId:
|
|
8042
|
-
apiId:
|
|
8043
|
-
apiDefinitionId:
|
|
8121
|
+
var RegisterInputSchema = z35.object({
|
|
8122
|
+
orgId: z35.string(),
|
|
8123
|
+
apiId: z35.string(),
|
|
8124
|
+
apiDefinitionId: z35.string(),
|
|
8044
8125
|
snippet: SnippetRegistryEntrySchema
|
|
8045
8126
|
});
|
|
8046
|
-
var RegisterBatchInputSchema =
|
|
8047
|
-
orgId:
|
|
8048
|
-
apiId:
|
|
8049
|
-
apiDefinitionId:
|
|
8050
|
-
snippets:
|
|
8127
|
+
var RegisterBatchInputSchema = z35.object({
|
|
8128
|
+
orgId: z35.string(),
|
|
8129
|
+
apiId: z35.string(),
|
|
8130
|
+
apiDefinitionId: z35.string(),
|
|
8131
|
+
snippets: z35.array(SnippetRegistryEntrySchema)
|
|
8051
8132
|
});
|
|
8052
|
-
var GetInputSchema =
|
|
8053
|
-
orgId:
|
|
8054
|
-
apiId:
|
|
8133
|
+
var GetInputSchema = z35.object({
|
|
8134
|
+
orgId: z35.string(),
|
|
8135
|
+
apiId: z35.string(),
|
|
8055
8136
|
sdk: SdkSchema,
|
|
8056
|
-
endpointId:
|
|
8057
|
-
path:
|
|
8137
|
+
endpointId: z35.object({
|
|
8138
|
+
path: z35.string(),
|
|
8058
8139
|
method: HttpMethodSchema,
|
|
8059
|
-
identifierOverride:
|
|
8140
|
+
identifierOverride: z35.string().nullish()
|
|
8060
8141
|
})
|
|
8061
8142
|
});
|
|
8062
|
-
var EndpointSnippetTemplateSchema =
|
|
8143
|
+
var EndpointSnippetTemplateSchema = z35.record(z35.string(), z35.unknown());
|
|
8063
8144
|
var templatesContract = {
|
|
8064
8145
|
register: oc20.route({ method: "POST", path: "/register" }).input(RegisterInputSchema),
|
|
8065
8146
|
registerBatch: oc20.route({ method: "POST", path: "/register/batch" }).input(RegisterBatchInputSchema),
|
|
@@ -8086,18 +8167,18 @@ import { OpenAPILink as OpenAPILink23 } from "@orpc/openapi-client/fetch";
|
|
|
8086
8167
|
|
|
8087
8168
|
// src/orpc-client/tokens/contract.ts
|
|
8088
8169
|
import { oc as oc21 } from "@orpc/contract";
|
|
8089
|
-
import * as
|
|
8090
|
-
var GenerateTokenInputSchema =
|
|
8091
|
-
orgId:
|
|
8092
|
-
scope:
|
|
8170
|
+
import * as z36 from "zod";
|
|
8171
|
+
var GenerateTokenInputSchema = z36.object({
|
|
8172
|
+
orgId: z36.string(),
|
|
8173
|
+
scope: z36.string()
|
|
8093
8174
|
});
|
|
8094
|
-
var RevokeTokenInputSchema =
|
|
8095
|
-
orgId:
|
|
8096
|
-
tokenId:
|
|
8175
|
+
var RevokeTokenInputSchema = z36.object({
|
|
8176
|
+
orgId: z36.string(),
|
|
8177
|
+
tokenId: z36.string()
|
|
8097
8178
|
});
|
|
8098
|
-
var GenerateTokenOutputSchema =
|
|
8099
|
-
token:
|
|
8100
|
-
id:
|
|
8179
|
+
var GenerateTokenOutputSchema = z36.object({
|
|
8180
|
+
token: z36.string(),
|
|
8181
|
+
id: z36.string()
|
|
8101
8182
|
});
|
|
8102
8183
|
var tokensContract = {
|
|
8103
8184
|
generate: oc21.route({ method: "POST", path: "/generate" }).input(GenerateTokenInputSchema).output(GenerateTokenOutputSchema),
|
|
@@ -8155,24 +8236,24 @@ import { OpenAPILink as OpenAPILink24 } from "@orpc/openapi-client/fetch";
|
|
|
8155
8236
|
|
|
8156
8237
|
// src/orpc-client/docs/v1/write/contract.ts
|
|
8157
8238
|
import { oc as oc22 } from "@orpc/contract";
|
|
8158
|
-
import * as
|
|
8159
|
-
var StartDocsRegisterV1InputSchema =
|
|
8160
|
-
orgId:
|
|
8161
|
-
domain:
|
|
8162
|
-
filepaths:
|
|
8239
|
+
import * as z37 from "zod";
|
|
8240
|
+
var StartDocsRegisterV1InputSchema = z37.object({
|
|
8241
|
+
orgId: z37.string(),
|
|
8242
|
+
domain: z37.string(),
|
|
8243
|
+
filepaths: z37.array(z37.string())
|
|
8163
8244
|
});
|
|
8164
|
-
var StartDocsRegisterV1ResponseSchema =
|
|
8165
|
-
docsRegistrationId:
|
|
8166
|
-
uploadUrls:
|
|
8167
|
-
skippedFiles:
|
|
8245
|
+
var StartDocsRegisterV1ResponseSchema = z37.object({
|
|
8246
|
+
docsRegistrationId: z37.string(),
|
|
8247
|
+
uploadUrls: z37.record(z37.string(), FileS3UploadUrlSchema),
|
|
8248
|
+
skippedFiles: z37.array(z37.string())
|
|
8168
8249
|
});
|
|
8169
|
-
var FinishDocsRegisterV1InputSchema =
|
|
8170
|
-
docsRegistrationId:
|
|
8171
|
-
docsDefinition:
|
|
8250
|
+
var FinishDocsRegisterV1InputSchema = z37.object({
|
|
8251
|
+
docsRegistrationId: z37.string(),
|
|
8252
|
+
docsDefinition: z37.unknown()
|
|
8172
8253
|
});
|
|
8173
8254
|
var docsV1WriteContract = {
|
|
8174
8255
|
startDocsRegister: oc22.route({ method: "POST", path: "/init" }).input(StartDocsRegisterV1InputSchema).output(StartDocsRegisterV1ResponseSchema),
|
|
8175
|
-
finishDocsRegister: oc22.route({ method: "POST", path: "/register/{docsRegistrationId}" }).input(FinishDocsRegisterV1InputSchema).output(
|
|
8256
|
+
finishDocsRegister: oc22.route({ method: "POST", path: "/register/{docsRegistrationId}" }).input(FinishDocsRegisterV1InputSchema).output(z37.void())
|
|
8176
8257
|
};
|
|
8177
8258
|
|
|
8178
8259
|
// src/orpc-client/docs/v1/write/client.ts
|
|
@@ -8194,116 +8275,116 @@ import { OpenAPILink as OpenAPILink25 } from "@orpc/openapi-client/fetch";
|
|
|
8194
8275
|
|
|
8195
8276
|
// src/orpc-client/docs-anonymous/contract.ts
|
|
8196
8277
|
import { oc as oc23 } from "@orpc/contract";
|
|
8197
|
-
import * as
|
|
8198
|
-
var AnonymousDocsSiteLimitsSchema =
|
|
8199
|
-
maxPages:
|
|
8200
|
-
maxBytes:
|
|
8201
|
-
maxPublishes:
|
|
8278
|
+
import * as z38 from "zod";
|
|
8279
|
+
var AnonymousDocsSiteLimitsSchema = z38.object({
|
|
8280
|
+
maxPages: z38.number().int(),
|
|
8281
|
+
maxBytes: z38.number().int(),
|
|
8282
|
+
maxPublishes: z38.number().int()
|
|
8202
8283
|
});
|
|
8203
|
-
var CreateAnonymousDocsSiteInputSchema =
|
|
8284
|
+
var CreateAnonymousDocsSiteInputSchema = z38.object({
|
|
8204
8285
|
/** Publisher-chosen key; the same key returns the same live site. */
|
|
8205
|
-
idempotencyKey:
|
|
8286
|
+
idempotencyKey: z38.string().min(1).max(128).optional(),
|
|
8206
8287
|
/** With an existing site, issue a fresh publish token and invalidate the previous one. */
|
|
8207
|
-
rotateToken:
|
|
8288
|
+
rotateToken: z38.boolean().optional()
|
|
8208
8289
|
});
|
|
8209
|
-
var CreateAnonymousDocsSiteResponseSchema =
|
|
8210
|
-
siteId:
|
|
8211
|
-
orgId:
|
|
8212
|
-
domain:
|
|
8213
|
-
url:
|
|
8290
|
+
var CreateAnonymousDocsSiteResponseSchema = z38.object({
|
|
8291
|
+
siteId: z38.string(),
|
|
8292
|
+
orgId: z38.string(),
|
|
8293
|
+
domain: z38.string(),
|
|
8294
|
+
url: z38.string(),
|
|
8214
8295
|
/** `fern_anon_...` bearer, accepted only for `orgId` while the site is live and before `expiresAt`. Shown once; absent on an idempotent hit without `rotateToken`. */
|
|
8215
|
-
publishToken:
|
|
8296
|
+
publishToken: z38.string().optional(),
|
|
8216
8297
|
/** `https://<domain>/__fern/claim/<claim-token>`, single use. Shown once; absent on an idempotent hit. */
|
|
8217
|
-
claimUrl:
|
|
8218
|
-
expiresAt:
|
|
8298
|
+
claimUrl: z38.string().optional(),
|
|
8299
|
+
expiresAt: z38.string(),
|
|
8219
8300
|
limits: AnonymousDocsSiteLimitsSchema
|
|
8220
8301
|
});
|
|
8221
8302
|
var ANONYMOUS_DOCS_WORKER_SECRET_HEADER = "x-fern-drop-worker-secret";
|
|
8222
|
-
var ConsumeAnonymousClaimTokenInputSchema =
|
|
8223
|
-
claimToken:
|
|
8224
|
-
});
|
|
8225
|
-
var ConsumeAnonymousClaimTokenResponseSchema =
|
|
8226
|
-
siteId:
|
|
8227
|
-
domain:
|
|
8228
|
-
cookieSecret:
|
|
8229
|
-
expiresAt:
|
|
8230
|
-
});
|
|
8231
|
-
var CreateAnonymousClaimGrantInputSchema =
|
|
8232
|
-
siteId:
|
|
8233
|
-
cookieSecret:
|
|
8234
|
-
});
|
|
8235
|
-
var CreateAnonymousClaimGrantResponseSchema =
|
|
8236
|
-
grant:
|
|
8237
|
-
expiresAt:
|
|
8238
|
-
});
|
|
8239
|
-
var AnonymousClaimStatusSchema =
|
|
8240
|
-
var GetAnonymousClaimInputSchema =
|
|
8241
|
-
grant:
|
|
8242
|
-
});
|
|
8243
|
-
var GetAnonymousClaimResponseSchema =
|
|
8244
|
-
siteId:
|
|
8245
|
-
domain:
|
|
8246
|
-
createdAt:
|
|
8247
|
-
expiresAt:
|
|
8303
|
+
var ConsumeAnonymousClaimTokenInputSchema = z38.object({
|
|
8304
|
+
claimToken: z38.string().min(1)
|
|
8305
|
+
});
|
|
8306
|
+
var ConsumeAnonymousClaimTokenResponseSchema = z38.object({
|
|
8307
|
+
siteId: z38.string(),
|
|
8308
|
+
domain: z38.string(),
|
|
8309
|
+
cookieSecret: z38.string(),
|
|
8310
|
+
expiresAt: z38.string()
|
|
8311
|
+
});
|
|
8312
|
+
var CreateAnonymousClaimGrantInputSchema = z38.object({
|
|
8313
|
+
siteId: z38.string(),
|
|
8314
|
+
cookieSecret: z38.string().min(1)
|
|
8315
|
+
});
|
|
8316
|
+
var CreateAnonymousClaimGrantResponseSchema = z38.object({
|
|
8317
|
+
grant: z38.string(),
|
|
8318
|
+
expiresAt: z38.string()
|
|
8319
|
+
});
|
|
8320
|
+
var AnonymousClaimStatusSchema = z38.enum(["claimable", "expired", "claimed", "invalid"]);
|
|
8321
|
+
var GetAnonymousClaimInputSchema = z38.object({
|
|
8322
|
+
grant: z38.string()
|
|
8323
|
+
});
|
|
8324
|
+
var GetAnonymousClaimResponseSchema = z38.object({
|
|
8325
|
+
siteId: z38.string(),
|
|
8326
|
+
domain: z38.string(),
|
|
8327
|
+
createdAt: z38.string(),
|
|
8328
|
+
expiresAt: z38.string(),
|
|
8248
8329
|
status: AnonymousClaimStatusSchema,
|
|
8249
|
-
pageCount:
|
|
8250
|
-
claimedByOrgId:
|
|
8330
|
+
pageCount: z38.number().int(),
|
|
8331
|
+
claimedByOrgId: z38.string().optional()
|
|
8251
8332
|
});
|
|
8252
|
-
var ClaimAnonymousDocsSiteInputSchema =
|
|
8253
|
-
grant:
|
|
8254
|
-
toOrgId:
|
|
8333
|
+
var ClaimAnonymousDocsSiteInputSchema = z38.object({
|
|
8334
|
+
grant: z38.string(),
|
|
8335
|
+
toOrgId: z38.string(),
|
|
8255
8336
|
/**
|
|
8256
8337
|
* The `<name>.<docs suffix>` address the claimed site moves to, instead of keeping its
|
|
8257
8338
|
* `drop-<id>` host (a bare name is accepted too). Refused with `invalid_domain` (400) when it
|
|
8258
8339
|
* is not one label under the docs suffix or is a drop name, and `domain_taken` (409) when any
|
|
8259
8340
|
* site already uses it. The drop host redirects to the new address once it serves.
|
|
8260
8341
|
*/
|
|
8261
|
-
domain:
|
|
8342
|
+
domain: z38.string().optional()
|
|
8262
8343
|
});
|
|
8263
|
-
var ClaimAnonymousDocsSiteResponseSchema =
|
|
8264
|
-
siteId:
|
|
8265
|
-
domain:
|
|
8344
|
+
var ClaimAnonymousDocsSiteResponseSchema = z38.object({
|
|
8345
|
+
siteId: z38.string(),
|
|
8346
|
+
domain: z38.string(),
|
|
8266
8347
|
/** The drop host the site moved from, when the claim gave it a new address; it serves until `domain` does. */
|
|
8267
|
-
previousDomain:
|
|
8268
|
-
orgId:
|
|
8269
|
-
buildId:
|
|
8270
|
-
});
|
|
8271
|
-
var GetGuestDocsSiteInputSchema =
|
|
8272
|
-
orgId:
|
|
8273
|
-
});
|
|
8274
|
-
var GetGuestDocsSiteResponseSchema =
|
|
8275
|
-
siteId:
|
|
8276
|
-
orgId:
|
|
8277
|
-
domain:
|
|
8278
|
-
url:
|
|
8279
|
-
status:
|
|
8280
|
-
expiresAt:
|
|
8348
|
+
previousDomain: z38.string().optional(),
|
|
8349
|
+
orgId: z38.string(),
|
|
8350
|
+
buildId: z38.string()
|
|
8351
|
+
});
|
|
8352
|
+
var GetGuestDocsSiteInputSchema = z38.object({
|
|
8353
|
+
orgId: z38.string()
|
|
8354
|
+
});
|
|
8355
|
+
var GetGuestDocsSiteResponseSchema = z38.object({
|
|
8356
|
+
siteId: z38.string(),
|
|
8357
|
+
orgId: z38.string(),
|
|
8358
|
+
domain: z38.string(),
|
|
8359
|
+
url: z38.string(),
|
|
8360
|
+
status: z38.string(),
|
|
8361
|
+
expiresAt: z38.string(),
|
|
8281
8362
|
/** The claim link is returned by every docs-ledger `finish`, not here. */
|
|
8282
8363
|
limits: AnonymousDocsSiteLimitsSchema
|
|
8283
8364
|
});
|
|
8284
|
-
var RehomeGuestSessionInputSchema =
|
|
8365
|
+
var RehomeGuestSessionInputSchema = z38.object({
|
|
8285
8366
|
/** The session's `guest-<id>` organization, as the claim page shows it. */
|
|
8286
|
-
guestOrgId:
|
|
8367
|
+
guestOrgId: z38.string(),
|
|
8287
8368
|
/**
|
|
8288
8369
|
* The `<name>.<docs suffix>` address the session's published site takes instead of its
|
|
8289
8370
|
* `drop-<id>` host (a bare name is accepted too); same rules and errors as `claim`'s `domain`.
|
|
8290
8371
|
*/
|
|
8291
|
-
domain:
|
|
8372
|
+
domain: z38.string().optional()
|
|
8292
8373
|
});
|
|
8293
|
-
var RehomedGuestSiteSchema =
|
|
8294
|
-
siteId:
|
|
8295
|
-
domain:
|
|
8374
|
+
var RehomedGuestSiteSchema = z38.object({
|
|
8375
|
+
siteId: z38.string(),
|
|
8376
|
+
domain: z38.string(),
|
|
8296
8377
|
/** The drop host the site moved from, when it took a new address; it serves until `domain` does. */
|
|
8297
|
-
previousDomain:
|
|
8378
|
+
previousDomain: z38.string().optional(),
|
|
8298
8379
|
/** The build the site serves at `domain`; absent for a site that was never published. */
|
|
8299
|
-
buildId:
|
|
8380
|
+
buildId: z38.string().optional()
|
|
8300
8381
|
});
|
|
8301
|
-
var RehomeGuestSessionResponseSchema =
|
|
8302
|
-
sessionId:
|
|
8382
|
+
var RehomeGuestSessionResponseSchema = z38.object({
|
|
8383
|
+
sessionId: z38.string(),
|
|
8303
8384
|
/** Where the sites are now: the organization Venus says the session was claimed into. */
|
|
8304
|
-
orgId:
|
|
8385
|
+
orgId: z38.string(),
|
|
8305
8386
|
/** The sites moved by this call; empty when there was nothing (left) to move. */
|
|
8306
|
-
sites:
|
|
8387
|
+
sites: z38.array(RehomedGuestSiteSchema)
|
|
8307
8388
|
});
|
|
8308
8389
|
var docsAnonymousContract = {
|
|
8309
8390
|
getGuestSite: oc23.route({ method: "GET", path: "/anonymous/guest-site" }).input(GetGuestDocsSiteInputSchema).output(GetGuestDocsSiteResponseSchema),
|
|
@@ -8314,52 +8395,52 @@ var docsAnonymousContract = {
|
|
|
8314
8395
|
claim: oc23.route({ method: "POST", path: "/anonymous/claim" }).input(ClaimAnonymousDocsSiteInputSchema).output(ClaimAnonymousDocsSiteResponseSchema),
|
|
8315
8396
|
rehomeGuestSession: oc23.route({ method: "POST", path: "/anonymous/guest-session/rehome" }).input(RehomeGuestSessionInputSchema).output(RehomeGuestSessionResponseSchema)
|
|
8316
8397
|
};
|
|
8317
|
-
var AnonymousDocsConfigDocumentSchema =
|
|
8318
|
-
enabled:
|
|
8319
|
-
ttlSeconds:
|
|
8320
|
-
graceSeconds:
|
|
8321
|
-
claimGrantTtlSeconds:
|
|
8322
|
-
maxPages:
|
|
8323
|
-
maxBytes:
|
|
8324
|
-
maxPublishesPerSite:
|
|
8325
|
-
maxCreatesPerIpPerHour:
|
|
8326
|
-
maxCreatesPerHourGlobal:
|
|
8327
|
-
maxConcurrentBuilds:
|
|
8398
|
+
var AnonymousDocsConfigDocumentSchema = z38.object({
|
|
8399
|
+
enabled: z38.boolean(),
|
|
8400
|
+
ttlSeconds: z38.number().int(),
|
|
8401
|
+
graceSeconds: z38.number().int(),
|
|
8402
|
+
claimGrantTtlSeconds: z38.number().int(),
|
|
8403
|
+
maxPages: z38.number().int(),
|
|
8404
|
+
maxBytes: z38.number().int(),
|
|
8405
|
+
maxPublishesPerSite: z38.number().int(),
|
|
8406
|
+
maxCreatesPerIpPerHour: z38.number().int(),
|
|
8407
|
+
maxCreatesPerHourGlobal: z38.number().int(),
|
|
8408
|
+
maxConcurrentBuilds: z38.number().int()
|
|
8328
8409
|
}).strict();
|
|
8329
|
-
var AnonymousDocsConfigEnvironmentSchema =
|
|
8330
|
-
var GetAnonymousDocsConfigResponseSchema =
|
|
8410
|
+
var AnonymousDocsConfigEnvironmentSchema = z38.enum(["dev", "prod"]);
|
|
8411
|
+
var GetAnonymousDocsConfigResponseSchema = z38.object({
|
|
8331
8412
|
environment: AnonymousDocsConfigEnvironmentSchema,
|
|
8332
8413
|
/** The stored document (bootstrap or defaults while no row exists). */
|
|
8333
8414
|
config: AnonymousDocsConfigDocumentSchema,
|
|
8334
8415
|
/** What request paths see: `config` with the `ANONYMOUS_DOCS_DISABLED` emergency stop applied. */
|
|
8335
8416
|
effective: AnonymousDocsConfigDocumentSchema,
|
|
8336
8417
|
/** 0 until the first save; send it back as `If-Match` on PUT. */
|
|
8337
|
-
version:
|
|
8338
|
-
updatedBy:
|
|
8339
|
-
updatedAt:
|
|
8340
|
-
emergencyStopActive:
|
|
8341
|
-
source:
|
|
8418
|
+
version: z38.number().int(),
|
|
8419
|
+
updatedBy: z38.string().nullable(),
|
|
8420
|
+
updatedAt: z38.string().nullable(),
|
|
8421
|
+
emergencyStopActive: z38.boolean(),
|
|
8422
|
+
source: z38.enum(["database", "bootstrap", "defaults"])
|
|
8342
8423
|
});
|
|
8343
|
-
var UpdateAnonymousDocsConfigInputSchema =
|
|
8424
|
+
var UpdateAnonymousDocsConfigInputSchema = z38.object({
|
|
8344
8425
|
config: AnonymousDocsConfigDocumentSchema.partial(),
|
|
8345
8426
|
/** Email (or token id) of the operator making the change. */
|
|
8346
|
-
updatedBy:
|
|
8347
|
-
reason:
|
|
8427
|
+
updatedBy: z38.string().min(1),
|
|
8428
|
+
reason: z38.string().min(1)
|
|
8348
8429
|
});
|
|
8349
|
-
var AnonymousDocsConfigHistoryEntrySchema =
|
|
8350
|
-
id:
|
|
8430
|
+
var AnonymousDocsConfigHistoryEntrySchema = z38.object({
|
|
8431
|
+
id: z38.string(),
|
|
8351
8432
|
environment: AnonymousDocsConfigEnvironmentSchema,
|
|
8352
8433
|
config: AnonymousDocsConfigDocumentSchema,
|
|
8353
|
-
version:
|
|
8354
|
-
updatedBy:
|
|
8355
|
-
reason:
|
|
8356
|
-
createdAt:
|
|
8434
|
+
version: z38.number().int(),
|
|
8435
|
+
updatedBy: z38.string(),
|
|
8436
|
+
reason: z38.string(),
|
|
8437
|
+
createdAt: z38.string()
|
|
8357
8438
|
});
|
|
8358
|
-
var GetAnonymousDocsConfigHistoryInputSchema =
|
|
8359
|
-
limit:
|
|
8439
|
+
var GetAnonymousDocsConfigHistoryInputSchema = z38.object({
|
|
8440
|
+
limit: z38.coerce.number().int().min(1).max(500).optional()
|
|
8360
8441
|
});
|
|
8361
|
-
var GetAnonymousDocsConfigHistoryResponseSchema =
|
|
8362
|
-
entries:
|
|
8442
|
+
var GetAnonymousDocsConfigHistoryResponseSchema = z38.object({
|
|
8443
|
+
entries: z38.array(AnonymousDocsConfigHistoryEntrySchema)
|
|
8363
8444
|
});
|
|
8364
8445
|
var docsAnonymousAdminContract = {
|
|
8365
8446
|
getConfig: oc23.route({ method: "GET", path: "/config" }).output(GetAnonymousDocsConfigResponseSchema),
|
|
@@ -8392,7 +8473,7 @@ function createDocsAnonymousAdminClient(options) {
|
|
|
8392
8473
|
}
|
|
8393
8474
|
|
|
8394
8475
|
// src/orpc-client/docs-ledger/config-files.ts
|
|
8395
|
-
import * as
|
|
8476
|
+
import * as z39 from "zod";
|
|
8396
8477
|
var PATH_OR_URL_METADATA_KEYS = [
|
|
8397
8478
|
"og:image",
|
|
8398
8479
|
"og:logo",
|
|
@@ -8400,57 +8481,57 @@ var PATH_OR_URL_METADATA_KEYS = [
|
|
|
8400
8481
|
"og:background-image",
|
|
8401
8482
|
"og:dynamic:background-image"
|
|
8402
8483
|
];
|
|
8403
|
-
var LogoViewSchema =
|
|
8404
|
-
var ThemeViewSchema =
|
|
8484
|
+
var LogoViewSchema = z39.union([z39.string(), z39.object({ path: z39.string() }).transform((v) => v.path)]);
|
|
8485
|
+
var ThemeViewSchema = z39.object({
|
|
8405
8486
|
logo: LogoViewSchema.optional().catch(void 0),
|
|
8406
|
-
backgroundImage:
|
|
8487
|
+
backgroundImage: z39.string().optional().catch(void 0)
|
|
8407
8488
|
});
|
|
8408
|
-
var ColorsViewSchema =
|
|
8409
|
-
|
|
8410
|
-
type:
|
|
8489
|
+
var ColorsViewSchema = z39.union([
|
|
8490
|
+
z39.object({
|
|
8491
|
+
type: z39.literal("darkAndLight"),
|
|
8411
8492
|
dark: ThemeViewSchema.optional().catch(void 0),
|
|
8412
8493
|
light: ThemeViewSchema.optional().catch(void 0)
|
|
8413
8494
|
}),
|
|
8414
8495
|
ThemeViewSchema.transform((theme) => ({ type: "single", theme }))
|
|
8415
8496
|
]);
|
|
8416
|
-
var FontViewSchema =
|
|
8417
|
-
variants:
|
|
8497
|
+
var FontViewSchema = z39.object({
|
|
8498
|
+
variants: z39.array(z39.object({ fontFile: z39.string().optional().catch(void 0) })).catch([])
|
|
8418
8499
|
});
|
|
8419
|
-
var TypographyViewSchema =
|
|
8500
|
+
var TypographyViewSchema = z39.object({
|
|
8420
8501
|
headingsFont: FontViewSchema.optional().catch(void 0),
|
|
8421
8502
|
bodyFont: FontViewSchema.optional().catch(void 0),
|
|
8422
8503
|
codeFont: FontViewSchema.optional().catch(void 0)
|
|
8423
8504
|
});
|
|
8424
|
-
var JsFileViewSchema =
|
|
8425
|
-
|
|
8426
|
-
|
|
8505
|
+
var JsFileViewSchema = z39.union([
|
|
8506
|
+
z39.object({ path: z39.string() }).transform((v) => v.path),
|
|
8507
|
+
z39.object({ fileId: z39.string() }).transform((v) => v.fileId)
|
|
8427
8508
|
]);
|
|
8428
|
-
var MetadataFileRefViewSchema =
|
|
8429
|
-
type:
|
|
8430
|
-
value:
|
|
8509
|
+
var MetadataFileRefViewSchema = z39.object({
|
|
8510
|
+
type: z39.enum(["path", "fileId"]),
|
|
8511
|
+
value: z39.string()
|
|
8431
8512
|
});
|
|
8432
|
-
var ConfigViewSchema =
|
|
8433
|
-
favicon:
|
|
8513
|
+
var ConfigViewSchema = z39.object({
|
|
8514
|
+
favicon: z39.string().optional().catch(void 0),
|
|
8434
8515
|
colorsV3: ColorsViewSchema.optional().catch(void 0),
|
|
8435
8516
|
typographyV2: TypographyViewSchema.optional().catch(void 0),
|
|
8436
|
-
js:
|
|
8437
|
-
metadata:
|
|
8517
|
+
js: z39.object({ files: z39.array(JsFileViewSchema.optional().catch(void 0)).catch([]) }).optional().catch(void 0),
|
|
8518
|
+
metadata: z39.record(z39.string(), z39.unknown()).optional().catch(void 0)
|
|
8438
8519
|
});
|
|
8439
8520
|
function isDarkAndLight(colors) {
|
|
8440
8521
|
return colors.type === "darkAndLight";
|
|
8441
8522
|
}
|
|
8442
8523
|
var NAV_ICON_FILE_PREFIX = "file:";
|
|
8443
|
-
var FileTokenTreeSchema =
|
|
8444
|
-
() =>
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8524
|
+
var FileTokenTreeSchema = z39.lazy(
|
|
8525
|
+
() => z39.union([
|
|
8526
|
+
z39.string(),
|
|
8527
|
+
z39.number(),
|
|
8528
|
+
z39.boolean(),
|
|
8529
|
+
z39.null(),
|
|
8530
|
+
z39.array(FileTokenTreeSchema),
|
|
8531
|
+
z39.record(z39.string(), FileTokenTreeSchema)
|
|
8451
8532
|
])
|
|
8452
8533
|
);
|
|
8453
|
-
var ConfigFileTokenViewSchema =
|
|
8534
|
+
var ConfigFileTokenViewSchema = z39.object({
|
|
8454
8535
|
landingPage: FileTokenTreeSchema.optional().catch(void 0)
|
|
8455
8536
|
});
|
|
8456
8537
|
function addFileTokenPath(paths, value) {
|
|
@@ -8472,17 +8553,17 @@ function addFileTokenPath(paths, value) {
|
|
|
8472
8553
|
}
|
|
8473
8554
|
}
|
|
8474
8555
|
}
|
|
8475
|
-
var SegmentDetailIconViewSchema =
|
|
8476
|
-
icon:
|
|
8477
|
-
metadata:
|
|
8478
|
-
icon:
|
|
8479
|
-
image:
|
|
8556
|
+
var SegmentDetailIconViewSchema = z39.object({
|
|
8557
|
+
icon: z39.string().nullish().catch(void 0),
|
|
8558
|
+
metadata: z39.object({
|
|
8559
|
+
icon: z39.string().nullish().catch(void 0),
|
|
8560
|
+
image: z39.string().nullish().catch(void 0)
|
|
8480
8561
|
}).nullish().catch(void 0)
|
|
8481
8562
|
});
|
|
8482
|
-
var SegmentIconViewSchema =
|
|
8483
|
-
metadata:
|
|
8484
|
-
icon:
|
|
8485
|
-
image:
|
|
8563
|
+
var SegmentIconViewSchema = z39.object({
|
|
8564
|
+
metadata: z39.object({
|
|
8565
|
+
icon: z39.string().nullish().catch(void 0),
|
|
8566
|
+
image: z39.string().nullish().catch(void 0)
|
|
8486
8567
|
}).nullish().catch(void 0),
|
|
8487
8568
|
product: SegmentDetailIconViewSchema.nullish().catch(void 0),
|
|
8488
8569
|
version: SegmentDetailIconViewSchema.nullish().catch(void 0),
|
|
@@ -8566,22 +8647,22 @@ function collectConfigFilePaths(config) {
|
|
|
8566
8647
|
}
|
|
8567
8648
|
|
|
8568
8649
|
// src/orpc-client/docs-ledger/ledger-manifest.ts
|
|
8569
|
-
import * as
|
|
8650
|
+
import * as z40 from "zod";
|
|
8570
8651
|
var LEDGER_MANIFEST_SCHEMA_VERSION = "docsledger/20260601";
|
|
8571
8652
|
var LEDGER_SHARD_SCHEMA_VERSION = "docsledger/shard/20260601";
|
|
8572
|
-
var ManifestBlobRefSchema =
|
|
8573
|
-
hash:
|
|
8574
|
-
contentType:
|
|
8653
|
+
var ManifestBlobRefSchema = z40.object({
|
|
8654
|
+
hash: z40.string(),
|
|
8655
|
+
contentType: z40.string()
|
|
8575
8656
|
});
|
|
8576
|
-
var ManifestSegmentSchema =
|
|
8657
|
+
var ManifestSegmentSchema = z40.object({
|
|
8577
8658
|
/** Synthetic stable id (= segmentHash). */
|
|
8578
|
-
segmentId:
|
|
8579
|
-
segmentHash:
|
|
8580
|
-
section:
|
|
8581
|
-
locale:
|
|
8659
|
+
segmentId: z40.string(),
|
|
8660
|
+
segmentHash: z40.string(),
|
|
8661
|
+
section: z40.string(),
|
|
8662
|
+
locale: z40.string(),
|
|
8582
8663
|
/** Sidebar order across segments (docs_ledger_deployment_segments.sort_order). */
|
|
8583
|
-
sortOrder:
|
|
8584
|
-
hidden:
|
|
8664
|
+
sortOrder: z40.number(),
|
|
8665
|
+
hidden: z40.boolean(),
|
|
8585
8666
|
/** Segment type descriptor: { type, title, icon, apiDefinitionId, overviewPageId, pointsTo, ... }. */
|
|
8586
8667
|
metadata: LedgerSegmentMetadataSchema,
|
|
8587
8668
|
product: SegmentDetailSchema.nullable(),
|
|
@@ -8630,23 +8711,23 @@ function selectLedgerSegmentsForLocale(segments, locale, defaultLocale) {
|
|
|
8630
8711
|
return [...byIdentity.values()];
|
|
8631
8712
|
}
|
|
8632
8713
|
var ManifestNavRouteSchema = LedgerNavRouteSchema;
|
|
8633
|
-
var ManifestRouteBaseSchema =
|
|
8634
|
-
segmentHash:
|
|
8714
|
+
var ManifestRouteBaseSchema = z40.object({
|
|
8715
|
+
segmentHash: z40.string(),
|
|
8635
8716
|
/** Key into the containing route index's sidebars map. */
|
|
8636
|
-
sidebarKey:
|
|
8637
|
-
section:
|
|
8638
|
-
locale:
|
|
8639
|
-
artifactId:
|
|
8640
|
-
pageId:
|
|
8717
|
+
sidebarKey: z40.string().nullable(),
|
|
8718
|
+
section: z40.string(),
|
|
8719
|
+
locale: z40.string(),
|
|
8720
|
+
artifactId: z40.string(),
|
|
8721
|
+
pageId: z40.string().optional(),
|
|
8641
8722
|
/** CAS hash of the page content blob, or null for link/redirect artifacts. */
|
|
8642
|
-
contentHash:
|
|
8643
|
-
contentType:
|
|
8723
|
+
contentHash: z40.string().nullable(),
|
|
8724
|
+
contentType: z40.string().nullable(),
|
|
8644
8725
|
/** ISO-8601 timestamp of when this artifact's content version was first created.
|
|
8645
8726
|
* Populated at publish time from `docs_ledger_artifacts.created_at`. Optional
|
|
8646
8727
|
* for backward compatibility with manifests built before this field existed. */
|
|
8647
|
-
createdAt:
|
|
8728
|
+
createdAt: z40.string().optional()
|
|
8648
8729
|
});
|
|
8649
|
-
var ManifestRouteSchema =
|
|
8730
|
+
var ManifestRouteSchema = z40.discriminatedUnion("artifactType", [
|
|
8650
8731
|
artifactTypeVariant(ManifestRouteBaseSchema, "markdown"),
|
|
8651
8732
|
artifactTypeVariant(ManifestRouteBaseSchema, "page"),
|
|
8652
8733
|
artifactTypeVariant(ManifestRouteBaseSchema, "rest"),
|
|
@@ -8662,81 +8743,81 @@ var ManifestRouteSchema = z39.discriminatedUnion("artifactType", [
|
|
|
8662
8743
|
artifactTypeVariant(ManifestRouteBaseSchema, "image"),
|
|
8663
8744
|
artifactTypeVariant(ManifestRouteBaseSchema, "redirect")
|
|
8664
8745
|
]);
|
|
8665
|
-
var ManifestPageSchema =
|
|
8666
|
-
fullPath:
|
|
8667
|
-
segmentHash:
|
|
8668
|
-
contentHash:
|
|
8669
|
-
contentType:
|
|
8746
|
+
var ManifestPageSchema = z40.object({
|
|
8747
|
+
fullPath: z40.string().nullable(),
|
|
8748
|
+
segmentHash: z40.string(),
|
|
8749
|
+
contentHash: z40.string(),
|
|
8750
|
+
contentType: z40.string()
|
|
8670
8751
|
});
|
|
8671
|
-
var ManifestApiDefSchema =
|
|
8752
|
+
var ManifestApiDefSchema = z40.object({
|
|
8672
8753
|
/** CAS hash of the full API definition blob. */
|
|
8673
|
-
hash:
|
|
8674
|
-
contentType:
|
|
8754
|
+
hash: z40.string(),
|
|
8755
|
+
contentType: z40.string(),
|
|
8675
8756
|
/** key = `${nodeType}:${nodeId}` (e.g. `endpoint:abc`) → pruned CAS blob. */
|
|
8676
|
-
prunedHashes:
|
|
8677
|
-
});
|
|
8678
|
-
var ManifestFileSchema =
|
|
8679
|
-
type:
|
|
8680
|
-
contentType:
|
|
8681
|
-
contentLength:
|
|
8682
|
-
filename:
|
|
8683
|
-
hash:
|
|
8757
|
+
prunedHashes: z40.record(z40.string(), ManifestBlobRefSchema)
|
|
8758
|
+
});
|
|
8759
|
+
var ManifestFileSchema = z40.object({
|
|
8760
|
+
type: z40.enum(["file", "image"]),
|
|
8761
|
+
contentType: z40.string(),
|
|
8762
|
+
contentLength: z40.number().optional(),
|
|
8763
|
+
filename: z40.string(),
|
|
8764
|
+
hash: z40.string(),
|
|
8684
8765
|
/** Canonical fern domain the bytes were uploaded under (ADR 0010 file anchor). */
|
|
8685
|
-
domain:
|
|
8686
|
-
bucket:
|
|
8687
|
-
width:
|
|
8688
|
-
height:
|
|
8689
|
-
blurDataURL:
|
|
8766
|
+
domain: z40.string(),
|
|
8767
|
+
bucket: z40.enum(["public_docs", "private_docs"]),
|
|
8768
|
+
width: z40.number().optional(),
|
|
8769
|
+
height: z40.number().optional(),
|
|
8770
|
+
blurDataURL: z40.string().optional()
|
|
8690
8771
|
});
|
|
8691
|
-
var LedgerShardFileSchema =
|
|
8772
|
+
var LedgerShardFileSchema = z40.object({
|
|
8692
8773
|
/** SHA-256 hex of the file bytes (docs-bucket key component). */
|
|
8693
|
-
hash:
|
|
8774
|
+
hash: z40.string(),
|
|
8694
8775
|
/** Fern-host-relative path; equals the `file:<fullPath>` token's suffix. */
|
|
8695
|
-
fullPath:
|
|
8696
|
-
contentType:
|
|
8697
|
-
contentLength:
|
|
8698
|
-
width:
|
|
8699
|
-
height:
|
|
8700
|
-
blurDataURL:
|
|
8776
|
+
fullPath: z40.string(),
|
|
8777
|
+
contentType: z40.string(),
|
|
8778
|
+
contentLength: z40.number().optional(),
|
|
8779
|
+
width: z40.number().optional(),
|
|
8780
|
+
height: z40.number().optional(),
|
|
8781
|
+
blurDataURL: z40.string().optional(),
|
|
8701
8782
|
/**
|
|
8702
8783
|
* Per-file bucket override. Absent ⇒ derive from the pointer's `isPrivate`
|
|
8703
8784
|
* (`private_docs` when private, else `public_docs`). Present only for the
|
|
8704
8785
|
* rare file whose bucket diverges from the deployment default.
|
|
8705
8786
|
*/
|
|
8706
|
-
bucket:
|
|
8787
|
+
bucket: z40.enum(["public_docs", "private_docs"]).optional()
|
|
8707
8788
|
});
|
|
8708
|
-
var LedgerSiblingProductSchema =
|
|
8709
|
-
title:
|
|
8789
|
+
var LedgerSiblingProductSchema = z40.object({
|
|
8790
|
+
title: z40.string(),
|
|
8710
8791
|
/** Absolute href on the host (`/{basepath}/{slug}/`) or an external URL for product links. */
|
|
8711
|
-
href:
|
|
8712
|
-
subtitle:
|
|
8792
|
+
href: z40.string(),
|
|
8793
|
+
subtitle: z40.string().optional()
|
|
8713
8794
|
});
|
|
8714
|
-
var LedgerSiblingSiteSchema =
|
|
8795
|
+
var LedgerSiblingSiteSchema = z40.object({
|
|
8715
8796
|
/** Basepath without leading/trailing slash; "" for the root site. */
|
|
8716
|
-
basepath:
|
|
8797
|
+
basepath: z40.string(),
|
|
8717
8798
|
/** `config.title` of that site as of its last publish; null if unknown. */
|
|
8718
|
-
title:
|
|
8799
|
+
title: z40.string().nullable(),
|
|
8719
8800
|
/** Top-level products of that site as of its last publish; absent for sites published before products were snapshotted. */
|
|
8720
|
-
products:
|
|
8801
|
+
products: z40.array(LedgerSiblingProductSchema).optional()
|
|
8721
8802
|
});
|
|
8722
8803
|
var LedgerLocaleConfigOverrideSchema = LedgerConfigSchema.pick({
|
|
8723
8804
|
announcement: true,
|
|
8724
8805
|
navbarLinks: true,
|
|
8725
8806
|
settings: true
|
|
8726
8807
|
});
|
|
8727
|
-
var LedgerConfigBlobSchema =
|
|
8728
|
-
version:
|
|
8729
|
-
git:
|
|
8730
|
-
repoUrl:
|
|
8731
|
-
branch:
|
|
8732
|
-
commitSha:
|
|
8808
|
+
var LedgerConfigBlobSchema = z40.object({
|
|
8809
|
+
version: z40.string().nullable(),
|
|
8810
|
+
git: z40.object({
|
|
8811
|
+
repoUrl: z40.string(),
|
|
8812
|
+
branch: z40.string(),
|
|
8813
|
+
commitSha: z40.string().nullable().optional()
|
|
8733
8814
|
}).optional(),
|
|
8734
8815
|
/** Structural config with hot-path chrome text inlined for ADR 0016 page reads. */
|
|
8735
8816
|
config: LedgerConfigSchema.nullable(),
|
|
8736
8817
|
/** locale → overrides applied on top of `config` for non-default locales. Absent ⇒ every locale reads `config`. */
|
|
8737
|
-
localeConfigs:
|
|
8818
|
+
localeConfigs: z40.record(z40.string(), LedgerLocaleConfigOverrideSchema).optional(),
|
|
8738
8819
|
/** Large or legacy extracted config blobs. New manifests inline header/footer/css.inline/js.inline. */
|
|
8739
|
-
configRefs:
|
|
8820
|
+
configRefs: z40.object({
|
|
8740
8821
|
header: ManifestBlobRefSchema.optional(),
|
|
8741
8822
|
footer: ManifestBlobRefSchema.optional(),
|
|
8742
8823
|
cssInline: ManifestBlobRefSchema.optional(),
|
|
@@ -8744,43 +8825,43 @@ var LedgerConfigBlobSchema = z39.object({
|
|
|
8744
8825
|
jsFiles: ManifestBlobRefSchema.optional()
|
|
8745
8826
|
})
|
|
8746
8827
|
});
|
|
8747
|
-
var LedgerChromeBlobSchema =
|
|
8748
|
-
apiNameToId:
|
|
8828
|
+
var LedgerChromeBlobSchema = z40.object({
|
|
8829
|
+
apiNameToId: z40.record(z40.string(), z40.string())
|
|
8749
8830
|
});
|
|
8750
|
-
var LedgerSidebarBundleSchema =
|
|
8751
|
-
locale:
|
|
8752
|
-
segmentHash:
|
|
8753
|
-
routes:
|
|
8831
|
+
var LedgerSidebarBundleSchema = z40.object({
|
|
8832
|
+
locale: z40.string(),
|
|
8833
|
+
segmentHash: z40.string(),
|
|
8834
|
+
routes: z40.array(ManifestNavRouteSchema)
|
|
8754
8835
|
});
|
|
8755
|
-
var LedgerSidebarMapEntrySchema =
|
|
8836
|
+
var LedgerSidebarMapEntrySchema = z40.discriminatedUnion("strategy", [
|
|
8756
8837
|
LedgerSidebarBundleSchema.extend({
|
|
8757
|
-
strategy:
|
|
8838
|
+
strategy: z40.literal("inline")
|
|
8758
8839
|
}),
|
|
8759
8840
|
ManifestBlobRefSchema.extend({
|
|
8760
|
-
strategy:
|
|
8841
|
+
strategy: z40.literal("ref")
|
|
8761
8842
|
})
|
|
8762
8843
|
]);
|
|
8763
|
-
var LedgerLocaleIndexSchema =
|
|
8764
|
-
locale:
|
|
8765
|
-
segments:
|
|
8844
|
+
var LedgerLocaleIndexSchema = z40.object({
|
|
8845
|
+
locale: z40.string(),
|
|
8846
|
+
segments: z40.array(ManifestSegmentSchema),
|
|
8766
8847
|
/** sidebarKey → inline sidebar routes, or a CAS ref when over budget. */
|
|
8767
|
-
sidebars:
|
|
8848
|
+
sidebars: z40.record(z40.string(), LedgerSidebarMapEntrySchema),
|
|
8768
8849
|
/** fullPath → route for this effective locale. */
|
|
8769
|
-
routes:
|
|
8850
|
+
routes: z40.record(z40.string(), ManifestRouteSchema),
|
|
8770
8851
|
/** pageId → page content reference for this effective locale. */
|
|
8771
|
-
pages:
|
|
8852
|
+
pages: z40.record(z40.string(), ManifestPageSchema),
|
|
8772
8853
|
/** apiDefinitionId → full + pruned API definition blobs. */
|
|
8773
|
-
apiDefs:
|
|
8854
|
+
apiDefs: z40.record(z40.string(), ManifestApiDefSchema),
|
|
8774
8855
|
/** fullPath → file/image artifact metadata. */
|
|
8775
|
-
files:
|
|
8856
|
+
files: z40.record(z40.string(), ManifestFileSchema)
|
|
8776
8857
|
});
|
|
8777
|
-
var LedgerRouteShardSchema =
|
|
8778
|
-
schema:
|
|
8779
|
-
locale:
|
|
8858
|
+
var LedgerRouteShardSchema = z40.object({
|
|
8859
|
+
schema: z40.literal(LEDGER_SHARD_SCHEMA_VERSION),
|
|
8860
|
+
locale: z40.string(),
|
|
8780
8861
|
/** fullPath → route for the scopes packed into this shard. */
|
|
8781
|
-
routes:
|
|
8862
|
+
routes: z40.record(z40.string(), ManifestRouteSchema),
|
|
8782
8863
|
/** segmentHash → inline sidebar (or CAS ref) for every segment in this shard's scopes. */
|
|
8783
|
-
sidebars:
|
|
8864
|
+
sidebars: z40.record(z40.string(), LedgerSidebarMapEntrySchema),
|
|
8784
8865
|
/**
|
|
8785
8866
|
* fileFullPath → lean file identity for every file/image referenced by a
|
|
8786
8867
|
* page routed into this shard (ADR 0016, "File metadata on the render
|
|
@@ -8789,32 +8870,32 @@ var LedgerRouteShardSchema = z39.object({
|
|
|
8789
8870
|
* existed or with no embedded files; the bundle then falls back to the
|
|
8790
8871
|
* pointer's `files` map (`fileMetadata`/`fileArtifact`).
|
|
8791
8872
|
*/
|
|
8792
|
-
files:
|
|
8873
|
+
files: z40.record(z40.string(), LedgerShardFileSchema).optional()
|
|
8793
8874
|
});
|
|
8794
|
-
var LedgerPagesBlobSchema =
|
|
8875
|
+
var LedgerPagesBlobSchema = z40.record(z40.string(), ManifestPageSchema);
|
|
8795
8876
|
var LedgerPointerSegmentSchema = ManifestSegmentSchema.omit({ product: true, version: true }).extend({
|
|
8796
8877
|
/** Index into the locale's `productCatalog`, or null when the segment has no product. */
|
|
8797
|
-
productIdx:
|
|
8878
|
+
productIdx: z40.number().nullable(),
|
|
8798
8879
|
/** Index into the locale's `versionCatalog`, or null when the segment has no version. */
|
|
8799
|
-
versionIdx:
|
|
8880
|
+
versionIdx: z40.number().nullable()
|
|
8800
8881
|
});
|
|
8801
|
-
var LedgerLocaleRoutingSchema =
|
|
8882
|
+
var LedgerLocaleRoutingSchema = z40.object({
|
|
8802
8883
|
/** Compact segments catalog for the switcher chrome (product/version by index). */
|
|
8803
|
-
segments:
|
|
8884
|
+
segments: z40.array(LedgerPointerSegmentSchema),
|
|
8804
8885
|
/** Deduplicated product details; `LedgerPointerSegment.productIdx` indexes into this. */
|
|
8805
|
-
productCatalog:
|
|
8886
|
+
productCatalog: z40.array(SegmentDetailSchema),
|
|
8806
8887
|
/** Deduplicated version details; `LedgerPointerSegment.versionIdx` indexes into this. */
|
|
8807
|
-
versionCatalog:
|
|
8888
|
+
versionCatalog: z40.array(SegmentDetailSchema),
|
|
8808
8889
|
/** fullPath → index into `shards`. */
|
|
8809
|
-
routing:
|
|
8890
|
+
routing: z40.record(z40.string(), z40.number()),
|
|
8810
8891
|
/** segmentHash → index into `shards`. */
|
|
8811
|
-
segmentShard:
|
|
8892
|
+
segmentShard: z40.record(z40.string(), z40.number()),
|
|
8812
8893
|
/** Ordered list of route shards; index matches `routing`/`segmentShard`. */
|
|
8813
|
-
shards:
|
|
8894
|
+
shards: z40.array(z40.object({ hash: z40.string() })),
|
|
8814
8895
|
/** versionId → first routable fullPath (version switcher). */
|
|
8815
|
-
versionFirstRoute:
|
|
8896
|
+
versionFirstRoute: z40.record(z40.string(), z40.string()),
|
|
8816
8897
|
/** CAS hash of the per-locale pages blob. */
|
|
8817
|
-
pagesHash:
|
|
8898
|
+
pagesHash: z40.string(),
|
|
8818
8899
|
/**
|
|
8819
8900
|
* fullPath → file/image artifact metadata for files NOT materialised into
|
|
8820
8901
|
* a route shard (ADR 0016, "File metadata on the render path"): config
|
|
@@ -8823,31 +8904,31 @@ var LedgerLocaleRoutingSchema = z39.object({
|
|
|
8823
8904
|
* Page-body images are pruned from here and live in their route shard's
|
|
8824
8905
|
* `files` map instead. Read via `fileMetadata` / `fileArtifact`.
|
|
8825
8906
|
*/
|
|
8826
|
-
files:
|
|
8907
|
+
files: z40.record(z40.string(), ManifestFileSchema),
|
|
8827
8908
|
/** apiDefinitionId → full + pruned API definition blobs. */
|
|
8828
|
-
apiDefs:
|
|
8909
|
+
apiDefs: z40.record(z40.string(), ManifestApiDefSchema)
|
|
8829
8910
|
});
|
|
8830
|
-
var LedgerManifestSchema =
|
|
8831
|
-
schema:
|
|
8911
|
+
var LedgerManifestSchema = z40.object({
|
|
8912
|
+
schema: z40.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
|
|
8832
8913
|
// ── Pointer / current-version fields ──────────────────────────────
|
|
8833
|
-
orgId:
|
|
8834
|
-
domain:
|
|
8835
|
-
basepath:
|
|
8836
|
-
deploymentId:
|
|
8837
|
-
deploymentHash:
|
|
8838
|
-
siteId:
|
|
8914
|
+
orgId: z40.string(),
|
|
8915
|
+
domain: z40.string(),
|
|
8916
|
+
basepath: z40.string(),
|
|
8917
|
+
deploymentId: z40.string(),
|
|
8918
|
+
deploymentHash: z40.string(),
|
|
8919
|
+
siteId: z40.string(),
|
|
8839
8920
|
/** ISO-8601 timestamp the publish became live (request time). */
|
|
8840
|
-
assignedAt:
|
|
8841
|
-
assignedBy:
|
|
8842
|
-
isPreview:
|
|
8843
|
-
isPrivate:
|
|
8921
|
+
assignedAt: z40.string(),
|
|
8922
|
+
assignedBy: z40.string().nullable(),
|
|
8923
|
+
isPreview: z40.boolean(),
|
|
8924
|
+
isPrivate: z40.boolean(),
|
|
8844
8925
|
/**
|
|
8845
8926
|
* Whether Ask AI is enabled for this URL, snapshotted from FAI's settings at
|
|
8846
8927
|
* publish time so the static build renders Ask AI chrome without asking FAI
|
|
8847
8928
|
* itself. Absent on pointers written before the field existed (or when the
|
|
8848
8929
|
* lookup failed); readers then fall back to querying FAI.
|
|
8849
8930
|
*/
|
|
8850
|
-
askAiEnabled:
|
|
8931
|
+
askAiEnabled: z40.boolean().optional(),
|
|
8851
8932
|
/**
|
|
8852
8933
|
* Every live site on this host (including this one and the root site, if
|
|
8853
8934
|
* any), snapshotted from the registry at publish time so the fleet site
|
|
@@ -8856,16 +8937,16 @@ var LedgerManifestSchema = z39.object({
|
|
|
8856
8937
|
* Publish-time snapshot: a newly added sibling appears here after this
|
|
8857
8938
|
* site's next publish.
|
|
8858
8939
|
*/
|
|
8859
|
-
siblingSites:
|
|
8940
|
+
siblingSites: z40.array(LedgerSiblingSiteSchema).optional(),
|
|
8860
8941
|
/**
|
|
8861
8942
|
* Every hostname this publish is served on (the fern URL plus its
|
|
8862
8943
|
* `customDomains`), so the runtime knows which hosts form one site (e.g.
|
|
8863
8944
|
* whether analytics cookies must be shared across sibling subdomains).
|
|
8864
8945
|
* Absent on pointers written before the field existed.
|
|
8865
8946
|
*/
|
|
8866
|
-
siteHosts:
|
|
8947
|
+
siteHosts: z40.array(z40.string()).optional(),
|
|
8867
8948
|
/** Default locale for the deployment — read-path fallback when a translation is absent. */
|
|
8868
|
-
defaultLocale:
|
|
8949
|
+
defaultLocale: z40.string(),
|
|
8869
8950
|
/**
|
|
8870
8951
|
* Canonical fern domain all file bytes are anchored under (ADR 0010). The
|
|
8871
8952
|
* read client builds the public `/_files/{fileAnchorDomain}/{hash}/{fullPath}`
|
|
@@ -8874,19 +8955,19 @@ var LedgerManifestSchema = z39.object({
|
|
|
8874
8955
|
* written before shard-side files; absent ⇒ the client falls back to the
|
|
8875
8956
|
* pointer `files` map (which still carries per-file `domain`).
|
|
8876
8957
|
*/
|
|
8877
|
-
fileAnchorDomain:
|
|
8958
|
+
fileAnchorDomain: z40.string().optional(),
|
|
8878
8959
|
config: LedgerConfigBlobSchema,
|
|
8879
8960
|
chrome: LedgerChromeBlobSchema,
|
|
8880
|
-
locales:
|
|
8881
|
-
});
|
|
8882
|
-
var LedgerSiteArtifactSchema =
|
|
8883
|
-
|
|
8884
|
-
schema:
|
|
8885
|
-
unpublished:
|
|
8886
|
-
orgId:
|
|
8887
|
-
domain:
|
|
8888
|
-
basepath:
|
|
8889
|
-
isPreview:
|
|
8961
|
+
locales: z40.record(z40.string(), LedgerLocaleRoutingSchema)
|
|
8962
|
+
});
|
|
8963
|
+
var LedgerSiteArtifactSchema = z40.union([
|
|
8964
|
+
z40.object({
|
|
8965
|
+
schema: z40.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
|
|
8966
|
+
unpublished: z40.literal(true),
|
|
8967
|
+
orgId: z40.string(),
|
|
8968
|
+
domain: z40.string(),
|
|
8969
|
+
basepath: z40.string(),
|
|
8970
|
+
isPreview: z40.boolean()
|
|
8890
8971
|
}),
|
|
8891
8972
|
LedgerManifestSchema
|
|
8892
8973
|
]);
|
|
@@ -8943,26 +9024,26 @@ function keepsExportFile(path, format) {
|
|
|
8943
9024
|
|
|
8944
9025
|
// src/orpc-client/files/contract.ts
|
|
8945
9026
|
import { oc as oc24 } from "@orpc/contract";
|
|
8946
|
-
import * as
|
|
8947
|
-
var PutContentInputSchema =
|
|
8948
|
-
contentType:
|
|
8949
|
-
contentLength:
|
|
9027
|
+
import * as z41 from "zod";
|
|
9028
|
+
var PutContentInputSchema = z41.object({
|
|
9029
|
+
contentType: z41.string(),
|
|
9030
|
+
contentLength: z41.number().int().positive()
|
|
8950
9031
|
});
|
|
8951
|
-
var PutContentResponseSchema =
|
|
9032
|
+
var PutContentResponseSchema = z41.discriminatedUnion("status", [
|
|
8952
9033
|
/** Content already exists in storage — client can skip the S3 upload. */
|
|
8953
|
-
|
|
9034
|
+
z41.object({ status: z41.literal("exists") }),
|
|
8954
9035
|
/** Content is new — client should PUT the file bytes to uploadUrl, then call PUT /files. */
|
|
8955
|
-
|
|
9036
|
+
z41.object({ status: z41.literal("upload_required"), uploadUrl: z41.string() })
|
|
8956
9037
|
]);
|
|
8957
|
-
var PutFileInputSchema =
|
|
8958
|
-
hash:
|
|
8959
|
-
contentType:
|
|
9038
|
+
var PutFileInputSchema = z41.object({
|
|
9039
|
+
hash: z41.string(),
|
|
9040
|
+
contentType: z41.string()
|
|
8960
9041
|
});
|
|
8961
|
-
var FileResponseSchema =
|
|
9042
|
+
var FileResponseSchema = z41.object({
|
|
8962
9043
|
/** SHA-256 hex digest of the file content (64 characters). */
|
|
8963
|
-
hash:
|
|
9044
|
+
hash: z41.string(),
|
|
8964
9045
|
/** Presigned S3 GET URL. TTL is configurable (default 3600 seconds). */
|
|
8965
|
-
downloadUrl:
|
|
9046
|
+
downloadUrl: z41.string()
|
|
8966
9047
|
});
|
|
8967
9048
|
var contentContract = {
|
|
8968
9049
|
/**
|
|
@@ -9092,23 +9173,23 @@ var KV_KEY_PREFIXES_DEPLOY = [KV_KEY_PREFIX_ORG, KV_KEY_PREFIX_CONFIG, KV_KEY_PR
|
|
|
9092
9173
|
var KV_KEY_PREFIXES_ALL = [...KV_KEY_PREFIXES_DEPLOY, KV_KEY_PREFIX_PAUSED];
|
|
9093
9174
|
|
|
9094
9175
|
// src/orpc-client/org-config/contract.ts
|
|
9095
|
-
import * as
|
|
9176
|
+
import * as z42 from "zod";
|
|
9096
9177
|
var SEMVER_RE = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z-.]+)?(?:\+[0-9A-Za-z-.]+)?$/;
|
|
9097
|
-
var UpsertOrgConfigBodySchema =
|
|
9178
|
+
var UpsertOrgConfigBodySchema = z42.object({
|
|
9098
9179
|
// A semver string sets the bound; `null` clears it; omitting leaves it unchanged.
|
|
9099
|
-
cliVersionMin:
|
|
9100
|
-
cliVersionMax:
|
|
9180
|
+
cliVersionMin: z42.union([z42.string().regex(SEMVER_RE, "cliVersionMin must be a valid semver (e.g. 5.45.0)"), z42.null()]).optional(),
|
|
9181
|
+
cliVersionMax: z42.union([z42.string().regex(SEMVER_RE, "cliVersionMax must be a valid semver (e.g. 5.45.0)"), z42.null()]).optional()
|
|
9101
9182
|
});
|
|
9102
|
-
var OrgConfigResponseSchema =
|
|
9103
|
-
orgId:
|
|
9104
|
-
cliVersionMin:
|
|
9105
|
-
cliVersionMax:
|
|
9183
|
+
var OrgConfigResponseSchema = z42.object({
|
|
9184
|
+
orgId: z42.string(),
|
|
9185
|
+
cliVersionMin: z42.string().optional(),
|
|
9186
|
+
cliVersionMax: z42.string().optional(),
|
|
9106
9187
|
// Absent when no config has been stored for the org yet.
|
|
9107
|
-
updatedAt:
|
|
9188
|
+
updatedAt: z42.string().optional()
|
|
9108
9189
|
});
|
|
9109
9190
|
|
|
9110
9191
|
// src/orpc-client/themes/contract.ts
|
|
9111
|
-
import * as
|
|
9192
|
+
import * as z43 from "zod";
|
|
9112
9193
|
var FERN_FILE_REF_KEY = "hash";
|
|
9113
9194
|
var SHA256_RE = /^[0-9a-f]{64}$/;
|
|
9114
9195
|
function isFernFileRef(value) {
|
|
@@ -9123,37 +9204,37 @@ function isFernFileRef(value) {
|
|
|
9123
9204
|
return typeof hash === "string" && SHA256_RE.test(hash);
|
|
9124
9205
|
}
|
|
9125
9206
|
var THEME_NAME_RE = /^[a-zA-Z0-9_-]{1,64}$/;
|
|
9126
|
-
var ThemeResponseSchema =
|
|
9127
|
-
id:
|
|
9128
|
-
orgId:
|
|
9129
|
-
name:
|
|
9130
|
-
config:
|
|
9207
|
+
var ThemeResponseSchema = z43.object({
|
|
9208
|
+
id: z43.string(),
|
|
9209
|
+
orgId: z43.string(),
|
|
9210
|
+
name: z43.string(),
|
|
9211
|
+
config: z43.unknown(),
|
|
9131
9212
|
/** True when the theme has a ledger form, so FDR can merge it into sites server-side. */
|
|
9132
|
-
hasLedger:
|
|
9133
|
-
updatedAt:
|
|
9213
|
+
hasLedger: z43.boolean(),
|
|
9214
|
+
updatedAt: z43.string()
|
|
9134
9215
|
// ISO 8601 timestamp
|
|
9135
9216
|
});
|
|
9136
|
-
var ThemeListItemSchema =
|
|
9137
|
-
id:
|
|
9138
|
-
orgId:
|
|
9139
|
-
name:
|
|
9140
|
-
updatedAt:
|
|
9217
|
+
var ThemeListItemSchema = z43.object({
|
|
9218
|
+
id: z43.string(),
|
|
9219
|
+
orgId: z43.string(),
|
|
9220
|
+
name: z43.string(),
|
|
9221
|
+
updatedAt: z43.string()
|
|
9141
9222
|
});
|
|
9142
|
-
var ThemeListResponseSchema =
|
|
9143
|
-
themes:
|
|
9223
|
+
var ThemeListResponseSchema = z43.object({
|
|
9224
|
+
themes: z43.array(ThemeListItemSchema)
|
|
9144
9225
|
});
|
|
9145
|
-
var UpsertThemeBodySchema =
|
|
9146
|
-
name:
|
|
9147
|
-
config:
|
|
9226
|
+
var UpsertThemeBodySchema = z43.object({
|
|
9227
|
+
name: z43.string().min(1).max(64).regex(THEME_NAME_RE, "Theme name may only contain letters, digits, hyphens, and underscores"),
|
|
9228
|
+
config: z43.unknown(),
|
|
9148
9229
|
/**
|
|
9149
9230
|
* The same theme converted by the CLI to ledger config. Required for FDR to
|
|
9150
9231
|
* merge the theme into sites server-side; themes uploaded without it only
|
|
9151
9232
|
* apply through CLI-side stitching.
|
|
9152
9233
|
*/
|
|
9153
|
-
ledger:
|
|
9234
|
+
ledger: z43.object({
|
|
9154
9235
|
config: LedgerConfigSchema.partial(),
|
|
9155
9236
|
/** Theme assets by fullPath. `hash` points at bytes in the org's CAS. */
|
|
9156
|
-
files:
|
|
9237
|
+
files: z43.record(z43.string(), FileManifestEntrySchema).default({})
|
|
9157
9238
|
}).optional()
|
|
9158
9239
|
});
|
|
9159
9240
|
export {
|
|
@@ -9241,6 +9322,7 @@ export {
|
|
|
9241
9322
|
CustomHostnameSchema,
|
|
9242
9323
|
CustomHostnameTxtRecordSchema,
|
|
9243
9324
|
CustomSnippetPayloadSchema,
|
|
9325
|
+
DEFAULT_MCP_ORG_QUOTA,
|
|
9244
9326
|
DOXYFILE_ALLOWED_KEYS,
|
|
9245
9327
|
DashboardAnalyticsCommonInputSchema,
|
|
9246
9328
|
DashboardDocsSiteSchema,
|
|
@@ -9402,6 +9484,7 @@ export {
|
|
|
9402
9484
|
GetMcpServerBrandingInputSchema,
|
|
9403
9485
|
GetMcpServerBrandingResponseSchema,
|
|
9404
9486
|
GetMcpServerInputSchema,
|
|
9487
|
+
GetMcpUsageInputSchema,
|
|
9405
9488
|
GetMinCliForIrInputSchema,
|
|
9406
9489
|
GetOrganizationForUrlInputSchema,
|
|
9407
9490
|
GetPdfExportDownloadUrlInputSchema,
|
|
@@ -9459,6 +9542,7 @@ export {
|
|
|
9459
9542
|
KV_KEY_PREFIX_META,
|
|
9460
9543
|
KV_KEY_PREFIX_ORG,
|
|
9461
9544
|
KV_KEY_PREFIX_PAUSED,
|
|
9545
|
+
KV_KEY_PREFIX_QUOTA,
|
|
9462
9546
|
LEDGER_ARTIFACT_METADATA_SCHEMAS,
|
|
9463
9547
|
LEDGER_MANIFEST_SCHEMA_VERSION,
|
|
9464
9548
|
LEDGER_SHARD_SCHEMA_VERSION,
|
|
@@ -9602,8 +9686,11 @@ export {
|
|
|
9602
9686
|
MCP_CONFIG_MAX_BYTES,
|
|
9603
9687
|
MCP_CONNECT_PAGE_DEFAULT_ACCENT,
|
|
9604
9688
|
MCP_EXCHANGE_SECRET_MAX_LENGTH,
|
|
9689
|
+
MCP_FREE_TOOL_CALLS_PER_MONTH,
|
|
9605
9690
|
MCP_IP_ALLOW_LIST_MAX_ENTRIES,
|
|
9606
9691
|
MCP_METADATA_MAX_BYTES,
|
|
9692
|
+
MCP_QUOTA_EXCEEDED_CODE,
|
|
9693
|
+
MCP_SALES_CONTACT_URL,
|
|
9607
9694
|
MCP_TOOL_ROLES_MAX_BYTES,
|
|
9608
9695
|
ManifestApiDefSchema,
|
|
9609
9696
|
ManifestBlobRefSchema,
|
|
@@ -9640,6 +9727,8 @@ export {
|
|
|
9640
9727
|
McpIpAllowListSchema,
|
|
9641
9728
|
McpMetadataSchema,
|
|
9642
9729
|
McpModuleSchema,
|
|
9730
|
+
McpOrgQuotaSchema,
|
|
9731
|
+
McpOrgUsageSchema,
|
|
9643
9732
|
McpServerAuthFieldsSchema,
|
|
9644
9733
|
McpServerAuthSchema,
|
|
9645
9734
|
McpServerAuthSettingsSchema,
|
|
@@ -9652,6 +9741,7 @@ export {
|
|
|
9652
9741
|
McpToolRoleRuleSchema,
|
|
9653
9742
|
McpToolRolesSchema,
|
|
9654
9743
|
McpToolSchema,
|
|
9744
|
+
McpUsageCountsSchema,
|
|
9655
9745
|
MigrateV2SiteInputSchema,
|
|
9656
9746
|
MigrateV2SiteResponseSchema,
|
|
9657
9747
|
MigrateV2SiteSkipReasonSchema,
|
|
@@ -9825,6 +9915,7 @@ export {
|
|
|
9825
9915
|
SetMcpCustomDomainInputSchema,
|
|
9826
9916
|
SetMcpServerExchangeSecretInputSchema,
|
|
9827
9917
|
SetMcpServerIpAllowListInputSchema,
|
|
9918
|
+
SetMcpUsageAllowanceInputSchema,
|
|
9828
9919
|
SetSnapshotInputSchema,
|
|
9829
9920
|
Sha256Schema,
|
|
9830
9921
|
SiteConfigResponseSchema,
|
|
@@ -9893,6 +9984,7 @@ export {
|
|
|
9893
9984
|
UpsertThemeBodySchema,
|
|
9894
9985
|
Url,
|
|
9895
9986
|
UrlSchema,
|
|
9987
|
+
UsageMonthSchema,
|
|
9896
9988
|
UuidTypeSchema,
|
|
9897
9989
|
VersionBumpEnumSchema,
|
|
9898
9990
|
VersionId,
|
|
@@ -9996,6 +10088,7 @@ export {
|
|
|
9996
10088
|
libraryDocsContract,
|
|
9997
10089
|
mcpAnalyticsIndex,
|
|
9998
10090
|
mcpHostingContract,
|
|
10091
|
+
mcpSalesContactUrl,
|
|
9999
10092
|
mcpServerAuthChecks,
|
|
10000
10093
|
normalizeCidr,
|
|
10001
10094
|
normalizeCustomDomain,
|
|
@@ -10015,6 +10108,8 @@ export {
|
|
|
10015
10108
|
tokensContract,
|
|
10016
10109
|
toolCountFromParsed,
|
|
10017
10110
|
toolCountFromStored,
|
|
10111
|
+
usageMonth,
|
|
10112
|
+
usageMonthResetsAt,
|
|
10018
10113
|
validateCustomDomain,
|
|
10019
10114
|
validateDoxyfileContent
|
|
10020
10115
|
};
|