@fern-api/fdr-sdk 1.2.37-f4aef1a36e → 1.2.38-38c6f9a29c

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.
@@ -4052,7 +4052,7 @@ var DocsPublishInputSchemaInternal = z21.object({
4052
4052
  path: ["defaultLocale"]
4053
4053
  });
4054
4054
  var DocsPublishInputSchema = DocsPublishInputSchemaInternal;
4055
- var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.extend({
4055
+ var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.partial().extend({
4056
4056
  orgId: z21.string(),
4057
4057
  /**
4058
4058
  * Optional caller-supplied identifier for the preview hostname. Sanitized
@@ -4067,7 +4067,33 @@ var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.extend({
4067
4067
  * Mirrors V2's `basePath` — most preview publishes leave this empty,
4068
4068
  * but explicit subpath previews (`/v2`) are supported.
4069
4069
  */
4070
- basePath: z21.string().default("")
4070
+ basePath: z21.string().default(""),
4071
+ /** The primary/fallback locale for this preview deployment. */
4072
+ defaultLocale: z21.string().optional(),
4073
+ /**
4074
+ * All locales for this preview deployment. Preferred over the legacy
4075
+ * single-locale content fields above.
4076
+ */
4077
+ locales: z21.array(LocaleEntrySchema).min(1).optional()
4078
+ }).superRefine((data, ctx) => {
4079
+ if (data.locales == null) {
4080
+ if (data.root == null || data.pages == null) {
4081
+ ctx.addIssue({
4082
+ code: z21.ZodIssueCode.custom,
4083
+ message: "Either locales or legacy single-locale content fields must be provided",
4084
+ path: ["locales"]
4085
+ });
4086
+ }
4087
+ return;
4088
+ }
4089
+ const defaultLocale = data.defaultLocale ?? data.locales[0]?.locale;
4090
+ if (defaultLocale == null || !data.locales.some((locale) => locale.locale === defaultLocale)) {
4091
+ ctx.addIssue({
4092
+ code: z21.ZodIssueCode.custom,
4093
+ message: "defaultLocale must match one of the locales in the locales array",
4094
+ path: ["defaultLocale"]
4095
+ });
4096
+ }
4071
4097
  });
4072
4098
  var LedgerPreviewRegisterInputSchema = LedgerPreviewRegisterInputSchemaInternal;
4073
4099
  var LedgerPreviewRegisterResponseSchema = z21.object({