@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.
@@ -4882,7 +4882,7 @@ var DocsPublishInputSchemaInternal = z22.object({
4882
4882
  path: ["defaultLocale"]
4883
4883
  });
4884
4884
  var DocsPublishInputSchema = DocsPublishInputSchemaInternal;
4885
- var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.extend({
4885
+ var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.partial().extend({
4886
4886
  orgId: z22.string(),
4887
4887
  /**
4888
4888
  * Optional caller-supplied identifier for the preview hostname. Sanitized
@@ -4897,7 +4897,33 @@ var LedgerPreviewRegisterInputSchemaInternal = DocsContentFieldsSchema.extend({
4897
4897
  * Mirrors V2's `basePath` — most preview publishes leave this empty,
4898
4898
  * but explicit subpath previews (`/v2`) are supported.
4899
4899
  */
4900
- basePath: z22.string().default("")
4900
+ basePath: z22.string().default(""),
4901
+ /** The primary/fallback locale for this preview deployment. */
4902
+ defaultLocale: z22.string().optional(),
4903
+ /**
4904
+ * All locales for this preview deployment. Preferred over the legacy
4905
+ * single-locale content fields above.
4906
+ */
4907
+ locales: z22.array(LocaleEntrySchema).min(1).optional()
4908
+ }).superRefine((data, ctx) => {
4909
+ if (data.locales == null) {
4910
+ if (data.root == null || data.pages == null) {
4911
+ ctx.addIssue({
4912
+ code: z22.ZodIssueCode.custom,
4913
+ message: "Either locales or legacy single-locale content fields must be provided",
4914
+ path: ["locales"]
4915
+ });
4916
+ }
4917
+ return;
4918
+ }
4919
+ const defaultLocale = data.defaultLocale ?? data.locales[0]?.locale;
4920
+ if (defaultLocale == null || !data.locales.some((locale) => locale.locale === defaultLocale)) {
4921
+ ctx.addIssue({
4922
+ code: z22.ZodIssueCode.custom,
4923
+ message: "defaultLocale must match one of the locales in the locales array",
4924
+ path: ["defaultLocale"]
4925
+ });
4926
+ }
4901
4927
  });
4902
4928
  var LedgerPreviewRegisterInputSchema = LedgerPreviewRegisterInputSchemaInternal;
4903
4929
  var LedgerPreviewRegisterResponseSchema = z22.object({