@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.
@@ -13167,6 +13167,9 @@ var NodeIdGenerator = class {
13167
13167
  };
13168
13168
 
13169
13169
  // src/navigation/versions/v1/converters/SlugGenerator.ts
13170
+ function isScopedTo(slug, prefix) {
13171
+ return prefix.length > 0 && (slug === prefix || slug.startsWith(`${prefix}/`));
13172
+ }
13170
13173
  var SlugGenerator = class _SlugGenerator {
13171
13174
  constructor(baseSlug, productSlug, versionSlug, slug) {
13172
13175
  this.baseSlug = baseSlug;
@@ -13237,6 +13240,7 @@ var SlugGenerator = class _SlugGenerator {
13237
13240
  }
13238
13241
  return fullSlug;
13239
13242
  };
13243
+ const relativeProductSlug = this.productSlug != null && this.baseSlug.length > 0 && isScopedTo(this.productSlug, this.baseSlug) ? this.productSlug.substring(this.baseSlug.length + 1) : this.productSlug;
13240
13244
  if (this.productSlug != null && this.versionSlug != null) {
13241
13245
  if (slug.startsWith(this.productSlug)) {
13242
13246
  const remaining = getRemainingAfterProduct(slug);
@@ -13246,6 +13250,10 @@ var SlugGenerator = class _SlugGenerator {
13246
13250
  const remaining = getRemainingAfterBase(slug);
13247
13251
  return createWithSlug(navigation_exports.V1.slugjoin(this.baseSlug, remaining));
13248
13252
  }
13253
+ if (relativeProductSlug != null && isScopedTo(slug, relativeProductSlug)) {
13254
+ const remaining = slug.substring(relativeProductSlug.length);
13255
+ return createWithSlug(navigation_exports.V1.slugjoin(this.versionSlug, remaining));
13256
+ }
13249
13257
  return createWithSlug(navigation_exports.V1.slugjoin(this.versionSlug, slug));
13250
13258
  }
13251
13259
  if (this.versionSlug != null) {
@@ -13264,6 +13272,9 @@ var SlugGenerator = class _SlugGenerator {
13264
13272
  if (this.baseSlug.length > 0 && slug.startsWith(this.baseSlug)) {
13265
13273
  return createWithSlug(navigation_exports.V1.slugjoin(getRemainingAfterBase(slug)));
13266
13274
  }
13275
+ if (relativeProductSlug != null && isScopedTo(slug, relativeProductSlug)) {
13276
+ return createWithSlug(navigation_exports.V1.slugjoin(this.baseSlug, slug));
13277
+ }
13267
13278
  return createWithSlug(navigation_exports.V1.slugjoin(this.productSlug, slug));
13268
13279
  }
13269
13280
  if (this.baseSlug.length > 0) {