@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.js
CHANGED
|
@@ -9953,6 +9953,11 @@ var FinishResponseSchema = z21.object({
|
|
|
9953
9953
|
additionalSiteIds: z21.array(z21.string()).default([]),
|
|
9954
9954
|
deploymentHash: z21.string(),
|
|
9955
9955
|
reusedDeployment: z21.boolean(),
|
|
9956
|
+
/**
|
|
9957
|
+
* True when a publish of the same URL that started later was already live,
|
|
9958
|
+
* so this deployment was stored but not made live.
|
|
9959
|
+
*/
|
|
9960
|
+
superseded: z21.boolean().optional(),
|
|
9956
9961
|
/**
|
|
9957
9962
|
* Per-locale segment counts when `translations[]` was supplied on the
|
|
9958
9963
|
* finish input. Absent when no translations were included.
|
|
@@ -10751,13 +10756,26 @@ var DocsPublishInputSchemaInternal = z21.object({
|
|
|
10751
10756
|
*/
|
|
10752
10757
|
customDomains: z21.array(z21.string()).default([]),
|
|
10753
10758
|
previewId: z21.string().nullish(),
|
|
10759
|
+
/**
|
|
10760
|
+
* When the CLI started this publish (ISO 8601). FDR orders overlapping
|
|
10761
|
+
* publishes of one URL by it, so the client's local build and upload
|
|
10762
|
+
* time count. FDR falls back to its own clock when absent, in the
|
|
10763
|
+
* future, or more than 6 hours old (ADR 0040).
|
|
10764
|
+
*/
|
|
10765
|
+
publishStartedAt: z21.string().datetime({ offset: true }).nullish(),
|
|
10754
10766
|
/** The primary/fallback locale for this deployment (e.g. "en"). */
|
|
10755
10767
|
defaultLocale: z21.string().default("en"),
|
|
10756
10768
|
/**
|
|
10757
10769
|
* All locales for this deployment. Each locale goes through the same
|
|
10758
10770
|
* transform → upload → verify → persist pipeline.
|
|
10759
10771
|
*/
|
|
10760
|
-
locales: z21.array(LocaleEntrySchema).min(1)
|
|
10772
|
+
locales: z21.array(LocaleEntrySchema).min(1),
|
|
10773
|
+
/**
|
|
10774
|
+
* The publisher's `fern/` folder as a JSON `RepositoryFile[]` CAS blob, so the site can
|
|
10775
|
+
* later be written to a GitHub repo as it was published. Optional — older CLIs omit it,
|
|
10776
|
+
* and the CLI only sends it for guest publishes. A missing upload never fails the publish.
|
|
10777
|
+
*/
|
|
10778
|
+
source: BlobRefSchema.nullish()
|
|
10761
10779
|
}).refine((data) => data.locales.some((l) => l.locale === data.defaultLocale), {
|
|
10762
10780
|
message: "defaultLocale must match one of the locales in the locales array",
|
|
10763
10781
|
path: ["defaultLocale"]
|
|
@@ -10838,6 +10856,20 @@ var ListStaticBuildFilesResponseSchema = z21.object({
|
|
|
10838
10856
|
/** Pass back to get the next page; absent on the last page. */
|
|
10839
10857
|
nextCursor: z21.string().optional()
|
|
10840
10858
|
});
|
|
10859
|
+
var GetSiteSourceInputSchema = z21.object({
|
|
10860
|
+
domain: z21.string().min(1),
|
|
10861
|
+
/** "" for a root site, otherwise a leading-slash basepath. */
|
|
10862
|
+
basepath: z21.string().default("")
|
|
10863
|
+
});
|
|
10864
|
+
var GetSiteSourceResponseSchema = z21.object({
|
|
10865
|
+
/** SHA-256 hex of the source blob. */
|
|
10866
|
+
hash: z21.string(),
|
|
10867
|
+
contentLength: z21.number(),
|
|
10868
|
+
/** Short-lived signed GET URL for the JSON `RepositoryFile[]`. */
|
|
10869
|
+
url: z21.string(),
|
|
10870
|
+
/** When the publish that sent this source finished (ISO 8601). */
|
|
10871
|
+
updatedAt: z21.string()
|
|
10872
|
+
});
|
|
10841
10873
|
var docsLedgerContract = {
|
|
10842
10874
|
register: import_contract21.oc.route({ method: "POST", path: "/register" }).input(DocsPublishInputSchema).output(RegisterResponseSchema),
|
|
10843
10875
|
previewRegister: import_contract21.oc.route({ method: "POST", path: "/preview/init" }).input(LedgerPreviewRegisterInputSchema).output(LedgerPreviewRegisterResponseSchema),
|
|
@@ -10851,6 +10883,7 @@ var docsLedgerContract = {
|
|
|
10851
10883
|
resolveStaticServingHost: import_contract21.oc.route({ method: "POST", path: "/static-build/serving-host" }).input(ResolveStaticServingHostInputSchema).output(ResolveStaticServingHostResponseSchema),
|
|
10852
10884
|
/** Served by the read router; listed here so `createDocsLedgerClient` can call it. */
|
|
10853
10885
|
listStaticBuildFiles: import_contract21.oc.route({ method: "GET", path: "/static-build/files" }).input(ListStaticBuildFilesInputSchema).output(ListStaticBuildFilesResponseSchema),
|
|
10886
|
+
getSiteSource: import_contract21.oc.route({ method: "GET", path: "/site-source" }).input(GetSiteSourceInputSchema).output(GetSiteSourceResponseSchema),
|
|
10854
10887
|
getCustomHostname: import_contract21.oc.route({ method: "POST", path: "/static-build/custom-hostname/get" }).input(CustomHostnameInputSchema).output(CustomHostnameResponseSchema),
|
|
10855
10888
|
registerCustomHostname: import_contract21.oc.route({ method: "POST", path: "/static-build/custom-hostname/register" }).input(CustomHostnameInputSchema).output(CustomHostnameResponseSchema),
|
|
10856
10889
|
deleteCustomHostname: import_contract21.oc.route({ method: "POST", path: "/static-build/custom-hostname/delete" }).input(CustomHostnameInputSchema).output(DeleteCustomHostnameResponseSchema)
|
|
@@ -15201,7 +15234,7 @@ function generateExampleObject(object37, resolveTypeById, ignoreOptionals, visit
|
|
|
15201
15234
|
property.valueType,
|
|
15202
15235
|
resolveTypeById,
|
|
15203
15236
|
ignoreOptionals,
|
|
15204
|
-
|
|
15237
|
+
visited,
|
|
15205
15238
|
depth + 1
|
|
15206
15239
|
);
|
|
15207
15240
|
if (value != null) {
|
|
@@ -15217,8 +15250,17 @@ function generateExampleFromTypeReference(reference, resolveTypeById, ignoreOpti
|
|
|
15217
15250
|
example = generateExamplePrimitive(reference.value);
|
|
15218
15251
|
break;
|
|
15219
15252
|
case "id": {
|
|
15220
|
-
visited.
|
|
15221
|
-
|
|
15253
|
+
if (visited.has(reference.value)) {
|
|
15254
|
+
example = void 0;
|
|
15255
|
+
break;
|
|
15256
|
+
}
|
|
15257
|
+
example = generateExampleFromId(
|
|
15258
|
+
reference.value,
|
|
15259
|
+
resolveTypeById,
|
|
15260
|
+
ignoreOptionals,
|
|
15261
|
+
new Set(visited).add(reference.value),
|
|
15262
|
+
depth
|
|
15263
|
+
);
|
|
15222
15264
|
break;
|
|
15223
15265
|
}
|
|
15224
15266
|
case "optional":
|
|
@@ -15226,8 +15268,6 @@ function generateExampleFromTypeReference(reference, resolveTypeById, ignoreOpti
|
|
|
15226
15268
|
if (visited.has(reference.itemType.value)) {
|
|
15227
15269
|
example = void 0;
|
|
15228
15270
|
break;
|
|
15229
|
-
} else {
|
|
15230
|
-
visited.add(reference.itemType.value);
|
|
15231
15271
|
}
|
|
15232
15272
|
}
|
|
15233
15273
|
if (ignoreOptionals) {
|
|
@@ -15247,8 +15287,6 @@ function generateExampleFromTypeReference(reference, resolveTypeById, ignoreOpti
|
|
|
15247
15287
|
if (visited.has(reference.itemType.value)) {
|
|
15248
15288
|
example = void 0;
|
|
15249
15289
|
break;
|
|
15250
|
-
} else {
|
|
15251
|
-
visited.add(reference.itemType.value);
|
|
15252
15290
|
}
|
|
15253
15291
|
}
|
|
15254
15292
|
example = generateExampleFromTypeReference(
|
|
@@ -15264,8 +15302,6 @@ function generateExampleFromTypeReference(reference, resolveTypeById, ignoreOpti
|
|
|
15264
15302
|
if (visited.has(reference.itemType.value)) {
|
|
15265
15303
|
example = [];
|
|
15266
15304
|
break;
|
|
15267
|
-
} else {
|
|
15268
|
-
visited.add(reference.itemType.value);
|
|
15269
15305
|
}
|
|
15270
15306
|
}
|
|
15271
15307
|
example = [
|
|
@@ -15380,10 +15416,14 @@ function generateExamplePrimitive(reference) {
|
|
|
15380
15416
|
return reference.name;
|
|
15381
15417
|
}
|
|
15382
15418
|
}
|
|
15383
|
-
function getAllObjectProperties(object37, resolveTypeById) {
|
|
15419
|
+
function getAllObjectProperties(object37, resolveTypeById, extended = /* @__PURE__ */ new Set()) {
|
|
15384
15420
|
return [
|
|
15385
15421
|
...object37.properties,
|
|
15386
15422
|
...object37.extends.flatMap((typeId) => {
|
|
15423
|
+
if (extended.has(typeId)) {
|
|
15424
|
+
return [];
|
|
15425
|
+
}
|
|
15426
|
+
extended.add(typeId);
|
|
15387
15427
|
let type = resolveTypeById(typeId);
|
|
15388
15428
|
if (type == null) {
|
|
15389
15429
|
return [];
|
|
@@ -15397,7 +15437,7 @@ function getAllObjectProperties(object37, resolveTypeById) {
|
|
|
15397
15437
|
if (type.shape.type !== "object") {
|
|
15398
15438
|
return [];
|
|
15399
15439
|
}
|
|
15400
|
-
return getAllObjectProperties(type.shape, resolveTypeById);
|
|
15440
|
+
return getAllObjectProperties(type.shape, resolveTypeById, extended);
|
|
15401
15441
|
})
|
|
15402
15442
|
];
|
|
15403
15443
|
}
|