@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.
@@ -11828,6 +11828,9 @@ var NodeIdGenerator = class {
11828
11828
  };
11829
11829
 
11830
11830
  // src/navigation/versions/v1/converters/SlugGenerator.ts
11831
+ function isScopedTo(slug, prefix) {
11832
+ return prefix.length > 0 && (slug === prefix || slug.startsWith(`${prefix}/`));
11833
+ }
11831
11834
  var SlugGenerator = class _SlugGenerator {
11832
11835
  constructor(baseSlug, productSlug, versionSlug, slug) {
11833
11836
  this.baseSlug = baseSlug;
@@ -11898,6 +11901,7 @@ var SlugGenerator = class _SlugGenerator {
11898
11901
  }
11899
11902
  return fullSlug;
11900
11903
  };
11904
+ const relativeProductSlug = this.productSlug != null && this.baseSlug.length > 0 && isScopedTo(this.productSlug, this.baseSlug) ? this.productSlug.substring(this.baseSlug.length + 1) : this.productSlug;
11901
11905
  if (this.productSlug != null && this.versionSlug != null) {
11902
11906
  if (slug.startsWith(this.productSlug)) {
11903
11907
  const remaining = getRemainingAfterProduct(slug);
@@ -11907,6 +11911,10 @@ var SlugGenerator = class _SlugGenerator {
11907
11911
  const remaining = getRemainingAfterBase(slug);
11908
11912
  return createWithSlug(navigation_exports.V1.slugjoin(this.baseSlug, remaining));
11909
11913
  }
11914
+ if (relativeProductSlug != null && isScopedTo(slug, relativeProductSlug)) {
11915
+ const remaining = slug.substring(relativeProductSlug.length);
11916
+ return createWithSlug(navigation_exports.V1.slugjoin(this.versionSlug, remaining));
11917
+ }
11910
11918
  return createWithSlug(navigation_exports.V1.slugjoin(this.versionSlug, slug));
11911
11919
  }
11912
11920
  if (this.versionSlug != null) {
@@ -11925,6 +11933,9 @@ var SlugGenerator = class _SlugGenerator {
11925
11933
  if (this.baseSlug.length > 0 && slug.startsWith(this.baseSlug)) {
11926
11934
  return createWithSlug(navigation_exports.V1.slugjoin(getRemainingAfterBase(slug)));
11927
11935
  }
11936
+ if (relativeProductSlug != null && isScopedTo(slug, relativeProductSlug)) {
11937
+ return createWithSlug(navigation_exports.V1.slugjoin(this.baseSlug, slug));
11938
+ }
11928
11939
  return createWithSlug(navigation_exports.V1.slugjoin(this.productSlug, slug));
11929
11940
  }
11930
11941
  if (this.baseSlug.length > 0) {