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