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