@configura/web-api 2.0.0-alpha.8 → 2.0.0-alpha.9

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.
@@ -8,7 +8,20 @@ import { DtoCatalogueParamsWithLang, DtoProductParamsWithLang } from "./Catalogu
8
8
  * Internally at Configura we try to stick with this format.
9
9
  */
10
10
  export declare class CfgReferencePathHelper {
11
+ /**
12
+ * Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
13
+ * @param browsingRootUrl The URL where Stage browsing begins
14
+ * @param catParams What catalogue to generate URL for.
15
+ * @returns An URL to a catalogue
16
+ */
11
17
  static getCataloguePath: (browsingRootUrl: string, catParams: DtoCatalogueParamsWithLang) => string;
12
- static getProductPath: (browsingRootUrl: string, productParams: DtoProductParamsWithLang) => string;
18
+ /**
19
+ * Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
20
+ * @param browsingRootUrl The URL where Stage browsing begins
21
+ * @param productParams What product to generate URL for.
22
+ * @param separator Optional, defaults to "product", but can be changed to indicate another function.
23
+ * @returns An URL to a product
24
+ */
25
+ static getProductPath: (browsingRootUrl: string, productParams: DtoProductParamsWithLang, separator?: string) => string;
13
26
  }
14
27
  //# sourceMappingURL=CfgReferencePathHelper.d.ts.map
@@ -9,5 +9,18 @@ import { encodeURIComponents } from "@configura/web-utilities";
9
9
  */
10
10
  export class CfgReferencePathHelper {
11
11
  }
12
+ /**
13
+ * Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
14
+ * @param browsingRootUrl The URL where Stage browsing begins
15
+ * @param catParams What catalogue to generate URL for.
16
+ * @returns An URL to a catalogue
17
+ */
12
18
  CfgReferencePathHelper.getCataloguePath = (browsingRootUrl, catParams) => `${browsingRootUrl}/${encodeURIComponents(catParams.cid, catParams.lang, catParams.enterprise, catParams.prdCat, catParams.prdCatVersion, catParams.vendor, catParams.priceList)}`;
13
- CfgReferencePathHelper.getProductPath = (browsingRootUrl, productParams) => `${CfgReferencePathHelper.getCataloguePath(browsingRootUrl, productParams)}/product/${encodeURIComponent(productParams.partNumber)}`;
19
+ /**
20
+ * Use to generate URLs in our reference format. This is the format Configura uses in our integrations.
21
+ * @param browsingRootUrl The URL where Stage browsing begins
22
+ * @param productParams What product to generate URL for.
23
+ * @param separator Optional, defaults to "product", but can be changed to indicate another function.
24
+ * @returns An URL to a product
25
+ */
26
+ CfgReferencePathHelper.getProductPath = (browsingRootUrl, productParams, separator = "product") => `${CfgReferencePathHelper.getCataloguePath(browsingRootUrl, productParams)}/${separator}/${encodeURIComponent(productParams.partNumber)}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@configura/web-api",
3
- "version": "2.0.0-alpha.8",
3
+ "version": "2.0.0-alpha.9",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "access": "public"
24
24
  },
25
25
  "dependencies": {
26
- "@configura/web-utilities": "2.0.0-alpha.8"
26
+ "@configura/web-utilities": "2.0.0-alpha.9"
27
27
  },
28
- "gitHead": "7b649675de680b81a1ba8b63e9ebdf1a61f90469"
28
+ "gitHead": "734f4e65f7d3dc9836c5c0321dbe6c36bbfa2531"
29
29
  }