@fern-api/fdr-sdk 1.2.37-96d76c8270 → 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.
@@ -4015,7 +4015,7 @@ var DocsPublishInputSchemaInternal = z21.object({
4015
4015
  path: ["defaultLocale"]
4016
4016
  });
4017
4017
  var DocsPublishInputSchema = DocsPublishInputSchemaInternal;
4018
- var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.extend({
4018
+ var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.partial().extend({
4019
4019
  orgId: z21.string(),
4020
4020
  /**
4021
4021
  * Optional caller-supplied identifier for the preview hostname. Sanitized
@@ -4030,7 +4030,33 @@ var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.extend({
4030
4030
  * Mirrors V2's `basePath` — most preview publishes leave this empty,
4031
4031
  * but explicit subpath previews (`/v2`) are supported.
4032
4032
  */
4033
- basePath: z21.string().default("")
4033
+ basePath: z21.string().default(""),
4034
+ /** The primary/fallback locale for this preview deployment. */
4035
+ defaultLocale: z21.string().optional(),
4036
+ /**
4037
+ * All locales for this preview deployment. Preferred over the legacy
4038
+ * single-locale content fields above.
4039
+ */
4040
+ locales: z21.array(LocaleEntrySchema).min(1).optional()
4041
+ }).superRefine((data, ctx) => {
4042
+ if (data.locales == null) {
4043
+ if (data.root == null || data.pages == null) {
4044
+ ctx.addIssue({
4045
+ code: z21.ZodIssueCode.custom,
4046
+ message: "Either locales or legacy single-locale content fields must be provided",
4047
+ path: ["locales"]
4048
+ });
4049
+ }
4050
+ return;
4051
+ }
4052
+ const defaultLocale = data.defaultLocale ?? data.locales[0]?.locale;
4053
+ if (defaultLocale == null || !data.locales.some((locale) => locale.locale === defaultLocale)) {
4054
+ ctx.addIssue({
4055
+ code: z21.ZodIssueCode.custom,
4056
+ message: "defaultLocale must match one of the locales in the locales array",
4057
+ path: ["defaultLocale"]
4058
+ });
4059
+ }
4034
4060
  });
4035
4061
  var LedgerPreviewRegisterInputSchema = LedgerPreviewRegisterInputSchemaInternal;
4036
4062
  var LedgerPreviewRegisterResponseSchema = z21.object({