@fern-api/fdr-sdk 1.2.53-d8c526632f → 1.2.54-228fd283a3
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/client/docs-types/db.d.ts +61 -0
- package/dist/client/docs-types/db.d.ts.map +1 -1
- package/dist/client/docs-types/latest.d.ts +9 -9
- package/dist/client/docs-types/latest.d.ts.map +1 -1
- package/dist/client/docs-types/latest.js +1 -1
- package/dist/client/docs-types/latest.js.map +1 -1
- package/dist/client/docs-types/read.d.ts +27 -0
- package/dist/client/docs-types/read.d.ts.map +1 -1
- package/dist/client/docs-types/shared.d.ts +8 -0
- package/dist/client/docs-types/shared.d.ts.map +1 -1
- package/dist/client/docs-types/shared.js +1 -0
- package/dist/client/docs-types/shared.js.map +1 -1
- package/dist/client/docs-types/write.d.ts +16 -0
- package/dist/client/docs-types/write.d.ts.map +1 -1
- package/dist/js/client/FdrClient.js +1456 -1495
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +1456 -1495
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/client/types.js +2 -1
- package/dist/js/client/types.js.map +1 -1
- package/dist/js/client/types.mjs +2 -1
- package/dist/js/client/types.mjs.map +1 -1
- package/dist/js/converters/index.js +304 -301
- package/dist/js/converters/index.js.map +1 -1
- package/dist/js/converters/index.mjs +304 -301
- package/dist/js/converters/index.mjs.map +1 -1
- package/dist/js/docs/index.js +2 -1
- package/dist/js/docs/index.js.map +1 -1
- package/dist/js/docs/index.mjs +2 -1
- package/dist/js/docs/index.mjs.map +1 -1
- package/dist/js/index.js +1785 -1824
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +1784 -1823
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/navigation/index.js +304 -301
- package/dist/js/navigation/index.js.map +1 -1
- package/dist/js/navigation/index.mjs +304 -301
- package/dist/js/navigation/index.mjs.map +1 -1
- package/dist/js/orpc-client.js +1507 -1507
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +1515 -1515
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/orpc-client/docs/client.d.ts +0 -2
- package/dist/orpc-client/docs/client.d.ts.map +1 -1
- package/dist/orpc-client/docs/client.js +1 -3
- package/dist/orpc-client/docs/client.js.map +1 -1
- package/dist/orpc-client/docs/v1/read/contract.d.ts +18 -0
- package/dist/orpc-client/docs/v1/read/contract.d.ts.map +1 -1
- package/dist/orpc-client/docs/v1/write/contract.d.ts +4 -0
- package/dist/orpc-client/docs/v1/write/contract.d.ts.map +1 -1
- package/dist/orpc-client/docs/v2/read/contract.d.ts +40 -0
- package/dist/orpc-client/docs/v2/read/contract.d.ts.map +1 -1
- package/dist/orpc-client/docs/v2/write/contract.d.ts +14 -6
- package/dist/orpc-client/docs/v2/write/contract.d.ts.map +1 -1
- package/dist/orpc-client/docs-ledger/contract.d.ts +56 -0
- package/dist/orpc-client/docs-ledger/contract.d.ts.map +1 -1
- package/dist/orpc-client/docs-ledger/ledger-manifest.d.ts +14 -0
- package/dist/orpc-client/docs-ledger/ledger-manifest.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/client/docs-types/db.d.ts +61 -0
- package/dist/types/client/docs-types/db.d.ts.map +1 -1
- package/dist/types/client/docs-types/latest.d.ts +9 -9
- package/dist/types/client/docs-types/latest.d.ts.map +1 -1
- package/dist/types/client/docs-types/read.d.ts +27 -0
- package/dist/types/client/docs-types/read.d.ts.map +1 -1
- package/dist/types/client/docs-types/shared.d.ts +8 -0
- package/dist/types/client/docs-types/shared.d.ts.map +1 -1
- package/dist/types/client/docs-types/write.d.ts +16 -0
- package/dist/types/client/docs-types/write.d.ts.map +1 -1
- package/dist/types/orpc-client/docs/client.d.ts +0 -2
- package/dist/types/orpc-client/docs/client.d.ts.map +1 -1
- package/dist/types/orpc-client/docs/v1/read/contract.d.ts +18 -0
- package/dist/types/orpc-client/docs/v1/read/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs/v1/write/contract.d.ts +4 -0
- package/dist/types/orpc-client/docs/v1/write/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs/v2/read/contract.d.ts +40 -0
- package/dist/types/orpc-client/docs/v2/read/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs/v2/write/contract.d.ts +14 -6
- package/dist/types/orpc-client/docs/v2/write/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-ledger/contract.d.ts +56 -0
- package/dist/types/orpc-client/docs-ledger/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-ledger/ledger-manifest.d.ts +14 -0
- package/dist/types/orpc-client/docs-ledger/ledger-manifest.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2411,6 +2411,7 @@ var PageActionOptionsSchema = z9.object({
|
|
|
2411
2411
|
cursor: z9.boolean().optional(),
|
|
2412
2412
|
claudeCode: z9.boolean().optional(),
|
|
2413
2413
|
vscode: z9.boolean().optional(),
|
|
2414
|
+
mcp: z9.boolean().optional(),
|
|
2414
2415
|
custom: z9.array(CustomPageActionSchema).optional(),
|
|
2415
2416
|
skills: SkillsConfigSchema.optional()
|
|
2416
2417
|
});
|
|
@@ -2737,225 +2738,430 @@ function createDocsV1ReadClient(options) {
|
|
|
2737
2738
|
return createORPCClient3(link);
|
|
2738
2739
|
}
|
|
2739
2740
|
|
|
2740
|
-
// src/orpc-client/docs/
|
|
2741
|
+
// src/orpc-client/docs/v2/library-docs/client.ts
|
|
2741
2742
|
import { createORPCClient as createORPCClient4 } from "@orpc/client";
|
|
2742
2743
|
import { OpenAPILink as OpenAPILink4 } from "@orpc/openapi-client/fetch";
|
|
2743
2744
|
|
|
2744
|
-
// src/orpc-client/docs/
|
|
2745
|
+
// src/orpc-client/docs/v2/library-docs/contract.ts
|
|
2745
2746
|
import { oc as oc5 } from "@orpc/contract";
|
|
2747
|
+
import * as z13 from "zod";
|
|
2748
|
+
var ALLOWED_HOSTNAMES = /* @__PURE__ */ new Set(["github.com", "gitlab.com"]);
|
|
2749
|
+
var GithubUrlSchema = z13.string().url().describe(
|
|
2750
|
+
"HTTPS URL of a GitHub or GitLab repository. Currently only github.com and gitlab.com are supported. Must match the pattern https://github.com/<owner>/<repo> or https://gitlab.com/<owner>/<repo>."
|
|
2751
|
+
).refine(
|
|
2752
|
+
(url) => {
|
|
2753
|
+
try {
|
|
2754
|
+
const parsed = new URL(url);
|
|
2755
|
+
if (parsed.protocol !== "https:") {
|
|
2756
|
+
return false;
|
|
2757
|
+
}
|
|
2758
|
+
if (!ALLOWED_HOSTNAMES.has(parsed.hostname)) {
|
|
2759
|
+
return false;
|
|
2760
|
+
}
|
|
2761
|
+
if (parsed.username || parsed.password) {
|
|
2762
|
+
return false;
|
|
2763
|
+
}
|
|
2764
|
+
return /^\/[\w.-]+\/[\w.-]+(?:\.git)?\/?$/.test(parsed.pathname);
|
|
2765
|
+
} catch {
|
|
2766
|
+
return false;
|
|
2767
|
+
}
|
|
2768
|
+
},
|
|
2769
|
+
{ message: "Must be a valid https://github.com/<owner>/<repo> or https://gitlab.com/<owner>/<repo> URL" }
|
|
2770
|
+
);
|
|
2771
|
+
var SafeBranchSchema = z13.string().regex(/^[a-zA-Z0-9._/-]+$/, "Invalid branch name").nullish();
|
|
2772
|
+
var SafePackagePathSchema = z13.string().refine((p) => !p.includes("..") && !p.startsWith("/"), {
|
|
2773
|
+
message: "packagePath must not contain path traversal sequences"
|
|
2774
|
+
}).nullish();
|
|
2775
|
+
var LibraryDocsBaseConfigSchema = z13.object({
|
|
2776
|
+
branch: SafeBranchSchema,
|
|
2777
|
+
packagePath: SafePackagePathSchema,
|
|
2778
|
+
title: z13.string().nullish(),
|
|
2779
|
+
slug: z13.string().nullish()
|
|
2780
|
+
});
|
|
2781
|
+
var PythonLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema;
|
|
2782
|
+
var CppLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema.extend({
|
|
2783
|
+
doxyfileContent: z13.string().nullish()
|
|
2784
|
+
});
|
|
2785
|
+
var StartLibraryDocsGenerationInputSchema = z13.discriminatedUnion("language", [
|
|
2786
|
+
z13.object({
|
|
2787
|
+
orgId: z13.string(),
|
|
2788
|
+
githubUrl: GithubUrlSchema,
|
|
2789
|
+
language: z13.literal("PYTHON"),
|
|
2790
|
+
config: PythonLibraryDocsConfigSchema.nullish()
|
|
2791
|
+
}),
|
|
2792
|
+
z13.object({
|
|
2793
|
+
orgId: z13.string(),
|
|
2794
|
+
githubUrl: GithubUrlSchema,
|
|
2795
|
+
language: z13.literal("CPP"),
|
|
2796
|
+
config: CppLibraryDocsConfigSchema.nullish()
|
|
2797
|
+
})
|
|
2798
|
+
]);
|
|
2799
|
+
var StartLibraryDocsGenerationResponseSchema = z13.object({
|
|
2800
|
+
jobId: z13.string()
|
|
2801
|
+
});
|
|
2802
|
+
var GetLibraryDocsStatusInputSchema = z13.object({
|
|
2803
|
+
jobId: z13.string()
|
|
2804
|
+
});
|
|
2805
|
+
var LibraryDocsResultSchema = z13.object({
|
|
2806
|
+
jobId: z13.string(),
|
|
2807
|
+
resultUrl: z13.string()
|
|
2808
|
+
});
|
|
2809
|
+
var LibraryDocsGenerationStatusSchema = z13.object({
|
|
2810
|
+
jobId: z13.string(),
|
|
2811
|
+
status: z13.string(),
|
|
2812
|
+
progress: z13.string(),
|
|
2813
|
+
error: z13.object({
|
|
2814
|
+
code: z13.string(),
|
|
2815
|
+
message: z13.string()
|
|
2816
|
+
}).optional(),
|
|
2817
|
+
createdAt: z13.string(),
|
|
2818
|
+
updatedAt: z13.string()
|
|
2819
|
+
});
|
|
2820
|
+
var libraryDocsContract = {
|
|
2821
|
+
startLibraryDocsGeneration: oc5.route({ method: "POST", path: "/library-docs/generate" }).input(StartLibraryDocsGenerationInputSchema).output(StartLibraryDocsGenerationResponseSchema),
|
|
2822
|
+
getLibraryDocsGenerationStatus: oc5.route({ method: "GET", path: "/library-docs/status/{jobId}" }).input(GetLibraryDocsStatusInputSchema).output(LibraryDocsGenerationStatusSchema),
|
|
2823
|
+
getLibraryDocsResult: oc5.route({ method: "GET", path: "/library-docs/result/{jobId}" }).input(GetLibraryDocsStatusInputSchema).output(LibraryDocsResultSchema)
|
|
2824
|
+
};
|
|
2825
|
+
|
|
2826
|
+
// src/orpc-client/docs/v2/library-docs/client.ts
|
|
2827
|
+
function createLibraryDocsClient(options) {
|
|
2828
|
+
const link = new OpenAPILink4(libraryDocsContract, {
|
|
2829
|
+
url: `${options.baseUrl}/v2/registry/docs`,
|
|
2830
|
+
headers: () => ({
|
|
2831
|
+
Authorization: `Bearer ${options.token}`,
|
|
2832
|
+
...options.headers
|
|
2833
|
+
}),
|
|
2834
|
+
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
2835
|
+
});
|
|
2836
|
+
return createORPCClient4(link);
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
// src/orpc-client/docs/v2/organization/client.ts
|
|
2840
|
+
import { createORPCClient as createORPCClient5 } from "@orpc/client";
|
|
2841
|
+
import { OpenAPILink as OpenAPILink5 } from "@orpc/openapi-client/fetch";
|
|
2842
|
+
|
|
2843
|
+
// src/orpc-client/docs/v2/organization/contract.ts
|
|
2844
|
+
import { oc as oc6 } from "@orpc/contract";
|
|
2845
|
+
import * as z14 from "zod";
|
|
2846
|
+
var GetOrganizationForUrlInputSchema = z14.object({
|
|
2847
|
+
url: z14.string()
|
|
2848
|
+
});
|
|
2849
|
+
var organizationContract = {
|
|
2850
|
+
getOrganizationForUrl: oc6.route({ method: "POST", path: "/organization-for-url" }).input(GetOrganizationForUrlInputSchema).output(z14.string())
|
|
2851
|
+
};
|
|
2852
|
+
|
|
2853
|
+
// src/orpc-client/docs/v2/organization/client.ts
|
|
2854
|
+
function createOrganizationClient(options) {
|
|
2855
|
+
const link = new OpenAPILink5(organizationContract, {
|
|
2856
|
+
url: `${options.baseUrl}/v2/registry/docs`,
|
|
2857
|
+
headers: () => ({
|
|
2858
|
+
Authorization: `Bearer ${options.token}`,
|
|
2859
|
+
...options.headers
|
|
2860
|
+
}),
|
|
2861
|
+
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
2862
|
+
});
|
|
2863
|
+
return createORPCClient5(link);
|
|
2864
|
+
}
|
|
2865
|
+
|
|
2866
|
+
// src/orpc-client/docs/v2/read/client.ts
|
|
2867
|
+
import { createORPCClient as createORPCClient6 } from "@orpc/client";
|
|
2868
|
+
import { OpenAPILink as OpenAPILink6 } from "@orpc/openapi-client/fetch";
|
|
2869
|
+
|
|
2870
|
+
// src/orpc-client/docs/v2/read/contract.ts
|
|
2871
|
+
import { oc as oc7 } from "@orpc/contract";
|
|
2746
2872
|
import * as z15 from "zod";
|
|
2873
|
+
var GetDocsUrlMetadataInputSchema = z15.object({
|
|
2874
|
+
url: z15.string()
|
|
2875
|
+
});
|
|
2876
|
+
var GetDocsUrlMetadataResponseSchema = z15.object({
|
|
2877
|
+
isPreviewUrl: z15.boolean(),
|
|
2878
|
+
org: z15.string(),
|
|
2879
|
+
url: z15.string(),
|
|
2880
|
+
gitUrl: z15.string().nullish(),
|
|
2881
|
+
enableAlgoliaOnPreview: z15.boolean().nullish()
|
|
2882
|
+
});
|
|
2883
|
+
var GetDocsForUrlInputSchema = z15.object({
|
|
2884
|
+
url: z15.string(),
|
|
2885
|
+
excludeApis: z15.boolean().nullish()
|
|
2886
|
+
});
|
|
2887
|
+
var GetPrivateDocsForUrlInputSchema = z15.object({
|
|
2888
|
+
url: z15.string()
|
|
2889
|
+
});
|
|
2890
|
+
var ListAllDocsUrlsInputSchema = z15.object({
|
|
2891
|
+
limit: z15.number().nullish(),
|
|
2892
|
+
page: z15.number().nullish(),
|
|
2893
|
+
custom: z15.boolean().nullish(),
|
|
2894
|
+
preview: z15.boolean().nullish()
|
|
2895
|
+
});
|
|
2896
|
+
var GetDocsConfigByIdInputSchema = z15.object({
|
|
2897
|
+
docsConfigId: z15.string()
|
|
2898
|
+
});
|
|
2899
|
+
var GetDocsConfigByIdResponseSchema = z15.object({
|
|
2900
|
+
docsConfig: DocsConfigSchema,
|
|
2901
|
+
apis: z15.record(z15.string(), z15.unknown())
|
|
2902
|
+
});
|
|
2903
|
+
var DocsDomainItemSchema = z15.object({
|
|
2904
|
+
domain: z15.string(),
|
|
2905
|
+
basePath: z15.string().optional(),
|
|
2906
|
+
organizationId: z15.string(),
|
|
2907
|
+
updatedAt: z15.string()
|
|
2908
|
+
});
|
|
2909
|
+
var ListAllDocsUrlsResponseSchema = z15.object({
|
|
2910
|
+
urls: z15.array(DocsDomainItemSchema)
|
|
2911
|
+
});
|
|
2912
|
+
var getDocsForUrl;
|
|
2913
|
+
((getDocsForUrl2) => {
|
|
2914
|
+
let Error;
|
|
2915
|
+
((Error2) => {
|
|
2916
|
+
function _unknown(fetcherError) {
|
|
2917
|
+
return { error: void 0, content: fetcherError };
|
|
2918
|
+
}
|
|
2919
|
+
Error2._unknown = _unknown;
|
|
2920
|
+
})(Error = getDocsForUrl2.Error || (getDocsForUrl2.Error = {}));
|
|
2921
|
+
})(getDocsForUrl || (getDocsForUrl = {}));
|
|
2922
|
+
var docsV2ReadContract = {
|
|
2923
|
+
getDocsUrlMetadata: oc7.route({ method: "POST", path: "/metadata-for-url" }).input(GetDocsUrlMetadataInputSchema).output(GetDocsUrlMetadataResponseSchema),
|
|
2924
|
+
getDocsForUrl: oc7.route({ method: "POST", path: "/load-with-url" }).input(GetDocsForUrlInputSchema).output(LoadDocsForUrlResponseSchema),
|
|
2925
|
+
getPrivateDocsForUrl: oc7.route({ method: "POST", path: "/private/load-with-url" }).input(GetPrivateDocsForUrlInputSchema).output(LoadDocsForUrlResponseSchema),
|
|
2926
|
+
listAllDocsUrls: oc7.route({ method: "GET", path: "/urls/list" }).input(ListAllDocsUrlsInputSchema).output(ListAllDocsUrlsResponseSchema),
|
|
2927
|
+
getDocsConfigById: oc7.route({ method: "GET", path: "/{docsConfigId}" }).input(GetDocsConfigByIdInputSchema).output(GetDocsConfigByIdResponseSchema),
|
|
2928
|
+
prepopulateFdrReadS3Bucket: oc7.route({ method: "POST", path: "/prepopulate-s3-bucket" }).output(z15.void()),
|
|
2929
|
+
ensureDocsInS3: oc7.route({ method: "POST", path: "/ensure-docs-in-s3" }).output(z15.void()),
|
|
2930
|
+
getDocsFields: oc7.route({ method: "POST", path: "/load-fields" }).output(z15.void())
|
|
2931
|
+
};
|
|
2932
|
+
|
|
2933
|
+
// src/orpc-client/docs/v2/read/client.ts
|
|
2934
|
+
function createDocsV2ReadClient(options) {
|
|
2935
|
+
const link = new OpenAPILink6(docsV2ReadContract, {
|
|
2936
|
+
url: `${options.baseUrl}/v2/registry/docs`,
|
|
2937
|
+
headers: () => ({
|
|
2938
|
+
Authorization: `Bearer ${options.token}`,
|
|
2939
|
+
...options.headers
|
|
2940
|
+
}),
|
|
2941
|
+
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
2942
|
+
});
|
|
2943
|
+
return createORPCClient6(link);
|
|
2944
|
+
}
|
|
2945
|
+
|
|
2946
|
+
// src/orpc-client/docs/v2/write/client.ts
|
|
2947
|
+
import { createORPCClient as createORPCClient7 } from "@orpc/client";
|
|
2948
|
+
import { OpenAPILink as OpenAPILink7 } from "@orpc/openapi-client/fetch";
|
|
2949
|
+
|
|
2950
|
+
// src/orpc-client/docs/v2/write/contract.ts
|
|
2951
|
+
import { oc as oc8 } from "@orpc/contract";
|
|
2952
|
+
import * as z18 from "zod";
|
|
2747
2953
|
|
|
2748
2954
|
// src/client/docs-types/write.ts
|
|
2749
|
-
import * as
|
|
2955
|
+
import * as z17 from "zod";
|
|
2750
2956
|
|
|
2751
2957
|
// src/client/docs-types/write-commons.ts
|
|
2752
|
-
import * as
|
|
2753
|
-
var OrgIdSchema2 =
|
|
2958
|
+
import * as z16 from "zod";
|
|
2959
|
+
var OrgIdSchema2 = z16.string();
|
|
2754
2960
|
|
|
2755
2961
|
// src/client/docs-types/write.ts
|
|
2756
|
-
var FilePathSchema =
|
|
2757
|
-
var DocsRegistrationIdSchema =
|
|
2758
|
-
var HeightSchema2 =
|
|
2759
|
-
var FileS3UploadUrlSchema =
|
|
2760
|
-
uploadUrl:
|
|
2962
|
+
var FilePathSchema = z17.string();
|
|
2963
|
+
var DocsRegistrationIdSchema = z17.string();
|
|
2964
|
+
var HeightSchema2 = z17.number();
|
|
2965
|
+
var FileS3UploadUrlSchema = z17.object({
|
|
2966
|
+
uploadUrl: z17.string(),
|
|
2761
2967
|
fileId: FileIdSchema2
|
|
2762
2968
|
});
|
|
2763
|
-
var StartDocsRegisterResponseSchema =
|
|
2969
|
+
var StartDocsRegisterResponseSchema = z17.object({
|
|
2764
2970
|
docsRegistrationId: DocsRegistrationIdSchema,
|
|
2765
|
-
uploadUrls:
|
|
2766
|
-
skippedFiles:
|
|
2971
|
+
uploadUrls: z17.record(FilePathSchema, FileS3UploadUrlSchema),
|
|
2972
|
+
skippedFiles: z17.array(FilePathSchema)
|
|
2767
2973
|
});
|
|
2768
|
-
var PageContentSchema2 =
|
|
2769
|
-
markdown:
|
|
2974
|
+
var PageContentSchema2 = z17.object({
|
|
2975
|
+
markdown: z17.string(),
|
|
2770
2976
|
editThisPageUrl: UrlSchema2.optional(),
|
|
2771
2977
|
editThisPageLaunch: EditThisPageLaunchSchema.optional(),
|
|
2772
|
-
rawMarkdown:
|
|
2978
|
+
rawMarkdown: z17.string().optional()
|
|
2773
2979
|
});
|
|
2774
|
-
var NavigationNodeMetadataSchema2 =
|
|
2775
|
-
icon:
|
|
2776
|
-
hidden:
|
|
2777
|
-
urlSlugOverride:
|
|
2778
|
-
fullSlug:
|
|
2980
|
+
var NavigationNodeMetadataSchema2 = z17.object({
|
|
2981
|
+
icon: z17.string().optional(),
|
|
2982
|
+
hidden: z17.boolean().optional(),
|
|
2983
|
+
urlSlugOverride: z17.string().optional(),
|
|
2984
|
+
fullSlug: z17.array(z17.string()).optional()
|
|
2779
2985
|
});
|
|
2780
|
-
var PageMetadataSchema2 =
|
|
2986
|
+
var PageMetadataSchema2 = z17.object({
|
|
2781
2987
|
...NavigationNodeMetadataSchema2.shape,
|
|
2782
2988
|
id: PageIdSchema2,
|
|
2783
|
-
title:
|
|
2989
|
+
title: z17.string()
|
|
2784
2990
|
});
|
|
2785
|
-
var LinkMetadataSchema2 =
|
|
2786
|
-
title:
|
|
2787
|
-
icon:
|
|
2991
|
+
var LinkMetadataSchema2 = z17.object({
|
|
2992
|
+
title: z17.string(),
|
|
2993
|
+
icon: z17.string().optional(),
|
|
2788
2994
|
url: UrlSchema2,
|
|
2789
2995
|
target: LinkTargetSchema.optional()
|
|
2790
2996
|
});
|
|
2791
|
-
var ChangelogItemSchema2 =
|
|
2792
|
-
date:
|
|
2997
|
+
var ChangelogItemSchema2 = z17.object({
|
|
2998
|
+
date: z17.string(),
|
|
2793
2999
|
pageId: PageIdSchema2,
|
|
2794
|
-
hidden:
|
|
2795
|
-
tags:
|
|
2796
|
-
});
|
|
2797
|
-
var ChangelogSectionSchema2 =
|
|
2798
|
-
title:
|
|
2799
|
-
icon:
|
|
2800
|
-
hidden:
|
|
2801
|
-
description:
|
|
3000
|
+
hidden: z17.boolean().optional(),
|
|
3001
|
+
tags: z17.array(z17.string()).optional()
|
|
3002
|
+
});
|
|
3003
|
+
var ChangelogSectionSchema2 = z17.object({
|
|
3004
|
+
title: z17.string().optional(),
|
|
3005
|
+
icon: z17.string().optional(),
|
|
3006
|
+
hidden: z17.boolean().optional(),
|
|
3007
|
+
description: z17.string().optional(),
|
|
2802
3008
|
pageId: PageIdSchema2.optional(),
|
|
2803
|
-
items:
|
|
2804
|
-
urlSlug:
|
|
2805
|
-
fullSlug:
|
|
3009
|
+
items: z17.array(ChangelogItemSchema2),
|
|
3010
|
+
urlSlug: z17.string(),
|
|
3011
|
+
fullSlug: z17.array(z17.string()).optional()
|
|
2806
3012
|
});
|
|
2807
|
-
var ChangelogSectionV2Schema =
|
|
3013
|
+
var ChangelogSectionV2Schema = z17.object({
|
|
2808
3014
|
...NavigationNodeMetadataSchema2.shape,
|
|
2809
|
-
title:
|
|
2810
|
-
description:
|
|
3015
|
+
title: z17.string().optional(),
|
|
3016
|
+
description: z17.string().optional(),
|
|
2811
3017
|
pageId: PageIdSchema2.optional(),
|
|
2812
|
-
items:
|
|
3018
|
+
items: z17.array(ChangelogItemSchema2)
|
|
2813
3019
|
});
|
|
2814
|
-
var ChangelogSectionV3Schema2 =
|
|
2815
|
-
node:
|
|
3020
|
+
var ChangelogSectionV3Schema2 = z17.object({
|
|
3021
|
+
node: z17.unknown()
|
|
2816
3022
|
});
|
|
2817
|
-
var NavigationTabLinkSchema2 =
|
|
2818
|
-
title:
|
|
2819
|
-
icon:
|
|
3023
|
+
var NavigationTabLinkSchema2 = z17.object({
|
|
3024
|
+
title: z17.string(),
|
|
3025
|
+
icon: z17.string().optional(),
|
|
2820
3026
|
url: UrlSchema2,
|
|
2821
3027
|
target: LinkTargetSchema.optional()
|
|
2822
3028
|
});
|
|
2823
|
-
var ApiNavigationConfigItemSchema3 =
|
|
2824
|
-
() =>
|
|
2825
|
-
|
|
2826
|
-
type:
|
|
3029
|
+
var ApiNavigationConfigItemSchema3 = z17.lazy(
|
|
3030
|
+
() => z17.discriminatedUnion("type", [
|
|
3031
|
+
z17.object({
|
|
3032
|
+
type: z17.literal("subpackage"),
|
|
2827
3033
|
summaryPageId: PageIdSchema2.optional(),
|
|
2828
3034
|
subpackageId: SubpackageIdSchema2,
|
|
2829
|
-
items:
|
|
3035
|
+
items: z17.array(ApiNavigationConfigItemSchema3)
|
|
2830
3036
|
}),
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
3037
|
+
z17.object({ type: z17.literal("endpointId"), value: EndpointIdSchema2 }),
|
|
3038
|
+
z17.object({ type: z17.literal("websocketId"), value: WebSocketIdSchema2 }),
|
|
3039
|
+
z17.object({ type: z17.literal("webhookId"), value: WebhookIdSchema2 }),
|
|
3040
|
+
z17.object({ type: z17.literal("page"), ...PageMetadataSchema2.shape })
|
|
2835
3041
|
])
|
|
2836
3042
|
);
|
|
2837
|
-
var ApiNavigationConfigSubpackageSchema =
|
|
3043
|
+
var ApiNavigationConfigSubpackageSchema = z17.object({
|
|
2838
3044
|
summaryPageId: PageIdSchema2.optional(),
|
|
2839
3045
|
subpackageId: SubpackageIdSchema2,
|
|
2840
|
-
items:
|
|
3046
|
+
items: z17.array(ApiNavigationConfigItemSchema3)
|
|
2841
3047
|
});
|
|
2842
|
-
var ApiNavigationConfigRootSchema4 =
|
|
3048
|
+
var ApiNavigationConfigRootSchema4 = z17.object({
|
|
2843
3049
|
summaryPageId: PageIdSchema2.optional(),
|
|
2844
|
-
items:
|
|
3050
|
+
items: z17.array(ApiNavigationConfigItemSchema3)
|
|
2845
3051
|
});
|
|
2846
|
-
var ApiSectionSchema2 =
|
|
3052
|
+
var ApiSectionSchema2 = z17.object({
|
|
2847
3053
|
...NavigationNodeMetadataSchema2.shape,
|
|
2848
|
-
title:
|
|
3054
|
+
title: z17.string(),
|
|
2849
3055
|
api: ApiDefinitionIdSchema2,
|
|
2850
|
-
artifacts:
|
|
2851
|
-
sdks:
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
type:
|
|
2855
|
-
packageName:
|
|
2856
|
-
githubRepoName:
|
|
2857
|
-
version:
|
|
3056
|
+
artifacts: z17.object({
|
|
3057
|
+
sdks: z17.array(
|
|
3058
|
+
z17.discriminatedUnion("type", [
|
|
3059
|
+
z17.object({
|
|
3060
|
+
type: z17.literal("npm"),
|
|
3061
|
+
packageName: z17.string(),
|
|
3062
|
+
githubRepoName: z17.string(),
|
|
3063
|
+
version: z17.string()
|
|
2858
3064
|
}),
|
|
2859
|
-
|
|
2860
|
-
type:
|
|
2861
|
-
coordinate:
|
|
2862
|
-
githubRepoName:
|
|
2863
|
-
version:
|
|
3065
|
+
z17.object({
|
|
3066
|
+
type: z17.literal("maven"),
|
|
3067
|
+
coordinate: z17.string(),
|
|
3068
|
+
githubRepoName: z17.string(),
|
|
3069
|
+
version: z17.string()
|
|
2864
3070
|
}),
|
|
2865
|
-
|
|
2866
|
-
type:
|
|
2867
|
-
packageName:
|
|
2868
|
-
githubRepoName:
|
|
2869
|
-
version:
|
|
3071
|
+
z17.object({
|
|
3072
|
+
type: z17.literal("pypi"),
|
|
3073
|
+
packageName: z17.string(),
|
|
3074
|
+
githubRepoName: z17.string(),
|
|
3075
|
+
version: z17.string()
|
|
2870
3076
|
})
|
|
2871
3077
|
])
|
|
2872
3078
|
),
|
|
2873
|
-
postman:
|
|
3079
|
+
postman: z17.object({
|
|
2874
3080
|
url: UrlSchema2,
|
|
2875
|
-
githubRepoName:
|
|
3081
|
+
githubRepoName: z17.string().optional()
|
|
2876
3082
|
}).optional()
|
|
2877
3083
|
}).optional(),
|
|
2878
|
-
skipUrlSlug:
|
|
2879
|
-
showErrors:
|
|
3084
|
+
skipUrlSlug: z17.boolean().optional(),
|
|
3085
|
+
showErrors: z17.boolean().optional(),
|
|
2880
3086
|
changelog: ChangelogSectionSchema2.optional(),
|
|
2881
3087
|
changelogV2: ChangelogSectionV2Schema.optional(),
|
|
2882
3088
|
navigation: ApiNavigationConfigRootSchema4.optional(),
|
|
2883
|
-
longScrolling:
|
|
2884
|
-
flattened:
|
|
3089
|
+
longScrolling: z17.boolean().optional(),
|
|
3090
|
+
flattened: z17.boolean().optional()
|
|
2885
3091
|
});
|
|
2886
|
-
var ApiSectionV2Schema2 =
|
|
2887
|
-
node:
|
|
3092
|
+
var ApiSectionV2Schema2 = z17.object({
|
|
3093
|
+
node: z17.unknown()
|
|
2888
3094
|
});
|
|
2889
|
-
var DocsSectionSchema2 =
|
|
2890
|
-
() =>
|
|
3095
|
+
var DocsSectionSchema2 = z17.lazy(
|
|
3096
|
+
() => z17.object({
|
|
2891
3097
|
...NavigationNodeMetadataSchema2.shape,
|
|
2892
|
-
title:
|
|
2893
|
-
items:
|
|
2894
|
-
collapsed:
|
|
2895
|
-
collapsible:
|
|
2896
|
-
collapsedByDefault:
|
|
2897
|
-
skipUrlSlug:
|
|
3098
|
+
title: z17.string(),
|
|
3099
|
+
items: z17.array(NavigationItemSchema2),
|
|
3100
|
+
collapsed: z17.union([z17.boolean(), z17.literal("open-by-default")]).optional(),
|
|
3101
|
+
collapsible: z17.boolean().optional(),
|
|
3102
|
+
collapsedByDefault: z17.boolean().optional(),
|
|
3103
|
+
skipUrlSlug: z17.boolean().optional(),
|
|
2898
3104
|
overviewPageId: PageIdSchema2.optional()
|
|
2899
3105
|
})
|
|
2900
3106
|
);
|
|
2901
|
-
var NavigationItemSchema2 =
|
|
2902
|
-
() =>
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
type:
|
|
3107
|
+
var NavigationItemSchema2 = z17.lazy(
|
|
3108
|
+
() => z17.discriminatedUnion("type", [
|
|
3109
|
+
z17.object({ type: z17.literal("page"), ...PageMetadataSchema2.shape }),
|
|
3110
|
+
z17.object({ type: z17.literal("api"), ...ApiSectionSchema2.shape }),
|
|
3111
|
+
z17.object({ type: z17.literal("apiV2"), ...ApiSectionV2Schema2.shape }),
|
|
3112
|
+
z17.object({
|
|
3113
|
+
type: z17.literal("section"),
|
|
2908
3114
|
...NavigationNodeMetadataSchema2.shape,
|
|
2909
|
-
title:
|
|
2910
|
-
items:
|
|
2911
|
-
collapsed:
|
|
2912
|
-
collapsible:
|
|
2913
|
-
collapsedByDefault:
|
|
2914
|
-
skipUrlSlug:
|
|
3115
|
+
title: z17.string(),
|
|
3116
|
+
items: z17.array(NavigationItemSchema2),
|
|
3117
|
+
collapsed: z17.union([z17.boolean(), z17.literal("open-by-default")]).optional(),
|
|
3118
|
+
collapsible: z17.boolean().optional(),
|
|
3119
|
+
collapsedByDefault: z17.boolean().optional(),
|
|
3120
|
+
skipUrlSlug: z17.boolean().optional(),
|
|
2915
3121
|
overviewPageId: PageIdSchema2.optional()
|
|
2916
3122
|
}),
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
3123
|
+
z17.object({ type: z17.literal("link"), ...LinkMetadataSchema2.shape }),
|
|
3124
|
+
z17.object({ type: z17.literal("changelog"), ...ChangelogSectionV2Schema.shape }),
|
|
3125
|
+
z17.object({ type: z17.literal("changelogV3"), ...ChangelogSectionV3Schema2.shape })
|
|
2920
3126
|
])
|
|
2921
3127
|
);
|
|
2922
|
-
var NavigationTabGroupSchema2 =
|
|
3128
|
+
var NavigationTabGroupSchema2 = z17.object({
|
|
2923
3129
|
...NavigationNodeMetadataSchema2.shape,
|
|
2924
|
-
title:
|
|
2925
|
-
items:
|
|
2926
|
-
skipUrlSlug:
|
|
2927
|
-
});
|
|
2928
|
-
var NavigationTabSchema2 =
|
|
2929
|
-
var NavigationTabV2Schema =
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
3130
|
+
title: z17.string(),
|
|
3131
|
+
items: z17.array(NavigationItemSchema2),
|
|
3132
|
+
skipUrlSlug: z17.boolean().optional()
|
|
3133
|
+
});
|
|
3134
|
+
var NavigationTabSchema2 = z17.union([NavigationTabGroupSchema2, NavigationTabLinkSchema2]);
|
|
3135
|
+
var NavigationTabV2Schema = z17.discriminatedUnion("type", [
|
|
3136
|
+
z17.object({ type: z17.literal("group"), ...NavigationTabGroupSchema2.shape }),
|
|
3137
|
+
z17.object({ type: z17.literal("link"), ...NavigationTabLinkSchema2.shape }),
|
|
3138
|
+
z17.object({ type: z17.literal("changelog"), ...ChangelogSectionV2Schema.shape }),
|
|
3139
|
+
z17.object({ type: z17.literal("changelogV3"), ...ChangelogSectionV3Schema2.shape })
|
|
2934
3140
|
]);
|
|
2935
|
-
var UnversionedTabbedNavigationConfigSchema2 =
|
|
2936
|
-
tabs:
|
|
2937
|
-
tabsV2:
|
|
3141
|
+
var UnversionedTabbedNavigationConfigSchema2 = z17.object({
|
|
3142
|
+
tabs: z17.array(NavigationTabSchema2).optional(),
|
|
3143
|
+
tabsV2: z17.array(NavigationTabV2Schema).optional(),
|
|
2938
3144
|
landingPage: PageMetadataSchema2.optional()
|
|
2939
3145
|
});
|
|
2940
|
-
var UnversionedUntabbedNavigationConfigSchema2 =
|
|
2941
|
-
items:
|
|
3146
|
+
var UnversionedUntabbedNavigationConfigSchema2 = z17.object({
|
|
3147
|
+
items: z17.array(NavigationItemSchema2),
|
|
2942
3148
|
landingPage: PageMetadataSchema2.optional()
|
|
2943
3149
|
});
|
|
2944
|
-
var UnversionedNavigationConfigSchema2 =
|
|
3150
|
+
var UnversionedNavigationConfigSchema2 = z17.union([
|
|
2945
3151
|
UnversionedTabbedNavigationConfigSchema2,
|
|
2946
3152
|
UnversionedUntabbedNavigationConfigSchema2
|
|
2947
3153
|
]);
|
|
2948
|
-
var VersionedNavigationConfigDataSchema2 =
|
|
3154
|
+
var VersionedNavigationConfigDataSchema2 = z17.object({
|
|
2949
3155
|
version: VersionIdSchema2,
|
|
2950
|
-
urlSlugOverride:
|
|
3156
|
+
urlSlugOverride: z17.string().optional(),
|
|
2951
3157
|
availability: AvailabilitySchema2.optional(),
|
|
2952
3158
|
config: UnversionedNavigationConfigSchema2
|
|
2953
3159
|
});
|
|
2954
|
-
var VersionedNavigationConfigSchema2 =
|
|
2955
|
-
versions:
|
|
3160
|
+
var VersionedNavigationConfigSchema2 = z17.object({
|
|
3161
|
+
versions: z17.array(VersionedNavigationConfigDataSchema2)
|
|
2956
3162
|
});
|
|
2957
|
-
var NavigationConfigSchema2 =
|
|
2958
|
-
var ThemeConfigSchema2 =
|
|
3163
|
+
var NavigationConfigSchema2 = z17.union([UnversionedNavigationConfigSchema2, VersionedNavigationConfigSchema2]);
|
|
3164
|
+
var ThemeConfigSchema2 = z17.object({
|
|
2959
3165
|
logo: FileIdSchema2.optional(),
|
|
2960
3166
|
backgroundImage: FileIdSchema2.optional(),
|
|
2961
3167
|
accentPrimary: RgbaColorSchema,
|
|
@@ -2977,37 +3183,37 @@ var ThemeConfigSchema2 = z14.object({
|
|
|
2977
3183
|
accent11: RgbaColorSchema.optional(),
|
|
2978
3184
|
accent12: RgbaColorSchema.optional()
|
|
2979
3185
|
});
|
|
2980
|
-
var DarkAndLightModeConfigSchema2 =
|
|
3186
|
+
var DarkAndLightModeConfigSchema2 = z17.object({
|
|
2981
3187
|
dark: ThemeConfigSchema2,
|
|
2982
3188
|
light: ThemeConfigSchema2
|
|
2983
3189
|
});
|
|
2984
|
-
var ColorsConfigV3Schema2 =
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
3190
|
+
var ColorsConfigV3Schema2 = z17.discriminatedUnion("type", [
|
|
3191
|
+
z17.object({ type: z17.literal("dark"), ...ThemeConfigSchema2.shape }),
|
|
3192
|
+
z17.object({ type: z17.literal("light"), ...ThemeConfigSchema2.shape }),
|
|
3193
|
+
z17.object({ type: z17.literal("darkAndLight"), ...DarkAndLightModeConfigSchema2.shape })
|
|
2988
3194
|
]);
|
|
2989
|
-
var DocsConfigSchema2 =
|
|
2990
|
-
title:
|
|
3195
|
+
var DocsConfigSchema2 = z17.object({
|
|
3196
|
+
title: z17.string().optional(),
|
|
2991
3197
|
defaultLanguage: ProgrammingLanguageSchema.optional(),
|
|
2992
|
-
languages:
|
|
3198
|
+
languages: z17.array(LanguageSchema).optional(),
|
|
2993
3199
|
translations: DocsTranslationsConfigSchema.optional(),
|
|
2994
|
-
announcement:
|
|
3200
|
+
announcement: z17.object({ text: z17.string() }).optional(),
|
|
2995
3201
|
navigation: NavigationConfigSchema2.optional(),
|
|
2996
|
-
root:
|
|
2997
|
-
navbarLinks:
|
|
2998
|
-
footerLinks:
|
|
2999
|
-
hideNavLinks:
|
|
3202
|
+
root: z17.custom().optional(),
|
|
3203
|
+
navbarLinks: z17.array(NavbarLinkSchema).optional(),
|
|
3204
|
+
footerLinks: z17.array(FooterLinkSchema).optional(),
|
|
3205
|
+
hideNavLinks: z17.boolean().optional(),
|
|
3000
3206
|
logoHeight: HeightSchema2.optional(),
|
|
3001
3207
|
logoHref: UrlSchema2.optional(),
|
|
3002
|
-
logoRightText:
|
|
3208
|
+
logoRightText: z17.string().optional(),
|
|
3003
3209
|
favicon: FileIdSchema2.optional(),
|
|
3004
3210
|
agents: AgentsConfigSchema.optional(),
|
|
3005
3211
|
metadata: MetadataConfigSchema.optional(),
|
|
3006
|
-
redirects:
|
|
3212
|
+
redirects: z17.array(RedirectConfigSchema).optional(),
|
|
3007
3213
|
colorsV3: ColorsConfigV3Schema2.optional(),
|
|
3008
3214
|
layout: DocsLayoutConfigSchema.optional(),
|
|
3009
3215
|
theme: DocsThemeConfigSchema.optional(),
|
|
3010
|
-
globalTheme:
|
|
3216
|
+
globalTheme: z17.string().optional(),
|
|
3011
3217
|
settings: DocsSettingsConfigSchema.optional(),
|
|
3012
3218
|
typographyV2: DocsTypographyConfigV2Schema.optional(),
|
|
3013
3219
|
analyticsConfig: AnalyticsConfigSchema.optional(),
|
|
@@ -3017,8 +3223,8 @@ var DocsConfigSchema2 = z14.object({
|
|
|
3017
3223
|
aiChatConfig: AIChatConfigSchema.optional(),
|
|
3018
3224
|
pageActions: PageActionsConfigSchema.optional(),
|
|
3019
3225
|
editThisPageLaunch: EditThisPageLaunchSchema.optional(),
|
|
3020
|
-
header:
|
|
3021
|
-
footer:
|
|
3226
|
+
header: z17.string().optional(),
|
|
3227
|
+
footer: z17.string().optional(),
|
|
3022
3228
|
backgroundImage: FileIdSchema2.optional(),
|
|
3023
3229
|
logoV2: ThemedFileIdSchema.optional(),
|
|
3024
3230
|
logo: FileIdSchema2.optional(),
|
|
@@ -3026,397 +3232,153 @@ var DocsConfigSchema2 = z14.object({
|
|
|
3026
3232
|
colorsV2: ColorsConfigV2Schema.optional(),
|
|
3027
3233
|
typography: DocsTypographyConfigSchema.optional()
|
|
3028
3234
|
});
|
|
3029
|
-
var DocsDefinitionSchema2 =
|
|
3030
|
-
pages:
|
|
3235
|
+
var DocsDefinitionSchema2 = z17.object({
|
|
3236
|
+
pages: z17.record(PageIdSchema2, PageContentSchema2),
|
|
3031
3237
|
config: DocsConfigSchema2,
|
|
3032
|
-
jsFiles:
|
|
3033
|
-
});
|
|
3034
|
-
var NpmPackageSchema2 =
|
|
3035
|
-
packageName:
|
|
3036
|
-
githubRepoName:
|
|
3037
|
-
version:
|
|
3038
|
-
});
|
|
3039
|
-
var MavenPackageSchema2 =
|
|
3040
|
-
coordinate:
|
|
3041
|
-
githubRepoName:
|
|
3042
|
-
version:
|
|
3043
|
-
});
|
|
3044
|
-
var PypiPackageSchema2 =
|
|
3045
|
-
packageName:
|
|
3046
|
-
githubRepoName:
|
|
3047
|
-
version:
|
|
3048
|
-
});
|
|
3049
|
-
var PublishedSdkSchema2 =
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3238
|
+
jsFiles: z17.record(z17.string(), z17.string()).optional()
|
|
3239
|
+
});
|
|
3240
|
+
var NpmPackageSchema2 = z17.object({
|
|
3241
|
+
packageName: z17.string(),
|
|
3242
|
+
githubRepoName: z17.string(),
|
|
3243
|
+
version: z17.string()
|
|
3244
|
+
});
|
|
3245
|
+
var MavenPackageSchema2 = z17.object({
|
|
3246
|
+
coordinate: z17.string(),
|
|
3247
|
+
githubRepoName: z17.string(),
|
|
3248
|
+
version: z17.string()
|
|
3249
|
+
});
|
|
3250
|
+
var PypiPackageSchema2 = z17.object({
|
|
3251
|
+
packageName: z17.string(),
|
|
3252
|
+
githubRepoName: z17.string(),
|
|
3253
|
+
version: z17.string()
|
|
3254
|
+
});
|
|
3255
|
+
var PublishedSdkSchema2 = z17.discriminatedUnion("type", [
|
|
3256
|
+
z17.object({ type: z17.literal("npm"), ...NpmPackageSchema2.shape }),
|
|
3257
|
+
z17.object({ type: z17.literal("maven"), ...MavenPackageSchema2.shape }),
|
|
3258
|
+
z17.object({ type: z17.literal("pypi"), ...PypiPackageSchema2.shape })
|
|
3053
3259
|
]);
|
|
3054
|
-
var PublishedPostmanCollectionSchema2 =
|
|
3260
|
+
var PublishedPostmanCollectionSchema2 = z17.object({
|
|
3055
3261
|
url: UrlSchema2,
|
|
3056
|
-
githubRepoName:
|
|
3262
|
+
githubRepoName: z17.string().optional()
|
|
3057
3263
|
});
|
|
3058
|
-
var ApiArtifactsSchema2 =
|
|
3059
|
-
sdks:
|
|
3264
|
+
var ApiArtifactsSchema2 = z17.object({
|
|
3265
|
+
sdks: z17.array(PublishedSdkSchema2),
|
|
3060
3266
|
postman: PublishedPostmanCollectionSchema2.optional()
|
|
3061
3267
|
});
|
|
3062
|
-
var InvalidCustomDomainErrorBodySchema =
|
|
3063
|
-
overlappingDomains:
|
|
3064
|
-
});
|
|
3065
|
-
var OverlappingCustomDomainsSchema = z14.array(z14.string());
|
|
3066
|
-
|
|
3067
|
-
// src/orpc-client/docs/v1/write/contract.ts
|
|
3068
|
-
var StartDocsRegisterV1InputSchema = z15.object({
|
|
3069
|
-
orgId: z15.string(),
|
|
3070
|
-
domain: z15.string(),
|
|
3071
|
-
filepaths: z15.array(z15.string())
|
|
3072
|
-
});
|
|
3073
|
-
var StartDocsRegisterV1ResponseSchema = z15.object({
|
|
3074
|
-
docsRegistrationId: z15.string(),
|
|
3075
|
-
uploadUrls: z15.record(z15.string(), FileS3UploadUrlSchema),
|
|
3076
|
-
skippedFiles: z15.array(z15.string())
|
|
3077
|
-
});
|
|
3078
|
-
var FinishDocsRegisterV1InputSchema = z15.object({
|
|
3079
|
-
docsRegistrationId: z15.string(),
|
|
3080
|
-
docsDefinition: z15.unknown()
|
|
3081
|
-
});
|
|
3082
|
-
var docsV1WriteContract = {
|
|
3083
|
-
startDocsRegister: oc5.route({ method: "POST", path: "/init" }).input(StartDocsRegisterV1InputSchema).output(StartDocsRegisterV1ResponseSchema),
|
|
3084
|
-
finishDocsRegister: oc5.route({ method: "POST", path: "/register/{docsRegistrationId}" }).input(FinishDocsRegisterV1InputSchema).output(z15.void())
|
|
3085
|
-
};
|
|
3086
|
-
|
|
3087
|
-
// src/orpc-client/docs/v1/write/client.ts
|
|
3088
|
-
function createDocsV1WriteClient(options) {
|
|
3089
|
-
const link = new OpenAPILink4(docsV1WriteContract, {
|
|
3090
|
-
url: `${options.baseUrl}/registry/docs`,
|
|
3091
|
-
headers: () => ({
|
|
3092
|
-
Authorization: `Bearer ${options.token}`,
|
|
3093
|
-
...options.headers
|
|
3094
|
-
}),
|
|
3095
|
-
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
3096
|
-
});
|
|
3097
|
-
return createORPCClient4(link);
|
|
3098
|
-
}
|
|
3099
|
-
|
|
3100
|
-
// src/orpc-client/docs/v2/library-docs/client.ts
|
|
3101
|
-
import { createORPCClient as createORPCClient5 } from "@orpc/client";
|
|
3102
|
-
import { OpenAPILink as OpenAPILink5 } from "@orpc/openapi-client/fetch";
|
|
3103
|
-
|
|
3104
|
-
// src/orpc-client/docs/v2/library-docs/contract.ts
|
|
3105
|
-
import { oc as oc6 } from "@orpc/contract";
|
|
3106
|
-
import * as z16 from "zod";
|
|
3107
|
-
var ALLOWED_HOSTNAMES = /* @__PURE__ */ new Set(["github.com", "gitlab.com"]);
|
|
3108
|
-
var GithubUrlSchema = z16.string().url().describe(
|
|
3109
|
-
"HTTPS URL of a GitHub or GitLab repository. Currently only github.com and gitlab.com are supported. Must match the pattern https://github.com/<owner>/<repo> or https://gitlab.com/<owner>/<repo>."
|
|
3110
|
-
).refine(
|
|
3111
|
-
(url) => {
|
|
3112
|
-
try {
|
|
3113
|
-
const parsed = new URL(url);
|
|
3114
|
-
if (parsed.protocol !== "https:") {
|
|
3115
|
-
return false;
|
|
3116
|
-
}
|
|
3117
|
-
if (!ALLOWED_HOSTNAMES.has(parsed.hostname)) {
|
|
3118
|
-
return false;
|
|
3119
|
-
}
|
|
3120
|
-
if (parsed.username || parsed.password) {
|
|
3121
|
-
return false;
|
|
3122
|
-
}
|
|
3123
|
-
return /^\/[\w.-]+\/[\w.-]+(?:\.git)?\/?$/.test(parsed.pathname);
|
|
3124
|
-
} catch {
|
|
3125
|
-
return false;
|
|
3126
|
-
}
|
|
3127
|
-
},
|
|
3128
|
-
{ message: "Must be a valid https://github.com/<owner>/<repo> or https://gitlab.com/<owner>/<repo> URL" }
|
|
3129
|
-
);
|
|
3130
|
-
var SafeBranchSchema = z16.string().regex(/^[a-zA-Z0-9._/-]+$/, "Invalid branch name").nullish();
|
|
3131
|
-
var SafePackagePathSchema = z16.string().refine((p) => !p.includes("..") && !p.startsWith("/"), {
|
|
3132
|
-
message: "packagePath must not contain path traversal sequences"
|
|
3133
|
-
}).nullish();
|
|
3134
|
-
var LibraryDocsBaseConfigSchema = z16.object({
|
|
3135
|
-
branch: SafeBranchSchema,
|
|
3136
|
-
packagePath: SafePackagePathSchema,
|
|
3137
|
-
title: z16.string().nullish(),
|
|
3138
|
-
slug: z16.string().nullish()
|
|
3139
|
-
});
|
|
3140
|
-
var PythonLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema;
|
|
3141
|
-
var CppLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema.extend({
|
|
3142
|
-
doxyfileContent: z16.string().nullish()
|
|
3143
|
-
});
|
|
3144
|
-
var StartLibraryDocsGenerationInputSchema = z16.discriminatedUnion("language", [
|
|
3145
|
-
z16.object({
|
|
3146
|
-
orgId: z16.string(),
|
|
3147
|
-
githubUrl: GithubUrlSchema,
|
|
3148
|
-
language: z16.literal("PYTHON"),
|
|
3149
|
-
config: PythonLibraryDocsConfigSchema.nullish()
|
|
3150
|
-
}),
|
|
3151
|
-
z16.object({
|
|
3152
|
-
orgId: z16.string(),
|
|
3153
|
-
githubUrl: GithubUrlSchema,
|
|
3154
|
-
language: z16.literal("CPP"),
|
|
3155
|
-
config: CppLibraryDocsConfigSchema.nullish()
|
|
3156
|
-
})
|
|
3157
|
-
]);
|
|
3158
|
-
var StartLibraryDocsGenerationResponseSchema = z16.object({
|
|
3159
|
-
jobId: z16.string()
|
|
3160
|
-
});
|
|
3161
|
-
var GetLibraryDocsStatusInputSchema = z16.object({
|
|
3162
|
-
jobId: z16.string()
|
|
3163
|
-
});
|
|
3164
|
-
var LibraryDocsResultSchema = z16.object({
|
|
3165
|
-
jobId: z16.string(),
|
|
3166
|
-
resultUrl: z16.string()
|
|
3167
|
-
});
|
|
3168
|
-
var LibraryDocsGenerationStatusSchema = z16.object({
|
|
3169
|
-
jobId: z16.string(),
|
|
3170
|
-
status: z16.string(),
|
|
3171
|
-
progress: z16.string(),
|
|
3172
|
-
error: z16.object({
|
|
3173
|
-
code: z16.string(),
|
|
3174
|
-
message: z16.string()
|
|
3175
|
-
}).optional(),
|
|
3176
|
-
createdAt: z16.string(),
|
|
3177
|
-
updatedAt: z16.string()
|
|
3178
|
-
});
|
|
3179
|
-
var libraryDocsContract = {
|
|
3180
|
-
startLibraryDocsGeneration: oc6.route({ method: "POST", path: "/library-docs/generate" }).input(StartLibraryDocsGenerationInputSchema).output(StartLibraryDocsGenerationResponseSchema),
|
|
3181
|
-
getLibraryDocsGenerationStatus: oc6.route({ method: "GET", path: "/library-docs/status/{jobId}" }).input(GetLibraryDocsStatusInputSchema).output(LibraryDocsGenerationStatusSchema),
|
|
3182
|
-
getLibraryDocsResult: oc6.route({ method: "GET", path: "/library-docs/result/{jobId}" }).input(GetLibraryDocsStatusInputSchema).output(LibraryDocsResultSchema)
|
|
3183
|
-
};
|
|
3184
|
-
|
|
3185
|
-
// src/orpc-client/docs/v2/library-docs/client.ts
|
|
3186
|
-
function createLibraryDocsClient(options) {
|
|
3187
|
-
const link = new OpenAPILink5(libraryDocsContract, {
|
|
3188
|
-
url: `${options.baseUrl}/v2/registry/docs`,
|
|
3189
|
-
headers: () => ({
|
|
3190
|
-
Authorization: `Bearer ${options.token}`,
|
|
3191
|
-
...options.headers
|
|
3192
|
-
}),
|
|
3193
|
-
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
3194
|
-
});
|
|
3195
|
-
return createORPCClient5(link);
|
|
3196
|
-
}
|
|
3197
|
-
|
|
3198
|
-
// src/orpc-client/docs/v2/organization/client.ts
|
|
3199
|
-
import { createORPCClient as createORPCClient6 } from "@orpc/client";
|
|
3200
|
-
import { OpenAPILink as OpenAPILink6 } from "@orpc/openapi-client/fetch";
|
|
3201
|
-
|
|
3202
|
-
// src/orpc-client/docs/v2/organization/contract.ts
|
|
3203
|
-
import { oc as oc7 } from "@orpc/contract";
|
|
3204
|
-
import * as z17 from "zod";
|
|
3205
|
-
var GetOrganizationForUrlInputSchema = z17.object({
|
|
3206
|
-
url: z17.string()
|
|
3207
|
-
});
|
|
3208
|
-
var organizationContract = {
|
|
3209
|
-
getOrganizationForUrl: oc7.route({ method: "POST", path: "/organization-for-url" }).input(GetOrganizationForUrlInputSchema).output(z17.string())
|
|
3210
|
-
};
|
|
3211
|
-
|
|
3212
|
-
// src/orpc-client/docs/v2/organization/client.ts
|
|
3213
|
-
function createOrganizationClient(options) {
|
|
3214
|
-
const link = new OpenAPILink6(organizationContract, {
|
|
3215
|
-
url: `${options.baseUrl}/v2/registry/docs`,
|
|
3216
|
-
headers: () => ({
|
|
3217
|
-
Authorization: `Bearer ${options.token}`,
|
|
3218
|
-
...options.headers
|
|
3219
|
-
}),
|
|
3220
|
-
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
3221
|
-
});
|
|
3222
|
-
return createORPCClient6(link);
|
|
3223
|
-
}
|
|
3224
|
-
|
|
3225
|
-
// src/orpc-client/docs/v2/read/client.ts
|
|
3226
|
-
import { createORPCClient as createORPCClient7 } from "@orpc/client";
|
|
3227
|
-
import { OpenAPILink as OpenAPILink7 } from "@orpc/openapi-client/fetch";
|
|
3228
|
-
|
|
3229
|
-
// src/orpc-client/docs/v2/read/contract.ts
|
|
3230
|
-
import { oc as oc8 } from "@orpc/contract";
|
|
3231
|
-
import * as z18 from "zod";
|
|
3232
|
-
var GetDocsUrlMetadataInputSchema = z18.object({
|
|
3233
|
-
url: z18.string()
|
|
3234
|
-
});
|
|
3235
|
-
var GetDocsUrlMetadataResponseSchema = z18.object({
|
|
3236
|
-
isPreviewUrl: z18.boolean(),
|
|
3237
|
-
org: z18.string(),
|
|
3238
|
-
url: z18.string(),
|
|
3239
|
-
gitUrl: z18.string().nullish(),
|
|
3240
|
-
enableAlgoliaOnPreview: z18.boolean().nullish()
|
|
3241
|
-
});
|
|
3242
|
-
var GetDocsForUrlInputSchema = z18.object({
|
|
3243
|
-
url: z18.string(),
|
|
3244
|
-
excludeApis: z18.boolean().nullish()
|
|
3245
|
-
});
|
|
3246
|
-
var GetPrivateDocsForUrlInputSchema = z18.object({
|
|
3247
|
-
url: z18.string()
|
|
3248
|
-
});
|
|
3249
|
-
var ListAllDocsUrlsInputSchema = z18.object({
|
|
3250
|
-
limit: z18.number().nullish(),
|
|
3251
|
-
page: z18.number().nullish(),
|
|
3252
|
-
custom: z18.boolean().nullish(),
|
|
3253
|
-
preview: z18.boolean().nullish()
|
|
3254
|
-
});
|
|
3255
|
-
var GetDocsConfigByIdInputSchema = z18.object({
|
|
3256
|
-
docsConfigId: z18.string()
|
|
3257
|
-
});
|
|
3258
|
-
var GetDocsConfigByIdResponseSchema = z18.object({
|
|
3259
|
-
docsConfig: DocsConfigSchema,
|
|
3260
|
-
apis: z18.record(z18.string(), z18.unknown())
|
|
3261
|
-
});
|
|
3262
|
-
var DocsDomainItemSchema = z18.object({
|
|
3263
|
-
domain: z18.string(),
|
|
3264
|
-
basePath: z18.string().optional(),
|
|
3265
|
-
organizationId: z18.string(),
|
|
3266
|
-
updatedAt: z18.string()
|
|
3267
|
-
});
|
|
3268
|
-
var ListAllDocsUrlsResponseSchema = z18.object({
|
|
3269
|
-
urls: z18.array(DocsDomainItemSchema)
|
|
3268
|
+
var InvalidCustomDomainErrorBodySchema = z17.object({
|
|
3269
|
+
overlappingDomains: z17.array(z17.array(z17.string()))
|
|
3270
3270
|
});
|
|
3271
|
-
var
|
|
3272
|
-
((getDocsForUrl2) => {
|
|
3273
|
-
let Error;
|
|
3274
|
-
((Error2) => {
|
|
3275
|
-
function _unknown(fetcherError) {
|
|
3276
|
-
return { error: void 0, content: fetcherError };
|
|
3277
|
-
}
|
|
3278
|
-
Error2._unknown = _unknown;
|
|
3279
|
-
})(Error = getDocsForUrl2.Error || (getDocsForUrl2.Error = {}));
|
|
3280
|
-
})(getDocsForUrl || (getDocsForUrl = {}));
|
|
3281
|
-
var docsV2ReadContract = {
|
|
3282
|
-
getDocsUrlMetadata: oc8.route({ method: "POST", path: "/metadata-for-url" }).input(GetDocsUrlMetadataInputSchema).output(GetDocsUrlMetadataResponseSchema),
|
|
3283
|
-
getDocsForUrl: oc8.route({ method: "POST", path: "/load-with-url" }).input(GetDocsForUrlInputSchema).output(LoadDocsForUrlResponseSchema),
|
|
3284
|
-
getPrivateDocsForUrl: oc8.route({ method: "POST", path: "/private/load-with-url" }).input(GetPrivateDocsForUrlInputSchema).output(LoadDocsForUrlResponseSchema),
|
|
3285
|
-
listAllDocsUrls: oc8.route({ method: "GET", path: "/urls/list" }).input(ListAllDocsUrlsInputSchema).output(ListAllDocsUrlsResponseSchema),
|
|
3286
|
-
getDocsConfigById: oc8.route({ method: "GET", path: "/{docsConfigId}" }).input(GetDocsConfigByIdInputSchema).output(GetDocsConfigByIdResponseSchema),
|
|
3287
|
-
prepopulateFdrReadS3Bucket: oc8.route({ method: "POST", path: "/prepopulate-s3-bucket" }).output(z18.void()),
|
|
3288
|
-
ensureDocsInS3: oc8.route({ method: "POST", path: "/ensure-docs-in-s3" }).output(z18.void()),
|
|
3289
|
-
getDocsFields: oc8.route({ method: "POST", path: "/load-fields" }).output(z18.void())
|
|
3290
|
-
};
|
|
3291
|
-
|
|
3292
|
-
// src/orpc-client/docs/v2/read/client.ts
|
|
3293
|
-
function createDocsV2ReadClient(options) {
|
|
3294
|
-
const link = new OpenAPILink7(docsV2ReadContract, {
|
|
3295
|
-
url: `${options.baseUrl}/v2/registry/docs`,
|
|
3296
|
-
headers: () => ({
|
|
3297
|
-
Authorization: `Bearer ${options.token}`,
|
|
3298
|
-
...options.headers
|
|
3299
|
-
}),
|
|
3300
|
-
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
3301
|
-
});
|
|
3302
|
-
return createORPCClient7(link);
|
|
3303
|
-
}
|
|
3304
|
-
|
|
3305
|
-
// src/orpc-client/docs/v2/write/client.ts
|
|
3306
|
-
import { createORPCClient as createORPCClient8 } from "@orpc/client";
|
|
3307
|
-
import { OpenAPILink as OpenAPILink8 } from "@orpc/openapi-client/fetch";
|
|
3271
|
+
var OverlappingCustomDomainsSchema = z17.array(z17.string());
|
|
3308
3272
|
|
|
3309
3273
|
// src/orpc-client/docs/v2/write/contract.ts
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
var FilePathSchema2 = z19.string();
|
|
3313
|
-
var FilePathInputSchema = z19.union([
|
|
3274
|
+
var FilePathSchema2 = z18.string();
|
|
3275
|
+
var FilePathInputSchema = z18.union([
|
|
3314
3276
|
FilePathSchema2,
|
|
3315
|
-
|
|
3277
|
+
z18.object({ path: FilePathSchema2, fileHash: z18.string().nullish() })
|
|
3316
3278
|
]);
|
|
3317
|
-
var ImageFilePathSchema =
|
|
3279
|
+
var ImageFilePathSchema = z18.object({
|
|
3318
3280
|
filePath: FilePathSchema2,
|
|
3319
|
-
width:
|
|
3320
|
-
height:
|
|
3321
|
-
blurDataUrl:
|
|
3322
|
-
alt:
|
|
3323
|
-
fileHash:
|
|
3324
|
-
});
|
|
3325
|
-
var AuthConfigSchema = z19.object({
|
|
3326
|
-
type: z19.string()
|
|
3327
|
-
});
|
|
3328
|
-
var StartDocsRegisterV2InputSchema = z19.object({
|
|
3329
|
-
orgId: z19.string(),
|
|
3330
|
-
domain: z19.string(),
|
|
3331
|
-
customDomains: z19.array(z19.string()),
|
|
3332
|
-
filepaths: z19.array(FilePathInputSchema),
|
|
3333
|
-
images: z19.array(ImageFilePathSchema).nullish(),
|
|
3334
|
-
authConfig: AuthConfigSchema.nullish()
|
|
3335
|
-
});
|
|
3336
|
-
var StartDocsRegisterV2ResponseSchema = z19.object({
|
|
3337
|
-
docsRegistrationId: z19.string(),
|
|
3338
|
-
uploadUrls: z19.record(z19.string(), FileS3UploadUrlSchema),
|
|
3339
|
-
skippedFiles: z19.array(z19.string())
|
|
3281
|
+
width: z18.number(),
|
|
3282
|
+
height: z18.number(),
|
|
3283
|
+
blurDataUrl: z18.string().nullish(),
|
|
3284
|
+
alt: z18.string().nullish(),
|
|
3285
|
+
fileHash: z18.string().nullish()
|
|
3340
3286
|
});
|
|
3341
|
-
var
|
|
3342
|
-
|
|
3343
|
-
filepaths: z19.array(FilePathInputSchema),
|
|
3344
|
-
basePath: z19.string().nullish(),
|
|
3345
|
-
images: z19.array(ImageFilePathSchema).nullish(),
|
|
3346
|
-
authConfig: AuthConfigSchema.nullish(),
|
|
3347
|
-
previewId: z19.string().nullish()
|
|
3287
|
+
var AuthConfigSchema = z18.object({
|
|
3288
|
+
type: z18.string()
|
|
3348
3289
|
});
|
|
3349
|
-
var
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3290
|
+
var StartDocsRegisterV2InputSchema = z18.object({
|
|
3291
|
+
orgId: z18.string(),
|
|
3292
|
+
domain: z18.string(),
|
|
3293
|
+
customDomains: z18.array(z18.string()),
|
|
3294
|
+
filepaths: z18.array(FilePathInputSchema),
|
|
3295
|
+
images: z18.array(ImageFilePathSchema).nullish(),
|
|
3296
|
+
authConfig: AuthConfigSchema.nullish()
|
|
3354
3297
|
});
|
|
3355
|
-
var
|
|
3356
|
-
docsRegistrationId:
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
excludeApis: z19.boolean().nullish(),
|
|
3360
|
-
basepathAware: z19.boolean().nullish()
|
|
3298
|
+
var StartDocsRegisterV2ResponseSchema = z18.object({
|
|
3299
|
+
docsRegistrationId: z18.string(),
|
|
3300
|
+
uploadUrls: z18.record(z18.string(), FileS3UploadUrlSchema),
|
|
3301
|
+
skippedFiles: z18.array(z18.string())
|
|
3361
3302
|
});
|
|
3362
|
-
var
|
|
3363
|
-
|
|
3364
|
-
|
|
3303
|
+
var StartDocsPreviewRegisterInputSchema = z18.object({
|
|
3304
|
+
orgId: z18.string(),
|
|
3305
|
+
filepaths: z18.array(FilePathInputSchema),
|
|
3306
|
+
basePath: z18.string().nullish(),
|
|
3307
|
+
images: z18.array(ImageFilePathSchema).nullish(),
|
|
3308
|
+
authConfig: AuthConfigSchema.nullish(),
|
|
3309
|
+
previewId: z18.string().nullish()
|
|
3310
|
+
});
|
|
3311
|
+
var StartDocsPreviewRegisterResponseSchema = z18.object({
|
|
3312
|
+
docsRegistrationId: z18.string(),
|
|
3313
|
+
uploadUrls: z18.record(z18.string(), FileS3UploadUrlSchema),
|
|
3314
|
+
skippedFiles: z18.array(z18.string()),
|
|
3315
|
+
previewUrl: z18.string()
|
|
3316
|
+
});
|
|
3317
|
+
var FinishDocsRegisterV2InputSchema = z18.object({
|
|
3318
|
+
docsRegistrationId: z18.string(),
|
|
3319
|
+
docsDefinition: z18.unknown(),
|
|
3320
|
+
libraryDocs: z18.unknown().nullish(),
|
|
3321
|
+
excludeApis: z18.boolean().nullish(),
|
|
3322
|
+
basepathAware: z18.boolean().nullish()
|
|
3323
|
+
});
|
|
3324
|
+
var TransferOwnershipInputSchema = z18.object({
|
|
3325
|
+
domain: z18.string(),
|
|
3326
|
+
toOrgId: z18.string()
|
|
3365
3327
|
});
|
|
3366
|
-
var SetIsArchivedInputSchema =
|
|
3367
|
-
url:
|
|
3368
|
-
isArchived:
|
|
3328
|
+
var SetIsArchivedInputSchema = z18.object({
|
|
3329
|
+
url: z18.string(),
|
|
3330
|
+
isArchived: z18.boolean()
|
|
3369
3331
|
});
|
|
3370
|
-
var SetDocsUrlMetadataInputSchema =
|
|
3371
|
-
url:
|
|
3372
|
-
githubUrl:
|
|
3332
|
+
var SetDocsUrlMetadataInputSchema = z18.object({
|
|
3333
|
+
url: z18.string(),
|
|
3334
|
+
githubUrl: z18.string().nullish()
|
|
3373
3335
|
});
|
|
3374
|
-
var AlgoliaDomainInputSchema =
|
|
3375
|
-
domain:
|
|
3336
|
+
var AlgoliaDomainInputSchema = z18.object({
|
|
3337
|
+
domain: z18.string()
|
|
3376
3338
|
});
|
|
3377
|
-
var ListAlgoliaPreviewWhitelistResponseSchema =
|
|
3378
|
-
domains:
|
|
3339
|
+
var ListAlgoliaPreviewWhitelistResponseSchema = z18.object({
|
|
3340
|
+
domains: z18.array(z18.string())
|
|
3379
3341
|
});
|
|
3380
|
-
var DeleteDocsSiteInputSchema =
|
|
3381
|
-
url:
|
|
3342
|
+
var DeleteDocsSiteInputSchema = z18.object({
|
|
3343
|
+
url: z18.string()
|
|
3382
3344
|
});
|
|
3383
|
-
var RemoveCustomDomainAliasInputSchema =
|
|
3345
|
+
var RemoveCustomDomainAliasInputSchema = z18.object({
|
|
3384
3346
|
/** The custom-domain URL to remove (e.g. `docs.example.com` or `docs.example.com/api`). */
|
|
3385
|
-
url:
|
|
3347
|
+
url: z18.string()
|
|
3386
3348
|
});
|
|
3387
|
-
var Bcp47LocaleSchema2 =
|
|
3349
|
+
var Bcp47LocaleSchema2 = z18.string().regex(
|
|
3388
3350
|
/^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$/,
|
|
3389
3351
|
"Locale must be a valid BCP 47 language tag (e.g. 'en', 'fr', 'pt-BR', 'zh-Hans-CN')"
|
|
3390
3352
|
);
|
|
3391
|
-
var RegisterTranslationInputSchema =
|
|
3392
|
-
domain:
|
|
3353
|
+
var RegisterTranslationInputSchema = z18.object({
|
|
3354
|
+
domain: z18.string(),
|
|
3393
3355
|
/**
|
|
3394
3356
|
* Custom domains that share the docs registration with `domain`. The translation
|
|
3395
3357
|
* blob is written to S3 once per URL (fern URL + each custom domain), mirroring
|
|
3396
3358
|
* the fan-out shape of `finishDocsRegister`. Without this, requests to a custom
|
|
3397
3359
|
* domain hit the translation S3 path under the fern URL prefix and 404.
|
|
3398
3360
|
*/
|
|
3399
|
-
customDomains:
|
|
3400
|
-
orgId:
|
|
3361
|
+
customDomains: z18.array(z18.string()).optional().default([]),
|
|
3362
|
+
orgId: z18.string(),
|
|
3401
3363
|
/** BCP 47 language tag identifying the locale for this translation. */
|
|
3402
3364
|
locale: Bcp47LocaleSchema2,
|
|
3403
3365
|
/** The full docs definition for this locale, same structure as finishDocsRegister. */
|
|
3404
|
-
docsDefinition:
|
|
3366
|
+
docsDefinition: z18.unknown()
|
|
3405
3367
|
});
|
|
3406
|
-
var RegisterTranslationResponseSchema =
|
|
3407
|
-
locale:
|
|
3368
|
+
var RegisterTranslationResponseSchema = z18.object({
|
|
3369
|
+
locale: z18.string()
|
|
3408
3370
|
});
|
|
3409
3371
|
var docsV2WriteContract = {
|
|
3410
|
-
startDocsRegister:
|
|
3411
|
-
startDocsPreviewRegister:
|
|
3412
|
-
finishDocsRegister:
|
|
3413
|
-
transferOwnershipOfDomain:
|
|
3414
|
-
setIsArchived:
|
|
3415
|
-
setDocsUrlMetadata:
|
|
3416
|
-
addAlgoliaPreviewWhitelistEntry:
|
|
3417
|
-
removeAlgoliaPreviewWhitelistEntry:
|
|
3418
|
-
listAlgoliaPreviewWhitelist:
|
|
3419
|
-
deleteDocsSite:
|
|
3372
|
+
startDocsRegister: oc8.route({ method: "POST", path: "/v2/init" }).input(StartDocsRegisterV2InputSchema).output(StartDocsRegisterV2ResponseSchema),
|
|
3373
|
+
startDocsPreviewRegister: oc8.route({ method: "POST", path: "/preview/init" }).input(StartDocsPreviewRegisterInputSchema).output(StartDocsPreviewRegisterResponseSchema),
|
|
3374
|
+
finishDocsRegister: oc8.route({ method: "POST", path: "/register/{docsRegistrationId}" }).input(FinishDocsRegisterV2InputSchema).output(z18.void()),
|
|
3375
|
+
transferOwnershipOfDomain: oc8.route({ method: "POST", path: "/transfer-ownership" }).input(TransferOwnershipInputSchema).output(z18.void()),
|
|
3376
|
+
setIsArchived: oc8.route({ method: "POST", path: "/set-is-archived" }).input(SetIsArchivedInputSchema).output(z18.void()),
|
|
3377
|
+
setDocsUrlMetadata: oc8.route({ method: "POST", path: "/set-metadata-for-url" }).input(SetDocsUrlMetadataInputSchema).output(z18.void()),
|
|
3378
|
+
addAlgoliaPreviewWhitelistEntry: oc8.route({ method: "POST", path: "/algolia-preview-whitelist/add" }).input(AlgoliaDomainInputSchema).output(z18.void()),
|
|
3379
|
+
removeAlgoliaPreviewWhitelistEntry: oc8.route({ method: "POST", path: "/algolia-preview-whitelist/remove" }).input(AlgoliaDomainInputSchema).output(z18.void()),
|
|
3380
|
+
listAlgoliaPreviewWhitelist: oc8.route({ method: "GET", path: "/algolia-preview-whitelist/list" }).output(ListAlgoliaPreviewWhitelistResponseSchema),
|
|
3381
|
+
deleteDocsSite: oc8.route({ method: "POST", path: "/delete" }).input(DeleteDocsSiteInputSchema).output(z18.void()),
|
|
3420
3382
|
/**
|
|
3421
3383
|
* Removes a single custom-domain alias from a docs site, leaving the
|
|
3422
3384
|
* Fern-URL sibling intact. Use this when un-binding a custom domain
|
|
@@ -3425,13 +3387,13 @@ var docsV2WriteContract = {
|
|
|
3425
3387
|
*
|
|
3426
3388
|
* Idempotent: succeeds with no-op if the URL is not registered.
|
|
3427
3389
|
*/
|
|
3428
|
-
removeCustomDomainAlias:
|
|
3429
|
-
registerTranslation:
|
|
3390
|
+
removeCustomDomainAlias: oc8.route({ method: "POST", path: "/remove-custom-domain-alias" }).input(RemoveCustomDomainAliasInputSchema).output(z18.void()),
|
|
3391
|
+
registerTranslation: oc8.route({ method: "POST", path: "/translations/register" }).input(RegisterTranslationInputSchema).output(RegisterTranslationResponseSchema)
|
|
3430
3392
|
};
|
|
3431
3393
|
|
|
3432
3394
|
// src/orpc-client/docs/v2/write/client.ts
|
|
3433
3395
|
function createDocsV2WriteClient(options) {
|
|
3434
|
-
const link = new
|
|
3396
|
+
const link = new OpenAPILink7(docsV2WriteContract, {
|
|
3435
3397
|
url: `${options.baseUrl}/v2/registry/docs`,
|
|
3436
3398
|
headers: () => ({
|
|
3437
3399
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -3439,15 +3401,14 @@ function createDocsV2WriteClient(options) {
|
|
|
3439
3401
|
}),
|
|
3440
3402
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
3441
3403
|
});
|
|
3442
|
-
return
|
|
3404
|
+
return createORPCClient7(link);
|
|
3443
3405
|
}
|
|
3444
3406
|
|
|
3445
3407
|
// src/orpc-client/docs/client.ts
|
|
3446
3408
|
function createDocsClient(options) {
|
|
3447
3409
|
return {
|
|
3448
3410
|
v1: {
|
|
3449
|
-
read: createDocsV1ReadClient(options)
|
|
3450
|
-
write: createDocsV1WriteClient(options)
|
|
3411
|
+
read: createDocsV1ReadClient(options)
|
|
3451
3412
|
},
|
|
3452
3413
|
v2: {
|
|
3453
3414
|
read: createDocsV2ReadClient(options),
|
|
@@ -3459,22 +3420,22 @@ function createDocsClient(options) {
|
|
|
3459
3420
|
}
|
|
3460
3421
|
|
|
3461
3422
|
// src/orpc-client/docs-cache/client.ts
|
|
3462
|
-
import { createORPCClient as
|
|
3463
|
-
import { OpenAPILink as
|
|
3423
|
+
import { createORPCClient as createORPCClient8 } from "@orpc/client";
|
|
3424
|
+
import { OpenAPILink as OpenAPILink8 } from "@orpc/openapi-client/fetch";
|
|
3464
3425
|
|
|
3465
3426
|
// src/orpc-client/docs-cache/contract.ts
|
|
3466
|
-
import { oc as
|
|
3467
|
-
import * as
|
|
3468
|
-
var InvalidateCachedDocsInputSchema =
|
|
3469
|
-
url:
|
|
3427
|
+
import { oc as oc9 } from "@orpc/contract";
|
|
3428
|
+
import * as z19 from "zod";
|
|
3429
|
+
var InvalidateCachedDocsInputSchema = z19.object({
|
|
3430
|
+
url: z19.string()
|
|
3470
3431
|
});
|
|
3471
3432
|
var docsCacheContract = {
|
|
3472
|
-
invalidate:
|
|
3433
|
+
invalidate: oc9.route({ method: "POST", path: "/invalidate" }).input(InvalidateCachedDocsInputSchema).output(z19.void())
|
|
3473
3434
|
};
|
|
3474
3435
|
|
|
3475
3436
|
// src/orpc-client/docs-cache/client.ts
|
|
3476
3437
|
function createDocsCacheClient(options) {
|
|
3477
|
-
const link = new
|
|
3438
|
+
const link = new OpenAPILink8(docsCacheContract, {
|
|
3478
3439
|
url: `${options.baseUrl}/docs-cache`,
|
|
3479
3440
|
headers: () => ({
|
|
3480
3441
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -3482,14 +3443,14 @@ function createDocsCacheClient(options) {
|
|
|
3482
3443
|
}),
|
|
3483
3444
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
3484
3445
|
});
|
|
3485
|
-
return
|
|
3446
|
+
return createORPCClient8(link);
|
|
3486
3447
|
}
|
|
3487
3448
|
|
|
3488
3449
|
// src/orpc-client/docs-deployment/client.ts
|
|
3489
|
-
import { createORPCClient as
|
|
3490
|
-
import { OpenAPILink as
|
|
3450
|
+
import { createORPCClient as createORPCClient9 } from "@orpc/client";
|
|
3451
|
+
import { OpenAPILink as OpenAPILink9 } from "@orpc/openapi-client/fetch";
|
|
3491
3452
|
function createDocsDeploymentClient(options) {
|
|
3492
|
-
const link = new
|
|
3453
|
+
const link = new OpenAPILink9(docsDeploymentContract, {
|
|
3493
3454
|
url: `${options.baseUrl}/docs-deployment`,
|
|
3494
3455
|
headers: () => ({
|
|
3495
3456
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -3497,58 +3458,58 @@ function createDocsDeploymentClient(options) {
|
|
|
3497
3458
|
}),
|
|
3498
3459
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
3499
3460
|
});
|
|
3500
|
-
return
|
|
3461
|
+
return createORPCClient9(link);
|
|
3501
3462
|
}
|
|
3502
3463
|
|
|
3503
3464
|
// src/orpc-client/docs-ledger/client.ts
|
|
3504
|
-
import { createORPCClient as
|
|
3505
|
-
import { OpenAPILink as
|
|
3465
|
+
import { createORPCClient as createORPCClient10 } from "@orpc/client";
|
|
3466
|
+
import { OpenAPILink as OpenAPILink10 } from "@orpc/openapi-client/fetch";
|
|
3506
3467
|
|
|
3507
3468
|
// src/orpc-client/docs-ledger/contract.ts
|
|
3508
|
-
import { oc as
|
|
3509
|
-
import * as
|
|
3510
|
-
var MissingContentSchema =
|
|
3511
|
-
hash:
|
|
3512
|
-
uploadUrl:
|
|
3469
|
+
import { oc as oc10 } from "@orpc/contract";
|
|
3470
|
+
import * as z20 from "zod";
|
|
3471
|
+
var MissingContentSchema = z20.object({
|
|
3472
|
+
hash: z20.string(),
|
|
3473
|
+
uploadUrl: z20.string()
|
|
3513
3474
|
});
|
|
3514
|
-
var RegisterResponseSchema =
|
|
3515
|
-
deploymentHash:
|
|
3516
|
-
missingContent:
|
|
3475
|
+
var RegisterResponseSchema = z20.object({
|
|
3476
|
+
deploymentHash: z20.string(),
|
|
3477
|
+
missingContent: z20.array(MissingContentSchema)
|
|
3517
3478
|
});
|
|
3518
|
-
var FinishResponseSchema =
|
|
3519
|
-
deploymentId:
|
|
3479
|
+
var FinishResponseSchema = z20.object({
|
|
3480
|
+
deploymentId: z20.string(),
|
|
3520
3481
|
/** ID of the canonical (fern URL) site row. */
|
|
3521
|
-
siteId:
|
|
3482
|
+
siteId: z20.string(),
|
|
3522
3483
|
/**
|
|
3523
3484
|
* IDs of any additional site rows created for `customDomains` URLs
|
|
3524
3485
|
* (ADR 0010). Empty when the publish has no `customDomains`. One ID
|
|
3525
3486
|
* per parsed customDomain, in the same order as the input.
|
|
3526
3487
|
*/
|
|
3527
|
-
additionalSiteIds:
|
|
3528
|
-
deploymentHash:
|
|
3529
|
-
reusedDeployment:
|
|
3488
|
+
additionalSiteIds: z20.array(z20.string()).default([]),
|
|
3489
|
+
deploymentHash: z20.string(),
|
|
3490
|
+
reusedDeployment: z20.boolean(),
|
|
3530
3491
|
/**
|
|
3531
3492
|
* Per-locale segment counts when `translations[]` was supplied on the
|
|
3532
3493
|
* finish input. Absent when no translations were included.
|
|
3533
3494
|
*/
|
|
3534
|
-
translationsProcessed:
|
|
3495
|
+
translationsProcessed: z20.array(z20.object({ locale: z20.string(), segmentsAdded: z20.number() })).optional()
|
|
3535
3496
|
});
|
|
3536
|
-
var ArchiveSiteInputSchema =
|
|
3537
|
-
siteId:
|
|
3497
|
+
var ArchiveSiteInputSchema = z20.object({
|
|
3498
|
+
siteId: z20.string()
|
|
3538
3499
|
});
|
|
3539
|
-
var ArchiveSiteResponseSchema =
|
|
3540
|
-
status:
|
|
3500
|
+
var ArchiveSiteResponseSchema = z20.object({
|
|
3501
|
+
status: z20.enum(["archived", "already_archived", "not_found"])
|
|
3541
3502
|
});
|
|
3542
|
-
var BlobRefSchema =
|
|
3543
|
-
hash:
|
|
3544
|
-
contentType:
|
|
3545
|
-
contentLength:
|
|
3503
|
+
var BlobRefSchema = z20.object({
|
|
3504
|
+
hash: z20.string(),
|
|
3505
|
+
contentType: z20.string(),
|
|
3506
|
+
contentLength: z20.number()
|
|
3546
3507
|
});
|
|
3547
|
-
var PageBlobRefSchema =
|
|
3508
|
+
var PageBlobRefSchema = z20.object({
|
|
3548
3509
|
/** SHA-256 hex of the page content bytes. */
|
|
3549
|
-
hash:
|
|
3550
|
-
contentType:
|
|
3551
|
-
contentLength:
|
|
3510
|
+
hash: z20.string(),
|
|
3511
|
+
contentType: z20.string().default("text/markdown"),
|
|
3512
|
+
contentLength: z20.number(),
|
|
3552
3513
|
/**
|
|
3553
3514
|
* Bare `fullPath`s of the file/image artifacts this page's rendered
|
|
3554
3515
|
* markdown references (the `<fullPath>` of each `file:<fullPath>` token).
|
|
@@ -3558,35 +3519,35 @@ var PageBlobRefSchema = z21.object({
|
|
|
3558
3519
|
* (ADR 0016, "File metadata on the render path"). Optional — older CLIs
|
|
3559
3520
|
* omit it and the page simply contributes no shard-side file identities.
|
|
3560
3521
|
*/
|
|
3561
|
-
referencedFiles:
|
|
3522
|
+
referencedFiles: z20.array(z20.string()).optional()
|
|
3562
3523
|
});
|
|
3563
|
-
var FileManifestEntrySchema =
|
|
3524
|
+
var FileManifestEntrySchema = z20.object({
|
|
3564
3525
|
/** SHA-256 hex of the file bytes (= CAS content hash). */
|
|
3565
|
-
hash:
|
|
3566
|
-
contentType:
|
|
3567
|
-
contentLength:
|
|
3526
|
+
hash: z20.string(),
|
|
3527
|
+
contentType: z20.string(),
|
|
3528
|
+
contentLength: z20.number(),
|
|
3568
3529
|
/** Original filename (e.g. "logo.png"). Used for Content-Disposition and URL cosmetics. */
|
|
3569
|
-
filename:
|
|
3530
|
+
filename: z20.string(),
|
|
3570
3531
|
/** Image width in pixels (images only). */
|
|
3571
|
-
width:
|
|
3532
|
+
width: z20.number().optional(),
|
|
3572
3533
|
/** Image height in pixels (images only). */
|
|
3573
|
-
height:
|
|
3534
|
+
height: z20.number().optional(),
|
|
3574
3535
|
/** Base64-encoded blur placeholder (images only). */
|
|
3575
|
-
blurDataURL:
|
|
3536
|
+
blurDataURL: z20.string().optional()
|
|
3576
3537
|
});
|
|
3577
|
-
var ImageRefSchema =
|
|
3578
|
-
path:
|
|
3579
|
-
width:
|
|
3580
|
-
height:
|
|
3538
|
+
var ImageRefSchema = z20.object({
|
|
3539
|
+
path: z20.string(),
|
|
3540
|
+
width: z20.number(),
|
|
3541
|
+
height: z20.number()
|
|
3581
3542
|
});
|
|
3582
|
-
var PathOrUrlSchema =
|
|
3583
|
-
|
|
3584
|
-
|
|
3543
|
+
var PathOrUrlSchema = z20.discriminatedUnion("type", [
|
|
3544
|
+
z20.object({ type: z20.literal("path"), value: z20.string() }),
|
|
3545
|
+
z20.object({ type: z20.literal("url"), value: z20.string() })
|
|
3585
3546
|
]);
|
|
3586
|
-
var RgbaSchema =
|
|
3587
|
-
var BackgroundColorSchema =
|
|
3588
|
-
|
|
3589
|
-
|
|
3547
|
+
var RgbaSchema = z20.object({ r: z20.number(), g: z20.number(), b: z20.number(), a: z20.number().optional() });
|
|
3548
|
+
var BackgroundColorSchema = z20.discriminatedUnion("type", [
|
|
3549
|
+
z20.object({ type: z20.literal("solid"), ...RgbaSchema.shape }),
|
|
3550
|
+
z20.object({ type: z20.literal("gradient") })
|
|
3590
3551
|
]);
|
|
3591
3552
|
var ACCENT_SCALE_KEYS = [
|
|
3592
3553
|
"accent1",
|
|
@@ -3603,9 +3564,9 @@ var ACCENT_SCALE_KEYS = [
|
|
|
3603
3564
|
"accent12"
|
|
3604
3565
|
];
|
|
3605
3566
|
var accentScaleShape = Object.fromEntries(ACCENT_SCALE_KEYS.map((key) => [key, RgbaSchema.optional()]));
|
|
3606
|
-
var LedgerThemeConfigSchema =
|
|
3567
|
+
var LedgerThemeConfigSchema = z20.object({
|
|
3607
3568
|
logo: ImageRefSchema.optional(),
|
|
3608
|
-
backgroundImage:
|
|
3569
|
+
backgroundImage: z20.string().optional(),
|
|
3609
3570
|
accentPrimary: RgbaSchema,
|
|
3610
3571
|
background: BackgroundColorSchema.optional(),
|
|
3611
3572
|
border: RgbaSchema.optional(),
|
|
@@ -3614,51 +3575,51 @@ var LedgerThemeConfigSchema = z21.object({
|
|
|
3614
3575
|
cardBackground: RgbaSchema.optional(),
|
|
3615
3576
|
...accentScaleShape
|
|
3616
3577
|
});
|
|
3617
|
-
var LedgerColorsConfigSchema =
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
type:
|
|
3578
|
+
var LedgerColorsConfigSchema = z20.discriminatedUnion("type", [
|
|
3579
|
+
z20.object({ type: z20.literal("dark"), ...LedgerThemeConfigSchema.shape }),
|
|
3580
|
+
z20.object({ type: z20.literal("light"), ...LedgerThemeConfigSchema.shape }),
|
|
3581
|
+
z20.object({
|
|
3582
|
+
type: z20.literal("darkAndLight"),
|
|
3622
3583
|
dark: LedgerThemeConfigSchema,
|
|
3623
3584
|
light: LedgerThemeConfigSchema
|
|
3624
3585
|
})
|
|
3625
3586
|
]);
|
|
3626
|
-
var LedgerFontVariantSchema =
|
|
3627
|
-
fontFile:
|
|
3628
|
-
weight:
|
|
3629
|
-
style:
|
|
3630
|
-
});
|
|
3631
|
-
var LedgerFontConfigSchema =
|
|
3632
|
-
|
|
3633
|
-
type:
|
|
3634
|
-
name:
|
|
3635
|
-
variants:
|
|
3636
|
-
display:
|
|
3637
|
-
fallback:
|
|
3638
|
-
fontVariationSettings:
|
|
3587
|
+
var LedgerFontVariantSchema = z20.object({
|
|
3588
|
+
fontFile: z20.string(),
|
|
3589
|
+
weight: z20.array(z20.string()).optional(),
|
|
3590
|
+
style: z20.array(z20.enum(["normal", "italic"])).optional()
|
|
3591
|
+
});
|
|
3592
|
+
var LedgerFontConfigSchema = z20.discriminatedUnion("type", [
|
|
3593
|
+
z20.object({
|
|
3594
|
+
type: z20.literal("custom"),
|
|
3595
|
+
name: z20.string(),
|
|
3596
|
+
variants: z20.array(LedgerFontVariantSchema),
|
|
3597
|
+
display: z20.enum(["auto", "block", "swap", "fallback", "optional"]).optional(),
|
|
3598
|
+
fallback: z20.array(z20.string()).optional(),
|
|
3599
|
+
fontVariationSettings: z20.string().optional()
|
|
3639
3600
|
})
|
|
3640
3601
|
]);
|
|
3641
|
-
var LedgerTypographySchema =
|
|
3602
|
+
var LedgerTypographySchema = z20.object({
|
|
3642
3603
|
headingsFont: LedgerFontConfigSchema.optional(),
|
|
3643
3604
|
bodyFont: LedgerFontConfigSchema.optional(),
|
|
3644
3605
|
codeFont: LedgerFontConfigSchema.optional()
|
|
3645
3606
|
});
|
|
3646
|
-
var LedgerJsFileSchema =
|
|
3647
|
-
path:
|
|
3648
|
-
strategy:
|
|
3607
|
+
var LedgerJsFileSchema = z20.object({
|
|
3608
|
+
path: z20.string(),
|
|
3609
|
+
strategy: z20.enum(["beforeInteractive", "afterInteractive", "lazyOnload"]).optional()
|
|
3649
3610
|
});
|
|
3650
|
-
var LedgerJsConfigSchema =
|
|
3651
|
-
remote:
|
|
3652
|
-
|
|
3653
|
-
url:
|
|
3654
|
-
strategy:
|
|
3611
|
+
var LedgerJsConfigSchema = z20.object({
|
|
3612
|
+
remote: z20.array(
|
|
3613
|
+
z20.object({
|
|
3614
|
+
url: z20.string(),
|
|
3615
|
+
strategy: z20.enum(["beforeInteractive", "afterInteractive", "lazyOnload"]).optional()
|
|
3655
3616
|
})
|
|
3656
3617
|
).optional(),
|
|
3657
|
-
files:
|
|
3658
|
-
inline:
|
|
3618
|
+
files: z20.array(LedgerJsFileSchema).optional(),
|
|
3619
|
+
inline: z20.array(z20.string()).optional()
|
|
3659
3620
|
});
|
|
3660
|
-
var LedgerMetadataConfigSchema =
|
|
3661
|
-
|
|
3621
|
+
var LedgerMetadataConfigSchema = z20.record(z20.string(), z20.unknown()).and(
|
|
3622
|
+
z20.object({
|
|
3662
3623
|
"og:image": PathOrUrlSchema.optional(),
|
|
3663
3624
|
"og:logo": PathOrUrlSchema.optional(),
|
|
3664
3625
|
"twitter:image": PathOrUrlSchema.optional(),
|
|
@@ -3666,83 +3627,83 @@ var LedgerMetadataConfigSchema = z21.record(z21.string(), z21.unknown()).and(
|
|
|
3666
3627
|
"og:dynamic:background-image": PathOrUrlSchema.optional()
|
|
3667
3628
|
})
|
|
3668
3629
|
);
|
|
3669
|
-
var NavbarLinksFieldSchema =
|
|
3670
|
-
var FooterLinksFieldSchema =
|
|
3630
|
+
var NavbarLinksFieldSchema = z20.array(NavbarLinkSchema);
|
|
3631
|
+
var FooterLinksFieldSchema = z20.array(FooterLinkSchema);
|
|
3671
3632
|
var LayoutFieldSchema = DocsLayoutConfigSchema;
|
|
3672
3633
|
var ThemeFieldSchema = DocsThemeConfigSchema;
|
|
3673
3634
|
var SettingsFieldSchema = DocsSettingsConfigSchema;
|
|
3674
3635
|
var AnalyticsFieldSchema = AnalyticsConfigSchema;
|
|
3675
3636
|
var AIChatFieldSchema = AIChatConfigSchema;
|
|
3676
3637
|
var PageActionsFieldSchema = PageActionsConfigSchema;
|
|
3677
|
-
var LedgerAgentsConfigSchema =
|
|
3678
|
-
pageDirective:
|
|
3679
|
-
pageDescriptionSource:
|
|
3680
|
-
siteDescription:
|
|
3681
|
-
});
|
|
3682
|
-
var LedgerConfigSchema =
|
|
3683
|
-
title:
|
|
3684
|
-
rootSlug:
|
|
3685
|
-
defaultLanguage:
|
|
3686
|
-
translations:
|
|
3687
|
-
defaultLocale:
|
|
3688
|
-
translations:
|
|
3638
|
+
var LedgerAgentsConfigSchema = z20.object({
|
|
3639
|
+
pageDirective: z20.string().optional(),
|
|
3640
|
+
pageDescriptionSource: z20.enum(["description", "subtitle"]).optional(),
|
|
3641
|
+
siteDescription: z20.string().optional()
|
|
3642
|
+
});
|
|
3643
|
+
var LedgerConfigSchema = z20.object({
|
|
3644
|
+
title: z20.string().optional(),
|
|
3645
|
+
rootSlug: z20.string().optional(),
|
|
3646
|
+
defaultLanguage: z20.string().optional(),
|
|
3647
|
+
translations: z20.object({
|
|
3648
|
+
defaultLocale: z20.string(),
|
|
3649
|
+
translations: z20.array(z20.string()).optional()
|
|
3689
3650
|
}).optional(),
|
|
3690
|
-
announcement:
|
|
3651
|
+
announcement: z20.object({ text: z20.string() }).optional(),
|
|
3691
3652
|
navbarLinks: NavbarLinksFieldSchema.optional(),
|
|
3692
3653
|
footerLinks: FooterLinksFieldSchema.optional(),
|
|
3693
|
-
logoHeight:
|
|
3694
|
-
logoHref:
|
|
3695
|
-
logoRightText:
|
|
3654
|
+
logoHeight: z20.number().optional(),
|
|
3655
|
+
logoHref: z20.string().optional(),
|
|
3656
|
+
logoRightText: z20.string().optional(),
|
|
3696
3657
|
/** fullPath of the favicon file artifact (any extension: .svg/.png/.ico). */
|
|
3697
|
-
favicon:
|
|
3658
|
+
favicon: z20.string().nullish(),
|
|
3698
3659
|
agents: LedgerAgentsConfigSchema.optional(),
|
|
3699
3660
|
metadata: LedgerMetadataConfigSchema.optional(),
|
|
3700
|
-
redirects:
|
|
3661
|
+
redirects: z20.array(z20.object({ source: z20.string(), destination: z20.string(), permanent: z20.boolean().optional() })).optional(),
|
|
3701
3662
|
colorsV3: LedgerColorsConfigSchema.optional(),
|
|
3702
3663
|
layout: LayoutFieldSchema.optional(),
|
|
3703
3664
|
theme: ThemeFieldSchema.optional(),
|
|
3704
3665
|
settings: SettingsFieldSchema.optional(),
|
|
3705
3666
|
typographyV2: LedgerTypographySchema.optional(),
|
|
3706
3667
|
analyticsConfig: AnalyticsFieldSchema.optional(),
|
|
3707
|
-
integrations:
|
|
3708
|
-
intercom:
|
|
3668
|
+
integrations: z20.object({
|
|
3669
|
+
intercom: z20.string().optional()
|
|
3709
3670
|
}).optional(),
|
|
3710
|
-
css:
|
|
3671
|
+
css: z20.object({ inline: z20.array(z20.string()).optional() }).optional(),
|
|
3711
3672
|
js: LedgerJsConfigSchema.optional(),
|
|
3712
3673
|
aiChatConfig: AIChatFieldSchema.optional(),
|
|
3713
3674
|
pageActions: PageActionsFieldSchema.optional(),
|
|
3714
|
-
editThisPageLaunch:
|
|
3675
|
+
editThisPageLaunch: z20.enum(["github", "dashboard"]).optional(),
|
|
3715
3676
|
/**
|
|
3716
3677
|
* Explicit edit-this-page GitHub config from docs.yml (ADR 0012 parity).
|
|
3717
3678
|
* When present, the loader synthesises `editThisPageUrl` from these fields
|
|
3718
3679
|
* instead of relying on deployment-scoped git provenance. This matches the
|
|
3719
3680
|
* v2 behaviour where the CLI derives the URL from the declared config.
|
|
3720
3681
|
*/
|
|
3721
|
-
editThisPageGithub:
|
|
3722
|
-
owner:
|
|
3723
|
-
repo:
|
|
3724
|
-
branch:
|
|
3725
|
-
host:
|
|
3682
|
+
editThisPageGithub: z20.object({
|
|
3683
|
+
owner: z20.string(),
|
|
3684
|
+
repo: z20.string(),
|
|
3685
|
+
branch: z20.string().default("main"),
|
|
3686
|
+
host: z20.string().default("https://github.com")
|
|
3726
3687
|
}).optional(),
|
|
3727
|
-
header:
|
|
3728
|
-
footer:
|
|
3729
|
-
});
|
|
3730
|
-
var MetadataStringArraySchema =
|
|
3731
|
-
var FeatureFlagMetadataSchema =
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
flag:
|
|
3736
|
-
fallbackValue:
|
|
3737
|
-
match:
|
|
3688
|
+
header: z20.string().optional(),
|
|
3689
|
+
footer: z20.string().optional()
|
|
3690
|
+
});
|
|
3691
|
+
var MetadataStringArraySchema = z20.array(z20.string());
|
|
3692
|
+
var FeatureFlagMetadataSchema = z20.array(
|
|
3693
|
+
z20.union([
|
|
3694
|
+
z20.string(),
|
|
3695
|
+
z20.object({
|
|
3696
|
+
flag: z20.string(),
|
|
3697
|
+
fallbackValue: z20.unknown().optional(),
|
|
3698
|
+
match: z20.unknown().optional()
|
|
3738
3699
|
})
|
|
3739
3700
|
])
|
|
3740
3701
|
);
|
|
3741
|
-
var LinkTargetSchema2 =
|
|
3742
|
-
var CollapsedSchema =
|
|
3743
|
-
var LedgerAvailabilitySchema =
|
|
3702
|
+
var LinkTargetSchema2 = z20.enum(["_blank", "_self", "_parent", "_top"]);
|
|
3703
|
+
var CollapsedSchema = z20.union([z20.boolean(), z20.literal("open-by-default")]);
|
|
3704
|
+
var LedgerAvailabilitySchema = z20.union([
|
|
3744
3705
|
AvailabilitySchema,
|
|
3745
|
-
|
|
3706
|
+
z20.enum([
|
|
3746
3707
|
"alpha",
|
|
3747
3708
|
"stable",
|
|
3748
3709
|
"generally-available",
|
|
@@ -3754,7 +3715,7 @@ var LedgerAvailabilitySchema = z21.union([
|
|
|
3754
3715
|
"legacy"
|
|
3755
3716
|
])
|
|
3756
3717
|
]);
|
|
3757
|
-
var LedgerArtifactTypeSchema =
|
|
3718
|
+
var LedgerArtifactTypeSchema = z20.enum([
|
|
3758
3719
|
"markdown",
|
|
3759
3720
|
"page",
|
|
3760
3721
|
"rest",
|
|
@@ -3768,170 +3729,170 @@ var LedgerArtifactTypeSchema = z21.enum([
|
|
|
3768
3729
|
"image",
|
|
3769
3730
|
"redirect"
|
|
3770
3731
|
]);
|
|
3771
|
-
var LedgerMetadataBaseSchema =
|
|
3732
|
+
var LedgerMetadataBaseSchema = z20.object({}).passthrough();
|
|
3772
3733
|
var NodeMetadataFields = {
|
|
3773
|
-
title:
|
|
3774
|
-
slug:
|
|
3775
|
-
icon:
|
|
3776
|
-
authed:
|
|
3734
|
+
title: z20.string().optional(),
|
|
3735
|
+
slug: z20.string().optional(),
|
|
3736
|
+
icon: z20.string().optional(),
|
|
3737
|
+
authed: z20.boolean().optional(),
|
|
3777
3738
|
viewers: MetadataStringArraySchema.optional(),
|
|
3778
|
-
orphaned:
|
|
3739
|
+
orphaned: z20.boolean().optional(),
|
|
3779
3740
|
featureFlags: FeatureFlagMetadataSchema.optional()
|
|
3780
3741
|
};
|
|
3781
3742
|
var ApiNodeMetadataFields = {
|
|
3782
3743
|
...NodeMetadataFields,
|
|
3783
|
-
apiDefinitionId:
|
|
3744
|
+
apiDefinitionId: z20.string(),
|
|
3784
3745
|
availability: LedgerAvailabilitySchema.optional()
|
|
3785
3746
|
};
|
|
3786
3747
|
var LedgerSegmentDetailMetadataObjectSchema = LedgerMetadataBaseSchema.extend({
|
|
3787
|
-
slug:
|
|
3788
|
-
default:
|
|
3789
|
-
subtitle:
|
|
3790
|
-
href:
|
|
3791
|
-
url:
|
|
3748
|
+
slug: z20.string().optional(),
|
|
3749
|
+
default: z20.boolean().optional(),
|
|
3750
|
+
subtitle: z20.string().optional(),
|
|
3751
|
+
href: z20.string().optional(),
|
|
3752
|
+
url: z20.string().optional(),
|
|
3792
3753
|
target: LinkTargetSchema2.optional(),
|
|
3793
|
-
image:
|
|
3794
|
-
pointsTo:
|
|
3754
|
+
image: z20.string().optional(),
|
|
3755
|
+
pointsTo: z20.string().optional(),
|
|
3795
3756
|
availability: LedgerAvailabilitySchema.optional(),
|
|
3796
|
-
tab_type:
|
|
3757
|
+
tab_type: z20.enum(["tab", "link", "changelog"]).optional()
|
|
3797
3758
|
});
|
|
3798
3759
|
var LedgerSegmentDetailMetadataSchema = LedgerSegmentDetailMetadataObjectSchema.nullable();
|
|
3799
|
-
var LedgerSegmentMetadataObjectSchema =
|
|
3760
|
+
var LedgerSegmentMetadataObjectSchema = z20.discriminatedUnion("type", [
|
|
3800
3761
|
LedgerMetadataBaseSchema.extend({
|
|
3801
|
-
type:
|
|
3762
|
+
type: z20.literal("tabRoot")
|
|
3802
3763
|
}),
|
|
3803
3764
|
LedgerMetadataBaseSchema.extend({
|
|
3804
|
-
type:
|
|
3805
|
-
title:
|
|
3806
|
-
icon:
|
|
3807
|
-
authed:
|
|
3765
|
+
type: z20.literal("section"),
|
|
3766
|
+
title: z20.string().optional(),
|
|
3767
|
+
icon: z20.string().optional(),
|
|
3768
|
+
authed: z20.boolean().optional(),
|
|
3808
3769
|
collapsed: CollapsedSchema.optional(),
|
|
3809
|
-
collapsible:
|
|
3810
|
-
collapsedByDefault:
|
|
3770
|
+
collapsible: z20.boolean().optional(),
|
|
3771
|
+
collapsedByDefault: z20.boolean().optional(),
|
|
3811
3772
|
availability: LedgerAvailabilitySchema.optional(),
|
|
3812
|
-
overviewPageId:
|
|
3813
|
-
noindex:
|
|
3814
|
-
pointsTo:
|
|
3773
|
+
overviewPageId: z20.string().optional(),
|
|
3774
|
+
noindex: z20.boolean().optional(),
|
|
3775
|
+
pointsTo: z20.string().optional(),
|
|
3815
3776
|
viewers: MetadataStringArraySchema.optional(),
|
|
3816
|
-
orphaned:
|
|
3777
|
+
orphaned: z20.boolean().optional(),
|
|
3817
3778
|
featureFlags: FeatureFlagMetadataSchema.optional()
|
|
3818
3779
|
}),
|
|
3819
3780
|
LedgerMetadataBaseSchema.extend({
|
|
3820
|
-
type:
|
|
3821
|
-
title:
|
|
3822
|
-
icon:
|
|
3823
|
-
authed:
|
|
3824
|
-
apiDefinitionId:
|
|
3825
|
-
overviewPageId:
|
|
3826
|
-
noindex:
|
|
3781
|
+
type: z20.literal("apiReference"),
|
|
3782
|
+
title: z20.string().optional(),
|
|
3783
|
+
icon: z20.string().optional(),
|
|
3784
|
+
authed: z20.boolean().optional(),
|
|
3785
|
+
apiDefinitionId: z20.string().optional(),
|
|
3786
|
+
overviewPageId: z20.string().optional(),
|
|
3787
|
+
noindex: z20.boolean().optional(),
|
|
3827
3788
|
availability: LedgerAvailabilitySchema.optional(),
|
|
3828
|
-
pointsTo:
|
|
3829
|
-
paginated:
|
|
3830
|
-
showErrors:
|
|
3831
|
-
hideTitle:
|
|
3789
|
+
pointsTo: z20.string().optional(),
|
|
3790
|
+
paginated: z20.boolean().optional(),
|
|
3791
|
+
showErrors: z20.boolean().optional(),
|
|
3792
|
+
hideTitle: z20.boolean().optional(),
|
|
3832
3793
|
viewers: MetadataStringArraySchema.optional(),
|
|
3833
|
-
orphaned:
|
|
3794
|
+
orphaned: z20.boolean().optional(),
|
|
3834
3795
|
featureFlags: FeatureFlagMetadataSchema.optional()
|
|
3835
3796
|
}),
|
|
3836
3797
|
LedgerMetadataBaseSchema.extend({
|
|
3837
|
-
type:
|
|
3838
|
-
title:
|
|
3839
|
-
icon:
|
|
3840
|
-
authed:
|
|
3841
|
-
apiDefinitionId:
|
|
3842
|
-
overviewPageId:
|
|
3843
|
-
noindex:
|
|
3798
|
+
type: z20.literal("apiPackage"),
|
|
3799
|
+
title: z20.string().optional(),
|
|
3800
|
+
icon: z20.string().optional(),
|
|
3801
|
+
authed: z20.boolean().optional(),
|
|
3802
|
+
apiDefinitionId: z20.string().optional(),
|
|
3803
|
+
overviewPageId: z20.string().optional(),
|
|
3804
|
+
noindex: z20.boolean().optional(),
|
|
3844
3805
|
availability: LedgerAvailabilitySchema.optional(),
|
|
3845
|
-
pointsTo:
|
|
3806
|
+
pointsTo: z20.string().optional(),
|
|
3846
3807
|
viewers: MetadataStringArraySchema.optional(),
|
|
3847
|
-
orphaned:
|
|
3808
|
+
orphaned: z20.boolean().optional(),
|
|
3848
3809
|
featureFlags: FeatureFlagMetadataSchema.optional()
|
|
3849
3810
|
}),
|
|
3850
3811
|
LedgerMetadataBaseSchema.extend({
|
|
3851
|
-
type:
|
|
3852
|
-
title:
|
|
3853
|
-
icon:
|
|
3854
|
-
overviewPageId:
|
|
3855
|
-
apiDefinitionId:
|
|
3856
|
-
noindex:
|
|
3857
|
-
authed:
|
|
3812
|
+
type: z20.literal("changelog"),
|
|
3813
|
+
title: z20.string().optional(),
|
|
3814
|
+
icon: z20.string().optional(),
|
|
3815
|
+
overviewPageId: z20.string().optional(),
|
|
3816
|
+
apiDefinitionId: z20.string().optional(),
|
|
3817
|
+
noindex: z20.boolean().optional(),
|
|
3818
|
+
authed: z20.boolean().optional(),
|
|
3858
3819
|
viewers: MetadataStringArraySchema.optional(),
|
|
3859
|
-
orphaned:
|
|
3820
|
+
orphaned: z20.boolean().optional(),
|
|
3860
3821
|
featureFlags: FeatureFlagMetadataSchema.optional()
|
|
3861
3822
|
}),
|
|
3862
3823
|
LedgerMetadataBaseSchema.extend({
|
|
3863
|
-
type:
|
|
3824
|
+
type: z20.literal("files")
|
|
3864
3825
|
}),
|
|
3865
3826
|
LedgerMetadataBaseSchema.extend({
|
|
3866
|
-
type:
|
|
3827
|
+
type: z20.literal("redirects")
|
|
3867
3828
|
}),
|
|
3868
3829
|
LedgerMetadataBaseSchema.extend({
|
|
3869
|
-
type:
|
|
3830
|
+
type: z20.literal("productLink")
|
|
3870
3831
|
}),
|
|
3871
3832
|
LedgerMetadataBaseSchema.extend({
|
|
3872
|
-
type:
|
|
3833
|
+
type: z20.literal("tabLink")
|
|
3873
3834
|
})
|
|
3874
3835
|
]);
|
|
3875
3836
|
var LedgerSegmentMetadataSchema = LedgerSegmentMetadataObjectSchema;
|
|
3876
3837
|
var LedgerMarkdownMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
3877
3838
|
...NodeMetadataFields,
|
|
3878
|
-
pageId:
|
|
3879
|
-
isOverview:
|
|
3880
|
-
noindex:
|
|
3839
|
+
pageId: z20.string().optional(),
|
|
3840
|
+
isOverview: z20.boolean().optional(),
|
|
3841
|
+
noindex: z20.boolean().optional()
|
|
3881
3842
|
});
|
|
3882
3843
|
var LedgerRestMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
3883
3844
|
...ApiNodeMetadataFields,
|
|
3884
|
-
endpointId:
|
|
3845
|
+
endpointId: z20.string(),
|
|
3885
3846
|
method: HttpMethodSchema,
|
|
3886
|
-
isResponseStream:
|
|
3887
|
-
endpointPairKey:
|
|
3847
|
+
isResponseStream: z20.boolean().optional(),
|
|
3848
|
+
endpointPairKey: z20.string().optional()
|
|
3888
3849
|
});
|
|
3889
3850
|
var LedgerWebSocketMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
3890
3851
|
...ApiNodeMetadataFields,
|
|
3891
|
-
webSocketId:
|
|
3852
|
+
webSocketId: z20.string()
|
|
3892
3853
|
});
|
|
3893
3854
|
var LedgerWebhookMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
3894
3855
|
...ApiNodeMetadataFields,
|
|
3895
|
-
webhookId:
|
|
3856
|
+
webhookId: z20.string(),
|
|
3896
3857
|
// V1.WebhookNode carries the full HttpMethod union, so the read model must accept it too.
|
|
3897
3858
|
method: HttpMethodSchema
|
|
3898
3859
|
});
|
|
3899
3860
|
var LedgerGrpcMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
3900
3861
|
...ApiNodeMetadataFields,
|
|
3901
|
-
grpcId:
|
|
3862
|
+
grpcId: z20.string(),
|
|
3902
3863
|
method: GrpcMethodSchema
|
|
3903
3864
|
});
|
|
3904
3865
|
var LedgerGraphQlMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
3905
3866
|
...ApiNodeMetadataFields,
|
|
3906
|
-
graphqlOperationId:
|
|
3867
|
+
graphqlOperationId: z20.string(),
|
|
3907
3868
|
operationType: GraphQlOperationTypeSchema
|
|
3908
3869
|
});
|
|
3909
3870
|
var LedgerChangelogEntryMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
3910
3871
|
...NodeMetadataFields,
|
|
3911
|
-
pageId:
|
|
3912
|
-
noindex:
|
|
3913
|
-
date:
|
|
3872
|
+
pageId: z20.string(),
|
|
3873
|
+
noindex: z20.boolean().optional(),
|
|
3874
|
+
date: z20.string().optional(),
|
|
3914
3875
|
tags: MetadataStringArraySchema.optional()
|
|
3915
3876
|
});
|
|
3916
3877
|
var LedgerLinkMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
3917
|
-
title:
|
|
3918
|
-
slug:
|
|
3919
|
-
icon:
|
|
3920
|
-
url:
|
|
3878
|
+
title: z20.string().optional(),
|
|
3879
|
+
slug: z20.string().optional(),
|
|
3880
|
+
icon: z20.string().optional(),
|
|
3881
|
+
url: z20.string(),
|
|
3921
3882
|
target: LinkTargetSchema2.optional()
|
|
3922
3883
|
});
|
|
3923
3884
|
var LedgerFileArtifactMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
3924
|
-
contentType:
|
|
3925
|
-
contentLength:
|
|
3926
|
-
filename:
|
|
3927
|
-
width:
|
|
3928
|
-
height:
|
|
3929
|
-
blurDataURL:
|
|
3885
|
+
contentType: z20.string(),
|
|
3886
|
+
contentLength: z20.number().optional(),
|
|
3887
|
+
filename: z20.string(),
|
|
3888
|
+
width: z20.number().optional(),
|
|
3889
|
+
height: z20.number().optional(),
|
|
3890
|
+
blurDataURL: z20.string().optional()
|
|
3930
3891
|
});
|
|
3931
3892
|
var LedgerRedirectMetadataSchema = LedgerMetadataBaseSchema.extend({
|
|
3932
|
-
href:
|
|
3893
|
+
href: z20.string().optional()
|
|
3933
3894
|
});
|
|
3934
|
-
var LedgerArtifactMetadataSchema =
|
|
3895
|
+
var LedgerArtifactMetadataSchema = z20.union([
|
|
3935
3896
|
LedgerMarkdownMetadataSchema,
|
|
3936
3897
|
LedgerRestMetadataSchema,
|
|
3937
3898
|
LedgerWebSocketMetadataSchema,
|
|
@@ -3959,23 +3920,23 @@ var LEDGER_ARTIFACT_METADATA_SCHEMAS = {
|
|
|
3959
3920
|
};
|
|
3960
3921
|
function artifactTypeVariant(base, type) {
|
|
3961
3922
|
return base.extend({
|
|
3962
|
-
artifactType:
|
|
3923
|
+
artifactType: z20.literal(type),
|
|
3963
3924
|
artifactMetadata: LEDGER_ARTIFACT_METADATA_SCHEMAS[type]
|
|
3964
3925
|
});
|
|
3965
3926
|
}
|
|
3966
|
-
var NavRouteBaseSchema =
|
|
3967
|
-
fullPath:
|
|
3968
|
-
artifactId:
|
|
3969
|
-
hidden:
|
|
3970
|
-
displaySortOrder:
|
|
3927
|
+
var NavRouteBaseSchema = z20.object({
|
|
3928
|
+
fullPath: z20.string().nullable(),
|
|
3929
|
+
artifactId: z20.string(),
|
|
3930
|
+
hidden: z20.boolean(),
|
|
3931
|
+
displaySortOrder: z20.number().nullable().optional()
|
|
3971
3932
|
});
|
|
3972
3933
|
function navRouteVariant(type) {
|
|
3973
3934
|
return NavRouteBaseSchema.extend({
|
|
3974
|
-
type:
|
|
3935
|
+
type: z20.literal(type),
|
|
3975
3936
|
metadata: LEDGER_ARTIFACT_METADATA_SCHEMAS[type]
|
|
3976
3937
|
});
|
|
3977
3938
|
}
|
|
3978
|
-
var LedgerNavRouteSchema =
|
|
3939
|
+
var LedgerNavRouteSchema = z20.discriminatedUnion("type", [
|
|
3979
3940
|
navRouteVariant("markdown"),
|
|
3980
3941
|
navRouteVariant("page"),
|
|
3981
3942
|
navRouteVariant("rest"),
|
|
@@ -3989,35 +3950,35 @@ var LedgerNavRouteSchema = z21.discriminatedUnion("type", [
|
|
|
3989
3950
|
navRouteVariant("image"),
|
|
3990
3951
|
navRouteVariant("redirect")
|
|
3991
3952
|
]);
|
|
3992
|
-
var DocsPublishGitInputSchema =
|
|
3953
|
+
var DocsPublishGitInputSchema = z20.object({
|
|
3993
3954
|
/** Full HTTPS URL of the repo (e.g. `https://github.com/acme/docs`). */
|
|
3994
|
-
repoUrl:
|
|
3955
|
+
repoUrl: z20.string(),
|
|
3995
3956
|
/** Branch the publish ran from. Used to build the edit-this-page URL. */
|
|
3996
|
-
branch:
|
|
3957
|
+
branch: z20.string(),
|
|
3997
3958
|
/**
|
|
3998
3959
|
* Optional commit SHA captured when the CLI knows it. Currently surfaced
|
|
3999
3960
|
* on `versionMetadata` for diagnostics but not used in URL synthesis.
|
|
4000
3961
|
*/
|
|
4001
|
-
commitSha:
|
|
3962
|
+
commitSha: z20.string().optional()
|
|
4002
3963
|
});
|
|
4003
|
-
var DocsContentFieldsSchema =
|
|
4004
|
-
root:
|
|
4005
|
-
pages:
|
|
3964
|
+
var DocsContentFieldsSchema = z20.object({
|
|
3965
|
+
root: z20.unknown(),
|
|
3966
|
+
pages: z20.record(z20.string(), PageBlobRefSchema),
|
|
4006
3967
|
apiManifest: BlobRefSchema.nullish(),
|
|
4007
3968
|
config: LedgerConfigSchema.optional(),
|
|
4008
3969
|
/**
|
|
4009
3970
|
* Content-addressable file manifest: maps fullPath → file metadata + CAS blob ref.
|
|
4010
3971
|
* Each entry becomes a file/image artifact in the ledger with nav routing by fullPath.
|
|
4011
3972
|
*/
|
|
4012
|
-
fileManifest:
|
|
3973
|
+
fileManifest: z20.record(z20.string(), FileManifestEntrySchema).optional(),
|
|
4013
3974
|
// TODO: jsFiles is a single blob containing all custom React component bundles.
|
|
4014
3975
|
// These should eventually be individual artifacts so they can be loaded/cached
|
|
4015
3976
|
// independently rather than as a monolithic bundle.
|
|
4016
3977
|
jsFiles: BlobRefSchema.nullish(),
|
|
4017
3978
|
redirects: BlobRefSchema.nullish(),
|
|
4018
|
-
locale:
|
|
4019
|
-
version:
|
|
4020
|
-
repo:
|
|
3979
|
+
locale: z20.string().default("en"),
|
|
3980
|
+
version: z20.string().nullish(),
|
|
3981
|
+
repo: z20.string().nullish(),
|
|
4021
3982
|
/**
|
|
4022
3983
|
* Git provenance for the deployment (ADR 0012 / FER-10489). Optional —
|
|
4023
3984
|
* older CLI versions don't send it and the columns stay NULL. When
|
|
@@ -4028,14 +3989,14 @@ var DocsContentFieldsSchema = z21.object({
|
|
|
4028
3989
|
});
|
|
4029
3990
|
var LocaleEntrySchemaInternal = DocsContentFieldsSchema.extend({
|
|
4030
3991
|
/** Locale identifier (e.g. "en", "es", "ja"). Required — no default. */
|
|
4031
|
-
locale:
|
|
3992
|
+
locale: z20.string()
|
|
4032
3993
|
});
|
|
4033
3994
|
var LocaleEntrySchema = LocaleEntrySchemaInternal;
|
|
4034
|
-
var DocsPublishInputSchemaInternal =
|
|
4035
|
-
orgId:
|
|
4036
|
-
domain:
|
|
4037
|
-
basepath:
|
|
4038
|
-
basepathAware:
|
|
3995
|
+
var DocsPublishInputSchemaInternal = z20.object({
|
|
3996
|
+
orgId: z20.string(),
|
|
3997
|
+
domain: z20.string(),
|
|
3998
|
+
basepath: z20.string().default(""),
|
|
3999
|
+
basepathAware: z20.boolean().nullish(),
|
|
4039
4000
|
/**
|
|
4040
4001
|
* Additional URLs the deployment should be served from (e.g. a customer's
|
|
4041
4002
|
* vanity hostname `docs.example.com` alongside the canonical fern URL).
|
|
@@ -4046,22 +4007,22 @@ var DocsPublishInputSchemaInternal = z21.object({
|
|
|
4046
4007
|
*
|
|
4047
4008
|
* See ADR 0010.
|
|
4048
4009
|
*/
|
|
4049
|
-
customDomains:
|
|
4050
|
-
previewId:
|
|
4010
|
+
customDomains: z20.array(z20.string()).default([]),
|
|
4011
|
+
previewId: z20.string().nullish(),
|
|
4051
4012
|
/** The primary/fallback locale for this deployment (e.g. "en"). */
|
|
4052
|
-
defaultLocale:
|
|
4013
|
+
defaultLocale: z20.string().default("en"),
|
|
4053
4014
|
/**
|
|
4054
4015
|
* All locales for this deployment. Each locale goes through the same
|
|
4055
4016
|
* transform → upload → verify → persist pipeline.
|
|
4056
4017
|
*/
|
|
4057
|
-
locales:
|
|
4018
|
+
locales: z20.array(LocaleEntrySchema).min(1)
|
|
4058
4019
|
}).refine((data) => data.locales.some((l) => l.locale === data.defaultLocale), {
|
|
4059
4020
|
message: "defaultLocale must match one of the locales in the locales array",
|
|
4060
4021
|
path: ["defaultLocale"]
|
|
4061
4022
|
});
|
|
4062
4023
|
var DocsPublishInputSchema = DocsPublishInputSchemaInternal;
|
|
4063
4024
|
var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.partial().extend({
|
|
4064
|
-
orgId:
|
|
4025
|
+
orgId: z20.string(),
|
|
4065
4026
|
/**
|
|
4066
4027
|
* Optional caller-supplied identifier for the preview hostname. Sanitized
|
|
4067
4028
|
* server-side (`[a-z0-9-]+`, no leading/trailing dashes). When absent,
|
|
@@ -4069,25 +4030,25 @@ var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.partial()
|
|
|
4069
4030
|
* defeats the round-trip use case where the CLI prints the predicted
|
|
4070
4031
|
* URL before the publish completes. CLIs should always send this.
|
|
4071
4032
|
*/
|
|
4072
|
-
previewId:
|
|
4033
|
+
previewId: z20.string().nullish(),
|
|
4073
4034
|
/**
|
|
4074
4035
|
* Optional path segment appended after the server-generated host.
|
|
4075
4036
|
* Mirrors V2's `basePath` — most preview publishes leave this empty,
|
|
4076
4037
|
* but explicit subpath previews (`/v2`) are supported.
|
|
4077
4038
|
*/
|
|
4078
|
-
basePath:
|
|
4039
|
+
basePath: z20.string().default(""),
|
|
4079
4040
|
/** The primary/fallback locale for this preview deployment. */
|
|
4080
|
-
defaultLocale:
|
|
4041
|
+
defaultLocale: z20.string().optional(),
|
|
4081
4042
|
/**
|
|
4082
4043
|
* All locales for this preview deployment. Preferred over the legacy
|
|
4083
4044
|
* single-locale content fields above.
|
|
4084
4045
|
*/
|
|
4085
|
-
locales:
|
|
4046
|
+
locales: z20.array(LocaleEntrySchema).min(1).optional()
|
|
4086
4047
|
}).superRefine((data, ctx) => {
|
|
4087
4048
|
if (data.locales == null) {
|
|
4088
4049
|
if (data.root == null || data.pages == null) {
|
|
4089
4050
|
ctx.addIssue({
|
|
4090
|
-
code:
|
|
4051
|
+
code: z20.ZodIssueCode.custom,
|
|
4091
4052
|
message: "Either locales or legacy single-locale content fields must be provided",
|
|
4092
4053
|
path: ["locales"]
|
|
4093
4054
|
});
|
|
@@ -4097,75 +4058,75 @@ var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.partial()
|
|
|
4097
4058
|
const defaultLocale = data.defaultLocale ?? data.locales[0]?.locale;
|
|
4098
4059
|
if (defaultLocale == null || !data.locales.some((locale) => locale.locale === defaultLocale)) {
|
|
4099
4060
|
ctx.addIssue({
|
|
4100
|
-
code:
|
|
4061
|
+
code: z20.ZodIssueCode.custom,
|
|
4101
4062
|
message: "defaultLocale must match one of the locales in the locales array",
|
|
4102
4063
|
path: ["defaultLocale"]
|
|
4103
4064
|
});
|
|
4104
4065
|
}
|
|
4105
4066
|
});
|
|
4106
4067
|
var LedgerPreviewRegisterInputSchema = LedgerPreviewRegisterInputSchemaInternal;
|
|
4107
|
-
var LedgerPreviewRegisterResponseSchema =
|
|
4108
|
-
deploymentHash:
|
|
4109
|
-
missingContent:
|
|
4068
|
+
var LedgerPreviewRegisterResponseSchema = z20.object({
|
|
4069
|
+
deploymentHash: z20.string(),
|
|
4070
|
+
missingContent: z20.array(MissingContentSchema),
|
|
4110
4071
|
/** Canonical preview URL, e.g. `https://acme-preview-feature-x.docs.buildwithfern.com`. */
|
|
4111
|
-
previewUrl:
|
|
4072
|
+
previewUrl: z20.string(),
|
|
4112
4073
|
/** Server-generated host portion of `previewUrl` (no scheme, no basepath). */
|
|
4113
|
-
domain:
|
|
4074
|
+
domain: z20.string(),
|
|
4114
4075
|
/** Echoed `basePath` (normalised — empty string when absent). */
|
|
4115
|
-
basepath:
|
|
4076
|
+
basepath: z20.string(),
|
|
4116
4077
|
/** Sanitized identifier the server actually used to compose the host. */
|
|
4117
|
-
previewId:
|
|
4078
|
+
previewId: z20.string()
|
|
4118
4079
|
});
|
|
4119
4080
|
var docsLedgerContract = {
|
|
4120
|
-
register:
|
|
4121
|
-
previewRegister:
|
|
4122
|
-
finish:
|
|
4123
|
-
archiveSite:
|
|
4081
|
+
register: oc10.route({ method: "POST", path: "/register" }).input(DocsPublishInputSchema).output(RegisterResponseSchema),
|
|
4082
|
+
previewRegister: oc10.route({ method: "POST", path: "/preview/init" }).input(LedgerPreviewRegisterInputSchema).output(LedgerPreviewRegisterResponseSchema),
|
|
4083
|
+
finish: oc10.route({ method: "POST", path: "/register/finish" }).input(DocsPublishInputSchema).output(FinishResponseSchema),
|
|
4084
|
+
archiveSite: oc10.route({ method: "POST", path: "/archive" }).input(ArchiveSiteInputSchema).output(ArchiveSiteResponseSchema)
|
|
4124
4085
|
};
|
|
4125
|
-
var CurrentVersionInputSchema =
|
|
4126
|
-
domain:
|
|
4127
|
-
basepath:
|
|
4086
|
+
var CurrentVersionInputSchema = z20.object({
|
|
4087
|
+
domain: z20.string(),
|
|
4088
|
+
basepath: z20.string().default("")
|
|
4128
4089
|
});
|
|
4129
4090
|
var CurrentPreviewInputSchema = CurrentVersionInputSchema.extend({
|
|
4130
|
-
previewId:
|
|
4091
|
+
previewId: z20.string()
|
|
4092
|
+
});
|
|
4093
|
+
var CurrentVersionResponseSchema = z20.object({
|
|
4094
|
+
orgId: z20.string(),
|
|
4095
|
+
domain: z20.string(),
|
|
4096
|
+
basepath: z20.string(),
|
|
4097
|
+
deploymentId: z20.string(),
|
|
4098
|
+
deploymentHash: z20.string(),
|
|
4099
|
+
siteId: z20.string(),
|
|
4100
|
+
assignedAt: z20.string(),
|
|
4101
|
+
assignedBy: z20.string().nullable()
|
|
4102
|
+
});
|
|
4103
|
+
var ContentRefSchema = z20.object({
|
|
4104
|
+
hash: z20.string(),
|
|
4105
|
+
s3Key: z20.string(),
|
|
4106
|
+
contentType: z20.string(),
|
|
4107
|
+
url: z20.string()
|
|
4131
4108
|
});
|
|
4132
|
-
var
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
});
|
|
4142
|
-
var ContentRefSchema = z21.object({
|
|
4143
|
-
hash: z21.string(),
|
|
4144
|
-
s3Key: z21.string(),
|
|
4145
|
-
contentType: z21.string(),
|
|
4146
|
-
url: z21.string()
|
|
4147
|
-
});
|
|
4148
|
-
var SegmentDetailSchema = z21.object({
|
|
4149
|
-
id: z21.string(),
|
|
4150
|
-
displayName: z21.string(),
|
|
4151
|
-
icon: z21.string().nullable(),
|
|
4152
|
-
sortOrder: z21.number(),
|
|
4153
|
-
hidden: z21.boolean(),
|
|
4154
|
-
viewers: z21.array(z21.string()),
|
|
4155
|
-
orphaned: z21.boolean(),
|
|
4156
|
-
featureFlags: z21.array(z21.string()),
|
|
4109
|
+
var SegmentDetailSchema = z20.object({
|
|
4110
|
+
id: z20.string(),
|
|
4111
|
+
displayName: z20.string(),
|
|
4112
|
+
icon: z20.string().nullable(),
|
|
4113
|
+
sortOrder: z20.number(),
|
|
4114
|
+
hidden: z20.boolean(),
|
|
4115
|
+
viewers: z20.array(z20.string()),
|
|
4116
|
+
orphaned: z20.boolean(),
|
|
4117
|
+
featureFlags: z20.array(z20.string()),
|
|
4157
4118
|
/** Type-specific fields: slug, default, subtitle, href, target, image, availability, pointsTo, tab_type. */
|
|
4158
4119
|
metadata: LedgerSegmentDetailMetadataSchema
|
|
4159
4120
|
});
|
|
4160
|
-
var SegmentSchema =
|
|
4161
|
-
segmentId:
|
|
4162
|
-
segmentHash:
|
|
4163
|
-
section:
|
|
4164
|
-
locale:
|
|
4121
|
+
var SegmentSchema = z20.object({
|
|
4122
|
+
segmentId: z20.string(),
|
|
4123
|
+
segmentHash: z20.string(),
|
|
4124
|
+
section: z20.string(),
|
|
4125
|
+
locale: z20.string(),
|
|
4165
4126
|
/** Sidebar order across segments (docs_ledger_deployment_segments.sort_order). */
|
|
4166
|
-
sortOrder:
|
|
4127
|
+
sortOrder: z20.number(),
|
|
4167
4128
|
/** Whether the segment is hidden from the sidebar. */
|
|
4168
|
-
hidden:
|
|
4129
|
+
hidden: z20.boolean(),
|
|
4169
4130
|
/** Segment type descriptor (seg.metadata): { type, title, icon, apiDefinitionId, overviewPageId, pointsTo, ... }. */
|
|
4170
4131
|
metadata: LedgerSegmentMetadataSchema,
|
|
4171
4132
|
/** Full product/version/variant/tab detail metadata, or null when the dimension is absent. */
|
|
@@ -4175,26 +4136,26 @@ var SegmentSchema = z21.object({
|
|
|
4175
4136
|
tab: SegmentDetailSchema.nullable(),
|
|
4176
4137
|
// ── Flat name/icon retained for back-compat (derivable from the
|
|
4177
4138
|
// detail objects above). ──
|
|
4178
|
-
productId:
|
|
4179
|
-
productName:
|
|
4180
|
-
productIcon:
|
|
4181
|
-
versionId:
|
|
4182
|
-
versionName:
|
|
4183
|
-
versionIcon:
|
|
4184
|
-
variantId:
|
|
4185
|
-
variantName:
|
|
4186
|
-
variantIcon:
|
|
4187
|
-
tabId:
|
|
4188
|
-
tabName:
|
|
4189
|
-
tabIcon:
|
|
4190
|
-
});
|
|
4191
|
-
var VersionMetadataInputSchema =
|
|
4192
|
-
deploymentId:
|
|
4193
|
-
locale:
|
|
4194
|
-
});
|
|
4195
|
-
var VersionMetadataResponseSchema =
|
|
4196
|
-
deploymentId:
|
|
4197
|
-
version:
|
|
4139
|
+
productId: z20.string().nullable(),
|
|
4140
|
+
productName: z20.string().nullable(),
|
|
4141
|
+
productIcon: z20.string().nullable(),
|
|
4142
|
+
versionId: z20.string().nullable(),
|
|
4143
|
+
versionName: z20.string().nullable(),
|
|
4144
|
+
versionIcon: z20.string().nullable(),
|
|
4145
|
+
variantId: z20.string().nullable(),
|
|
4146
|
+
variantName: z20.string().nullable(),
|
|
4147
|
+
variantIcon: z20.string().nullable(),
|
|
4148
|
+
tabId: z20.string().nullable(),
|
|
4149
|
+
tabName: z20.string().nullable(),
|
|
4150
|
+
tabIcon: z20.string().nullable()
|
|
4151
|
+
});
|
|
4152
|
+
var VersionMetadataInputSchema = z20.object({
|
|
4153
|
+
deploymentId: z20.string(),
|
|
4154
|
+
locale: z20.string().optional()
|
|
4155
|
+
});
|
|
4156
|
+
var VersionMetadataResponseSchema = z20.object({
|
|
4157
|
+
deploymentId: z20.string(),
|
|
4158
|
+
version: z20.string().nullable(),
|
|
4198
4159
|
/**
|
|
4199
4160
|
* Inline structural config (ADR 0009). Contains everything from
|
|
4200
4161
|
* {@link LedgerConfigSchema} except `header`, `footer`, `css.inline`,
|
|
@@ -4213,76 +4174,76 @@ var VersionMetadataResponseSchema = z21.object({
|
|
|
4213
4174
|
/** CAS ref for the joined `config.js.inline` blob (`\n`-separated JS). */
|
|
4214
4175
|
jsInline: ContentRefSchema.nullable(),
|
|
4215
4176
|
jsFiles: ContentRefSchema.nullable(),
|
|
4216
|
-
segments:
|
|
4177
|
+
segments: z20.array(SegmentSchema),
|
|
4217
4178
|
/** Mapping from human-readable API name slug to API definition UUID. */
|
|
4218
|
-
apiNameToId:
|
|
4179
|
+
apiNameToId: z20.record(z20.string(), z20.string()),
|
|
4219
4180
|
/**
|
|
4220
4181
|
* Git provenance for the deployment (ADR 0012 / FER-10489). Optional —
|
|
4221
4182
|
* nullable on CLIs that don't send `git` on the publish input. When
|
|
4222
4183
|
* present, the docs loader synthesises `editThisPageUrl` from `repoUrl`,
|
|
4223
4184
|
* `branch`, and the page `filename` server-side.
|
|
4224
4185
|
*/
|
|
4225
|
-
git:
|
|
4226
|
-
repoUrl:
|
|
4227
|
-
branch:
|
|
4228
|
-
commitSha:
|
|
4186
|
+
git: z20.object({
|
|
4187
|
+
repoUrl: z20.string(),
|
|
4188
|
+
branch: z20.string(),
|
|
4189
|
+
commitSha: z20.string().nullable().optional()
|
|
4229
4190
|
}).optional(),
|
|
4230
4191
|
/**
|
|
4231
4192
|
* Docs deployment status from the legacy `docs_sites` table, resolved
|
|
4232
4193
|
* via Kysely join in the DAO. Null when no matching row exists.
|
|
4233
4194
|
*/
|
|
4234
|
-
docsStatus:
|
|
4235
|
-
});
|
|
4236
|
-
var PageContentInputSchema =
|
|
4237
|
-
deploymentId:
|
|
4238
|
-
fullPath:
|
|
4239
|
-
pageId:
|
|
4240
|
-
locale:
|
|
4241
|
-
});
|
|
4242
|
-
var PageContentResponseSchema =
|
|
4243
|
-
s3Key:
|
|
4244
|
-
segmentHash:
|
|
4245
|
-
url:
|
|
4246
|
-
pageId:
|
|
4247
|
-
});
|
|
4248
|
-
var BatchPageContentInputSchema =
|
|
4249
|
-
deploymentId:
|
|
4250
|
-
pageIds:
|
|
4251
|
-
locale:
|
|
4252
|
-
});
|
|
4253
|
-
var BatchPageContentItemSchema =
|
|
4254
|
-
pageId:
|
|
4255
|
-
s3Key:
|
|
4256
|
-
url:
|
|
4257
|
-
});
|
|
4258
|
-
var BatchPageContentResponseSchema =
|
|
4259
|
-
items:
|
|
4260
|
-
});
|
|
4261
|
-
var NavInputSchema =
|
|
4262
|
-
segmentHash:
|
|
4263
|
-
});
|
|
4264
|
-
var NavResponseSchema =
|
|
4265
|
-
routes:
|
|
4266
|
-
});
|
|
4267
|
-
var RouteContextInputSchema =
|
|
4268
|
-
deploymentId:
|
|
4269
|
-
fullPath:
|
|
4270
|
-
locale:
|
|
4271
|
-
});
|
|
4272
|
-
var RouteContextResponseBaseSchema =
|
|
4273
|
-
artifactId:
|
|
4195
|
+
docsStatus: z20.enum(["PUBLISHING", "LIVE", "UNPUBLISHED", "ERROR"]).nullable().optional()
|
|
4196
|
+
});
|
|
4197
|
+
var PageContentInputSchema = z20.object({
|
|
4198
|
+
deploymentId: z20.string(),
|
|
4199
|
+
fullPath: z20.string().optional(),
|
|
4200
|
+
pageId: z20.string().optional(),
|
|
4201
|
+
locale: z20.string().optional()
|
|
4202
|
+
});
|
|
4203
|
+
var PageContentResponseSchema = z20.object({
|
|
4204
|
+
s3Key: z20.string(),
|
|
4205
|
+
segmentHash: z20.string(),
|
|
4206
|
+
url: z20.string(),
|
|
4207
|
+
pageId: z20.string().optional()
|
|
4208
|
+
});
|
|
4209
|
+
var BatchPageContentInputSchema = z20.object({
|
|
4210
|
+
deploymentId: z20.string(),
|
|
4211
|
+
pageIds: z20.array(z20.string()).min(1).max(2e3),
|
|
4212
|
+
locale: z20.string().optional()
|
|
4213
|
+
});
|
|
4214
|
+
var BatchPageContentItemSchema = z20.object({
|
|
4215
|
+
pageId: z20.string(),
|
|
4216
|
+
s3Key: z20.string(),
|
|
4217
|
+
url: z20.string()
|
|
4218
|
+
});
|
|
4219
|
+
var BatchPageContentResponseSchema = z20.object({
|
|
4220
|
+
items: z20.array(BatchPageContentItemSchema)
|
|
4221
|
+
});
|
|
4222
|
+
var NavInputSchema = z20.object({
|
|
4223
|
+
segmentHash: z20.string()
|
|
4224
|
+
});
|
|
4225
|
+
var NavResponseSchema = z20.object({
|
|
4226
|
+
routes: z20.array(LedgerNavRouteSchema)
|
|
4227
|
+
});
|
|
4228
|
+
var RouteContextInputSchema = z20.object({
|
|
4229
|
+
deploymentId: z20.string(),
|
|
4230
|
+
fullPath: z20.string(),
|
|
4231
|
+
locale: z20.string().optional()
|
|
4232
|
+
});
|
|
4233
|
+
var RouteContextResponseBaseSchema = z20.object({
|
|
4234
|
+
artifactId: z20.string(),
|
|
4274
4235
|
/** Hash of the segment that owns the matched route — feed to `nav`. */
|
|
4275
|
-
segmentHash:
|
|
4236
|
+
segmentHash: z20.string(),
|
|
4276
4237
|
/** Section path of the owning segment (e.g. "models/command"). */
|
|
4277
|
-
section:
|
|
4278
|
-
locale:
|
|
4238
|
+
section: z20.string(),
|
|
4239
|
+
locale: z20.string(),
|
|
4279
4240
|
/**
|
|
4280
4241
|
* Page content reference, or null for non-page artifacts (links/redirects)
|
|
4281
4242
|
* and route-only aliases that carry no content blob.
|
|
4282
4243
|
*/
|
|
4283
|
-
page:
|
|
4284
|
-
s3Key:
|
|
4285
|
-
url:
|
|
4244
|
+
page: z20.object({
|
|
4245
|
+
s3Key: z20.string(),
|
|
4246
|
+
url: z20.string()
|
|
4286
4247
|
}).nullable(),
|
|
4287
4248
|
/** Identity of the owning segment, for switchers + breadcrumbs. */
|
|
4288
4249
|
product: SegmentDetailSchema.nullable(),
|
|
@@ -4290,7 +4251,7 @@ var RouteContextResponseBaseSchema = z21.object({
|
|
|
4290
4251
|
variant: SegmentDetailSchema.nullable(),
|
|
4291
4252
|
tab: SegmentDetailSchema.nullable()
|
|
4292
4253
|
});
|
|
4293
|
-
var RouteContextResponseSchema =
|
|
4254
|
+
var RouteContextResponseSchema = z20.discriminatedUnion("artifactType", [
|
|
4294
4255
|
artifactTypeVariant(RouteContextResponseBaseSchema, "markdown"),
|
|
4295
4256
|
artifactTypeVariant(RouteContextResponseBaseSchema, "page"),
|
|
4296
4257
|
artifactTypeVariant(RouteContextResponseBaseSchema, "rest"),
|
|
@@ -4304,116 +4265,116 @@ var RouteContextResponseSchema = z21.discriminatedUnion("artifactType", [
|
|
|
4304
4265
|
artifactTypeVariant(RouteContextResponseBaseSchema, "image"),
|
|
4305
4266
|
artifactTypeVariant(RouteContextResponseBaseSchema, "redirect")
|
|
4306
4267
|
]);
|
|
4307
|
-
var TopLevelNavigationInputSchema =
|
|
4308
|
-
deploymentId:
|
|
4309
|
-
locale:
|
|
4310
|
-
});
|
|
4311
|
-
var TopLevelNavigationResponseSchema =
|
|
4312
|
-
products:
|
|
4313
|
-
versions:
|
|
4314
|
-
variants:
|
|
4315
|
-
tabs:
|
|
4316
|
-
});
|
|
4317
|
-
var VersionSwitchTargetsInputSchema =
|
|
4318
|
-
deploymentId:
|
|
4319
|
-
fullPath:
|
|
4320
|
-
locale:
|
|
4321
|
-
});
|
|
4322
|
-
var VersionSwitchTargetSchema =
|
|
4268
|
+
var TopLevelNavigationInputSchema = z20.object({
|
|
4269
|
+
deploymentId: z20.string(),
|
|
4270
|
+
locale: z20.string().optional()
|
|
4271
|
+
});
|
|
4272
|
+
var TopLevelNavigationResponseSchema = z20.object({
|
|
4273
|
+
products: z20.array(SegmentDetailSchema),
|
|
4274
|
+
versions: z20.array(SegmentDetailSchema),
|
|
4275
|
+
variants: z20.array(SegmentDetailSchema),
|
|
4276
|
+
tabs: z20.array(SegmentDetailSchema)
|
|
4277
|
+
});
|
|
4278
|
+
var VersionSwitchTargetsInputSchema = z20.object({
|
|
4279
|
+
deploymentId: z20.string(),
|
|
4280
|
+
fullPath: z20.string(),
|
|
4281
|
+
locale: z20.string().optional()
|
|
4282
|
+
});
|
|
4283
|
+
var VersionSwitchTargetSchema = z20.object({
|
|
4323
4284
|
/** The version detail id (matches a `SegmentDetail.id` from `versionMetadata`). */
|
|
4324
|
-
versionId:
|
|
4285
|
+
versionId: z20.string(),
|
|
4325
4286
|
/**
|
|
4326
4287
|
* Slug to navigate to when switching to this version — the equivalent
|
|
4327
4288
|
* route in the target version, or that version's landing/root slug when
|
|
4328
4289
|
* no equivalent exists. The current version maps to `fullPath` itself.
|
|
4329
4290
|
*/
|
|
4330
|
-
targetSlug:
|
|
4291
|
+
targetSlug: z20.string()
|
|
4331
4292
|
});
|
|
4332
|
-
var VersionSwitchTargetsResponseSchema =
|
|
4333
|
-
targets:
|
|
4293
|
+
var VersionSwitchTargetsResponseSchema = z20.object({
|
|
4294
|
+
targets: z20.array(VersionSwitchTargetSchema)
|
|
4334
4295
|
});
|
|
4335
|
-
var ApiDefinitionInputSchema =
|
|
4336
|
-
deploymentId:
|
|
4337
|
-
apiDefinitionId:
|
|
4296
|
+
var ApiDefinitionInputSchema = z20.object({
|
|
4297
|
+
deploymentId: z20.string(),
|
|
4298
|
+
apiDefinitionId: z20.string()
|
|
4338
4299
|
});
|
|
4339
|
-
var ApiDefinitionResponseSchema =
|
|
4340
|
-
s3Key:
|
|
4341
|
-
contentType:
|
|
4342
|
-
url:
|
|
4300
|
+
var ApiDefinitionResponseSchema = z20.object({
|
|
4301
|
+
s3Key: z20.string(),
|
|
4302
|
+
contentType: z20.string(),
|
|
4303
|
+
url: z20.string()
|
|
4343
4304
|
});
|
|
4344
|
-
var PrunedApiDefinitionInputSchema =
|
|
4345
|
-
deploymentId:
|
|
4346
|
-
apiDefinitionId:
|
|
4305
|
+
var PrunedApiDefinitionInputSchema = z20.object({
|
|
4306
|
+
deploymentId: z20.string(),
|
|
4307
|
+
apiDefinitionId: z20.string(),
|
|
4347
4308
|
/** Discriminator matching PruningNodeType.type → artifact metadata field. */
|
|
4348
|
-
nodeType:
|
|
4309
|
+
nodeType: z20.enum(["endpoint", "webSocket", "webhook", "grpc", "graphql"]),
|
|
4349
4310
|
/** The node ID value (endpointId, webSocketId, etc.). */
|
|
4350
|
-
nodeId:
|
|
4351
|
-
});
|
|
4352
|
-
var PrunedApiDefinitionResponseSchema =
|
|
4353
|
-
s3Key:
|
|
4354
|
-
contentType:
|
|
4355
|
-
url:
|
|
4356
|
-
});
|
|
4357
|
-
var FileArtifactInputSchema =
|
|
4358
|
-
deploymentId:
|
|
4359
|
-
fullPath:
|
|
4360
|
-
});
|
|
4361
|
-
var FileArtifactResponseSchema =
|
|
4362
|
-
fullPath:
|
|
4363
|
-
type:
|
|
4364
|
-
contentType:
|
|
4365
|
-
contentLength:
|
|
4366
|
-
filename:
|
|
4367
|
-
url:
|
|
4368
|
-
width:
|
|
4369
|
-
height:
|
|
4370
|
-
blurDataURL:
|
|
4371
|
-
});
|
|
4372
|
-
var PresignedFileDownloadInputSchema =
|
|
4311
|
+
nodeId: z20.string()
|
|
4312
|
+
});
|
|
4313
|
+
var PrunedApiDefinitionResponseSchema = z20.object({
|
|
4314
|
+
s3Key: z20.string(),
|
|
4315
|
+
contentType: z20.string(),
|
|
4316
|
+
url: z20.string()
|
|
4317
|
+
});
|
|
4318
|
+
var FileArtifactInputSchema = z20.object({
|
|
4319
|
+
deploymentId: z20.string(),
|
|
4320
|
+
fullPath: z20.string()
|
|
4321
|
+
});
|
|
4322
|
+
var FileArtifactResponseSchema = z20.object({
|
|
4323
|
+
fullPath: z20.string(),
|
|
4324
|
+
type: z20.enum(["file", "image"]),
|
|
4325
|
+
contentType: z20.string(),
|
|
4326
|
+
contentLength: z20.number().optional(),
|
|
4327
|
+
filename: z20.string(),
|
|
4328
|
+
url: z20.string(),
|
|
4329
|
+
width: z20.number().optional(),
|
|
4330
|
+
height: z20.number().optional(),
|
|
4331
|
+
blurDataURL: z20.string().optional()
|
|
4332
|
+
});
|
|
4333
|
+
var PresignedFileDownloadInputSchema = z20.object({
|
|
4373
4334
|
/** S3 object key in the public docs bucket (format: `{domain}/{hash}/{path}`). */
|
|
4374
|
-
s3Key:
|
|
4335
|
+
s3Key: z20.string().regex(/^[a-zA-Z0-9._-]+(?:\/[^/]+){2,}$/)
|
|
4375
4336
|
});
|
|
4376
|
-
var PresignedFileDownloadResponseSchema =
|
|
4337
|
+
var PresignedFileDownloadResponseSchema = z20.object({
|
|
4377
4338
|
/** Presigned S3 GET URL with long expiry (7 days). */
|
|
4378
|
-
url:
|
|
4339
|
+
url: z20.string()
|
|
4379
4340
|
});
|
|
4380
|
-
var FileMetadataInputSchema =
|
|
4381
|
-
deploymentId:
|
|
4382
|
-
fullPath:
|
|
4341
|
+
var FileMetadataInputSchema = z20.object({
|
|
4342
|
+
deploymentId: z20.string(),
|
|
4343
|
+
fullPath: z20.string()
|
|
4383
4344
|
});
|
|
4384
|
-
var FileMetadataResponseSchema =
|
|
4345
|
+
var FileMetadataResponseSchema = z20.object({
|
|
4385
4346
|
/** Content hash — used by the loader to construct CDN URLs. */
|
|
4386
|
-
hash:
|
|
4347
|
+
hash: z20.string(),
|
|
4387
4348
|
/** Domain under which the file bytes were uploaded in the docs files bucket. */
|
|
4388
|
-
domain:
|
|
4389
|
-
contentType:
|
|
4390
|
-
contentLength:
|
|
4391
|
-
filename:
|
|
4392
|
-
width:
|
|
4393
|
-
height:
|
|
4394
|
-
blurDataURL:
|
|
4349
|
+
domain: z20.string(),
|
|
4350
|
+
contentType: z20.string(),
|
|
4351
|
+
contentLength: z20.number().optional(),
|
|
4352
|
+
filename: z20.string().optional(),
|
|
4353
|
+
width: z20.number().optional(),
|
|
4354
|
+
height: z20.number().optional(),
|
|
4355
|
+
blurDataURL: z20.string().optional()
|
|
4395
4356
|
});
|
|
4396
4357
|
var docsLedgerReadContract = {
|
|
4397
|
-
currentVersion:
|
|
4398
|
-
currentPreview:
|
|
4399
|
-
versionMetadata:
|
|
4400
|
-
pageContent:
|
|
4401
|
-
batchPageContent:
|
|
4402
|
-
nav:
|
|
4403
|
-
routeContext:
|
|
4404
|
-
topLevelNavigation:
|
|
4405
|
-
versionSwitchTargets:
|
|
4406
|
-
apiDefinition:
|
|
4407
|
-
prunedApiDefinition:
|
|
4408
|
-
fileArtifact:
|
|
4409
|
-
fileMetadata:
|
|
4410
|
-
presignedFileDownload:
|
|
4358
|
+
currentVersion: oc10.route({ method: "GET", path: "/current-version" }).input(CurrentVersionInputSchema).output(CurrentVersionResponseSchema),
|
|
4359
|
+
currentPreview: oc10.route({ method: "GET", path: "/current-preview" }).input(CurrentPreviewInputSchema).output(CurrentVersionResponseSchema),
|
|
4360
|
+
versionMetadata: oc10.route({ method: "GET", path: "/version-metadata/{deploymentId}" }).input(VersionMetadataInputSchema).output(VersionMetadataResponseSchema),
|
|
4361
|
+
pageContent: oc10.route({ method: "GET", path: "/page-content/{deploymentId}" }).input(PageContentInputSchema).output(PageContentResponseSchema),
|
|
4362
|
+
batchPageContent: oc10.route({ method: "POST", path: "/batch-page-content/{deploymentId}" }).input(BatchPageContentInputSchema).output(BatchPageContentResponseSchema),
|
|
4363
|
+
nav: oc10.route({ method: "GET", path: "/nav/{segmentHash}" }).input(NavInputSchema).output(NavResponseSchema),
|
|
4364
|
+
routeContext: oc10.route({ method: "GET", path: "/route-context/{deploymentId}" }).input(RouteContextInputSchema).output(RouteContextResponseSchema),
|
|
4365
|
+
topLevelNavigation: oc10.route({ method: "GET", path: "/top-level-navigation/{deploymentId}" }).input(TopLevelNavigationInputSchema).output(TopLevelNavigationResponseSchema),
|
|
4366
|
+
versionSwitchTargets: oc10.route({ method: "GET", path: "/version-switch-targets/{deploymentId}" }).input(VersionSwitchTargetsInputSchema).output(VersionSwitchTargetsResponseSchema),
|
|
4367
|
+
apiDefinition: oc10.route({ method: "GET", path: "/api-definition/{deploymentId}/{apiDefinitionId}" }).input(ApiDefinitionInputSchema).output(ApiDefinitionResponseSchema),
|
|
4368
|
+
prunedApiDefinition: oc10.route({ method: "GET", path: "/pruned-api/{deploymentId}/{apiDefinitionId}" }).input(PrunedApiDefinitionInputSchema).output(PrunedApiDefinitionResponseSchema),
|
|
4369
|
+
fileArtifact: oc10.route({ method: "GET", path: "/file/{deploymentId}" }).input(FileArtifactInputSchema).output(FileArtifactResponseSchema),
|
|
4370
|
+
fileMetadata: oc10.route({ method: "GET", path: "/file-metadata/{deploymentId}" }).input(FileMetadataInputSchema).output(FileMetadataResponseSchema),
|
|
4371
|
+
presignedFileDownload: oc10.route({ method: "POST", path: "/presigned-file-download" }).input(PresignedFileDownloadInputSchema).output(PresignedFileDownloadResponseSchema)
|
|
4411
4372
|
};
|
|
4412
4373
|
|
|
4413
4374
|
// src/orpc-client/docs-ledger/client.ts
|
|
4414
4375
|
function createDocsLedgerClient(options) {
|
|
4415
4376
|
const baseUrl = options.baseUrl.replace(/\/+$/, "");
|
|
4416
|
-
const link = new
|
|
4377
|
+
const link = new OpenAPILink10(docsLedgerContract, {
|
|
4417
4378
|
url: `${baseUrl}/docs-ledger`,
|
|
4418
4379
|
headers: () => ({
|
|
4419
4380
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -4421,53 +4382,53 @@ function createDocsLedgerClient(options) {
|
|
|
4421
4382
|
}),
|
|
4422
4383
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
4423
4384
|
});
|
|
4424
|
-
return
|
|
4385
|
+
return createORPCClient10(link);
|
|
4425
4386
|
}
|
|
4426
4387
|
|
|
4427
4388
|
// src/orpc-client/editor-snapshot/client.ts
|
|
4428
|
-
import { createORPCClient as
|
|
4429
|
-
import { OpenAPILink as
|
|
4389
|
+
import { createORPCClient as createORPCClient11 } from "@orpc/client";
|
|
4390
|
+
import { OpenAPILink as OpenAPILink11 } from "@orpc/openapi-client/fetch";
|
|
4430
4391
|
|
|
4431
4392
|
// src/orpc-client/editor-snapshot/contract.ts
|
|
4432
|
-
import { oc as
|
|
4433
|
-
import * as
|
|
4434
|
-
var GetSnapshotInputSchema =
|
|
4435
|
-
domain:
|
|
4436
|
-
branchName:
|
|
4393
|
+
import { oc as oc11 } from "@orpc/contract";
|
|
4394
|
+
import * as z21 from "zod";
|
|
4395
|
+
var GetSnapshotInputSchema = z21.object({
|
|
4396
|
+
domain: z21.string(),
|
|
4397
|
+
branchName: z21.string()
|
|
4437
4398
|
});
|
|
4438
|
-
var SetSnapshotInputSchema =
|
|
4439
|
-
domain:
|
|
4440
|
-
branchName:
|
|
4441
|
-
data:
|
|
4399
|
+
var SetSnapshotInputSchema = z21.object({
|
|
4400
|
+
domain: z21.string(),
|
|
4401
|
+
branchName: z21.string(),
|
|
4402
|
+
data: z21.unknown()
|
|
4442
4403
|
});
|
|
4443
|
-
var GetDocumentsForBranchesInputSchema =
|
|
4444
|
-
domain:
|
|
4445
|
-
branchNames:
|
|
4404
|
+
var GetDocumentsForBranchesInputSchema = z21.object({
|
|
4405
|
+
domain: z21.string(),
|
|
4406
|
+
branchNames: z21.array(z21.string())
|
|
4446
4407
|
});
|
|
4447
|
-
var EditorDocumentSchema =
|
|
4448
|
-
id:
|
|
4449
|
-
domain:
|
|
4450
|
-
branchName:
|
|
4451
|
-
data:
|
|
4452
|
-
createdAt:
|
|
4453
|
-
updatedAt:
|
|
4454
|
-
expiresAt:
|
|
4408
|
+
var EditorDocumentSchema = z21.object({
|
|
4409
|
+
id: z21.string(),
|
|
4410
|
+
domain: z21.string(),
|
|
4411
|
+
branchName: z21.string(),
|
|
4412
|
+
data: z21.unknown(),
|
|
4413
|
+
createdAt: z21.string(),
|
|
4414
|
+
updatedAt: z21.string(),
|
|
4415
|
+
expiresAt: z21.string().optional()
|
|
4455
4416
|
});
|
|
4456
|
-
var GetSnapshotResponseSchema =
|
|
4457
|
-
data:
|
|
4417
|
+
var GetSnapshotResponseSchema = z21.object({
|
|
4418
|
+
data: z21.unknown().nullable()
|
|
4458
4419
|
});
|
|
4459
|
-
var GetDocumentsForBranchesResponseSchema =
|
|
4460
|
-
documents:
|
|
4420
|
+
var GetDocumentsForBranchesResponseSchema = z21.object({
|
|
4421
|
+
documents: z21.array(EditorDocumentSchema)
|
|
4461
4422
|
});
|
|
4462
4423
|
var editorSnapshotContract = {
|
|
4463
|
-
getSnapshot:
|
|
4464
|
-
setSnapshot:
|
|
4465
|
-
getDocumentsForBranches:
|
|
4424
|
+
getSnapshot: oc11.route({ method: "POST", path: "/get" }).input(GetSnapshotInputSchema).output(GetSnapshotResponseSchema),
|
|
4425
|
+
setSnapshot: oc11.route({ method: "POST", path: "/set" }).input(SetSnapshotInputSchema).output(z21.object({})),
|
|
4426
|
+
getDocumentsForBranches: oc11.route({ method: "POST", path: "/branches" }).input(GetDocumentsForBranchesInputSchema).output(GetDocumentsForBranchesResponseSchema)
|
|
4466
4427
|
};
|
|
4467
4428
|
|
|
4468
4429
|
// src/orpc-client/editor-snapshot/client.ts
|
|
4469
4430
|
function createEditorSnapshotClient(options) {
|
|
4470
|
-
const link = new
|
|
4431
|
+
const link = new OpenAPILink11(editorSnapshotContract, {
|
|
4471
4432
|
url: `${options.baseUrl.replace(/\/+$/, "")}/editor-snapshot`,
|
|
4472
4433
|
headers: () => ({
|
|
4473
4434
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -4475,17 +4436,17 @@ function createEditorSnapshotClient(options) {
|
|
|
4475
4436
|
}),
|
|
4476
4437
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
4477
4438
|
});
|
|
4478
|
-
return
|
|
4439
|
+
return createORPCClient11(link);
|
|
4479
4440
|
}
|
|
4480
4441
|
|
|
4481
4442
|
// src/orpc-client/generators/cli/client.ts
|
|
4482
|
-
import { createORPCClient as
|
|
4483
|
-
import { OpenAPILink as
|
|
4443
|
+
import { createORPCClient as createORPCClient12 } from "@orpc/client";
|
|
4444
|
+
import { OpenAPILink as OpenAPILink12 } from "@orpc/openapi-client/fetch";
|
|
4484
4445
|
|
|
4485
4446
|
// src/orpc-client/generators/contract.ts
|
|
4486
|
-
import { oc as
|
|
4487
|
-
import * as
|
|
4488
|
-
var GeneratorLanguageSchema =
|
|
4447
|
+
import { oc as oc12 } from "@orpc/contract";
|
|
4448
|
+
import * as z22 from "zod";
|
|
4449
|
+
var GeneratorLanguageSchema = z22.enum([
|
|
4489
4450
|
"python",
|
|
4490
4451
|
"go",
|
|
4491
4452
|
"java",
|
|
@@ -4496,182 +4457,182 @@ var GeneratorLanguageSchema = z23.enum([
|
|
|
4496
4457
|
"swift",
|
|
4497
4458
|
"rust"
|
|
4498
4459
|
]);
|
|
4499
|
-
var ScriptSchema =
|
|
4500
|
-
steps:
|
|
4460
|
+
var ScriptSchema = z22.object({
|
|
4461
|
+
steps: z22.array(z22.string())
|
|
4501
4462
|
});
|
|
4502
|
-
var GeneratorScriptsSchema =
|
|
4463
|
+
var GeneratorScriptsSchema = z22.object({
|
|
4503
4464
|
preInstallScript: ScriptSchema.nullish(),
|
|
4504
4465
|
installScript: ScriptSchema.nullish(),
|
|
4505
4466
|
compileScript: ScriptSchema.nullish(),
|
|
4506
4467
|
testScript: ScriptSchema.nullish()
|
|
4507
4468
|
});
|
|
4508
|
-
var GeneratorTypeSchema =
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4469
|
+
var GeneratorTypeSchema = z22.discriminatedUnion("type", [
|
|
4470
|
+
z22.object({ type: z22.literal("sdk") }),
|
|
4471
|
+
z22.object({ type: z22.literal("model") }),
|
|
4472
|
+
z22.object({ type: z22.literal("server") }),
|
|
4473
|
+
z22.object({ type: z22.literal("other") })
|
|
4513
4474
|
]);
|
|
4514
|
-
var ChangelogEntryTypeSchema =
|
|
4515
|
-
var ChangelogEntrySchema =
|
|
4475
|
+
var ChangelogEntryTypeSchema = z22.enum(["fix", "feat", "chore", "break", "internal"]);
|
|
4476
|
+
var ChangelogEntrySchema = z22.object({
|
|
4516
4477
|
type: ChangelogEntryTypeSchema,
|
|
4517
|
-
summary:
|
|
4518
|
-
links:
|
|
4519
|
-
upgradeNotes:
|
|
4520
|
-
added:
|
|
4521
|
-
changed:
|
|
4522
|
-
deprecated:
|
|
4523
|
-
removed:
|
|
4524
|
-
fixed:
|
|
4525
|
-
});
|
|
4526
|
-
var YankSchema =
|
|
4527
|
-
remediationVerision:
|
|
4528
|
-
});
|
|
4529
|
-
var ReleaseTypeSchema =
|
|
4530
|
-
var VersionRangeSchema =
|
|
4531
|
-
|
|
4532
|
-
|
|
4478
|
+
summary: z22.string(),
|
|
4479
|
+
links: z22.array(z22.string()).nullish(),
|
|
4480
|
+
upgradeNotes: z22.string().nullish(),
|
|
4481
|
+
added: z22.array(z22.string()).nullish(),
|
|
4482
|
+
changed: z22.array(z22.string()).nullish(),
|
|
4483
|
+
deprecated: z22.array(z22.string()).nullish(),
|
|
4484
|
+
removed: z22.array(z22.string()).nullish(),
|
|
4485
|
+
fixed: z22.array(z22.string()).nullish()
|
|
4486
|
+
});
|
|
4487
|
+
var YankSchema = z22.object({
|
|
4488
|
+
remediationVerision: z22.string().nullish()
|
|
4489
|
+
});
|
|
4490
|
+
var ReleaseTypeSchema = z22.enum(["GA", "RC"]);
|
|
4491
|
+
var VersionRangeSchema = z22.discriminatedUnion("type", [
|
|
4492
|
+
z22.object({ type: z22.literal("inclusive"), value: z22.string() }),
|
|
4493
|
+
z22.object({ type: z22.literal("exclusive"), value: z22.string() })
|
|
4533
4494
|
]);
|
|
4534
|
-
var GeneratorSchema =
|
|
4535
|
-
id:
|
|
4536
|
-
displayName:
|
|
4495
|
+
var GeneratorSchema = z22.object({
|
|
4496
|
+
id: z22.string(),
|
|
4497
|
+
displayName: z22.string(),
|
|
4537
4498
|
generatorType: GeneratorTypeSchema,
|
|
4538
4499
|
generatorLanguage: GeneratorLanguageSchema.nullish(),
|
|
4539
|
-
dockerImage:
|
|
4500
|
+
dockerImage: z22.string(),
|
|
4540
4501
|
scripts: GeneratorScriptsSchema.nullish()
|
|
4541
4502
|
});
|
|
4542
|
-
var GeneratorOutputSchema =
|
|
4543
|
-
id:
|
|
4544
|
-
displayName:
|
|
4503
|
+
var GeneratorOutputSchema = z22.object({
|
|
4504
|
+
id: z22.string(),
|
|
4505
|
+
displayName: z22.string(),
|
|
4545
4506
|
generatorType: GeneratorTypeSchema,
|
|
4546
4507
|
generatorLanguage: GeneratorLanguageSchema.nullish(),
|
|
4547
|
-
dockerImage:
|
|
4508
|
+
dockerImage: z22.string(),
|
|
4548
4509
|
scripts: GeneratorScriptsSchema.nullish()
|
|
4549
4510
|
});
|
|
4550
|
-
var GetGeneratorByImageInputSchema =
|
|
4551
|
-
dockerImage:
|
|
4511
|
+
var GetGeneratorByImageInputSchema = z22.object({
|
|
4512
|
+
dockerImage: z22.string()
|
|
4552
4513
|
});
|
|
4553
|
-
var GetGeneratorInputSchema =
|
|
4554
|
-
generatorId:
|
|
4514
|
+
var GetGeneratorInputSchema = z22.object({
|
|
4515
|
+
generatorId: z22.string()
|
|
4555
4516
|
});
|
|
4556
|
-
var GeneratorReleaseSchema =
|
|
4557
|
-
version:
|
|
4558
|
-
createdAt:
|
|
4517
|
+
var GeneratorReleaseSchema = z22.object({
|
|
4518
|
+
version: z22.string(),
|
|
4519
|
+
createdAt: z22.string().nullish(),
|
|
4559
4520
|
isYanked: YankSchema.nullish(),
|
|
4560
|
-
changelogEntry:
|
|
4521
|
+
changelogEntry: z22.array(ChangelogEntrySchema).nullish(),
|
|
4561
4522
|
releaseType: ReleaseTypeSchema,
|
|
4562
|
-
majorVersion:
|
|
4563
|
-
generatorId:
|
|
4564
|
-
irVersion:
|
|
4565
|
-
migration:
|
|
4566
|
-
customConfigSchema:
|
|
4567
|
-
tags:
|
|
4568
|
-
});
|
|
4569
|
-
var GeneratorReleaseRequestSchema =
|
|
4570
|
-
version:
|
|
4571
|
-
createdAt:
|
|
4523
|
+
majorVersion: z22.number(),
|
|
4524
|
+
generatorId: z22.string(),
|
|
4525
|
+
irVersion: z22.number(),
|
|
4526
|
+
migration: z22.string().nullish(),
|
|
4527
|
+
customConfigSchema: z22.string().nullish(),
|
|
4528
|
+
tags: z22.array(z22.string()).nullish()
|
|
4529
|
+
});
|
|
4530
|
+
var GeneratorReleaseRequestSchema = z22.object({
|
|
4531
|
+
version: z22.string(),
|
|
4532
|
+
createdAt: z22.string().nullish(),
|
|
4572
4533
|
isYanked: YankSchema.nullish(),
|
|
4573
|
-
changelogEntry:
|
|
4574
|
-
generatorId:
|
|
4575
|
-
irVersion:
|
|
4576
|
-
migration:
|
|
4577
|
-
customConfigSchema:
|
|
4578
|
-
tags:
|
|
4579
|
-
});
|
|
4580
|
-
var GetLatestGeneratorReleaseInputSchema =
|
|
4581
|
-
generator:
|
|
4582
|
-
cliVersion:
|
|
4583
|
-
irVersion:
|
|
4584
|
-
generatorMajorVersion:
|
|
4585
|
-
releaseTypes:
|
|
4586
|
-
});
|
|
4587
|
-
var GetGeneratorChangelogInputSchema =
|
|
4588
|
-
generator:
|
|
4534
|
+
changelogEntry: z22.array(ChangelogEntrySchema).nullish(),
|
|
4535
|
+
generatorId: z22.string(),
|
|
4536
|
+
irVersion: z22.number(),
|
|
4537
|
+
migration: z22.string().nullish(),
|
|
4538
|
+
customConfigSchema: z22.string().nullish(),
|
|
4539
|
+
tags: z22.array(z22.string()).nullish()
|
|
4540
|
+
});
|
|
4541
|
+
var GetLatestGeneratorReleaseInputSchema = z22.object({
|
|
4542
|
+
generator: z22.string(),
|
|
4543
|
+
cliVersion: z22.string().nullish(),
|
|
4544
|
+
irVersion: z22.number().nullish(),
|
|
4545
|
+
generatorMajorVersion: z22.number().nullish(),
|
|
4546
|
+
releaseTypes: z22.array(ReleaseTypeSchema).nullish()
|
|
4547
|
+
});
|
|
4548
|
+
var GetGeneratorChangelogInputSchema = z22.object({
|
|
4549
|
+
generator: z22.string(),
|
|
4589
4550
|
fromVersion: VersionRangeSchema,
|
|
4590
4551
|
toVersion: VersionRangeSchema
|
|
4591
4552
|
});
|
|
4592
|
-
var ChangelogResponseSchema =
|
|
4593
|
-
version:
|
|
4594
|
-
changelogEntry:
|
|
4553
|
+
var ChangelogResponseSchema = z22.object({
|
|
4554
|
+
version: z22.string(),
|
|
4555
|
+
changelogEntry: z22.array(ChangelogEntrySchema)
|
|
4595
4556
|
});
|
|
4596
|
-
var GetChangelogResponseSchema =
|
|
4597
|
-
entries:
|
|
4557
|
+
var GetChangelogResponseSchema = z22.object({
|
|
4558
|
+
entries: z22.array(ChangelogResponseSchema)
|
|
4598
4559
|
});
|
|
4599
|
-
var GetGeneratorReleaseInputSchema =
|
|
4600
|
-
generator:
|
|
4601
|
-
version:
|
|
4560
|
+
var GetGeneratorReleaseInputSchema = z22.object({
|
|
4561
|
+
generator: z22.string(),
|
|
4562
|
+
version: z22.string()
|
|
4602
4563
|
});
|
|
4603
|
-
var ListGeneratorReleasesInputSchema =
|
|
4604
|
-
generator:
|
|
4605
|
-
page:
|
|
4606
|
-
pageSize:
|
|
4564
|
+
var ListGeneratorReleasesInputSchema = z22.object({
|
|
4565
|
+
generator: z22.string(),
|
|
4566
|
+
page: z22.coerce.number().nullish(),
|
|
4567
|
+
pageSize: z22.coerce.number().nullish()
|
|
4607
4568
|
});
|
|
4608
|
-
var ListGeneratorReleasesResponseSchema =
|
|
4609
|
-
generatorReleases:
|
|
4569
|
+
var ListGeneratorReleasesResponseSchema = z22.object({
|
|
4570
|
+
generatorReleases: z22.array(GeneratorReleaseSchema)
|
|
4610
4571
|
});
|
|
4611
|
-
var CliReleaseSchema =
|
|
4612
|
-
version:
|
|
4613
|
-
createdAt:
|
|
4572
|
+
var CliReleaseSchema = z22.object({
|
|
4573
|
+
version: z22.string(),
|
|
4574
|
+
createdAt: z22.string().nullish(),
|
|
4614
4575
|
isYanked: YankSchema.nullish(),
|
|
4615
|
-
changelogEntry:
|
|
4576
|
+
changelogEntry: z22.array(ChangelogEntrySchema).nullish(),
|
|
4616
4577
|
releaseType: ReleaseTypeSchema,
|
|
4617
|
-
majorVersion:
|
|
4618
|
-
irVersion:
|
|
4619
|
-
tags:
|
|
4578
|
+
majorVersion: z22.number(),
|
|
4579
|
+
irVersion: z22.number(),
|
|
4580
|
+
tags: z22.array(z22.string()).nullish()
|
|
4620
4581
|
});
|
|
4621
|
-
var GetLatestCliReleaseInputSchema =
|
|
4622
|
-
releaseTypes:
|
|
4623
|
-
irVersion:
|
|
4582
|
+
var GetLatestCliReleaseInputSchema = z22.object({
|
|
4583
|
+
releaseTypes: z22.array(ReleaseTypeSchema).nullish(),
|
|
4584
|
+
irVersion: z22.number().nullish()
|
|
4624
4585
|
});
|
|
4625
|
-
var GetCliChangelogInputSchema =
|
|
4586
|
+
var GetCliChangelogInputSchema = z22.object({
|
|
4626
4587
|
fromVersion: VersionRangeSchema,
|
|
4627
4588
|
toVersion: VersionRangeSchema
|
|
4628
4589
|
});
|
|
4629
|
-
var GetMinCliForIrInputSchema =
|
|
4630
|
-
irVersion:
|
|
4590
|
+
var GetMinCliForIrInputSchema = z22.object({
|
|
4591
|
+
irVersion: z22.coerce.number()
|
|
4631
4592
|
});
|
|
4632
|
-
var UpsertCliReleaseInputSchema =
|
|
4633
|
-
version:
|
|
4634
|
-
createdAt:
|
|
4593
|
+
var UpsertCliReleaseInputSchema = z22.object({
|
|
4594
|
+
version: z22.string(),
|
|
4595
|
+
createdAt: z22.string().nullish(),
|
|
4635
4596
|
isYanked: YankSchema.nullish(),
|
|
4636
|
-
changelogEntry:
|
|
4637
|
-
irVersion:
|
|
4638
|
-
tags:
|
|
4597
|
+
changelogEntry: z22.array(ChangelogEntrySchema).nullish(),
|
|
4598
|
+
irVersion: z22.number(),
|
|
4599
|
+
tags: z22.array(z22.string()).nullish()
|
|
4639
4600
|
});
|
|
4640
|
-
var GetCliReleaseInputSchema =
|
|
4641
|
-
cliVersion:
|
|
4601
|
+
var GetCliReleaseInputSchema = z22.object({
|
|
4602
|
+
cliVersion: z22.string()
|
|
4642
4603
|
});
|
|
4643
|
-
var ListCliReleasesInputSchema =
|
|
4644
|
-
page:
|
|
4645
|
-
pageSize:
|
|
4604
|
+
var ListCliReleasesInputSchema = z22.object({
|
|
4605
|
+
page: z22.coerce.number().nullish(),
|
|
4606
|
+
pageSize: z22.coerce.number().nullish()
|
|
4646
4607
|
});
|
|
4647
|
-
var ListCliReleasesResponseSchema =
|
|
4648
|
-
cliReleases:
|
|
4608
|
+
var ListCliReleasesResponseSchema = z22.object({
|
|
4609
|
+
cliReleases: z22.array(CliReleaseSchema)
|
|
4649
4610
|
});
|
|
4650
4611
|
var generatorsContract = {
|
|
4651
|
-
upsertGenerator:
|
|
4652
|
-
getGeneratorByImage:
|
|
4653
|
-
getGenerator:
|
|
4654
|
-
listGenerators:
|
|
4612
|
+
upsertGenerator: oc12.route({ method: "PUT", path: "/" }).input(GeneratorSchema).output(z22.void()),
|
|
4613
|
+
getGeneratorByImage: oc12.route({ method: "POST", path: "/by-image" }).input(GetGeneratorByImageInputSchema).output(GeneratorOutputSchema.nullish()),
|
|
4614
|
+
getGenerator: oc12.route({ method: "GET", path: "/{generatorId}" }).input(GetGeneratorInputSchema).output(GeneratorOutputSchema.nullish()),
|
|
4615
|
+
listGenerators: oc12.route({ method: "GET", path: "/" }).input(z22.object({})).output(z22.array(GeneratorOutputSchema))
|
|
4655
4616
|
};
|
|
4656
4617
|
var generatorVersionsContract = {
|
|
4657
|
-
getLatestGeneratorRelease:
|
|
4658
|
-
getChangelog:
|
|
4659
|
-
upsertGeneratorRelease:
|
|
4660
|
-
getGeneratorRelease:
|
|
4661
|
-
listGeneratorReleases:
|
|
4618
|
+
getLatestGeneratorRelease: oc12.route({ method: "POST", path: "/latest" }).input(GetLatestGeneratorReleaseInputSchema).output(GeneratorReleaseSchema),
|
|
4619
|
+
getChangelog: oc12.route({ method: "POST", path: "/{generator}/changelog" }).input(GetGeneratorChangelogInputSchema).output(GetChangelogResponseSchema),
|
|
4620
|
+
upsertGeneratorRelease: oc12.route({ method: "PUT", path: "/" }).input(GeneratorReleaseRequestSchema).output(z22.void()),
|
|
4621
|
+
getGeneratorRelease: oc12.route({ method: "GET", path: "/{generator}/{version}" }).input(GetGeneratorReleaseInputSchema).output(GeneratorReleaseSchema),
|
|
4622
|
+
listGeneratorReleases: oc12.route({ method: "GET", path: "/{generator}" }).input(ListGeneratorReleasesInputSchema).output(ListGeneratorReleasesResponseSchema)
|
|
4662
4623
|
};
|
|
4663
4624
|
var generatorCliContract = {
|
|
4664
|
-
getLatestCliRelease:
|
|
4665
|
-
getChangelog:
|
|
4666
|
-
getMinCliForIr:
|
|
4667
|
-
upsertCliRelease:
|
|
4668
|
-
getCliRelease:
|
|
4669
|
-
listCliReleases:
|
|
4625
|
+
getLatestCliRelease: oc12.route({ method: "POST", path: "/latest" }).input(GetLatestCliReleaseInputSchema).output(CliReleaseSchema),
|
|
4626
|
+
getChangelog: oc12.route({ method: "POST", path: "/changelog" }).input(GetCliChangelogInputSchema).output(GetChangelogResponseSchema),
|
|
4627
|
+
getMinCliForIr: oc12.route({ method: "GET", path: "/for-ir/{irVersion}" }).input(GetMinCliForIrInputSchema).output(CliReleaseSchema),
|
|
4628
|
+
upsertCliRelease: oc12.route({ method: "PUT", path: "/" }).input(UpsertCliReleaseInputSchema).output(z22.void()),
|
|
4629
|
+
getCliRelease: oc12.route({ method: "GET", path: "/{cliVersion}" }).input(GetCliReleaseInputSchema).output(CliReleaseSchema),
|
|
4630
|
+
listCliReleases: oc12.route({ method: "GET", path: "/" }).input(ListCliReleasesInputSchema).output(ListCliReleasesResponseSchema)
|
|
4670
4631
|
};
|
|
4671
4632
|
|
|
4672
4633
|
// src/orpc-client/generators/cli/client.ts
|
|
4673
4634
|
function createGeneratorCliClient(options) {
|
|
4674
|
-
const link = new
|
|
4635
|
+
const link = new OpenAPILink12(generatorCliContract, {
|
|
4675
4636
|
url: `${options.baseUrl}/generators/cli`,
|
|
4676
4637
|
headers: () => ({
|
|
4677
4638
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -4679,14 +4640,14 @@ function createGeneratorCliClient(options) {
|
|
|
4679
4640
|
}),
|
|
4680
4641
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
4681
4642
|
});
|
|
4682
|
-
return
|
|
4643
|
+
return createORPCClient12(link);
|
|
4683
4644
|
}
|
|
4684
4645
|
|
|
4685
4646
|
// src/orpc-client/generators/client.ts
|
|
4686
|
-
import { createORPCClient as
|
|
4687
|
-
import { OpenAPILink as
|
|
4647
|
+
import { createORPCClient as createORPCClient13 } from "@orpc/client";
|
|
4648
|
+
import { OpenAPILink as OpenAPILink13 } from "@orpc/openapi-client/fetch";
|
|
4688
4649
|
function createGeneratorsRootClient(options) {
|
|
4689
|
-
const link = new
|
|
4650
|
+
const link = new OpenAPILink13(generatorsContract, {
|
|
4690
4651
|
url: `${options.baseUrl}/generators`,
|
|
4691
4652
|
headers: () => ({
|
|
4692
4653
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -4694,14 +4655,14 @@ function createGeneratorsRootClient(options) {
|
|
|
4694
4655
|
}),
|
|
4695
4656
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
4696
4657
|
});
|
|
4697
|
-
return
|
|
4658
|
+
return createORPCClient13(link);
|
|
4698
4659
|
}
|
|
4699
4660
|
|
|
4700
4661
|
// src/orpc-client/generators/versions/client.ts
|
|
4701
|
-
import { createORPCClient as
|
|
4702
|
-
import { OpenAPILink as
|
|
4662
|
+
import { createORPCClient as createORPCClient14 } from "@orpc/client";
|
|
4663
|
+
import { OpenAPILink as OpenAPILink14 } from "@orpc/openapi-client/fetch";
|
|
4703
4664
|
function createGeneratorVersionsClient(options) {
|
|
4704
|
-
const link = new
|
|
4665
|
+
const link = new OpenAPILink14(generatorVersionsContract, {
|
|
4705
4666
|
url: `${options.baseUrl}/generators/versions`,
|
|
4706
4667
|
headers: () => ({
|
|
4707
4668
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -4709,130 +4670,130 @@ function createGeneratorVersionsClient(options) {
|
|
|
4709
4670
|
}),
|
|
4710
4671
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
4711
4672
|
});
|
|
4712
|
-
return
|
|
4673
|
+
return createORPCClient14(link);
|
|
4713
4674
|
}
|
|
4714
4675
|
|
|
4715
4676
|
// src/orpc-client/git/client.ts
|
|
4716
|
-
import { createORPCClient as
|
|
4717
|
-
import { OpenAPILink as
|
|
4677
|
+
import { createORPCClient as createORPCClient15 } from "@orpc/client";
|
|
4678
|
+
import { OpenAPILink as OpenAPILink15 } from "@orpc/openapi-client/fetch";
|
|
4718
4679
|
|
|
4719
4680
|
// src/orpc-client/git/contract.ts
|
|
4720
|
-
import { oc as
|
|
4721
|
-
import * as
|
|
4722
|
-
var CheckRunSchema =
|
|
4723
|
-
checkId:
|
|
4724
|
-
repositoryOwner:
|
|
4725
|
-
repositoryName:
|
|
4726
|
-
ref:
|
|
4727
|
-
name:
|
|
4728
|
-
status:
|
|
4729
|
-
conclusion:
|
|
4730
|
-
checkRunUrl:
|
|
4731
|
-
createdAt:
|
|
4732
|
-
completedAt:
|
|
4733
|
-
rawCheckRun:
|
|
4734
|
-
});
|
|
4735
|
-
var GithubRepositoryIdSchema =
|
|
4736
|
-
id:
|
|
4737
|
-
});
|
|
4738
|
-
var RepositoryIdSchema =
|
|
4739
|
-
|
|
4681
|
+
import { oc as oc13 } from "@orpc/contract";
|
|
4682
|
+
import * as z23 from "zod";
|
|
4683
|
+
var CheckRunSchema = z23.object({
|
|
4684
|
+
checkId: z23.string(),
|
|
4685
|
+
repositoryOwner: z23.string(),
|
|
4686
|
+
repositoryName: z23.string(),
|
|
4687
|
+
ref: z23.string(),
|
|
4688
|
+
name: z23.string(),
|
|
4689
|
+
status: z23.string(),
|
|
4690
|
+
conclusion: z23.string(),
|
|
4691
|
+
checkRunUrl: z23.string(),
|
|
4692
|
+
createdAt: z23.string(),
|
|
4693
|
+
completedAt: z23.string().nullish(),
|
|
4694
|
+
rawCheckRun: z23.unknown()
|
|
4695
|
+
});
|
|
4696
|
+
var GithubRepositoryIdSchema = z23.object({
|
|
4697
|
+
id: z23.string()
|
|
4698
|
+
});
|
|
4699
|
+
var RepositoryIdSchema = z23.discriminatedUnion("type", [
|
|
4700
|
+
z23.object({ type: z23.literal("github") }).merge(GithubRepositoryIdSchema)
|
|
4740
4701
|
]);
|
|
4741
|
-
var BaseRepositorySchema =
|
|
4702
|
+
var BaseRepositorySchema = z23.object({
|
|
4742
4703
|
id: RepositoryIdSchema,
|
|
4743
|
-
name:
|
|
4744
|
-
owner:
|
|
4745
|
-
fullName:
|
|
4746
|
-
url:
|
|
4747
|
-
repositoryOwnerOrganizationId:
|
|
4748
|
-
defaultBranchChecks:
|
|
4704
|
+
name: z23.string(),
|
|
4705
|
+
owner: z23.string(),
|
|
4706
|
+
fullName: z23.string(),
|
|
4707
|
+
url: z23.string(),
|
|
4708
|
+
repositoryOwnerOrganizationId: z23.string(),
|
|
4709
|
+
defaultBranchChecks: z23.array(CheckRunSchema)
|
|
4749
4710
|
});
|
|
4750
4711
|
var SdkRepositorySchema = BaseRepositorySchema.extend({
|
|
4751
|
-
type:
|
|
4752
|
-
sdkLanguage:
|
|
4712
|
+
type: z23.literal("sdk"),
|
|
4713
|
+
sdkLanguage: z23.string()
|
|
4753
4714
|
});
|
|
4754
4715
|
var FernConfigRepositorySchema = BaseRepositorySchema.extend({
|
|
4755
|
-
type:
|
|
4716
|
+
type: z23.literal("config")
|
|
4756
4717
|
});
|
|
4757
|
-
var FernRepositorySchema =
|
|
4758
|
-
var GithubUserSchema =
|
|
4759
|
-
name:
|
|
4760
|
-
email:
|
|
4761
|
-
username:
|
|
4718
|
+
var FernRepositorySchema = z23.discriminatedUnion("type", [SdkRepositorySchema, FernConfigRepositorySchema]);
|
|
4719
|
+
var GithubUserSchema = z23.object({
|
|
4720
|
+
name: z23.string().nullish(),
|
|
4721
|
+
email: z23.string().nullish(),
|
|
4722
|
+
username: z23.string()
|
|
4762
4723
|
});
|
|
4763
|
-
var GithubTeamSchema =
|
|
4764
|
-
name:
|
|
4765
|
-
teamId:
|
|
4724
|
+
var GithubTeamSchema = z23.object({
|
|
4725
|
+
name: z23.string(),
|
|
4726
|
+
teamId: z23.string()
|
|
4766
4727
|
});
|
|
4767
|
-
var PullRequestReviewerSchema =
|
|
4768
|
-
|
|
4769
|
-
|
|
4728
|
+
var PullRequestReviewerSchema = z23.discriminatedUnion("type", [
|
|
4729
|
+
z23.object({ type: z23.literal("user") }).merge(GithubUserSchema),
|
|
4730
|
+
z23.object({ type: z23.literal("team") }).merge(GithubTeamSchema)
|
|
4770
4731
|
]);
|
|
4771
|
-
var PullRequestStateSchema =
|
|
4772
|
-
var PullRequestSchema =
|
|
4773
|
-
pullRequestNumber:
|
|
4774
|
-
repositoryName:
|
|
4775
|
-
repositoryOwner:
|
|
4732
|
+
var PullRequestStateSchema = z23.enum(["open", "closed", "merged"]);
|
|
4733
|
+
var PullRequestSchema = z23.object({
|
|
4734
|
+
pullRequestNumber: z23.number().int(),
|
|
4735
|
+
repositoryName: z23.string(),
|
|
4736
|
+
repositoryOwner: z23.string(),
|
|
4776
4737
|
author: GithubUserSchema.nullish(),
|
|
4777
|
-
reviewers:
|
|
4778
|
-
title:
|
|
4779
|
-
url:
|
|
4780
|
-
checks:
|
|
4738
|
+
reviewers: z23.array(PullRequestReviewerSchema),
|
|
4739
|
+
title: z23.string(),
|
|
4740
|
+
url: z23.string(),
|
|
4741
|
+
checks: z23.array(CheckRunSchema),
|
|
4781
4742
|
state: PullRequestStateSchema,
|
|
4782
|
-
createdAt:
|
|
4783
|
-
updatedAt:
|
|
4784
|
-
mergedAt:
|
|
4785
|
-
closedAt:
|
|
4786
|
-
});
|
|
4787
|
-
var ListRepositoriesResponseSchema =
|
|
4788
|
-
repositories:
|
|
4789
|
-
});
|
|
4790
|
-
var ListPullRequestsResponseSchema =
|
|
4791
|
-
pullRequests:
|
|
4792
|
-
});
|
|
4793
|
-
var GetRepositoryInputSchema =
|
|
4794
|
-
repositoryOwner:
|
|
4795
|
-
repositoryName:
|
|
4796
|
-
});
|
|
4797
|
-
var ListRepositoriesInputSchema =
|
|
4798
|
-
page:
|
|
4799
|
-
pageSize:
|
|
4800
|
-
organizationId:
|
|
4801
|
-
repositoryName:
|
|
4802
|
-
repositoryOwner:
|
|
4803
|
-
});
|
|
4804
|
-
var DeleteRepositoryInputSchema =
|
|
4805
|
-
repositoryOwner:
|
|
4806
|
-
repositoryName:
|
|
4807
|
-
});
|
|
4808
|
-
var GetPullRequestInputSchema =
|
|
4809
|
-
repositoryOwner:
|
|
4810
|
-
repositoryName:
|
|
4811
|
-
pullRequestNumber:
|
|
4812
|
-
});
|
|
4813
|
-
var ListPullRequestsInputSchema =
|
|
4814
|
-
page:
|
|
4815
|
-
pageSize:
|
|
4816
|
-
repositoryName:
|
|
4817
|
-
repositoryOwner:
|
|
4818
|
-
organizationId:
|
|
4819
|
-
state:
|
|
4820
|
-
author:
|
|
4821
|
-
});
|
|
4822
|
-
var DeletePullRequestInputSchema =
|
|
4823
|
-
repositoryOwner:
|
|
4824
|
-
repositoryName:
|
|
4825
|
-
pullRequestNumber:
|
|
4743
|
+
createdAt: z23.string(),
|
|
4744
|
+
updatedAt: z23.string().nullish(),
|
|
4745
|
+
mergedAt: z23.string().nullish(),
|
|
4746
|
+
closedAt: z23.string().nullish()
|
|
4747
|
+
});
|
|
4748
|
+
var ListRepositoriesResponseSchema = z23.object({
|
|
4749
|
+
repositories: z23.array(FernRepositorySchema)
|
|
4750
|
+
});
|
|
4751
|
+
var ListPullRequestsResponseSchema = z23.object({
|
|
4752
|
+
pullRequests: z23.array(PullRequestSchema)
|
|
4753
|
+
});
|
|
4754
|
+
var GetRepositoryInputSchema = z23.object({
|
|
4755
|
+
repositoryOwner: z23.string(),
|
|
4756
|
+
repositoryName: z23.string()
|
|
4757
|
+
});
|
|
4758
|
+
var ListRepositoriesInputSchema = z23.object({
|
|
4759
|
+
page: z23.number().int().nullish(),
|
|
4760
|
+
pageSize: z23.number().int().nullish(),
|
|
4761
|
+
organizationId: z23.string().nullish(),
|
|
4762
|
+
repositoryName: z23.string().nullish(),
|
|
4763
|
+
repositoryOwner: z23.string().nullish()
|
|
4764
|
+
});
|
|
4765
|
+
var DeleteRepositoryInputSchema = z23.object({
|
|
4766
|
+
repositoryOwner: z23.string(),
|
|
4767
|
+
repositoryName: z23.string()
|
|
4768
|
+
});
|
|
4769
|
+
var GetPullRequestInputSchema = z23.object({
|
|
4770
|
+
repositoryOwner: z23.string(),
|
|
4771
|
+
repositoryName: z23.string(),
|
|
4772
|
+
pullRequestNumber: z23.coerce.number().int()
|
|
4773
|
+
});
|
|
4774
|
+
var ListPullRequestsInputSchema = z23.object({
|
|
4775
|
+
page: z23.number().int().nullish(),
|
|
4776
|
+
pageSize: z23.number().int().nullish(),
|
|
4777
|
+
repositoryName: z23.string().nullish(),
|
|
4778
|
+
repositoryOwner: z23.string().nullish(),
|
|
4779
|
+
organizationId: z23.string().nullish(),
|
|
4780
|
+
state: z23.array(PullRequestStateSchema).nullish(),
|
|
4781
|
+
author: z23.array(z23.string()).nullish()
|
|
4782
|
+
});
|
|
4783
|
+
var DeletePullRequestInputSchema = z23.object({
|
|
4784
|
+
repositoryOwner: z23.string(),
|
|
4785
|
+
repositoryName: z23.string(),
|
|
4786
|
+
pullRequestNumber: z23.coerce.number().int()
|
|
4826
4787
|
});
|
|
4827
4788
|
var gitContract = {
|
|
4828
|
-
getRepository:
|
|
4829
|
-
listRepositories:
|
|
4830
|
-
upsertRepository:
|
|
4831
|
-
deleteRepository:
|
|
4832
|
-
getPullRequest:
|
|
4833
|
-
listPullRequests:
|
|
4834
|
-
upsertPullRequest:
|
|
4835
|
-
deletePullRequest:
|
|
4789
|
+
getRepository: oc13.route({ method: "GET", path: "/repository/{repositoryOwner}/{repositoryName}" }).input(GetRepositoryInputSchema).output(FernRepositorySchema),
|
|
4790
|
+
listRepositories: oc13.route({ method: "POST", path: "/repository/list" }).input(ListRepositoriesInputSchema).output(ListRepositoriesResponseSchema),
|
|
4791
|
+
upsertRepository: oc13.route({ method: "PUT", path: "/repository/upsert" }).input(FernRepositorySchema),
|
|
4792
|
+
deleteRepository: oc13.route({ method: "DELETE", path: "/repository/{repositoryOwner}/{repositoryName}/delete" }).input(DeleteRepositoryInputSchema),
|
|
4793
|
+
getPullRequest: oc13.route({ method: "GET", path: "/pull-request/{repositoryOwner}/{repositoryName}/{pullRequestNumber}" }).input(GetPullRequestInputSchema).output(PullRequestSchema),
|
|
4794
|
+
listPullRequests: oc13.route({ method: "POST", path: "/pull-request/list" }).input(ListPullRequestsInputSchema).output(ListPullRequestsResponseSchema),
|
|
4795
|
+
upsertPullRequest: oc13.route({ method: "PUT", path: "/pull-request/upsert" }).input(PullRequestSchema),
|
|
4796
|
+
deletePullRequest: oc13.route({
|
|
4836
4797
|
method: "DELETE",
|
|
4837
4798
|
path: "/pull-request/{repositoryOwner}/{repositoryName}/{pullRequestNumber}/delete"
|
|
4838
4799
|
}).input(DeletePullRequestInputSchema)
|
|
@@ -4840,7 +4801,7 @@ var gitContract = {
|
|
|
4840
4801
|
|
|
4841
4802
|
// src/orpc-client/git/client.ts
|
|
4842
4803
|
function createGitClient(options) {
|
|
4843
|
-
const link = new
|
|
4804
|
+
const link = new OpenAPILink15(gitContract, {
|
|
4844
4805
|
url: `${options.baseUrl}/generators/github`,
|
|
4845
4806
|
headers: () => ({
|
|
4846
4807
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -4848,106 +4809,106 @@ function createGitClient(options) {
|
|
|
4848
4809
|
}),
|
|
4849
4810
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
4850
4811
|
});
|
|
4851
|
-
return
|
|
4812
|
+
return createORPCClient15(link);
|
|
4852
4813
|
}
|
|
4853
4814
|
|
|
4854
4815
|
// src/orpc-client/pdf-export/client.ts
|
|
4855
|
-
import { createORPCClient as
|
|
4856
|
-
import { OpenAPILink as
|
|
4816
|
+
import { createORPCClient as createORPCClient16 } from "@orpc/client";
|
|
4817
|
+
import { OpenAPILink as OpenAPILink16 } from "@orpc/openapi-client/fetch";
|
|
4857
4818
|
|
|
4858
4819
|
// src/orpc-client/pdf-export/contract.ts
|
|
4859
|
-
import { oc as
|
|
4860
|
-
import * as
|
|
4861
|
-
var PdfExportScopeSchema =
|
|
4862
|
-
pageSlugs:
|
|
4863
|
-
});
|
|
4864
|
-
var PdfExportOptionsV1Schema =
|
|
4865
|
-
coverTitle:
|
|
4866
|
-
coverSubtitle:
|
|
4867
|
-
hideCoverFooter:
|
|
4868
|
-
headerLeftTemplate:
|
|
4869
|
-
headerRightTemplate:
|
|
4870
|
-
footerLeftTemplate:
|
|
4871
|
-
footerRightTemplate:
|
|
4820
|
+
import { oc as oc14 } from "@orpc/contract";
|
|
4821
|
+
import * as z24 from "zod";
|
|
4822
|
+
var PdfExportScopeSchema = z24.object({
|
|
4823
|
+
pageSlugs: z24.array(z24.string())
|
|
4824
|
+
});
|
|
4825
|
+
var PdfExportOptionsV1Schema = z24.object({
|
|
4826
|
+
coverTitle: z24.string().nullish(),
|
|
4827
|
+
coverSubtitle: z24.string().nullish(),
|
|
4828
|
+
hideCoverFooter: z24.boolean().nullish(),
|
|
4829
|
+
headerLeftTemplate: z24.string().nullish(),
|
|
4830
|
+
headerRightTemplate: z24.string().nullish(),
|
|
4831
|
+
footerLeftTemplate: z24.string().nullish(),
|
|
4832
|
+
footerRightTemplate: z24.string().nullish(),
|
|
4872
4833
|
scope: PdfExportScopeSchema.nullish(),
|
|
4873
|
-
hideCover:
|
|
4874
|
-
hideToc:
|
|
4834
|
+
hideCover: z24.boolean().nullish(),
|
|
4835
|
+
hideToc: z24.boolean().nullish()
|
|
4875
4836
|
});
|
|
4876
|
-
var PdfExportOptionsSchema =
|
|
4877
|
-
|
|
4837
|
+
var PdfExportOptionsSchema = z24.discriminatedUnion("version", [
|
|
4838
|
+
z24.object({ version: z24.literal("v1") }).merge(PdfExportOptionsV1Schema)
|
|
4878
4839
|
]);
|
|
4879
|
-
var PdfExportTaskStatusSchema =
|
|
4880
|
-
var PdfExportTaskSchema =
|
|
4881
|
-
id:
|
|
4882
|
-
orgId:
|
|
4883
|
-
docsUrl:
|
|
4884
|
-
productId:
|
|
4885
|
-
versionId:
|
|
4886
|
-
requesterName:
|
|
4887
|
-
notifyEmails:
|
|
4840
|
+
var PdfExportTaskStatusSchema = z24.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED"]);
|
|
4841
|
+
var PdfExportTaskSchema = z24.object({
|
|
4842
|
+
id: z24.string(),
|
|
4843
|
+
orgId: z24.string(),
|
|
4844
|
+
docsUrl: z24.string(),
|
|
4845
|
+
productId: z24.string().nullish(),
|
|
4846
|
+
versionId: z24.string().nullish(),
|
|
4847
|
+
requesterName: z24.string().nullish(),
|
|
4848
|
+
notifyEmails: z24.array(z24.string()).nullish(),
|
|
4888
4849
|
status: PdfExportTaskStatusSchema,
|
|
4889
4850
|
options: PdfExportOptionsSchema.nullish(),
|
|
4890
|
-
createdAt:
|
|
4891
|
-
startedAt:
|
|
4892
|
-
completedAt:
|
|
4893
|
-
fileName:
|
|
4894
|
-
sizeBytes:
|
|
4895
|
-
errorMessage:
|
|
4896
|
-
});
|
|
4897
|
-
var ListPdfExportTasksResponseSchema =
|
|
4898
|
-
tasks:
|
|
4899
|
-
});
|
|
4900
|
-
var PdfExportDownloadResponseSchema =
|
|
4901
|
-
downloadUrl:
|
|
4902
|
-
fileName:
|
|
4903
|
-
sizeBytes:
|
|
4904
|
-
});
|
|
4905
|
-
var CreatePdfExportTaskInputSchema =
|
|
4906
|
-
orgId:
|
|
4907
|
-
docsUrl:
|
|
4908
|
-
productId:
|
|
4909
|
-
versionId:
|
|
4910
|
-
requesterName:
|
|
4851
|
+
createdAt: z24.string(),
|
|
4852
|
+
startedAt: z24.string().nullish(),
|
|
4853
|
+
completedAt: z24.string().nullish(),
|
|
4854
|
+
fileName: z24.string().nullish(),
|
|
4855
|
+
sizeBytes: z24.number().nullish(),
|
|
4856
|
+
errorMessage: z24.string().nullish()
|
|
4857
|
+
});
|
|
4858
|
+
var ListPdfExportTasksResponseSchema = z24.object({
|
|
4859
|
+
tasks: z24.array(PdfExportTaskSchema)
|
|
4860
|
+
});
|
|
4861
|
+
var PdfExportDownloadResponseSchema = z24.object({
|
|
4862
|
+
downloadUrl: z24.string(),
|
|
4863
|
+
fileName: z24.string(),
|
|
4864
|
+
sizeBytes: z24.number()
|
|
4865
|
+
});
|
|
4866
|
+
var CreatePdfExportTaskInputSchema = z24.object({
|
|
4867
|
+
orgId: z24.string(),
|
|
4868
|
+
docsUrl: z24.string(),
|
|
4869
|
+
productId: z24.string().nullish(),
|
|
4870
|
+
versionId: z24.string().nullish(),
|
|
4871
|
+
requesterName: z24.string().nullish(),
|
|
4911
4872
|
options: PdfExportOptionsSchema.nullish()
|
|
4912
4873
|
});
|
|
4913
|
-
var ListPdfExportTasksInputSchema =
|
|
4914
|
-
orgId:
|
|
4915
|
-
docsUrl:
|
|
4916
|
-
limit:
|
|
4874
|
+
var ListPdfExportTasksInputSchema = z24.object({
|
|
4875
|
+
orgId: z24.string(),
|
|
4876
|
+
docsUrl: z24.string(),
|
|
4877
|
+
limit: z24.coerce.number().nullish()
|
|
4917
4878
|
});
|
|
4918
|
-
var GetPdfExportTaskInputSchema =
|
|
4919
|
-
taskId:
|
|
4879
|
+
var GetPdfExportTaskInputSchema = z24.object({
|
|
4880
|
+
taskId: z24.string()
|
|
4920
4881
|
});
|
|
4921
|
-
var UpdatePdfExportTaskInputSchema =
|
|
4922
|
-
taskId:
|
|
4882
|
+
var UpdatePdfExportTaskInputSchema = z24.object({
|
|
4883
|
+
taskId: z24.string(),
|
|
4923
4884
|
status: PdfExportTaskStatusSchema,
|
|
4924
|
-
startedAt:
|
|
4925
|
-
completedAt:
|
|
4926
|
-
s3Key:
|
|
4927
|
-
fileName:
|
|
4928
|
-
sizeBytes:
|
|
4929
|
-
errorMessage:
|
|
4885
|
+
startedAt: z24.string().nullish(),
|
|
4886
|
+
completedAt: z24.string().nullish(),
|
|
4887
|
+
s3Key: z24.string().nullish(),
|
|
4888
|
+
fileName: z24.string().nullish(),
|
|
4889
|
+
sizeBytes: z24.number().nullish(),
|
|
4890
|
+
errorMessage: z24.string().nullish()
|
|
4930
4891
|
});
|
|
4931
|
-
var GetPdfExportDownloadUrlInputSchema =
|
|
4932
|
-
taskId:
|
|
4892
|
+
var GetPdfExportDownloadUrlInputSchema = z24.object({
|
|
4893
|
+
taskId: z24.string()
|
|
4933
4894
|
});
|
|
4934
|
-
var CleanupPdfExportsResponseSchema =
|
|
4935
|
-
expiredTasksDeleted:
|
|
4936
|
-
s3ObjectsDeleted:
|
|
4937
|
-
timedOutTasksFailed:
|
|
4895
|
+
var CleanupPdfExportsResponseSchema = z24.object({
|
|
4896
|
+
expiredTasksDeleted: z24.number(),
|
|
4897
|
+
s3ObjectsDeleted: z24.number(),
|
|
4898
|
+
timedOutTasksFailed: z24.number()
|
|
4938
4899
|
});
|
|
4939
4900
|
var pdfExportContract = {
|
|
4940
|
-
createTask:
|
|
4941
|
-
listTasks:
|
|
4942
|
-
getTask:
|
|
4943
|
-
updateTask:
|
|
4944
|
-
getDownloadUrl:
|
|
4945
|
-
cleanup:
|
|
4901
|
+
createTask: oc14.route({ method: "POST", path: "/task" }).input(CreatePdfExportTaskInputSchema).output(PdfExportTaskSchema),
|
|
4902
|
+
listTasks: oc14.route({ method: "GET", path: "/tasks" }).input(ListPdfExportTasksInputSchema).output(ListPdfExportTasksResponseSchema),
|
|
4903
|
+
getTask: oc14.route({ method: "GET", path: "/task/{taskId}" }).input(GetPdfExportTaskInputSchema).output(PdfExportTaskSchema),
|
|
4904
|
+
updateTask: oc14.route({ method: "POST", path: "/task/{taskId}" }).input(UpdatePdfExportTaskInputSchema).output(PdfExportTaskSchema),
|
|
4905
|
+
getDownloadUrl: oc14.route({ method: "GET", path: "/task/{taskId}/download-url" }).input(GetPdfExportDownloadUrlInputSchema).output(PdfExportDownloadResponseSchema),
|
|
4906
|
+
cleanup: oc14.route({ method: "POST", path: "/cleanup" }).output(CleanupPdfExportsResponseSchema)
|
|
4946
4907
|
};
|
|
4947
4908
|
|
|
4948
4909
|
// src/orpc-client/pdf-export/client.ts
|
|
4949
4910
|
function createPdfExportClient(options) {
|
|
4950
|
-
const link = new
|
|
4911
|
+
const link = new OpenAPILink16(pdfExportContract, {
|
|
4951
4912
|
url: `${options.baseUrl}/pdf-export`,
|
|
4952
4913
|
headers: () => ({
|
|
4953
4914
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -4955,17 +4916,17 @@ function createPdfExportClient(options) {
|
|
|
4955
4916
|
}),
|
|
4956
4917
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
4957
4918
|
});
|
|
4958
|
-
return
|
|
4919
|
+
return createORPCClient16(link);
|
|
4959
4920
|
}
|
|
4960
4921
|
|
|
4961
4922
|
// src/orpc-client/sdks/client.ts
|
|
4962
|
-
import { createORPCClient as
|
|
4963
|
-
import { OpenAPILink as
|
|
4923
|
+
import { createORPCClient as createORPCClient17 } from "@orpc/client";
|
|
4924
|
+
import { OpenAPILink as OpenAPILink17 } from "@orpc/openapi-client/fetch";
|
|
4964
4925
|
|
|
4965
4926
|
// src/orpc-client/sdks/contract.ts
|
|
4966
|
-
import { oc as
|
|
4967
|
-
import * as
|
|
4968
|
-
var LanguageEnumSchema =
|
|
4927
|
+
import { oc as oc15 } from "@orpc/contract";
|
|
4928
|
+
import * as z25 from "zod";
|
|
4929
|
+
var LanguageEnumSchema = z25.enum([
|
|
4969
4930
|
"Go",
|
|
4970
4931
|
"TypeScript",
|
|
4971
4932
|
"Java",
|
|
@@ -4976,23 +4937,23 @@ var LanguageEnumSchema = z26.enum([
|
|
|
4976
4937
|
"Swift",
|
|
4977
4938
|
"Rust"
|
|
4978
4939
|
]);
|
|
4979
|
-
var VersionBumpEnumSchema =
|
|
4980
|
-
var ComputeSemanticVersionInputSchema =
|
|
4981
|
-
package:
|
|
4940
|
+
var VersionBumpEnumSchema = z25.enum(["MAJOR", "MINOR", "PATCH"]);
|
|
4941
|
+
var ComputeSemanticVersionInputSchema = z25.object({
|
|
4942
|
+
package: z25.string(),
|
|
4982
4943
|
language: LanguageEnumSchema,
|
|
4983
|
-
githubRepository:
|
|
4944
|
+
githubRepository: z25.string().nullish()
|
|
4984
4945
|
});
|
|
4985
|
-
var ComputeSemanticVersionOutputSchema =
|
|
4986
|
-
version:
|
|
4946
|
+
var ComputeSemanticVersionOutputSchema = z25.object({
|
|
4947
|
+
version: z25.string(),
|
|
4987
4948
|
bump: VersionBumpEnumSchema
|
|
4988
4949
|
});
|
|
4989
4950
|
var sdksContract = {
|
|
4990
|
-
computeSemanticVersion:
|
|
4951
|
+
computeSemanticVersion: oc15.route({ method: "POST", path: "/semantic-version/compute" }).input(ComputeSemanticVersionInputSchema).output(ComputeSemanticVersionOutputSchema)
|
|
4991
4952
|
};
|
|
4992
4953
|
|
|
4993
4954
|
// src/orpc-client/sdks/client.ts
|
|
4994
4955
|
function createSdksClient(options) {
|
|
4995
|
-
const link = new
|
|
4956
|
+
const link = new OpenAPILink17(sdksContract, {
|
|
4996
4957
|
url: `${options.baseUrl}/sdks`,
|
|
4997
4958
|
headers: () => ({
|
|
4998
4959
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5000,50 +4961,50 @@ function createSdksClient(options) {
|
|
|
5000
4961
|
}),
|
|
5001
4962
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5002
4963
|
});
|
|
5003
|
-
return
|
|
4964
|
+
return createORPCClient17(link);
|
|
5004
4965
|
}
|
|
5005
4966
|
|
|
5006
4967
|
// src/orpc-client/slugs/client.ts
|
|
5007
|
-
import { createORPCClient as
|
|
5008
|
-
import { OpenAPILink as
|
|
4968
|
+
import { createORPCClient as createORPCClient18 } from "@orpc/client";
|
|
4969
|
+
import { OpenAPILink as OpenAPILink18 } from "@orpc/openapi-client/fetch";
|
|
5009
4970
|
|
|
5010
4971
|
// src/orpc-client/slugs/contract.ts
|
|
5011
|
-
import { oc as
|
|
5012
|
-
import * as
|
|
5013
|
-
var SlugsInputSchema =
|
|
5014
|
-
domain:
|
|
5015
|
-
basepath:
|
|
5016
|
-
});
|
|
5017
|
-
var SlugEntrySchema =
|
|
5018
|
-
orgId:
|
|
5019
|
-
domain:
|
|
5020
|
-
basepath:
|
|
5021
|
-
slug:
|
|
5022
|
-
lastUpdated:
|
|
5023
|
-
});
|
|
5024
|
-
var MarkdownEntrySchema =
|
|
5025
|
-
orgId:
|
|
5026
|
-
domain:
|
|
5027
|
-
basepath:
|
|
5028
|
-
pageId:
|
|
5029
|
-
slug:
|
|
5030
|
-
hash:
|
|
5031
|
-
lastUpdated:
|
|
5032
|
-
});
|
|
5033
|
-
var GetSlugEntriesResponseSchema =
|
|
5034
|
-
entries:
|
|
5035
|
-
});
|
|
5036
|
-
var GetMarkdownEntriesResponseSchema =
|
|
5037
|
-
entries:
|
|
4972
|
+
import { oc as oc16 } from "@orpc/contract";
|
|
4973
|
+
import * as z26 from "zod";
|
|
4974
|
+
var SlugsInputSchema = z26.object({
|
|
4975
|
+
domain: z26.string(),
|
|
4976
|
+
basepath: z26.string().optional().default("")
|
|
4977
|
+
});
|
|
4978
|
+
var SlugEntrySchema = z26.object({
|
|
4979
|
+
orgId: z26.string(),
|
|
4980
|
+
domain: z26.string(),
|
|
4981
|
+
basepath: z26.string(),
|
|
4982
|
+
slug: z26.string(),
|
|
4983
|
+
lastUpdated: z26.string()
|
|
4984
|
+
});
|
|
4985
|
+
var MarkdownEntrySchema = z26.object({
|
|
4986
|
+
orgId: z26.string(),
|
|
4987
|
+
domain: z26.string(),
|
|
4988
|
+
basepath: z26.string(),
|
|
4989
|
+
pageId: z26.string(),
|
|
4990
|
+
slug: z26.string(),
|
|
4991
|
+
hash: z26.string(),
|
|
4992
|
+
lastUpdated: z26.string()
|
|
4993
|
+
});
|
|
4994
|
+
var GetSlugEntriesResponseSchema = z26.object({
|
|
4995
|
+
entries: z26.array(SlugEntrySchema)
|
|
4996
|
+
});
|
|
4997
|
+
var GetMarkdownEntriesResponseSchema = z26.object({
|
|
4998
|
+
entries: z26.array(MarkdownEntrySchema)
|
|
5038
4999
|
});
|
|
5039
5000
|
var slugsContract = {
|
|
5040
|
-
getSlugEntries:
|
|
5041
|
-
getMarkdownEntries:
|
|
5001
|
+
getSlugEntries: oc16.route({ method: "POST", path: "/slugs" }).input(SlugsInputSchema).output(GetSlugEntriesResponseSchema),
|
|
5002
|
+
getMarkdownEntries: oc16.route({ method: "POST", path: "/markdowns" }).input(SlugsInputSchema).output(GetMarkdownEntriesResponseSchema)
|
|
5042
5003
|
};
|
|
5043
5004
|
|
|
5044
5005
|
// src/orpc-client/slugs/client.ts
|
|
5045
5006
|
function createSlugsClient(options) {
|
|
5046
|
-
const link = new
|
|
5007
|
+
const link = new OpenAPILink18(slugsContract, {
|
|
5047
5008
|
url: `${options.baseUrl.replace(/\/+$/, "")}/slugs`,
|
|
5048
5009
|
headers: () => ({
|
|
5049
5010
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5051,118 +5012,118 @@ function createSlugsClient(options) {
|
|
|
5051
5012
|
}),
|
|
5052
5013
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5053
5014
|
});
|
|
5054
|
-
return
|
|
5015
|
+
return createORPCClient18(link);
|
|
5055
5016
|
}
|
|
5056
5017
|
|
|
5057
5018
|
// src/orpc-client/snippets/client.ts
|
|
5058
|
-
import { createORPCClient as
|
|
5059
|
-
import { OpenAPILink as
|
|
5019
|
+
import { createORPCClient as createORPCClient19 } from "@orpc/client";
|
|
5020
|
+
import { OpenAPILink as OpenAPILink19 } from "@orpc/openapi-client/fetch";
|
|
5060
5021
|
|
|
5061
5022
|
// src/orpc-client/snippets/contract.ts
|
|
5062
|
-
import { oc as
|
|
5063
|
-
import * as
|
|
5064
|
-
var TypeScriptSdkSchema =
|
|
5065
|
-
var PythonSdkSchema =
|
|
5066
|
-
var GoSdkSchema =
|
|
5067
|
-
var RubySdkSchema =
|
|
5068
|
-
var JavaSdkSchema =
|
|
5069
|
-
var CsharpSdkSchema =
|
|
5070
|
-
var BaseSnippetCreateSchema =
|
|
5023
|
+
import { oc as oc17 } from "@orpc/contract";
|
|
5024
|
+
import * as z27 from "zod";
|
|
5025
|
+
var TypeScriptSdkSchema = z27.object({ package: z27.string(), version: z27.string() });
|
|
5026
|
+
var PythonSdkSchema = z27.object({ package: z27.string(), version: z27.string() });
|
|
5027
|
+
var GoSdkSchema = z27.object({ githubRepo: z27.string(), version: z27.string() });
|
|
5028
|
+
var RubySdkSchema = z27.object({ gem: z27.string(), version: z27.string() });
|
|
5029
|
+
var JavaSdkSchema = z27.object({ group: z27.string(), artifact: z27.string(), version: z27.string() });
|
|
5030
|
+
var CsharpSdkSchema = z27.object({ package: z27.string(), version: z27.string() });
|
|
5031
|
+
var BaseSnippetCreateSchema = z27.object({
|
|
5071
5032
|
endpoint: EndpointIdentifierSchema,
|
|
5072
|
-
exampleIdentifier:
|
|
5033
|
+
exampleIdentifier: z27.string().nullish()
|
|
5073
5034
|
});
|
|
5074
|
-
var SdkSnippetsCreateSchema =
|
|
5075
|
-
|
|
5076
|
-
type:
|
|
5035
|
+
var SdkSnippetsCreateSchema = z27.discriminatedUnion("type", [
|
|
5036
|
+
z27.object({
|
|
5037
|
+
type: z27.literal("typescript"),
|
|
5077
5038
|
sdk: TypeScriptSdkSchema,
|
|
5078
|
-
snippets:
|
|
5039
|
+
snippets: z27.array(BaseSnippetCreateSchema.extend({ snippet: z27.object({ client: z27.string() }) }))
|
|
5079
5040
|
}),
|
|
5080
|
-
|
|
5081
|
-
type:
|
|
5041
|
+
z27.object({
|
|
5042
|
+
type: z27.literal("python"),
|
|
5082
5043
|
sdk: PythonSdkSchema,
|
|
5083
|
-
snippets:
|
|
5044
|
+
snippets: z27.array(
|
|
5084
5045
|
BaseSnippetCreateSchema.extend({
|
|
5085
|
-
snippet:
|
|
5046
|
+
snippet: z27.object({ async_client: z27.string(), sync_client: z27.string() })
|
|
5086
5047
|
})
|
|
5087
5048
|
)
|
|
5088
5049
|
}),
|
|
5089
|
-
|
|
5090
|
-
type:
|
|
5050
|
+
z27.object({
|
|
5051
|
+
type: z27.literal("go"),
|
|
5091
5052
|
sdk: GoSdkSchema,
|
|
5092
|
-
snippets:
|
|
5053
|
+
snippets: z27.array(BaseSnippetCreateSchema.extend({ snippet: z27.object({ client: z27.string() }) }))
|
|
5093
5054
|
}),
|
|
5094
|
-
|
|
5095
|
-
type:
|
|
5055
|
+
z27.object({
|
|
5056
|
+
type: z27.literal("java"),
|
|
5096
5057
|
sdk: JavaSdkSchema,
|
|
5097
|
-
snippets:
|
|
5058
|
+
snippets: z27.array(
|
|
5098
5059
|
BaseSnippetCreateSchema.extend({
|
|
5099
|
-
snippet:
|
|
5060
|
+
snippet: z27.object({ async_client: z27.string(), sync_client: z27.string() })
|
|
5100
5061
|
})
|
|
5101
5062
|
)
|
|
5102
5063
|
}),
|
|
5103
|
-
|
|
5104
|
-
type:
|
|
5064
|
+
z27.object({
|
|
5065
|
+
type: z27.literal("ruby"),
|
|
5105
5066
|
sdk: RubySdkSchema,
|
|
5106
|
-
snippets:
|
|
5067
|
+
snippets: z27.array(BaseSnippetCreateSchema.extend({ snippet: z27.object({ client: z27.string() }) }))
|
|
5107
5068
|
}),
|
|
5108
|
-
|
|
5109
|
-
type:
|
|
5069
|
+
z27.object({
|
|
5070
|
+
type: z27.literal("csharp"),
|
|
5110
5071
|
sdk: CsharpSdkSchema,
|
|
5111
|
-
snippets:
|
|
5072
|
+
snippets: z27.array(BaseSnippetCreateSchema.extend({ snippet: z27.object({ client: z27.string() }) }))
|
|
5112
5073
|
})
|
|
5113
5074
|
]);
|
|
5114
5075
|
var snippetsFactoryContract = {
|
|
5115
|
-
createSnippetsForSdk:
|
|
5116
|
-
|
|
5117
|
-
orgId:
|
|
5118
|
-
apiId:
|
|
5076
|
+
createSnippetsForSdk: oc17.route({ method: "POST", path: "/create" }).input(
|
|
5077
|
+
z27.object({
|
|
5078
|
+
orgId: z27.string(),
|
|
5079
|
+
apiId: z27.string(),
|
|
5119
5080
|
snippets: SdkSnippetsCreateSchema
|
|
5120
5081
|
})
|
|
5121
5082
|
)
|
|
5122
5083
|
};
|
|
5123
|
-
var ParameterPayloadSchema =
|
|
5124
|
-
name:
|
|
5125
|
-
value:
|
|
5084
|
+
var ParameterPayloadSchema = z27.object({
|
|
5085
|
+
name: z27.string(),
|
|
5086
|
+
value: z27.unknown()
|
|
5126
5087
|
});
|
|
5127
|
-
var AuthPayloadSchema =
|
|
5128
|
-
|
|
5129
|
-
|
|
5088
|
+
var AuthPayloadSchema = z27.discriminatedUnion("type", [
|
|
5089
|
+
z27.object({ type: z27.literal("bearer"), token: z27.string() }),
|
|
5090
|
+
z27.object({ type: z27.literal("basic"), username: z27.string(), password: z27.string() })
|
|
5130
5091
|
]);
|
|
5131
|
-
var CustomSnippetPayloadSchema =
|
|
5132
|
-
headers:
|
|
5133
|
-
pathParameters:
|
|
5134
|
-
queryParameters:
|
|
5135
|
-
requestBody:
|
|
5092
|
+
var CustomSnippetPayloadSchema = z27.object({
|
|
5093
|
+
headers: z27.array(ParameterPayloadSchema).nullish(),
|
|
5094
|
+
pathParameters: z27.array(ParameterPayloadSchema).nullish(),
|
|
5095
|
+
queryParameters: z27.array(ParameterPayloadSchema).nullish(),
|
|
5096
|
+
requestBody: z27.unknown().nullish(),
|
|
5136
5097
|
auth: AuthPayloadSchema.nullish()
|
|
5137
5098
|
});
|
|
5138
5099
|
var snippetsContract = {
|
|
5139
|
-
get:
|
|
5140
|
-
|
|
5141
|
-
orgId:
|
|
5142
|
-
apiId:
|
|
5143
|
-
sdks:
|
|
5100
|
+
get: oc17.route({ method: "POST", path: "/" }).input(
|
|
5101
|
+
z27.object({
|
|
5102
|
+
orgId: z27.string().nullish(),
|
|
5103
|
+
apiId: z27.string().nullish(),
|
|
5104
|
+
sdks: z27.array(SdkRequestSchema).nullish(),
|
|
5144
5105
|
endpoint: EndpointIdentifierSchema,
|
|
5145
|
-
exampleIdentifier:
|
|
5106
|
+
exampleIdentifier: z27.string().nullish(),
|
|
5146
5107
|
payload: CustomSnippetPayloadSchema.nullish()
|
|
5147
5108
|
})
|
|
5148
|
-
).output(
|
|
5149
|
-
load:
|
|
5150
|
-
|
|
5151
|
-
orgId:
|
|
5152
|
-
apiId:
|
|
5153
|
-
sdks:
|
|
5109
|
+
).output(z27.array(z27.unknown())),
|
|
5110
|
+
load: oc17.route({ method: "POST", path: "/load" }).input(
|
|
5111
|
+
z27.object({
|
|
5112
|
+
orgId: z27.string().nullish(),
|
|
5113
|
+
apiId: z27.string().nullish(),
|
|
5114
|
+
sdks: z27.array(SdkRequestSchema).nullish()
|
|
5154
5115
|
})
|
|
5155
5116
|
).output(
|
|
5156
|
-
|
|
5157
|
-
next:
|
|
5158
|
-
snippets:
|
|
5117
|
+
z27.object({
|
|
5118
|
+
next: z27.number().nullish(),
|
|
5119
|
+
snippets: z27.record(z27.string(), z27.unknown())
|
|
5159
5120
|
})
|
|
5160
5121
|
)
|
|
5161
5122
|
};
|
|
5162
5123
|
|
|
5163
5124
|
// src/orpc-client/snippets/client.ts
|
|
5164
5125
|
function createSnippetsFactoryClient(options) {
|
|
5165
|
-
const link = new
|
|
5126
|
+
const link = new OpenAPILink19(snippetsFactoryContract, {
|
|
5166
5127
|
url: `${options.baseUrl}/snippets`,
|
|
5167
5128
|
headers: () => ({
|
|
5168
5129
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5170,10 +5131,10 @@ function createSnippetsFactoryClient(options) {
|
|
|
5170
5131
|
}),
|
|
5171
5132
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5172
5133
|
});
|
|
5173
|
-
return
|
|
5134
|
+
return createORPCClient19(link);
|
|
5174
5135
|
}
|
|
5175
5136
|
function createSnippetsClient(options) {
|
|
5176
|
-
const link = new
|
|
5137
|
+
const link = new OpenAPILink19(snippetsContract, {
|
|
5177
5138
|
url: `${options.baseUrl}/snippets`,
|
|
5178
5139
|
headers: () => ({
|
|
5179
5140
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5181,63 +5142,63 @@ function createSnippetsClient(options) {
|
|
|
5181
5142
|
}),
|
|
5182
5143
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5183
5144
|
});
|
|
5184
|
-
return
|
|
5145
|
+
return createORPCClient19(link);
|
|
5185
5146
|
}
|
|
5186
5147
|
|
|
5187
5148
|
// src/orpc-client/templates/client.ts
|
|
5188
|
-
import { createORPCClient as
|
|
5189
|
-
import { OpenAPILink as
|
|
5149
|
+
import { createORPCClient as createORPCClient20 } from "@orpc/client";
|
|
5150
|
+
import { OpenAPILink as OpenAPILink20 } from "@orpc/openapi-client/fetch";
|
|
5190
5151
|
|
|
5191
5152
|
// src/orpc-client/templates/contract.ts
|
|
5192
|
-
import { oc as
|
|
5193
|
-
import * as
|
|
5194
|
-
var SnippetRegistryEntrySchema =
|
|
5153
|
+
import { oc as oc18 } from "@orpc/contract";
|
|
5154
|
+
import * as z28 from "zod";
|
|
5155
|
+
var SnippetRegistryEntrySchema = z28.object({
|
|
5195
5156
|
sdk: SdkSchema,
|
|
5196
|
-
endpointId:
|
|
5197
|
-
path:
|
|
5157
|
+
endpointId: z28.object({
|
|
5158
|
+
path: z28.string(),
|
|
5198
5159
|
method: HttpMethodSchema,
|
|
5199
|
-
identifierOverride:
|
|
5160
|
+
identifierOverride: z28.string().nullish()
|
|
5200
5161
|
}),
|
|
5201
|
-
snippetTemplate:
|
|
5202
|
-
type:
|
|
5203
|
-
functionInvocation:
|
|
5204
|
-
clientInstantiation:
|
|
5162
|
+
snippetTemplate: z28.object({
|
|
5163
|
+
type: z28.literal("v1"),
|
|
5164
|
+
functionInvocation: z28.unknown(),
|
|
5165
|
+
clientInstantiation: z28.string()
|
|
5205
5166
|
}),
|
|
5206
|
-
additionalTemplates:
|
|
5167
|
+
additionalTemplates: z28.record(z28.string(), z28.unknown()).nullish()
|
|
5207
5168
|
});
|
|
5208
|
-
var RegisterInputSchema =
|
|
5209
|
-
orgId:
|
|
5210
|
-
apiId:
|
|
5211
|
-
apiDefinitionId:
|
|
5169
|
+
var RegisterInputSchema = z28.object({
|
|
5170
|
+
orgId: z28.string(),
|
|
5171
|
+
apiId: z28.string(),
|
|
5172
|
+
apiDefinitionId: z28.string(),
|
|
5212
5173
|
snippet: SnippetRegistryEntrySchema
|
|
5213
5174
|
});
|
|
5214
|
-
var RegisterBatchInputSchema =
|
|
5215
|
-
orgId:
|
|
5216
|
-
apiId:
|
|
5217
|
-
apiDefinitionId:
|
|
5218
|
-
snippets:
|
|
5175
|
+
var RegisterBatchInputSchema = z28.object({
|
|
5176
|
+
orgId: z28.string(),
|
|
5177
|
+
apiId: z28.string(),
|
|
5178
|
+
apiDefinitionId: z28.string(),
|
|
5179
|
+
snippets: z28.array(SnippetRegistryEntrySchema)
|
|
5219
5180
|
});
|
|
5220
|
-
var GetInputSchema =
|
|
5221
|
-
orgId:
|
|
5222
|
-
apiId:
|
|
5181
|
+
var GetInputSchema = z28.object({
|
|
5182
|
+
orgId: z28.string(),
|
|
5183
|
+
apiId: z28.string(),
|
|
5223
5184
|
sdk: SdkSchema,
|
|
5224
|
-
endpointId:
|
|
5225
|
-
path:
|
|
5185
|
+
endpointId: z28.object({
|
|
5186
|
+
path: z28.string(),
|
|
5226
5187
|
method: HttpMethodSchema,
|
|
5227
|
-
identifierOverride:
|
|
5188
|
+
identifierOverride: z28.string().nullish()
|
|
5228
5189
|
})
|
|
5229
5190
|
});
|
|
5230
|
-
var EndpointSnippetTemplateSchema =
|
|
5191
|
+
var EndpointSnippetTemplateSchema = z28.record(z28.string(), z28.unknown());
|
|
5231
5192
|
var templatesContract = {
|
|
5232
|
-
register:
|
|
5233
|
-
registerBatch:
|
|
5234
|
-
get:
|
|
5193
|
+
register: oc18.route({ method: "POST", path: "/register" }).input(RegisterInputSchema),
|
|
5194
|
+
registerBatch: oc18.route({ method: "POST", path: "/register/batch" }).input(RegisterBatchInputSchema),
|
|
5195
|
+
get: oc18.route({ method: "POST", path: "/get" }).input(GetInputSchema).output(EndpointSnippetTemplateSchema)
|
|
5235
5196
|
};
|
|
5236
5197
|
|
|
5237
5198
|
// src/orpc-client/templates/client.ts
|
|
5238
5199
|
function createTemplatesClient(options) {
|
|
5239
5200
|
const baseUrl = options.baseUrl.replace(/\/+$/, "");
|
|
5240
|
-
const link = new
|
|
5201
|
+
const link = new OpenAPILink20(templatesContract, {
|
|
5241
5202
|
url: `${baseUrl}/snippet-template`,
|
|
5242
5203
|
headers: () => ({
|
|
5243
5204
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5245,36 +5206,36 @@ function createTemplatesClient(options) {
|
|
|
5245
5206
|
}),
|
|
5246
5207
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5247
5208
|
});
|
|
5248
|
-
return
|
|
5209
|
+
return createORPCClient20(link);
|
|
5249
5210
|
}
|
|
5250
5211
|
|
|
5251
5212
|
// src/orpc-client/tokens/client.ts
|
|
5252
|
-
import { createORPCClient as
|
|
5253
|
-
import { OpenAPILink as
|
|
5213
|
+
import { createORPCClient as createORPCClient21 } from "@orpc/client";
|
|
5214
|
+
import { OpenAPILink as OpenAPILink21 } from "@orpc/openapi-client/fetch";
|
|
5254
5215
|
|
|
5255
5216
|
// src/orpc-client/tokens/contract.ts
|
|
5256
|
-
import { oc as
|
|
5257
|
-
import * as
|
|
5258
|
-
var GenerateTokenInputSchema =
|
|
5259
|
-
orgId:
|
|
5260
|
-
scope:
|
|
5217
|
+
import { oc as oc19 } from "@orpc/contract";
|
|
5218
|
+
import * as z29 from "zod";
|
|
5219
|
+
var GenerateTokenInputSchema = z29.object({
|
|
5220
|
+
orgId: z29.string(),
|
|
5221
|
+
scope: z29.string()
|
|
5261
5222
|
});
|
|
5262
|
-
var RevokeTokenInputSchema =
|
|
5263
|
-
orgId:
|
|
5264
|
-
tokenId:
|
|
5223
|
+
var RevokeTokenInputSchema = z29.object({
|
|
5224
|
+
orgId: z29.string(),
|
|
5225
|
+
tokenId: z29.string()
|
|
5265
5226
|
});
|
|
5266
|
-
var GenerateTokenOutputSchema =
|
|
5267
|
-
token:
|
|
5268
|
-
id:
|
|
5227
|
+
var GenerateTokenOutputSchema = z29.object({
|
|
5228
|
+
token: z29.string(),
|
|
5229
|
+
id: z29.string()
|
|
5269
5230
|
});
|
|
5270
5231
|
var tokensContract = {
|
|
5271
|
-
generate:
|
|
5272
|
-
revoke:
|
|
5232
|
+
generate: oc19.route({ method: "POST", path: "/generate" }).input(GenerateTokenInputSchema).output(GenerateTokenOutputSchema),
|
|
5233
|
+
revoke: oc19.route({ method: "POST", path: "/revoke" }).input(RevokeTokenInputSchema)
|
|
5273
5234
|
};
|
|
5274
5235
|
|
|
5275
5236
|
// src/orpc-client/tokens/client.ts
|
|
5276
5237
|
function createTokensClient(options) {
|
|
5277
|
-
const link = new
|
|
5238
|
+
const link = new OpenAPILink21(tokensContract, {
|
|
5278
5239
|
url: `${options.baseUrl}/tokens`,
|
|
5279
5240
|
headers: () => ({
|
|
5280
5241
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -5282,7 +5243,7 @@ function createTokensClient(options) {
|
|
|
5282
5243
|
}),
|
|
5283
5244
|
...options.fetch != null ? { fetch: options.fetch } : {}
|
|
5284
5245
|
});
|
|
5285
|
-
return
|
|
5246
|
+
return createORPCClient21(link);
|
|
5286
5247
|
}
|
|
5287
5248
|
|
|
5288
5249
|
// src/orpc-client/client.ts
|