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