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