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