@fern-api/fdr-sdk 1.2.94-cdc1690f8b → 1.2.96-133bf6a1f0

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.
@@ -11852,6 +11852,9 @@ var NodeIdGenerator = class {
11852
11852
  };
11853
11853
 
11854
11854
  // src/navigation/versions/v1/converters/SlugGenerator.ts
11855
+ function isScopedTo(slug, prefix) {
11856
+ return prefix.length > 0 && (slug === prefix || slug.startsWith(`${prefix}/`));
11857
+ }
11855
11858
  var SlugGenerator = class _SlugGenerator {
11856
11859
  constructor(baseSlug, productSlug, versionSlug, slug) {
11857
11860
  this.baseSlug = baseSlug;
@@ -11922,6 +11925,7 @@ var SlugGenerator = class _SlugGenerator {
11922
11925
  }
11923
11926
  return fullSlug;
11924
11927
  };
11928
+ const relativeProductSlug = this.productSlug != null && this.baseSlug.length > 0 && isScopedTo(this.productSlug, this.baseSlug) ? this.productSlug.substring(this.baseSlug.length + 1) : this.productSlug;
11925
11929
  if (this.productSlug != null && this.versionSlug != null) {
11926
11930
  if (slug.startsWith(this.productSlug)) {
11927
11931
  const remaining = getRemainingAfterProduct(slug);
@@ -11931,6 +11935,10 @@ var SlugGenerator = class _SlugGenerator {
11931
11935
  const remaining = getRemainingAfterBase(slug);
11932
11936
  return createWithSlug(navigation_exports.V1.slugjoin(this.baseSlug, remaining));
11933
11937
  }
11938
+ if (relativeProductSlug != null && isScopedTo(slug, relativeProductSlug)) {
11939
+ const remaining = slug.substring(relativeProductSlug.length);
11940
+ return createWithSlug(navigation_exports.V1.slugjoin(this.versionSlug, remaining));
11941
+ }
11934
11942
  return createWithSlug(navigation_exports.V1.slugjoin(this.versionSlug, slug));
11935
11943
  }
11936
11944
  if (this.versionSlug != null) {
@@ -11949,6 +11957,9 @@ var SlugGenerator = class _SlugGenerator {
11949
11957
  if (this.baseSlug.length > 0 && slug.startsWith(this.baseSlug)) {
11950
11958
  return createWithSlug(navigation_exports.V1.slugjoin(getRemainingAfterBase(slug)));
11951
11959
  }
11960
+ if (relativeProductSlug != null && isScopedTo(slug, relativeProductSlug)) {
11961
+ return createWithSlug(navigation_exports.V1.slugjoin(this.baseSlug, slug));
11962
+ }
11952
11963
  return createWithSlug(navigation_exports.V1.slugjoin(this.productSlug, slug));
11953
11964
  }
11954
11965
  if (this.baseSlug.length > 0) {