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