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