@fern-api/fdr-sdk 1.2.174-d4501f54c4 → 1.2.174-eebbab17cf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/client/FdrClient.js +21 -0
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +21 -0
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/docs-ledger/index.js +21 -0
- package/dist/js/docs-ledger/index.js.map +1 -1
- package/dist/js/docs-ledger/index.mjs +21 -0
- package/dist/js/docs-ledger/index.mjs.map +1 -1
- package/dist/js/index.js +21 -0
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +21 -0
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/orpc-client.js +111 -2
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +100 -2
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/orpc-client/docs-anonymous/contract.d.ts +140 -0
- package/dist/orpc-client/docs-anonymous/contract.d.ts.map +1 -1
- package/dist/orpc-client/docs-anonymous/contract.js +40 -2
- package/dist/orpc-client/docs-anonymous/contract.js.map +1 -1
- package/dist/orpc-client/docs-ledger/__test__/static-build-files.test.d.ts +2 -0
- package/dist/orpc-client/docs-ledger/__test__/static-build-files.test.d.ts.map +1 -0
- package/dist/orpc-client/docs-ledger/__test__/static-build-files.test.js +49 -0
- package/dist/orpc-client/docs-ledger/__test__/static-build-files.test.js.map +1 -0
- package/dist/orpc-client/docs-ledger/contract.d.ts +112 -0
- package/dist/orpc-client/docs-ledger/contract.d.ts.map +1 -1
- package/dist/orpc-client/docs-ledger/contract.js +29 -0
- package/dist/orpc-client/docs-ledger/contract.js.map +1 -1
- package/dist/orpc-client/docs-ledger/index.d.ts +1 -0
- package/dist/orpc-client/docs-ledger/index.d.ts.map +1 -1
- package/dist/orpc-client/docs-ledger/index.js +1 -0
- package/dist/orpc-client/docs-ledger/index.js.map +1 -1
- package/dist/orpc-client/docs-ledger/static-build-files.d.ts +20 -0
- package/dist/orpc-client/docs-ledger/static-build-files.d.ts.map +1 -0
- package/dist/orpc-client/docs-ledger/static-build-files.js +55 -0
- package/dist/orpc-client/docs-ledger/static-build-files.js.map +1 -0
- package/dist/types/orpc-client/docs-anonymous/contract.d.ts +140 -0
- package/dist/types/orpc-client/docs-anonymous/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-ledger/__test__/static-build-files.test.d.ts +2 -0
- package/dist/types/orpc-client/docs-ledger/__test__/static-build-files.test.d.ts.map +1 -0
- package/dist/types/orpc-client/docs-ledger/contract.d.ts +112 -0
- package/dist/types/orpc-client/docs-ledger/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-ledger/index.d.ts +1 -0
- package/dist/types/orpc-client/docs-ledger/index.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-ledger/static-build-files.d.ts +20 -0
- package/dist/types/orpc-client/docs-ledger/static-build-files.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/js/orpc-client.mjs
CHANGED
|
@@ -5139,6 +5139,25 @@ var LedgerPreviewRegisterResponseSchema = z22.object({
|
|
|
5139
5139
|
/** Sanitized identifier the server actually used to compose the host. */
|
|
5140
5140
|
previewId: z22.string()
|
|
5141
5141
|
});
|
|
5142
|
+
var ListStaticBuildFilesInputSchema = z22.object({
|
|
5143
|
+
domain: z22.string().min(1),
|
|
5144
|
+
/** "" for a root site, otherwise a leading-slash basepath. */
|
|
5145
|
+
basepath: z22.string().default(""),
|
|
5146
|
+
/** `nextCursor` of the previous page; absent for the first page. */
|
|
5147
|
+
cursor: z22.string().optional()
|
|
5148
|
+
});
|
|
5149
|
+
var StaticBuildFileSchema = z22.object({
|
|
5150
|
+
/** Path relative to the host root, e.g. `docs/quickstart/index.html`. */
|
|
5151
|
+
path: z22.string(),
|
|
5152
|
+
/** Short-lived signed GET URL for the file. */
|
|
5153
|
+
url: z22.string()
|
|
5154
|
+
});
|
|
5155
|
+
var ListStaticBuildFilesResponseSchema = z22.object({
|
|
5156
|
+
buildId: z22.string(),
|
|
5157
|
+
files: z22.array(StaticBuildFileSchema),
|
|
5158
|
+
/** Pass back to get the next page; absent on the last page. */
|
|
5159
|
+
nextCursor: z22.string().optional()
|
|
5160
|
+
});
|
|
5142
5161
|
var docsLedgerContract = {
|
|
5143
5162
|
register: oc11.route({ method: "POST", path: "/register" }).input(DocsPublishInputSchema).output(RegisterResponseSchema),
|
|
5144
5163
|
previewRegister: oc11.route({ method: "POST", path: "/preview/init" }).input(LedgerPreviewRegisterInputSchema).output(LedgerPreviewRegisterResponseSchema),
|
|
@@ -5150,6 +5169,8 @@ var docsLedgerContract = {
|
|
|
5150
5169
|
reindex: oc11.route({ method: "POST", path: "/reindex" }).input(ReindexInputSchema).output(ReindexResponseSchema),
|
|
5151
5170
|
promoteStaticBuild: oc11.route({ method: "POST", path: "/static-build/promote" }).input(PromoteStaticBuildInputSchema).output(PromoteStaticBuildResponseSchema),
|
|
5152
5171
|
resolveStaticServingHost: oc11.route({ method: "POST", path: "/static-build/serving-host" }).input(ResolveStaticServingHostInputSchema).output(ResolveStaticServingHostResponseSchema),
|
|
5172
|
+
/** Served by the read router; listed here so `createDocsLedgerClient` can call it. */
|
|
5173
|
+
listStaticBuildFiles: oc11.route({ method: "GET", path: "/static-build/files" }).input(ListStaticBuildFilesInputSchema).output(ListStaticBuildFilesResponseSchema),
|
|
5153
5174
|
getCustomHostname: oc11.route({ method: "POST", path: "/static-build/custom-hostname/get" }).input(CustomHostnameInputSchema).output(CustomHostnameResponseSchema),
|
|
5154
5175
|
registerCustomHostname: oc11.route({ method: "POST", path: "/static-build/custom-hostname/register" }).input(CustomHostnameInputSchema).output(CustomHostnameResponseSchema),
|
|
5155
5176
|
deleteCustomHostname: oc11.route({ method: "POST", path: "/static-build/custom-hostname/delete" }).input(CustomHostnameInputSchema).output(DeleteCustomHostnameResponseSchema)
|
|
@@ -7339,7 +7360,14 @@ var GetAnonymousClaimResponseSchema = z37.object({
|
|
|
7339
7360
|
});
|
|
7340
7361
|
var ClaimAnonymousDocsSiteInputSchema = z37.object({
|
|
7341
7362
|
grant: z37.string(),
|
|
7342
|
-
toOrgId: z37.string()
|
|
7363
|
+
toOrgId: z37.string(),
|
|
7364
|
+
/**
|
|
7365
|
+
* The `<name>.<docs suffix>` address the claimed site moves to, instead of keeping its
|
|
7366
|
+
* `drop-<id>` host (a bare name is accepted too). Refused with `invalid_domain` (400) when it
|
|
7367
|
+
* is not one label under the docs suffix or is a drop name, and `domain_taken` (409) when any
|
|
7368
|
+
* site already uses it. The drop host redirects to the new address once it serves.
|
|
7369
|
+
*/
|
|
7370
|
+
domain: z37.string().optional()
|
|
7343
7371
|
});
|
|
7344
7372
|
var ClaimAnonymousDocsSiteResponseSchema = z37.object({
|
|
7345
7373
|
siteId: z37.string(),
|
|
@@ -7360,13 +7388,36 @@ var GetGuestDocsSiteResponseSchema = z37.object({
|
|
|
7360
7388
|
/** The claim link is returned by every docs-ledger `finish`, not here. */
|
|
7361
7389
|
limits: AnonymousDocsSiteLimitsSchema
|
|
7362
7390
|
});
|
|
7391
|
+
var RehomeGuestSessionInputSchema = z37.object({
|
|
7392
|
+
/** The session's `guest-<id>` organization, as the claim page shows it. */
|
|
7393
|
+
guestOrgId: z37.string(),
|
|
7394
|
+
/**
|
|
7395
|
+
* The `<name>.<docs suffix>` address the session's published site takes instead of its
|
|
7396
|
+
* `drop-<id>` host (a bare name is accepted too); same rules and errors as `claim`'s `domain`.
|
|
7397
|
+
*/
|
|
7398
|
+
domain: z37.string().optional()
|
|
7399
|
+
});
|
|
7400
|
+
var RehomedGuestSiteSchema = z37.object({
|
|
7401
|
+
siteId: z37.string(),
|
|
7402
|
+
domain: z37.string(),
|
|
7403
|
+
/** The build the site serves at `domain`; absent for a site that was never published. */
|
|
7404
|
+
buildId: z37.string().optional()
|
|
7405
|
+
});
|
|
7406
|
+
var RehomeGuestSessionResponseSchema = z37.object({
|
|
7407
|
+
sessionId: z37.string(),
|
|
7408
|
+
/** Where the sites are now: the organization Venus says the session was claimed into. */
|
|
7409
|
+
orgId: z37.string(),
|
|
7410
|
+
/** The sites moved by this call; empty when there was nothing (left) to move. */
|
|
7411
|
+
sites: z37.array(RehomedGuestSiteSchema)
|
|
7412
|
+
});
|
|
7363
7413
|
var docsAnonymousContract = {
|
|
7364
7414
|
getGuestSite: oc23.route({ method: "GET", path: "/anonymous/guest-site" }).input(GetGuestDocsSiteInputSchema).output(GetGuestDocsSiteResponseSchema),
|
|
7365
7415
|
create: oc23.route({ method: "POST", path: "/anonymous/create" }).input(CreateAnonymousDocsSiteInputSchema.optional()).output(CreateAnonymousDocsSiteResponseSchema),
|
|
7366
7416
|
consumeClaimToken: oc23.route({ method: "POST", path: "/anonymous/claim-token/consume" }).input(ConsumeAnonymousClaimTokenInputSchema).output(ConsumeAnonymousClaimTokenResponseSchema),
|
|
7367
7417
|
createClaimGrant: oc23.route({ method: "POST", path: "/anonymous/sites/{siteId}/claim-grant" }).input(CreateAnonymousClaimGrantInputSchema).output(CreateAnonymousClaimGrantResponseSchema),
|
|
7368
7418
|
getClaim: oc23.route({ method: "GET", path: "/anonymous/claim/{grant}" }).input(GetAnonymousClaimInputSchema).output(GetAnonymousClaimResponseSchema),
|
|
7369
|
-
claim: oc23.route({ method: "POST", path: "/anonymous/claim" }).input(ClaimAnonymousDocsSiteInputSchema).output(ClaimAnonymousDocsSiteResponseSchema)
|
|
7419
|
+
claim: oc23.route({ method: "POST", path: "/anonymous/claim" }).input(ClaimAnonymousDocsSiteInputSchema).output(ClaimAnonymousDocsSiteResponseSchema),
|
|
7420
|
+
rehomeGuestSession: oc23.route({ method: "POST", path: "/anonymous/guest-session/rehome" }).input(RehomeGuestSessionInputSchema).output(RehomeGuestSessionResponseSchema)
|
|
7370
7421
|
};
|
|
7371
7422
|
var AnonymousDocsConfigDocumentSchema = z37.object({
|
|
7372
7423
|
enabled: z37.boolean(),
|
|
@@ -7953,6 +8004,42 @@ function stableStringify(value) {
|
|
|
7953
8004
|
});
|
|
7954
8005
|
}
|
|
7955
8006
|
|
|
8007
|
+
// src/orpc-client/docs-ledger/static-build-files.ts
|
|
8008
|
+
var SHARED_ASSETS_PREFIX = "_shared";
|
|
8009
|
+
var SHARED_MANIFEST_NAME = "_fern-shared-assets.json";
|
|
8010
|
+
var SHARED_ASSET_DIRS = ["_astro", "_fern-mdx"];
|
|
8011
|
+
var SHARED_MANIFEST_ENTRY_RE = new RegExp(`^${SHARED_ASSETS_PREFIX}/(?:${SHARED_ASSET_DIRS.join("|")})/[^/]+$`);
|
|
8012
|
+
var MD5_HEX_RE = /^[0-9a-f]{32}$/;
|
|
8013
|
+
function isServedSharedManifestEntry(key, md5) {
|
|
8014
|
+
return typeof md5 === "string" && SHARED_MANIFEST_ENTRY_RE.test(key) && MD5_HEX_RE.test(md5);
|
|
8015
|
+
}
|
|
8016
|
+
var ROUTER_CONTROL_FILES = /* @__PURE__ */ new Set([
|
|
8017
|
+
"_redirects",
|
|
8018
|
+
"_redirects-fallback.json",
|
|
8019
|
+
"_headers",
|
|
8020
|
+
"_routes.json",
|
|
8021
|
+
SHARED_MANIFEST_NAME
|
|
8022
|
+
]);
|
|
8023
|
+
var PUBLIC_FERN_DIRS = /* @__PURE__ */ new Set(["fern-nav"]);
|
|
8024
|
+
function isRouterOnlySegment(segment) {
|
|
8025
|
+
if (segment == null) {
|
|
8026
|
+
return false;
|
|
8027
|
+
}
|
|
8028
|
+
return ROUTER_CONTROL_FILES.has(segment) || segment.startsWith("fern-") && !PUBLIC_FERN_DIRS.has(segment);
|
|
8029
|
+
}
|
|
8030
|
+
function isRouterOnlyFile(path, basepath = "") {
|
|
8031
|
+
const segments = path.replace(/^\/+/, "").split("/");
|
|
8032
|
+
if (isRouterOnlySegment(segments[0])) {
|
|
8033
|
+
return true;
|
|
8034
|
+
}
|
|
8035
|
+
const basepathSegments = basepath.split("/").filter((segment) => segment.length > 0);
|
|
8036
|
+
if (basepathSegments.length === 0 || segments.length <= basepathSegments.length) {
|
|
8037
|
+
return false;
|
|
8038
|
+
}
|
|
8039
|
+
const underBasepath = basepathSegments.every((segment, i) => segments[i] === segment);
|
|
8040
|
+
return underBasepath && isRouterOnlySegment(segments[basepathSegments.length]);
|
|
8041
|
+
}
|
|
8042
|
+
|
|
7956
8043
|
// src/orpc-client/files/contract.ts
|
|
7957
8044
|
import { oc as oc24 } from "@orpc/contract";
|
|
7958
8045
|
import * as z40 from "zod";
|
|
@@ -8504,6 +8591,8 @@ export {
|
|
|
8504
8591
|
ListRepositoriesResponseSchema,
|
|
8505
8592
|
ListSdksForOrgInputSchema,
|
|
8506
8593
|
ListSdksForOrgResponseSchema,
|
|
8594
|
+
ListStaticBuildFilesInputSchema,
|
|
8595
|
+
ListStaticBuildFilesResponseSchema,
|
|
8507
8596
|
LiteralTypeSchema,
|
|
8508
8597
|
LoadDocsForUrlResponseSchema,
|
|
8509
8598
|
LocaleEntrySchema,
|
|
@@ -8677,6 +8766,9 @@ export {
|
|
|
8677
8766
|
RegisterUndiscriminatedUnionVariantSchema,
|
|
8678
8767
|
RegisterWebSocketChannelSchema,
|
|
8679
8768
|
RegisterWebhookDefinitionSchema,
|
|
8769
|
+
RehomeGuestSessionInputSchema,
|
|
8770
|
+
RehomeGuestSessionResponseSchema,
|
|
8771
|
+
RehomedGuestSiteSchema,
|
|
8680
8772
|
ReindexInputSchema,
|
|
8681
8773
|
ReindexResponseSchema,
|
|
8682
8774
|
ReleaseType,
|
|
@@ -8695,6 +8787,9 @@ export {
|
|
|
8695
8787
|
RouteContextInputSchema,
|
|
8696
8788
|
RouteContextResponseSchema,
|
|
8697
8789
|
RubyGemSchema,
|
|
8790
|
+
SHARED_ASSETS_PREFIX,
|
|
8791
|
+
SHARED_ASSET_DIRS,
|
|
8792
|
+
SHARED_MANIFEST_NAME,
|
|
8698
8793
|
SafeDoxyfileContentSchema,
|
|
8699
8794
|
ScalarTypeSchema,
|
|
8700
8795
|
ScriptSchema,
|
|
@@ -8734,6 +8829,7 @@ export {
|
|
|
8734
8829
|
StartLibraryDocsGenerationResponseSchema,
|
|
8735
8830
|
StartStaticBuildInputSchema,
|
|
8736
8831
|
StartStaticBuildResponseSchema,
|
|
8832
|
+
StaticBuildFileSchema,
|
|
8737
8833
|
StaticContentGroupBySchema,
|
|
8738
8834
|
StaticContentTrafficInputSchema,
|
|
8739
8835
|
StaticContentTrafficResponseSchema,
|
|
@@ -8859,6 +8955,8 @@ export {
|
|
|
8859
8955
|
gitContract,
|
|
8860
8956
|
isFernFileRef,
|
|
8861
8957
|
isMcpAnalyticsWindow,
|
|
8958
|
+
isRouterOnlyFile,
|
|
8959
|
+
isServedSharedManifestEntry,
|
|
8862
8960
|
ledgerSegmentIdentity,
|
|
8863
8961
|
libraryDocsContract,
|
|
8864
8962
|
mcpAnalyticsIndex,
|