@fern-api/fdr-sdk 1.2.35-eaea1f74f7 → 1.2.36-1f77b99cda
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 +315 -55
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +315 -55
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/index.js +320 -60
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +320 -60
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/navigation/ledger-root-builder.js +732 -249
- package/dist/js/navigation/ledger-root-builder.js.map +1 -1
- package/dist/js/navigation/ledger-root-builder.mjs +730 -249
- package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
- package/dist/js/orpc-client.js +759 -91
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +715 -86
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/navigation/__test__/ledger-root-builder.changelogSlug.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.changelogSlug.test.d.ts.map +1 -0
- package/dist/types/navigation/__test__/ledger-root-builder.defaultVersionElision.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.defaultVersionElision.test.d.ts.map +1 -0
- package/dist/types/navigation/__test__/ledger-root-builder.linkRepro.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.linkRepro.test.d.ts.map +1 -0
- package/dist/types/navigation/__test__/ledger-root-builder.mergeEndpointPairs.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.mergeEndpointPairs.test.d.ts.map +1 -0
- package/dist/types/navigation/__test__/ledger-root-builder.pointsTo.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.pointsTo.test.d.ts.map +1 -0
- package/dist/types/navigation/__test__/ledger-root-builder.productId.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.productId.test.d.ts.map +1 -0
- package/dist/types/navigation/__test__/ledger-root-builder.rootChildOrder.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.rootChildOrder.test.d.ts.map +1 -0
- package/dist/types/navigation/__test__/ledger-root-builder.rootSectionSlug.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.rootSectionSlug.test.d.ts.map +1 -0
- package/dist/types/navigation/__test__/ledger-root-builder.tabSlug.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.tabSlug.test.d.ts.map +1 -0
- package/dist/types/navigation/ledger-root-builder.d.ts +26 -3
- package/dist/types/navigation/ledger-root-builder.d.ts.map +1 -1
- package/dist/types/orpc-client/client.d.ts +1 -2
- package/dist/types/orpc-client/client.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-ledger/client.d.ts +1 -3
- package/dist/types/orpc-client/docs-ledger/client.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-ledger/config-files.d.ts +16 -0
- package/dist/types/orpc-client/docs-ledger/config-files.d.ts.map +1 -0
- package/dist/types/orpc-client/docs-ledger/contract.d.ts +60922 -47158
- package/dist/types/orpc-client/docs-ledger/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-ledger/index.d.ts +3 -0
- package/dist/types/orpc-client/docs-ledger/index.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-ledger/ledger-manifest.d.ts +37008 -0
- package/dist/types/orpc-client/docs-ledger/ledger-manifest.d.ts.map +1 -0
- package/dist/types/orpc-client/docs-ledger/stable-stringify.d.ts +18 -0
- package/dist/types/orpc-client/docs-ledger/stable-stringify.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/js/orpc-client.js
CHANGED
|
@@ -257,6 +257,9 @@ __export(orpc_client_exports, {
|
|
|
257
257
|
JavaCoordinateSchema: () => JavaCoordinateSchema,
|
|
258
258
|
JqStringSchema: () => JqStringSchema,
|
|
259
259
|
JsonBodyShapeSchema: () => JsonBodyShapeSchema,
|
|
260
|
+
LEDGER_ARTIFACT_METADATA_SCHEMAS: () => LEDGER_ARTIFACT_METADATA_SCHEMAS,
|
|
261
|
+
LEDGER_MANIFEST_SCHEMA_VERSION: () => LEDGER_MANIFEST_SCHEMA_VERSION,
|
|
262
|
+
LEDGER_SHARD_SCHEMA_VERSION: () => LEDGER_SHARD_SCHEMA_VERSION,
|
|
260
263
|
LanguageEnumSchema: () => LanguageEnumSchema,
|
|
261
264
|
LatestApiDefinitionSchema: () => LatestApiDefinitionSchema,
|
|
262
265
|
LatestAuthSchemeSchema: () => LatestAuthSchemeSchema,
|
|
@@ -314,9 +317,35 @@ __export(orpc_client_exports, {
|
|
|
314
317
|
LatestWebhookDefinitionSchema: () => LatestWebhookDefinitionSchema,
|
|
315
318
|
LatestWebhookPayloadSchema: () => LatestWebhookPayloadSchema,
|
|
316
319
|
LatestWebhookPayloadShapeSchema: () => LatestWebhookPayloadShapeSchema,
|
|
320
|
+
LedgerArtifactMetadataSchema: () => LedgerArtifactMetadataSchema,
|
|
321
|
+
LedgerArtifactTypeSchema: () => LedgerArtifactTypeSchema,
|
|
322
|
+
LedgerChangelogEntryMetadataSchema: () => LedgerChangelogEntryMetadataSchema,
|
|
323
|
+
LedgerChromeBlobSchema: () => LedgerChromeBlobSchema,
|
|
324
|
+
LedgerConfigBlobSchema: () => LedgerConfigBlobSchema,
|
|
317
325
|
LedgerConfigSchema: () => LedgerConfigSchema,
|
|
326
|
+
LedgerFileArtifactMetadataSchema: () => LedgerFileArtifactMetadataSchema,
|
|
327
|
+
LedgerGraphQlMetadataSchema: () => LedgerGraphQlMetadataSchema,
|
|
328
|
+
LedgerGrpcMetadataSchema: () => LedgerGrpcMetadataSchema,
|
|
329
|
+
LedgerLinkMetadataSchema: () => LedgerLinkMetadataSchema,
|
|
330
|
+
LedgerLocaleIndexSchema: () => LedgerLocaleIndexSchema,
|
|
331
|
+
LedgerLocaleRoutingSchema: () => LedgerLocaleRoutingSchema,
|
|
332
|
+
LedgerManifestSchema: () => LedgerManifestSchema,
|
|
333
|
+
LedgerMarkdownMetadataSchema: () => LedgerMarkdownMetadataSchema,
|
|
334
|
+
LedgerNavRouteSchema: () => LedgerNavRouteSchema,
|
|
335
|
+
LedgerPagesBlobSchema: () => LedgerPagesBlobSchema,
|
|
336
|
+
LedgerPointerSegmentSchema: () => LedgerPointerSegmentSchema,
|
|
318
337
|
LedgerPreviewRegisterInputSchema: () => LedgerPreviewRegisterInputSchema,
|
|
319
338
|
LedgerPreviewRegisterResponseSchema: () => LedgerPreviewRegisterResponseSchema,
|
|
339
|
+
LedgerRedirectMetadataSchema: () => LedgerRedirectMetadataSchema,
|
|
340
|
+
LedgerRestMetadataSchema: () => LedgerRestMetadataSchema,
|
|
341
|
+
LedgerRouteShardSchema: () => LedgerRouteShardSchema,
|
|
342
|
+
LedgerSegmentDetailMetadataSchema: () => LedgerSegmentDetailMetadataSchema,
|
|
343
|
+
LedgerSegmentMetadataSchema: () => LedgerSegmentMetadataSchema,
|
|
344
|
+
LedgerShardFileSchema: () => LedgerShardFileSchema,
|
|
345
|
+
LedgerSidebarBundleSchema: () => LedgerSidebarBundleSchema,
|
|
346
|
+
LedgerSidebarMapEntrySchema: () => LedgerSidebarMapEntrySchema,
|
|
347
|
+
LedgerWebSocketMetadataSchema: () => LedgerWebSocketMetadataSchema,
|
|
348
|
+
LedgerWebhookMetadataSchema: () => LedgerWebhookMetadataSchema,
|
|
320
349
|
LibraryDocsBaseConfigSchema: () => LibraryDocsBaseConfigSchema,
|
|
321
350
|
LibraryDocsGenerationStatusSchema: () => LibraryDocsGenerationStatusSchema,
|
|
322
351
|
LibraryDocsResultSchema: () => LibraryDocsResultSchema,
|
|
@@ -338,6 +367,13 @@ __export(orpc_client_exports, {
|
|
|
338
367
|
LoadDocsForUrlResponseSchema: () => LoadDocsForUrlResponseSchema,
|
|
339
368
|
LocaleEntrySchema: () => LocaleEntrySchema,
|
|
340
369
|
LongTypeSchema: () => LongTypeSchema,
|
|
370
|
+
ManifestApiDefSchema: () => ManifestApiDefSchema,
|
|
371
|
+
ManifestBlobRefSchema: () => ManifestBlobRefSchema,
|
|
372
|
+
ManifestFileSchema: () => ManifestFileSchema,
|
|
373
|
+
ManifestNavRouteSchema: () => ManifestNavRouteSchema,
|
|
374
|
+
ManifestPageSchema: () => ManifestPageSchema,
|
|
375
|
+
ManifestRouteSchema: () => ManifestRouteSchema,
|
|
376
|
+
ManifestSegmentSchema: () => ManifestSegmentSchema,
|
|
341
377
|
MarkdownEntrySchema: () => MarkdownEntrySchema,
|
|
342
378
|
MissingContentSchema: () => MissingContentSchema,
|
|
343
379
|
MultipleAuthTypeSchema: () => MultipleAuthTypeSchema,
|
|
@@ -354,6 +390,7 @@ __export(orpc_client_exports, {
|
|
|
354
390
|
OpenRpcProtocolSchema: () => OpenRpcProtocolSchema,
|
|
355
391
|
OrgId: () => OrgId,
|
|
356
392
|
OrgIdSchema: () => OrgIdSchema,
|
|
393
|
+
PATH_OR_URL_METADATA_KEYS: () => PATH_OR_URL_METADATA_KEYS,
|
|
357
394
|
PageBlobRefSchema: () => PageBlobRefSchema,
|
|
358
395
|
PageContentInputSchema: () => PageContentInputSchema,
|
|
359
396
|
PageContentResponseSchema: () => PageContentResponseSchema,
|
|
@@ -549,6 +586,8 @@ __export(orpc_client_exports, {
|
|
|
549
586
|
WithDescriptionSchema: () => WithDescriptionSchema,
|
|
550
587
|
WithNamespaceSchema: () => WithNamespaceSchema,
|
|
551
588
|
YankSchema: () => YankSchema,
|
|
589
|
+
artifactTypeVariant: () => artifactTypeVariant,
|
|
590
|
+
collectConfigFilePaths: () => collectConfigFilePaths,
|
|
552
591
|
contentContract: () => contentContract,
|
|
553
592
|
createApiClient: () => createApiClient,
|
|
554
593
|
createDashboardClient: () => createDashboardClient,
|
|
@@ -556,7 +595,6 @@ __export(orpc_client_exports, {
|
|
|
556
595
|
createDocsClient: () => createDocsClient,
|
|
557
596
|
createDocsDeploymentClient: () => createDocsDeploymentClient,
|
|
558
597
|
createDocsLedgerClient: () => createDocsLedgerClient,
|
|
559
|
-
createDocsLedgerReadClient: () => createDocsLedgerReadClient,
|
|
560
598
|
createDocsV1ReadClient: () => createDocsV1ReadClient,
|
|
561
599
|
createDocsV1WriteClient: () => createDocsV1WriteClient,
|
|
562
600
|
createDocsV2ReadClient: () => createDocsV2ReadClient,
|
|
@@ -600,6 +638,7 @@ __export(orpc_client_exports, {
|
|
|
600
638
|
slugsContract: () => slugsContract,
|
|
601
639
|
snippetsContract: () => snippetsContract,
|
|
602
640
|
snippetsFactoryContract: () => snippetsFactoryContract,
|
|
641
|
+
stableStringify: () => stableStringify,
|
|
603
642
|
templatesContract: () => templatesContract,
|
|
604
643
|
tokensContract: () => tokensContract
|
|
605
644
|
});
|
|
@@ -4368,7 +4407,17 @@ var PageBlobRefSchema = z22.object({
|
|
|
4368
4407
|
/** SHA-256 hex of the page content bytes. */
|
|
4369
4408
|
hash: z22.string(),
|
|
4370
4409
|
contentType: z22.string().default("text/markdown"),
|
|
4371
|
-
contentLength: z22.number()
|
|
4410
|
+
contentLength: z22.number(),
|
|
4411
|
+
/**
|
|
4412
|
+
* Bare `fullPath`s of the file/image artifacts this page's rendered
|
|
4413
|
+
* markdown references (the `<fullPath>` of each `file:<fullPath>` token).
|
|
4414
|
+
* Captured CLI-side from the already-rewritten page markdown (same `file:`
|
|
4415
|
+
* regex the bundle serializer uses) so FDR can materialise the page→file
|
|
4416
|
+
* join into the route shards without re-fetching or re-parsing content
|
|
4417
|
+
* (ADR 0016, "File metadata on the render path"). Optional — older CLIs
|
|
4418
|
+
* omit it and the page simply contributes no shard-side file identities.
|
|
4419
|
+
*/
|
|
4420
|
+
referencedFiles: z22.array(z22.string()).optional()
|
|
4372
4421
|
});
|
|
4373
4422
|
var FileManifestEntrySchema = z22.object({
|
|
4374
4423
|
/** SHA-256 hex of the file bytes (= CAS content hash). */
|
|
@@ -4398,6 +4447,21 @@ var BackgroundColorSchema = z22.discriminatedUnion("type", [
|
|
|
4398
4447
|
z22.object({ type: z22.literal("solid"), ...RgbaSchema.shape }),
|
|
4399
4448
|
z22.object({ type: z22.literal("gradient") })
|
|
4400
4449
|
]);
|
|
4450
|
+
var ACCENT_SCALE_KEYS = [
|
|
4451
|
+
"accent1",
|
|
4452
|
+
"accent2",
|
|
4453
|
+
"accent3",
|
|
4454
|
+
"accent4",
|
|
4455
|
+
"accent5",
|
|
4456
|
+
"accent6",
|
|
4457
|
+
"accent7",
|
|
4458
|
+
"accent8",
|
|
4459
|
+
"accent9",
|
|
4460
|
+
"accent10",
|
|
4461
|
+
"accent11",
|
|
4462
|
+
"accent12"
|
|
4463
|
+
];
|
|
4464
|
+
var accentScaleShape = Object.fromEntries(ACCENT_SCALE_KEYS.map((key) => [key, RgbaSchema.optional()]));
|
|
4401
4465
|
var LedgerThemeConfigSchema = z22.object({
|
|
4402
4466
|
logo: ImageRefSchema.optional(),
|
|
4403
4467
|
backgroundImage: z22.string().optional(),
|
|
@@ -4407,18 +4471,7 @@ var LedgerThemeConfigSchema = z22.object({
|
|
|
4407
4471
|
sidebarBackground: RgbaSchema.optional(),
|
|
4408
4472
|
headerBackground: RgbaSchema.optional(),
|
|
4409
4473
|
cardBackground: RgbaSchema.optional(),
|
|
4410
|
-
|
|
4411
|
-
accent2: RgbaSchema.optional(),
|
|
4412
|
-
accent3: RgbaSchema.optional(),
|
|
4413
|
-
accent4: RgbaSchema.optional(),
|
|
4414
|
-
accent5: RgbaSchema.optional(),
|
|
4415
|
-
accent6: RgbaSchema.optional(),
|
|
4416
|
-
accent7: RgbaSchema.optional(),
|
|
4417
|
-
accent8: RgbaSchema.optional(),
|
|
4418
|
-
accent9: RgbaSchema.optional(),
|
|
4419
|
-
accent10: RgbaSchema.optional(),
|
|
4420
|
-
accent11: RgbaSchema.optional(),
|
|
4421
|
-
accent12: RgbaSchema.optional()
|
|
4474
|
+
...accentScaleShape
|
|
4422
4475
|
});
|
|
4423
4476
|
var LedgerColorsConfigSchema = z22.discriminatedUnion("type", [
|
|
4424
4477
|
z22.object({ type: z22.literal("dark"), ...LedgerThemeConfigSchema.shape }),
|
|
@@ -4472,6 +4525,14 @@ var LedgerMetadataConfigSchema = z22.record(z22.string(), z22.unknown()).and(
|
|
|
4472
4525
|
"og:dynamic:background-image": PathOrUrlSchema.optional()
|
|
4473
4526
|
})
|
|
4474
4527
|
);
|
|
4528
|
+
var NavbarLinksFieldSchema = z22.array(NavbarLinkSchema);
|
|
4529
|
+
var FooterLinksFieldSchema = z22.array(FooterLinkSchema);
|
|
4530
|
+
var LayoutFieldSchema = DocsLayoutConfigSchema;
|
|
4531
|
+
var ThemeFieldSchema = DocsThemeConfigSchema;
|
|
4532
|
+
var SettingsFieldSchema = DocsSettingsConfigSchema;
|
|
4533
|
+
var AnalyticsFieldSchema = AnalyticsConfigSchema;
|
|
4534
|
+
var AIChatFieldSchema = AIChatConfigSchema;
|
|
4535
|
+
var PageActionsFieldSchema = PageActionsConfigSchema;
|
|
4475
4536
|
var LedgerAgentsConfigSchema = z22.object({
|
|
4476
4537
|
pageDirective: z22.string().optional(),
|
|
4477
4538
|
pageDescriptionSource: z22.enum(["description", "subtitle"]).optional(),
|
|
@@ -4485,31 +4546,272 @@ var LedgerConfigSchema = z22.object({
|
|
|
4485
4546
|
translations: z22.array(z22.string()).optional()
|
|
4486
4547
|
}).optional(),
|
|
4487
4548
|
announcement: z22.object({ text: z22.string() }).optional(),
|
|
4488
|
-
navbarLinks:
|
|
4489
|
-
footerLinks:
|
|
4549
|
+
navbarLinks: NavbarLinksFieldSchema.optional(),
|
|
4550
|
+
footerLinks: FooterLinksFieldSchema.optional(),
|
|
4490
4551
|
logoHeight: z22.number().optional(),
|
|
4491
4552
|
logoHref: z22.string().optional(),
|
|
4492
4553
|
logoRightText: z22.string().optional(),
|
|
4554
|
+
/** fullPath of the favicon file artifact (any extension: .svg/.png/.ico). */
|
|
4555
|
+
favicon: z22.string().nullish(),
|
|
4493
4556
|
agents: LedgerAgentsConfigSchema.optional(),
|
|
4494
4557
|
metadata: LedgerMetadataConfigSchema.optional(),
|
|
4495
4558
|
redirects: z22.array(z22.object({ source: z22.string(), destination: z22.string(), permanent: z22.boolean().optional() })).optional(),
|
|
4496
4559
|
colorsV3: LedgerColorsConfigSchema.optional(),
|
|
4497
|
-
layout:
|
|
4498
|
-
theme:
|
|
4499
|
-
settings:
|
|
4560
|
+
layout: LayoutFieldSchema.optional(),
|
|
4561
|
+
theme: ThemeFieldSchema.optional(),
|
|
4562
|
+
settings: SettingsFieldSchema.optional(),
|
|
4500
4563
|
typographyV2: LedgerTypographySchema.optional(),
|
|
4501
|
-
analyticsConfig:
|
|
4564
|
+
analyticsConfig: AnalyticsFieldSchema.optional(),
|
|
4502
4565
|
integrations: z22.object({
|
|
4503
4566
|
intercom: z22.string().optional()
|
|
4504
4567
|
}).optional(),
|
|
4505
4568
|
css: z22.object({ inline: z22.array(z22.string()).optional() }).optional(),
|
|
4506
4569
|
js: LedgerJsConfigSchema.optional(),
|
|
4507
|
-
aiChatConfig:
|
|
4508
|
-
pageActions:
|
|
4570
|
+
aiChatConfig: AIChatFieldSchema.optional(),
|
|
4571
|
+
pageActions: PageActionsFieldSchema.optional(),
|
|
4509
4572
|
editThisPageLaunch: z22.enum(["github", "dashboard"]).optional(),
|
|
4510
4573
|
header: z22.string().optional(),
|
|
4511
4574
|
footer: z22.string().optional()
|
|
4512
4575
|
});
|
|
4576
|
+
var MetadataStringArraySchema = z22.array(z22.string());
|
|
4577
|
+
var FeatureFlagMetadataSchema = z22.array(
|
|
4578
|
+
z22.union([
|
|
4579
|
+
z22.string(),
|
|
4580
|
+
z22.object({
|
|
4581
|
+
flag: z22.string(),
|
|
4582
|
+
fallbackValue: z22.unknown().optional(),
|
|
4583
|
+
match: z22.unknown().optional()
|
|
4584
|
+
})
|
|
4585
|
+
])
|
|
4586
|
+
);
|
|
4587
|
+
var LinkTargetSchema2 = z22.enum(["_blank", "_self", "_parent", "_top"]);
|
|
4588
|
+
var CollapsedSchema = z22.union([z22.boolean(), z22.literal("open-by-default")]);
|
|
4589
|
+
var LedgerAvailabilitySchema = z22.union([
|
|
4590
|
+
AvailabilitySchema,
|
|
4591
|
+
z22.enum([
|
|
4592
|
+
"alpha",
|
|
4593
|
+
"stable",
|
|
4594
|
+
"generally-available",
|
|
4595
|
+
"in-development",
|
|
4596
|
+
"pre-release",
|
|
4597
|
+
"beta",
|
|
4598
|
+
"preview",
|
|
4599
|
+
"deprecated",
|
|
4600
|
+
"legacy"
|
|
4601
|
+
])
|
|
4602
|
+
]);
|
|
4603
|
+
var LedgerArtifactTypeSchema = z22.enum([
|
|
4604
|
+
"markdown",
|
|
4605
|
+
"page",
|
|
4606
|
+
"rest",
|
|
4607
|
+
"asyncapi",
|
|
4608
|
+
"webhook",
|
|
4609
|
+
"grpc",
|
|
4610
|
+
"graphql",
|
|
4611
|
+
"changelog",
|
|
4612
|
+
"link",
|
|
4613
|
+
"file",
|
|
4614
|
+
"image",
|
|
4615
|
+
"redirect"
|
|
4616
|
+
]);
|
|
4617
|
+
var LedgerMetadataBaseSchema = z22.object({}).passthrough();
|
|
4618
|
+
var NodeMetadataFields = {
|
|
4619
|
+
title: z22.string().optional(),
|
|
4620
|
+
slug: z22.string().optional(),
|
|
4621
|
+
icon: z22.string().optional(),
|
|
4622
|
+
viewers: MetadataStringArraySchema.optional(),
|
|
4623
|
+
orphaned: z22.boolean().optional(),
|
|
4624
|
+
featureFlags: FeatureFlagMetadataSchema.optional()
|
|
4625
|
+
};
|
|
4626
|
+
var ApiNodeMetadataFields = {
|
|
4627
|
+
...NodeMetadataFields,
|
|
4628
|
+
apiDefinitionId: z22.string(),
|
|
4629
|
+
availability: LedgerAvailabilitySchema.optional()
|
|
4630
|
+
};
|
|
4631
|
+
var LedgerSegmentDetailMetadataObjectSchema = LedgerMetadataBaseSchema.extend({
|
|
4632
|
+
slug: z22.string().optional(),
|
|
4633
|
+
default: z22.boolean().optional(),
|
|
4634
|
+
subtitle: z22.string().optional(),
|
|
4635
|
+
href: z22.string().optional(),
|
|
4636
|
+
url: z22.string().optional(),
|
|
4637
|
+
target: LinkTargetSchema2.optional(),
|
|
4638
|
+
image: z22.string().optional(),
|
|
4639
|
+
pointsTo: z22.string().optional(),
|
|
4640
|
+
availability: LedgerAvailabilitySchema.optional(),
|
|
4641
|
+
tab_type: z22.enum(["tab", "link", "changelog"]).optional()
|
|
4642
|
+
});
|
|
4643
|
+
var LedgerSegmentDetailMetadataSchema = LedgerSegmentDetailMetadataObjectSchema.nullable();
|
|
4644
|
+
var LedgerSegmentMetadataObjectSchema = z22.discriminatedUnion("type", [
|
|
4645
|
+
LedgerMetadataBaseSchema.extend({
|
|
4646
|
+
type: z22.literal("tabRoot")
|
|
4647
|
+
}),
|
|
4648
|
+
LedgerMetadataBaseSchema.extend({
|
|
4649
|
+
type: z22.literal("section"),
|
|
4650
|
+
title: z22.string().optional(),
|
|
4651
|
+
icon: z22.string().optional(),
|
|
4652
|
+
collapsed: CollapsedSchema.optional(),
|
|
4653
|
+
collapsible: z22.boolean().optional(),
|
|
4654
|
+
collapsedByDefault: z22.boolean().optional(),
|
|
4655
|
+
availability: LedgerAvailabilitySchema.optional(),
|
|
4656
|
+
overviewPageId: z22.string().optional(),
|
|
4657
|
+
pointsTo: z22.string().optional(),
|
|
4658
|
+
viewers: MetadataStringArraySchema.optional()
|
|
4659
|
+
}),
|
|
4660
|
+
LedgerMetadataBaseSchema.extend({
|
|
4661
|
+
type: z22.literal("apiReference"),
|
|
4662
|
+
title: z22.string().optional(),
|
|
4663
|
+
icon: z22.string().optional(),
|
|
4664
|
+
apiDefinitionId: z22.string().optional(),
|
|
4665
|
+
overviewPageId: z22.string().optional(),
|
|
4666
|
+
availability: LedgerAvailabilitySchema.optional(),
|
|
4667
|
+
pointsTo: z22.string().optional(),
|
|
4668
|
+
paginated: z22.boolean().optional(),
|
|
4669
|
+
showErrors: z22.boolean().optional(),
|
|
4670
|
+
hideTitle: z22.boolean().optional(),
|
|
4671
|
+
viewers: MetadataStringArraySchema.optional()
|
|
4672
|
+
}),
|
|
4673
|
+
LedgerMetadataBaseSchema.extend({
|
|
4674
|
+
type: z22.literal("apiPackage"),
|
|
4675
|
+
title: z22.string().optional(),
|
|
4676
|
+
icon: z22.string().optional(),
|
|
4677
|
+
apiDefinitionId: z22.string().optional(),
|
|
4678
|
+
overviewPageId: z22.string().optional(),
|
|
4679
|
+
availability: LedgerAvailabilitySchema.optional(),
|
|
4680
|
+
pointsTo: z22.string().optional(),
|
|
4681
|
+
viewers: MetadataStringArraySchema.optional()
|
|
4682
|
+
}),
|
|
4683
|
+
LedgerMetadataBaseSchema.extend({
|
|
4684
|
+
type: z22.literal("changelog"),
|
|
4685
|
+
title: z22.string().optional(),
|
|
4686
|
+
icon: z22.string().optional(),
|
|
4687
|
+
overviewPageId: z22.string().optional(),
|
|
4688
|
+
apiDefinitionId: z22.string().optional(),
|
|
4689
|
+
viewers: MetadataStringArraySchema.optional()
|
|
4690
|
+
}),
|
|
4691
|
+
LedgerMetadataBaseSchema.extend({
|
|
4692
|
+
type: z22.literal("files")
|
|
4693
|
+
}),
|
|
4694
|
+
LedgerMetadataBaseSchema.extend({
|
|
4695
|
+
type: z22.literal("redirects")
|
|
4696
|
+
})
|
|
4697
|
+
]);
|
|
4698
|
+
var LedgerSegmentMetadataSchema = LedgerSegmentMetadataObjectSchema;
|
|
4699
|
+
var LedgerMarkdownMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
4700
|
+
...NodeMetadataFields,
|
|
4701
|
+
pageId: z22.string().optional(),
|
|
4702
|
+
isOverview: z22.boolean().optional(),
|
|
4703
|
+
noindex: z22.boolean().optional()
|
|
4704
|
+
});
|
|
4705
|
+
var LedgerRestMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
4706
|
+
...ApiNodeMetadataFields,
|
|
4707
|
+
endpointId: z22.string(),
|
|
4708
|
+
method: HttpMethodSchema,
|
|
4709
|
+
isResponseStream: z22.boolean().optional(),
|
|
4710
|
+
endpointPairKey: z22.string().optional()
|
|
4711
|
+
});
|
|
4712
|
+
var LedgerWebSocketMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
4713
|
+
...ApiNodeMetadataFields,
|
|
4714
|
+
webSocketId: z22.string()
|
|
4715
|
+
});
|
|
4716
|
+
var LedgerWebhookMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
4717
|
+
...ApiNodeMetadataFields,
|
|
4718
|
+
webhookId: z22.string(),
|
|
4719
|
+
// V1.WebhookNode carries the full HttpMethod union, so the read model must accept it too.
|
|
4720
|
+
method: HttpMethodSchema
|
|
4721
|
+
});
|
|
4722
|
+
var LedgerGrpcMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
4723
|
+
...ApiNodeMetadataFields,
|
|
4724
|
+
grpcId: z22.string(),
|
|
4725
|
+
method: GrpcMethodSchema
|
|
4726
|
+
});
|
|
4727
|
+
var LedgerGraphQlMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
4728
|
+
...ApiNodeMetadataFields,
|
|
4729
|
+
graphqlOperationId: z22.string(),
|
|
4730
|
+
operationType: GraphQlOperationTypeSchema
|
|
4731
|
+
});
|
|
4732
|
+
var LedgerChangelogEntryMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
4733
|
+
title: z22.string().optional(),
|
|
4734
|
+
slug: z22.string().optional(),
|
|
4735
|
+
icon: z22.string().optional(),
|
|
4736
|
+
pageId: z22.string(),
|
|
4737
|
+
date: z22.string().optional(),
|
|
4738
|
+
tags: MetadataStringArraySchema.optional()
|
|
4739
|
+
});
|
|
4740
|
+
var LedgerLinkMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
4741
|
+
title: z22.string().optional(),
|
|
4742
|
+
slug: z22.string().optional(),
|
|
4743
|
+
icon: z22.string().optional(),
|
|
4744
|
+
url: z22.string(),
|
|
4745
|
+
target: LinkTargetSchema2.optional()
|
|
4746
|
+
});
|
|
4747
|
+
var LedgerFileArtifactMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
4748
|
+
contentType: z22.string(),
|
|
4749
|
+
filename: z22.string(),
|
|
4750
|
+
width: z22.number().optional(),
|
|
4751
|
+
height: z22.number().optional(),
|
|
4752
|
+
blurDataURL: z22.string().optional()
|
|
4753
|
+
});
|
|
4754
|
+
var LedgerRedirectMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
4755
|
+
href: z22.string().optional()
|
|
4756
|
+
});
|
|
4757
|
+
var LedgerArtifactMetadataSchema = z22.union([
|
|
4758
|
+
LedgerMarkdownMetadataSchema,
|
|
4759
|
+
LedgerRestMetadataSchema,
|
|
4760
|
+
LedgerWebSocketMetadataSchema,
|
|
4761
|
+
LedgerWebhookMetadataSchema,
|
|
4762
|
+
LedgerGrpcMetadataSchema,
|
|
4763
|
+
LedgerGraphQlMetadataSchema,
|
|
4764
|
+
LedgerChangelogEntryMetadataSchema,
|
|
4765
|
+
LedgerLinkMetadataSchema,
|
|
4766
|
+
LedgerFileArtifactMetadataSchema,
|
|
4767
|
+
LedgerRedirectMetadataSchema
|
|
4768
|
+
]);
|
|
4769
|
+
var LEDGER_ARTIFACT_METADATA_SCHEMAS = {
|
|
4770
|
+
markdown: LedgerMarkdownMetadataSchema,
|
|
4771
|
+
page: LedgerMarkdownMetadataSchema,
|
|
4772
|
+
rest: LedgerRestMetadataSchema,
|
|
4773
|
+
asyncapi: LedgerWebSocketMetadataSchema,
|
|
4774
|
+
webhook: LedgerWebhookMetadataSchema,
|
|
4775
|
+
grpc: LedgerGrpcMetadataSchema,
|
|
4776
|
+
graphql: LedgerGraphQlMetadataSchema,
|
|
4777
|
+
changelog: LedgerChangelogEntryMetadataSchema,
|
|
4778
|
+
link: LedgerLinkMetadataSchema,
|
|
4779
|
+
file: LedgerFileArtifactMetadataSchema,
|
|
4780
|
+
image: LedgerFileArtifactMetadataSchema,
|
|
4781
|
+
redirect: LedgerRedirectMetadataSchema
|
|
4782
|
+
};
|
|
4783
|
+
function artifactTypeVariant(base, type) {
|
|
4784
|
+
return base.extend({
|
|
4785
|
+
artifactType: z22.literal(type),
|
|
4786
|
+
artifactMetadata: LEDGER_ARTIFACT_METADATA_SCHEMAS[type]
|
|
4787
|
+
});
|
|
4788
|
+
}
|
|
4789
|
+
var NavRouteBaseSchema = z22.object({
|
|
4790
|
+
fullPath: z22.string().nullable(),
|
|
4791
|
+
artifactId: z22.string(),
|
|
4792
|
+
hidden: z22.boolean(),
|
|
4793
|
+
displaySortOrder: z22.number().nullable().optional()
|
|
4794
|
+
});
|
|
4795
|
+
function navRouteVariant(type) {
|
|
4796
|
+
return NavRouteBaseSchema.extend({
|
|
4797
|
+
type: z22.literal(type),
|
|
4798
|
+
metadata: LEDGER_ARTIFACT_METADATA_SCHEMAS[type]
|
|
4799
|
+
});
|
|
4800
|
+
}
|
|
4801
|
+
var LedgerNavRouteSchema = z22.discriminatedUnion("type", [
|
|
4802
|
+
navRouteVariant("markdown"),
|
|
4803
|
+
navRouteVariant("page"),
|
|
4804
|
+
navRouteVariant("rest"),
|
|
4805
|
+
navRouteVariant("asyncapi"),
|
|
4806
|
+
navRouteVariant("webhook"),
|
|
4807
|
+
navRouteVariant("grpc"),
|
|
4808
|
+
navRouteVariant("graphql"),
|
|
4809
|
+
navRouteVariant("changelog"),
|
|
4810
|
+
navRouteVariant("link"),
|
|
4811
|
+
navRouteVariant("file"),
|
|
4812
|
+
navRouteVariant("image"),
|
|
4813
|
+
navRouteVariant("redirect")
|
|
4814
|
+
]);
|
|
4513
4815
|
var DocsPublishGitInputSchema = z22.object({
|
|
4514
4816
|
/** Full HTTPS URL of the repo (e.g. `https://github.com/acme/docs`). */
|
|
4515
4817
|
repoUrl: z22.string(),
|
|
@@ -4547,11 +4849,12 @@ var DocsContentFieldsSchema = z22.object({
|
|
|
4547
4849
|
*/
|
|
4548
4850
|
git: DocsPublishGitInputSchema.optional()
|
|
4549
4851
|
});
|
|
4550
|
-
var
|
|
4852
|
+
var LocaleEntrySchemaInternal = DocsContentFieldsSchema.extend({
|
|
4551
4853
|
/** Locale identifier (e.g. "en", "es", "ja"). Required — no default. */
|
|
4552
4854
|
locale: z22.string()
|
|
4553
4855
|
});
|
|
4554
|
-
var
|
|
4856
|
+
var LocaleEntrySchema = LocaleEntrySchemaInternal;
|
|
4857
|
+
var DocsPublishInputSchemaInternal = z22.object({
|
|
4555
4858
|
orgId: z22.string(),
|
|
4556
4859
|
domain: z22.string(),
|
|
4557
4860
|
basepath: z22.string().default(""),
|
|
@@ -4578,7 +4881,8 @@ var DocsPublishInputSchema = z22.object({
|
|
|
4578
4881
|
message: "defaultLocale must match one of the locales in the locales array",
|
|
4579
4882
|
path: ["defaultLocale"]
|
|
4580
4883
|
});
|
|
4581
|
-
var
|
|
4884
|
+
var DocsPublishInputSchema = DocsPublishInputSchemaInternal;
|
|
4885
|
+
var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.extend({
|
|
4582
4886
|
orgId: z22.string(),
|
|
4583
4887
|
/**
|
|
4584
4888
|
* Optional caller-supplied identifier for the preview hostname. Sanitized
|
|
@@ -4595,6 +4899,7 @@ var LedgerPreviewRegisterInputSchema = DocsContentFieldsSchema.extend({
|
|
|
4595
4899
|
*/
|
|
4596
4900
|
basePath: z22.string().default("")
|
|
4597
4901
|
});
|
|
4902
|
+
var LedgerPreviewRegisterInputSchema = LedgerPreviewRegisterInputSchemaInternal;
|
|
4598
4903
|
var LedgerPreviewRegisterResponseSchema = z22.object({
|
|
4599
4904
|
deploymentHash: z22.string(),
|
|
4600
4905
|
missingContent: z22.array(MissingContentSchema),
|
|
@@ -4646,7 +4951,7 @@ var SegmentDetailSchema = z22.object({
|
|
|
4646
4951
|
orphaned: z22.boolean(),
|
|
4647
4952
|
featureFlags: z22.array(z22.string()),
|
|
4648
4953
|
/** Type-specific fields: slug, default, subtitle, href, target, image, availability, pointsTo, tab_type. */
|
|
4649
|
-
metadata:
|
|
4954
|
+
metadata: LedgerSegmentDetailMetadataSchema
|
|
4650
4955
|
});
|
|
4651
4956
|
var SegmentSchema = z22.object({
|
|
4652
4957
|
segmentId: z22.string(),
|
|
@@ -4658,7 +4963,7 @@ var SegmentSchema = z22.object({
|
|
|
4658
4963
|
/** Whether the segment is hidden from the sidebar. */
|
|
4659
4964
|
hidden: z22.boolean(),
|
|
4660
4965
|
/** Segment type descriptor (seg.metadata): { type, title, icon, apiDefinitionId, overviewPageId, pointsTo, ... }. */
|
|
4661
|
-
metadata:
|
|
4966
|
+
metadata: LedgerSegmentMetadataSchema,
|
|
4662
4967
|
/** Full product/version/variant/tab detail metadata, or null when the dimension is absent. */
|
|
4663
4968
|
product: SegmentDetailSchema.nullable(),
|
|
4664
4969
|
version: SegmentDetailSchema.nullable(),
|
|
@@ -4727,16 +5032,19 @@ var VersionMetadataResponseSchema = z22.object({
|
|
|
4727
5032
|
var PageContentInputSchema = z22.object({
|
|
4728
5033
|
deploymentId: z22.string(),
|
|
4729
5034
|
fullPath: z22.string().optional(),
|
|
4730
|
-
pageId: z22.string().optional()
|
|
5035
|
+
pageId: z22.string().optional(),
|
|
5036
|
+
locale: z22.string().optional()
|
|
4731
5037
|
});
|
|
4732
5038
|
var PageContentResponseSchema = z22.object({
|
|
4733
5039
|
s3Key: z22.string(),
|
|
4734
5040
|
segmentHash: z22.string(),
|
|
4735
|
-
url: z22.string()
|
|
5041
|
+
url: z22.string(),
|
|
5042
|
+
pageId: z22.string().optional()
|
|
4736
5043
|
});
|
|
4737
5044
|
var BatchPageContentInputSchema = z22.object({
|
|
4738
5045
|
deploymentId: z22.string(),
|
|
4739
|
-
pageIds: z22.array(z22.string()).min(1).max(2e3)
|
|
5046
|
+
pageIds: z22.array(z22.string()).min(1).max(2e3),
|
|
5047
|
+
locale: z22.string().optional()
|
|
4740
5048
|
});
|
|
4741
5049
|
var BatchPageContentItemSchema = z22.object({
|
|
4742
5050
|
pageId: z22.string(),
|
|
@@ -4749,32 +5057,21 @@ var BatchPageContentResponseSchema = z22.object({
|
|
|
4749
5057
|
var NavInputSchema = z22.object({
|
|
4750
5058
|
segmentHash: z22.string()
|
|
4751
5059
|
});
|
|
4752
|
-
var NavRouteSchema = z22.object({
|
|
4753
|
-
fullPath: z22.string().nullable(),
|
|
4754
|
-
artifactId: z22.string(),
|
|
4755
|
-
type: z22.string(),
|
|
4756
|
-
/** Whether the artifact is hidden from the sidebar. */
|
|
4757
|
-
hidden: z22.boolean(),
|
|
4758
|
-
metadata: z22.unknown()
|
|
4759
|
-
});
|
|
4760
5060
|
var NavResponseSchema = z22.object({
|
|
4761
|
-
routes: z22.array(
|
|
5061
|
+
routes: z22.array(LedgerNavRouteSchema)
|
|
4762
5062
|
});
|
|
4763
5063
|
var RouteContextInputSchema = z22.object({
|
|
4764
5064
|
deploymentId: z22.string(),
|
|
4765
5065
|
fullPath: z22.string(),
|
|
4766
5066
|
locale: z22.string().optional()
|
|
4767
5067
|
});
|
|
4768
|
-
var
|
|
5068
|
+
var RouteContextResponseBaseSchema = z22.object({
|
|
5069
|
+
artifactId: z22.string(),
|
|
4769
5070
|
/** Hash of the segment that owns the matched route — feed to `nav`. */
|
|
4770
5071
|
segmentHash: z22.string(),
|
|
4771
5072
|
/** Section path of the owning segment (e.g. "models/command"). */
|
|
4772
5073
|
section: z22.string(),
|
|
4773
5074
|
locale: z22.string(),
|
|
4774
|
-
/** The artifact matched at `fullPath`. */
|
|
4775
|
-
artifactId: z22.string(),
|
|
4776
|
-
artifactType: z22.string(),
|
|
4777
|
-
artifactMetadata: z22.unknown(),
|
|
4778
5075
|
/**
|
|
4779
5076
|
* Page content reference, or null for non-page artifacts (links/redirects)
|
|
4780
5077
|
* and route-only aliases that carry no content blob.
|
|
@@ -4789,6 +5086,20 @@ var RouteContextResponseSchema = z22.object({
|
|
|
4789
5086
|
variant: SegmentDetailSchema.nullable(),
|
|
4790
5087
|
tab: SegmentDetailSchema.nullable()
|
|
4791
5088
|
});
|
|
5089
|
+
var RouteContextResponseSchema = z22.discriminatedUnion("artifactType", [
|
|
5090
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "markdown"),
|
|
5091
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "page"),
|
|
5092
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "rest"),
|
|
5093
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "asyncapi"),
|
|
5094
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "webhook"),
|
|
5095
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "grpc"),
|
|
5096
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "graphql"),
|
|
5097
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "changelog"),
|
|
5098
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "link"),
|
|
5099
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "file"),
|
|
5100
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "image"),
|
|
5101
|
+
artifactTypeVariant(RouteContextResponseBaseSchema, "redirect")
|
|
5102
|
+
]);
|
|
4792
5103
|
var TopLevelNavigationInputSchema = z22.object({
|
|
4793
5104
|
deploymentId: z22.string(),
|
|
4794
5105
|
locale: z22.string().optional()
|
|
@@ -4905,17 +5216,6 @@ function createDocsLedgerClient(options) {
|
|
|
4905
5216
|
});
|
|
4906
5217
|
return (0, import_client17.createORPCClient)(link);
|
|
4907
5218
|
}
|
|
4908
|
-
function createDocsLedgerReadClient(options) {
|
|
4909
|
-
const baseUrl = options.baseUrl.replace(/\/+$/, "");
|
|
4910
|
-
const link = new import_fetch11.OpenAPILink(docsLedgerReadContract, {
|
|
4911
|
-
url: `${baseUrl}/docs-ledger`,
|
|
4912
|
-
headers: () => ({
|
|
4913
|
-
Authorization: `Bearer ${options.token}`,
|
|
4914
|
-
...options.headers
|
|
4915
|
-
})
|
|
4916
|
-
});
|
|
4917
|
-
return (0, import_client17.createORPCClient)(link);
|
|
4918
|
-
}
|
|
4919
5219
|
|
|
4920
5220
|
// src/orpc-client/editor-snapshot/client.ts
|
|
4921
5221
|
var import_client18 = require("@orpc/client");
|
|
@@ -5814,7 +6114,6 @@ function createFdrORPCClient(options) {
|
|
|
5814
6114
|
docsCache: createDocsCacheClient(normalizedOptions),
|
|
5815
6115
|
docsDeployment: createDocsDeploymentClient(normalizedOptions),
|
|
5816
6116
|
docsLedger: createDocsLedgerClient(normalizedOptions),
|
|
5817
|
-
docsLedgerRead: createDocsLedgerReadClient(normalizedOptions),
|
|
5818
6117
|
editorSnapshot: createEditorSnapshotClient(normalizedOptions),
|
|
5819
6118
|
generators: {
|
|
5820
6119
|
root: createGeneratorsRootClient(normalizedOptions),
|
|
@@ -5832,51 +6131,381 @@ function createFdrORPCClient(options) {
|
|
|
5832
6131
|
};
|
|
5833
6132
|
}
|
|
5834
6133
|
|
|
5835
|
-
// src/orpc-client/files
|
|
5836
|
-
var import_contract43 = require("@orpc/contract");
|
|
6134
|
+
// src/orpc-client/docs-ledger/config-files.ts
|
|
5837
6135
|
var z32 = __toESM(require("zod"), 1);
|
|
5838
|
-
var
|
|
5839
|
-
|
|
5840
|
-
|
|
6136
|
+
var PATH_OR_URL_METADATA_KEYS = [
|
|
6137
|
+
"og:image",
|
|
6138
|
+
"og:logo",
|
|
6139
|
+
"twitter:image",
|
|
6140
|
+
"og:background-image",
|
|
6141
|
+
"og:dynamic:background-image"
|
|
6142
|
+
];
|
|
6143
|
+
var LogoViewSchema = z32.union([z32.string(), z32.object({ path: z32.string() }).transform((v) => v.path)]);
|
|
6144
|
+
var ThemeViewSchema = z32.object({
|
|
6145
|
+
logo: LogoViewSchema.optional().catch(void 0),
|
|
6146
|
+
backgroundImage: z32.string().optional().catch(void 0)
|
|
6147
|
+
});
|
|
6148
|
+
var ColorsViewSchema = z32.union([
|
|
6149
|
+
z32.object({
|
|
6150
|
+
type: z32.literal("darkAndLight"),
|
|
6151
|
+
dark: ThemeViewSchema.optional().catch(void 0),
|
|
6152
|
+
light: ThemeViewSchema.optional().catch(void 0)
|
|
6153
|
+
}),
|
|
6154
|
+
ThemeViewSchema.transform((theme) => ({ type: "single", theme }))
|
|
6155
|
+
]);
|
|
6156
|
+
var FontViewSchema = z32.object({
|
|
6157
|
+
variants: z32.array(z32.object({ fontFile: z32.string().optional().catch(void 0) })).catch([])
|
|
6158
|
+
});
|
|
6159
|
+
var TypographyViewSchema = z32.object({
|
|
6160
|
+
headingsFont: FontViewSchema.optional().catch(void 0),
|
|
6161
|
+
bodyFont: FontViewSchema.optional().catch(void 0),
|
|
6162
|
+
codeFont: FontViewSchema.optional().catch(void 0)
|
|
5841
6163
|
});
|
|
5842
|
-
var
|
|
6164
|
+
var JsFileViewSchema = z32.union([
|
|
6165
|
+
z32.object({ path: z32.string() }).transform((v) => v.path),
|
|
6166
|
+
z32.object({ fileId: z32.string() }).transform((v) => v.fileId)
|
|
6167
|
+
]);
|
|
6168
|
+
var MetadataFileRefViewSchema = z32.object({
|
|
6169
|
+
type: z32.enum(["path", "fileId"]),
|
|
6170
|
+
value: z32.string()
|
|
6171
|
+
});
|
|
6172
|
+
var ConfigViewSchema = z32.object({
|
|
6173
|
+
favicon: z32.string().optional().catch(void 0),
|
|
6174
|
+
colorsV3: ColorsViewSchema.optional().catch(void 0),
|
|
6175
|
+
typographyV2: TypographyViewSchema.optional().catch(void 0),
|
|
6176
|
+
js: z32.object({ files: z32.array(JsFileViewSchema.optional().catch(void 0)).catch([]) }).optional().catch(void 0),
|
|
6177
|
+
metadata: z32.record(z32.string(), z32.unknown()).optional().catch(void 0)
|
|
6178
|
+
});
|
|
6179
|
+
function isDarkAndLight(colors) {
|
|
6180
|
+
return colors.type === "darkAndLight";
|
|
6181
|
+
}
|
|
6182
|
+
function collectConfigFilePaths(config) {
|
|
6183
|
+
const paths = /* @__PURE__ */ new Set();
|
|
6184
|
+
const view = ConfigViewSchema.parse(config);
|
|
6185
|
+
if (view.favicon != null) {
|
|
6186
|
+
paths.add(view.favicon);
|
|
6187
|
+
}
|
|
6188
|
+
if (view.colorsV3 != null) {
|
|
6189
|
+
const themes = isDarkAndLight(view.colorsV3) ? [view.colorsV3.dark, view.colorsV3.light] : [view.colorsV3.theme];
|
|
6190
|
+
for (const theme of themes) {
|
|
6191
|
+
if (theme == null) {
|
|
6192
|
+
continue;
|
|
6193
|
+
}
|
|
6194
|
+
if (theme.logo != null) {
|
|
6195
|
+
paths.add(theme.logo);
|
|
6196
|
+
}
|
|
6197
|
+
if (theme.backgroundImage != null) {
|
|
6198
|
+
paths.add(theme.backgroundImage);
|
|
6199
|
+
}
|
|
6200
|
+
}
|
|
6201
|
+
}
|
|
6202
|
+
if (view.typographyV2 != null) {
|
|
6203
|
+
for (const font of [view.typographyV2.headingsFont, view.typographyV2.bodyFont, view.typographyV2.codeFont]) {
|
|
6204
|
+
for (const variant of font?.variants ?? []) {
|
|
6205
|
+
if (variant.fontFile != null) {
|
|
6206
|
+
paths.add(variant.fontFile);
|
|
6207
|
+
}
|
|
6208
|
+
}
|
|
6209
|
+
}
|
|
6210
|
+
}
|
|
6211
|
+
for (const file of view.js?.files ?? []) {
|
|
6212
|
+
if (file != null) {
|
|
6213
|
+
paths.add(file);
|
|
6214
|
+
}
|
|
6215
|
+
}
|
|
6216
|
+
if (view.metadata != null) {
|
|
6217
|
+
for (const key of PATH_OR_URL_METADATA_KEYS) {
|
|
6218
|
+
const parsed = MetadataFileRefViewSchema.optional().catch(void 0).parse(view.metadata[key]);
|
|
6219
|
+
if (parsed != null) {
|
|
6220
|
+
paths.add(parsed.value);
|
|
6221
|
+
}
|
|
6222
|
+
}
|
|
6223
|
+
}
|
|
6224
|
+
return [...paths];
|
|
6225
|
+
}
|
|
6226
|
+
|
|
6227
|
+
// src/orpc-client/docs-ledger/ledger-manifest.ts
|
|
6228
|
+
var z33 = __toESM(require("zod"), 1);
|
|
6229
|
+
var LEDGER_MANIFEST_SCHEMA_VERSION = "docsledger/20260601";
|
|
6230
|
+
var LEDGER_SHARD_SCHEMA_VERSION = "docsledger/shard/20260601";
|
|
6231
|
+
var ManifestBlobRefSchema = z33.object({
|
|
6232
|
+
hash: z33.string(),
|
|
6233
|
+
contentType: z33.string()
|
|
6234
|
+
});
|
|
6235
|
+
var ManifestSegmentSchema = z33.object({
|
|
6236
|
+
/** Synthetic stable id (= segmentHash). */
|
|
6237
|
+
segmentId: z33.string(),
|
|
6238
|
+
segmentHash: z33.string(),
|
|
6239
|
+
section: z33.string(),
|
|
6240
|
+
locale: z33.string(),
|
|
6241
|
+
/** Sidebar order across segments (docs_ledger_deployment_segments.sort_order). */
|
|
6242
|
+
sortOrder: z33.number(),
|
|
6243
|
+
hidden: z33.boolean(),
|
|
6244
|
+
/** Segment type descriptor: { type, title, icon, apiDefinitionId, overviewPageId, pointsTo, ... }. */
|
|
6245
|
+
metadata: LedgerSegmentMetadataSchema,
|
|
6246
|
+
product: SegmentDetailSchema.nullable(),
|
|
6247
|
+
version: SegmentDetailSchema.nullable(),
|
|
6248
|
+
variant: SegmentDetailSchema.nullable(),
|
|
6249
|
+
tab: SegmentDetailSchema.nullable()
|
|
6250
|
+
});
|
|
6251
|
+
var ManifestNavRouteSchema = LedgerNavRouteSchema;
|
|
6252
|
+
var ManifestRouteBaseSchema = z33.object({
|
|
6253
|
+
segmentHash: z33.string(),
|
|
6254
|
+
/** Key into the containing route index's sidebars map. */
|
|
6255
|
+
sidebarKey: z33.string().nullable(),
|
|
6256
|
+
section: z33.string(),
|
|
6257
|
+
locale: z33.string(),
|
|
6258
|
+
artifactId: z33.string(),
|
|
6259
|
+
pageId: z33.string().optional(),
|
|
6260
|
+
/** CAS hash of the page content blob, or null for link/redirect artifacts. */
|
|
6261
|
+
contentHash: z33.string().nullable(),
|
|
6262
|
+
contentType: z33.string().nullable(),
|
|
6263
|
+
/** ISO-8601 timestamp of when this artifact's content version was first created.
|
|
6264
|
+
* Populated at publish time from `docs_ledger_artifacts.created_at`. Optional
|
|
6265
|
+
* for backward compatibility with manifests built before this field existed. */
|
|
6266
|
+
createdAt: z33.string().optional()
|
|
6267
|
+
});
|
|
6268
|
+
var ManifestRouteSchema = z33.discriminatedUnion("artifactType", [
|
|
6269
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "markdown"),
|
|
6270
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "page"),
|
|
6271
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "rest"),
|
|
6272
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "asyncapi"),
|
|
6273
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "webhook"),
|
|
6274
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "grpc"),
|
|
6275
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "graphql"),
|
|
6276
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "changelog"),
|
|
6277
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "link"),
|
|
6278
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "file"),
|
|
6279
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "image"),
|
|
6280
|
+
artifactTypeVariant(ManifestRouteBaseSchema, "redirect")
|
|
6281
|
+
]);
|
|
6282
|
+
var ManifestPageSchema = z33.object({
|
|
6283
|
+
fullPath: z33.string().nullable(),
|
|
6284
|
+
segmentHash: z33.string(),
|
|
6285
|
+
contentHash: z33.string(),
|
|
6286
|
+
contentType: z33.string()
|
|
6287
|
+
});
|
|
6288
|
+
var ManifestApiDefSchema = z33.object({
|
|
6289
|
+
/** CAS hash of the full API definition blob. */
|
|
6290
|
+
hash: z33.string(),
|
|
6291
|
+
contentType: z33.string(),
|
|
6292
|
+
/** key = `${nodeType}:${nodeId}` (e.g. `endpoint:abc`) → pruned CAS blob. */
|
|
6293
|
+
prunedHashes: z33.record(z33.string(), ManifestBlobRefSchema)
|
|
6294
|
+
});
|
|
6295
|
+
var ManifestFileSchema = z33.object({
|
|
6296
|
+
type: z33.enum(["file", "image"]),
|
|
6297
|
+
contentType: z33.string(),
|
|
6298
|
+
filename: z33.string(),
|
|
6299
|
+
hash: z33.string(),
|
|
6300
|
+
/** Canonical fern domain the bytes were uploaded under (ADR 0010 file anchor). */
|
|
6301
|
+
domain: z33.string(),
|
|
6302
|
+
bucket: z33.enum(["public_docs", "private_docs"]),
|
|
6303
|
+
width: z33.number().optional(),
|
|
6304
|
+
height: z33.number().optional(),
|
|
6305
|
+
blurDataURL: z33.string().optional()
|
|
6306
|
+
});
|
|
6307
|
+
var LedgerShardFileSchema = z33.object({
|
|
6308
|
+
/** SHA-256 hex of the file bytes (docs-bucket key component). */
|
|
6309
|
+
hash: z33.string(),
|
|
6310
|
+
/** Fern-host-relative path; equals the `file:<fullPath>` token's suffix. */
|
|
6311
|
+
fullPath: z33.string(),
|
|
6312
|
+
contentType: z33.string(),
|
|
6313
|
+
width: z33.number().optional(),
|
|
6314
|
+
height: z33.number().optional(),
|
|
6315
|
+
blurDataURL: z33.string().optional(),
|
|
6316
|
+
/**
|
|
6317
|
+
* Per-file bucket override. Absent ⇒ derive from the pointer's `isPrivate`
|
|
6318
|
+
* (`private_docs` when private, else `public_docs`). Present only for the
|
|
6319
|
+
* rare file whose bucket diverges from the deployment default.
|
|
6320
|
+
*/
|
|
6321
|
+
bucket: z33.enum(["public_docs", "private_docs"]).optional()
|
|
6322
|
+
});
|
|
6323
|
+
var LedgerConfigBlobSchema = z33.object({
|
|
6324
|
+
version: z33.string().nullable(),
|
|
6325
|
+
git: z33.object({
|
|
6326
|
+
repoUrl: z33.string(),
|
|
6327
|
+
branch: z33.string(),
|
|
6328
|
+
commitSha: z33.string().nullable().optional()
|
|
6329
|
+
}).optional(),
|
|
6330
|
+
/** Structural config with hot-path chrome text inlined for ADR 0016 page reads. */
|
|
6331
|
+
config: LedgerConfigSchema.nullable(),
|
|
6332
|
+
/** Large or legacy extracted config blobs. New manifests inline header/footer/css.inline/js.inline. */
|
|
6333
|
+
configRefs: z33.object({
|
|
6334
|
+
header: ManifestBlobRefSchema.optional(),
|
|
6335
|
+
footer: ManifestBlobRefSchema.optional(),
|
|
6336
|
+
cssInline: ManifestBlobRefSchema.optional(),
|
|
6337
|
+
jsInline: ManifestBlobRefSchema.optional(),
|
|
6338
|
+
jsFiles: ManifestBlobRefSchema.optional()
|
|
6339
|
+
})
|
|
6340
|
+
});
|
|
6341
|
+
var LedgerChromeBlobSchema = z33.object({
|
|
6342
|
+
apiNameToId: z33.record(z33.string(), z33.string())
|
|
6343
|
+
});
|
|
6344
|
+
var LedgerSidebarBundleSchema = z33.object({
|
|
6345
|
+
locale: z33.string(),
|
|
6346
|
+
segmentHash: z33.string(),
|
|
6347
|
+
routes: z33.array(ManifestNavRouteSchema)
|
|
6348
|
+
});
|
|
6349
|
+
var LedgerSidebarMapEntrySchema = z33.discriminatedUnion("strategy", [
|
|
6350
|
+
LedgerSidebarBundleSchema.extend({
|
|
6351
|
+
strategy: z33.literal("inline")
|
|
6352
|
+
}),
|
|
6353
|
+
ManifestBlobRefSchema.extend({
|
|
6354
|
+
strategy: z33.literal("ref")
|
|
6355
|
+
})
|
|
6356
|
+
]);
|
|
6357
|
+
var LedgerLocaleIndexSchema = z33.object({
|
|
6358
|
+
locale: z33.string(),
|
|
6359
|
+
segments: z33.array(ManifestSegmentSchema),
|
|
6360
|
+
/** sidebarKey → inline sidebar routes, or a CAS ref when over budget. */
|
|
6361
|
+
sidebars: z33.record(z33.string(), LedgerSidebarMapEntrySchema),
|
|
6362
|
+
/** fullPath → route for this effective locale. */
|
|
6363
|
+
routes: z33.record(z33.string(), ManifestRouteSchema),
|
|
6364
|
+
/** pageId → page content reference for this effective locale. */
|
|
6365
|
+
pages: z33.record(z33.string(), ManifestPageSchema),
|
|
6366
|
+
/** apiDefinitionId → full + pruned API definition blobs. */
|
|
6367
|
+
apiDefs: z33.record(z33.string(), ManifestApiDefSchema),
|
|
6368
|
+
/** fullPath → file/image artifact metadata. */
|
|
6369
|
+
files: z33.record(z33.string(), ManifestFileSchema)
|
|
6370
|
+
});
|
|
6371
|
+
var LedgerRouteShardSchema = z33.object({
|
|
6372
|
+
schema: z33.literal(LEDGER_SHARD_SCHEMA_VERSION),
|
|
6373
|
+
locale: z33.string(),
|
|
6374
|
+
/** fullPath → route for the scopes packed into this shard. */
|
|
6375
|
+
routes: z33.record(z33.string(), ManifestRouteSchema),
|
|
6376
|
+
/** segmentHash → inline sidebar (or CAS ref) for every segment in this shard's scopes. */
|
|
6377
|
+
sidebars: z33.record(z33.string(), LedgerSidebarMapEntrySchema),
|
|
6378
|
+
/**
|
|
6379
|
+
* fileFullPath → lean file identity for every file/image referenced by a
|
|
6380
|
+
* page routed into this shard (ADR 0016, "File metadata on the render
|
|
6381
|
+
* path"). The union of identities for this shard's routes'
|
|
6382
|
+
* `referencedFiles`. Optional — absent on shards built before this field
|
|
6383
|
+
* existed or with no embedded files; the bundle then falls back to the
|
|
6384
|
+
* pointer's `files` map (`fileMetadata`/`fileArtifact`).
|
|
6385
|
+
*/
|
|
6386
|
+
files: z33.record(z33.string(), LedgerShardFileSchema).optional()
|
|
6387
|
+
});
|
|
6388
|
+
var LedgerPagesBlobSchema = z33.record(z33.string(), ManifestPageSchema);
|
|
6389
|
+
var LedgerPointerSegmentSchema = ManifestSegmentSchema.omit({ product: true, version: true }).extend({
|
|
6390
|
+
/** Index into the locale's `productCatalog`, or null when the segment has no product. */
|
|
6391
|
+
productIdx: z33.number().nullable(),
|
|
6392
|
+
/** Index into the locale's `versionCatalog`, or null when the segment has no version. */
|
|
6393
|
+
versionIdx: z33.number().nullable()
|
|
6394
|
+
});
|
|
6395
|
+
var LedgerLocaleRoutingSchema = z33.object({
|
|
6396
|
+
/** Compact segments catalog for the switcher chrome (product/version by index). */
|
|
6397
|
+
segments: z33.array(LedgerPointerSegmentSchema),
|
|
6398
|
+
/** Deduplicated product details; `LedgerPointerSegment.productIdx` indexes into this. */
|
|
6399
|
+
productCatalog: z33.array(SegmentDetailSchema),
|
|
6400
|
+
/** Deduplicated version details; `LedgerPointerSegment.versionIdx` indexes into this. */
|
|
6401
|
+
versionCatalog: z33.array(SegmentDetailSchema),
|
|
6402
|
+
/** fullPath → index into `shards`. */
|
|
6403
|
+
routing: z33.record(z33.string(), z33.number()),
|
|
6404
|
+
/** segmentHash → index into `shards`. */
|
|
6405
|
+
segmentShard: z33.record(z33.string(), z33.number()),
|
|
6406
|
+
/** Ordered list of route shards; index matches `routing`/`segmentShard`. */
|
|
6407
|
+
shards: z33.array(z33.object({ hash: z33.string() })),
|
|
6408
|
+
/** versionId → first routable fullPath (version switcher). */
|
|
6409
|
+
versionFirstRoute: z33.record(z33.string(), z33.string()),
|
|
6410
|
+
/** CAS hash of the per-locale pages blob. */
|
|
6411
|
+
pagesHash: z33.string(),
|
|
6412
|
+
/**
|
|
6413
|
+
* fullPath → file/image artifact metadata for files NOT materialised into
|
|
6414
|
+
* a route shard (ADR 0016, "File metadata on the render path"): config
|
|
6415
|
+
* files (logo/fonts/OG), well-known files (favicon/robots/context7),
|
|
6416
|
+
* API-description-embedded images, and any other non-page-referenced file.
|
|
6417
|
+
* Page-body images are pruned from here and live in their route shard's
|
|
6418
|
+
* `files` map instead. Read via `fileMetadata` / `fileArtifact`.
|
|
6419
|
+
*/
|
|
6420
|
+
files: z33.record(z33.string(), ManifestFileSchema),
|
|
6421
|
+
/** apiDefinitionId → full + pruned API definition blobs. */
|
|
6422
|
+
apiDefs: z33.record(z33.string(), ManifestApiDefSchema)
|
|
6423
|
+
});
|
|
6424
|
+
var LedgerManifestSchema = z33.object({
|
|
6425
|
+
schema: z33.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
|
|
6426
|
+
// ── Pointer / current-version fields ──────────────────────────────
|
|
6427
|
+
orgId: z33.string(),
|
|
6428
|
+
domain: z33.string(),
|
|
6429
|
+
basepath: z33.string(),
|
|
6430
|
+
deploymentId: z33.string(),
|
|
6431
|
+
deploymentHash: z33.string(),
|
|
6432
|
+
siteId: z33.string(),
|
|
6433
|
+
/** ISO-8601 timestamp the publish became live (request time). */
|
|
6434
|
+
assignedAt: z33.string(),
|
|
6435
|
+
assignedBy: z33.string().nullable(),
|
|
6436
|
+
isPreview: z33.boolean(),
|
|
6437
|
+
isPrivate: z33.boolean(),
|
|
6438
|
+
/** Default locale for the deployment — read-path fallback when a translation is absent. */
|
|
6439
|
+
defaultLocale: z33.string(),
|
|
6440
|
+
/**
|
|
6441
|
+
* Canonical fern domain all file bytes are anchored under (ADR 0010). The
|
|
6442
|
+
* read client builds the public `/_files/{fileAnchorDomain}/{hash}/{fullPath}`
|
|
6443
|
+
* URL (or presigns the private bucket) for the lean {@link LedgerShardFile}
|
|
6444
|
+
* entries, which omit `domain`. Optional for back-compat with pointers
|
|
6445
|
+
* written before shard-side files; absent ⇒ the client falls back to the
|
|
6446
|
+
* pointer `files` map (which still carries per-file `domain`).
|
|
6447
|
+
*/
|
|
6448
|
+
fileAnchorDomain: z33.string().optional(),
|
|
6449
|
+
config: LedgerConfigBlobSchema,
|
|
6450
|
+
chrome: LedgerChromeBlobSchema,
|
|
6451
|
+
locales: z33.record(z33.string(), LedgerLocaleRoutingSchema)
|
|
6452
|
+
});
|
|
6453
|
+
|
|
6454
|
+
// src/orpc-client/docs-ledger/stable-stringify.ts
|
|
6455
|
+
function stableStringify(value) {
|
|
6456
|
+
return JSON.stringify(value, (_key, val) => {
|
|
6457
|
+
if (val != null && typeof val === "object" && !Array.isArray(val)) {
|
|
6458
|
+
return Object.fromEntries(Object.entries(val).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));
|
|
6459
|
+
}
|
|
6460
|
+
return val;
|
|
6461
|
+
});
|
|
6462
|
+
}
|
|
6463
|
+
|
|
6464
|
+
// src/orpc-client/files/contract.ts
|
|
6465
|
+
var import_contract44 = require("@orpc/contract");
|
|
6466
|
+
var z34 = __toESM(require("zod"), 1);
|
|
6467
|
+
var PutContentInputSchema = z34.object({
|
|
6468
|
+
contentType: z34.string(),
|
|
6469
|
+
contentLength: z34.number().int().positive()
|
|
6470
|
+
});
|
|
6471
|
+
var PutContentResponseSchema = z34.discriminatedUnion("status", [
|
|
5843
6472
|
/** Content already exists in storage — client can skip the S3 upload. */
|
|
5844
|
-
|
|
6473
|
+
z34.object({ status: z34.literal("exists") }),
|
|
5845
6474
|
/** Content is new — client should PUT the file bytes to uploadUrl, then call PUT /files. */
|
|
5846
|
-
|
|
6475
|
+
z34.object({ status: z34.literal("upload_required"), uploadUrl: z34.string() })
|
|
5847
6476
|
]);
|
|
5848
|
-
var PutFileInputSchema =
|
|
5849
|
-
hash:
|
|
5850
|
-
contentType:
|
|
6477
|
+
var PutFileInputSchema = z34.object({
|
|
6478
|
+
hash: z34.string(),
|
|
6479
|
+
contentType: z34.string()
|
|
5851
6480
|
});
|
|
5852
|
-
var FileResponseSchema =
|
|
6481
|
+
var FileResponseSchema = z34.object({
|
|
5853
6482
|
/** SHA-256 hex digest of the file content (64 characters). */
|
|
5854
|
-
hash:
|
|
6483
|
+
hash: z34.string(),
|
|
5855
6484
|
/** Presigned S3 GET URL. TTL is configurable (default 3600 seconds). */
|
|
5856
|
-
downloadUrl:
|
|
6485
|
+
downloadUrl: z34.string()
|
|
5857
6486
|
});
|
|
5858
6487
|
var contentContract = {
|
|
5859
6488
|
/**
|
|
5860
6489
|
* Check whether content exists or obtain a presigned S3 upload URL.
|
|
5861
6490
|
* Requires org membership or super-user.
|
|
5862
6491
|
*/
|
|
5863
|
-
putContent:
|
|
6492
|
+
putContent: import_contract44.oc.route({ method: "PUT", path: "/" }).input(PutContentInputSchema).output(PutContentResponseSchema)
|
|
5864
6493
|
};
|
|
5865
6494
|
var filesContract = {
|
|
5866
6495
|
/**
|
|
5867
6496
|
* Bind a content hash to an org-scoped file path, confirming the S3 upload.
|
|
5868
6497
|
* Requires org admin or super-user.
|
|
5869
6498
|
*/
|
|
5870
|
-
putFile:
|
|
6499
|
+
putFile: import_contract44.oc.route({ method: "PUT", path: "/" }).input(PutFileInputSchema).output(FileResponseSchema),
|
|
5871
6500
|
/**
|
|
5872
6501
|
* Get a presigned download URL for an org file.
|
|
5873
6502
|
* Requires org membership or super-user.
|
|
5874
6503
|
*/
|
|
5875
|
-
getFile:
|
|
6504
|
+
getFile: import_contract44.oc.route({ method: "GET", path: "/" }).output(FileResponseSchema)
|
|
5876
6505
|
};
|
|
5877
6506
|
|
|
5878
6507
|
// src/orpc-client/themes/contract.ts
|
|
5879
|
-
var
|
|
6508
|
+
var z35 = __toESM(require("zod"), 1);
|
|
5880
6509
|
var FERN_FILE_REF_KEY = "hash";
|
|
5881
6510
|
var SHA256_RE = /^[0-9a-f]{64}$/;
|
|
5882
6511
|
function isFernFileRef(value) {
|
|
@@ -5891,26 +6520,26 @@ function isFernFileRef(value) {
|
|
|
5891
6520
|
return typeof hash === "string" && SHA256_RE.test(hash);
|
|
5892
6521
|
}
|
|
5893
6522
|
var THEME_NAME_RE = /^[a-zA-Z0-9_-]{1,64}$/;
|
|
5894
|
-
var ThemeResponseSchema =
|
|
5895
|
-
id:
|
|
5896
|
-
orgId:
|
|
5897
|
-
name:
|
|
5898
|
-
config:
|
|
5899
|
-
updatedAt:
|
|
6523
|
+
var ThemeResponseSchema = z35.object({
|
|
6524
|
+
id: z35.string(),
|
|
6525
|
+
orgId: z35.string(),
|
|
6526
|
+
name: z35.string(),
|
|
6527
|
+
config: z35.unknown(),
|
|
6528
|
+
updatedAt: z35.string()
|
|
5900
6529
|
// ISO 8601 timestamp
|
|
5901
6530
|
});
|
|
5902
|
-
var ThemeListItemSchema =
|
|
5903
|
-
id:
|
|
5904
|
-
orgId:
|
|
5905
|
-
name:
|
|
5906
|
-
updatedAt:
|
|
6531
|
+
var ThemeListItemSchema = z35.object({
|
|
6532
|
+
id: z35.string(),
|
|
6533
|
+
orgId: z35.string(),
|
|
6534
|
+
name: z35.string(),
|
|
6535
|
+
updatedAt: z35.string()
|
|
5907
6536
|
});
|
|
5908
|
-
var ThemeListResponseSchema =
|
|
5909
|
-
themes:
|
|
6537
|
+
var ThemeListResponseSchema = z35.object({
|
|
6538
|
+
themes: z35.array(ThemeListItemSchema)
|
|
5910
6539
|
});
|
|
5911
|
-
var UpsertThemeBodySchema =
|
|
5912
|
-
name:
|
|
5913
|
-
config:
|
|
6540
|
+
var UpsertThemeBodySchema = z35.object({
|
|
6541
|
+
name: z35.string().min(1).max(64).regex(THEME_NAME_RE, "Theme name may only contain letters, digits, hyphens, and underscores"),
|
|
6542
|
+
config: z35.unknown()
|
|
5914
6543
|
});
|
|
5915
6544
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5916
6545
|
0 && (module.exports = {
|
|
@@ -6141,6 +6770,9 @@ var UpsertThemeBodySchema = z33.object({
|
|
|
6141
6770
|
JavaCoordinateSchema,
|
|
6142
6771
|
JqStringSchema,
|
|
6143
6772
|
JsonBodyShapeSchema,
|
|
6773
|
+
LEDGER_ARTIFACT_METADATA_SCHEMAS,
|
|
6774
|
+
LEDGER_MANIFEST_SCHEMA_VERSION,
|
|
6775
|
+
LEDGER_SHARD_SCHEMA_VERSION,
|
|
6144
6776
|
LanguageEnumSchema,
|
|
6145
6777
|
LatestApiDefinitionSchema,
|
|
6146
6778
|
LatestAuthSchemeSchema,
|
|
@@ -6198,9 +6830,35 @@ var UpsertThemeBodySchema = z33.object({
|
|
|
6198
6830
|
LatestWebhookDefinitionSchema,
|
|
6199
6831
|
LatestWebhookPayloadSchema,
|
|
6200
6832
|
LatestWebhookPayloadShapeSchema,
|
|
6833
|
+
LedgerArtifactMetadataSchema,
|
|
6834
|
+
LedgerArtifactTypeSchema,
|
|
6835
|
+
LedgerChangelogEntryMetadataSchema,
|
|
6836
|
+
LedgerChromeBlobSchema,
|
|
6837
|
+
LedgerConfigBlobSchema,
|
|
6201
6838
|
LedgerConfigSchema,
|
|
6839
|
+
LedgerFileArtifactMetadataSchema,
|
|
6840
|
+
LedgerGraphQlMetadataSchema,
|
|
6841
|
+
LedgerGrpcMetadataSchema,
|
|
6842
|
+
LedgerLinkMetadataSchema,
|
|
6843
|
+
LedgerLocaleIndexSchema,
|
|
6844
|
+
LedgerLocaleRoutingSchema,
|
|
6845
|
+
LedgerManifestSchema,
|
|
6846
|
+
LedgerMarkdownMetadataSchema,
|
|
6847
|
+
LedgerNavRouteSchema,
|
|
6848
|
+
LedgerPagesBlobSchema,
|
|
6849
|
+
LedgerPointerSegmentSchema,
|
|
6202
6850
|
LedgerPreviewRegisterInputSchema,
|
|
6203
6851
|
LedgerPreviewRegisterResponseSchema,
|
|
6852
|
+
LedgerRedirectMetadataSchema,
|
|
6853
|
+
LedgerRestMetadataSchema,
|
|
6854
|
+
LedgerRouteShardSchema,
|
|
6855
|
+
LedgerSegmentDetailMetadataSchema,
|
|
6856
|
+
LedgerSegmentMetadataSchema,
|
|
6857
|
+
LedgerShardFileSchema,
|
|
6858
|
+
LedgerSidebarBundleSchema,
|
|
6859
|
+
LedgerSidebarMapEntrySchema,
|
|
6860
|
+
LedgerWebSocketMetadataSchema,
|
|
6861
|
+
LedgerWebhookMetadataSchema,
|
|
6204
6862
|
LibraryDocsBaseConfigSchema,
|
|
6205
6863
|
LibraryDocsGenerationStatusSchema,
|
|
6206
6864
|
LibraryDocsResultSchema,
|
|
@@ -6222,6 +6880,13 @@ var UpsertThemeBodySchema = z33.object({
|
|
|
6222
6880
|
LoadDocsForUrlResponseSchema,
|
|
6223
6881
|
LocaleEntrySchema,
|
|
6224
6882
|
LongTypeSchema,
|
|
6883
|
+
ManifestApiDefSchema,
|
|
6884
|
+
ManifestBlobRefSchema,
|
|
6885
|
+
ManifestFileSchema,
|
|
6886
|
+
ManifestNavRouteSchema,
|
|
6887
|
+
ManifestPageSchema,
|
|
6888
|
+
ManifestRouteSchema,
|
|
6889
|
+
ManifestSegmentSchema,
|
|
6225
6890
|
MarkdownEntrySchema,
|
|
6226
6891
|
MissingContentSchema,
|
|
6227
6892
|
MultipleAuthTypeSchema,
|
|
@@ -6238,6 +6903,7 @@ var UpsertThemeBodySchema = z33.object({
|
|
|
6238
6903
|
OpenRpcProtocolSchema,
|
|
6239
6904
|
OrgId,
|
|
6240
6905
|
OrgIdSchema,
|
|
6906
|
+
PATH_OR_URL_METADATA_KEYS,
|
|
6241
6907
|
PageBlobRefSchema,
|
|
6242
6908
|
PageContentInputSchema,
|
|
6243
6909
|
PageContentResponseSchema,
|
|
@@ -6433,6 +7099,8 @@ var UpsertThemeBodySchema = z33.object({
|
|
|
6433
7099
|
WithDescriptionSchema,
|
|
6434
7100
|
WithNamespaceSchema,
|
|
6435
7101
|
YankSchema,
|
|
7102
|
+
artifactTypeVariant,
|
|
7103
|
+
collectConfigFilePaths,
|
|
6436
7104
|
contentContract,
|
|
6437
7105
|
createApiClient,
|
|
6438
7106
|
createDashboardClient,
|
|
@@ -6440,7 +7108,6 @@ var UpsertThemeBodySchema = z33.object({
|
|
|
6440
7108
|
createDocsClient,
|
|
6441
7109
|
createDocsDeploymentClient,
|
|
6442
7110
|
createDocsLedgerClient,
|
|
6443
|
-
createDocsLedgerReadClient,
|
|
6444
7111
|
createDocsV1ReadClient,
|
|
6445
7112
|
createDocsV1WriteClient,
|
|
6446
7113
|
createDocsV2ReadClient,
|
|
@@ -6484,6 +7151,7 @@ var UpsertThemeBodySchema = z33.object({
|
|
|
6484
7151
|
slugsContract,
|
|
6485
7152
|
snippetsContract,
|
|
6486
7153
|
snippetsFactoryContract,
|
|
7154
|
+
stableStringify,
|
|
6487
7155
|
templatesContract,
|
|
6488
7156
|
tokensContract
|
|
6489
7157
|
});
|