@fern-api/fdr-sdk 1.2.174-e751c03595 → 1.2.174-e8c7a2e671
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/converters/db/examples/generateHttpBodyExample.d.ts.map +1 -1
- package/dist/converters/db/examples/generateHttpBodyExample.js +15 -14
- package/dist/converters/db/examples/generateHttpBodyExample.js.map +1 -1
- package/dist/converters/db/examples/generateHttpBodyExample.test.d.ts +2 -0
- package/dist/converters/db/examples/generateHttpBodyExample.test.d.ts.map +1 -0
- package/dist/converters/db/examples/generateHttpBodyExample.test.js +79 -0
- package/dist/converters/db/examples/generateHttpBodyExample.test.js.map +1 -0
- package/dist/docs-ledger/inputTypes.d.ts +5 -0
- package/dist/docs-ledger/inputTypes.d.ts.map +1 -1
- package/dist/js/client/FdrClient.js +34 -1
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +34 -1
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/converters/index.js +18 -11
- package/dist/js/converters/index.js.map +1 -1
- package/dist/js/converters/index.mjs +18 -11
- package/dist/js/converters/index.mjs.map +1 -1
- package/dist/js/docs-ledger/index.js +34 -1
- package/dist/js/docs-ledger/index.js.map +1 -1
- package/dist/js/docs-ledger/index.mjs +34 -1
- package/dist/js/docs-ledger/index.mjs.map +1 -1
- package/dist/js/index.js +52 -12
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +52 -12
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/orpc-client.js +42 -1
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +40 -1
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/orpc-client/docs-anonymous/contract.d.ts +24 -0
- package/dist/orpc-client/docs-anonymous/contract.d.ts.map +1 -1
- package/dist/orpc-client/docs-anonymous/contract.js +4 -0
- package/dist/orpc-client/docs-anonymous/contract.js.map +1 -1
- package/dist/orpc-client/docs-ledger/contract.d.ts +152 -0
- package/dist/orpc-client/docs-ledger/contract.d.ts.map +1 -1
- package/dist/orpc-client/docs-ledger/contract.js +41 -1
- package/dist/orpc-client/docs-ledger/contract.js.map +1 -1
- package/dist/types/converters/db/examples/generateHttpBodyExample.d.ts.map +1 -1
- package/dist/types/converters/db/examples/generateHttpBodyExample.test.d.ts +2 -0
- package/dist/types/converters/db/examples/generateHttpBodyExample.test.d.ts.map +1 -0
- package/dist/types/docs-ledger/inputTypes.d.ts +5 -0
- package/dist/types/docs-ledger/inputTypes.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-anonymous/contract.d.ts +24 -0
- package/dist/types/orpc-client/docs-anonymous/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-ledger/contract.d.ts +152 -0
- package/dist/types/orpc-client/docs-ledger/contract.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/js/index.mjs
CHANGED
|
@@ -9889,6 +9889,11 @@ var FinishResponseSchema = z21.object({
|
|
|
9889
9889
|
additionalSiteIds: z21.array(z21.string()).default([]),
|
|
9890
9890
|
deploymentHash: z21.string(),
|
|
9891
9891
|
reusedDeployment: z21.boolean(),
|
|
9892
|
+
/**
|
|
9893
|
+
* True when a publish of the same URL that started later was already live,
|
|
9894
|
+
* so this deployment was stored but not made live.
|
|
9895
|
+
*/
|
|
9896
|
+
superseded: z21.boolean().optional(),
|
|
9892
9897
|
/**
|
|
9893
9898
|
* Per-locale segment counts when `translations[]` was supplied on the
|
|
9894
9899
|
* finish input. Absent when no translations were included.
|
|
@@ -10687,13 +10692,26 @@ var DocsPublishInputSchemaInternal = z21.object({
|
|
|
10687
10692
|
*/
|
|
10688
10693
|
customDomains: z21.array(z21.string()).default([]),
|
|
10689
10694
|
previewId: z21.string().nullish(),
|
|
10695
|
+
/**
|
|
10696
|
+
* When the CLI started this publish (ISO 8601). FDR orders overlapping
|
|
10697
|
+
* publishes of one URL by it, so the client's local build and upload
|
|
10698
|
+
* time count. FDR falls back to its own clock when absent, in the
|
|
10699
|
+
* future, or more than 6 hours old (ADR 0040).
|
|
10700
|
+
*/
|
|
10701
|
+
publishStartedAt: z21.string().datetime({ offset: true }).nullish(),
|
|
10690
10702
|
/** The primary/fallback locale for this deployment (e.g. "en"). */
|
|
10691
10703
|
defaultLocale: z21.string().default("en"),
|
|
10692
10704
|
/**
|
|
10693
10705
|
* All locales for this deployment. Each locale goes through the same
|
|
10694
10706
|
* transform → upload → verify → persist pipeline.
|
|
10695
10707
|
*/
|
|
10696
|
-
locales: z21.array(LocaleEntrySchema).min(1)
|
|
10708
|
+
locales: z21.array(LocaleEntrySchema).min(1),
|
|
10709
|
+
/**
|
|
10710
|
+
* The publisher's `fern/` folder as a JSON `RepositoryFile[]` CAS blob, so the site can
|
|
10711
|
+
* later be written to a GitHub repo as it was published. Optional — older CLIs omit it,
|
|
10712
|
+
* and the CLI only sends it for guest publishes. A missing upload never fails the publish.
|
|
10713
|
+
*/
|
|
10714
|
+
source: BlobRefSchema.nullish()
|
|
10697
10715
|
}).refine((data) => data.locales.some((l) => l.locale === data.defaultLocale), {
|
|
10698
10716
|
message: "defaultLocale must match one of the locales in the locales array",
|
|
10699
10717
|
path: ["defaultLocale"]
|
|
@@ -10774,6 +10792,20 @@ var ListStaticBuildFilesResponseSchema = z21.object({
|
|
|
10774
10792
|
/** Pass back to get the next page; absent on the last page. */
|
|
10775
10793
|
nextCursor: z21.string().optional()
|
|
10776
10794
|
});
|
|
10795
|
+
var GetSiteSourceInputSchema = z21.object({
|
|
10796
|
+
domain: z21.string().min(1),
|
|
10797
|
+
/** "" for a root site, otherwise a leading-slash basepath. */
|
|
10798
|
+
basepath: z21.string().default("")
|
|
10799
|
+
});
|
|
10800
|
+
var GetSiteSourceResponseSchema = z21.object({
|
|
10801
|
+
/** SHA-256 hex of the source blob. */
|
|
10802
|
+
hash: z21.string(),
|
|
10803
|
+
contentLength: z21.number(),
|
|
10804
|
+
/** Short-lived signed GET URL for the JSON `RepositoryFile[]`. */
|
|
10805
|
+
url: z21.string(),
|
|
10806
|
+
/** When the publish that sent this source finished (ISO 8601). */
|
|
10807
|
+
updatedAt: z21.string()
|
|
10808
|
+
});
|
|
10777
10809
|
var docsLedgerContract = {
|
|
10778
10810
|
register: oc11.route({ method: "POST", path: "/register" }).input(DocsPublishInputSchema).output(RegisterResponseSchema),
|
|
10779
10811
|
previewRegister: oc11.route({ method: "POST", path: "/preview/init" }).input(LedgerPreviewRegisterInputSchema).output(LedgerPreviewRegisterResponseSchema),
|
|
@@ -10787,6 +10819,7 @@ var docsLedgerContract = {
|
|
|
10787
10819
|
resolveStaticServingHost: oc11.route({ method: "POST", path: "/static-build/serving-host" }).input(ResolveStaticServingHostInputSchema).output(ResolveStaticServingHostResponseSchema),
|
|
10788
10820
|
/** Served by the read router; listed here so `createDocsLedgerClient` can call it. */
|
|
10789
10821
|
listStaticBuildFiles: oc11.route({ method: "GET", path: "/static-build/files" }).input(ListStaticBuildFilesInputSchema).output(ListStaticBuildFilesResponseSchema),
|
|
10822
|
+
getSiteSource: oc11.route({ method: "GET", path: "/site-source" }).input(GetSiteSourceInputSchema).output(GetSiteSourceResponseSchema),
|
|
10790
10823
|
getCustomHostname: oc11.route({ method: "POST", path: "/static-build/custom-hostname/get" }).input(CustomHostnameInputSchema).output(CustomHostnameResponseSchema),
|
|
10791
10824
|
registerCustomHostname: oc11.route({ method: "POST", path: "/static-build/custom-hostname/register" }).input(CustomHostnameInputSchema).output(CustomHostnameResponseSchema),
|
|
10792
10825
|
deleteCustomHostname: oc11.route({ method: "POST", path: "/static-build/custom-hostname/delete" }).input(CustomHostnameInputSchema).output(DeleteCustomHostnameResponseSchema)
|
|
@@ -15137,7 +15170,7 @@ function generateExampleObject(object37, resolveTypeById, ignoreOptionals, visit
|
|
|
15137
15170
|
property.valueType,
|
|
15138
15171
|
resolveTypeById,
|
|
15139
15172
|
ignoreOptionals,
|
|
15140
|
-
|
|
15173
|
+
visited,
|
|
15141
15174
|
depth + 1
|
|
15142
15175
|
);
|
|
15143
15176
|
if (value != null) {
|
|
@@ -15153,8 +15186,17 @@ function generateExampleFromTypeReference(reference, resolveTypeById, ignoreOpti
|
|
|
15153
15186
|
example = generateExamplePrimitive(reference.value);
|
|
15154
15187
|
break;
|
|
15155
15188
|
case "id": {
|
|
15156
|
-
visited.
|
|
15157
|
-
|
|
15189
|
+
if (visited.has(reference.value)) {
|
|
15190
|
+
example = void 0;
|
|
15191
|
+
break;
|
|
15192
|
+
}
|
|
15193
|
+
example = generateExampleFromId(
|
|
15194
|
+
reference.value,
|
|
15195
|
+
resolveTypeById,
|
|
15196
|
+
ignoreOptionals,
|
|
15197
|
+
new Set(visited).add(reference.value),
|
|
15198
|
+
depth
|
|
15199
|
+
);
|
|
15158
15200
|
break;
|
|
15159
15201
|
}
|
|
15160
15202
|
case "optional":
|
|
@@ -15162,8 +15204,6 @@ function generateExampleFromTypeReference(reference, resolveTypeById, ignoreOpti
|
|
|
15162
15204
|
if (visited.has(reference.itemType.value)) {
|
|
15163
15205
|
example = void 0;
|
|
15164
15206
|
break;
|
|
15165
|
-
} else {
|
|
15166
|
-
visited.add(reference.itemType.value);
|
|
15167
15207
|
}
|
|
15168
15208
|
}
|
|
15169
15209
|
if (ignoreOptionals) {
|
|
@@ -15183,8 +15223,6 @@ function generateExampleFromTypeReference(reference, resolveTypeById, ignoreOpti
|
|
|
15183
15223
|
if (visited.has(reference.itemType.value)) {
|
|
15184
15224
|
example = void 0;
|
|
15185
15225
|
break;
|
|
15186
|
-
} else {
|
|
15187
|
-
visited.add(reference.itemType.value);
|
|
15188
15226
|
}
|
|
15189
15227
|
}
|
|
15190
15228
|
example = generateExampleFromTypeReference(
|
|
@@ -15200,8 +15238,6 @@ function generateExampleFromTypeReference(reference, resolveTypeById, ignoreOpti
|
|
|
15200
15238
|
if (visited.has(reference.itemType.value)) {
|
|
15201
15239
|
example = [];
|
|
15202
15240
|
break;
|
|
15203
|
-
} else {
|
|
15204
|
-
visited.add(reference.itemType.value);
|
|
15205
15241
|
}
|
|
15206
15242
|
}
|
|
15207
15243
|
example = [
|
|
@@ -15316,10 +15352,14 @@ function generateExamplePrimitive(reference) {
|
|
|
15316
15352
|
return reference.name;
|
|
15317
15353
|
}
|
|
15318
15354
|
}
|
|
15319
|
-
function getAllObjectProperties(object37, resolveTypeById) {
|
|
15355
|
+
function getAllObjectProperties(object37, resolveTypeById, extended = /* @__PURE__ */ new Set()) {
|
|
15320
15356
|
return [
|
|
15321
15357
|
...object37.properties,
|
|
15322
15358
|
...object37.extends.flatMap((typeId) => {
|
|
15359
|
+
if (extended.has(typeId)) {
|
|
15360
|
+
return [];
|
|
15361
|
+
}
|
|
15362
|
+
extended.add(typeId);
|
|
15323
15363
|
let type = resolveTypeById(typeId);
|
|
15324
15364
|
if (type == null) {
|
|
15325
15365
|
return [];
|
|
@@ -15333,7 +15373,7 @@ function getAllObjectProperties(object37, resolveTypeById) {
|
|
|
15333
15373
|
if (type.shape.type !== "object") {
|
|
15334
15374
|
return [];
|
|
15335
15375
|
}
|
|
15336
|
-
return getAllObjectProperties(type.shape, resolveTypeById);
|
|
15376
|
+
return getAllObjectProperties(type.shape, resolveTypeById, extended);
|
|
15337
15377
|
})
|
|
15338
15378
|
];
|
|
15339
15379
|
}
|