@fern-api/fdr-sdk 1.2.114-2dfb9e1373 → 1.2.114-7409d6cc42
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 +391 -240
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +391 -240
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/index.js +659 -508
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +659 -508
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/orpc-client.js +642 -463
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +626 -461
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/types/client/FdrClient.d.ts +5 -5
- package/dist/types/orpc-client/client.d.ts +2 -0
- package/dist/types/orpc-client/client.d.ts.map +1 -1
- package/dist/types/orpc-client/index.d.ts +1 -0
- package/dist/types/orpc-client/index.d.ts.map +1 -1
- package/dist/types/orpc-client/mcp-hosting/client.d.ts +12 -0
- package/dist/types/orpc-client/mcp-hosting/client.d.ts.map +1 -0
- package/dist/types/orpc-client/mcp-hosting/contract.d.ts +2236 -0
- package/dist/types/orpc-client/mcp-hosting/contract.d.ts.map +1 -0
- package/dist/types/orpc-client/mcp-hosting/index.d.ts +3 -0
- package/dist/types/orpc-client/mcp-hosting/index.d.ts.map +1 -0
- package/dist/types/orpc-client/pdf-export/contract.d.ts +20 -20
- package/package.json +1 -1
package/dist/js/orpc-client.mjs
CHANGED
|
@@ -5577,103 +5577,253 @@ function createGitClient(options) {
|
|
|
5577
5577
|
return createORPCClient16(link);
|
|
5578
5578
|
}
|
|
5579
5579
|
|
|
5580
|
-
// src/orpc-client/
|
|
5580
|
+
// src/orpc-client/mcp-hosting/client.ts
|
|
5581
5581
|
import { createORPCClient as createORPCClient17 } from "@orpc/client";
|
|
5582
5582
|
import { OpenAPILink as OpenAPILink17 } from "@orpc/openapi-client/fetch";
|
|
5583
5583
|
|
|
5584
|
-
// src/orpc-client/
|
|
5584
|
+
// src/orpc-client/mcp-hosting/contract.ts
|
|
5585
5585
|
import { oc as oc15 } from "@orpc/contract";
|
|
5586
5586
|
import * as z26 from "zod";
|
|
5587
|
-
var
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
footerRightTemplate: z26.string().nullish(),
|
|
5598
|
-
scope: PdfExportScopeSchema.nullish(),
|
|
5599
|
-
hideCover: z26.boolean().nullish(),
|
|
5600
|
-
hideToc: z26.boolean().nullish()
|
|
5601
|
-
});
|
|
5602
|
-
var PdfExportOptionsSchema = z26.discriminatedUnion("version", [
|
|
5603
|
-
z26.object({ version: z26.literal("v1") }).merge(PdfExportOptionsV1Schema)
|
|
5587
|
+
var McpPathSegmentSchema = z26.string().min(1).max(30).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
5588
|
+
var McpDeploymentStatusSchema = z26.enum(["PUBLISHING", "SUCCEEDED", "FAILED"]);
|
|
5589
|
+
var McpAuthSchemeSchema = z26.discriminatedUnion("type", [
|
|
5590
|
+
z26.object({ type: z26.literal("bearer") }),
|
|
5591
|
+
z26.object({
|
|
5592
|
+
type: z26.literal("apiKey"),
|
|
5593
|
+
paramName: z26.string().min(1),
|
|
5594
|
+
in: z26.enum(["header", "query", "cookie"])
|
|
5595
|
+
}),
|
|
5596
|
+
z26.object({ type: z26.literal("basic") })
|
|
5604
5597
|
]);
|
|
5605
|
-
var
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5598
|
+
var McpMetadataSchema = z26.object({
|
|
5599
|
+
name: z26.string().min(1),
|
|
5600
|
+
toolsets: z26.record(z26.string(), z26.array(z26.string())),
|
|
5601
|
+
toolsetMetadata: z26.array(
|
|
5602
|
+
z26.object({
|
|
5603
|
+
name: z26.string(),
|
|
5604
|
+
title: z26.string(),
|
|
5605
|
+
description: z26.string(),
|
|
5606
|
+
toolCount: z26.number().int().nonnegative()
|
|
5607
|
+
}).strict()
|
|
5608
|
+
),
|
|
5609
|
+
auth: z26.object({
|
|
5610
|
+
schemes: z26.array(McpAuthSchemeSchema),
|
|
5611
|
+
required: z26.boolean()
|
|
5612
|
+
}).strict(),
|
|
5613
|
+
skippedTools: z26.array(z26.object({ name: z26.string(), reason: z26.string() }).strict()),
|
|
5614
|
+
environmentVariables: z26.array(
|
|
5615
|
+
z26.object({
|
|
5616
|
+
name: z26.string(),
|
|
5617
|
+
description: z26.string(),
|
|
5618
|
+
required: z26.boolean()
|
|
5619
|
+
}).strict()
|
|
5620
|
+
),
|
|
5621
|
+
baseUrl: z26.string().url(),
|
|
5622
|
+
followRedirects: z26.boolean(),
|
|
5623
|
+
maxRedirects: z26.number().int().nonnegative(),
|
|
5624
|
+
allowedRedirectHosts: z26.array(z26.string())
|
|
5625
|
+
}).passthrough();
|
|
5626
|
+
var McpModuleSchema = z26.object({
|
|
5627
|
+
name: z26.string().regex(/^[A-Za-z0-9._/-]+$/),
|
|
5628
|
+
hash: z26.string().regex(/^[0-9a-f]{64}$/),
|
|
5629
|
+
contentType: z26.string().min(1)
|
|
5630
|
+
}).strict();
|
|
5631
|
+
var McpGitInputSchema = z26.object({
|
|
5632
|
+
repoUrl: z26.string(),
|
|
5633
|
+
branch: z26.string(),
|
|
5634
|
+
commitSha: z26.string().optional()
|
|
5635
|
+
}).strict();
|
|
5636
|
+
var DeployMcpServerInputSchema = z26.object({
|
|
5637
|
+
orgId: McpPathSegmentSchema,
|
|
5638
|
+
slug: McpPathSegmentSchema,
|
|
5639
|
+
mainModule: z26.string().min(1),
|
|
5640
|
+
compatibilityDate: z26.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
5641
|
+
compatibilityFlags: z26.array(z26.string()),
|
|
5642
|
+
// Bounded so a single deploy request cannot fan out unbounded parallel
|
|
5643
|
+
// CAS lookups and S3 reads. Generated MCP workers are 1-2 modules;
|
|
5644
|
+
// 20 leaves room for wasm/sourcemap/chunk splitting.
|
|
5645
|
+
modules: z26.array(McpModuleSchema).min(1).max(20),
|
|
5646
|
+
metadata: McpMetadataSchema,
|
|
5647
|
+
// Everything else in this schema is bounded; keep the opaque config
|
|
5648
|
+
// blob bounded too so it cannot balloon the JSONB row.
|
|
5649
|
+
config: z26.unknown().optional().refine((value) => value === void 0 || (JSON.stringify(value)?.length ?? 0) <= 65536, {
|
|
5650
|
+
message: "config must be at most 64KB serialized"
|
|
5651
|
+
}),
|
|
5652
|
+
generatorName: z26.string().min(1),
|
|
5653
|
+
generatorVersion: z26.string().min(1),
|
|
5654
|
+
cliVersion: z26.string().optional(),
|
|
5655
|
+
git: McpGitInputSchema.optional()
|
|
5656
|
+
}).strict().superRefine((input, ctx) => {
|
|
5657
|
+
const names = /* @__PURE__ */ new Set();
|
|
5658
|
+
for (const module of input.modules) {
|
|
5659
|
+
if (names.has(module.name)) {
|
|
5660
|
+
ctx.addIssue({
|
|
5661
|
+
code: z26.ZodIssueCode.custom,
|
|
5662
|
+
path: ["modules"],
|
|
5663
|
+
message: `duplicate module name: ${module.name}`
|
|
5664
|
+
});
|
|
5665
|
+
}
|
|
5666
|
+
names.add(module.name);
|
|
5667
|
+
}
|
|
5668
|
+
if (!names.has(input.mainModule)) {
|
|
5669
|
+
ctx.addIssue({
|
|
5670
|
+
code: z26.ZodIssueCode.custom,
|
|
5671
|
+
path: ["mainModule"],
|
|
5672
|
+
message: `mainModule ${input.mainModule} is not among the submitted modules`
|
|
5673
|
+
});
|
|
5674
|
+
}
|
|
5622
5675
|
});
|
|
5623
|
-
var
|
|
5624
|
-
|
|
5676
|
+
var GetMcpServerInputSchema = z26.object({
|
|
5677
|
+
orgId: McpPathSegmentSchema,
|
|
5678
|
+
slug: McpPathSegmentSchema
|
|
5625
5679
|
});
|
|
5626
|
-
var
|
|
5627
|
-
|
|
5628
|
-
fileName: z26.string(),
|
|
5629
|
-
sizeBytes: z26.number()
|
|
5680
|
+
var ListMcpServersInputSchema = z26.object({
|
|
5681
|
+
orgId: z26.string()
|
|
5630
5682
|
});
|
|
5631
|
-
var
|
|
5683
|
+
var ListMcpDeploymentsInputSchema = GetMcpServerInputSchema;
|
|
5684
|
+
var DeleteMcpServerInputSchema = GetMcpServerInputSchema;
|
|
5685
|
+
var McpDeploymentSummarySchema = z26.object({
|
|
5686
|
+
id: z26.string(),
|
|
5687
|
+
status: McpDeploymentStatusSchema,
|
|
5688
|
+
/** True when this deployment is the one the server currently serves. */
|
|
5689
|
+
isActive: z26.boolean(),
|
|
5690
|
+
generatorVersion: z26.string(),
|
|
5691
|
+
createdAt: z26.string(),
|
|
5692
|
+
createdBy: z26.string().nullish(),
|
|
5693
|
+
error: z26.object({ name: z26.string(), message: z26.string() }).nullish()
|
|
5694
|
+
});
|
|
5695
|
+
var McpServerSchema = z26.object({
|
|
5696
|
+
id: z26.string(),
|
|
5632
5697
|
orgId: z26.string(),
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5698
|
+
slug: z26.string(),
|
|
5699
|
+
/** The server is serving iff this is set; it names the serving deployment. */
|
|
5700
|
+
activeDeploymentId: z26.string().nullish(),
|
|
5701
|
+
/** Most recent publication attempt — how the last deploy went. */
|
|
5702
|
+
latestDeployment: McpDeploymentSummarySchema.nullish(),
|
|
5703
|
+
url: z26.string().url(),
|
|
5704
|
+
createdAt: z26.string(),
|
|
5705
|
+
updatedAt: z26.string()
|
|
5706
|
+
});
|
|
5707
|
+
var ListMcpServersResponseSchema = z26.object({ servers: z26.array(McpServerSchema) });
|
|
5708
|
+
var ListMcpDeploymentsResponseSchema = z26.object({ deployments: z26.array(McpDeploymentSummarySchema) });
|
|
5709
|
+
var mcpHostingContract = {
|
|
5710
|
+
deploy: oc15.route({ method: "POST", path: "/deploy" }).input(DeployMcpServerInputSchema).output(McpServerSchema),
|
|
5711
|
+
getServer: oc15.route({ method: "GET", path: "/servers/{slug}" }).input(GetMcpServerInputSchema).output(McpServerSchema),
|
|
5712
|
+
listServers: oc15.route({ method: "GET", path: "/servers" }).input(ListMcpServersInputSchema).output(ListMcpServersResponseSchema),
|
|
5713
|
+
listDeployments: oc15.route({ method: "GET", path: "/servers/{slug}/deployments" }).input(ListMcpDeploymentsInputSchema).output(ListMcpDeploymentsResponseSchema),
|
|
5714
|
+
deleteServer: oc15.route({ method: "DELETE", path: "/servers/{slug}" }).input(DeleteMcpServerInputSchema)
|
|
5715
|
+
};
|
|
5716
|
+
|
|
5717
|
+
// src/orpc-client/mcp-hosting/client.ts
|
|
5718
|
+
function createMcpHostingClient(options) {
|
|
5719
|
+
const link = new OpenAPILink17(mcpHostingContract, {
|
|
5720
|
+
url: `${options.baseUrl}/mcp-hosting`,
|
|
5721
|
+
headers: () => ({
|
|
5722
|
+
Authorization: `Bearer ${options.token}`,
|
|
5723
|
+
...options.headers
|
|
5724
|
+
}),
|
|
5725
|
+
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5726
|
+
});
|
|
5727
|
+
return createORPCClient17(link);
|
|
5728
|
+
}
|
|
5729
|
+
|
|
5730
|
+
// src/orpc-client/pdf-export/client.ts
|
|
5731
|
+
import { createORPCClient as createORPCClient18 } from "@orpc/client";
|
|
5732
|
+
import { OpenAPILink as OpenAPILink18 } from "@orpc/openapi-client/fetch";
|
|
5733
|
+
|
|
5734
|
+
// src/orpc-client/pdf-export/contract.ts
|
|
5735
|
+
import { oc as oc16 } from "@orpc/contract";
|
|
5736
|
+
import * as z27 from "zod";
|
|
5737
|
+
var PdfExportScopeSchema = z27.object({
|
|
5738
|
+
pageSlugs: z27.array(z27.string())
|
|
5739
|
+
});
|
|
5740
|
+
var PdfExportOptionsV1Schema = z27.object({
|
|
5741
|
+
coverTitle: z27.string().nullish(),
|
|
5742
|
+
coverSubtitle: z27.string().nullish(),
|
|
5743
|
+
hideCoverFooter: z27.boolean().nullish(),
|
|
5744
|
+
headerLeftTemplate: z27.string().nullish(),
|
|
5745
|
+
headerRightTemplate: z27.string().nullish(),
|
|
5746
|
+
footerLeftTemplate: z27.string().nullish(),
|
|
5747
|
+
footerRightTemplate: z27.string().nullish(),
|
|
5748
|
+
scope: PdfExportScopeSchema.nullish(),
|
|
5749
|
+
hideCover: z27.boolean().nullish(),
|
|
5750
|
+
hideToc: z27.boolean().nullish()
|
|
5751
|
+
});
|
|
5752
|
+
var PdfExportOptionsSchema = z27.discriminatedUnion("version", [
|
|
5753
|
+
z27.object({ version: z27.literal("v1") }).merge(PdfExportOptionsV1Schema)
|
|
5754
|
+
]);
|
|
5755
|
+
var PdfExportTaskStatusSchema = z27.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED"]);
|
|
5756
|
+
var PdfExportTaskSchema = z27.object({
|
|
5757
|
+
id: z27.string(),
|
|
5758
|
+
orgId: z27.string(),
|
|
5759
|
+
docsUrl: z27.string(),
|
|
5760
|
+
productId: z27.string().nullish(),
|
|
5761
|
+
versionId: z27.string().nullish(),
|
|
5762
|
+
requesterName: z27.string().nullish(),
|
|
5763
|
+
notifyEmails: z27.array(z27.string()).nullish(),
|
|
5764
|
+
status: PdfExportTaskStatusSchema,
|
|
5765
|
+
options: PdfExportOptionsSchema.nullish(),
|
|
5766
|
+
createdAt: z27.string(),
|
|
5767
|
+
startedAt: z27.string().nullish(),
|
|
5768
|
+
completedAt: z27.string().nullish(),
|
|
5769
|
+
fileName: z27.string().nullish(),
|
|
5770
|
+
sizeBytes: z27.number().nullish(),
|
|
5771
|
+
errorMessage: z27.string().nullish()
|
|
5772
|
+
});
|
|
5773
|
+
var ListPdfExportTasksResponseSchema = z27.object({
|
|
5774
|
+
tasks: z27.array(PdfExportTaskSchema)
|
|
5775
|
+
});
|
|
5776
|
+
var PdfExportDownloadResponseSchema = z27.object({
|
|
5777
|
+
downloadUrl: z27.string(),
|
|
5778
|
+
fileName: z27.string(),
|
|
5779
|
+
sizeBytes: z27.number()
|
|
5780
|
+
});
|
|
5781
|
+
var CreatePdfExportTaskInputSchema = z27.object({
|
|
5782
|
+
orgId: z27.string(),
|
|
5783
|
+
docsUrl: z27.string(),
|
|
5784
|
+
productId: z27.string().nullish(),
|
|
5785
|
+
versionId: z27.string().nullish(),
|
|
5786
|
+
requesterName: z27.string().nullish(),
|
|
5637
5787
|
options: PdfExportOptionsSchema.nullish()
|
|
5638
5788
|
});
|
|
5639
|
-
var ListPdfExportTasksInputSchema =
|
|
5640
|
-
orgId:
|
|
5641
|
-
docsUrl:
|
|
5642
|
-
limit:
|
|
5789
|
+
var ListPdfExportTasksInputSchema = z27.object({
|
|
5790
|
+
orgId: z27.string(),
|
|
5791
|
+
docsUrl: z27.string(),
|
|
5792
|
+
limit: z27.coerce.number().nullish()
|
|
5643
5793
|
});
|
|
5644
|
-
var GetPdfExportTaskInputSchema =
|
|
5645
|
-
taskId:
|
|
5794
|
+
var GetPdfExportTaskInputSchema = z27.object({
|
|
5795
|
+
taskId: z27.string()
|
|
5646
5796
|
});
|
|
5647
|
-
var UpdatePdfExportTaskInputSchema =
|
|
5648
|
-
taskId:
|
|
5797
|
+
var UpdatePdfExportTaskInputSchema = z27.object({
|
|
5798
|
+
taskId: z27.string(),
|
|
5649
5799
|
status: PdfExportTaskStatusSchema,
|
|
5650
|
-
startedAt:
|
|
5651
|
-
completedAt:
|
|
5652
|
-
s3Key:
|
|
5653
|
-
fileName:
|
|
5654
|
-
sizeBytes:
|
|
5655
|
-
errorMessage:
|
|
5800
|
+
startedAt: z27.string().nullish(),
|
|
5801
|
+
completedAt: z27.string().nullish(),
|
|
5802
|
+
s3Key: z27.string().nullish(),
|
|
5803
|
+
fileName: z27.string().nullish(),
|
|
5804
|
+
sizeBytes: z27.number().nullish(),
|
|
5805
|
+
errorMessage: z27.string().nullish()
|
|
5656
5806
|
});
|
|
5657
|
-
var GetPdfExportDownloadUrlInputSchema =
|
|
5658
|
-
taskId:
|
|
5807
|
+
var GetPdfExportDownloadUrlInputSchema = z27.object({
|
|
5808
|
+
taskId: z27.string()
|
|
5659
5809
|
});
|
|
5660
|
-
var CleanupPdfExportsResponseSchema =
|
|
5661
|
-
expiredTasksDeleted:
|
|
5662
|
-
s3ObjectsDeleted:
|
|
5663
|
-
timedOutTasksFailed:
|
|
5810
|
+
var CleanupPdfExportsResponseSchema = z27.object({
|
|
5811
|
+
expiredTasksDeleted: z27.number(),
|
|
5812
|
+
s3ObjectsDeleted: z27.number(),
|
|
5813
|
+
timedOutTasksFailed: z27.number()
|
|
5664
5814
|
});
|
|
5665
5815
|
var pdfExportContract = {
|
|
5666
|
-
createTask:
|
|
5667
|
-
listTasks:
|
|
5668
|
-
getTask:
|
|
5669
|
-
updateTask:
|
|
5670
|
-
getDownloadUrl:
|
|
5671
|
-
cleanup:
|
|
5816
|
+
createTask: oc16.route({ method: "POST", path: "/task" }).input(CreatePdfExportTaskInputSchema).output(PdfExportTaskSchema),
|
|
5817
|
+
listTasks: oc16.route({ method: "GET", path: "/tasks" }).input(ListPdfExportTasksInputSchema).output(ListPdfExportTasksResponseSchema),
|
|
5818
|
+
getTask: oc16.route({ method: "GET", path: "/task/{taskId}" }).input(GetPdfExportTaskInputSchema).output(PdfExportTaskSchema),
|
|
5819
|
+
updateTask: oc16.route({ method: "POST", path: "/task/{taskId}" }).input(UpdatePdfExportTaskInputSchema).output(PdfExportTaskSchema),
|
|
5820
|
+
getDownloadUrl: oc16.route({ method: "GET", path: "/task/{taskId}/download-url" }).input(GetPdfExportDownloadUrlInputSchema).output(PdfExportDownloadResponseSchema),
|
|
5821
|
+
cleanup: oc16.route({ method: "POST", path: "/cleanup" }).output(CleanupPdfExportsResponseSchema)
|
|
5672
5822
|
};
|
|
5673
5823
|
|
|
5674
5824
|
// src/orpc-client/pdf-export/client.ts
|
|
5675
5825
|
function createPdfExportClient(options) {
|
|
5676
|
-
const link = new
|
|
5826
|
+
const link = new OpenAPILink18(pdfExportContract, {
|
|
5677
5827
|
url: `${options.baseUrl}/pdf-export`,
|
|
5678
5828
|
headers: () => ({
|
|
5679
5829
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5681,17 +5831,17 @@ function createPdfExportClient(options) {
|
|
|
5681
5831
|
}),
|
|
5682
5832
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5683
5833
|
});
|
|
5684
|
-
return
|
|
5834
|
+
return createORPCClient18(link);
|
|
5685
5835
|
}
|
|
5686
5836
|
|
|
5687
5837
|
// src/orpc-client/sdks/client.ts
|
|
5688
|
-
import { createORPCClient as
|
|
5689
|
-
import { OpenAPILink as
|
|
5838
|
+
import { createORPCClient as createORPCClient19 } from "@orpc/client";
|
|
5839
|
+
import { OpenAPILink as OpenAPILink19 } from "@orpc/openapi-client/fetch";
|
|
5690
5840
|
|
|
5691
5841
|
// src/orpc-client/sdks/contract.ts
|
|
5692
|
-
import { oc as
|
|
5693
|
-
import * as
|
|
5694
|
-
var LanguageEnumSchema =
|
|
5842
|
+
import { oc as oc17 } from "@orpc/contract";
|
|
5843
|
+
import * as z28 from "zod";
|
|
5844
|
+
var LanguageEnumSchema = z28.enum([
|
|
5695
5845
|
"Go",
|
|
5696
5846
|
"TypeScript",
|
|
5697
5847
|
"Java",
|
|
@@ -5702,23 +5852,23 @@ var LanguageEnumSchema = z27.enum([
|
|
|
5702
5852
|
"Swift",
|
|
5703
5853
|
"Rust"
|
|
5704
5854
|
]);
|
|
5705
|
-
var VersionBumpEnumSchema =
|
|
5706
|
-
var ComputeSemanticVersionInputSchema =
|
|
5707
|
-
package:
|
|
5855
|
+
var VersionBumpEnumSchema = z28.enum(["MAJOR", "MINOR", "PATCH"]);
|
|
5856
|
+
var ComputeSemanticVersionInputSchema = z28.object({
|
|
5857
|
+
package: z28.string(),
|
|
5708
5858
|
language: LanguageEnumSchema,
|
|
5709
|
-
githubRepository:
|
|
5859
|
+
githubRepository: z28.string().nullish()
|
|
5710
5860
|
});
|
|
5711
|
-
var ComputeSemanticVersionOutputSchema =
|
|
5712
|
-
version:
|
|
5861
|
+
var ComputeSemanticVersionOutputSchema = z28.object({
|
|
5862
|
+
version: z28.string(),
|
|
5713
5863
|
bump: VersionBumpEnumSchema
|
|
5714
5864
|
});
|
|
5715
5865
|
var sdksContract = {
|
|
5716
|
-
computeSemanticVersion:
|
|
5866
|
+
computeSemanticVersion: oc17.route({ method: "POST", path: "/semantic-version/compute" }).input(ComputeSemanticVersionInputSchema).output(ComputeSemanticVersionOutputSchema)
|
|
5717
5867
|
};
|
|
5718
5868
|
|
|
5719
5869
|
// src/orpc-client/sdks/client.ts
|
|
5720
5870
|
function createSdksClient(options) {
|
|
5721
|
-
const link = new
|
|
5871
|
+
const link = new OpenAPILink19(sdksContract, {
|
|
5722
5872
|
url: `${options.baseUrl}/sdks`,
|
|
5723
5873
|
headers: () => ({
|
|
5724
5874
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5726,50 +5876,50 @@ function createSdksClient(options) {
|
|
|
5726
5876
|
}),
|
|
5727
5877
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5728
5878
|
});
|
|
5729
|
-
return
|
|
5879
|
+
return createORPCClient19(link);
|
|
5730
5880
|
}
|
|
5731
5881
|
|
|
5732
5882
|
// src/orpc-client/slugs/client.ts
|
|
5733
|
-
import { createORPCClient as
|
|
5734
|
-
import { OpenAPILink as
|
|
5883
|
+
import { createORPCClient as createORPCClient20 } from "@orpc/client";
|
|
5884
|
+
import { OpenAPILink as OpenAPILink20 } from "@orpc/openapi-client/fetch";
|
|
5735
5885
|
|
|
5736
5886
|
// src/orpc-client/slugs/contract.ts
|
|
5737
|
-
import { oc as
|
|
5738
|
-
import * as
|
|
5739
|
-
var SlugsInputSchema =
|
|
5740
|
-
domain:
|
|
5741
|
-
basepath:
|
|
5742
|
-
});
|
|
5743
|
-
var SlugEntrySchema =
|
|
5744
|
-
orgId:
|
|
5745
|
-
domain:
|
|
5746
|
-
basepath:
|
|
5747
|
-
slug:
|
|
5748
|
-
lastUpdated:
|
|
5749
|
-
});
|
|
5750
|
-
var MarkdownEntrySchema =
|
|
5751
|
-
orgId:
|
|
5752
|
-
domain:
|
|
5753
|
-
basepath:
|
|
5754
|
-
pageId:
|
|
5755
|
-
slug:
|
|
5756
|
-
hash:
|
|
5757
|
-
lastUpdated:
|
|
5758
|
-
});
|
|
5759
|
-
var GetSlugEntriesResponseSchema =
|
|
5760
|
-
entries:
|
|
5761
|
-
});
|
|
5762
|
-
var GetMarkdownEntriesResponseSchema =
|
|
5763
|
-
entries:
|
|
5887
|
+
import { oc as oc18 } from "@orpc/contract";
|
|
5888
|
+
import * as z29 from "zod";
|
|
5889
|
+
var SlugsInputSchema = z29.object({
|
|
5890
|
+
domain: z29.string(),
|
|
5891
|
+
basepath: z29.string().optional().default("")
|
|
5892
|
+
});
|
|
5893
|
+
var SlugEntrySchema = z29.object({
|
|
5894
|
+
orgId: z29.string(),
|
|
5895
|
+
domain: z29.string(),
|
|
5896
|
+
basepath: z29.string(),
|
|
5897
|
+
slug: z29.string(),
|
|
5898
|
+
lastUpdated: z29.string()
|
|
5899
|
+
});
|
|
5900
|
+
var MarkdownEntrySchema = z29.object({
|
|
5901
|
+
orgId: z29.string(),
|
|
5902
|
+
domain: z29.string(),
|
|
5903
|
+
basepath: z29.string(),
|
|
5904
|
+
pageId: z29.string(),
|
|
5905
|
+
slug: z29.string(),
|
|
5906
|
+
hash: z29.string(),
|
|
5907
|
+
lastUpdated: z29.string()
|
|
5908
|
+
});
|
|
5909
|
+
var GetSlugEntriesResponseSchema = z29.object({
|
|
5910
|
+
entries: z29.array(SlugEntrySchema)
|
|
5911
|
+
});
|
|
5912
|
+
var GetMarkdownEntriesResponseSchema = z29.object({
|
|
5913
|
+
entries: z29.array(MarkdownEntrySchema)
|
|
5764
5914
|
});
|
|
5765
5915
|
var slugsContract = {
|
|
5766
|
-
getSlugEntries:
|
|
5767
|
-
getMarkdownEntries:
|
|
5916
|
+
getSlugEntries: oc18.route({ method: "POST", path: "/slugs" }).input(SlugsInputSchema).output(GetSlugEntriesResponseSchema),
|
|
5917
|
+
getMarkdownEntries: oc18.route({ method: "POST", path: "/markdowns" }).input(SlugsInputSchema).output(GetMarkdownEntriesResponseSchema)
|
|
5768
5918
|
};
|
|
5769
5919
|
|
|
5770
5920
|
// src/orpc-client/slugs/client.ts
|
|
5771
5921
|
function createSlugsClient(options) {
|
|
5772
|
-
const link = new
|
|
5922
|
+
const link = new OpenAPILink20(slugsContract, {
|
|
5773
5923
|
url: `${options.baseUrl.replace(/\/+$/, "")}/slugs`,
|
|
5774
5924
|
headers: () => ({
|
|
5775
5925
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5777,118 +5927,118 @@ function createSlugsClient(options) {
|
|
|
5777
5927
|
}),
|
|
5778
5928
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5779
5929
|
});
|
|
5780
|
-
return
|
|
5930
|
+
return createORPCClient20(link);
|
|
5781
5931
|
}
|
|
5782
5932
|
|
|
5783
5933
|
// src/orpc-client/snippets/client.ts
|
|
5784
|
-
import { createORPCClient as
|
|
5785
|
-
import { OpenAPILink as
|
|
5934
|
+
import { createORPCClient as createORPCClient21 } from "@orpc/client";
|
|
5935
|
+
import { OpenAPILink as OpenAPILink21 } from "@orpc/openapi-client/fetch";
|
|
5786
5936
|
|
|
5787
5937
|
// src/orpc-client/snippets/contract.ts
|
|
5788
|
-
import { oc as
|
|
5789
|
-
import * as
|
|
5790
|
-
var TypeScriptSdkSchema =
|
|
5791
|
-
var PythonSdkSchema =
|
|
5792
|
-
var GoSdkSchema =
|
|
5793
|
-
var RubySdkSchema =
|
|
5794
|
-
var JavaSdkSchema =
|
|
5795
|
-
var CsharpSdkSchema =
|
|
5796
|
-
var BaseSnippetCreateSchema =
|
|
5938
|
+
import { oc as oc19 } from "@orpc/contract";
|
|
5939
|
+
import * as z30 from "zod";
|
|
5940
|
+
var TypeScriptSdkSchema = z30.object({ package: z30.string(), version: z30.string() });
|
|
5941
|
+
var PythonSdkSchema = z30.object({ package: z30.string(), version: z30.string() });
|
|
5942
|
+
var GoSdkSchema = z30.object({ githubRepo: z30.string(), version: z30.string() });
|
|
5943
|
+
var RubySdkSchema = z30.object({ gem: z30.string(), version: z30.string() });
|
|
5944
|
+
var JavaSdkSchema = z30.object({ group: z30.string(), artifact: z30.string(), version: z30.string() });
|
|
5945
|
+
var CsharpSdkSchema = z30.object({ package: z30.string(), version: z30.string() });
|
|
5946
|
+
var BaseSnippetCreateSchema = z30.object({
|
|
5797
5947
|
endpoint: EndpointIdentifierSchema,
|
|
5798
|
-
exampleIdentifier:
|
|
5948
|
+
exampleIdentifier: z30.string().nullish()
|
|
5799
5949
|
});
|
|
5800
|
-
var SdkSnippetsCreateSchema =
|
|
5801
|
-
|
|
5802
|
-
type:
|
|
5950
|
+
var SdkSnippetsCreateSchema = z30.discriminatedUnion("type", [
|
|
5951
|
+
z30.object({
|
|
5952
|
+
type: z30.literal("typescript"),
|
|
5803
5953
|
sdk: TypeScriptSdkSchema,
|
|
5804
|
-
snippets:
|
|
5954
|
+
snippets: z30.array(BaseSnippetCreateSchema.extend({ snippet: z30.object({ client: z30.string() }) }))
|
|
5805
5955
|
}),
|
|
5806
|
-
|
|
5807
|
-
type:
|
|
5956
|
+
z30.object({
|
|
5957
|
+
type: z30.literal("python"),
|
|
5808
5958
|
sdk: PythonSdkSchema,
|
|
5809
|
-
snippets:
|
|
5959
|
+
snippets: z30.array(
|
|
5810
5960
|
BaseSnippetCreateSchema.extend({
|
|
5811
|
-
snippet:
|
|
5961
|
+
snippet: z30.object({ async_client: z30.string(), sync_client: z30.string() })
|
|
5812
5962
|
})
|
|
5813
5963
|
)
|
|
5814
5964
|
}),
|
|
5815
|
-
|
|
5816
|
-
type:
|
|
5965
|
+
z30.object({
|
|
5966
|
+
type: z30.literal("go"),
|
|
5817
5967
|
sdk: GoSdkSchema,
|
|
5818
|
-
snippets:
|
|
5968
|
+
snippets: z30.array(BaseSnippetCreateSchema.extend({ snippet: z30.object({ client: z30.string() }) }))
|
|
5819
5969
|
}),
|
|
5820
|
-
|
|
5821
|
-
type:
|
|
5970
|
+
z30.object({
|
|
5971
|
+
type: z30.literal("java"),
|
|
5822
5972
|
sdk: JavaSdkSchema,
|
|
5823
|
-
snippets:
|
|
5973
|
+
snippets: z30.array(
|
|
5824
5974
|
BaseSnippetCreateSchema.extend({
|
|
5825
|
-
snippet:
|
|
5975
|
+
snippet: z30.object({ async_client: z30.string(), sync_client: z30.string() })
|
|
5826
5976
|
})
|
|
5827
5977
|
)
|
|
5828
5978
|
}),
|
|
5829
|
-
|
|
5830
|
-
type:
|
|
5979
|
+
z30.object({
|
|
5980
|
+
type: z30.literal("ruby"),
|
|
5831
5981
|
sdk: RubySdkSchema,
|
|
5832
|
-
snippets:
|
|
5982
|
+
snippets: z30.array(BaseSnippetCreateSchema.extend({ snippet: z30.object({ client: z30.string() }) }))
|
|
5833
5983
|
}),
|
|
5834
|
-
|
|
5835
|
-
type:
|
|
5984
|
+
z30.object({
|
|
5985
|
+
type: z30.literal("csharp"),
|
|
5836
5986
|
sdk: CsharpSdkSchema,
|
|
5837
|
-
snippets:
|
|
5987
|
+
snippets: z30.array(BaseSnippetCreateSchema.extend({ snippet: z30.object({ client: z30.string() }) }))
|
|
5838
5988
|
})
|
|
5839
5989
|
]);
|
|
5840
5990
|
var snippetsFactoryContract = {
|
|
5841
|
-
createSnippetsForSdk:
|
|
5842
|
-
|
|
5843
|
-
orgId:
|
|
5844
|
-
apiId:
|
|
5991
|
+
createSnippetsForSdk: oc19.route({ method: "POST", path: "/create" }).input(
|
|
5992
|
+
z30.object({
|
|
5993
|
+
orgId: z30.string(),
|
|
5994
|
+
apiId: z30.string(),
|
|
5845
5995
|
snippets: SdkSnippetsCreateSchema
|
|
5846
5996
|
})
|
|
5847
5997
|
)
|
|
5848
5998
|
};
|
|
5849
|
-
var ParameterPayloadSchema =
|
|
5850
|
-
name:
|
|
5851
|
-
value:
|
|
5999
|
+
var ParameterPayloadSchema = z30.object({
|
|
6000
|
+
name: z30.string(),
|
|
6001
|
+
value: z30.unknown()
|
|
5852
6002
|
});
|
|
5853
|
-
var AuthPayloadSchema =
|
|
5854
|
-
|
|
5855
|
-
|
|
6003
|
+
var AuthPayloadSchema = z30.discriminatedUnion("type", [
|
|
6004
|
+
z30.object({ type: z30.literal("bearer"), token: z30.string() }),
|
|
6005
|
+
z30.object({ type: z30.literal("basic"), username: z30.string(), password: z30.string() })
|
|
5856
6006
|
]);
|
|
5857
|
-
var CustomSnippetPayloadSchema =
|
|
5858
|
-
headers:
|
|
5859
|
-
pathParameters:
|
|
5860
|
-
queryParameters:
|
|
5861
|
-
requestBody:
|
|
6007
|
+
var CustomSnippetPayloadSchema = z30.object({
|
|
6008
|
+
headers: z30.array(ParameterPayloadSchema).nullish(),
|
|
6009
|
+
pathParameters: z30.array(ParameterPayloadSchema).nullish(),
|
|
6010
|
+
queryParameters: z30.array(ParameterPayloadSchema).nullish(),
|
|
6011
|
+
requestBody: z30.unknown().nullish(),
|
|
5862
6012
|
auth: AuthPayloadSchema.nullish()
|
|
5863
6013
|
});
|
|
5864
6014
|
var snippetsContract = {
|
|
5865
|
-
get:
|
|
5866
|
-
|
|
5867
|
-
orgId:
|
|
5868
|
-
apiId:
|
|
5869
|
-
sdks:
|
|
6015
|
+
get: oc19.route({ method: "POST", path: "/" }).input(
|
|
6016
|
+
z30.object({
|
|
6017
|
+
orgId: z30.string().nullish(),
|
|
6018
|
+
apiId: z30.string().nullish(),
|
|
6019
|
+
sdks: z30.array(SdkRequestSchema).nullish(),
|
|
5870
6020
|
endpoint: EndpointIdentifierSchema,
|
|
5871
|
-
exampleIdentifier:
|
|
6021
|
+
exampleIdentifier: z30.string().nullish(),
|
|
5872
6022
|
payload: CustomSnippetPayloadSchema.nullish()
|
|
5873
6023
|
})
|
|
5874
|
-
).output(
|
|
5875
|
-
load:
|
|
5876
|
-
|
|
5877
|
-
orgId:
|
|
5878
|
-
apiId:
|
|
5879
|
-
sdks:
|
|
6024
|
+
).output(z30.array(z30.unknown())),
|
|
6025
|
+
load: oc19.route({ method: "POST", path: "/load" }).input(
|
|
6026
|
+
z30.object({
|
|
6027
|
+
orgId: z30.string().nullish(),
|
|
6028
|
+
apiId: z30.string().nullish(),
|
|
6029
|
+
sdks: z30.array(SdkRequestSchema).nullish()
|
|
5880
6030
|
})
|
|
5881
6031
|
).output(
|
|
5882
|
-
|
|
5883
|
-
next:
|
|
5884
|
-
snippets:
|
|
6032
|
+
z30.object({
|
|
6033
|
+
next: z30.number().nullish(),
|
|
6034
|
+
snippets: z30.record(z30.string(), z30.unknown())
|
|
5885
6035
|
})
|
|
5886
6036
|
)
|
|
5887
6037
|
};
|
|
5888
6038
|
|
|
5889
6039
|
// src/orpc-client/snippets/client.ts
|
|
5890
6040
|
function createSnippetsFactoryClient(options) {
|
|
5891
|
-
const link = new
|
|
6041
|
+
const link = new OpenAPILink21(snippetsFactoryContract, {
|
|
5892
6042
|
url: `${options.baseUrl}/snippets`,
|
|
5893
6043
|
headers: () => ({
|
|
5894
6044
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5896,10 +6046,10 @@ function createSnippetsFactoryClient(options) {
|
|
|
5896
6046
|
}),
|
|
5897
6047
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5898
6048
|
});
|
|
5899
|
-
return
|
|
6049
|
+
return createORPCClient21(link);
|
|
5900
6050
|
}
|
|
5901
6051
|
function createSnippetsClient(options) {
|
|
5902
|
-
const link = new
|
|
6052
|
+
const link = new OpenAPILink21(snippetsContract, {
|
|
5903
6053
|
url: `${options.baseUrl}/snippets`,
|
|
5904
6054
|
headers: () => ({
|
|
5905
6055
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5907,63 +6057,63 @@ function createSnippetsClient(options) {
|
|
|
5907
6057
|
}),
|
|
5908
6058
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5909
6059
|
});
|
|
5910
|
-
return
|
|
6060
|
+
return createORPCClient21(link);
|
|
5911
6061
|
}
|
|
5912
6062
|
|
|
5913
6063
|
// src/orpc-client/templates/client.ts
|
|
5914
|
-
import { createORPCClient as
|
|
5915
|
-
import { OpenAPILink as
|
|
6064
|
+
import { createORPCClient as createORPCClient22 } from "@orpc/client";
|
|
6065
|
+
import { OpenAPILink as OpenAPILink22 } from "@orpc/openapi-client/fetch";
|
|
5916
6066
|
|
|
5917
6067
|
// src/orpc-client/templates/contract.ts
|
|
5918
|
-
import { oc as
|
|
5919
|
-
import * as
|
|
5920
|
-
var SnippetRegistryEntrySchema =
|
|
6068
|
+
import { oc as oc20 } from "@orpc/contract";
|
|
6069
|
+
import * as z31 from "zod";
|
|
6070
|
+
var SnippetRegistryEntrySchema = z31.object({
|
|
5921
6071
|
sdk: SdkSchema,
|
|
5922
|
-
endpointId:
|
|
5923
|
-
path:
|
|
6072
|
+
endpointId: z31.object({
|
|
6073
|
+
path: z31.string(),
|
|
5924
6074
|
method: HttpMethodSchema,
|
|
5925
|
-
identifierOverride:
|
|
6075
|
+
identifierOverride: z31.string().nullish()
|
|
5926
6076
|
}),
|
|
5927
|
-
snippetTemplate:
|
|
5928
|
-
type:
|
|
5929
|
-
functionInvocation:
|
|
5930
|
-
clientInstantiation:
|
|
6077
|
+
snippetTemplate: z31.object({
|
|
6078
|
+
type: z31.literal("v1"),
|
|
6079
|
+
functionInvocation: z31.unknown(),
|
|
6080
|
+
clientInstantiation: z31.string()
|
|
5931
6081
|
}),
|
|
5932
|
-
additionalTemplates:
|
|
6082
|
+
additionalTemplates: z31.record(z31.string(), z31.unknown()).nullish()
|
|
5933
6083
|
});
|
|
5934
|
-
var RegisterInputSchema =
|
|
5935
|
-
orgId:
|
|
5936
|
-
apiId:
|
|
5937
|
-
apiDefinitionId:
|
|
6084
|
+
var RegisterInputSchema = z31.object({
|
|
6085
|
+
orgId: z31.string(),
|
|
6086
|
+
apiId: z31.string(),
|
|
6087
|
+
apiDefinitionId: z31.string(),
|
|
5938
6088
|
snippet: SnippetRegistryEntrySchema
|
|
5939
6089
|
});
|
|
5940
|
-
var RegisterBatchInputSchema =
|
|
5941
|
-
orgId:
|
|
5942
|
-
apiId:
|
|
5943
|
-
apiDefinitionId:
|
|
5944
|
-
snippets:
|
|
6090
|
+
var RegisterBatchInputSchema = z31.object({
|
|
6091
|
+
orgId: z31.string(),
|
|
6092
|
+
apiId: z31.string(),
|
|
6093
|
+
apiDefinitionId: z31.string(),
|
|
6094
|
+
snippets: z31.array(SnippetRegistryEntrySchema)
|
|
5945
6095
|
});
|
|
5946
|
-
var GetInputSchema =
|
|
5947
|
-
orgId:
|
|
5948
|
-
apiId:
|
|
6096
|
+
var GetInputSchema = z31.object({
|
|
6097
|
+
orgId: z31.string(),
|
|
6098
|
+
apiId: z31.string(),
|
|
5949
6099
|
sdk: SdkSchema,
|
|
5950
|
-
endpointId:
|
|
5951
|
-
path:
|
|
6100
|
+
endpointId: z31.object({
|
|
6101
|
+
path: z31.string(),
|
|
5952
6102
|
method: HttpMethodSchema,
|
|
5953
|
-
identifierOverride:
|
|
6103
|
+
identifierOverride: z31.string().nullish()
|
|
5954
6104
|
})
|
|
5955
6105
|
});
|
|
5956
|
-
var EndpointSnippetTemplateSchema =
|
|
6106
|
+
var EndpointSnippetTemplateSchema = z31.record(z31.string(), z31.unknown());
|
|
5957
6107
|
var templatesContract = {
|
|
5958
|
-
register:
|
|
5959
|
-
registerBatch:
|
|
5960
|
-
get:
|
|
6108
|
+
register: oc20.route({ method: "POST", path: "/register" }).input(RegisterInputSchema),
|
|
6109
|
+
registerBatch: oc20.route({ method: "POST", path: "/register/batch" }).input(RegisterBatchInputSchema),
|
|
6110
|
+
get: oc20.route({ method: "POST", path: "/get" }).input(GetInputSchema).output(EndpointSnippetTemplateSchema)
|
|
5961
6111
|
};
|
|
5962
6112
|
|
|
5963
6113
|
// src/orpc-client/templates/client.ts
|
|
5964
6114
|
function createTemplatesClient(options) {
|
|
5965
6115
|
const baseUrl = options.baseUrl.replace(/\/+$/, "");
|
|
5966
|
-
const link = new
|
|
6116
|
+
const link = new OpenAPILink22(templatesContract, {
|
|
5967
6117
|
url: `${baseUrl}/snippet-template`,
|
|
5968
6118
|
headers: () => ({
|
|
5969
6119
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5971,36 +6121,36 @@ function createTemplatesClient(options) {
|
|
|
5971
6121
|
}),
|
|
5972
6122
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5973
6123
|
});
|
|
5974
|
-
return
|
|
6124
|
+
return createORPCClient22(link);
|
|
5975
6125
|
}
|
|
5976
6126
|
|
|
5977
6127
|
// src/orpc-client/tokens/client.ts
|
|
5978
|
-
import { createORPCClient as
|
|
5979
|
-
import { OpenAPILink as
|
|
6128
|
+
import { createORPCClient as createORPCClient23 } from "@orpc/client";
|
|
6129
|
+
import { OpenAPILink as OpenAPILink23 } from "@orpc/openapi-client/fetch";
|
|
5980
6130
|
|
|
5981
6131
|
// src/orpc-client/tokens/contract.ts
|
|
5982
|
-
import { oc as
|
|
5983
|
-
import * as
|
|
5984
|
-
var GenerateTokenInputSchema =
|
|
5985
|
-
orgId:
|
|
5986
|
-
scope:
|
|
6132
|
+
import { oc as oc21 } from "@orpc/contract";
|
|
6133
|
+
import * as z32 from "zod";
|
|
6134
|
+
var GenerateTokenInputSchema = z32.object({
|
|
6135
|
+
orgId: z32.string(),
|
|
6136
|
+
scope: z32.string()
|
|
5987
6137
|
});
|
|
5988
|
-
var RevokeTokenInputSchema =
|
|
5989
|
-
orgId:
|
|
5990
|
-
tokenId:
|
|
6138
|
+
var RevokeTokenInputSchema = z32.object({
|
|
6139
|
+
orgId: z32.string(),
|
|
6140
|
+
tokenId: z32.string()
|
|
5991
6141
|
});
|
|
5992
|
-
var GenerateTokenOutputSchema =
|
|
5993
|
-
token:
|
|
5994
|
-
id:
|
|
6142
|
+
var GenerateTokenOutputSchema = z32.object({
|
|
6143
|
+
token: z32.string(),
|
|
6144
|
+
id: z32.string()
|
|
5995
6145
|
});
|
|
5996
6146
|
var tokensContract = {
|
|
5997
|
-
generate:
|
|
5998
|
-
revoke:
|
|
6147
|
+
generate: oc21.route({ method: "POST", path: "/generate" }).input(GenerateTokenInputSchema).output(GenerateTokenOutputSchema),
|
|
6148
|
+
revoke: oc21.route({ method: "POST", path: "/revoke" }).input(RevokeTokenInputSchema)
|
|
5999
6149
|
};
|
|
6000
6150
|
|
|
6001
6151
|
// src/orpc-client/tokens/client.ts
|
|
6002
6152
|
function createTokensClient(options) {
|
|
6003
|
-
const link = new
|
|
6153
|
+
const link = new OpenAPILink23(tokensContract, {
|
|
6004
6154
|
url: `${options.baseUrl}/tokens`,
|
|
6005
6155
|
headers: () => ({
|
|
6006
6156
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -6008,7 +6158,7 @@ function createTokensClient(options) {
|
|
|
6008
6158
|
}),
|
|
6009
6159
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
6010
6160
|
});
|
|
6011
|
-
return
|
|
6161
|
+
return createORPCClient23(link);
|
|
6012
6162
|
}
|
|
6013
6163
|
|
|
6014
6164
|
// src/orpc-client/client.ts
|
|
@@ -6032,6 +6182,7 @@ function createFdrORPCClient(options) {
|
|
|
6032
6182
|
versions: createGeneratorVersionsClient(normalizedOptions)
|
|
6033
6183
|
},
|
|
6034
6184
|
git: createGitClient(normalizedOptions),
|
|
6185
|
+
mcpHosting: createMcpHostingClient(normalizedOptions),
|
|
6035
6186
|
slugs: createSlugsClient(normalizedOptions),
|
|
6036
6187
|
pdfExport: createPdfExportClient(normalizedOptions),
|
|
6037
6188
|
sdks: createSdksClient(normalizedOptions),
|
|
@@ -6043,34 +6194,34 @@ function createFdrORPCClient(options) {
|
|
|
6043
6194
|
}
|
|
6044
6195
|
|
|
6045
6196
|
// src/orpc-client/docs/v1/write/client.ts
|
|
6046
|
-
import { createORPCClient as
|
|
6047
|
-
import { OpenAPILink as
|
|
6197
|
+
import { createORPCClient as createORPCClient24 } from "@orpc/client";
|
|
6198
|
+
import { OpenAPILink as OpenAPILink24 } from "@orpc/openapi-client/fetch";
|
|
6048
6199
|
|
|
6049
6200
|
// src/orpc-client/docs/v1/write/contract.ts
|
|
6050
|
-
import { oc as
|
|
6051
|
-
import * as
|
|
6052
|
-
var StartDocsRegisterV1InputSchema =
|
|
6053
|
-
orgId:
|
|
6054
|
-
domain:
|
|
6055
|
-
filepaths:
|
|
6201
|
+
import { oc as oc22 } from "@orpc/contract";
|
|
6202
|
+
import * as z33 from "zod";
|
|
6203
|
+
var StartDocsRegisterV1InputSchema = z33.object({
|
|
6204
|
+
orgId: z33.string(),
|
|
6205
|
+
domain: z33.string(),
|
|
6206
|
+
filepaths: z33.array(z33.string())
|
|
6056
6207
|
});
|
|
6057
|
-
var StartDocsRegisterV1ResponseSchema =
|
|
6058
|
-
docsRegistrationId:
|
|
6059
|
-
uploadUrls:
|
|
6060
|
-
skippedFiles:
|
|
6208
|
+
var StartDocsRegisterV1ResponseSchema = z33.object({
|
|
6209
|
+
docsRegistrationId: z33.string(),
|
|
6210
|
+
uploadUrls: z33.record(z33.string(), FileS3UploadUrlSchema),
|
|
6211
|
+
skippedFiles: z33.array(z33.string())
|
|
6061
6212
|
});
|
|
6062
|
-
var FinishDocsRegisterV1InputSchema =
|
|
6063
|
-
docsRegistrationId:
|
|
6064
|
-
docsDefinition:
|
|
6213
|
+
var FinishDocsRegisterV1InputSchema = z33.object({
|
|
6214
|
+
docsRegistrationId: z33.string(),
|
|
6215
|
+
docsDefinition: z33.unknown()
|
|
6065
6216
|
});
|
|
6066
6217
|
var docsV1WriteContract = {
|
|
6067
|
-
startDocsRegister:
|
|
6068
|
-
finishDocsRegister:
|
|
6218
|
+
startDocsRegister: oc22.route({ method: "POST", path: "/init" }).input(StartDocsRegisterV1InputSchema).output(StartDocsRegisterV1ResponseSchema),
|
|
6219
|
+
finishDocsRegister: oc22.route({ method: "POST", path: "/register/{docsRegistrationId}" }).input(FinishDocsRegisterV1InputSchema).output(z33.void())
|
|
6069
6220
|
};
|
|
6070
6221
|
|
|
6071
6222
|
// src/orpc-client/docs/v1/write/client.ts
|
|
6072
6223
|
function createDocsV1WriteClient(options) {
|
|
6073
|
-
const link = new
|
|
6224
|
+
const link = new OpenAPILink24(docsV1WriteContract, {
|
|
6074
6225
|
url: `${options.baseUrl}/registry/docs`,
|
|
6075
6226
|
headers: () => ({
|
|
6076
6227
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -6078,11 +6229,11 @@ function createDocsV1WriteClient(options) {
|
|
|
6078
6229
|
}),
|
|
6079
6230
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
6080
6231
|
});
|
|
6081
|
-
return
|
|
6232
|
+
return createORPCClient24(link);
|
|
6082
6233
|
}
|
|
6083
6234
|
|
|
6084
6235
|
// src/orpc-client/docs-ledger/config-files.ts
|
|
6085
|
-
import * as
|
|
6236
|
+
import * as z34 from "zod";
|
|
6086
6237
|
var PATH_OR_URL_METADATA_KEYS = [
|
|
6087
6238
|
"og:image",
|
|
6088
6239
|
"og:logo",
|
|
@@ -6090,57 +6241,57 @@ var PATH_OR_URL_METADATA_KEYS = [
|
|
|
6090
6241
|
"og:background-image",
|
|
6091
6242
|
"og:dynamic:background-image"
|
|
6092
6243
|
];
|
|
6093
|
-
var LogoViewSchema =
|
|
6094
|
-
var ThemeViewSchema =
|
|
6244
|
+
var LogoViewSchema = z34.union([z34.string(), z34.object({ path: z34.string() }).transform((v) => v.path)]);
|
|
6245
|
+
var ThemeViewSchema = z34.object({
|
|
6095
6246
|
logo: LogoViewSchema.optional().catch(void 0),
|
|
6096
|
-
backgroundImage:
|
|
6247
|
+
backgroundImage: z34.string().optional().catch(void 0)
|
|
6097
6248
|
});
|
|
6098
|
-
var ColorsViewSchema =
|
|
6099
|
-
|
|
6100
|
-
type:
|
|
6249
|
+
var ColorsViewSchema = z34.union([
|
|
6250
|
+
z34.object({
|
|
6251
|
+
type: z34.literal("darkAndLight"),
|
|
6101
6252
|
dark: ThemeViewSchema.optional().catch(void 0),
|
|
6102
6253
|
light: ThemeViewSchema.optional().catch(void 0)
|
|
6103
6254
|
}),
|
|
6104
6255
|
ThemeViewSchema.transform((theme) => ({ type: "single", theme }))
|
|
6105
6256
|
]);
|
|
6106
|
-
var FontViewSchema =
|
|
6107
|
-
variants:
|
|
6257
|
+
var FontViewSchema = z34.object({
|
|
6258
|
+
variants: z34.array(z34.object({ fontFile: z34.string().optional().catch(void 0) })).catch([])
|
|
6108
6259
|
});
|
|
6109
|
-
var TypographyViewSchema =
|
|
6260
|
+
var TypographyViewSchema = z34.object({
|
|
6110
6261
|
headingsFont: FontViewSchema.optional().catch(void 0),
|
|
6111
6262
|
bodyFont: FontViewSchema.optional().catch(void 0),
|
|
6112
6263
|
codeFont: FontViewSchema.optional().catch(void 0)
|
|
6113
6264
|
});
|
|
6114
|
-
var JsFileViewSchema =
|
|
6115
|
-
|
|
6116
|
-
|
|
6265
|
+
var JsFileViewSchema = z34.union([
|
|
6266
|
+
z34.object({ path: z34.string() }).transform((v) => v.path),
|
|
6267
|
+
z34.object({ fileId: z34.string() }).transform((v) => v.fileId)
|
|
6117
6268
|
]);
|
|
6118
|
-
var MetadataFileRefViewSchema =
|
|
6119
|
-
type:
|
|
6120
|
-
value:
|
|
6269
|
+
var MetadataFileRefViewSchema = z34.object({
|
|
6270
|
+
type: z34.enum(["path", "fileId"]),
|
|
6271
|
+
value: z34.string()
|
|
6121
6272
|
});
|
|
6122
|
-
var ConfigViewSchema =
|
|
6123
|
-
favicon:
|
|
6273
|
+
var ConfigViewSchema = z34.object({
|
|
6274
|
+
favicon: z34.string().optional().catch(void 0),
|
|
6124
6275
|
colorsV3: ColorsViewSchema.optional().catch(void 0),
|
|
6125
6276
|
typographyV2: TypographyViewSchema.optional().catch(void 0),
|
|
6126
|
-
js:
|
|
6127
|
-
metadata:
|
|
6277
|
+
js: z34.object({ files: z34.array(JsFileViewSchema.optional().catch(void 0)).catch([]) }).optional().catch(void 0),
|
|
6278
|
+
metadata: z34.record(z34.string(), z34.unknown()).optional().catch(void 0)
|
|
6128
6279
|
});
|
|
6129
6280
|
function isDarkAndLight(colors) {
|
|
6130
6281
|
return colors.type === "darkAndLight";
|
|
6131
6282
|
}
|
|
6132
6283
|
var NAV_ICON_FILE_PREFIX = "file:";
|
|
6133
|
-
var FileTokenTreeSchema =
|
|
6134
|
-
() =>
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6284
|
+
var FileTokenTreeSchema = z34.lazy(
|
|
6285
|
+
() => z34.union([
|
|
6286
|
+
z34.string(),
|
|
6287
|
+
z34.number(),
|
|
6288
|
+
z34.boolean(),
|
|
6289
|
+
z34.null(),
|
|
6290
|
+
z34.array(FileTokenTreeSchema),
|
|
6291
|
+
z34.record(z34.string(), FileTokenTreeSchema)
|
|
6141
6292
|
])
|
|
6142
6293
|
);
|
|
6143
|
-
var ConfigFileTokenViewSchema =
|
|
6294
|
+
var ConfigFileTokenViewSchema = z34.object({
|
|
6144
6295
|
landingPage: FileTokenTreeSchema.optional().catch(void 0)
|
|
6145
6296
|
});
|
|
6146
6297
|
function addFileTokenPath(paths, value) {
|
|
@@ -6162,17 +6313,17 @@ function addFileTokenPath(paths, value) {
|
|
|
6162
6313
|
}
|
|
6163
6314
|
}
|
|
6164
6315
|
}
|
|
6165
|
-
var SegmentDetailIconViewSchema =
|
|
6166
|
-
icon:
|
|
6167
|
-
metadata:
|
|
6168
|
-
icon:
|
|
6169
|
-
image:
|
|
6316
|
+
var SegmentDetailIconViewSchema = z34.object({
|
|
6317
|
+
icon: z34.string().nullish().catch(void 0),
|
|
6318
|
+
metadata: z34.object({
|
|
6319
|
+
icon: z34.string().nullish().catch(void 0),
|
|
6320
|
+
image: z34.string().nullish().catch(void 0)
|
|
6170
6321
|
}).nullish().catch(void 0)
|
|
6171
6322
|
});
|
|
6172
|
-
var SegmentIconViewSchema =
|
|
6173
|
-
metadata:
|
|
6174
|
-
icon:
|
|
6175
|
-
image:
|
|
6323
|
+
var SegmentIconViewSchema = z34.object({
|
|
6324
|
+
metadata: z34.object({
|
|
6325
|
+
icon: z34.string().nullish().catch(void 0),
|
|
6326
|
+
image: z34.string().nullish().catch(void 0)
|
|
6176
6327
|
}).nullish().catch(void 0),
|
|
6177
6328
|
product: SegmentDetailIconViewSchema.nullish().catch(void 0),
|
|
6178
6329
|
version: SegmentDetailIconViewSchema.nullish().catch(void 0),
|
|
@@ -6256,22 +6407,22 @@ function collectConfigFilePaths(config) {
|
|
|
6256
6407
|
}
|
|
6257
6408
|
|
|
6258
6409
|
// src/orpc-client/docs-ledger/ledger-manifest.ts
|
|
6259
|
-
import * as
|
|
6410
|
+
import * as z35 from "zod";
|
|
6260
6411
|
var LEDGER_MANIFEST_SCHEMA_VERSION = "docsledger/20260601";
|
|
6261
6412
|
var LEDGER_SHARD_SCHEMA_VERSION = "docsledger/shard/20260601";
|
|
6262
|
-
var ManifestBlobRefSchema =
|
|
6263
|
-
hash:
|
|
6264
|
-
contentType:
|
|
6413
|
+
var ManifestBlobRefSchema = z35.object({
|
|
6414
|
+
hash: z35.string(),
|
|
6415
|
+
contentType: z35.string()
|
|
6265
6416
|
});
|
|
6266
|
-
var ManifestSegmentSchema =
|
|
6417
|
+
var ManifestSegmentSchema = z35.object({
|
|
6267
6418
|
/** Synthetic stable id (= segmentHash). */
|
|
6268
|
-
segmentId:
|
|
6269
|
-
segmentHash:
|
|
6270
|
-
section:
|
|
6271
|
-
locale:
|
|
6419
|
+
segmentId: z35.string(),
|
|
6420
|
+
segmentHash: z35.string(),
|
|
6421
|
+
section: z35.string(),
|
|
6422
|
+
locale: z35.string(),
|
|
6272
6423
|
/** Sidebar order across segments (docs_ledger_deployment_segments.sort_order). */
|
|
6273
|
-
sortOrder:
|
|
6274
|
-
hidden:
|
|
6424
|
+
sortOrder: z35.number(),
|
|
6425
|
+
hidden: z35.boolean(),
|
|
6275
6426
|
/** Segment type descriptor: { type, title, icon, apiDefinitionId, overviewPageId, pointsTo, ... }. */
|
|
6276
6427
|
metadata: LedgerSegmentMetadataSchema,
|
|
6277
6428
|
product: SegmentDetailSchema.nullable(),
|
|
@@ -6320,23 +6471,23 @@ function selectLedgerSegmentsForLocale(segments, locale, defaultLocale) {
|
|
|
6320
6471
|
return [...byIdentity.values()];
|
|
6321
6472
|
}
|
|
6322
6473
|
var ManifestNavRouteSchema = LedgerNavRouteSchema;
|
|
6323
|
-
var ManifestRouteBaseSchema =
|
|
6324
|
-
segmentHash:
|
|
6474
|
+
var ManifestRouteBaseSchema = z35.object({
|
|
6475
|
+
segmentHash: z35.string(),
|
|
6325
6476
|
/** Key into the containing route index's sidebars map. */
|
|
6326
|
-
sidebarKey:
|
|
6327
|
-
section:
|
|
6328
|
-
locale:
|
|
6329
|
-
artifactId:
|
|
6330
|
-
pageId:
|
|
6477
|
+
sidebarKey: z35.string().nullable(),
|
|
6478
|
+
section: z35.string(),
|
|
6479
|
+
locale: z35.string(),
|
|
6480
|
+
artifactId: z35.string(),
|
|
6481
|
+
pageId: z35.string().optional(),
|
|
6331
6482
|
/** CAS hash of the page content blob, or null for link/redirect artifacts. */
|
|
6332
|
-
contentHash:
|
|
6333
|
-
contentType:
|
|
6483
|
+
contentHash: z35.string().nullable(),
|
|
6484
|
+
contentType: z35.string().nullable(),
|
|
6334
6485
|
/** ISO-8601 timestamp of when this artifact's content version was first created.
|
|
6335
6486
|
* Populated at publish time from `docs_ledger_artifacts.created_at`. Optional
|
|
6336
6487
|
* for backward compatibility with manifests built before this field existed. */
|
|
6337
|
-
createdAt:
|
|
6488
|
+
createdAt: z35.string().optional()
|
|
6338
6489
|
});
|
|
6339
|
-
var ManifestRouteSchema =
|
|
6490
|
+
var ManifestRouteSchema = z35.discriminatedUnion("artifactType", [
|
|
6340
6491
|
artifactTypeVariant(ManifestRouteBaseSchema, "markdown"),
|
|
6341
6492
|
artifactTypeVariant(ManifestRouteBaseSchema, "page"),
|
|
6342
6493
|
artifactTypeVariant(ManifestRouteBaseSchema, "rest"),
|
|
@@ -6351,60 +6502,60 @@ var ManifestRouteSchema = z34.discriminatedUnion("artifactType", [
|
|
|
6351
6502
|
artifactTypeVariant(ManifestRouteBaseSchema, "image"),
|
|
6352
6503
|
artifactTypeVariant(ManifestRouteBaseSchema, "redirect")
|
|
6353
6504
|
]);
|
|
6354
|
-
var ManifestPageSchema =
|
|
6355
|
-
fullPath:
|
|
6356
|
-
segmentHash:
|
|
6357
|
-
contentHash:
|
|
6358
|
-
contentType:
|
|
6505
|
+
var ManifestPageSchema = z35.object({
|
|
6506
|
+
fullPath: z35.string().nullable(),
|
|
6507
|
+
segmentHash: z35.string(),
|
|
6508
|
+
contentHash: z35.string(),
|
|
6509
|
+
contentType: z35.string()
|
|
6359
6510
|
});
|
|
6360
|
-
var ManifestApiDefSchema =
|
|
6511
|
+
var ManifestApiDefSchema = z35.object({
|
|
6361
6512
|
/** CAS hash of the full API definition blob. */
|
|
6362
|
-
hash:
|
|
6363
|
-
contentType:
|
|
6513
|
+
hash: z35.string(),
|
|
6514
|
+
contentType: z35.string(),
|
|
6364
6515
|
/** key = `${nodeType}:${nodeId}` (e.g. `endpoint:abc`) → pruned CAS blob. */
|
|
6365
|
-
prunedHashes:
|
|
6366
|
-
});
|
|
6367
|
-
var ManifestFileSchema =
|
|
6368
|
-
type:
|
|
6369
|
-
contentType:
|
|
6370
|
-
contentLength:
|
|
6371
|
-
filename:
|
|
6372
|
-
hash:
|
|
6516
|
+
prunedHashes: z35.record(z35.string(), ManifestBlobRefSchema)
|
|
6517
|
+
});
|
|
6518
|
+
var ManifestFileSchema = z35.object({
|
|
6519
|
+
type: z35.enum(["file", "image"]),
|
|
6520
|
+
contentType: z35.string(),
|
|
6521
|
+
contentLength: z35.number().optional(),
|
|
6522
|
+
filename: z35.string(),
|
|
6523
|
+
hash: z35.string(),
|
|
6373
6524
|
/** Canonical fern domain the bytes were uploaded under (ADR 0010 file anchor). */
|
|
6374
|
-
domain:
|
|
6375
|
-
bucket:
|
|
6376
|
-
width:
|
|
6377
|
-
height:
|
|
6378
|
-
blurDataURL:
|
|
6525
|
+
domain: z35.string(),
|
|
6526
|
+
bucket: z35.enum(["public_docs", "private_docs"]),
|
|
6527
|
+
width: z35.number().optional(),
|
|
6528
|
+
height: z35.number().optional(),
|
|
6529
|
+
blurDataURL: z35.string().optional()
|
|
6379
6530
|
});
|
|
6380
|
-
var LedgerShardFileSchema =
|
|
6531
|
+
var LedgerShardFileSchema = z35.object({
|
|
6381
6532
|
/** SHA-256 hex of the file bytes (docs-bucket key component). */
|
|
6382
|
-
hash:
|
|
6533
|
+
hash: z35.string(),
|
|
6383
6534
|
/** Fern-host-relative path; equals the `file:<fullPath>` token's suffix. */
|
|
6384
|
-
fullPath:
|
|
6385
|
-
contentType:
|
|
6386
|
-
contentLength:
|
|
6387
|
-
width:
|
|
6388
|
-
height:
|
|
6389
|
-
blurDataURL:
|
|
6535
|
+
fullPath: z35.string(),
|
|
6536
|
+
contentType: z35.string(),
|
|
6537
|
+
contentLength: z35.number().optional(),
|
|
6538
|
+
width: z35.number().optional(),
|
|
6539
|
+
height: z35.number().optional(),
|
|
6540
|
+
blurDataURL: z35.string().optional(),
|
|
6390
6541
|
/**
|
|
6391
6542
|
* Per-file bucket override. Absent ⇒ derive from the pointer's `isPrivate`
|
|
6392
6543
|
* (`private_docs` when private, else `public_docs`). Present only for the
|
|
6393
6544
|
* rare file whose bucket diverges from the deployment default.
|
|
6394
6545
|
*/
|
|
6395
|
-
bucket:
|
|
6396
|
-
});
|
|
6397
|
-
var LedgerConfigBlobSchema =
|
|
6398
|
-
version:
|
|
6399
|
-
git:
|
|
6400
|
-
repoUrl:
|
|
6401
|
-
branch:
|
|
6402
|
-
commitSha:
|
|
6546
|
+
bucket: z35.enum(["public_docs", "private_docs"]).optional()
|
|
6547
|
+
});
|
|
6548
|
+
var LedgerConfigBlobSchema = z35.object({
|
|
6549
|
+
version: z35.string().nullable(),
|
|
6550
|
+
git: z35.object({
|
|
6551
|
+
repoUrl: z35.string(),
|
|
6552
|
+
branch: z35.string(),
|
|
6553
|
+
commitSha: z35.string().nullable().optional()
|
|
6403
6554
|
}).optional(),
|
|
6404
6555
|
/** Structural config with hot-path chrome text inlined for ADR 0016 page reads. */
|
|
6405
6556
|
config: LedgerConfigSchema.nullable(),
|
|
6406
6557
|
/** Large or legacy extracted config blobs. New manifests inline header/footer/css.inline/js.inline. */
|
|
6407
|
-
configRefs:
|
|
6558
|
+
configRefs: z35.object({
|
|
6408
6559
|
header: ManifestBlobRefSchema.optional(),
|
|
6409
6560
|
footer: ManifestBlobRefSchema.optional(),
|
|
6410
6561
|
cssInline: ManifestBlobRefSchema.optional(),
|
|
@@ -6412,43 +6563,43 @@ var LedgerConfigBlobSchema = z34.object({
|
|
|
6412
6563
|
jsFiles: ManifestBlobRefSchema.optional()
|
|
6413
6564
|
})
|
|
6414
6565
|
});
|
|
6415
|
-
var LedgerChromeBlobSchema =
|
|
6416
|
-
apiNameToId:
|
|
6566
|
+
var LedgerChromeBlobSchema = z35.object({
|
|
6567
|
+
apiNameToId: z35.record(z35.string(), z35.string())
|
|
6417
6568
|
});
|
|
6418
|
-
var LedgerSidebarBundleSchema =
|
|
6419
|
-
locale:
|
|
6420
|
-
segmentHash:
|
|
6421
|
-
routes:
|
|
6569
|
+
var LedgerSidebarBundleSchema = z35.object({
|
|
6570
|
+
locale: z35.string(),
|
|
6571
|
+
segmentHash: z35.string(),
|
|
6572
|
+
routes: z35.array(ManifestNavRouteSchema)
|
|
6422
6573
|
});
|
|
6423
|
-
var LedgerSidebarMapEntrySchema =
|
|
6574
|
+
var LedgerSidebarMapEntrySchema = z35.discriminatedUnion("strategy", [
|
|
6424
6575
|
LedgerSidebarBundleSchema.extend({
|
|
6425
|
-
strategy:
|
|
6576
|
+
strategy: z35.literal("inline")
|
|
6426
6577
|
}),
|
|
6427
6578
|
ManifestBlobRefSchema.extend({
|
|
6428
|
-
strategy:
|
|
6579
|
+
strategy: z35.literal("ref")
|
|
6429
6580
|
})
|
|
6430
6581
|
]);
|
|
6431
|
-
var LedgerLocaleIndexSchema =
|
|
6432
|
-
locale:
|
|
6433
|
-
segments:
|
|
6582
|
+
var LedgerLocaleIndexSchema = z35.object({
|
|
6583
|
+
locale: z35.string(),
|
|
6584
|
+
segments: z35.array(ManifestSegmentSchema),
|
|
6434
6585
|
/** sidebarKey → inline sidebar routes, or a CAS ref when over budget. */
|
|
6435
|
-
sidebars:
|
|
6586
|
+
sidebars: z35.record(z35.string(), LedgerSidebarMapEntrySchema),
|
|
6436
6587
|
/** fullPath → route for this effective locale. */
|
|
6437
|
-
routes:
|
|
6588
|
+
routes: z35.record(z35.string(), ManifestRouteSchema),
|
|
6438
6589
|
/** pageId → page content reference for this effective locale. */
|
|
6439
|
-
pages:
|
|
6590
|
+
pages: z35.record(z35.string(), ManifestPageSchema),
|
|
6440
6591
|
/** apiDefinitionId → full + pruned API definition blobs. */
|
|
6441
|
-
apiDefs:
|
|
6592
|
+
apiDefs: z35.record(z35.string(), ManifestApiDefSchema),
|
|
6442
6593
|
/** fullPath → file/image artifact metadata. */
|
|
6443
|
-
files:
|
|
6594
|
+
files: z35.record(z35.string(), ManifestFileSchema)
|
|
6444
6595
|
});
|
|
6445
|
-
var LedgerRouteShardSchema =
|
|
6446
|
-
schema:
|
|
6447
|
-
locale:
|
|
6596
|
+
var LedgerRouteShardSchema = z35.object({
|
|
6597
|
+
schema: z35.literal(LEDGER_SHARD_SCHEMA_VERSION),
|
|
6598
|
+
locale: z35.string(),
|
|
6448
6599
|
/** fullPath → route for the scopes packed into this shard. */
|
|
6449
|
-
routes:
|
|
6600
|
+
routes: z35.record(z35.string(), ManifestRouteSchema),
|
|
6450
6601
|
/** segmentHash → inline sidebar (or CAS ref) for every segment in this shard's scopes. */
|
|
6451
|
-
sidebars:
|
|
6602
|
+
sidebars: z35.record(z35.string(), LedgerSidebarMapEntrySchema),
|
|
6452
6603
|
/**
|
|
6453
6604
|
* fileFullPath → lean file identity for every file/image referenced by a
|
|
6454
6605
|
* page routed into this shard (ADR 0016, "File metadata on the render
|
|
@@ -6457,32 +6608,32 @@ var LedgerRouteShardSchema = z34.object({
|
|
|
6457
6608
|
* existed or with no embedded files; the bundle then falls back to the
|
|
6458
6609
|
* pointer's `files` map (`fileMetadata`/`fileArtifact`).
|
|
6459
6610
|
*/
|
|
6460
|
-
files:
|
|
6611
|
+
files: z35.record(z35.string(), LedgerShardFileSchema).optional()
|
|
6461
6612
|
});
|
|
6462
|
-
var LedgerPagesBlobSchema =
|
|
6613
|
+
var LedgerPagesBlobSchema = z35.record(z35.string(), ManifestPageSchema);
|
|
6463
6614
|
var LedgerPointerSegmentSchema = ManifestSegmentSchema.omit({ product: true, version: true }).extend({
|
|
6464
6615
|
/** Index into the locale's `productCatalog`, or null when the segment has no product. */
|
|
6465
|
-
productIdx:
|
|
6616
|
+
productIdx: z35.number().nullable(),
|
|
6466
6617
|
/** Index into the locale's `versionCatalog`, or null when the segment has no version. */
|
|
6467
|
-
versionIdx:
|
|
6618
|
+
versionIdx: z35.number().nullable()
|
|
6468
6619
|
});
|
|
6469
|
-
var LedgerLocaleRoutingSchema =
|
|
6620
|
+
var LedgerLocaleRoutingSchema = z35.object({
|
|
6470
6621
|
/** Compact segments catalog for the switcher chrome (product/version by index). */
|
|
6471
|
-
segments:
|
|
6622
|
+
segments: z35.array(LedgerPointerSegmentSchema),
|
|
6472
6623
|
/** Deduplicated product details; `LedgerPointerSegment.productIdx` indexes into this. */
|
|
6473
|
-
productCatalog:
|
|
6624
|
+
productCatalog: z35.array(SegmentDetailSchema),
|
|
6474
6625
|
/** Deduplicated version details; `LedgerPointerSegment.versionIdx` indexes into this. */
|
|
6475
|
-
versionCatalog:
|
|
6626
|
+
versionCatalog: z35.array(SegmentDetailSchema),
|
|
6476
6627
|
/** fullPath → index into `shards`. */
|
|
6477
|
-
routing:
|
|
6628
|
+
routing: z35.record(z35.string(), z35.number()),
|
|
6478
6629
|
/** segmentHash → index into `shards`. */
|
|
6479
|
-
segmentShard:
|
|
6630
|
+
segmentShard: z35.record(z35.string(), z35.number()),
|
|
6480
6631
|
/** Ordered list of route shards; index matches `routing`/`segmentShard`. */
|
|
6481
|
-
shards:
|
|
6632
|
+
shards: z35.array(z35.object({ hash: z35.string() })),
|
|
6482
6633
|
/** versionId → first routable fullPath (version switcher). */
|
|
6483
|
-
versionFirstRoute:
|
|
6634
|
+
versionFirstRoute: z35.record(z35.string(), z35.string()),
|
|
6484
6635
|
/** CAS hash of the per-locale pages blob. */
|
|
6485
|
-
pagesHash:
|
|
6636
|
+
pagesHash: z35.string(),
|
|
6486
6637
|
/**
|
|
6487
6638
|
* fullPath → file/image artifact metadata for files NOT materialised into
|
|
6488
6639
|
* a route shard (ADR 0016, "File metadata on the render path"): config
|
|
@@ -6491,26 +6642,26 @@ var LedgerLocaleRoutingSchema = z34.object({
|
|
|
6491
6642
|
* Page-body images are pruned from here and live in their route shard's
|
|
6492
6643
|
* `files` map instead. Read via `fileMetadata` / `fileArtifact`.
|
|
6493
6644
|
*/
|
|
6494
|
-
files:
|
|
6645
|
+
files: z35.record(z35.string(), ManifestFileSchema),
|
|
6495
6646
|
/** apiDefinitionId → full + pruned API definition blobs. */
|
|
6496
|
-
apiDefs:
|
|
6647
|
+
apiDefs: z35.record(z35.string(), ManifestApiDefSchema)
|
|
6497
6648
|
});
|
|
6498
|
-
var LedgerManifestSchema =
|
|
6499
|
-
schema:
|
|
6649
|
+
var LedgerManifestSchema = z35.object({
|
|
6650
|
+
schema: z35.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
|
|
6500
6651
|
// ── Pointer / current-version fields ──────────────────────────────
|
|
6501
|
-
orgId:
|
|
6502
|
-
domain:
|
|
6503
|
-
basepath:
|
|
6504
|
-
deploymentId:
|
|
6505
|
-
deploymentHash:
|
|
6506
|
-
siteId:
|
|
6652
|
+
orgId: z35.string(),
|
|
6653
|
+
domain: z35.string(),
|
|
6654
|
+
basepath: z35.string(),
|
|
6655
|
+
deploymentId: z35.string(),
|
|
6656
|
+
deploymentHash: z35.string(),
|
|
6657
|
+
siteId: z35.string(),
|
|
6507
6658
|
/** ISO-8601 timestamp the publish became live (request time). */
|
|
6508
|
-
assignedAt:
|
|
6509
|
-
assignedBy:
|
|
6510
|
-
isPreview:
|
|
6511
|
-
isPrivate:
|
|
6659
|
+
assignedAt: z35.string(),
|
|
6660
|
+
assignedBy: z35.string().nullable(),
|
|
6661
|
+
isPreview: z35.boolean(),
|
|
6662
|
+
isPrivate: z35.boolean(),
|
|
6512
6663
|
/** Default locale for the deployment — read-path fallback when a translation is absent. */
|
|
6513
|
-
defaultLocale:
|
|
6664
|
+
defaultLocale: z35.string(),
|
|
6514
6665
|
/**
|
|
6515
6666
|
* Canonical fern domain all file bytes are anchored under (ADR 0010). The
|
|
6516
6667
|
* read client builds the public `/_files/{fileAnchorDomain}/{hash}/{fullPath}`
|
|
@@ -6519,19 +6670,19 @@ var LedgerManifestSchema = z34.object({
|
|
|
6519
6670
|
* written before shard-side files; absent ⇒ the client falls back to the
|
|
6520
6671
|
* pointer `files` map (which still carries per-file `domain`).
|
|
6521
6672
|
*/
|
|
6522
|
-
fileAnchorDomain:
|
|
6673
|
+
fileAnchorDomain: z35.string().optional(),
|
|
6523
6674
|
config: LedgerConfigBlobSchema,
|
|
6524
6675
|
chrome: LedgerChromeBlobSchema,
|
|
6525
|
-
locales:
|
|
6526
|
-
});
|
|
6527
|
-
var LedgerSiteArtifactSchema =
|
|
6528
|
-
|
|
6529
|
-
schema:
|
|
6530
|
-
unpublished:
|
|
6531
|
-
orgId:
|
|
6532
|
-
domain:
|
|
6533
|
-
basepath:
|
|
6534
|
-
isPreview:
|
|
6676
|
+
locales: z35.record(z35.string(), LedgerLocaleRoutingSchema)
|
|
6677
|
+
});
|
|
6678
|
+
var LedgerSiteArtifactSchema = z35.union([
|
|
6679
|
+
z35.object({
|
|
6680
|
+
schema: z35.literal(LEDGER_MANIFEST_SCHEMA_VERSION),
|
|
6681
|
+
unpublished: z35.literal(true),
|
|
6682
|
+
orgId: z35.string(),
|
|
6683
|
+
domain: z35.string(),
|
|
6684
|
+
basepath: z35.string(),
|
|
6685
|
+
isPreview: z35.boolean()
|
|
6535
6686
|
}),
|
|
6536
6687
|
LedgerManifestSchema
|
|
6537
6688
|
]);
|
|
@@ -6547,66 +6698,66 @@ function stableStringify(value) {
|
|
|
6547
6698
|
}
|
|
6548
6699
|
|
|
6549
6700
|
// src/orpc-client/files/contract.ts
|
|
6550
|
-
import { oc as
|
|
6551
|
-
import * as
|
|
6552
|
-
var PutContentInputSchema =
|
|
6553
|
-
contentType:
|
|
6554
|
-
contentLength:
|
|
6701
|
+
import { oc as oc23 } from "@orpc/contract";
|
|
6702
|
+
import * as z36 from "zod";
|
|
6703
|
+
var PutContentInputSchema = z36.object({
|
|
6704
|
+
contentType: z36.string(),
|
|
6705
|
+
contentLength: z36.number().int().positive()
|
|
6555
6706
|
});
|
|
6556
|
-
var PutContentResponseSchema =
|
|
6707
|
+
var PutContentResponseSchema = z36.discriminatedUnion("status", [
|
|
6557
6708
|
/** Content already exists in storage — client can skip the S3 upload. */
|
|
6558
|
-
|
|
6709
|
+
z36.object({ status: z36.literal("exists") }),
|
|
6559
6710
|
/** Content is new — client should PUT the file bytes to uploadUrl, then call PUT /files. */
|
|
6560
|
-
|
|
6711
|
+
z36.object({ status: z36.literal("upload_required"), uploadUrl: z36.string() })
|
|
6561
6712
|
]);
|
|
6562
|
-
var PutFileInputSchema =
|
|
6563
|
-
hash:
|
|
6564
|
-
contentType:
|
|
6713
|
+
var PutFileInputSchema = z36.object({
|
|
6714
|
+
hash: z36.string(),
|
|
6715
|
+
contentType: z36.string()
|
|
6565
6716
|
});
|
|
6566
|
-
var FileResponseSchema =
|
|
6717
|
+
var FileResponseSchema = z36.object({
|
|
6567
6718
|
/** SHA-256 hex digest of the file content (64 characters). */
|
|
6568
|
-
hash:
|
|
6719
|
+
hash: z36.string(),
|
|
6569
6720
|
/** Presigned S3 GET URL. TTL is configurable (default 3600 seconds). */
|
|
6570
|
-
downloadUrl:
|
|
6721
|
+
downloadUrl: z36.string()
|
|
6571
6722
|
});
|
|
6572
6723
|
var contentContract = {
|
|
6573
6724
|
/**
|
|
6574
6725
|
* Check whether content exists or obtain a presigned S3 upload URL.
|
|
6575
6726
|
* Requires org membership or super-user.
|
|
6576
6727
|
*/
|
|
6577
|
-
putContent:
|
|
6728
|
+
putContent: oc23.route({ method: "PUT", path: "/" }).input(PutContentInputSchema).output(PutContentResponseSchema)
|
|
6578
6729
|
};
|
|
6579
6730
|
var filesContract = {
|
|
6580
6731
|
/**
|
|
6581
6732
|
* Bind a content hash to an org-scoped file path, confirming the S3 upload.
|
|
6582
6733
|
* Requires org admin or super-user.
|
|
6583
6734
|
*/
|
|
6584
|
-
putFile:
|
|
6735
|
+
putFile: oc23.route({ method: "PUT", path: "/" }).input(PutFileInputSchema).output(FileResponseSchema),
|
|
6585
6736
|
/**
|
|
6586
6737
|
* Get a presigned download URL for an org file.
|
|
6587
6738
|
* Requires org membership or super-user.
|
|
6588
6739
|
*/
|
|
6589
|
-
getFile:
|
|
6740
|
+
getFile: oc23.route({ method: "GET", path: "/" }).output(FileResponseSchema)
|
|
6590
6741
|
};
|
|
6591
6742
|
|
|
6592
6743
|
// src/orpc-client/org-config/contract.ts
|
|
6593
|
-
import * as
|
|
6744
|
+
import * as z37 from "zod";
|
|
6594
6745
|
var SEMVER_RE = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z-.]+)?(?:\+[0-9A-Za-z-.]+)?$/;
|
|
6595
|
-
var UpsertOrgConfigBodySchema =
|
|
6746
|
+
var UpsertOrgConfigBodySchema = z37.object({
|
|
6596
6747
|
// A semver string sets the bound; `null` clears it; omitting leaves it unchanged.
|
|
6597
|
-
cliVersionMin:
|
|
6598
|
-
cliVersionMax:
|
|
6748
|
+
cliVersionMin: z37.union([z37.string().regex(SEMVER_RE, "cliVersionMin must be a valid semver (e.g. 5.45.0)"), z37.null()]).optional(),
|
|
6749
|
+
cliVersionMax: z37.union([z37.string().regex(SEMVER_RE, "cliVersionMax must be a valid semver (e.g. 5.45.0)"), z37.null()]).optional()
|
|
6599
6750
|
});
|
|
6600
|
-
var OrgConfigResponseSchema =
|
|
6601
|
-
orgId:
|
|
6602
|
-
cliVersionMin:
|
|
6603
|
-
cliVersionMax:
|
|
6751
|
+
var OrgConfigResponseSchema = z37.object({
|
|
6752
|
+
orgId: z37.string(),
|
|
6753
|
+
cliVersionMin: z37.string().optional(),
|
|
6754
|
+
cliVersionMax: z37.string().optional(),
|
|
6604
6755
|
// Absent when no config has been stored for the org yet.
|
|
6605
|
-
updatedAt:
|
|
6756
|
+
updatedAt: z37.string().optional()
|
|
6606
6757
|
});
|
|
6607
6758
|
|
|
6608
6759
|
// src/orpc-client/themes/contract.ts
|
|
6609
|
-
import * as
|
|
6760
|
+
import * as z38 from "zod";
|
|
6610
6761
|
var FERN_FILE_REF_KEY = "hash";
|
|
6611
6762
|
var SHA256_RE = /^[0-9a-f]{64}$/;
|
|
6612
6763
|
function isFernFileRef(value) {
|
|
@@ -6621,26 +6772,26 @@ function isFernFileRef(value) {
|
|
|
6621
6772
|
return typeof hash === "string" && SHA256_RE.test(hash);
|
|
6622
6773
|
}
|
|
6623
6774
|
var THEME_NAME_RE = /^[a-zA-Z0-9_-]{1,64}$/;
|
|
6624
|
-
var ThemeResponseSchema =
|
|
6625
|
-
id:
|
|
6626
|
-
orgId:
|
|
6627
|
-
name:
|
|
6628
|
-
config:
|
|
6629
|
-
updatedAt:
|
|
6775
|
+
var ThemeResponseSchema = z38.object({
|
|
6776
|
+
id: z38.string(),
|
|
6777
|
+
orgId: z38.string(),
|
|
6778
|
+
name: z38.string(),
|
|
6779
|
+
config: z38.unknown(),
|
|
6780
|
+
updatedAt: z38.string()
|
|
6630
6781
|
// ISO 8601 timestamp
|
|
6631
6782
|
});
|
|
6632
|
-
var ThemeListItemSchema =
|
|
6633
|
-
id:
|
|
6634
|
-
orgId:
|
|
6635
|
-
name:
|
|
6636
|
-
updatedAt:
|
|
6783
|
+
var ThemeListItemSchema = z38.object({
|
|
6784
|
+
id: z38.string(),
|
|
6785
|
+
orgId: z38.string(),
|
|
6786
|
+
name: z38.string(),
|
|
6787
|
+
updatedAt: z38.string()
|
|
6637
6788
|
});
|
|
6638
|
-
var ThemeListResponseSchema =
|
|
6639
|
-
themes:
|
|
6789
|
+
var ThemeListResponseSchema = z38.object({
|
|
6790
|
+
themes: z38.array(ThemeListItemSchema)
|
|
6640
6791
|
});
|
|
6641
|
-
var UpsertThemeBodySchema =
|
|
6642
|
-
name:
|
|
6643
|
-
config:
|
|
6792
|
+
var UpsertThemeBodySchema = z38.object({
|
|
6793
|
+
name: z38.string().min(1).max(64).regex(THEME_NAME_RE, "Theme name may only contain letters, digits, hyphens, and underscores"),
|
|
6794
|
+
config: z38.unknown()
|
|
6644
6795
|
});
|
|
6645
6796
|
export {
|
|
6646
6797
|
AlgoliaDomainInputSchema,
|
|
@@ -6725,8 +6876,10 @@ export {
|
|
|
6725
6876
|
DeleteDocsSiteByServiceInputSchema,
|
|
6726
6877
|
DeleteDocsSiteByServiceResponseSchema,
|
|
6727
6878
|
DeleteDocsSiteInputSchema,
|
|
6879
|
+
DeleteMcpServerInputSchema,
|
|
6728
6880
|
DeletePullRequestInputSchema,
|
|
6729
6881
|
DeleteRepositoryInputSchema,
|
|
6882
|
+
DeployMcpServerInputSchema,
|
|
6730
6883
|
DiscriminatedUnionTypeSchema,
|
|
6731
6884
|
DiscriminatedUnionVariantSchema,
|
|
6732
6885
|
DocsConfigId,
|
|
@@ -6844,6 +6997,7 @@ export {
|
|
|
6844
6997
|
GetLatestGeneratorReleaseInputSchema,
|
|
6845
6998
|
GetLibraryDocsStatusInputSchema,
|
|
6846
6999
|
GetMarkdownEntriesResponseSchema,
|
|
7000
|
+
GetMcpServerInputSchema,
|
|
6847
7001
|
GetMinCliForIrInputSchema,
|
|
6848
7002
|
GetOrganizationForUrlInputSchema,
|
|
6849
7003
|
GetPdfExportDownloadUrlInputSchema,
|
|
@@ -6996,6 +7150,10 @@ export {
|
|
|
6996
7150
|
ListDocsPagesResponseSchema,
|
|
6997
7151
|
ListGeneratorReleasesInputSchema,
|
|
6998
7152
|
ListGeneratorReleasesResponseSchema,
|
|
7153
|
+
ListMcpDeploymentsInputSchema,
|
|
7154
|
+
ListMcpDeploymentsResponseSchema,
|
|
7155
|
+
ListMcpServersInputSchema,
|
|
7156
|
+
ListMcpServersResponseSchema,
|
|
6999
7157
|
ListPdfExportTasksInputSchema,
|
|
7000
7158
|
ListPdfExportTasksResponseSchema,
|
|
7001
7159
|
ListPullRequestsInputSchema,
|
|
@@ -7015,6 +7173,11 @@ export {
|
|
|
7015
7173
|
ManifestRouteSchema,
|
|
7016
7174
|
ManifestSegmentSchema,
|
|
7017
7175
|
MarkdownEntrySchema,
|
|
7176
|
+
McpAuthSchemeSchema,
|
|
7177
|
+
McpDeploymentStatusSchema,
|
|
7178
|
+
McpDeploymentSummarySchema,
|
|
7179
|
+
McpMetadataSchema,
|
|
7180
|
+
McpServerSchema,
|
|
7018
7181
|
MigrateV2SiteInputSchema,
|
|
7019
7182
|
MigrateV2SiteResponseSchema,
|
|
7020
7183
|
MigrateV2SiteSkipReasonSchema,
|
|
@@ -7271,6 +7434,7 @@ export {
|
|
|
7271
7434
|
createGeneratorsRootClient,
|
|
7272
7435
|
createGitClient,
|
|
7273
7436
|
createLibraryDocsClient,
|
|
7437
|
+
createMcpHostingClient,
|
|
7274
7438
|
createOrganizationClient,
|
|
7275
7439
|
createPdfExportClient,
|
|
7276
7440
|
createSdksClient,
|
|
@@ -7300,6 +7464,7 @@ export {
|
|
|
7300
7464
|
isFernFileRef,
|
|
7301
7465
|
ledgerSegmentIdentity,
|
|
7302
7466
|
libraryDocsContract,
|
|
7467
|
+
mcpHostingContract,
|
|
7303
7468
|
organizationContract,
|
|
7304
7469
|
pdfExportContract,
|
|
7305
7470
|
sdksContract,
|