@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.
Files changed (43) hide show
  1. package/dist/js/client/FdrClient.js +366 -303
  2. package/dist/js/client/FdrClient.js.map +1 -1
  3. package/dist/js/client/FdrClient.mjs +366 -303
  4. package/dist/js/client/FdrClient.mjs.map +1 -1
  5. package/dist/js/index.js +641 -578
  6. package/dist/js/index.js.map +1 -1
  7. package/dist/js/index.mjs +641 -578
  8. package/dist/js/index.mjs.map +1 -1
  9. package/dist/js/orpc-client/dashboard/sdkVersion.js +3 -1
  10. package/dist/js/orpc-client/dashboard/sdkVersion.js.map +1 -1
  11. package/dist/js/orpc-client/dashboard/sdkVersion.mjs +3 -1
  12. package/dist/js/orpc-client/dashboard/sdkVersion.mjs.map +1 -1
  13. package/dist/js/orpc-client.js +743 -634
  14. package/dist/js/orpc-client.js.map +1 -1
  15. package/dist/js/orpc-client.mjs +729 -634
  16. package/dist/js/orpc-client.mjs.map +1 -1
  17. package/dist/orpc-client/dashboard/sdkVersion.d.ts +3 -1
  18. package/dist/orpc-client/dashboard/sdkVersion.d.ts.map +1 -1
  19. package/dist/orpc-client/dashboard/sdkVersion.js +6 -2
  20. package/dist/orpc-client/dashboard/sdkVersion.js.map +1 -1
  21. package/dist/orpc-client/dashboard/sdkVersion.test.js +5 -1
  22. package/dist/orpc-client/dashboard/sdkVersion.test.js.map +1 -1
  23. package/dist/orpc-client/mcp-hosting/contract.d.ts +138 -0
  24. package/dist/orpc-client/mcp-hosting/contract.d.ts.map +1 -1
  25. package/dist/orpc-client/mcp-hosting/contract.js +17 -1
  26. package/dist/orpc-client/mcp-hosting/contract.js.map +1 -1
  27. package/dist/orpc-client/mcp-hosting/index.d.ts +1 -0
  28. package/dist/orpc-client/mcp-hosting/index.d.ts.map +1 -1
  29. package/dist/orpc-client/mcp-hosting/index.js +1 -0
  30. package/dist/orpc-client/mcp-hosting/index.js.map +1 -1
  31. package/dist/orpc-client/mcp-hosting/usage.d.ts +194 -0
  32. package/dist/orpc-client/mcp-hosting/usage.d.ts.map +1 -0
  33. package/dist/orpc-client/mcp-hosting/usage.js +116 -0
  34. package/dist/orpc-client/mcp-hosting/usage.js.map +1 -0
  35. package/dist/types/orpc-client/dashboard/sdkVersion.d.ts +3 -1
  36. package/dist/types/orpc-client/dashboard/sdkVersion.d.ts.map +1 -1
  37. package/dist/types/orpc-client/mcp-hosting/contract.d.ts +138 -0
  38. package/dist/types/orpc-client/mcp-hosting/contract.d.ts.map +1 -1
  39. package/dist/types/orpc-client/mcp-hosting/index.d.ts +1 -0
  40. package/dist/types/orpc-client/mcp-hosting/index.d.ts.map +1 -1
  41. package/dist/types/orpc-client/mcp-hosting/usage.d.ts +194 -0
  42. package/dist/types/orpc-client/mcp-hosting/usage.d.ts.map +1 -0
  43. package/package.json +1 -1
@@ -114,6 +114,7 @@ __export(orpc_client_exports, {
114
114
  CustomHostnameSchema: () => CustomHostnameSchema,
115
115
  CustomHostnameTxtRecordSchema: () => CustomHostnameTxtRecordSchema,
116
116
  CustomSnippetPayloadSchema: () => CustomSnippetPayloadSchema,
117
+ DEFAULT_MCP_ORG_QUOTA: () => DEFAULT_MCP_ORG_QUOTA,
117
118
  DOXYFILE_ALLOWED_KEYS: () => DOXYFILE_ALLOWED_KEYS,
118
119
  DashboardAnalyticsCommonInputSchema: () => DashboardAnalyticsCommonInputSchema,
119
120
  DashboardDocsSiteSchema: () => DashboardDocsSiteSchema,
@@ -275,6 +276,7 @@ __export(orpc_client_exports, {
275
276
  GetMcpServerBrandingInputSchema: () => GetMcpServerBrandingInputSchema,
276
277
  GetMcpServerBrandingResponseSchema: () => GetMcpServerBrandingResponseSchema,
277
278
  GetMcpServerInputSchema: () => GetMcpServerInputSchema,
279
+ GetMcpUsageInputSchema: () => GetMcpUsageInputSchema,
278
280
  GetMinCliForIrInputSchema: () => GetMinCliForIrInputSchema,
279
281
  GetOrganizationForUrlInputSchema: () => GetOrganizationForUrlInputSchema,
280
282
  GetPdfExportDownloadUrlInputSchema: () => GetPdfExportDownloadUrlInputSchema,
@@ -332,6 +334,7 @@ __export(orpc_client_exports, {
332
334
  KV_KEY_PREFIX_META: () => KV_KEY_PREFIX_META,
333
335
  KV_KEY_PREFIX_ORG: () => KV_KEY_PREFIX_ORG,
334
336
  KV_KEY_PREFIX_PAUSED: () => KV_KEY_PREFIX_PAUSED,
337
+ KV_KEY_PREFIX_QUOTA: () => KV_KEY_PREFIX_QUOTA,
335
338
  LEDGER_ARTIFACT_METADATA_SCHEMAS: () => LEDGER_ARTIFACT_METADATA_SCHEMAS,
336
339
  LEDGER_MANIFEST_SCHEMA_VERSION: () => LEDGER_MANIFEST_SCHEMA_VERSION,
337
340
  LEDGER_SHARD_SCHEMA_VERSION: () => LEDGER_SHARD_SCHEMA_VERSION,
@@ -475,8 +478,11 @@ __export(orpc_client_exports, {
475
478
  MCP_CONFIG_MAX_BYTES: () => MCP_CONFIG_MAX_BYTES,
476
479
  MCP_CONNECT_PAGE_DEFAULT_ACCENT: () => MCP_CONNECT_PAGE_DEFAULT_ACCENT,
477
480
  MCP_EXCHANGE_SECRET_MAX_LENGTH: () => MCP_EXCHANGE_SECRET_MAX_LENGTH,
481
+ MCP_FREE_TOOL_CALLS_PER_MONTH: () => MCP_FREE_TOOL_CALLS_PER_MONTH,
478
482
  MCP_IP_ALLOW_LIST_MAX_ENTRIES: () => MCP_IP_ALLOW_LIST_MAX_ENTRIES,
479
483
  MCP_METADATA_MAX_BYTES: () => MCP_METADATA_MAX_BYTES,
484
+ MCP_QUOTA_EXCEEDED_CODE: () => MCP_QUOTA_EXCEEDED_CODE,
485
+ MCP_SALES_CONTACT_URL: () => MCP_SALES_CONTACT_URL,
480
486
  MCP_TOOL_ROLES_MAX_BYTES: () => MCP_TOOL_ROLES_MAX_BYTES,
481
487
  ManifestApiDefSchema: () => ManifestApiDefSchema,
482
488
  ManifestBlobRefSchema: () => ManifestBlobRefSchema,
@@ -513,6 +519,8 @@ __export(orpc_client_exports, {
513
519
  McpIpAllowListSchema: () => McpIpAllowListSchema,
514
520
  McpMetadataSchema: () => McpMetadataSchema,
515
521
  McpModuleSchema: () => McpModuleSchema,
522
+ McpOrgQuotaSchema: () => McpOrgQuotaSchema,
523
+ McpOrgUsageSchema: () => McpOrgUsageSchema,
516
524
  McpServerAuthFieldsSchema: () => McpServerAuthFieldsSchema,
517
525
  McpServerAuthSchema: () => McpServerAuthSchema,
518
526
  McpServerAuthSettingsSchema: () => McpServerAuthSettingsSchema,
@@ -525,6 +533,7 @@ __export(orpc_client_exports, {
525
533
  McpToolRoleRuleSchema: () => McpToolRoleRuleSchema,
526
534
  McpToolRolesSchema: () => McpToolRolesSchema,
527
535
  McpToolSchema: () => McpToolSchema,
536
+ McpUsageCountsSchema: () => McpUsageCountsSchema,
528
537
  MigrateV2SiteInputSchema: () => MigrateV2SiteInputSchema,
529
538
  MigrateV2SiteResponseSchema: () => MigrateV2SiteResponseSchema,
530
539
  MigrateV2SiteSkipReasonSchema: () => MigrateV2SiteSkipReasonSchema,
@@ -698,6 +707,7 @@ __export(orpc_client_exports, {
698
707
  SetMcpCustomDomainInputSchema: () => SetMcpCustomDomainInputSchema,
699
708
  SetMcpServerExchangeSecretInputSchema: () => SetMcpServerExchangeSecretInputSchema,
700
709
  SetMcpServerIpAllowListInputSchema: () => SetMcpServerIpAllowListInputSchema,
710
+ SetMcpUsageAllowanceInputSchema: () => SetMcpUsageAllowanceInputSchema,
701
711
  SetSnapshotInputSchema: () => SetSnapshotInputSchema,
702
712
  Sha256Schema: () => Sha256Schema,
703
713
  SiteConfigResponseSchema: () => SiteConfigResponseSchema,
@@ -766,6 +776,7 @@ __export(orpc_client_exports, {
766
776
  UpsertThemeBodySchema: () => UpsertThemeBodySchema,
767
777
  Url: () => Url,
768
778
  UrlSchema: () => UrlSchema,
779
+ UsageMonthSchema: () => UsageMonthSchema,
769
780
  UuidTypeSchema: () => UuidTypeSchema,
770
781
  VersionBumpEnumSchema: () => VersionBumpEnumSchema,
771
782
  VersionId: () => VersionId,
@@ -869,6 +880,7 @@ __export(orpc_client_exports, {
869
880
  libraryDocsContract: () => libraryDocsContract,
870
881
  mcpAnalyticsIndex: () => mcpAnalyticsIndex,
871
882
  mcpHostingContract: () => mcpHostingContract,
883
+ mcpSalesContactUrl: () => mcpSalesContactUrl,
872
884
  mcpServerAuthChecks: () => mcpServerAuthChecks,
873
885
  normalizeCidr: () => normalizeCidr,
874
886
  normalizeCustomDomain: () => normalizeCustomDomain,
@@ -888,6 +900,8 @@ __export(orpc_client_exports, {
888
900
  tokensContract: () => tokensContract,
889
901
  toolCountFromParsed: () => toolCountFromParsed,
890
902
  toolCountFromStored: () => toolCountFromStored,
903
+ usageMonth: () => usageMonth,
904
+ usageMonthResetsAt: () => usageMonthResetsAt,
891
905
  validateCustomDomain: () => validateCustomDomain,
892
906
  validateDoxyfileContent: () => validateDoxyfileContent
893
907
  });
@@ -7211,7 +7225,7 @@ var import_fetch17 = require("@orpc/openapi-client/fetch");
7211
7225
 
7212
7226
  // src/orpc-client/mcp-hosting/contract.ts
7213
7227
  var import_contract31 = require("@orpc/contract");
7214
- var z29 = __toESM(require("zod"), 1);
7228
+ var z30 = __toESM(require("zod"), 1);
7215
7229
 
7216
7230
  // src/orpc-client/mcp-hosting/analytics.ts
7217
7231
  var z26 = __toESM(require("zod"), 1);
@@ -8081,46 +8095,115 @@ function deploymentSkippedToolsFromParsed(metadata) {
8081
8095
  }));
8082
8096
  }
8083
8097
 
8098
+ // src/orpc-client/mcp-hosting/usage.ts
8099
+ var z29 = __toESM(require("zod"), 1);
8100
+ var MCP_FREE_TOOL_CALLS_PER_MONTH = 1e3;
8101
+ var MCP_QUOTA_EXCEEDED_CODE = -32002;
8102
+ var MCP_SALES_CONTACT_URL = "https://buildwithfern.com/book-demo";
8103
+ var KV_KEY_PREFIX_QUOTA = "quota:";
8104
+ var McpOrgQuotaSchema = z29.object({
8105
+ /** Tool calls per month; null means no limit. */
8106
+ limit: z29.number().int().nonnegative().nullable(),
8107
+ /**
8108
+ * Sales approved the org to go over its limit. The dispatcher keeps
8109
+ * counting but never refuses a call.
8110
+ */
8111
+ approved: z29.boolean()
8112
+ });
8113
+ var DEFAULT_MCP_ORG_QUOTA = { limit: MCP_FREE_TOOL_CALLS_PER_MONTH, approved: false };
8114
+ function usageMonth(date) {
8115
+ return date.toISOString().slice(0, 7);
8116
+ }
8117
+ function usageMonthResetsAt(month) {
8118
+ const [year, monthIndex] = month.split("-").map(Number);
8119
+ return new Date(Date.UTC(year, monthIndex, 1));
8120
+ }
8121
+ var UsageMonthSchema = z29.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/, "Expected yyyy-mm");
8122
+ var McpUsageCountsSchema = z29.object({
8123
+ month: UsageMonthSchema,
8124
+ toolCalls: z29.number().int().nonnegative(),
8125
+ /** Calls refused because the allowance was used up. */
8126
+ blockedCalls: z29.number().int().nonnegative(),
8127
+ servers: z29.array(z29.object({ slug: z29.string(), toolCalls: z29.number().int().nonnegative() })),
8128
+ /** Whether this dispatcher refuses calls over the allowance (QUOTA_ENFORCE), or only counts them. */
8129
+ enforced: z29.boolean()
8130
+ });
8131
+ var McpOrgIdSchema = z29.string().min(1).max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
8132
+ var GetMcpUsageInputSchema = z29.object({
8133
+ orgId: McpOrgIdSchema,
8134
+ month: UsageMonthSchema.optional()
8135
+ });
8136
+ var SetMcpUsageAllowanceInputSchema = z29.object({
8137
+ orgId: McpOrgIdSchema,
8138
+ /** Tool calls per month; null means no limit. */
8139
+ limit: z29.number().int().nonnegative().max(1e9).nullable(),
8140
+ /** Approved to go over the limit: calls are counted but never refused. */
8141
+ approved: z29.boolean(),
8142
+ note: z29.string().max(500).optional()
8143
+ });
8144
+ var McpOrgUsageSchema = z29.object({
8145
+ month: UsageMonthSchema,
8146
+ resetsAt: z29.string(),
8147
+ toolCalls: z29.number().int().nonnegative(),
8148
+ blockedCalls: z29.number().int().nonnegative(),
8149
+ /** Tool calls per month; null means no limit. */
8150
+ limit: z29.number().int().nonnegative().nullable(),
8151
+ approved: z29.boolean(),
8152
+ /** The org has the free allowance (no allowance set by Fern). */
8153
+ isFreeAllowance: z29.boolean(),
8154
+ blocked: z29.boolean(),
8155
+ /** Whether calls over the allowance are refused in this environment, or only counted. */
8156
+ enforced: z29.boolean(),
8157
+ servers: z29.array(z29.object({ slug: z29.string(), toolCalls: z29.number().int().nonnegative() })),
8158
+ contactUrl: z29.string()
8159
+ });
8160
+ function mcpSalesContactUrl(orgId, base = MCP_SALES_CONTACT_URL) {
8161
+ const url = new URL(base);
8162
+ url.searchParams.set("product", "mcp");
8163
+ url.searchParams.set("org", orgId);
8164
+ return url.toString();
8165
+ }
8166
+
8084
8167
  // src/orpc-client/mcp-hosting/contract.ts
8085
- var McpPathSegmentSchema = z29.string().min(1).max(30).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
8086
- var McpDeploymentStatusSchema = z29.enum(["PUBLISHING", "SUCCEEDED", "FAILED"]);
8087
- var McpModuleSchema = z29.object({
8088
- name: z29.string().regex(/^[A-Za-z0-9._/-]+$/),
8168
+ var McpPathSegmentSchema = z30.string().min(1).max(30).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
8169
+ var McpDeploymentStatusSchema = z30.enum(["PUBLISHING", "SUCCEEDED", "FAILED"]);
8170
+ var McpModuleSchema = z30.object({
8171
+ name: z30.string().regex(/^[A-Za-z0-9._/-]+$/),
8089
8172
  hash: Sha256Schema,
8090
- contentType: z29.string().min(1)
8173
+ contentType: z30.string().min(1)
8091
8174
  }).strict();
8092
- var McpGitInputSchema = z29.object({
8093
- repoUrl: z29.string(),
8175
+ var McpGitInputSchema = z30.object({
8176
+ repoUrl: z30.string(),
8094
8177
  /** Absent on a detached HEAD (a CI checkout of a commit, say). */
8095
- branch: z29.string().optional(),
8096
- commitSha: z29.string().optional()
8178
+ branch: z30.string().optional(),
8179
+ commitSha: z30.string().optional()
8097
8180
  }).strict();
8098
- var McpInputFileSchema = z29.discriminatedUnion("name", [
8099
- z29.object({
8181
+ var McpInputFileSchema = z30.discriminatedUnion("name", [
8182
+ z30.object({
8100
8183
  /** The `sources` part of the build request, verbatim. */
8101
- name: z29.literal("specs.tar.gz"),
8102
- contentType: z29.literal("application/gzip"),
8184
+ name: z30.literal("specs.tar.gz"),
8185
+ contentType: z30.literal("application/gzip"),
8103
8186
  hash: Sha256Schema
8104
8187
  }).strict(),
8105
- z29.object({
8188
+ z30.object({
8106
8189
  /** This target's sdk-config payload. */
8107
- name: z29.literal("sdk-config.json"),
8108
- contentType: z29.literal("application/json"),
8190
+ name: z30.literal("sdk-config.json"),
8191
+ contentType: z30.literal("application/json"),
8109
8192
  hash: Sha256Schema
8110
8193
  }).strict(),
8111
- z29.object({
8194
+ z30.object({
8112
8195
  /** The build request narrowed to this target. */
8113
- name: z29.literal("build-request.json"),
8114
- contentType: z29.literal("application/json"),
8196
+ name: z30.literal("build-request.json"),
8197
+ contentType: z30.literal("application/json"),
8115
8198
  hash: Sha256Schema
8116
8199
  }).strict()
8117
8200
  ]);
8118
- var McpInputFilesSchema = z29.array(McpInputFileSchema).max(3).superRefine((inputs, ctx) => {
8201
+ var McpInputFilesSchema = z30.array(McpInputFileSchema).max(3).superRefine((inputs, ctx) => {
8119
8202
  const names = /* @__PURE__ */ new Set();
8120
8203
  for (const input of inputs) {
8121
8204
  if (names.has(input.name)) {
8122
8205
  ctx.addIssue({
8123
- code: z29.ZodIssueCode.custom,
8206
+ code: z30.ZodIssueCode.custom,
8124
8207
  message: `duplicate input name: ${input.name}`
8125
8208
  });
8126
8209
  }
@@ -8151,7 +8234,7 @@ function deployMetadataChecks(metadata, ctx) {
8151
8234
  for (const [toolset, members] of Object.entries(metadata.toolsets)) {
8152
8235
  if (!TOOLSET_NAME_PATTERN.test(toolset)) {
8153
8236
  ctx.addIssue({
8154
- code: z29.ZodIssueCode.custom,
8237
+ code: z30.ZodIssueCode.custom,
8155
8238
  path: ["toolsets", toolset],
8156
8239
  message: `toolset name "${toolset}" must match ${TOOLSET_NAME_PATTERN}`
8157
8240
  });
@@ -8159,7 +8242,7 @@ function deployMetadataChecks(metadata, ctx) {
8159
8242
  members.forEach((member, index) => {
8160
8243
  if (!TOOL_NAME_PATTERN.test(member)) {
8161
8244
  ctx.addIssue({
8162
- code: z29.ZodIssueCode.custom,
8245
+ code: z30.ZodIssueCode.custom,
8163
8246
  path: ["toolsets", toolset, index],
8164
8247
  message: `tool name "${member}" must match ${TOOL_NAME_PATTERN}`
8165
8248
  });
@@ -8169,28 +8252,28 @@ function deployMetadataChecks(metadata, ctx) {
8169
8252
  (metadata.tools ?? []).forEach((tool, index) => {
8170
8253
  if (!TOOL_NAME_PATTERN.test(tool.name)) {
8171
8254
  ctx.addIssue({
8172
- code: z29.ZodIssueCode.custom,
8255
+ code: z30.ZodIssueCode.custom,
8173
8256
  path: ["tools", index, "name"],
8174
8257
  message: `tool name "${tool.name}" must match ${TOOL_NAME_PATTERN}`
8175
8258
  });
8176
8259
  }
8177
8260
  if (tool.operationId != null && tool.operationId.length > MAX_OPERATION_ID_LENGTH) {
8178
8261
  ctx.addIssue({
8179
- code: z29.ZodIssueCode.custom,
8262
+ code: z30.ZodIssueCode.custom,
8180
8263
  path: ["tools", index, "operationId"],
8181
8264
  message: `operationId must be at most ${MAX_OPERATION_ID_LENGTH} characters`
8182
8265
  });
8183
8266
  }
8184
8267
  if (tool.method.length > MAX_METHOD_LENGTH) {
8185
8268
  ctx.addIssue({
8186
- code: z29.ZodIssueCode.custom,
8269
+ code: z30.ZodIssueCode.custom,
8187
8270
  path: ["tools", index, "method"],
8188
8271
  message: `method must be at most ${MAX_METHOD_LENGTH} characters`
8189
8272
  });
8190
8273
  }
8191
8274
  if (tool.path.length > MAX_PATH_LENGTH) {
8192
8275
  ctx.addIssue({
8193
- code: z29.ZodIssueCode.custom,
8276
+ code: z30.ZodIssueCode.custom,
8194
8277
  path: ["tools", index, "path"],
8195
8278
  message: `path must be at most ${MAX_PATH_LENGTH} characters`
8196
8279
  });
@@ -8199,7 +8282,7 @@ function deployMetadataChecks(metadata, ctx) {
8199
8282
  metadata.auth.schemes.forEach((scheme, index) => {
8200
8283
  if (scheme.type === "apiKey" && !HEADER_TOKEN_PATTERN.test(scheme.paramName)) {
8201
8284
  ctx.addIssue({
8202
- code: z29.ZodIssueCode.custom,
8285
+ code: z30.ZodIssueCode.custom,
8203
8286
  path: ["auth", "schemes", index, "paramName"],
8204
8287
  message: `paramName "${scheme.paramName}" must be an RFC 7230 token of at most 128 characters`
8205
8288
  });
@@ -8207,30 +8290,30 @@ function deployMetadataChecks(metadata, ctx) {
8207
8290
  });
8208
8291
  if (!maxSerializedBytes(MCP_METADATA_MAX_BYTES)(metadata)) {
8209
8292
  ctx.addIssue({
8210
- code: z29.ZodIssueCode.custom,
8293
+ code: z30.ZodIssueCode.custom,
8211
8294
  message: `metadata must be at most ${MCP_METADATA_MAX_BYTES} bytes serialized`
8212
8295
  });
8213
8296
  }
8214
8297
  }
8215
- var DeployMcpServerInputSchema = z29.object({
8298
+ var DeployMcpServerInputSchema = z30.object({
8216
8299
  orgId: McpPathSegmentSchema,
8217
8300
  slug: McpPathSegmentSchema,
8218
- mainModule: z29.string().min(1),
8219
- compatibilityDate: z29.string().regex(/^\d{4}-\d{2}-\d{2}$/),
8220
- compatibilityFlags: z29.array(z29.string()),
8301
+ mainModule: z30.string().min(1),
8302
+ compatibilityDate: z30.string().regex(/^\d{4}-\d{2}-\d{2}$/),
8303
+ compatibilityFlags: z30.array(z30.string()),
8221
8304
  // Bounded so a single deploy request cannot fan out unbounded parallel
8222
8305
  // CAS lookups and S3 reads. Generated MCP workers are 1-2 modules;
8223
8306
  // 20 leaves room for wasm/sourcemap/chunk splitting.
8224
- modules: z29.array(McpModuleSchema).min(1).max(20),
8307
+ modules: z30.array(McpModuleSchema).min(1).max(20),
8225
8308
  metadata: McpMetadataSchema.superRefine(deployMetadataChecks),
8226
8309
  // Everything else in this schema is bounded; keep the opaque config
8227
8310
  // blob bounded too so it cannot balloon the JSONB row.
8228
- config: z29.unknown().optional().refine(maxSerializedBytes(MCP_CONFIG_MAX_BYTES), {
8311
+ config: z30.unknown().optional().refine(maxSerializedBytes(MCP_CONFIG_MAX_BYTES), {
8229
8312
  message: `config must be at most ${MCP_CONFIG_MAX_BYTES} bytes serialized`
8230
8313
  }),
8231
- generatorName: z29.string().min(1),
8232
- generatorVersion: z29.string().min(1),
8233
- cliVersion: z29.string().optional(),
8314
+ generatorName: z30.string().min(1),
8315
+ generatorVersion: z30.string().min(1),
8316
+ cliVersion: z30.string().optional(),
8234
8317
  git: McpGitInputSchema.optional(),
8235
8318
  inputs: McpInputFilesSchema.optional()
8236
8319
  }).strict().superRefine((input, ctx) => {
@@ -8238,7 +8321,7 @@ var DeployMcpServerInputSchema = z29.object({
8238
8321
  for (const module2 of input.modules) {
8239
8322
  if (names.has(module2.name)) {
8240
8323
  ctx.addIssue({
8241
- code: z29.ZodIssueCode.custom,
8324
+ code: z30.ZodIssueCode.custom,
8242
8325
  path: ["modules"],
8243
8326
  message: `duplicate module name: ${module2.name}`
8244
8327
  });
@@ -8247,18 +8330,18 @@ var DeployMcpServerInputSchema = z29.object({
8247
8330
  }
8248
8331
  if (!names.has(input.mainModule)) {
8249
8332
  ctx.addIssue({
8250
- code: z29.ZodIssueCode.custom,
8333
+ code: z30.ZodIssueCode.custom,
8251
8334
  path: ["mainModule"],
8252
8335
  message: `mainModule ${input.mainModule} is not among the submitted modules`
8253
8336
  });
8254
8337
  }
8255
8338
  });
8256
- var GetMcpServerInputSchema = z29.object({
8339
+ var GetMcpServerInputSchema = z30.object({
8257
8340
  orgId: McpPathSegmentSchema,
8258
8341
  slug: McpPathSegmentSchema
8259
8342
  });
8260
8343
  var GetMcpServerBrandingInputSchema = GetMcpServerInputSchema;
8261
- var GetMcpServerBrandingResponseSchema = z29.object({
8344
+ var GetMcpServerBrandingResponseSchema = z30.object({
8262
8345
  branding: McpServerBrandingSchema,
8263
8346
  inherited: DeploymentThemeSchema.nullable()
8264
8347
  });
@@ -8271,35 +8354,35 @@ var UpdateMcpServerAuthInputSchema = GetMcpServerInputSchema.extend(
8271
8354
  ).superRefine(mcpServerAuthChecks);
8272
8355
  var MCP_EXCHANGE_SECRET_MAX_LENGTH = 4096;
8273
8356
  var SetMcpServerExchangeSecretInputSchema = GetMcpServerInputSchema.extend({
8274
- secret: z29.string().min(1).max(MCP_EXCHANGE_SECRET_MAX_LENGTH).nullable()
8357
+ secret: z30.string().min(1).max(MCP_EXCHANGE_SECRET_MAX_LENGTH).nullable()
8275
8358
  });
8276
8359
  var SetMcpServerIpAllowListInputSchema = GetMcpServerInputSchema.extend({
8277
8360
  ranges: McpIpAllowListSchema
8278
8361
  });
8279
- var ListMcpServersInputSchema = z29.object({
8280
- orgId: z29.string()
8362
+ var ListMcpServersInputSchema = z30.object({
8363
+ orgId: z30.string()
8281
8364
  });
8282
8365
  var ListMcpDeploymentsInputSchema = GetMcpServerInputSchema;
8283
8366
  var DeleteMcpServerInputSchema = GetMcpServerInputSchema;
8284
8367
  var PauseMcpServerInputSchema = GetMcpServerInputSchema;
8285
8368
  var ResumeMcpServerInputSchema = GetMcpServerInputSchema;
8286
8369
  var RenameMcpServerInputSchema = GetMcpServerInputSchema.extend({ newSlug: McpPathSegmentSchema });
8287
- var GetMcpDeploymentInputSchema = z29.object({
8370
+ var GetMcpDeploymentInputSchema = z30.object({
8288
8371
  orgId: McpPathSegmentSchema,
8289
8372
  slug: McpPathSegmentSchema,
8290
8373
  /** Id of one of the server's attempts (the rows are uuid v7). */
8291
- deploymentId: z29.string().uuid()
8374
+ deploymentId: z30.string().uuid()
8292
8375
  });
8293
- var RollbackMcpServerInputSchema = z29.object({
8376
+ var RollbackMcpServerInputSchema = z30.object({
8294
8377
  orgId: McpPathSegmentSchema,
8295
8378
  slug: McpPathSegmentSchema,
8296
8379
  /** Id of the SUCCEEDED deployment whose payload should serve again. */
8297
- deploymentId: z29.string().min(1).max(64)
8380
+ deploymentId: z30.string().min(1).max(64)
8298
8381
  });
8299
8382
  var GetMcpCustomDomainInputSchema = GetMcpServerInputSchema;
8300
8383
  var RefreshMcpCustomDomainInputSchema = GetMcpServerInputSchema;
8301
8384
  var RemoveMcpCustomDomainInputSchema = GetMcpServerInputSchema;
8302
- var SetMcpCustomDomainInputSchema = z29.object({
8385
+ var SetMcpCustomDomainInputSchema = z30.object({
8303
8386
  orgId: McpPathSegmentSchema,
8304
8387
  slug: McpPathSegmentSchema,
8305
8388
  /**
@@ -8307,52 +8390,52 @@ var SetMcpCustomDomainInputSchema = z29.object({
8307
8390
  * against validateCustomDomain (customDomain.ts) and normalized by FDR;
8308
8391
  * the length cap only bounds what is parsed.
8309
8392
  */
8310
- hostname: z29.string().min(1).max(512)
8393
+ hostname: z30.string().min(1).max(512)
8311
8394
  });
8312
- var GetMcpAnalyticsInputSchema = z29.object({
8395
+ var GetMcpAnalyticsInputSchema = z30.object({
8313
8396
  orgId: McpPathSegmentSchema,
8314
8397
  slug: McpPathSegmentSchema,
8315
8398
  window: McpAnalyticsWindowSchema.default("24h")
8316
8399
  });
8317
- var McpDeploymentGitSchema = z29.object({
8318
- repoUrl: z29.string(),
8319
- branch: z29.string().nullish(),
8320
- commitSha: z29.string().nullish()
8400
+ var McpDeploymentGitSchema = z30.object({
8401
+ repoUrl: z30.string(),
8402
+ branch: z30.string().nullish(),
8403
+ commitSha: z30.string().nullish()
8321
8404
  });
8322
- var McpDeploymentSummarySchema = z29.object({
8323
- id: z29.string(),
8405
+ var McpDeploymentSummarySchema = z30.object({
8406
+ id: z30.string(),
8324
8407
  status: McpDeploymentStatusSchema,
8325
8408
  /** True when this deployment is the one the server currently serves. */
8326
- isActive: z29.boolean(),
8409
+ isActive: z30.boolean(),
8327
8410
  /**
8328
8411
  * Docker image name of the generator that produced this attempt's payload
8329
8412
  * (DeployMcpServerInputSchema.generatorName). Null only on the wire from
8330
8413
  * an FDR that predates the field; the column itself is required.
8331
8414
  */
8332
- generatorName: z29.string().nullish(),
8333
- generatorVersion: z29.string(),
8334
- createdAt: z29.string(),
8335
- createdBy: z29.string().nullish(),
8336
- error: z29.object({ name: z29.string(), message: z29.string() }).nullish(),
8415
+ generatorName: z30.string().nullish(),
8416
+ generatorVersion: z30.string(),
8417
+ createdAt: z30.string(),
8418
+ createdBy: z30.string().nullish(),
8419
+ error: z30.object({ name: z30.string(), message: z30.string() }).nullish(),
8337
8420
  /**
8338
8421
  * Set when this attempt republished an earlier deployment's payload
8339
8422
  * (rollbackServer): the id of that source deployment. Null for attempts
8340
8423
  * that came from a deploy.
8341
8424
  */
8342
- rolledBackFromDeploymentId: z29.string().nullish(),
8425
+ rolledBackFromDeploymentId: z30.string().nullish(),
8343
8426
  /**
8344
8427
  * Headline tool count of this attempt's payload, by the same rule as
8345
8428
  * McpServerCatalogSummarySchema.toolCount. Null when the stored payload
8346
8429
  * predates the current metadata schema.
8347
8430
  */
8348
- toolCount: z29.number().int().nullish(),
8431
+ toolCount: z30.number().int().nullish(),
8349
8432
  /**
8350
8433
  * Version of the Fern CLI that submitted this attempt, when one identified
8351
8434
  * itself (DeployMcpServerInputSchema.cliVersion). Null for attempts that
8352
8435
  * reached the deploy endpoint without it, and for rollbacks, which FDR
8353
8436
  * records on its own behalf.
8354
8437
  */
8355
- cliVersion: z29.string().nullish(),
8438
+ cliVersion: z30.string().nullish(),
8356
8439
  /**
8357
8440
  * The CI run that submitted this attempt, as the CLI described it in the
8358
8441
  * `X-CI-Source` header and FDR sanitized it (the same treatment docs
@@ -8361,7 +8444,7 @@ var McpDeploymentSummarySchema = z29.object({
8361
8444
  * and, like the deployer headers, self-asserted by the caller. Null for
8362
8445
  * local deploys and rollbacks.
8363
8446
  */
8364
- ciSource: z29.record(z29.string(), z29.unknown()).nullish(),
8447
+ ciSource: z30.record(z30.string(), z30.unknown()).nullish(),
8365
8448
  /**
8366
8449
  * The repository this attempt's payload was generated from, as the CLI
8367
8450
  * reported it (DeployMcpServerInputSchema.git). A rollback carries its
@@ -8377,47 +8460,47 @@ var McpDeploymentSummarySchema = z29.object({
8377
8460
  * deployment it restored always do — so it names what a version *is* rather
8378
8461
  * than which row it was. Null when the stored module list does not parse.
8379
8462
  */
8380
- bundleDigest: z29.string().nullish()
8463
+ bundleDigest: z30.string().nullish()
8381
8464
  });
8382
- var McpDeploymentInputFileSchema = z29.object({
8383
- name: z29.string(),
8384
- contentType: z29.string(),
8385
- hash: z29.string(),
8386
- downloadUrl: z29.string()
8465
+ var McpDeploymentInputFileSchema = z30.object({
8466
+ name: z30.string(),
8467
+ contentType: z30.string(),
8468
+ hash: z30.string(),
8469
+ downloadUrl: z30.string()
8387
8470
  });
8388
8471
  var McpDeploymentDetailSchema = McpDeploymentSummarySchema.extend({
8389
8472
  /** Empty when the stored metadata carries no `tools` (generators before provenance). */
8390
- tools: z29.array(McpDeploymentToolSchema),
8391
- skippedTools: z29.array(McpDeploymentSkippedToolSchema),
8473
+ tools: z30.array(McpDeploymentToolSchema),
8474
+ skippedTools: z30.array(McpDeploymentSkippedToolSchema),
8392
8475
  /** The stored toolset membership map, as deployed. */
8393
- toolsets: z29.record(z29.string(), z29.array(z29.string())),
8476
+ toolsets: z30.record(z30.string(), z30.array(z30.string())),
8394
8477
  /** The raw generators.yml `config:` block the CLI sent, or null. Visible to org members. */
8395
- config: z29.unknown().nullable(),
8478
+ config: z30.unknown().nullable(),
8396
8479
  /** Null when the attempt recorded no inputs (older CLIs, rollbacks of such rows). */
8397
- inputs: z29.array(McpDeploymentInputFileSchema).nullable()
8480
+ inputs: z30.array(McpDeploymentInputFileSchema).nullable()
8398
8481
  });
8399
- var McpCustomDomainStatusSchema = z29.enum(["PENDING", "ACTIVE", "FAILED"]);
8400
- var McpCustomDomainRecordSchema = z29.object({
8401
- type: z29.enum(["CNAME", "TXT"]),
8402
- name: z29.string(),
8403
- value: z29.string(),
8482
+ var McpCustomDomainStatusSchema = z30.enum(["PENDING", "ACTIVE", "FAILED"]);
8483
+ var McpCustomDomainRecordSchema = z30.object({
8484
+ type: z30.enum(["CNAME", "TXT"]),
8485
+ name: z30.string(),
8486
+ value: z30.string(),
8404
8487
  /** What the record is for, in a sentence the dashboard can show beside it. */
8405
- purpose: z29.string()
8488
+ purpose: z30.string()
8406
8489
  });
8407
- var McpCustomDomainSchema = z29.object({
8408
- hostname: z29.string(),
8490
+ var McpCustomDomainSchema = z30.object({
8491
+ hostname: z30.string(),
8409
8492
  status: McpCustomDomainStatusSchema,
8410
8493
  /** Records still to add; empty once the domain is ACTIVE. */
8411
- records: z29.array(McpCustomDomainRecordSchema),
8494
+ records: z30.array(McpCustomDomainRecordSchema),
8412
8495
  /** Why Cloudflare could not verify the domain or issue its certificate, when it said. */
8413
- errors: z29.array(z29.string()),
8414
- createdAt: z29.string(),
8415
- updatedAt: z29.string()
8416
- });
8417
- var McpServerSchema = z29.object({
8418
- id: z29.string(),
8419
- orgId: z29.string(),
8420
- slug: z29.string(),
8496
+ errors: z30.array(z30.string()),
8497
+ createdAt: z30.string(),
8498
+ updatedAt: z30.string()
8499
+ });
8500
+ var McpServerSchema = z30.object({
8501
+ id: z30.string(),
8502
+ orgId: z30.string(),
8503
+ slug: z30.string(),
8421
8504
  /** Per-server custom branding; empty when no values are set. */
8422
8505
  branding: McpServerBrandingSchema,
8423
8506
  /**
@@ -8431,9 +8514,9 @@ var McpServerSchema = z29.object({
8431
8514
  * setServerIpAllowList. Empty means open. Kept across deploys and
8432
8515
  * rollbacks. Absent only on the wire from an FDR that predates the field.
8433
8516
  */
8434
- ipAllowList: z29.array(z29.string()).optional(),
8517
+ ipAllowList: z30.array(z30.string()).optional(),
8435
8518
  /** The server is serving iff this is set; it names the serving deployment. */
8436
- activeDeploymentId: z29.string().nullish(),
8519
+ activeDeploymentId: z30.string().nullish(),
8437
8520
  /** Most recent publication attempt — how the last deploy went. */
8438
8521
  latestDeployment: McpDeploymentSummarySchema.nullish(),
8439
8522
  /**
@@ -8442,7 +8525,7 @@ var McpServerSchema = z29.object({
8442
8525
  * (KV_KEY_PREFIX_PAUSED in kv.ts). Independent of activeDeploymentId: a
8443
8526
  * paused server keeps its serving deployment and resumes exactly there.
8444
8527
  */
8445
- pausedAt: z29.string().nullish(),
8528
+ pausedAt: z30.string().nullish(),
8446
8529
  /**
8447
8530
  * What the server offers, derived from the ACTIVE deployment's stored
8448
8531
  * metadata (tools, toolsets, auth, configuration). Null when nothing is
@@ -8456,14 +8539,14 @@ var McpServerSchema = z29.object({
8456
8539
  * a UI shows both. Only an ACTIVE domain serves: read `customDomainStatus`
8457
8540
  * to tell a pending one from a live one.
8458
8541
  */
8459
- customDomain: z29.string().nullish(),
8542
+ customDomain: z30.string().nullish(),
8460
8543
  customDomainStatus: McpCustomDomainStatusSchema.nullish(),
8461
- url: z29.string().url(),
8462
- createdAt: z29.string(),
8463
- updatedAt: z29.string()
8544
+ url: z30.string().url(),
8545
+ createdAt: z30.string(),
8546
+ updatedAt: z30.string()
8464
8547
  });
8465
- var ListMcpServersResponseSchema = z29.object({ servers: z29.array(McpServerSchema) });
8466
- var ListMcpDeploymentsResponseSchema = z29.object({ deployments: z29.array(McpDeploymentSummarySchema) });
8548
+ var ListMcpServersResponseSchema = z30.object({ servers: z30.array(McpServerSchema) });
8549
+ var ListMcpDeploymentsResponseSchema = z30.object({ deployments: z30.array(McpDeploymentSummarySchema) });
8467
8550
  var mcpHostingContract = {
8468
8551
  deploy: import_contract31.oc.route({ method: "POST", path: "/deploy" }).input(DeployMcpServerInputSchema).output(McpServerSchema),
8469
8552
  getServer: import_contract31.oc.route({ method: "GET", path: "/servers/{slug}" }).input(GetMcpServerInputSchema).output(McpServerSchema),
@@ -8551,7 +8634,19 @@ var mcpHostingContract = {
8551
8634
  * Analytics Engine by FDR (the tenant filter is applied server-side, so no
8552
8635
  * Cloudflare credential reaches the browser). See analytics.ts.
8553
8636
  */
8554
- getAnalytics: import_contract31.oc.route({ method: "GET", path: "/servers/{slug}/analytics" }).input(GetMcpAnalyticsInputSchema).output(McpAnalyticsSchema)
8637
+ getAnalytics: import_contract31.oc.route({ method: "GET", path: "/servers/{slug}/analytics" }).input(GetMcpAnalyticsInputSchema).output(McpAnalyticsSchema),
8638
+ /**
8639
+ * The org's exact tool-call count for a month against its allowance
8640
+ * (usage.ts). Any member. NOT_IMPLEMENTED when FDR has no usage read
8641
+ * token for the dispatcher.
8642
+ */
8643
+ getUsage: import_contract31.oc.route({ method: "GET", path: "/usage" }).input(GetMcpUsageInputSchema).output(McpOrgUsageSchema),
8644
+ /**
8645
+ * Set the org's monthly allowance (sales raising a limit or approving an
8646
+ * org to go over). Fern staff (super-users) only. Applies at the
8647
+ * dispatcher within KV's propagation time plus its one-minute cache.
8648
+ */
8649
+ setUsageAllowance: import_contract31.oc.route({ method: "PUT", path: "/usage/allowance" }).input(SetMcpUsageAllowanceInputSchema).output(McpOrgUsageSchema)
8555
8650
  };
8556
8651
 
8557
8652
  // src/orpc-client/mcp-hosting/client.ts
@@ -8573,87 +8668,87 @@ var import_fetch18 = require("@orpc/openapi-client/fetch");
8573
8668
 
8574
8669
  // src/orpc-client/pdf-export/contract.ts
8575
8670
  var import_contract33 = require("@orpc/contract");
8576
- var z30 = __toESM(require("zod"), 1);
8577
- var PdfExportScopeSchema = z30.object({
8578
- pageSlugs: z30.array(z30.string())
8579
- });
8580
- var PdfExportOptionsV1Schema = z30.object({
8581
- coverTitle: z30.string().nullish(),
8582
- coverSubtitle: z30.string().nullish(),
8583
- hideCoverFooter: z30.boolean().nullish(),
8584
- headerLeftTemplate: z30.string().nullish(),
8585
- headerRightTemplate: z30.string().nullish(),
8586
- footerLeftTemplate: z30.string().nullish(),
8587
- footerRightTemplate: z30.string().nullish(),
8671
+ var z31 = __toESM(require("zod"), 1);
8672
+ var PdfExportScopeSchema = z31.object({
8673
+ pageSlugs: z31.array(z31.string())
8674
+ });
8675
+ var PdfExportOptionsV1Schema = z31.object({
8676
+ coverTitle: z31.string().nullish(),
8677
+ coverSubtitle: z31.string().nullish(),
8678
+ hideCoverFooter: z31.boolean().nullish(),
8679
+ headerLeftTemplate: z31.string().nullish(),
8680
+ headerRightTemplate: z31.string().nullish(),
8681
+ footerLeftTemplate: z31.string().nullish(),
8682
+ footerRightTemplate: z31.string().nullish(),
8588
8683
  scope: PdfExportScopeSchema.nullish(),
8589
- hideCover: z30.boolean().nullish(),
8590
- hideToc: z30.boolean().nullish()
8684
+ hideCover: z31.boolean().nullish(),
8685
+ hideToc: z31.boolean().nullish()
8591
8686
  });
8592
- var PdfExportOptionsSchema = z30.discriminatedUnion("version", [
8593
- z30.object({ version: z30.literal("v1") }).merge(PdfExportOptionsV1Schema)
8687
+ var PdfExportOptionsSchema = z31.discriminatedUnion("version", [
8688
+ z31.object({ version: z31.literal("v1") }).merge(PdfExportOptionsV1Schema)
8594
8689
  ]);
8595
- var PdfExportTaskStatusSchema = z30.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED"]);
8596
- var PdfExportFormatSchema = z30.enum(["pdf", "html", "md"]);
8597
- var PdfExportTaskSchema = z30.object({
8598
- id: z30.string(),
8599
- orgId: z30.string(),
8600
- docsUrl: z30.string(),
8601
- productId: z30.string().nullish(),
8602
- versionId: z30.string().nullish(),
8603
- requesterName: z30.string().nullish(),
8604
- notifyEmails: z30.array(z30.string()).nullish(),
8690
+ var PdfExportTaskStatusSchema = z31.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED"]);
8691
+ var PdfExportFormatSchema = z31.enum(["pdf", "html", "md"]);
8692
+ var PdfExportTaskSchema = z31.object({
8693
+ id: z31.string(),
8694
+ orgId: z31.string(),
8695
+ docsUrl: z31.string(),
8696
+ productId: z31.string().nullish(),
8697
+ versionId: z31.string().nullish(),
8698
+ requesterName: z31.string().nullish(),
8699
+ notifyEmails: z31.array(z31.string()).nullish(),
8605
8700
  status: PdfExportTaskStatusSchema,
8606
8701
  format: PdfExportFormatSchema.nullish(),
8607
8702
  options: PdfExportOptionsSchema.nullish(),
8608
- createdAt: z30.string(),
8609
- startedAt: z30.string().nullish(),
8610
- completedAt: z30.string().nullish(),
8611
- fileName: z30.string().nullish(),
8612
- sizeBytes: z30.number().nullish(),
8613
- errorMessage: z30.string().nullish()
8614
- });
8615
- var ListPdfExportTasksResponseSchema = z30.object({
8616
- tasks: z30.array(PdfExportTaskSchema)
8617
- });
8618
- var PdfExportDownloadResponseSchema = z30.object({
8619
- downloadUrl: z30.string(),
8620
- fileName: z30.string(),
8621
- sizeBytes: z30.number()
8622
- });
8623
- var CreatePdfExportTaskInputSchema = z30.object({
8624
- orgId: z30.string(),
8625
- docsUrl: z30.string(),
8626
- productId: z30.string().nullish(),
8627
- versionId: z30.string().nullish(),
8628
- requesterName: z30.string().nullish(),
8703
+ createdAt: z31.string(),
8704
+ startedAt: z31.string().nullish(),
8705
+ completedAt: z31.string().nullish(),
8706
+ fileName: z31.string().nullish(),
8707
+ sizeBytes: z31.number().nullish(),
8708
+ errorMessage: z31.string().nullish()
8709
+ });
8710
+ var ListPdfExportTasksResponseSchema = z31.object({
8711
+ tasks: z31.array(PdfExportTaskSchema)
8712
+ });
8713
+ var PdfExportDownloadResponseSchema = z31.object({
8714
+ downloadUrl: z31.string(),
8715
+ fileName: z31.string(),
8716
+ sizeBytes: z31.number()
8717
+ });
8718
+ var CreatePdfExportTaskInputSchema = z31.object({
8719
+ orgId: z31.string(),
8720
+ docsUrl: z31.string(),
8721
+ productId: z31.string().nullish(),
8722
+ versionId: z31.string().nullish(),
8723
+ requesterName: z31.string().nullish(),
8629
8724
  format: PdfExportFormatSchema.nullish(),
8630
8725
  options: PdfExportOptionsSchema.nullish()
8631
8726
  });
8632
- var ListPdfExportTasksInputSchema = z30.object({
8633
- orgId: z30.string(),
8634
- docsUrl: z30.string(),
8635
- limit: z30.coerce.number().nullish()
8727
+ var ListPdfExportTasksInputSchema = z31.object({
8728
+ orgId: z31.string(),
8729
+ docsUrl: z31.string(),
8730
+ limit: z31.coerce.number().nullish()
8636
8731
  });
8637
- var GetPdfExportTaskInputSchema = z30.object({
8638
- taskId: z30.string()
8732
+ var GetPdfExportTaskInputSchema = z31.object({
8733
+ taskId: z31.string()
8639
8734
  });
8640
- var UpdatePdfExportTaskInputSchema = z30.object({
8641
- taskId: z30.string(),
8735
+ var UpdatePdfExportTaskInputSchema = z31.object({
8736
+ taskId: z31.string(),
8642
8737
  status: PdfExportTaskStatusSchema,
8643
- startedAt: z30.string().nullish(),
8644
- completedAt: z30.string().nullish(),
8645
- s3Key: z30.string().nullish(),
8646
- fileName: z30.string().nullish(),
8647
- sizeBytes: z30.number().nullish(),
8648
- errorMessage: z30.string().nullish()
8738
+ startedAt: z31.string().nullish(),
8739
+ completedAt: z31.string().nullish(),
8740
+ s3Key: z31.string().nullish(),
8741
+ fileName: z31.string().nullish(),
8742
+ sizeBytes: z31.number().nullish(),
8743
+ errorMessage: z31.string().nullish()
8649
8744
  });
8650
- var GetPdfExportDownloadUrlInputSchema = z30.object({
8651
- taskId: z30.string()
8745
+ var GetPdfExportDownloadUrlInputSchema = z31.object({
8746
+ taskId: z31.string()
8652
8747
  });
8653
- var CleanupPdfExportsResponseSchema = z30.object({
8654
- expiredTasksDeleted: z30.number(),
8655
- s3ObjectsDeleted: z30.number(),
8656
- timedOutTasksFailed: z30.number()
8748
+ var CleanupPdfExportsResponseSchema = z31.object({
8749
+ expiredTasksDeleted: z31.number(),
8750
+ s3ObjectsDeleted: z31.number(),
8751
+ timedOutTasksFailed: z31.number()
8657
8752
  });
8658
8753
  var pdfExportContract = {
8659
8754
  createTask: import_contract33.oc.route({ method: "POST", path: "/task" }).input(CreatePdfExportTaskInputSchema).output(PdfExportTaskSchema),
@@ -8689,8 +8784,8 @@ var import_fetch19 = require("@orpc/openapi-client/fetch");
8689
8784
 
8690
8785
  // src/orpc-client/sdks/contract.ts
8691
8786
  var import_contract35 = require("@orpc/contract");
8692
- var z31 = __toESM(require("zod"), 1);
8693
- var LanguageEnumSchema = z31.enum([
8787
+ var z32 = __toESM(require("zod"), 1);
8788
+ var LanguageEnumSchema = z32.enum([
8694
8789
  "Go",
8695
8790
  "TypeScript",
8696
8791
  "Java",
@@ -8701,14 +8796,14 @@ var LanguageEnumSchema = z31.enum([
8701
8796
  "Swift",
8702
8797
  "Rust"
8703
8798
  ]);
8704
- var VersionBumpEnumSchema = z31.enum(["MAJOR", "MINOR", "PATCH"]);
8705
- var ComputeSemanticVersionInputSchema = z31.object({
8706
- package: z31.string(),
8799
+ var VersionBumpEnumSchema = z32.enum(["MAJOR", "MINOR", "PATCH"]);
8800
+ var ComputeSemanticVersionInputSchema = z32.object({
8801
+ package: z32.string(),
8707
8802
  language: LanguageEnumSchema,
8708
- githubRepository: z31.string().nullish()
8803
+ githubRepository: z32.string().nullish()
8709
8804
  });
8710
- var ComputeSemanticVersionOutputSchema = z31.object({
8711
- version: z31.string(),
8805
+ var ComputeSemanticVersionOutputSchema = z32.object({
8806
+ version: z32.string(),
8712
8807
  bump: VersionBumpEnumSchema
8713
8808
  });
8714
8809
  var sdksContract = {
@@ -8734,32 +8829,32 @@ var import_fetch20 = require("@orpc/openapi-client/fetch");
8734
8829
 
8735
8830
  // src/orpc-client/slugs/contract.ts
8736
8831
  var import_contract37 = require("@orpc/contract");
8737
- var z32 = __toESM(require("zod"), 1);
8738
- var SlugsInputSchema = z32.object({
8739
- domain: z32.string(),
8740
- basepath: z32.string().optional().default("")
8741
- });
8742
- var SlugEntrySchema = z32.object({
8743
- orgId: z32.string(),
8744
- domain: z32.string(),
8745
- basepath: z32.string(),
8746
- slug: z32.string(),
8747
- lastUpdated: z32.string()
8748
- });
8749
- var MarkdownEntrySchema = z32.object({
8750
- orgId: z32.string(),
8751
- domain: z32.string(),
8752
- basepath: z32.string(),
8753
- pageId: z32.string(),
8754
- slug: z32.string(),
8755
- hash: z32.string(),
8756
- lastUpdated: z32.string()
8757
- });
8758
- var GetSlugEntriesResponseSchema = z32.object({
8759
- entries: z32.array(SlugEntrySchema)
8760
- });
8761
- var GetMarkdownEntriesResponseSchema = z32.object({
8762
- entries: z32.array(MarkdownEntrySchema)
8832
+ var z33 = __toESM(require("zod"), 1);
8833
+ var SlugsInputSchema = z33.object({
8834
+ domain: z33.string(),
8835
+ basepath: z33.string().optional().default("")
8836
+ });
8837
+ var SlugEntrySchema = z33.object({
8838
+ orgId: z33.string(),
8839
+ domain: z33.string(),
8840
+ basepath: z33.string(),
8841
+ slug: z33.string(),
8842
+ lastUpdated: z33.string()
8843
+ });
8844
+ var MarkdownEntrySchema = z33.object({
8845
+ orgId: z33.string(),
8846
+ domain: z33.string(),
8847
+ basepath: z33.string(),
8848
+ pageId: z33.string(),
8849
+ slug: z33.string(),
8850
+ hash: z33.string(),
8851
+ lastUpdated: z33.string()
8852
+ });
8853
+ var GetSlugEntriesResponseSchema = z33.object({
8854
+ entries: z33.array(SlugEntrySchema)
8855
+ });
8856
+ var GetMarkdownEntriesResponseSchema = z33.object({
8857
+ entries: z33.array(MarkdownEntrySchema)
8763
8858
  });
8764
8859
  var slugsContract = {
8765
8860
  getSlugEntries: import_contract37.oc.route({ method: "POST", path: "/slugs" }).input(SlugsInputSchema).output(GetSlugEntriesResponseSchema),
@@ -8785,102 +8880,102 @@ var import_fetch21 = require("@orpc/openapi-client/fetch");
8785
8880
 
8786
8881
  // src/orpc-client/snippets/contract.ts
8787
8882
  var import_contract39 = require("@orpc/contract");
8788
- var z33 = __toESM(require("zod"), 1);
8789
- var TypeScriptSdkSchema = z33.object({ package: z33.string(), version: z33.string() });
8790
- var PythonSdkSchema = z33.object({ package: z33.string(), version: z33.string() });
8791
- var GoSdkSchema = z33.object({ githubRepo: z33.string(), version: z33.string() });
8792
- var RubySdkSchema = z33.object({ gem: z33.string(), version: z33.string() });
8793
- var JavaSdkSchema = z33.object({ group: z33.string(), artifact: z33.string(), version: z33.string() });
8794
- var CsharpSdkSchema = z33.object({ package: z33.string(), version: z33.string() });
8795
- var BaseSnippetCreateSchema = z33.object({
8883
+ var z34 = __toESM(require("zod"), 1);
8884
+ var TypeScriptSdkSchema = z34.object({ package: z34.string(), version: z34.string() });
8885
+ var PythonSdkSchema = z34.object({ package: z34.string(), version: z34.string() });
8886
+ var GoSdkSchema = z34.object({ githubRepo: z34.string(), version: z34.string() });
8887
+ var RubySdkSchema = z34.object({ gem: z34.string(), version: z34.string() });
8888
+ var JavaSdkSchema = z34.object({ group: z34.string(), artifact: z34.string(), version: z34.string() });
8889
+ var CsharpSdkSchema = z34.object({ package: z34.string(), version: z34.string() });
8890
+ var BaseSnippetCreateSchema = z34.object({
8796
8891
  endpoint: EndpointIdentifierSchema,
8797
- exampleIdentifier: z33.string().nullish()
8892
+ exampleIdentifier: z34.string().nullish()
8798
8893
  });
8799
- var SdkSnippetsCreateSchema = z33.discriminatedUnion("type", [
8800
- z33.object({
8801
- type: z33.literal("typescript"),
8894
+ var SdkSnippetsCreateSchema = z34.discriminatedUnion("type", [
8895
+ z34.object({
8896
+ type: z34.literal("typescript"),
8802
8897
  sdk: TypeScriptSdkSchema,
8803
- snippets: z33.array(BaseSnippetCreateSchema.extend({ snippet: z33.object({ client: z33.string() }) }))
8898
+ snippets: z34.array(BaseSnippetCreateSchema.extend({ snippet: z34.object({ client: z34.string() }) }))
8804
8899
  }),
8805
- z33.object({
8806
- type: z33.literal("python"),
8900
+ z34.object({
8901
+ type: z34.literal("python"),
8807
8902
  sdk: PythonSdkSchema,
8808
- snippets: z33.array(
8903
+ snippets: z34.array(
8809
8904
  BaseSnippetCreateSchema.extend({
8810
- snippet: z33.object({ async_client: z33.string(), sync_client: z33.string() })
8905
+ snippet: z34.object({ async_client: z34.string(), sync_client: z34.string() })
8811
8906
  })
8812
8907
  )
8813
8908
  }),
8814
- z33.object({
8815
- type: z33.literal("go"),
8909
+ z34.object({
8910
+ type: z34.literal("go"),
8816
8911
  sdk: GoSdkSchema,
8817
- snippets: z33.array(BaseSnippetCreateSchema.extend({ snippet: z33.object({ client: z33.string() }) }))
8912
+ snippets: z34.array(BaseSnippetCreateSchema.extend({ snippet: z34.object({ client: z34.string() }) }))
8818
8913
  }),
8819
- z33.object({
8820
- type: z33.literal("java"),
8914
+ z34.object({
8915
+ type: z34.literal("java"),
8821
8916
  sdk: JavaSdkSchema,
8822
- snippets: z33.array(
8917
+ snippets: z34.array(
8823
8918
  BaseSnippetCreateSchema.extend({
8824
- snippet: z33.object({ async_client: z33.string(), sync_client: z33.string() })
8919
+ snippet: z34.object({ async_client: z34.string(), sync_client: z34.string() })
8825
8920
  })
8826
8921
  )
8827
8922
  }),
8828
- z33.object({
8829
- type: z33.literal("ruby"),
8923
+ z34.object({
8924
+ type: z34.literal("ruby"),
8830
8925
  sdk: RubySdkSchema,
8831
- snippets: z33.array(BaseSnippetCreateSchema.extend({ snippet: z33.object({ client: z33.string() }) }))
8926
+ snippets: z34.array(BaseSnippetCreateSchema.extend({ snippet: z34.object({ client: z34.string() }) }))
8832
8927
  }),
8833
- z33.object({
8834
- type: z33.literal("csharp"),
8928
+ z34.object({
8929
+ type: z34.literal("csharp"),
8835
8930
  sdk: CsharpSdkSchema,
8836
- snippets: z33.array(BaseSnippetCreateSchema.extend({ snippet: z33.object({ client: z33.string() }) }))
8931
+ snippets: z34.array(BaseSnippetCreateSchema.extend({ snippet: z34.object({ client: z34.string() }) }))
8837
8932
  })
8838
8933
  ]);
8839
8934
  var snippetsFactoryContract = {
8840
8935
  createSnippetsForSdk: import_contract39.oc.route({ method: "POST", path: "/create" }).input(
8841
- z33.object({
8842
- orgId: z33.string(),
8843
- apiId: z33.string(),
8936
+ z34.object({
8937
+ orgId: z34.string(),
8938
+ apiId: z34.string(),
8844
8939
  snippets: SdkSnippetsCreateSchema
8845
8940
  })
8846
8941
  )
8847
8942
  };
8848
- var ParameterPayloadSchema = z33.object({
8849
- name: z33.string(),
8850
- value: z33.unknown()
8943
+ var ParameterPayloadSchema = z34.object({
8944
+ name: z34.string(),
8945
+ value: z34.unknown()
8851
8946
  });
8852
- var AuthPayloadSchema = z33.discriminatedUnion("type", [
8853
- z33.object({ type: z33.literal("bearer"), token: z33.string() }),
8854
- z33.object({ type: z33.literal("basic"), username: z33.string(), password: z33.string() })
8947
+ var AuthPayloadSchema = z34.discriminatedUnion("type", [
8948
+ z34.object({ type: z34.literal("bearer"), token: z34.string() }),
8949
+ z34.object({ type: z34.literal("basic"), username: z34.string(), password: z34.string() })
8855
8950
  ]);
8856
- var CustomSnippetPayloadSchema = z33.object({
8857
- headers: z33.array(ParameterPayloadSchema).nullish(),
8858
- pathParameters: z33.array(ParameterPayloadSchema).nullish(),
8859
- queryParameters: z33.array(ParameterPayloadSchema).nullish(),
8860
- requestBody: z33.unknown().nullish(),
8951
+ var CustomSnippetPayloadSchema = z34.object({
8952
+ headers: z34.array(ParameterPayloadSchema).nullish(),
8953
+ pathParameters: z34.array(ParameterPayloadSchema).nullish(),
8954
+ queryParameters: z34.array(ParameterPayloadSchema).nullish(),
8955
+ requestBody: z34.unknown().nullish(),
8861
8956
  auth: AuthPayloadSchema.nullish()
8862
8957
  });
8863
8958
  var snippetsContract = {
8864
8959
  get: import_contract39.oc.route({ method: "POST", path: "/" }).input(
8865
- z33.object({
8866
- orgId: z33.string().nullish(),
8867
- apiId: z33.string().nullish(),
8868
- sdks: z33.array(SdkRequestSchema).nullish(),
8960
+ z34.object({
8961
+ orgId: z34.string().nullish(),
8962
+ apiId: z34.string().nullish(),
8963
+ sdks: z34.array(SdkRequestSchema).nullish(),
8869
8964
  endpoint: EndpointIdentifierSchema,
8870
- exampleIdentifier: z33.string().nullish(),
8965
+ exampleIdentifier: z34.string().nullish(),
8871
8966
  payload: CustomSnippetPayloadSchema.nullish()
8872
8967
  })
8873
- ).output(z33.array(z33.unknown())),
8968
+ ).output(z34.array(z34.unknown())),
8874
8969
  load: import_contract39.oc.route({ method: "POST", path: "/load" }).input(
8875
- z33.object({
8876
- orgId: z33.string().nullish(),
8877
- apiId: z33.string().nullish(),
8878
- sdks: z33.array(SdkRequestSchema).nullish()
8970
+ z34.object({
8971
+ orgId: z34.string().nullish(),
8972
+ apiId: z34.string().nullish(),
8973
+ sdks: z34.array(SdkRequestSchema).nullish()
8879
8974
  })
8880
8975
  ).output(
8881
- z33.object({
8882
- next: z33.number().nullish(),
8883
- snippets: z33.record(z33.string(), z33.unknown())
8976
+ z34.object({
8977
+ next: z34.number().nullish(),
8978
+ snippets: z34.record(z34.string(), z34.unknown())
8884
8979
  })
8885
8980
  )
8886
8981
  };
@@ -8915,44 +9010,44 @@ var import_fetch22 = require("@orpc/openapi-client/fetch");
8915
9010
 
8916
9011
  // src/orpc-client/templates/contract.ts
8917
9012
  var import_contract41 = require("@orpc/contract");
8918
- var z34 = __toESM(require("zod"), 1);
8919
- var SnippetRegistryEntrySchema = z34.object({
9013
+ var z35 = __toESM(require("zod"), 1);
9014
+ var SnippetRegistryEntrySchema = z35.object({
8920
9015
  sdk: SdkSchema,
8921
- endpointId: z34.object({
8922
- path: z34.string(),
9016
+ endpointId: z35.object({
9017
+ path: z35.string(),
8923
9018
  method: HttpMethodSchema,
8924
- identifierOverride: z34.string().nullish()
9019
+ identifierOverride: z35.string().nullish()
8925
9020
  }),
8926
- snippetTemplate: z34.object({
8927
- type: z34.literal("v1"),
8928
- functionInvocation: z34.unknown(),
8929
- clientInstantiation: z34.string()
9021
+ snippetTemplate: z35.object({
9022
+ type: z35.literal("v1"),
9023
+ functionInvocation: z35.unknown(),
9024
+ clientInstantiation: z35.string()
8930
9025
  }),
8931
- additionalTemplates: z34.record(z34.string(), z34.unknown()).nullish()
9026
+ additionalTemplates: z35.record(z35.string(), z35.unknown()).nullish()
8932
9027
  });
8933
- var RegisterInputSchema = z34.object({
8934
- orgId: z34.string(),
8935
- apiId: z34.string(),
8936
- apiDefinitionId: z34.string(),
9028
+ var RegisterInputSchema = z35.object({
9029
+ orgId: z35.string(),
9030
+ apiId: z35.string(),
9031
+ apiDefinitionId: z35.string(),
8937
9032
  snippet: SnippetRegistryEntrySchema
8938
9033
  });
8939
- var RegisterBatchInputSchema = z34.object({
8940
- orgId: z34.string(),
8941
- apiId: z34.string(),
8942
- apiDefinitionId: z34.string(),
8943
- snippets: z34.array(SnippetRegistryEntrySchema)
9034
+ var RegisterBatchInputSchema = z35.object({
9035
+ orgId: z35.string(),
9036
+ apiId: z35.string(),
9037
+ apiDefinitionId: z35.string(),
9038
+ snippets: z35.array(SnippetRegistryEntrySchema)
8944
9039
  });
8945
- var GetInputSchema = z34.object({
8946
- orgId: z34.string(),
8947
- apiId: z34.string(),
9040
+ var GetInputSchema = z35.object({
9041
+ orgId: z35.string(),
9042
+ apiId: z35.string(),
8948
9043
  sdk: SdkSchema,
8949
- endpointId: z34.object({
8950
- path: z34.string(),
9044
+ endpointId: z35.object({
9045
+ path: z35.string(),
8951
9046
  method: HttpMethodSchema,
8952
- identifierOverride: z34.string().nullish()
9047
+ identifierOverride: z35.string().nullish()
8953
9048
  })
8954
9049
  });
8955
- var EndpointSnippetTemplateSchema = z34.record(z34.string(), z34.unknown());
9050
+ var EndpointSnippetTemplateSchema = z35.record(z35.string(), z35.unknown());
8956
9051
  var templatesContract = {
8957
9052
  register: import_contract41.oc.route({ method: "POST", path: "/register" }).input(RegisterInputSchema),
8958
9053
  registerBatch: import_contract41.oc.route({ method: "POST", path: "/register/batch" }).input(RegisterBatchInputSchema),
@@ -8979,18 +9074,18 @@ var import_fetch23 = require("@orpc/openapi-client/fetch");
8979
9074
 
8980
9075
  // src/orpc-client/tokens/contract.ts
8981
9076
  var import_contract43 = require("@orpc/contract");
8982
- var z35 = __toESM(require("zod"), 1);
8983
- var GenerateTokenInputSchema = z35.object({
8984
- orgId: z35.string(),
8985
- scope: z35.string()
9077
+ var z36 = __toESM(require("zod"), 1);
9078
+ var GenerateTokenInputSchema = z36.object({
9079
+ orgId: z36.string(),
9080
+ scope: z36.string()
8986
9081
  });
8987
- var RevokeTokenInputSchema = z35.object({
8988
- orgId: z35.string(),
8989
- tokenId: z35.string()
9082
+ var RevokeTokenInputSchema = z36.object({
9083
+ orgId: z36.string(),
9084
+ tokenId: z36.string()
8990
9085
  });
8991
- var GenerateTokenOutputSchema = z35.object({
8992
- token: z35.string(),
8993
- id: z35.string()
9086
+ var GenerateTokenOutputSchema = z36.object({
9087
+ token: z36.string(),
9088
+ id: z36.string()
8994
9089
  });
8995
9090
  var tokensContract = {
8996
9091
  generate: import_contract43.oc.route({ method: "POST", path: "/generate" }).input(GenerateTokenInputSchema).output(GenerateTokenOutputSchema),
@@ -9048,24 +9143,24 @@ var import_fetch24 = require("@orpc/openapi-client/fetch");
9048
9143
 
9049
9144
  // src/orpc-client/docs/v1/write/contract.ts
9050
9145
  var import_contract45 = require("@orpc/contract");
9051
- var z36 = __toESM(require("zod"), 1);
9052
- var StartDocsRegisterV1InputSchema = z36.object({
9053
- orgId: z36.string(),
9054
- domain: z36.string(),
9055
- filepaths: z36.array(z36.string())
9146
+ var z37 = __toESM(require("zod"), 1);
9147
+ var StartDocsRegisterV1InputSchema = z37.object({
9148
+ orgId: z37.string(),
9149
+ domain: z37.string(),
9150
+ filepaths: z37.array(z37.string())
9056
9151
  });
9057
- var StartDocsRegisterV1ResponseSchema = z36.object({
9058
- docsRegistrationId: z36.string(),
9059
- uploadUrls: z36.record(z36.string(), FileS3UploadUrlSchema),
9060
- skippedFiles: z36.array(z36.string())
9152
+ var StartDocsRegisterV1ResponseSchema = z37.object({
9153
+ docsRegistrationId: z37.string(),
9154
+ uploadUrls: z37.record(z37.string(), FileS3UploadUrlSchema),
9155
+ skippedFiles: z37.array(z37.string())
9061
9156
  });
9062
- var FinishDocsRegisterV1InputSchema = z36.object({
9063
- docsRegistrationId: z36.string(),
9064
- docsDefinition: z36.unknown()
9157
+ var FinishDocsRegisterV1InputSchema = z37.object({
9158
+ docsRegistrationId: z37.string(),
9159
+ docsDefinition: z37.unknown()
9065
9160
  });
9066
9161
  var docsV1WriteContract = {
9067
9162
  startDocsRegister: import_contract45.oc.route({ method: "POST", path: "/init" }).input(StartDocsRegisterV1InputSchema).output(StartDocsRegisterV1ResponseSchema),
9068
- finishDocsRegister: import_contract45.oc.route({ method: "POST", path: "/register/{docsRegistrationId}" }).input(FinishDocsRegisterV1InputSchema).output(z36.void())
9163
+ finishDocsRegister: import_contract45.oc.route({ method: "POST", path: "/register/{docsRegistrationId}" }).input(FinishDocsRegisterV1InputSchema).output(z37.void())
9069
9164
  };
9070
9165
 
9071
9166
  // src/orpc-client/docs/v1/write/client.ts
@@ -9087,116 +9182,116 @@ var import_fetch25 = require("@orpc/openapi-client/fetch");
9087
9182
 
9088
9183
  // src/orpc-client/docs-anonymous/contract.ts
9089
9184
  var import_contract47 = require("@orpc/contract");
9090
- var z37 = __toESM(require("zod"), 1);
9091
- var AnonymousDocsSiteLimitsSchema = z37.object({
9092
- maxPages: z37.number().int(),
9093
- maxBytes: z37.number().int(),
9094
- maxPublishes: z37.number().int()
9185
+ var z38 = __toESM(require("zod"), 1);
9186
+ var AnonymousDocsSiteLimitsSchema = z38.object({
9187
+ maxPages: z38.number().int(),
9188
+ maxBytes: z38.number().int(),
9189
+ maxPublishes: z38.number().int()
9095
9190
  });
9096
- var CreateAnonymousDocsSiteInputSchema = z37.object({
9191
+ var CreateAnonymousDocsSiteInputSchema = z38.object({
9097
9192
  /** Publisher-chosen key; the same key returns the same live site. */
9098
- idempotencyKey: z37.string().min(1).max(128).optional(),
9193
+ idempotencyKey: z38.string().min(1).max(128).optional(),
9099
9194
  /** With an existing site, issue a fresh publish token and invalidate the previous one. */
9100
- rotateToken: z37.boolean().optional()
9195
+ rotateToken: z38.boolean().optional()
9101
9196
  });
9102
- var CreateAnonymousDocsSiteResponseSchema = z37.object({
9103
- siteId: z37.string(),
9104
- orgId: z37.string(),
9105
- domain: z37.string(),
9106
- url: z37.string(),
9197
+ var CreateAnonymousDocsSiteResponseSchema = z38.object({
9198
+ siteId: z38.string(),
9199
+ orgId: z38.string(),
9200
+ domain: z38.string(),
9201
+ url: z38.string(),
9107
9202
  /** `fern_anon_...` bearer, accepted only for `orgId` while the site is live and before `expiresAt`. Shown once; absent on an idempotent hit without `rotateToken`. */
9108
- publishToken: z37.string().optional(),
9203
+ publishToken: z38.string().optional(),
9109
9204
  /** `https://<domain>/__fern/claim/<claim-token>`, single use. Shown once; absent on an idempotent hit. */
9110
- claimUrl: z37.string().optional(),
9111
- expiresAt: z37.string(),
9205
+ claimUrl: z38.string().optional(),
9206
+ expiresAt: z38.string(),
9112
9207
  limits: AnonymousDocsSiteLimitsSchema
9113
9208
  });
9114
9209
  var ANONYMOUS_DOCS_WORKER_SECRET_HEADER = "x-fern-drop-worker-secret";
9115
- var ConsumeAnonymousClaimTokenInputSchema = z37.object({
9116
- claimToken: z37.string().min(1)
9117
- });
9118
- var ConsumeAnonymousClaimTokenResponseSchema = z37.object({
9119
- siteId: z37.string(),
9120
- domain: z37.string(),
9121
- cookieSecret: z37.string(),
9122
- expiresAt: z37.string()
9123
- });
9124
- var CreateAnonymousClaimGrantInputSchema = z37.object({
9125
- siteId: z37.string(),
9126
- cookieSecret: z37.string().min(1)
9127
- });
9128
- var CreateAnonymousClaimGrantResponseSchema = z37.object({
9129
- grant: z37.string(),
9130
- expiresAt: z37.string()
9131
- });
9132
- var AnonymousClaimStatusSchema = z37.enum(["claimable", "expired", "claimed", "invalid"]);
9133
- var GetAnonymousClaimInputSchema = z37.object({
9134
- grant: z37.string()
9135
- });
9136
- var GetAnonymousClaimResponseSchema = z37.object({
9137
- siteId: z37.string(),
9138
- domain: z37.string(),
9139
- createdAt: z37.string(),
9140
- expiresAt: z37.string(),
9210
+ var ConsumeAnonymousClaimTokenInputSchema = z38.object({
9211
+ claimToken: z38.string().min(1)
9212
+ });
9213
+ var ConsumeAnonymousClaimTokenResponseSchema = z38.object({
9214
+ siteId: z38.string(),
9215
+ domain: z38.string(),
9216
+ cookieSecret: z38.string(),
9217
+ expiresAt: z38.string()
9218
+ });
9219
+ var CreateAnonymousClaimGrantInputSchema = z38.object({
9220
+ siteId: z38.string(),
9221
+ cookieSecret: z38.string().min(1)
9222
+ });
9223
+ var CreateAnonymousClaimGrantResponseSchema = z38.object({
9224
+ grant: z38.string(),
9225
+ expiresAt: z38.string()
9226
+ });
9227
+ var AnonymousClaimStatusSchema = z38.enum(["claimable", "expired", "claimed", "invalid"]);
9228
+ var GetAnonymousClaimInputSchema = z38.object({
9229
+ grant: z38.string()
9230
+ });
9231
+ var GetAnonymousClaimResponseSchema = z38.object({
9232
+ siteId: z38.string(),
9233
+ domain: z38.string(),
9234
+ createdAt: z38.string(),
9235
+ expiresAt: z38.string(),
9141
9236
  status: AnonymousClaimStatusSchema,
9142
- pageCount: z37.number().int(),
9143
- claimedByOrgId: z37.string().optional()
9237
+ pageCount: z38.number().int(),
9238
+ claimedByOrgId: z38.string().optional()
9144
9239
  });
9145
- var ClaimAnonymousDocsSiteInputSchema = z37.object({
9146
- grant: z37.string(),
9147
- toOrgId: z37.string(),
9240
+ var ClaimAnonymousDocsSiteInputSchema = z38.object({
9241
+ grant: z38.string(),
9242
+ toOrgId: z38.string(),
9148
9243
  /**
9149
9244
  * The `<name>.<docs suffix>` address the claimed site moves to, instead of keeping its
9150
9245
  * `drop-<id>` host (a bare name is accepted too). Refused with `invalid_domain` (400) when it
9151
9246
  * is not one label under the docs suffix or is a drop name, and `domain_taken` (409) when any
9152
9247
  * site already uses it. The drop host redirects to the new address once it serves.
9153
9248
  */
9154
- domain: z37.string().optional()
9249
+ domain: z38.string().optional()
9155
9250
  });
9156
- var ClaimAnonymousDocsSiteResponseSchema = z37.object({
9157
- siteId: z37.string(),
9158
- domain: z37.string(),
9251
+ var ClaimAnonymousDocsSiteResponseSchema = z38.object({
9252
+ siteId: z38.string(),
9253
+ domain: z38.string(),
9159
9254
  /** The drop host the site moved from, when the claim gave it a new address; it serves until `domain` does. */
9160
- previousDomain: z37.string().optional(),
9161
- orgId: z37.string(),
9162
- buildId: z37.string()
9163
- });
9164
- var GetGuestDocsSiteInputSchema = z37.object({
9165
- orgId: z37.string()
9166
- });
9167
- var GetGuestDocsSiteResponseSchema = z37.object({
9168
- siteId: z37.string(),
9169
- orgId: z37.string(),
9170
- domain: z37.string(),
9171
- url: z37.string(),
9172
- status: z37.string(),
9173
- expiresAt: z37.string(),
9255
+ previousDomain: z38.string().optional(),
9256
+ orgId: z38.string(),
9257
+ buildId: z38.string()
9258
+ });
9259
+ var GetGuestDocsSiteInputSchema = z38.object({
9260
+ orgId: z38.string()
9261
+ });
9262
+ var GetGuestDocsSiteResponseSchema = z38.object({
9263
+ siteId: z38.string(),
9264
+ orgId: z38.string(),
9265
+ domain: z38.string(),
9266
+ url: z38.string(),
9267
+ status: z38.string(),
9268
+ expiresAt: z38.string(),
9174
9269
  /** The claim link is returned by every docs-ledger `finish`, not here. */
9175
9270
  limits: AnonymousDocsSiteLimitsSchema
9176
9271
  });
9177
- var RehomeGuestSessionInputSchema = z37.object({
9272
+ var RehomeGuestSessionInputSchema = z38.object({
9178
9273
  /** The session's `guest-<id>` organization, as the claim page shows it. */
9179
- guestOrgId: z37.string(),
9274
+ guestOrgId: z38.string(),
9180
9275
  /**
9181
9276
  * The `<name>.<docs suffix>` address the session's published site takes instead of its
9182
9277
  * `drop-<id>` host (a bare name is accepted too); same rules and errors as `claim`'s `domain`.
9183
9278
  */
9184
- domain: z37.string().optional()
9279
+ domain: z38.string().optional()
9185
9280
  });
9186
- var RehomedGuestSiteSchema = z37.object({
9187
- siteId: z37.string(),
9188
- domain: z37.string(),
9281
+ var RehomedGuestSiteSchema = z38.object({
9282
+ siteId: z38.string(),
9283
+ domain: z38.string(),
9189
9284
  /** The drop host the site moved from, when it took a new address; it serves until `domain` does. */
9190
- previousDomain: z37.string().optional(),
9285
+ previousDomain: z38.string().optional(),
9191
9286
  /** The build the site serves at `domain`; absent for a site that was never published. */
9192
- buildId: z37.string().optional()
9287
+ buildId: z38.string().optional()
9193
9288
  });
9194
- var RehomeGuestSessionResponseSchema = z37.object({
9195
- sessionId: z37.string(),
9289
+ var RehomeGuestSessionResponseSchema = z38.object({
9290
+ sessionId: z38.string(),
9196
9291
  /** Where the sites are now: the organization Venus says the session was claimed into. */
9197
- orgId: z37.string(),
9292
+ orgId: z38.string(),
9198
9293
  /** The sites moved by this call; empty when there was nothing (left) to move. */
9199
- sites: z37.array(RehomedGuestSiteSchema)
9294
+ sites: z38.array(RehomedGuestSiteSchema)
9200
9295
  });
9201
9296
  var docsAnonymousContract = {
9202
9297
  getGuestSite: import_contract47.oc.route({ method: "GET", path: "/anonymous/guest-site" }).input(GetGuestDocsSiteInputSchema).output(GetGuestDocsSiteResponseSchema),
@@ -9207,52 +9302,52 @@ var docsAnonymousContract = {
9207
9302
  claim: import_contract47.oc.route({ method: "POST", path: "/anonymous/claim" }).input(ClaimAnonymousDocsSiteInputSchema).output(ClaimAnonymousDocsSiteResponseSchema),
9208
9303
  rehomeGuestSession: import_contract47.oc.route({ method: "POST", path: "/anonymous/guest-session/rehome" }).input(RehomeGuestSessionInputSchema).output(RehomeGuestSessionResponseSchema)
9209
9304
  };
9210
- var AnonymousDocsConfigDocumentSchema = z37.object({
9211
- enabled: z37.boolean(),
9212
- ttlSeconds: z37.number().int(),
9213
- graceSeconds: z37.number().int(),
9214
- claimGrantTtlSeconds: z37.number().int(),
9215
- maxPages: z37.number().int(),
9216
- maxBytes: z37.number().int(),
9217
- maxPublishesPerSite: z37.number().int(),
9218
- maxCreatesPerIpPerHour: z37.number().int(),
9219
- maxCreatesPerHourGlobal: z37.number().int(),
9220
- maxConcurrentBuilds: z37.number().int()
9305
+ var AnonymousDocsConfigDocumentSchema = z38.object({
9306
+ enabled: z38.boolean(),
9307
+ ttlSeconds: z38.number().int(),
9308
+ graceSeconds: z38.number().int(),
9309
+ claimGrantTtlSeconds: z38.number().int(),
9310
+ maxPages: z38.number().int(),
9311
+ maxBytes: z38.number().int(),
9312
+ maxPublishesPerSite: z38.number().int(),
9313
+ maxCreatesPerIpPerHour: z38.number().int(),
9314
+ maxCreatesPerHourGlobal: z38.number().int(),
9315
+ maxConcurrentBuilds: z38.number().int()
9221
9316
  }).strict();
9222
- var AnonymousDocsConfigEnvironmentSchema = z37.enum(["dev", "prod"]);
9223
- var GetAnonymousDocsConfigResponseSchema = z37.object({
9317
+ var AnonymousDocsConfigEnvironmentSchema = z38.enum(["dev", "prod"]);
9318
+ var GetAnonymousDocsConfigResponseSchema = z38.object({
9224
9319
  environment: AnonymousDocsConfigEnvironmentSchema,
9225
9320
  /** The stored document (bootstrap or defaults while no row exists). */
9226
9321
  config: AnonymousDocsConfigDocumentSchema,
9227
9322
  /** What request paths see: `config` with the `ANONYMOUS_DOCS_DISABLED` emergency stop applied. */
9228
9323
  effective: AnonymousDocsConfigDocumentSchema,
9229
9324
  /** 0 until the first save; send it back as `If-Match` on PUT. */
9230
- version: z37.number().int(),
9231
- updatedBy: z37.string().nullable(),
9232
- updatedAt: z37.string().nullable(),
9233
- emergencyStopActive: z37.boolean(),
9234
- source: z37.enum(["database", "bootstrap", "defaults"])
9325
+ version: z38.number().int(),
9326
+ updatedBy: z38.string().nullable(),
9327
+ updatedAt: z38.string().nullable(),
9328
+ emergencyStopActive: z38.boolean(),
9329
+ source: z38.enum(["database", "bootstrap", "defaults"])
9235
9330
  });
9236
- var UpdateAnonymousDocsConfigInputSchema = z37.object({
9331
+ var UpdateAnonymousDocsConfigInputSchema = z38.object({
9237
9332
  config: AnonymousDocsConfigDocumentSchema.partial(),
9238
9333
  /** Email (or token id) of the operator making the change. */
9239
- updatedBy: z37.string().min(1),
9240
- reason: z37.string().min(1)
9334
+ updatedBy: z38.string().min(1),
9335
+ reason: z38.string().min(1)
9241
9336
  });
9242
- var AnonymousDocsConfigHistoryEntrySchema = z37.object({
9243
- id: z37.string(),
9337
+ var AnonymousDocsConfigHistoryEntrySchema = z38.object({
9338
+ id: z38.string(),
9244
9339
  environment: AnonymousDocsConfigEnvironmentSchema,
9245
9340
  config: AnonymousDocsConfigDocumentSchema,
9246
- version: z37.number().int(),
9247
- updatedBy: z37.string(),
9248
- reason: z37.string(),
9249
- createdAt: z37.string()
9341
+ version: z38.number().int(),
9342
+ updatedBy: z38.string(),
9343
+ reason: z38.string(),
9344
+ createdAt: z38.string()
9250
9345
  });
9251
- var GetAnonymousDocsConfigHistoryInputSchema = z37.object({
9252
- limit: z37.coerce.number().int().min(1).max(500).optional()
9346
+ var GetAnonymousDocsConfigHistoryInputSchema = z38.object({
9347
+ limit: z38.coerce.number().int().min(1).max(500).optional()
9253
9348
  });
9254
- var GetAnonymousDocsConfigHistoryResponseSchema = z37.object({
9255
- entries: z37.array(AnonymousDocsConfigHistoryEntrySchema)
9349
+ var GetAnonymousDocsConfigHistoryResponseSchema = z38.object({
9350
+ entries: z38.array(AnonymousDocsConfigHistoryEntrySchema)
9256
9351
  });
9257
9352
  var docsAnonymousAdminContract = {
9258
9353
  getConfig: import_contract47.oc.route({ method: "GET", path: "/config" }).output(GetAnonymousDocsConfigResponseSchema),
@@ -9285,7 +9380,7 @@ function createDocsAnonymousAdminClient(options) {
9285
9380
  }
9286
9381
 
9287
9382
  // src/orpc-client/docs-ledger/config-files.ts
9288
- var z38 = __toESM(require("zod"), 1);
9383
+ var z39 = __toESM(require("zod"), 1);
9289
9384
  var PATH_OR_URL_METADATA_KEYS = [
9290
9385
  "og:image",
9291
9386
  "og:logo",
@@ -9293,57 +9388,57 @@ var PATH_OR_URL_METADATA_KEYS = [
9293
9388
  "og:background-image",
9294
9389
  "og:dynamic:background-image"
9295
9390
  ];
9296
- var LogoViewSchema = z38.union([z38.string(), z38.object({ path: z38.string() }).transform((v) => v.path)]);
9297
- var ThemeViewSchema = z38.object({
9391
+ var LogoViewSchema = z39.union([z39.string(), z39.object({ path: z39.string() }).transform((v) => v.path)]);
9392
+ var ThemeViewSchema = z39.object({
9298
9393
  logo: LogoViewSchema.optional().catch(void 0),
9299
- backgroundImage: z38.string().optional().catch(void 0)
9394
+ backgroundImage: z39.string().optional().catch(void 0)
9300
9395
  });
9301
- var ColorsViewSchema = z38.union([
9302
- z38.object({
9303
- type: z38.literal("darkAndLight"),
9396
+ var ColorsViewSchema = z39.union([
9397
+ z39.object({
9398
+ type: z39.literal("darkAndLight"),
9304
9399
  dark: ThemeViewSchema.optional().catch(void 0),
9305
9400
  light: ThemeViewSchema.optional().catch(void 0)
9306
9401
  }),
9307
9402
  ThemeViewSchema.transform((theme) => ({ type: "single", theme }))
9308
9403
  ]);
9309
- var FontViewSchema = z38.object({
9310
- variants: z38.array(z38.object({ fontFile: z38.string().optional().catch(void 0) })).catch([])
9404
+ var FontViewSchema = z39.object({
9405
+ variants: z39.array(z39.object({ fontFile: z39.string().optional().catch(void 0) })).catch([])
9311
9406
  });
9312
- var TypographyViewSchema = z38.object({
9407
+ var TypographyViewSchema = z39.object({
9313
9408
  headingsFont: FontViewSchema.optional().catch(void 0),
9314
9409
  bodyFont: FontViewSchema.optional().catch(void 0),
9315
9410
  codeFont: FontViewSchema.optional().catch(void 0)
9316
9411
  });
9317
- var JsFileViewSchema = z38.union([
9318
- z38.object({ path: z38.string() }).transform((v) => v.path),
9319
- z38.object({ fileId: z38.string() }).transform((v) => v.fileId)
9412
+ var JsFileViewSchema = z39.union([
9413
+ z39.object({ path: z39.string() }).transform((v) => v.path),
9414
+ z39.object({ fileId: z39.string() }).transform((v) => v.fileId)
9320
9415
  ]);
9321
- var MetadataFileRefViewSchema = z38.object({
9322
- type: z38.enum(["path", "fileId"]),
9323
- value: z38.string()
9416
+ var MetadataFileRefViewSchema = z39.object({
9417
+ type: z39.enum(["path", "fileId"]),
9418
+ value: z39.string()
9324
9419
  });
9325
- var ConfigViewSchema = z38.object({
9326
- favicon: z38.string().optional().catch(void 0),
9420
+ var ConfigViewSchema = z39.object({
9421
+ favicon: z39.string().optional().catch(void 0),
9327
9422
  colorsV3: ColorsViewSchema.optional().catch(void 0),
9328
9423
  typographyV2: TypographyViewSchema.optional().catch(void 0),
9329
- js: z38.object({ files: z38.array(JsFileViewSchema.optional().catch(void 0)).catch([]) }).optional().catch(void 0),
9330
- metadata: z38.record(z38.string(), z38.unknown()).optional().catch(void 0)
9424
+ js: z39.object({ files: z39.array(JsFileViewSchema.optional().catch(void 0)).catch([]) }).optional().catch(void 0),
9425
+ metadata: z39.record(z39.string(), z39.unknown()).optional().catch(void 0)
9331
9426
  });
9332
9427
  function isDarkAndLight(colors) {
9333
9428
  return colors.type === "darkAndLight";
9334
9429
  }
9335
9430
  var NAV_ICON_FILE_PREFIX = "file:";
9336
- var FileTokenTreeSchema = z38.lazy(
9337
- () => z38.union([
9338
- z38.string(),
9339
- z38.number(),
9340
- z38.boolean(),
9341
- z38.null(),
9342
- z38.array(FileTokenTreeSchema),
9343
- z38.record(z38.string(), FileTokenTreeSchema)
9431
+ var FileTokenTreeSchema = z39.lazy(
9432
+ () => z39.union([
9433
+ z39.string(),
9434
+ z39.number(),
9435
+ z39.boolean(),
9436
+ z39.null(),
9437
+ z39.array(FileTokenTreeSchema),
9438
+ z39.record(z39.string(), FileTokenTreeSchema)
9344
9439
  ])
9345
9440
  );
9346
- var ConfigFileTokenViewSchema = z38.object({
9441
+ var ConfigFileTokenViewSchema = z39.object({
9347
9442
  landingPage: FileTokenTreeSchema.optional().catch(void 0)
9348
9443
  });
9349
9444
  function addFileTokenPath(paths, value) {
@@ -9365,17 +9460,17 @@ function addFileTokenPath(paths, value) {
9365
9460
  }
9366
9461
  }
9367
9462
  }
9368
- var SegmentDetailIconViewSchema = z38.object({
9369
- icon: z38.string().nullish().catch(void 0),
9370
- metadata: z38.object({
9371
- icon: z38.string().nullish().catch(void 0),
9372
- image: z38.string().nullish().catch(void 0)
9463
+ var SegmentDetailIconViewSchema = z39.object({
9464
+ icon: z39.string().nullish().catch(void 0),
9465
+ metadata: z39.object({
9466
+ icon: z39.string().nullish().catch(void 0),
9467
+ image: z39.string().nullish().catch(void 0)
9373
9468
  }).nullish().catch(void 0)
9374
9469
  });
9375
- var SegmentIconViewSchema = z38.object({
9376
- metadata: z38.object({
9377
- icon: z38.string().nullish().catch(void 0),
9378
- image: z38.string().nullish().catch(void 0)
9470
+ var SegmentIconViewSchema = z39.object({
9471
+ metadata: z39.object({
9472
+ icon: z39.string().nullish().catch(void 0),
9473
+ image: z39.string().nullish().catch(void 0)
9379
9474
  }).nullish().catch(void 0),
9380
9475
  product: SegmentDetailIconViewSchema.nullish().catch(void 0),
9381
9476
  version: SegmentDetailIconViewSchema.nullish().catch(void 0),
@@ -9459,22 +9554,22 @@ function collectConfigFilePaths(config) {
9459
9554
  }
9460
9555
 
9461
9556
  // src/orpc-client/docs-ledger/ledger-manifest.ts
9462
- var z39 = __toESM(require("zod"), 1);
9557
+ var z40 = __toESM(require("zod"), 1);
9463
9558
  var LEDGER_MANIFEST_SCHEMA_VERSION = "docsledger/20260601";
9464
9559
  var LEDGER_SHARD_SCHEMA_VERSION = "docsledger/shard/20260601";
9465
- var ManifestBlobRefSchema = z39.object({
9466
- hash: z39.string(),
9467
- contentType: z39.string()
9560
+ var ManifestBlobRefSchema = z40.object({
9561
+ hash: z40.string(),
9562
+ contentType: z40.string()
9468
9563
  });
9469
- var ManifestSegmentSchema = z39.object({
9564
+ var ManifestSegmentSchema = z40.object({
9470
9565
  /** Synthetic stable id (= segmentHash). */
9471
- segmentId: z39.string(),
9472
- segmentHash: z39.string(),
9473
- section: z39.string(),
9474
- locale: z39.string(),
9566
+ segmentId: z40.string(),
9567
+ segmentHash: z40.string(),
9568
+ section: z40.string(),
9569
+ locale: z40.string(),
9475
9570
  /** Sidebar order across segments (docs_ledger_deployment_segments.sort_order). */
9476
- sortOrder: z39.number(),
9477
- hidden: z39.boolean(),
9571
+ sortOrder: z40.number(),
9572
+ hidden: z40.boolean(),
9478
9573
  /** Segment type descriptor: { type, title, icon, apiDefinitionId, overviewPageId, pointsTo, ... }. */
9479
9574
  metadata: LedgerSegmentMetadataSchema,
9480
9575
  product: SegmentDetailSchema.nullable(),
@@ -9523,23 +9618,23 @@ function selectLedgerSegmentsForLocale(segments, locale, defaultLocale) {
9523
9618
  return [...byIdentity.values()];
9524
9619
  }
9525
9620
  var ManifestNavRouteSchema = LedgerNavRouteSchema;
9526
- var ManifestRouteBaseSchema = z39.object({
9527
- segmentHash: z39.string(),
9621
+ var ManifestRouteBaseSchema = z40.object({
9622
+ segmentHash: z40.string(),
9528
9623
  /** Key into the containing route index's sidebars map. */
9529
- sidebarKey: z39.string().nullable(),
9530
- section: z39.string(),
9531
- locale: z39.string(),
9532
- artifactId: z39.string(),
9533
- pageId: z39.string().optional(),
9624
+ sidebarKey: z40.string().nullable(),
9625
+ section: z40.string(),
9626
+ locale: z40.string(),
9627
+ artifactId: z40.string(),
9628
+ pageId: z40.string().optional(),
9534
9629
  /** CAS hash of the page content blob, or null for link/redirect artifacts. */
9535
- contentHash: z39.string().nullable(),
9536
- contentType: z39.string().nullable(),
9630
+ contentHash: z40.string().nullable(),
9631
+ contentType: z40.string().nullable(),
9537
9632
  /** ISO-8601 timestamp of when this artifact's content version was first created.
9538
9633
  * Populated at publish time from `docs_ledger_artifacts.created_at`. Optional
9539
9634
  * for backward compatibility with manifests built before this field existed. */
9540
- createdAt: z39.string().optional()
9635
+ createdAt: z40.string().optional()
9541
9636
  });
9542
- var ManifestRouteSchema = z39.discriminatedUnion("artifactType", [
9637
+ var ManifestRouteSchema = z40.discriminatedUnion("artifactType", [
9543
9638
  artifactTypeVariant(ManifestRouteBaseSchema, "markdown"),
9544
9639
  artifactTypeVariant(ManifestRouteBaseSchema, "page"),
9545
9640
  artifactTypeVariant(ManifestRouteBaseSchema, "rest"),
@@ -9555,81 +9650,81 @@ var ManifestRouteSchema = z39.discriminatedUnion("artifactType", [
9555
9650
  artifactTypeVariant(ManifestRouteBaseSchema, "image"),
9556
9651
  artifactTypeVariant(ManifestRouteBaseSchema, "redirect")
9557
9652
  ]);
9558
- var ManifestPageSchema = z39.object({
9559
- fullPath: z39.string().nullable(),
9560
- segmentHash: z39.string(),
9561
- contentHash: z39.string(),
9562
- contentType: z39.string()
9653
+ var ManifestPageSchema = z40.object({
9654
+ fullPath: z40.string().nullable(),
9655
+ segmentHash: z40.string(),
9656
+ contentHash: z40.string(),
9657
+ contentType: z40.string()
9563
9658
  });
9564
- var ManifestApiDefSchema = z39.object({
9659
+ var ManifestApiDefSchema = z40.object({
9565
9660
  /** CAS hash of the full API definition blob. */
9566
- hash: z39.string(),
9567
- contentType: z39.string(),
9661
+ hash: z40.string(),
9662
+ contentType: z40.string(),
9568
9663
  /** key = `${nodeType}:${nodeId}` (e.g. `endpoint:abc`) → pruned CAS blob. */
9569
- prunedHashes: z39.record(z39.string(), ManifestBlobRefSchema)
9570
- });
9571
- var ManifestFileSchema = z39.object({
9572
- type: z39.enum(["file", "image"]),
9573
- contentType: z39.string(),
9574
- contentLength: z39.number().optional(),
9575
- filename: z39.string(),
9576
- hash: z39.string(),
9664
+ prunedHashes: z40.record(z40.string(), ManifestBlobRefSchema)
9665
+ });
9666
+ var ManifestFileSchema = z40.object({
9667
+ type: z40.enum(["file", "image"]),
9668
+ contentType: z40.string(),
9669
+ contentLength: z40.number().optional(),
9670
+ filename: z40.string(),
9671
+ hash: z40.string(),
9577
9672
  /** Canonical fern domain the bytes were uploaded under (ADR 0010 file anchor). */
9578
- domain: z39.string(),
9579
- bucket: z39.enum(["public_docs", "private_docs"]),
9580
- width: z39.number().optional(),
9581
- height: z39.number().optional(),
9582
- blurDataURL: z39.string().optional()
9673
+ domain: z40.string(),
9674
+ bucket: z40.enum(["public_docs", "private_docs"]),
9675
+ width: z40.number().optional(),
9676
+ height: z40.number().optional(),
9677
+ blurDataURL: z40.string().optional()
9583
9678
  });
9584
- var LedgerShardFileSchema = z39.object({
9679
+ var LedgerShardFileSchema = z40.object({
9585
9680
  /** SHA-256 hex of the file bytes (docs-bucket key component). */
9586
- hash: z39.string(),
9681
+ hash: z40.string(),
9587
9682
  /** Fern-host-relative path; equals the `file:<fullPath>` token's suffix. */
9588
- fullPath: z39.string(),
9589
- contentType: z39.string(),
9590
- contentLength: z39.number().optional(),
9591
- width: z39.number().optional(),
9592
- height: z39.number().optional(),
9593
- blurDataURL: z39.string().optional(),
9683
+ fullPath: z40.string(),
9684
+ contentType: z40.string(),
9685
+ contentLength: z40.number().optional(),
9686
+ width: z40.number().optional(),
9687
+ height: z40.number().optional(),
9688
+ blurDataURL: z40.string().optional(),
9594
9689
  /**
9595
9690
  * Per-file bucket override. Absent ⇒ derive from the pointer's `isPrivate`
9596
9691
  * (`private_docs` when private, else `public_docs`). Present only for the
9597
9692
  * rare file whose bucket diverges from the deployment default.
9598
9693
  */
9599
- bucket: z39.enum(["public_docs", "private_docs"]).optional()
9694
+ bucket: z40.enum(["public_docs", "private_docs"]).optional()
9600
9695
  });
9601
- var LedgerSiblingProductSchema = z39.object({
9602
- title: z39.string(),
9696
+ var LedgerSiblingProductSchema = z40.object({
9697
+ title: z40.string(),
9603
9698
  /** Absolute href on the host (`/{basepath}/{slug}/`) or an external URL for product links. */
9604
- href: z39.string(),
9605
- subtitle: z39.string().optional()
9699
+ href: z40.string(),
9700
+ subtitle: z40.string().optional()
9606
9701
  });
9607
- var LedgerSiblingSiteSchema = z39.object({
9702
+ var LedgerSiblingSiteSchema = z40.object({
9608
9703
  /** Basepath without leading/trailing slash; "" for the root site. */
9609
- basepath: z39.string(),
9704
+ basepath: z40.string(),
9610
9705
  /** `config.title` of that site as of its last publish; null if unknown. */
9611
- title: z39.string().nullable(),
9706
+ title: z40.string().nullable(),
9612
9707
  /** Top-level products of that site as of its last publish; absent for sites published before products were snapshotted. */
9613
- products: z39.array(LedgerSiblingProductSchema).optional()
9708
+ products: z40.array(LedgerSiblingProductSchema).optional()
9614
9709
  });
9615
9710
  var LedgerLocaleConfigOverrideSchema = LedgerConfigSchema.pick({
9616
9711
  announcement: true,
9617
9712
  navbarLinks: true,
9618
9713
  settings: true
9619
9714
  });
9620
- var LedgerConfigBlobSchema = z39.object({
9621
- version: z39.string().nullable(),
9622
- git: z39.object({
9623
- repoUrl: z39.string(),
9624
- branch: z39.string(),
9625
- commitSha: z39.string().nullable().optional()
9715
+ var LedgerConfigBlobSchema = z40.object({
9716
+ version: z40.string().nullable(),
9717
+ git: z40.object({
9718
+ repoUrl: z40.string(),
9719
+ branch: z40.string(),
9720
+ commitSha: z40.string().nullable().optional()
9626
9721
  }).optional(),
9627
9722
  /** Structural config with hot-path chrome text inlined for ADR 0016 page reads. */
9628
9723
  config: LedgerConfigSchema.nullable(),
9629
9724
  /** locale → overrides applied on top of `config` for non-default locales. Absent ⇒ every locale reads `config`. */
9630
- localeConfigs: z39.record(z39.string(), LedgerLocaleConfigOverrideSchema).optional(),
9725
+ localeConfigs: z40.record(z40.string(), LedgerLocaleConfigOverrideSchema).optional(),
9631
9726
  /** Large or legacy extracted config blobs. New manifests inline header/footer/css.inline/js.inline. */
9632
- configRefs: z39.object({
9727
+ configRefs: z40.object({
9633
9728
  header: ManifestBlobRefSchema.optional(),
9634
9729
  footer: ManifestBlobRefSchema.optional(),
9635
9730
  cssInline: ManifestBlobRefSchema.optional(),
@@ -9637,43 +9732,43 @@ var LedgerConfigBlobSchema = z39.object({
9637
9732
  jsFiles: ManifestBlobRefSchema.optional()
9638
9733
  })
9639
9734
  });
9640
- var LedgerChromeBlobSchema = z39.object({
9641
- apiNameToId: z39.record(z39.string(), z39.string())
9735
+ var LedgerChromeBlobSchema = z40.object({
9736
+ apiNameToId: z40.record(z40.string(), z40.string())
9642
9737
  });
9643
- var LedgerSidebarBundleSchema = z39.object({
9644
- locale: z39.string(),
9645
- segmentHash: z39.string(),
9646
- routes: z39.array(ManifestNavRouteSchema)
9738
+ var LedgerSidebarBundleSchema = z40.object({
9739
+ locale: z40.string(),
9740
+ segmentHash: z40.string(),
9741
+ routes: z40.array(ManifestNavRouteSchema)
9647
9742
  });
9648
- var LedgerSidebarMapEntrySchema = z39.discriminatedUnion("strategy", [
9743
+ var LedgerSidebarMapEntrySchema = z40.discriminatedUnion("strategy", [
9649
9744
  LedgerSidebarBundleSchema.extend({
9650
- strategy: z39.literal("inline")
9745
+ strategy: z40.literal("inline")
9651
9746
  }),
9652
9747
  ManifestBlobRefSchema.extend({
9653
- strategy: z39.literal("ref")
9748
+ strategy: z40.literal("ref")
9654
9749
  })
9655
9750
  ]);
9656
- var LedgerLocaleIndexSchema = z39.object({
9657
- locale: z39.string(),
9658
- segments: z39.array(ManifestSegmentSchema),
9751
+ var LedgerLocaleIndexSchema = z40.object({
9752
+ locale: z40.string(),
9753
+ segments: z40.array(ManifestSegmentSchema),
9659
9754
  /** sidebarKey → inline sidebar routes, or a CAS ref when over budget. */
9660
- sidebars: z39.record(z39.string(), LedgerSidebarMapEntrySchema),
9755
+ sidebars: z40.record(z40.string(), LedgerSidebarMapEntrySchema),
9661
9756
  /** fullPath → route for this effective locale. */
9662
- routes: z39.record(z39.string(), ManifestRouteSchema),
9757
+ routes: z40.record(z40.string(), ManifestRouteSchema),
9663
9758
  /** pageId → page content reference for this effective locale. */
9664
- pages: z39.record(z39.string(), ManifestPageSchema),
9759
+ pages: z40.record(z40.string(), ManifestPageSchema),
9665
9760
  /** apiDefinitionId → full + pruned API definition blobs. */
9666
- apiDefs: z39.record(z39.string(), ManifestApiDefSchema),
9761
+ apiDefs: z40.record(z40.string(), ManifestApiDefSchema),
9667
9762
  /** fullPath → file/image artifact metadata. */
9668
- files: z39.record(z39.string(), ManifestFileSchema)
9763
+ files: z40.record(z40.string(), ManifestFileSchema)
9669
9764
  });
9670
- var LedgerRouteShardSchema = z39.object({
9671
- schema: z39.literal(LEDGER_SHARD_SCHEMA_VERSION),
9672
- locale: z39.string(),
9765
+ var LedgerRouteShardSchema = z40.object({
9766
+ schema: z40.literal(LEDGER_SHARD_SCHEMA_VERSION),
9767
+ locale: z40.string(),
9673
9768
  /** fullPath → route for the scopes packed into this shard. */
9674
- routes: z39.record(z39.string(), ManifestRouteSchema),
9769
+ routes: z40.record(z40.string(), ManifestRouteSchema),
9675
9770
  /** segmentHash → inline sidebar (or CAS ref) for every segment in this shard's scopes. */
9676
- sidebars: z39.record(z39.string(), LedgerSidebarMapEntrySchema),
9771
+ sidebars: z40.record(z40.string(), LedgerSidebarMapEntrySchema),
9677
9772
  /**
9678
9773
  * fileFullPath → lean file identity for every file/image referenced by a
9679
9774
  * page routed into this shard (ADR 0016, "File metadata on the render
@@ -9682,32 +9777,32 @@ var LedgerRouteShardSchema = z39.object({
9682
9777
  * existed or with no embedded files; the bundle then falls back to the
9683
9778
  * pointer's `files` map (`fileMetadata`/`fileArtifact`).
9684
9779
  */
9685
- files: z39.record(z39.string(), LedgerShardFileSchema).optional()
9780
+ files: z40.record(z40.string(), LedgerShardFileSchema).optional()
9686
9781
  });
9687
- var LedgerPagesBlobSchema = z39.record(z39.string(), ManifestPageSchema);
9782
+ var LedgerPagesBlobSchema = z40.record(z40.string(), ManifestPageSchema);
9688
9783
  var LedgerPointerSegmentSchema = ManifestSegmentSchema.omit({ product: true, version: true }).extend({
9689
9784
  /** Index into the locale's `productCatalog`, or null when the segment has no product. */
9690
- productIdx: z39.number().nullable(),
9785
+ productIdx: z40.number().nullable(),
9691
9786
  /** Index into the locale's `versionCatalog`, or null when the segment has no version. */
9692
- versionIdx: z39.number().nullable()
9787
+ versionIdx: z40.number().nullable()
9693
9788
  });
9694
- var LedgerLocaleRoutingSchema = z39.object({
9789
+ var LedgerLocaleRoutingSchema = z40.object({
9695
9790
  /** Compact segments catalog for the switcher chrome (product/version by index). */
9696
- segments: z39.array(LedgerPointerSegmentSchema),
9791
+ segments: z40.array(LedgerPointerSegmentSchema),
9697
9792
  /** Deduplicated product details; `LedgerPointerSegment.productIdx` indexes into this. */
9698
- productCatalog: z39.array(SegmentDetailSchema),
9793
+ productCatalog: z40.array(SegmentDetailSchema),
9699
9794
  /** Deduplicated version details; `LedgerPointerSegment.versionIdx` indexes into this. */
9700
- versionCatalog: z39.array(SegmentDetailSchema),
9795
+ versionCatalog: z40.array(SegmentDetailSchema),
9701
9796
  /** fullPath → index into `shards`. */
9702
- routing: z39.record(z39.string(), z39.number()),
9797
+ routing: z40.record(z40.string(), z40.number()),
9703
9798
  /** segmentHash → index into `shards`. */
9704
- segmentShard: z39.record(z39.string(), z39.number()),
9799
+ segmentShard: z40.record(z40.string(), z40.number()),
9705
9800
  /** Ordered list of route shards; index matches `routing`/`segmentShard`. */
9706
- shards: z39.array(z39.object({ hash: z39.string() })),
9801
+ shards: z40.array(z40.object({ hash: z40.string() })),
9707
9802
  /** versionId → first routable fullPath (version switcher). */
9708
- versionFirstRoute: z39.record(z39.string(), z39.string()),
9803
+ versionFirstRoute: z40.record(z40.string(), z40.string()),
9709
9804
  /** CAS hash of the per-locale pages blob. */
9710
- pagesHash: z39.string(),
9805
+ pagesHash: z40.string(),
9711
9806
  /**
9712
9807
  * fullPath → file/image artifact metadata for files NOT materialised into
9713
9808
  * a route shard (ADR 0016, "File metadata on the render path"): config
@@ -9716,31 +9811,31 @@ var LedgerLocaleRoutingSchema = z39.object({
9716
9811
  * Page-body images are pruned from here and live in their route shard's
9717
9812
  * `files` map instead. Read via `fileMetadata` / `fileArtifact`.
9718
9813
  */
9719
- files: z39.record(z39.string(), ManifestFileSchema),
9814
+ files: z40.record(z40.string(), ManifestFileSchema),
9720
9815
  /** apiDefinitionId → full + pruned API definition blobs. */
9721
- apiDefs: z39.record(z39.string(), ManifestApiDefSchema)
9816
+ apiDefs: z40.record(z40.string(), ManifestApiDefSchema)
9722
9817
  });
9723
- var LedgerManifestSchema = z39.object({
9724
- schema: z39.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
9818
+ var LedgerManifestSchema = z40.object({
9819
+ schema: z40.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
9725
9820
  // ── Pointer / current-version fields ──────────────────────────────
9726
- orgId: z39.string(),
9727
- domain: z39.string(),
9728
- basepath: z39.string(),
9729
- deploymentId: z39.string(),
9730
- deploymentHash: z39.string(),
9731
- siteId: z39.string(),
9821
+ orgId: z40.string(),
9822
+ domain: z40.string(),
9823
+ basepath: z40.string(),
9824
+ deploymentId: z40.string(),
9825
+ deploymentHash: z40.string(),
9826
+ siteId: z40.string(),
9732
9827
  /** ISO-8601 timestamp the publish became live (request time). */
9733
- assignedAt: z39.string(),
9734
- assignedBy: z39.string().nullable(),
9735
- isPreview: z39.boolean(),
9736
- isPrivate: z39.boolean(),
9828
+ assignedAt: z40.string(),
9829
+ assignedBy: z40.string().nullable(),
9830
+ isPreview: z40.boolean(),
9831
+ isPrivate: z40.boolean(),
9737
9832
  /**
9738
9833
  * Whether Ask AI is enabled for this URL, snapshotted from FAI's settings at
9739
9834
  * publish time so the static build renders Ask AI chrome without asking FAI
9740
9835
  * itself. Absent on pointers written before the field existed (or when the
9741
9836
  * lookup failed); readers then fall back to querying FAI.
9742
9837
  */
9743
- askAiEnabled: z39.boolean().optional(),
9838
+ askAiEnabled: z40.boolean().optional(),
9744
9839
  /**
9745
9840
  * Every live site on this host (including this one and the root site, if
9746
9841
  * any), snapshotted from the registry at publish time so the fleet site
@@ -9749,16 +9844,16 @@ var LedgerManifestSchema = z39.object({
9749
9844
  * Publish-time snapshot: a newly added sibling appears here after this
9750
9845
  * site's next publish.
9751
9846
  */
9752
- siblingSites: z39.array(LedgerSiblingSiteSchema).optional(),
9847
+ siblingSites: z40.array(LedgerSiblingSiteSchema).optional(),
9753
9848
  /**
9754
9849
  * Every hostname this publish is served on (the fern URL plus its
9755
9850
  * `customDomains`), so the runtime knows which hosts form one site (e.g.
9756
9851
  * whether analytics cookies must be shared across sibling subdomains).
9757
9852
  * Absent on pointers written before the field existed.
9758
9853
  */
9759
- siteHosts: z39.array(z39.string()).optional(),
9854
+ siteHosts: z40.array(z40.string()).optional(),
9760
9855
  /** Default locale for the deployment — read-path fallback when a translation is absent. */
9761
- defaultLocale: z39.string(),
9856
+ defaultLocale: z40.string(),
9762
9857
  /**
9763
9858
  * Canonical fern domain all file bytes are anchored under (ADR 0010). The
9764
9859
  * read client builds the public `/_files/{fileAnchorDomain}/{hash}/{fullPath}`
@@ -9767,19 +9862,19 @@ var LedgerManifestSchema = z39.object({
9767
9862
  * written before shard-side files; absent ⇒ the client falls back to the
9768
9863
  * pointer `files` map (which still carries per-file `domain`).
9769
9864
  */
9770
- fileAnchorDomain: z39.string().optional(),
9865
+ fileAnchorDomain: z40.string().optional(),
9771
9866
  config: LedgerConfigBlobSchema,
9772
9867
  chrome: LedgerChromeBlobSchema,
9773
- locales: z39.record(z39.string(), LedgerLocaleRoutingSchema)
9774
- });
9775
- var LedgerSiteArtifactSchema = z39.union([
9776
- z39.object({
9777
- schema: z39.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
9778
- unpublished: z39.literal(true),
9779
- orgId: z39.string(),
9780
- domain: z39.string(),
9781
- basepath: z39.string(),
9782
- isPreview: z39.boolean()
9868
+ locales: z40.record(z40.string(), LedgerLocaleRoutingSchema)
9869
+ });
9870
+ var LedgerSiteArtifactSchema = z40.union([
9871
+ z40.object({
9872
+ schema: z40.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
9873
+ unpublished: z40.literal(true),
9874
+ orgId: z40.string(),
9875
+ domain: z40.string(),
9876
+ basepath: z40.string(),
9877
+ isPreview: z40.boolean()
9783
9878
  }),
9784
9879
  LedgerManifestSchema
9785
9880
  ]);
@@ -9836,26 +9931,26 @@ function keepsExportFile(path, format) {
9836
9931
 
9837
9932
  // src/orpc-client/files/contract.ts
9838
9933
  var import_contract50 = require("@orpc/contract");
9839
- var z40 = __toESM(require("zod"), 1);
9840
- var PutContentInputSchema = z40.object({
9841
- contentType: z40.string(),
9842
- contentLength: z40.number().int().positive()
9934
+ var z41 = __toESM(require("zod"), 1);
9935
+ var PutContentInputSchema = z41.object({
9936
+ contentType: z41.string(),
9937
+ contentLength: z41.number().int().positive()
9843
9938
  });
9844
- var PutContentResponseSchema = z40.discriminatedUnion("status", [
9939
+ var PutContentResponseSchema = z41.discriminatedUnion("status", [
9845
9940
  /** Content already exists in storage — client can skip the S3 upload. */
9846
- z40.object({ status: z40.literal("exists") }),
9941
+ z41.object({ status: z41.literal("exists") }),
9847
9942
  /** Content is new — client should PUT the file bytes to uploadUrl, then call PUT /files. */
9848
- z40.object({ status: z40.literal("upload_required"), uploadUrl: z40.string() })
9943
+ z41.object({ status: z41.literal("upload_required"), uploadUrl: z41.string() })
9849
9944
  ]);
9850
- var PutFileInputSchema = z40.object({
9851
- hash: z40.string(),
9852
- contentType: z40.string()
9945
+ var PutFileInputSchema = z41.object({
9946
+ hash: z41.string(),
9947
+ contentType: z41.string()
9853
9948
  });
9854
- var FileResponseSchema = z40.object({
9949
+ var FileResponseSchema = z41.object({
9855
9950
  /** SHA-256 hex digest of the file content (64 characters). */
9856
- hash: z40.string(),
9951
+ hash: z41.string(),
9857
9952
  /** Presigned S3 GET URL. TTL is configurable (default 3600 seconds). */
9858
- downloadUrl: z40.string()
9953
+ downloadUrl: z41.string()
9859
9954
  });
9860
9955
  var contentContract = {
9861
9956
  /**
@@ -9985,23 +10080,23 @@ var KV_KEY_PREFIXES_DEPLOY = [KV_KEY_PREFIX_ORG, KV_KEY_PREFIX_CONFIG, KV_KEY_PR
9985
10080
  var KV_KEY_PREFIXES_ALL = [...KV_KEY_PREFIXES_DEPLOY, KV_KEY_PREFIX_PAUSED];
9986
10081
 
9987
10082
  // src/orpc-client/org-config/contract.ts
9988
- var z41 = __toESM(require("zod"), 1);
10083
+ var z42 = __toESM(require("zod"), 1);
9989
10084
  var SEMVER_RE = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z-.]+)?(?:\+[0-9A-Za-z-.]+)?$/;
9990
- var UpsertOrgConfigBodySchema = z41.object({
10085
+ var UpsertOrgConfigBodySchema = z42.object({
9991
10086
  // A semver string sets the bound; `null` clears it; omitting leaves it unchanged.
9992
- cliVersionMin: z41.union([z41.string().regex(SEMVER_RE, "cliVersionMin must be a valid semver (e.g. 5.45.0)"), z41.null()]).optional(),
9993
- cliVersionMax: z41.union([z41.string().regex(SEMVER_RE, "cliVersionMax must be a valid semver (e.g. 5.45.0)"), z41.null()]).optional()
10087
+ cliVersionMin: z42.union([z42.string().regex(SEMVER_RE, "cliVersionMin must be a valid semver (e.g. 5.45.0)"), z42.null()]).optional(),
10088
+ cliVersionMax: z42.union([z42.string().regex(SEMVER_RE, "cliVersionMax must be a valid semver (e.g. 5.45.0)"), z42.null()]).optional()
9994
10089
  });
9995
- var OrgConfigResponseSchema = z41.object({
9996
- orgId: z41.string(),
9997
- cliVersionMin: z41.string().optional(),
9998
- cliVersionMax: z41.string().optional(),
10090
+ var OrgConfigResponseSchema = z42.object({
10091
+ orgId: z42.string(),
10092
+ cliVersionMin: z42.string().optional(),
10093
+ cliVersionMax: z42.string().optional(),
9999
10094
  // Absent when no config has been stored for the org yet.
10000
- updatedAt: z41.string().optional()
10095
+ updatedAt: z42.string().optional()
10001
10096
  });
10002
10097
 
10003
10098
  // src/orpc-client/themes/contract.ts
10004
- var z42 = __toESM(require("zod"), 1);
10099
+ var z43 = __toESM(require("zod"), 1);
10005
10100
  var FERN_FILE_REF_KEY = "hash";
10006
10101
  var SHA256_RE = /^[0-9a-f]{64}$/;
10007
10102
  function isFernFileRef(value) {
@@ -10016,37 +10111,37 @@ function isFernFileRef(value) {
10016
10111
  return typeof hash === "string" && SHA256_RE.test(hash);
10017
10112
  }
10018
10113
  var THEME_NAME_RE = /^[a-zA-Z0-9_-]{1,64}$/;
10019
- var ThemeResponseSchema = z42.object({
10020
- id: z42.string(),
10021
- orgId: z42.string(),
10022
- name: z42.string(),
10023
- config: z42.unknown(),
10114
+ var ThemeResponseSchema = z43.object({
10115
+ id: z43.string(),
10116
+ orgId: z43.string(),
10117
+ name: z43.string(),
10118
+ config: z43.unknown(),
10024
10119
  /** True when the theme has a ledger form, so FDR can merge it into sites server-side. */
10025
- hasLedger: z42.boolean(),
10026
- updatedAt: z42.string()
10120
+ hasLedger: z43.boolean(),
10121
+ updatedAt: z43.string()
10027
10122
  // ISO 8601 timestamp
10028
10123
  });
10029
- var ThemeListItemSchema = z42.object({
10030
- id: z42.string(),
10031
- orgId: z42.string(),
10032
- name: z42.string(),
10033
- updatedAt: z42.string()
10124
+ var ThemeListItemSchema = z43.object({
10125
+ id: z43.string(),
10126
+ orgId: z43.string(),
10127
+ name: z43.string(),
10128
+ updatedAt: z43.string()
10034
10129
  });
10035
- var ThemeListResponseSchema = z42.object({
10036
- themes: z42.array(ThemeListItemSchema)
10130
+ var ThemeListResponseSchema = z43.object({
10131
+ themes: z43.array(ThemeListItemSchema)
10037
10132
  });
10038
- var UpsertThemeBodySchema = z42.object({
10039
- name: z42.string().min(1).max(64).regex(THEME_NAME_RE, "Theme name may only contain letters, digits, hyphens, and underscores"),
10040
- config: z42.unknown(),
10133
+ var UpsertThemeBodySchema = z43.object({
10134
+ name: z43.string().min(1).max(64).regex(THEME_NAME_RE, "Theme name may only contain letters, digits, hyphens, and underscores"),
10135
+ config: z43.unknown(),
10041
10136
  /**
10042
10137
  * The same theme converted by the CLI to ledger config. Required for FDR to
10043
10138
  * merge the theme into sites server-side; themes uploaded without it only
10044
10139
  * apply through CLI-side stitching.
10045
10140
  */
10046
- ledger: z42.object({
10141
+ ledger: z43.object({
10047
10142
  config: LedgerConfigSchema.partial(),
10048
10143
  /** Theme assets by fullPath. `hash` points at bytes in the org's CAS. */
10049
- files: z42.record(z42.string(), FileManifestEntrySchema).default({})
10144
+ files: z43.record(z43.string(), FileManifestEntrySchema).default({})
10050
10145
  }).optional()
10051
10146
  });
10052
10147
  // Annotate the CommonJS export names for ESM import in node:
@@ -10135,6 +10230,7 @@ var UpsertThemeBodySchema = z42.object({
10135
10230
  CustomHostnameSchema,
10136
10231
  CustomHostnameTxtRecordSchema,
10137
10232
  CustomSnippetPayloadSchema,
10233
+ DEFAULT_MCP_ORG_QUOTA,
10138
10234
  DOXYFILE_ALLOWED_KEYS,
10139
10235
  DashboardAnalyticsCommonInputSchema,
10140
10236
  DashboardDocsSiteSchema,
@@ -10296,6 +10392,7 @@ var UpsertThemeBodySchema = z42.object({
10296
10392
  GetMcpServerBrandingInputSchema,
10297
10393
  GetMcpServerBrandingResponseSchema,
10298
10394
  GetMcpServerInputSchema,
10395
+ GetMcpUsageInputSchema,
10299
10396
  GetMinCliForIrInputSchema,
10300
10397
  GetOrganizationForUrlInputSchema,
10301
10398
  GetPdfExportDownloadUrlInputSchema,
@@ -10353,6 +10450,7 @@ var UpsertThemeBodySchema = z42.object({
10353
10450
  KV_KEY_PREFIX_META,
10354
10451
  KV_KEY_PREFIX_ORG,
10355
10452
  KV_KEY_PREFIX_PAUSED,
10453
+ KV_KEY_PREFIX_QUOTA,
10356
10454
  LEDGER_ARTIFACT_METADATA_SCHEMAS,
10357
10455
  LEDGER_MANIFEST_SCHEMA_VERSION,
10358
10456
  LEDGER_SHARD_SCHEMA_VERSION,
@@ -10496,8 +10594,11 @@ var UpsertThemeBodySchema = z42.object({
10496
10594
  MCP_CONFIG_MAX_BYTES,
10497
10595
  MCP_CONNECT_PAGE_DEFAULT_ACCENT,
10498
10596
  MCP_EXCHANGE_SECRET_MAX_LENGTH,
10597
+ MCP_FREE_TOOL_CALLS_PER_MONTH,
10499
10598
  MCP_IP_ALLOW_LIST_MAX_ENTRIES,
10500
10599
  MCP_METADATA_MAX_BYTES,
10600
+ MCP_QUOTA_EXCEEDED_CODE,
10601
+ MCP_SALES_CONTACT_URL,
10501
10602
  MCP_TOOL_ROLES_MAX_BYTES,
10502
10603
  ManifestApiDefSchema,
10503
10604
  ManifestBlobRefSchema,
@@ -10534,6 +10635,8 @@ var UpsertThemeBodySchema = z42.object({
10534
10635
  McpIpAllowListSchema,
10535
10636
  McpMetadataSchema,
10536
10637
  McpModuleSchema,
10638
+ McpOrgQuotaSchema,
10639
+ McpOrgUsageSchema,
10537
10640
  McpServerAuthFieldsSchema,
10538
10641
  McpServerAuthSchema,
10539
10642
  McpServerAuthSettingsSchema,
@@ -10546,6 +10649,7 @@ var UpsertThemeBodySchema = z42.object({
10546
10649
  McpToolRoleRuleSchema,
10547
10650
  McpToolRolesSchema,
10548
10651
  McpToolSchema,
10652
+ McpUsageCountsSchema,
10549
10653
  MigrateV2SiteInputSchema,
10550
10654
  MigrateV2SiteResponseSchema,
10551
10655
  MigrateV2SiteSkipReasonSchema,
@@ -10719,6 +10823,7 @@ var UpsertThemeBodySchema = z42.object({
10719
10823
  SetMcpCustomDomainInputSchema,
10720
10824
  SetMcpServerExchangeSecretInputSchema,
10721
10825
  SetMcpServerIpAllowListInputSchema,
10826
+ SetMcpUsageAllowanceInputSchema,
10722
10827
  SetSnapshotInputSchema,
10723
10828
  Sha256Schema,
10724
10829
  SiteConfigResponseSchema,
@@ -10787,6 +10892,7 @@ var UpsertThemeBodySchema = z42.object({
10787
10892
  UpsertThemeBodySchema,
10788
10893
  Url,
10789
10894
  UrlSchema,
10895
+ UsageMonthSchema,
10790
10896
  UuidTypeSchema,
10791
10897
  VersionBumpEnumSchema,
10792
10898
  VersionId,
@@ -10890,6 +10996,7 @@ var UpsertThemeBodySchema = z42.object({
10890
10996
  libraryDocsContract,
10891
10997
  mcpAnalyticsIndex,
10892
10998
  mcpHostingContract,
10999
+ mcpSalesContactUrl,
10893
11000
  mcpServerAuthChecks,
10894
11001
  normalizeCidr,
10895
11002
  normalizeCustomDomain,
@@ -10909,6 +11016,8 @@ var UpsertThemeBodySchema = z42.object({
10909
11016
  tokensContract,
10910
11017
  toolCountFromParsed,
10911
11018
  toolCountFromStored,
11019
+ usageMonth,
11020
+ usageMonthResetsAt,
10912
11021
  validateCustomDomain,
10913
11022
  validateDoxyfileContent
10914
11023
  });