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