@fern-api/fdr-sdk 1.2.37-9bb7abe0bd → 1.2.37-cc77d6a840
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 +28 -2
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +28 -2
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/index.js +28 -2
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +28 -2
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/orpc-client.js +28 -2
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +28 -2
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/orpc-client/docs-ledger/contract.d.ts +13353 -3868
- package/dist/types/orpc-client/docs-ledger/contract.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/js/orpc-client.mjs
CHANGED
|
@@ -4238,7 +4238,7 @@ var DocsPublishInputSchemaInternal = z22.object({
|
|
|
4238
4238
|
path: ["defaultLocale"]
|
|
4239
4239
|
});
|
|
4240
4240
|
var DocsPublishInputSchema = DocsPublishInputSchemaInternal;
|
|
4241
|
-
var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.extend({
|
|
4241
|
+
var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.partial().extend({
|
|
4242
4242
|
orgId: z22.string(),
|
|
4243
4243
|
/**
|
|
4244
4244
|
* Optional caller-supplied identifier for the preview hostname. Sanitized
|
|
@@ -4253,7 +4253,33 @@ var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.extend({
|
|
|
4253
4253
|
* Mirrors V2's `basePath` — most preview publishes leave this empty,
|
|
4254
4254
|
* but explicit subpath previews (`/v2`) are supported.
|
|
4255
4255
|
*/
|
|
4256
|
-
basePath: z22.string().default("")
|
|
4256
|
+
basePath: z22.string().default(""),
|
|
4257
|
+
/** The primary/fallback locale for this preview deployment. */
|
|
4258
|
+
defaultLocale: z22.string().optional(),
|
|
4259
|
+
/**
|
|
4260
|
+
* All locales for this preview deployment. Preferred over the legacy
|
|
4261
|
+
* single-locale content fields above.
|
|
4262
|
+
*/
|
|
4263
|
+
locales: z22.array(LocaleEntrySchema).min(1).optional()
|
|
4264
|
+
}).superRefine((data, ctx) => {
|
|
4265
|
+
if (data.locales == null) {
|
|
4266
|
+
if (data.root == null || data.pages == null) {
|
|
4267
|
+
ctx.addIssue({
|
|
4268
|
+
code: z22.ZodIssueCode.custom,
|
|
4269
|
+
message: "Either locales or legacy single-locale content fields must be provided",
|
|
4270
|
+
path: ["locales"]
|
|
4271
|
+
});
|
|
4272
|
+
}
|
|
4273
|
+
return;
|
|
4274
|
+
}
|
|
4275
|
+
const defaultLocale = data.defaultLocale ?? data.locales[0]?.locale;
|
|
4276
|
+
if (defaultLocale == null || !data.locales.some((locale) => locale.locale === defaultLocale)) {
|
|
4277
|
+
ctx.addIssue({
|
|
4278
|
+
code: z22.ZodIssueCode.custom,
|
|
4279
|
+
message: "defaultLocale must match one of the locales in the locales array",
|
|
4280
|
+
path: ["defaultLocale"]
|
|
4281
|
+
});
|
|
4282
|
+
}
|
|
4257
4283
|
});
|
|
4258
4284
|
var LedgerPreviewRegisterInputSchema = LedgerPreviewRegisterInputSchemaInternal;
|
|
4259
4285
|
var LedgerPreviewRegisterResponseSchema = z22.object({
|