@fern-api/fdr-sdk 1.2.174-94f3833ee6 → 1.2.174-950bdb766f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/client/FdrClient.js +366 -303
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +366 -303
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/index.js +641 -578
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +641 -578
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/orpc-client/dashboard/sdkVersion.js +3 -1
- package/dist/js/orpc-client/dashboard/sdkVersion.js.map +1 -1
- package/dist/js/orpc-client/dashboard/sdkVersion.mjs +3 -1
- package/dist/js/orpc-client/dashboard/sdkVersion.mjs.map +1 -1
- package/dist/js/orpc-client.js +743 -634
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +729 -634
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/orpc-client/dashboard/sdkVersion.d.ts +3 -1
- package/dist/orpc-client/dashboard/sdkVersion.d.ts.map +1 -1
- package/dist/orpc-client/dashboard/sdkVersion.js +6 -2
- package/dist/orpc-client/dashboard/sdkVersion.js.map +1 -1
- package/dist/orpc-client/dashboard/sdkVersion.test.js +5 -1
- package/dist/orpc-client/dashboard/sdkVersion.test.js.map +1 -1
- package/dist/orpc-client/mcp-hosting/contract.d.ts +138 -0
- package/dist/orpc-client/mcp-hosting/contract.d.ts.map +1 -1
- package/dist/orpc-client/mcp-hosting/contract.js +17 -1
- package/dist/orpc-client/mcp-hosting/contract.js.map +1 -1
- package/dist/orpc-client/mcp-hosting/index.d.ts +1 -0
- package/dist/orpc-client/mcp-hosting/index.d.ts.map +1 -1
- package/dist/orpc-client/mcp-hosting/index.js +1 -0
- package/dist/orpc-client/mcp-hosting/index.js.map +1 -1
- package/dist/orpc-client/mcp-hosting/usage.d.ts +194 -0
- package/dist/orpc-client/mcp-hosting/usage.d.ts.map +1 -0
- package/dist/orpc-client/mcp-hosting/usage.js +116 -0
- package/dist/orpc-client/mcp-hosting/usage.js.map +1 -0
- package/dist/types/orpc-client/dashboard/sdkVersion.d.ts +3 -1
- package/dist/types/orpc-client/dashboard/sdkVersion.d.ts.map +1 -1
- package/dist/types/orpc-client/mcp-hosting/contract.d.ts +138 -0
- package/dist/types/orpc-client/mcp-hosting/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/mcp-hosting/index.d.ts +1 -0
- package/dist/types/orpc-client/mcp-hosting/index.d.ts.map +1 -1
- package/dist/types/orpc-client/mcp-hosting/usage.d.ts +194 -0
- package/dist/types/orpc-client/mcp-hosting/usage.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/js/orpc-client.js
CHANGED
|
@@ -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
|
|
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 =
|
|
8086
|
-
var McpDeploymentStatusSchema =
|
|
8087
|
-
var McpModuleSchema =
|
|
8088
|
-
name:
|
|
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:
|
|
8173
|
+
contentType: z30.string().min(1)
|
|
8091
8174
|
}).strict();
|
|
8092
|
-
var McpGitInputSchema =
|
|
8093
|
-
repoUrl:
|
|
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:
|
|
8096
|
-
commitSha:
|
|
8178
|
+
branch: z30.string().optional(),
|
|
8179
|
+
commitSha: z30.string().optional()
|
|
8097
8180
|
}).strict();
|
|
8098
|
-
var McpInputFileSchema =
|
|
8099
|
-
|
|
8181
|
+
var McpInputFileSchema = z30.discriminatedUnion("name", [
|
|
8182
|
+
z30.object({
|
|
8100
8183
|
/** The `sources` part of the build request, verbatim. */
|
|
8101
|
-
name:
|
|
8102
|
-
contentType:
|
|
8184
|
+
name: z30.literal("specs.tar.gz"),
|
|
8185
|
+
contentType: z30.literal("application/gzip"),
|
|
8103
8186
|
hash: Sha256Schema
|
|
8104
8187
|
}).strict(),
|
|
8105
|
-
|
|
8188
|
+
z30.object({
|
|
8106
8189
|
/** This target's sdk-config payload. */
|
|
8107
|
-
name:
|
|
8108
|
-
contentType:
|
|
8190
|
+
name: z30.literal("sdk-config.json"),
|
|
8191
|
+
contentType: z30.literal("application/json"),
|
|
8109
8192
|
hash: Sha256Schema
|
|
8110
8193
|
}).strict(),
|
|
8111
|
-
|
|
8194
|
+
z30.object({
|
|
8112
8195
|
/** The build request narrowed to this target. */
|
|
8113
|
-
name:
|
|
8114
|
-
contentType:
|
|
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 =
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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 =
|
|
8298
|
+
var DeployMcpServerInputSchema = z30.object({
|
|
8216
8299
|
orgId: McpPathSegmentSchema,
|
|
8217
8300
|
slug: McpPathSegmentSchema,
|
|
8218
|
-
mainModule:
|
|
8219
|
-
compatibilityDate:
|
|
8220
|
-
compatibilityFlags:
|
|
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:
|
|
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:
|
|
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:
|
|
8232
|
-
generatorVersion:
|
|
8233
|
-
cliVersion:
|
|
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:
|
|
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:
|
|
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 =
|
|
8339
|
+
var GetMcpServerInputSchema = z30.object({
|
|
8257
8340
|
orgId: McpPathSegmentSchema,
|
|
8258
8341
|
slug: McpPathSegmentSchema
|
|
8259
8342
|
});
|
|
8260
8343
|
var GetMcpServerBrandingInputSchema = GetMcpServerInputSchema;
|
|
8261
|
-
var GetMcpServerBrandingResponseSchema =
|
|
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:
|
|
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 =
|
|
8280
|
-
orgId:
|
|
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 =
|
|
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:
|
|
8374
|
+
deploymentId: z30.string().uuid()
|
|
8292
8375
|
});
|
|
8293
|
-
var RollbackMcpServerInputSchema =
|
|
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:
|
|
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 =
|
|
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:
|
|
8393
|
+
hostname: z30.string().min(1).max(512)
|
|
8311
8394
|
});
|
|
8312
|
-
var GetMcpAnalyticsInputSchema =
|
|
8395
|
+
var GetMcpAnalyticsInputSchema = z30.object({
|
|
8313
8396
|
orgId: McpPathSegmentSchema,
|
|
8314
8397
|
slug: McpPathSegmentSchema,
|
|
8315
8398
|
window: McpAnalyticsWindowSchema.default("24h")
|
|
8316
8399
|
});
|
|
8317
|
-
var McpDeploymentGitSchema =
|
|
8318
|
-
repoUrl:
|
|
8319
|
-
branch:
|
|
8320
|
-
commitSha:
|
|
8400
|
+
var McpDeploymentGitSchema = z30.object({
|
|
8401
|
+
repoUrl: z30.string(),
|
|
8402
|
+
branch: z30.string().nullish(),
|
|
8403
|
+
commitSha: z30.string().nullish()
|
|
8321
8404
|
});
|
|
8322
|
-
var McpDeploymentSummarySchema =
|
|
8323
|
-
id:
|
|
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:
|
|
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:
|
|
8333
|
-
generatorVersion:
|
|
8334
|
-
createdAt:
|
|
8335
|
-
createdBy:
|
|
8336
|
-
error:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
8463
|
+
bundleDigest: z30.string().nullish()
|
|
8381
8464
|
});
|
|
8382
|
-
var McpDeploymentInputFileSchema =
|
|
8383
|
-
name:
|
|
8384
|
-
contentType:
|
|
8385
|
-
hash:
|
|
8386
|
-
downloadUrl:
|
|
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:
|
|
8391
|
-
skippedTools:
|
|
8473
|
+
tools: z30.array(McpDeploymentToolSchema),
|
|
8474
|
+
skippedTools: z30.array(McpDeploymentSkippedToolSchema),
|
|
8392
8475
|
/** The stored toolset membership map, as deployed. */
|
|
8393
|
-
toolsets:
|
|
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:
|
|
8478
|
+
config: z30.unknown().nullable(),
|
|
8396
8479
|
/** Null when the attempt recorded no inputs (older CLIs, rollbacks of such rows). */
|
|
8397
|
-
inputs:
|
|
8480
|
+
inputs: z30.array(McpDeploymentInputFileSchema).nullable()
|
|
8398
8481
|
});
|
|
8399
|
-
var McpCustomDomainStatusSchema =
|
|
8400
|
-
var McpCustomDomainRecordSchema =
|
|
8401
|
-
type:
|
|
8402
|
-
name:
|
|
8403
|
-
value:
|
|
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:
|
|
8488
|
+
purpose: z30.string()
|
|
8406
8489
|
});
|
|
8407
|
-
var McpCustomDomainSchema =
|
|
8408
|
-
hostname:
|
|
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:
|
|
8494
|
+
records: z30.array(McpCustomDomainRecordSchema),
|
|
8412
8495
|
/** Why Cloudflare could not verify the domain or issue its certificate, when it said. */
|
|
8413
|
-
errors:
|
|
8414
|
-
createdAt:
|
|
8415
|
-
updatedAt:
|
|
8416
|
-
});
|
|
8417
|
-
var McpServerSchema =
|
|
8418
|
-
id:
|
|
8419
|
-
orgId:
|
|
8420
|
-
slug:
|
|
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:
|
|
8517
|
+
ipAllowList: z30.array(z30.string()).optional(),
|
|
8435
8518
|
/** The server is serving iff this is set; it names the serving deployment. */
|
|
8436
|
-
activeDeploymentId:
|
|
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:
|
|
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:
|
|
8542
|
+
customDomain: z30.string().nullish(),
|
|
8460
8543
|
customDomainStatus: McpCustomDomainStatusSchema.nullish(),
|
|
8461
|
-
url:
|
|
8462
|
-
createdAt:
|
|
8463
|
-
updatedAt:
|
|
8544
|
+
url: z30.string().url(),
|
|
8545
|
+
createdAt: z30.string(),
|
|
8546
|
+
updatedAt: z30.string()
|
|
8464
8547
|
});
|
|
8465
|
-
var ListMcpServersResponseSchema =
|
|
8466
|
-
var ListMcpDeploymentsResponseSchema =
|
|
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
|
|
8577
|
-
var PdfExportScopeSchema =
|
|
8578
|
-
pageSlugs:
|
|
8579
|
-
});
|
|
8580
|
-
var PdfExportOptionsV1Schema =
|
|
8581
|
-
coverTitle:
|
|
8582
|
-
coverSubtitle:
|
|
8583
|
-
hideCoverFooter:
|
|
8584
|
-
headerLeftTemplate:
|
|
8585
|
-
headerRightTemplate:
|
|
8586
|
-
footerLeftTemplate:
|
|
8587
|
-
footerRightTemplate:
|
|
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:
|
|
8590
|
-
hideToc:
|
|
8684
|
+
hideCover: z31.boolean().nullish(),
|
|
8685
|
+
hideToc: z31.boolean().nullish()
|
|
8591
8686
|
});
|
|
8592
|
-
var PdfExportOptionsSchema =
|
|
8593
|
-
|
|
8687
|
+
var PdfExportOptionsSchema = z31.discriminatedUnion("version", [
|
|
8688
|
+
z31.object({ version: z31.literal("v1") }).merge(PdfExportOptionsV1Schema)
|
|
8594
8689
|
]);
|
|
8595
|
-
var PdfExportTaskStatusSchema =
|
|
8596
|
-
var PdfExportFormatSchema =
|
|
8597
|
-
var PdfExportTaskSchema =
|
|
8598
|
-
id:
|
|
8599
|
-
orgId:
|
|
8600
|
-
docsUrl:
|
|
8601
|
-
productId:
|
|
8602
|
-
versionId:
|
|
8603
|
-
requesterName:
|
|
8604
|
-
notifyEmails:
|
|
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:
|
|
8609
|
-
startedAt:
|
|
8610
|
-
completedAt:
|
|
8611
|
-
fileName:
|
|
8612
|
-
sizeBytes:
|
|
8613
|
-
errorMessage:
|
|
8614
|
-
});
|
|
8615
|
-
var ListPdfExportTasksResponseSchema =
|
|
8616
|
-
tasks:
|
|
8617
|
-
});
|
|
8618
|
-
var PdfExportDownloadResponseSchema =
|
|
8619
|
-
downloadUrl:
|
|
8620
|
-
fileName:
|
|
8621
|
-
sizeBytes:
|
|
8622
|
-
});
|
|
8623
|
-
var CreatePdfExportTaskInputSchema =
|
|
8624
|
-
orgId:
|
|
8625
|
-
docsUrl:
|
|
8626
|
-
productId:
|
|
8627
|
-
versionId:
|
|
8628
|
-
requesterName:
|
|
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 =
|
|
8633
|
-
orgId:
|
|
8634
|
-
docsUrl:
|
|
8635
|
-
limit:
|
|
8727
|
+
var ListPdfExportTasksInputSchema = z31.object({
|
|
8728
|
+
orgId: z31.string(),
|
|
8729
|
+
docsUrl: z31.string(),
|
|
8730
|
+
limit: z31.coerce.number().nullish()
|
|
8636
8731
|
});
|
|
8637
|
-
var GetPdfExportTaskInputSchema =
|
|
8638
|
-
taskId:
|
|
8732
|
+
var GetPdfExportTaskInputSchema = z31.object({
|
|
8733
|
+
taskId: z31.string()
|
|
8639
8734
|
});
|
|
8640
|
-
var UpdatePdfExportTaskInputSchema =
|
|
8641
|
-
taskId:
|
|
8735
|
+
var UpdatePdfExportTaskInputSchema = z31.object({
|
|
8736
|
+
taskId: z31.string(),
|
|
8642
8737
|
status: PdfExportTaskStatusSchema,
|
|
8643
|
-
startedAt:
|
|
8644
|
-
completedAt:
|
|
8645
|
-
s3Key:
|
|
8646
|
-
fileName:
|
|
8647
|
-
sizeBytes:
|
|
8648
|
-
errorMessage:
|
|
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 =
|
|
8651
|
-
taskId:
|
|
8745
|
+
var GetPdfExportDownloadUrlInputSchema = z31.object({
|
|
8746
|
+
taskId: z31.string()
|
|
8652
8747
|
});
|
|
8653
|
-
var CleanupPdfExportsResponseSchema =
|
|
8654
|
-
expiredTasksDeleted:
|
|
8655
|
-
s3ObjectsDeleted:
|
|
8656
|
-
timedOutTasksFailed:
|
|
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
|
|
8693
|
-
var LanguageEnumSchema =
|
|
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 =
|
|
8705
|
-
var ComputeSemanticVersionInputSchema =
|
|
8706
|
-
package:
|
|
8799
|
+
var VersionBumpEnumSchema = z32.enum(["MAJOR", "MINOR", "PATCH"]);
|
|
8800
|
+
var ComputeSemanticVersionInputSchema = z32.object({
|
|
8801
|
+
package: z32.string(),
|
|
8707
8802
|
language: LanguageEnumSchema,
|
|
8708
|
-
githubRepository:
|
|
8803
|
+
githubRepository: z32.string().nullish()
|
|
8709
8804
|
});
|
|
8710
|
-
var ComputeSemanticVersionOutputSchema =
|
|
8711
|
-
version:
|
|
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
|
|
8738
|
-
var SlugsInputSchema =
|
|
8739
|
-
domain:
|
|
8740
|
-
basepath:
|
|
8741
|
-
});
|
|
8742
|
-
var SlugEntrySchema =
|
|
8743
|
-
orgId:
|
|
8744
|
-
domain:
|
|
8745
|
-
basepath:
|
|
8746
|
-
slug:
|
|
8747
|
-
lastUpdated:
|
|
8748
|
-
});
|
|
8749
|
-
var MarkdownEntrySchema =
|
|
8750
|
-
orgId:
|
|
8751
|
-
domain:
|
|
8752
|
-
basepath:
|
|
8753
|
-
pageId:
|
|
8754
|
-
slug:
|
|
8755
|
-
hash:
|
|
8756
|
-
lastUpdated:
|
|
8757
|
-
});
|
|
8758
|
-
var GetSlugEntriesResponseSchema =
|
|
8759
|
-
entries:
|
|
8760
|
-
});
|
|
8761
|
-
var GetMarkdownEntriesResponseSchema =
|
|
8762
|
-
entries:
|
|
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
|
|
8789
|
-
var TypeScriptSdkSchema =
|
|
8790
|
-
var PythonSdkSchema =
|
|
8791
|
-
var GoSdkSchema =
|
|
8792
|
-
var RubySdkSchema =
|
|
8793
|
-
var JavaSdkSchema =
|
|
8794
|
-
var CsharpSdkSchema =
|
|
8795
|
-
var BaseSnippetCreateSchema =
|
|
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:
|
|
8892
|
+
exampleIdentifier: z34.string().nullish()
|
|
8798
8893
|
});
|
|
8799
|
-
var SdkSnippetsCreateSchema =
|
|
8800
|
-
|
|
8801
|
-
type:
|
|
8894
|
+
var SdkSnippetsCreateSchema = z34.discriminatedUnion("type", [
|
|
8895
|
+
z34.object({
|
|
8896
|
+
type: z34.literal("typescript"),
|
|
8802
8897
|
sdk: TypeScriptSdkSchema,
|
|
8803
|
-
snippets:
|
|
8898
|
+
snippets: z34.array(BaseSnippetCreateSchema.extend({ snippet: z34.object({ client: z34.string() }) }))
|
|
8804
8899
|
}),
|
|
8805
|
-
|
|
8806
|
-
type:
|
|
8900
|
+
z34.object({
|
|
8901
|
+
type: z34.literal("python"),
|
|
8807
8902
|
sdk: PythonSdkSchema,
|
|
8808
|
-
snippets:
|
|
8903
|
+
snippets: z34.array(
|
|
8809
8904
|
BaseSnippetCreateSchema.extend({
|
|
8810
|
-
snippet:
|
|
8905
|
+
snippet: z34.object({ async_client: z34.string(), sync_client: z34.string() })
|
|
8811
8906
|
})
|
|
8812
8907
|
)
|
|
8813
8908
|
}),
|
|
8814
|
-
|
|
8815
|
-
type:
|
|
8909
|
+
z34.object({
|
|
8910
|
+
type: z34.literal("go"),
|
|
8816
8911
|
sdk: GoSdkSchema,
|
|
8817
|
-
snippets:
|
|
8912
|
+
snippets: z34.array(BaseSnippetCreateSchema.extend({ snippet: z34.object({ client: z34.string() }) }))
|
|
8818
8913
|
}),
|
|
8819
|
-
|
|
8820
|
-
type:
|
|
8914
|
+
z34.object({
|
|
8915
|
+
type: z34.literal("java"),
|
|
8821
8916
|
sdk: JavaSdkSchema,
|
|
8822
|
-
snippets:
|
|
8917
|
+
snippets: z34.array(
|
|
8823
8918
|
BaseSnippetCreateSchema.extend({
|
|
8824
|
-
snippet:
|
|
8919
|
+
snippet: z34.object({ async_client: z34.string(), sync_client: z34.string() })
|
|
8825
8920
|
})
|
|
8826
8921
|
)
|
|
8827
8922
|
}),
|
|
8828
|
-
|
|
8829
|
-
type:
|
|
8923
|
+
z34.object({
|
|
8924
|
+
type: z34.literal("ruby"),
|
|
8830
8925
|
sdk: RubySdkSchema,
|
|
8831
|
-
snippets:
|
|
8926
|
+
snippets: z34.array(BaseSnippetCreateSchema.extend({ snippet: z34.object({ client: z34.string() }) }))
|
|
8832
8927
|
}),
|
|
8833
|
-
|
|
8834
|
-
type:
|
|
8928
|
+
z34.object({
|
|
8929
|
+
type: z34.literal("csharp"),
|
|
8835
8930
|
sdk: CsharpSdkSchema,
|
|
8836
|
-
snippets:
|
|
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
|
-
|
|
8842
|
-
orgId:
|
|
8843
|
-
apiId:
|
|
8936
|
+
z34.object({
|
|
8937
|
+
orgId: z34.string(),
|
|
8938
|
+
apiId: z34.string(),
|
|
8844
8939
|
snippets: SdkSnippetsCreateSchema
|
|
8845
8940
|
})
|
|
8846
8941
|
)
|
|
8847
8942
|
};
|
|
8848
|
-
var ParameterPayloadSchema =
|
|
8849
|
-
name:
|
|
8850
|
-
value:
|
|
8943
|
+
var ParameterPayloadSchema = z34.object({
|
|
8944
|
+
name: z34.string(),
|
|
8945
|
+
value: z34.unknown()
|
|
8851
8946
|
});
|
|
8852
|
-
var AuthPayloadSchema =
|
|
8853
|
-
|
|
8854
|
-
|
|
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 =
|
|
8857
|
-
headers:
|
|
8858
|
-
pathParameters:
|
|
8859
|
-
queryParameters:
|
|
8860
|
-
requestBody:
|
|
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
|
-
|
|
8866
|
-
orgId:
|
|
8867
|
-
apiId:
|
|
8868
|
-
sdks:
|
|
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:
|
|
8965
|
+
exampleIdentifier: z34.string().nullish(),
|
|
8871
8966
|
payload: CustomSnippetPayloadSchema.nullish()
|
|
8872
8967
|
})
|
|
8873
|
-
).output(
|
|
8968
|
+
).output(z34.array(z34.unknown())),
|
|
8874
8969
|
load: import_contract39.oc.route({ method: "POST", path: "/load" }).input(
|
|
8875
|
-
|
|
8876
|
-
orgId:
|
|
8877
|
-
apiId:
|
|
8878
|
-
sdks:
|
|
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
|
-
|
|
8882
|
-
next:
|
|
8883
|
-
snippets:
|
|
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
|
|
8919
|
-
var SnippetRegistryEntrySchema =
|
|
9013
|
+
var z35 = __toESM(require("zod"), 1);
|
|
9014
|
+
var SnippetRegistryEntrySchema = z35.object({
|
|
8920
9015
|
sdk: SdkSchema,
|
|
8921
|
-
endpointId:
|
|
8922
|
-
path:
|
|
9016
|
+
endpointId: z35.object({
|
|
9017
|
+
path: z35.string(),
|
|
8923
9018
|
method: HttpMethodSchema,
|
|
8924
|
-
identifierOverride:
|
|
9019
|
+
identifierOverride: z35.string().nullish()
|
|
8925
9020
|
}),
|
|
8926
|
-
snippetTemplate:
|
|
8927
|
-
type:
|
|
8928
|
-
functionInvocation:
|
|
8929
|
-
clientInstantiation:
|
|
9021
|
+
snippetTemplate: z35.object({
|
|
9022
|
+
type: z35.literal("v1"),
|
|
9023
|
+
functionInvocation: z35.unknown(),
|
|
9024
|
+
clientInstantiation: z35.string()
|
|
8930
9025
|
}),
|
|
8931
|
-
additionalTemplates:
|
|
9026
|
+
additionalTemplates: z35.record(z35.string(), z35.unknown()).nullish()
|
|
8932
9027
|
});
|
|
8933
|
-
var RegisterInputSchema =
|
|
8934
|
-
orgId:
|
|
8935
|
-
apiId:
|
|
8936
|
-
apiDefinitionId:
|
|
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 =
|
|
8940
|
-
orgId:
|
|
8941
|
-
apiId:
|
|
8942
|
-
apiDefinitionId:
|
|
8943
|
-
snippets:
|
|
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 =
|
|
8946
|
-
orgId:
|
|
8947
|
-
apiId:
|
|
9040
|
+
var GetInputSchema = z35.object({
|
|
9041
|
+
orgId: z35.string(),
|
|
9042
|
+
apiId: z35.string(),
|
|
8948
9043
|
sdk: SdkSchema,
|
|
8949
|
-
endpointId:
|
|
8950
|
-
path:
|
|
9044
|
+
endpointId: z35.object({
|
|
9045
|
+
path: z35.string(),
|
|
8951
9046
|
method: HttpMethodSchema,
|
|
8952
|
-
identifierOverride:
|
|
9047
|
+
identifierOverride: z35.string().nullish()
|
|
8953
9048
|
})
|
|
8954
9049
|
});
|
|
8955
|
-
var EndpointSnippetTemplateSchema =
|
|
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
|
|
8983
|
-
var GenerateTokenInputSchema =
|
|
8984
|
-
orgId:
|
|
8985
|
-
scope:
|
|
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 =
|
|
8988
|
-
orgId:
|
|
8989
|
-
tokenId:
|
|
9082
|
+
var RevokeTokenInputSchema = z36.object({
|
|
9083
|
+
orgId: z36.string(),
|
|
9084
|
+
tokenId: z36.string()
|
|
8990
9085
|
});
|
|
8991
|
-
var GenerateTokenOutputSchema =
|
|
8992
|
-
token:
|
|
8993
|
-
id:
|
|
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
|
|
9052
|
-
var StartDocsRegisterV1InputSchema =
|
|
9053
|
-
orgId:
|
|
9054
|
-
domain:
|
|
9055
|
-
filepaths:
|
|
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 =
|
|
9058
|
-
docsRegistrationId:
|
|
9059
|
-
uploadUrls:
|
|
9060
|
-
skippedFiles:
|
|
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 =
|
|
9063
|
-
docsRegistrationId:
|
|
9064
|
-
docsDefinition:
|
|
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(
|
|
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
|
|
9091
|
-
var AnonymousDocsSiteLimitsSchema =
|
|
9092
|
-
maxPages:
|
|
9093
|
-
maxBytes:
|
|
9094
|
-
maxPublishes:
|
|
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 =
|
|
9191
|
+
var CreateAnonymousDocsSiteInputSchema = z38.object({
|
|
9097
9192
|
/** Publisher-chosen key; the same key returns the same live site. */
|
|
9098
|
-
idempotencyKey:
|
|
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:
|
|
9195
|
+
rotateToken: z38.boolean().optional()
|
|
9101
9196
|
});
|
|
9102
|
-
var CreateAnonymousDocsSiteResponseSchema =
|
|
9103
|
-
siteId:
|
|
9104
|
-
orgId:
|
|
9105
|
-
domain:
|
|
9106
|
-
url:
|
|
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:
|
|
9203
|
+
publishToken: z38.string().optional(),
|
|
9109
9204
|
/** `https://<domain>/__fern/claim/<claim-token>`, single use. Shown once; absent on an idempotent hit. */
|
|
9110
|
-
claimUrl:
|
|
9111
|
-
expiresAt:
|
|
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 =
|
|
9116
|
-
claimToken:
|
|
9117
|
-
});
|
|
9118
|
-
var ConsumeAnonymousClaimTokenResponseSchema =
|
|
9119
|
-
siteId:
|
|
9120
|
-
domain:
|
|
9121
|
-
cookieSecret:
|
|
9122
|
-
expiresAt:
|
|
9123
|
-
});
|
|
9124
|
-
var CreateAnonymousClaimGrantInputSchema =
|
|
9125
|
-
siteId:
|
|
9126
|
-
cookieSecret:
|
|
9127
|
-
});
|
|
9128
|
-
var CreateAnonymousClaimGrantResponseSchema =
|
|
9129
|
-
grant:
|
|
9130
|
-
expiresAt:
|
|
9131
|
-
});
|
|
9132
|
-
var AnonymousClaimStatusSchema =
|
|
9133
|
-
var GetAnonymousClaimInputSchema =
|
|
9134
|
-
grant:
|
|
9135
|
-
});
|
|
9136
|
-
var GetAnonymousClaimResponseSchema =
|
|
9137
|
-
siteId:
|
|
9138
|
-
domain:
|
|
9139
|
-
createdAt:
|
|
9140
|
-
expiresAt:
|
|
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:
|
|
9143
|
-
claimedByOrgId:
|
|
9237
|
+
pageCount: z38.number().int(),
|
|
9238
|
+
claimedByOrgId: z38.string().optional()
|
|
9144
9239
|
});
|
|
9145
|
-
var ClaimAnonymousDocsSiteInputSchema =
|
|
9146
|
-
grant:
|
|
9147
|
-
toOrgId:
|
|
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:
|
|
9249
|
+
domain: z38.string().optional()
|
|
9155
9250
|
});
|
|
9156
|
-
var ClaimAnonymousDocsSiteResponseSchema =
|
|
9157
|
-
siteId:
|
|
9158
|
-
domain:
|
|
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:
|
|
9161
|
-
orgId:
|
|
9162
|
-
buildId:
|
|
9163
|
-
});
|
|
9164
|
-
var GetGuestDocsSiteInputSchema =
|
|
9165
|
-
orgId:
|
|
9166
|
-
});
|
|
9167
|
-
var GetGuestDocsSiteResponseSchema =
|
|
9168
|
-
siteId:
|
|
9169
|
-
orgId:
|
|
9170
|
-
domain:
|
|
9171
|
-
url:
|
|
9172
|
-
status:
|
|
9173
|
-
expiresAt:
|
|
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 =
|
|
9272
|
+
var RehomeGuestSessionInputSchema = z38.object({
|
|
9178
9273
|
/** The session's `guest-<id>` organization, as the claim page shows it. */
|
|
9179
|
-
guestOrgId:
|
|
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:
|
|
9279
|
+
domain: z38.string().optional()
|
|
9185
9280
|
});
|
|
9186
|
-
var RehomedGuestSiteSchema =
|
|
9187
|
-
siteId:
|
|
9188
|
-
domain:
|
|
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:
|
|
9285
|
+
previousDomain: z38.string().optional(),
|
|
9191
9286
|
/** The build the site serves at `domain`; absent for a site that was never published. */
|
|
9192
|
-
buildId:
|
|
9287
|
+
buildId: z38.string().optional()
|
|
9193
9288
|
});
|
|
9194
|
-
var RehomeGuestSessionResponseSchema =
|
|
9195
|
-
sessionId:
|
|
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:
|
|
9292
|
+
orgId: z38.string(),
|
|
9198
9293
|
/** The sites moved by this call; empty when there was nothing (left) to move. */
|
|
9199
|
-
sites:
|
|
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 =
|
|
9211
|
-
enabled:
|
|
9212
|
-
ttlSeconds:
|
|
9213
|
-
graceSeconds:
|
|
9214
|
-
claimGrantTtlSeconds:
|
|
9215
|
-
maxPages:
|
|
9216
|
-
maxBytes:
|
|
9217
|
-
maxPublishesPerSite:
|
|
9218
|
-
maxCreatesPerIpPerHour:
|
|
9219
|
-
maxCreatesPerHourGlobal:
|
|
9220
|
-
maxConcurrentBuilds:
|
|
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 =
|
|
9223
|
-
var GetAnonymousDocsConfigResponseSchema =
|
|
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:
|
|
9231
|
-
updatedBy:
|
|
9232
|
-
updatedAt:
|
|
9233
|
-
emergencyStopActive:
|
|
9234
|
-
source:
|
|
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 =
|
|
9331
|
+
var UpdateAnonymousDocsConfigInputSchema = z38.object({
|
|
9237
9332
|
config: AnonymousDocsConfigDocumentSchema.partial(),
|
|
9238
9333
|
/** Email (or token id) of the operator making the change. */
|
|
9239
|
-
updatedBy:
|
|
9240
|
-
reason:
|
|
9334
|
+
updatedBy: z38.string().min(1),
|
|
9335
|
+
reason: z38.string().min(1)
|
|
9241
9336
|
});
|
|
9242
|
-
var AnonymousDocsConfigHistoryEntrySchema =
|
|
9243
|
-
id:
|
|
9337
|
+
var AnonymousDocsConfigHistoryEntrySchema = z38.object({
|
|
9338
|
+
id: z38.string(),
|
|
9244
9339
|
environment: AnonymousDocsConfigEnvironmentSchema,
|
|
9245
9340
|
config: AnonymousDocsConfigDocumentSchema,
|
|
9246
|
-
version:
|
|
9247
|
-
updatedBy:
|
|
9248
|
-
reason:
|
|
9249
|
-
createdAt:
|
|
9341
|
+
version: z38.number().int(),
|
|
9342
|
+
updatedBy: z38.string(),
|
|
9343
|
+
reason: z38.string(),
|
|
9344
|
+
createdAt: z38.string()
|
|
9250
9345
|
});
|
|
9251
|
-
var GetAnonymousDocsConfigHistoryInputSchema =
|
|
9252
|
-
limit:
|
|
9346
|
+
var GetAnonymousDocsConfigHistoryInputSchema = z38.object({
|
|
9347
|
+
limit: z38.coerce.number().int().min(1).max(500).optional()
|
|
9253
9348
|
});
|
|
9254
|
-
var GetAnonymousDocsConfigHistoryResponseSchema =
|
|
9255
|
-
entries:
|
|
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
|
|
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 =
|
|
9297
|
-
var ThemeViewSchema =
|
|
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:
|
|
9394
|
+
backgroundImage: z39.string().optional().catch(void 0)
|
|
9300
9395
|
});
|
|
9301
|
-
var ColorsViewSchema =
|
|
9302
|
-
|
|
9303
|
-
type:
|
|
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 =
|
|
9310
|
-
variants:
|
|
9404
|
+
var FontViewSchema = z39.object({
|
|
9405
|
+
variants: z39.array(z39.object({ fontFile: z39.string().optional().catch(void 0) })).catch([])
|
|
9311
9406
|
});
|
|
9312
|
-
var TypographyViewSchema =
|
|
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 =
|
|
9318
|
-
|
|
9319
|
-
|
|
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 =
|
|
9322
|
-
type:
|
|
9323
|
-
value:
|
|
9416
|
+
var MetadataFileRefViewSchema = z39.object({
|
|
9417
|
+
type: z39.enum(["path", "fileId"]),
|
|
9418
|
+
value: z39.string()
|
|
9324
9419
|
});
|
|
9325
|
-
var ConfigViewSchema =
|
|
9326
|
-
favicon:
|
|
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:
|
|
9330
|
-
metadata:
|
|
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 =
|
|
9337
|
-
() =>
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
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 =
|
|
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 =
|
|
9369
|
-
icon:
|
|
9370
|
-
metadata:
|
|
9371
|
-
icon:
|
|
9372
|
-
image:
|
|
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 =
|
|
9376
|
-
metadata:
|
|
9377
|
-
icon:
|
|
9378
|
-
image:
|
|
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
|
|
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 =
|
|
9466
|
-
hash:
|
|
9467
|
-
contentType:
|
|
9560
|
+
var ManifestBlobRefSchema = z40.object({
|
|
9561
|
+
hash: z40.string(),
|
|
9562
|
+
contentType: z40.string()
|
|
9468
9563
|
});
|
|
9469
|
-
var ManifestSegmentSchema =
|
|
9564
|
+
var ManifestSegmentSchema = z40.object({
|
|
9470
9565
|
/** Synthetic stable id (= segmentHash). */
|
|
9471
|
-
segmentId:
|
|
9472
|
-
segmentHash:
|
|
9473
|
-
section:
|
|
9474
|
-
locale:
|
|
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:
|
|
9477
|
-
hidden:
|
|
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 =
|
|
9527
|
-
segmentHash:
|
|
9621
|
+
var ManifestRouteBaseSchema = z40.object({
|
|
9622
|
+
segmentHash: z40.string(),
|
|
9528
9623
|
/** Key into the containing route index's sidebars map. */
|
|
9529
|
-
sidebarKey:
|
|
9530
|
-
section:
|
|
9531
|
-
locale:
|
|
9532
|
-
artifactId:
|
|
9533
|
-
pageId:
|
|
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:
|
|
9536
|
-
contentType:
|
|
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:
|
|
9635
|
+
createdAt: z40.string().optional()
|
|
9541
9636
|
});
|
|
9542
|
-
var ManifestRouteSchema =
|
|
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 =
|
|
9559
|
-
fullPath:
|
|
9560
|
-
segmentHash:
|
|
9561
|
-
contentHash:
|
|
9562
|
-
contentType:
|
|
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 =
|
|
9659
|
+
var ManifestApiDefSchema = z40.object({
|
|
9565
9660
|
/** CAS hash of the full API definition blob. */
|
|
9566
|
-
hash:
|
|
9567
|
-
contentType:
|
|
9661
|
+
hash: z40.string(),
|
|
9662
|
+
contentType: z40.string(),
|
|
9568
9663
|
/** key = `${nodeType}:${nodeId}` (e.g. `endpoint:abc`) → pruned CAS blob. */
|
|
9569
|
-
prunedHashes:
|
|
9570
|
-
});
|
|
9571
|
-
var ManifestFileSchema =
|
|
9572
|
-
type:
|
|
9573
|
-
contentType:
|
|
9574
|
-
contentLength:
|
|
9575
|
-
filename:
|
|
9576
|
-
hash:
|
|
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:
|
|
9579
|
-
bucket:
|
|
9580
|
-
width:
|
|
9581
|
-
height:
|
|
9582
|
-
blurDataURL:
|
|
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 =
|
|
9679
|
+
var LedgerShardFileSchema = z40.object({
|
|
9585
9680
|
/** SHA-256 hex of the file bytes (docs-bucket key component). */
|
|
9586
|
-
hash:
|
|
9681
|
+
hash: z40.string(),
|
|
9587
9682
|
/** Fern-host-relative path; equals the `file:<fullPath>` token's suffix. */
|
|
9588
|
-
fullPath:
|
|
9589
|
-
contentType:
|
|
9590
|
-
contentLength:
|
|
9591
|
-
width:
|
|
9592
|
-
height:
|
|
9593
|
-
blurDataURL:
|
|
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:
|
|
9694
|
+
bucket: z40.enum(["public_docs", "private_docs"]).optional()
|
|
9600
9695
|
});
|
|
9601
|
-
var LedgerSiblingProductSchema =
|
|
9602
|
-
title:
|
|
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:
|
|
9605
|
-
subtitle:
|
|
9699
|
+
href: z40.string(),
|
|
9700
|
+
subtitle: z40.string().optional()
|
|
9606
9701
|
});
|
|
9607
|
-
var LedgerSiblingSiteSchema =
|
|
9702
|
+
var LedgerSiblingSiteSchema = z40.object({
|
|
9608
9703
|
/** Basepath without leading/trailing slash; "" for the root site. */
|
|
9609
|
-
basepath:
|
|
9704
|
+
basepath: z40.string(),
|
|
9610
9705
|
/** `config.title` of that site as of its last publish; null if unknown. */
|
|
9611
|
-
title:
|
|
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:
|
|
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 =
|
|
9621
|
-
version:
|
|
9622
|
-
git:
|
|
9623
|
-
repoUrl:
|
|
9624
|
-
branch:
|
|
9625
|
-
commitSha:
|
|
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:
|
|
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:
|
|
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 =
|
|
9641
|
-
apiNameToId:
|
|
9735
|
+
var LedgerChromeBlobSchema = z40.object({
|
|
9736
|
+
apiNameToId: z40.record(z40.string(), z40.string())
|
|
9642
9737
|
});
|
|
9643
|
-
var LedgerSidebarBundleSchema =
|
|
9644
|
-
locale:
|
|
9645
|
-
segmentHash:
|
|
9646
|
-
routes:
|
|
9738
|
+
var LedgerSidebarBundleSchema = z40.object({
|
|
9739
|
+
locale: z40.string(),
|
|
9740
|
+
segmentHash: z40.string(),
|
|
9741
|
+
routes: z40.array(ManifestNavRouteSchema)
|
|
9647
9742
|
});
|
|
9648
|
-
var LedgerSidebarMapEntrySchema =
|
|
9743
|
+
var LedgerSidebarMapEntrySchema = z40.discriminatedUnion("strategy", [
|
|
9649
9744
|
LedgerSidebarBundleSchema.extend({
|
|
9650
|
-
strategy:
|
|
9745
|
+
strategy: z40.literal("inline")
|
|
9651
9746
|
}),
|
|
9652
9747
|
ManifestBlobRefSchema.extend({
|
|
9653
|
-
strategy:
|
|
9748
|
+
strategy: z40.literal("ref")
|
|
9654
9749
|
})
|
|
9655
9750
|
]);
|
|
9656
|
-
var LedgerLocaleIndexSchema =
|
|
9657
|
-
locale:
|
|
9658
|
-
segments:
|
|
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:
|
|
9755
|
+
sidebars: z40.record(z40.string(), LedgerSidebarMapEntrySchema),
|
|
9661
9756
|
/** fullPath → route for this effective locale. */
|
|
9662
|
-
routes:
|
|
9757
|
+
routes: z40.record(z40.string(), ManifestRouteSchema),
|
|
9663
9758
|
/** pageId → page content reference for this effective locale. */
|
|
9664
|
-
pages:
|
|
9759
|
+
pages: z40.record(z40.string(), ManifestPageSchema),
|
|
9665
9760
|
/** apiDefinitionId → full + pruned API definition blobs. */
|
|
9666
|
-
apiDefs:
|
|
9761
|
+
apiDefs: z40.record(z40.string(), ManifestApiDefSchema),
|
|
9667
9762
|
/** fullPath → file/image artifact metadata. */
|
|
9668
|
-
files:
|
|
9763
|
+
files: z40.record(z40.string(), ManifestFileSchema)
|
|
9669
9764
|
});
|
|
9670
|
-
var LedgerRouteShardSchema =
|
|
9671
|
-
schema:
|
|
9672
|
-
locale:
|
|
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:
|
|
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:
|
|
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:
|
|
9780
|
+
files: z40.record(z40.string(), LedgerShardFileSchema).optional()
|
|
9686
9781
|
});
|
|
9687
|
-
var LedgerPagesBlobSchema =
|
|
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:
|
|
9785
|
+
productIdx: z40.number().nullable(),
|
|
9691
9786
|
/** Index into the locale's `versionCatalog`, or null when the segment has no version. */
|
|
9692
|
-
versionIdx:
|
|
9787
|
+
versionIdx: z40.number().nullable()
|
|
9693
9788
|
});
|
|
9694
|
-
var LedgerLocaleRoutingSchema =
|
|
9789
|
+
var LedgerLocaleRoutingSchema = z40.object({
|
|
9695
9790
|
/** Compact segments catalog for the switcher chrome (product/version by index). */
|
|
9696
|
-
segments:
|
|
9791
|
+
segments: z40.array(LedgerPointerSegmentSchema),
|
|
9697
9792
|
/** Deduplicated product details; `LedgerPointerSegment.productIdx` indexes into this. */
|
|
9698
|
-
productCatalog:
|
|
9793
|
+
productCatalog: z40.array(SegmentDetailSchema),
|
|
9699
9794
|
/** Deduplicated version details; `LedgerPointerSegment.versionIdx` indexes into this. */
|
|
9700
|
-
versionCatalog:
|
|
9795
|
+
versionCatalog: z40.array(SegmentDetailSchema),
|
|
9701
9796
|
/** fullPath → index into `shards`. */
|
|
9702
|
-
routing:
|
|
9797
|
+
routing: z40.record(z40.string(), z40.number()),
|
|
9703
9798
|
/** segmentHash → index into `shards`. */
|
|
9704
|
-
segmentShard:
|
|
9799
|
+
segmentShard: z40.record(z40.string(), z40.number()),
|
|
9705
9800
|
/** Ordered list of route shards; index matches `routing`/`segmentShard`. */
|
|
9706
|
-
shards:
|
|
9801
|
+
shards: z40.array(z40.object({ hash: z40.string() })),
|
|
9707
9802
|
/** versionId → first routable fullPath (version switcher). */
|
|
9708
|
-
versionFirstRoute:
|
|
9803
|
+
versionFirstRoute: z40.record(z40.string(), z40.string()),
|
|
9709
9804
|
/** CAS hash of the per-locale pages blob. */
|
|
9710
|
-
pagesHash:
|
|
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:
|
|
9814
|
+
files: z40.record(z40.string(), ManifestFileSchema),
|
|
9720
9815
|
/** apiDefinitionId → full + pruned API definition blobs. */
|
|
9721
|
-
apiDefs:
|
|
9816
|
+
apiDefs: z40.record(z40.string(), ManifestApiDefSchema)
|
|
9722
9817
|
});
|
|
9723
|
-
var LedgerManifestSchema =
|
|
9724
|
-
schema:
|
|
9818
|
+
var LedgerManifestSchema = z40.object({
|
|
9819
|
+
schema: z40.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
|
|
9725
9820
|
// ── Pointer / current-version fields ──────────────────────────────
|
|
9726
|
-
orgId:
|
|
9727
|
-
domain:
|
|
9728
|
-
basepath:
|
|
9729
|
-
deploymentId:
|
|
9730
|
-
deploymentHash:
|
|
9731
|
-
siteId:
|
|
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:
|
|
9734
|
-
assignedBy:
|
|
9735
|
-
isPreview:
|
|
9736
|
-
isPrivate:
|
|
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:
|
|
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:
|
|
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:
|
|
9854
|
+
siteHosts: z40.array(z40.string()).optional(),
|
|
9760
9855
|
/** Default locale for the deployment — read-path fallback when a translation is absent. */
|
|
9761
|
-
defaultLocale:
|
|
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:
|
|
9865
|
+
fileAnchorDomain: z40.string().optional(),
|
|
9771
9866
|
config: LedgerConfigBlobSchema,
|
|
9772
9867
|
chrome: LedgerChromeBlobSchema,
|
|
9773
|
-
locales:
|
|
9774
|
-
});
|
|
9775
|
-
var LedgerSiteArtifactSchema =
|
|
9776
|
-
|
|
9777
|
-
schema:
|
|
9778
|
-
unpublished:
|
|
9779
|
-
orgId:
|
|
9780
|
-
domain:
|
|
9781
|
-
basepath:
|
|
9782
|
-
isPreview:
|
|
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
|
|
9840
|
-
var PutContentInputSchema =
|
|
9841
|
-
contentType:
|
|
9842
|
-
contentLength:
|
|
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 =
|
|
9939
|
+
var PutContentResponseSchema = z41.discriminatedUnion("status", [
|
|
9845
9940
|
/** Content already exists in storage — client can skip the S3 upload. */
|
|
9846
|
-
|
|
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
|
-
|
|
9943
|
+
z41.object({ status: z41.literal("upload_required"), uploadUrl: z41.string() })
|
|
9849
9944
|
]);
|
|
9850
|
-
var PutFileInputSchema =
|
|
9851
|
-
hash:
|
|
9852
|
-
contentType:
|
|
9945
|
+
var PutFileInputSchema = z41.object({
|
|
9946
|
+
hash: z41.string(),
|
|
9947
|
+
contentType: z41.string()
|
|
9853
9948
|
});
|
|
9854
|
-
var FileResponseSchema =
|
|
9949
|
+
var FileResponseSchema = z41.object({
|
|
9855
9950
|
/** SHA-256 hex digest of the file content (64 characters). */
|
|
9856
|
-
hash:
|
|
9951
|
+
hash: z41.string(),
|
|
9857
9952
|
/** Presigned S3 GET URL. TTL is configurable (default 3600 seconds). */
|
|
9858
|
-
downloadUrl:
|
|
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
|
|
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 =
|
|
10085
|
+
var UpsertOrgConfigBodySchema = z42.object({
|
|
9991
10086
|
// A semver string sets the bound; `null` clears it; omitting leaves it unchanged.
|
|
9992
|
-
cliVersionMin:
|
|
9993
|
-
cliVersionMax:
|
|
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 =
|
|
9996
|
-
orgId:
|
|
9997
|
-
cliVersionMin:
|
|
9998
|
-
cliVersionMax:
|
|
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:
|
|
10095
|
+
updatedAt: z42.string().optional()
|
|
10001
10096
|
});
|
|
10002
10097
|
|
|
10003
10098
|
// src/orpc-client/themes/contract.ts
|
|
10004
|
-
var
|
|
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 =
|
|
10020
|
-
id:
|
|
10021
|
-
orgId:
|
|
10022
|
-
name:
|
|
10023
|
-
config:
|
|
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:
|
|
10026
|
-
updatedAt:
|
|
10120
|
+
hasLedger: z43.boolean(),
|
|
10121
|
+
updatedAt: z43.string()
|
|
10027
10122
|
// ISO 8601 timestamp
|
|
10028
10123
|
});
|
|
10029
|
-
var ThemeListItemSchema =
|
|
10030
|
-
id:
|
|
10031
|
-
orgId:
|
|
10032
|
-
name:
|
|
10033
|
-
updatedAt:
|
|
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 =
|
|
10036
|
-
themes:
|
|
10130
|
+
var ThemeListResponseSchema = z43.object({
|
|
10131
|
+
themes: z43.array(ThemeListItemSchema)
|
|
10037
10132
|
});
|
|
10038
|
-
var UpsertThemeBodySchema =
|
|
10039
|
-
name:
|
|
10040
|
-
config:
|
|
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:
|
|
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:
|
|
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
|
});
|