@plentymarkets/shop-api 0.168.1 → 0.169.0
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.
- package/lib/getters/additionalInformationGetters.d.ts.map +1 -1
- package/lib/getters/bannerGetters.d.ts +40 -0
- package/lib/getters/bannerGetters.d.ts.map +1 -1
- package/lib/getters/barcodeGetters.d.ts +35 -0
- package/lib/getters/barcodeGetters.d.ts.map +1 -1
- package/lib/getters/breadcrumbGetters.d.ts +10 -0
- package/lib/getters/breadcrumbGetters.d.ts.map +1 -1
- package/lib/getters/cartGetters.d.ts +250 -0
- package/lib/getters/cartGetters.d.ts.map +1 -1
- package/lib/getters/categoryEntryGetters.d.ts +75 -0
- package/lib/getters/categoryEntryGetters.d.ts.map +1 -1
- package/lib/getters/categoryGetters.d.ts +81 -1
- package/lib/getters/categoryGetters.d.ts.map +1 -1
- package/lib/getters/categoryTreeGetters.d.ts +98 -0
- package/lib/getters/categoryTreeGetters.d.ts.map +1 -1
- package/lib/getters/companyGetters.d.ts +20 -0
- package/lib/getters/companyGetters.d.ts.map +1 -1
- package/lib/getters/cookieBarGetters.d.ts +40 -0
- package/lib/getters/cookieBarGetters.d.ts.map +1 -1
- package/lib/getters/countryGetters.d.ts +42 -0
- package/lib/getters/countryGetters.d.ts.map +1 -1
- package/lib/getters/facetGetters.d.ts +61 -0
- package/lib/getters/facetGetters.d.ts.map +1 -1
- package/lib/getters/forgotPasswordGetters.d.ts +10 -0
- package/lib/getters/forgotPasswordGetters.d.ts.map +1 -1
- package/lib/getters/heroesGetters.d.ts +25 -0
- package/lib/getters/heroesGetters.d.ts.map +1 -1
- package/lib/getters/itemSearchAutocompleteGetters.d.ts.map +1 -1
- package/lib/getters/legalGetters.d.ts +5 -0
- package/lib/getters/legalGetters.d.ts.map +1 -1
- package/lib/getters/localesGetters.d.ts +10 -0
- package/lib/getters/localesGetters.d.ts.map +1 -1
- package/lib/getters/manufacturerGetters.d.ts +120 -0
- package/lib/getters/manufacturerGetters.d.ts.map +1 -1
- package/lib/getters/offerGetters.d.ts +78 -0
- package/lib/getters/offerGetters.d.ts.map +1 -1
- package/lib/getters/orderConfirmationGetters.d.ts.map +1 -1
- package/lib/getters/orderDocumentGetters.d.ts +10 -0
- package/lib/getters/orderDocumentGetters.d.ts.map +1 -1
- package/lib/getters/orderGetters.d.ts +567 -0
- package/lib/getters/orderGetters.d.ts.map +1 -1
- package/lib/getters/paginationGetters.d.ts +15 -0
- package/lib/getters/paginationGetters.d.ts.map +1 -1
- package/lib/getters/paymentProviderGetters.d.ts +54 -0
- package/lib/getters/paymentProviderGetters.d.ts.map +1 -1
- package/lib/getters/paypalGetters.d.ts +15 -0
- package/lib/getters/paypalGetters.d.ts.map +1 -1
- package/lib/getters/productAttributeGetters.d.ts +53 -0
- package/lib/getters/productAttributeGetters.d.ts.map +1 -1
- package/lib/getters/productBundleGetters.d.ts +49 -0
- package/lib/getters/productBundleGetters.d.ts.map +1 -1
- package/lib/getters/productGetters.d.ts +366 -0
- package/lib/getters/productGetters.d.ts.map +1 -1
- package/lib/getters/productImageGetters.d.ts +50 -0
- package/lib/getters/productImageGetters.d.ts.map +1 -1
- package/lib/getters/productPriceGetters.d.ts.map +1 -1
- package/lib/getters/productPropertyGetters.d.ts +268 -0
- package/lib/getters/productPropertyGetters.d.ts.map +1 -1
- package/lib/getters/productSeoSettingsGetters.d.ts +95 -0
- package/lib/getters/productSeoSettingsGetters.d.ts.map +1 -1
- package/lib/getters/returnGetters.d.ts +111 -0
- package/lib/getters/returnGetters.d.ts.map +1 -1
- package/lib/getters/reviewGetters.d.ts +110 -0
- package/lib/getters/reviewGetters.d.ts.map +1 -1
- package/lib/getters/robotGetters.d.ts +45 -0
- package/lib/getters/robotGetters.d.ts.map +1 -1
- package/lib/getters/shippingProviderGetters.d.ts +45 -0
- package/lib/getters/shippingProviderGetters.d.ts.map +1 -1
- package/lib/getters/tagGetters.d.ts +31 -0
- package/lib/getters/tagGetters.d.ts.map +1 -1
- package/lib/getters/userAddressGetters.d.ts +111 -0
- package/lib/getters/userAddressGetters.d.ts.map +1 -1
- package/lib/getters/userGetters.d.ts +25 -0
- package/lib/getters/userGetters.d.ts.map +1 -1
- package/lib/getters/wishlistGetters.d.ts +83 -0
- package/lib/getters/wishlistGetters.d.ts.map +1 -1
- package/lib/index.cjs.js +3342 -21
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.es.js +3342 -21
- package/lib/index.es.js.map +1 -1
- package/lib/types/api/breadcrumbs.d.ts +1 -0
- package/lib/types/api/breadcrumbs.d.ts.map +1 -1
- package/lib/types/api/category.d.ts +7 -0
- package/lib/types/api/category.d.ts.map +1 -1
- package/package.json +3 -3
- package/server/getters/additionalInformationGetters.d.ts.map +1 -1
- package/server/getters/bannerGetters.d.ts +40 -0
- package/server/getters/bannerGetters.d.ts.map +1 -1
- package/server/getters/barcodeGetters.d.ts +35 -0
- package/server/getters/barcodeGetters.d.ts.map +1 -1
- package/server/getters/breadcrumbGetters.d.ts +10 -0
- package/server/getters/breadcrumbGetters.d.ts.map +1 -1
- package/server/getters/cartGetters.d.ts +250 -0
- package/server/getters/cartGetters.d.ts.map +1 -1
- package/server/getters/categoryEntryGetters.d.ts +75 -0
- package/server/getters/categoryEntryGetters.d.ts.map +1 -1
- package/server/getters/categoryGetters.d.ts +81 -1
- package/server/getters/categoryGetters.d.ts.map +1 -1
- package/server/getters/categoryTreeGetters.d.ts +98 -0
- package/server/getters/categoryTreeGetters.d.ts.map +1 -1
- package/server/getters/companyGetters.d.ts +20 -0
- package/server/getters/companyGetters.d.ts.map +1 -1
- package/server/getters/cookieBarGetters.d.ts +40 -0
- package/server/getters/cookieBarGetters.d.ts.map +1 -1
- package/server/getters/countryGetters.d.ts +42 -0
- package/server/getters/countryGetters.d.ts.map +1 -1
- package/server/getters/facetGetters.d.ts +61 -0
- package/server/getters/facetGetters.d.ts.map +1 -1
- package/server/getters/forgotPasswordGetters.d.ts +10 -0
- package/server/getters/forgotPasswordGetters.d.ts.map +1 -1
- package/server/getters/heroesGetters.d.ts +25 -0
- package/server/getters/heroesGetters.d.ts.map +1 -1
- package/server/getters/itemSearchAutocompleteGetters.d.ts.map +1 -1
- package/server/getters/legalGetters.d.ts +5 -0
- package/server/getters/legalGetters.d.ts.map +1 -1
- package/server/getters/localesGetters.d.ts +10 -0
- package/server/getters/localesGetters.d.ts.map +1 -1
- package/server/getters/manufacturerGetters.d.ts +120 -0
- package/server/getters/manufacturerGetters.d.ts.map +1 -1
- package/server/getters/offerGetters.d.ts +78 -0
- package/server/getters/offerGetters.d.ts.map +1 -1
- package/server/getters/orderConfirmationGetters.d.ts.map +1 -1
- package/server/getters/orderDocumentGetters.d.ts +10 -0
- package/server/getters/orderDocumentGetters.d.ts.map +1 -1
- package/server/getters/orderGetters.d.ts +567 -0
- package/server/getters/orderGetters.d.ts.map +1 -1
- package/server/getters/paginationGetters.d.ts +15 -0
- package/server/getters/paginationGetters.d.ts.map +1 -1
- package/server/getters/paymentProviderGetters.d.ts +54 -0
- package/server/getters/paymentProviderGetters.d.ts.map +1 -1
- package/server/getters/paypalGetters.d.ts +15 -0
- package/server/getters/paypalGetters.d.ts.map +1 -1
- package/server/getters/productAttributeGetters.d.ts +53 -0
- package/server/getters/productAttributeGetters.d.ts.map +1 -1
- package/server/getters/productBundleGetters.d.ts +49 -0
- package/server/getters/productBundleGetters.d.ts.map +1 -1
- package/server/getters/productGetters.d.ts +366 -0
- package/server/getters/productGetters.d.ts.map +1 -1
- package/server/getters/productImageGetters.d.ts +50 -0
- package/server/getters/productImageGetters.d.ts.map +1 -1
- package/server/getters/productPriceGetters.d.ts.map +1 -1
- package/server/getters/productPropertyGetters.d.ts +268 -0
- package/server/getters/productPropertyGetters.d.ts.map +1 -1
- package/server/getters/productSeoSettingsGetters.d.ts +95 -0
- package/server/getters/productSeoSettingsGetters.d.ts.map +1 -1
- package/server/getters/returnGetters.d.ts +111 -0
- package/server/getters/returnGetters.d.ts.map +1 -1
- package/server/getters/reviewGetters.d.ts +110 -0
- package/server/getters/reviewGetters.d.ts.map +1 -1
- package/server/getters/robotGetters.d.ts +45 -0
- package/server/getters/robotGetters.d.ts.map +1 -1
- package/server/getters/shippingProviderGetters.d.ts +45 -0
- package/server/getters/shippingProviderGetters.d.ts.map +1 -1
- package/server/getters/tagGetters.d.ts +31 -0
- package/server/getters/tagGetters.d.ts.map +1 -1
- package/server/getters/userAddressGetters.d.ts +111 -0
- package/server/getters/userAddressGetters.d.ts.map +1 -1
- package/server/getters/userGetters.d.ts +25 -0
- package/server/getters/userGetters.d.ts.map +1 -1
- package/server/getters/wishlistGetters.d.ts +83 -0
- package/server/getters/wishlistGetters.d.ts.map +1 -1
- package/server/types/api/breadcrumbs.d.ts +1 -0
- package/server/types/api/breadcrumbs.d.ts.map +1 -1
- package/server/types/api/category.d.ts +7 -0
- package/server/types/api/category.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"additionalInformationGetters.d.ts","sourceRoot":"","sources":["../../src/getters/additionalInformationGetters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"additionalInformationGetters.d.ts","sourceRoot":"","sources":["../../src/getters/additionalInformationGetters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAmBxD,eAAO,MAAM,4BAA4B;uCAV/B,2BAA2B,GAAG,SAAS,KAC9C,2BAA2B;CAW7B,CAAC"}
|
|
@@ -8,13 +8,53 @@ export interface Baner {
|
|
|
8
8
|
image: string;
|
|
9
9
|
class: string;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Returns the slot identifier of a banner.
|
|
13
|
+
* @param banner - The banner object.
|
|
14
|
+
* @returns The slot string, or an empty string if not set.
|
|
15
|
+
*/
|
|
11
16
|
declare function getSlot(banner: Baner): string;
|
|
17
|
+
/**
|
|
18
|
+
* Returns the title of a banner.
|
|
19
|
+
* @param banner - The banner object.
|
|
20
|
+
* @returns The title string, or an empty string if not set.
|
|
21
|
+
*/
|
|
12
22
|
declare function getTitle(banner: Baner): string;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the subtitle of a banner.
|
|
25
|
+
* @param banner - The banner object.
|
|
26
|
+
* @returns The subtitle string, or an empty string if not set.
|
|
27
|
+
*/
|
|
13
28
|
declare function getSubTitle(banner: Baner): string;
|
|
29
|
+
/**
|
|
30
|
+
* Returns the description text of a banner.
|
|
31
|
+
* @param banner - The banner object.
|
|
32
|
+
* @returns The description string, or an empty string if not set.
|
|
33
|
+
*/
|
|
14
34
|
declare function getDescription(banner: Baner): string;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the call-to-action button text of a banner.
|
|
37
|
+
* @param banner - The banner object.
|
|
38
|
+
* @returns The button text string, or an empty string if not set.
|
|
39
|
+
*/
|
|
15
40
|
declare function getButtonText(banner: Baner): string;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the target link URL of a banner.
|
|
43
|
+
* @param banner - The banner object.
|
|
44
|
+
* @returns The link URL string, or an empty string if not set.
|
|
45
|
+
*/
|
|
16
46
|
declare function getLink(banner: Baner): string;
|
|
47
|
+
/**
|
|
48
|
+
* Returns the image URL of a banner.
|
|
49
|
+
* @param banner - The banner object.
|
|
50
|
+
* @returns The image URL string, or an empty string if not set.
|
|
51
|
+
*/
|
|
17
52
|
declare function getImage(banner: Baner): string;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the CSS class name of a banner.
|
|
55
|
+
* @param banner - The banner object.
|
|
56
|
+
* @returns The CSS class string, or an empty string if not set.
|
|
57
|
+
*/
|
|
18
58
|
declare function getClass(banner: Baner): string;
|
|
19
59
|
export declare const bannerGetters: {
|
|
20
60
|
getSlot: typeof getSlot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bannerGetters.d.ts","sourceRoot":"","sources":["../../src/getters/bannerGetters.ts"],"names":[],"mappings":"A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EtC;AAED;;;;GAIG;AACH,iBAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,CAEvC;AAED;;;;GAIG;AACH,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,CAE1C;AAED;;;;GAIG;AACH,iBAAS,cAAc,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,CAE7C;AAED;;;;GAIG;AACH,iBAAS,aAAa,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,CAE5C;AAED;;;;GAIG;AACH,iBAAS,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,CAEtC;AAED;;;;GAIG;AACH,iBAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,CAEvC;AAED;;;;GAIG;AACH,iBAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,CAEvC;AAED,eAAO,MAAM,aAAa;;;;;;;;;CASzB,CAAC"}
|
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
import { Barcode } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the numeric ID of a barcode.
|
|
4
|
+
* @param barcode - The barcode object.
|
|
5
|
+
* @returns The barcode ID, or `0` if not set.
|
|
6
|
+
*/
|
|
2
7
|
declare function getId(barcode: Barcode): number;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the display name of a barcode.
|
|
10
|
+
* @param barcode - The barcode object.
|
|
11
|
+
* @returns The barcode name string, or an empty string if not set.
|
|
12
|
+
*/
|
|
3
13
|
declare function getName(barcode: Barcode): string;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the type of a barcode (e.g. `"EAN_13"`, `"QR"`, `"CODE_128"`).
|
|
16
|
+
* @param barcode - The barcode object.
|
|
17
|
+
* @returns The barcode type string, or an empty string if not set.
|
|
18
|
+
*/
|
|
4
19
|
declare function getType(barcode: Barcode): string;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the barcode value (the actual code string).
|
|
22
|
+
* @param barcode - The barcode object.
|
|
23
|
+
* @returns The code string, or an empty string if not set.
|
|
24
|
+
*/
|
|
5
25
|
declare function getCode(barcode: Barcode): string;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the creation timestamp of a barcode as an ISO date string.
|
|
28
|
+
* @param barcode - The barcode object.
|
|
29
|
+
* @returns The `createdAt` date string, or an empty string if not set.
|
|
30
|
+
*/
|
|
6
31
|
declare function getCreatedAt(barcode: Barcode): string;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the last-updated timestamp of a barcode as an ISO date string.
|
|
34
|
+
* @param barcode - The barcode object.
|
|
35
|
+
* @returns The `updatedAt` date string, or an empty string if not set.
|
|
36
|
+
*/
|
|
7
37
|
declare function getUpdatedAt(barcode: Barcode): string;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the list of referrer IDs on which the barcode is visible.
|
|
40
|
+
* @param barcode - The barcode object.
|
|
41
|
+
* @returns An array of referrer ID numbers, or an empty array if none are set.
|
|
42
|
+
*/
|
|
8
43
|
declare function getReferrers(barcode: Barcode): number[];
|
|
9
44
|
export declare const barcodeGetters: {
|
|
10
45
|
getId: typeof getId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barcodeGetters.d.ts","sourceRoot":"","sources":["../../src/getters/barcodeGetters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,iBAAS,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEvC;AAED,iBAAS,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzC;AAED,iBAAS,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzC;AAED,iBAAS,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzC;AAED,iBAAS,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE9C;AAED,iBAAS,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE9C;AAED,iBAAS,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAEhD;AAED,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"barcodeGetters.d.ts","sourceRoot":"","sources":["../../src/getters/barcodeGetters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC;;;;GAIG;AACH,iBAAS,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEvC;AAED;;;;GAIG;AACH,iBAAS,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzC;AAED;;;;GAIG;AACH,iBAAS,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzC;AAED;;;;GAIG;AACH,iBAAS,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzC;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE9C;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAE9C;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAEhD;AAED,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import type { Breadcrumb, CategoryBreadcrumb } from 'src/types';
|
|
2
|
+
/**
|
|
3
|
+
* Maps an array of category breadcrumbs to the agnostic {@link Breadcrumb} format.
|
|
4
|
+
* @param categoryBreadcrumbs - The array of category breadcrumb objects from the API response.
|
|
5
|
+
* @returns An array of {@link Breadcrumb} objects with `name` and `link` properties.
|
|
6
|
+
*/
|
|
2
7
|
declare function mapFromCategoryBreadcrumbs(categoryBreadcrumbs: CategoryBreadcrumb[]): Breadcrumb[];
|
|
3
8
|
export declare const breadcrumbGetters: {
|
|
4
9
|
mapFromCategoryBreadcrumbs: typeof mapFromCategoryBreadcrumbs;
|
|
10
|
+
getName: (breadcrumb: CategoryBreadcrumb) => string;
|
|
11
|
+
getUrl: (breadcrumb: CategoryBreadcrumb) => string;
|
|
12
|
+
getItemCount: (breadcrumb: CategoryBreadcrumb) => number;
|
|
13
|
+
getCurrent: (breadcrumbs: CategoryBreadcrumb[]) => CategoryBreadcrumb | null;
|
|
14
|
+
getParent: (breadcrumbs: CategoryBreadcrumb[]) => CategoryBreadcrumb | null;
|
|
5
15
|
};
|
|
6
16
|
export {};
|
|
7
17
|
//# sourceMappingURL=breadcrumbGetters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbGetters.d.ts","sourceRoot":"","sources":["../../src/getters/breadcrumbGetters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEhE,iBAAS,0BAA0B,CACjC,mBAAmB,EAAE,kBAAkB,EAAE,GACxC,UAAU,EAAE,CAOd;
|
|
1
|
+
{"version":3,"file":"breadcrumbGetters.d.ts","sourceRoot":"","sources":["../../src/getters/breadcrumbGetters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEhE;;;;GAIG;AACH,iBAAS,0BAA0B,CACjC,mBAAmB,EAAE,kBAAkB,EAAE,GACxC,UAAU,EAAE,CAOd;AAkBD,eAAO,MAAM,iBAAiB;;0BAhBD,kBAAkB,KAAG,MAAM;yBAE5B,kBAAkB,KAAG,MAAM;+BAErB,kBAAkB,KAAG,MAAM;8BAI9C,kBAAkB,EAAE,KAChC,kBAAkB,GAAG,IAAI;6BAGb,kBAAkB,EAAE,KAChC,kBAAkB,GAAG,IAAI;CAU3B,CAAC"}
|
|
@@ -1,54 +1,304 @@
|
|
|
1
1
|
import { AgnosticCoupon, AgnosticDiscount, AgnosticAttribute, AgnosticTotals } from './agnostic';
|
|
2
2
|
import { type BasketItemOrderParam, type Cart, CartItem, PlentyAgnosticTotals, Product, ProductProperty, type TotalVat } from '../types';
|
|
3
3
|
import { type ProductBundleComponent } from '../types/api/product';
|
|
4
|
+
/**
|
|
5
|
+
* Returns all items in the cart.
|
|
6
|
+
* @param cart - The cart object.
|
|
7
|
+
* @returns An array of {@link CartItem} objects, or an empty array if the cart has no items.
|
|
8
|
+
*/
|
|
4
9
|
declare function getItems(cart: Cart): CartItem[];
|
|
10
|
+
/**
|
|
11
|
+
* Returns the invoice address ID associated with the cart.
|
|
12
|
+
* @param cart - The cart object.
|
|
13
|
+
* @returns The customer invoice address ID, or `null` if not set.
|
|
14
|
+
*/
|
|
5
15
|
declare function getCustomerInvoiceAddressId(cart: Cart): number | null;
|
|
16
|
+
/**
|
|
17
|
+
* Returns the shipping address ID associated with the cart.
|
|
18
|
+
* @param cart - The cart object.
|
|
19
|
+
* @returns The customer shipping address ID, or `null` if not set.
|
|
20
|
+
*/
|
|
6
21
|
declare function getCustomerShippingAddressId(cart: Cart): number | null;
|
|
22
|
+
/**
|
|
23
|
+
* Returns the unit price of a cart item.
|
|
24
|
+
* @param item - The cart item.
|
|
25
|
+
* @returns The item price as a number.
|
|
26
|
+
*/
|
|
7
27
|
declare function getCartItemPrice(item: CartItem): number;
|
|
28
|
+
/**
|
|
29
|
+
* Returns the display name of the product associated with a cart item.
|
|
30
|
+
* @param item - The cart item.
|
|
31
|
+
* @returns The product name, or an empty string if the variation is not set.
|
|
32
|
+
*/
|
|
8
33
|
declare function getItemName(item: CartItem): string;
|
|
34
|
+
/**
|
|
35
|
+
* Returns the small-size cover image URL for the product in a cart item.
|
|
36
|
+
* @param item - The cart item.
|
|
37
|
+
* @returns The cover image preview URL, or an empty string if the variation is not set.
|
|
38
|
+
*/
|
|
9
39
|
declare function getItemImage(item: CartItem): string;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the unit price of the product in a cart item.
|
|
42
|
+
* @param item - The cart item.
|
|
43
|
+
* @returns The price as a number, or `null` if the variation is not set.
|
|
44
|
+
*/
|
|
10
45
|
declare function getItemPrice(item: CartItem): number | null;
|
|
46
|
+
/**
|
|
47
|
+
* Returns the quantity of a cart item.
|
|
48
|
+
* @param item - The cart item.
|
|
49
|
+
* @returns The quantity, defaulting to `1` if not set.
|
|
50
|
+
*/
|
|
11
51
|
declare function getItemQty(item: CartItem): number;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the attributes of the product variation in a cart item as agnostic attribute objects.
|
|
54
|
+
* @param item - The cart item.
|
|
55
|
+
* @returns An array of {@link AgnosticAttribute} objects, or an empty array if no attributes are set.
|
|
56
|
+
*/
|
|
12
57
|
declare function getItemAttributes(item: CartItem): AgnosticAttribute[];
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Not yet implemented — always returns an empty string.
|
|
60
|
+
* @param item - The cart item (currently unused).
|
|
61
|
+
* @returns An empty string.
|
|
62
|
+
*/
|
|
13
63
|
declare function getItemSku(item: CartItem): string;
|
|
64
|
+
/**
|
|
65
|
+
* Returns the unique ID of the cart item.
|
|
66
|
+
* @param item - The cart item.
|
|
67
|
+
* @returns The cart item ID, or `0` if not set.
|
|
68
|
+
*/
|
|
14
69
|
declare function getItemId(item: CartItem): number;
|
|
70
|
+
/**
|
|
71
|
+
* Returns the product variation associated with a cart item.
|
|
72
|
+
* @param item - The cart item.
|
|
73
|
+
* @returns The {@link Product} object, or `null` if not set.
|
|
74
|
+
*/
|
|
15
75
|
declare function getVariation(item: CartItem): Product | null;
|
|
76
|
+
/**
|
|
77
|
+
* Returns the basket item order parameters (order properties) for a cart item.
|
|
78
|
+
* @param item - The cart item.
|
|
79
|
+
* @returns An array of {@link BasketItemOrderParam} objects.
|
|
80
|
+
*/
|
|
16
81
|
declare function getBasketItemOrderParams(item: CartItem): BasketItemOrderParam[];
|
|
82
|
+
/**
|
|
83
|
+
* Returns the bundle components of the product variation in a cart item.
|
|
84
|
+
* @param item - The cart item.
|
|
85
|
+
* @returns An array of {@link ProductBundleComponent} objects, or `null` if none are set.
|
|
86
|
+
*/
|
|
17
87
|
declare function getVariationBundleComponents(item: CartItem): ProductBundleComponent[] | null;
|
|
88
|
+
/**
|
|
89
|
+
* Returns the variation ID of a cart item.
|
|
90
|
+
* @param item - The cart item.
|
|
91
|
+
* @returns The variation ID, or `0` if not set.
|
|
92
|
+
*/
|
|
18
93
|
declare function getVariationId(item: CartItem): number;
|
|
94
|
+
/**
|
|
95
|
+
* Returns the aggregated totals for the cart.
|
|
96
|
+
* @param cart - The cart object.
|
|
97
|
+
* @returns An {@link AgnosticTotals} object with total, subtotal, shipping, rebate, coupon discount, VATs, and the amount to be paid.
|
|
98
|
+
*/
|
|
19
99
|
declare function getTotals(cart: Cart): AgnosticTotals;
|
|
100
|
+
/**
|
|
101
|
+
* Returns the VAT value (rate) from a cart VAT entry.
|
|
102
|
+
* @param totalVat - A cart VAT entry.
|
|
103
|
+
* @returns The VAT value, or `0` if not set.
|
|
104
|
+
*/
|
|
20
105
|
declare function getTotalVatValue(totalVat: TotalVat): number;
|
|
106
|
+
/**
|
|
107
|
+
* Returns the VAT amount (monetary value) from a cart VAT entry.
|
|
108
|
+
* @param totalVat - A cart VAT entry.
|
|
109
|
+
* @returns The VAT amount, or `0` if not set.
|
|
110
|
+
*/
|
|
21
111
|
declare function getTotalVatAmount(totalVat: TotalVat): number;
|
|
112
|
+
/**
|
|
113
|
+
* Returns the subtotal (item sum) from an agnostic totals object.
|
|
114
|
+
* @param total - The agnostic totals object.
|
|
115
|
+
* @returns The subtotal, or `0` if not set.
|
|
116
|
+
*/
|
|
22
117
|
declare function getSubTotal(total: AgnosticTotals): number;
|
|
118
|
+
/**
|
|
119
|
+
* Returns the shipping amount from an agnostic totals object.
|
|
120
|
+
* @param total - The agnostic totals object.
|
|
121
|
+
* @returns The shipping amount, or `0` if not set.
|
|
122
|
+
*/
|
|
23
123
|
declare function getShippingAmount(total: PlentyAgnosticTotals): number;
|
|
124
|
+
/**
|
|
125
|
+
* Returns the VAT amount from an agnostic totals object.
|
|
126
|
+
* @param total - The agnostic totals object.
|
|
127
|
+
* @returns The VAT amount, or `0` if not set.
|
|
128
|
+
*/
|
|
24
129
|
declare function getVatAmount(total: PlentyAgnosticTotals): number;
|
|
130
|
+
/**
|
|
131
|
+
* Returns the net basket amount of the cart (excluding VAT).
|
|
132
|
+
* @param cart - The cart object.
|
|
133
|
+
* @returns The net basket amount, or `0` if not set.
|
|
134
|
+
*/
|
|
25
135
|
declare function getBasketAmountNet(cart: Cart): number;
|
|
136
|
+
/**
|
|
137
|
+
* Returns the net shipping amount of the cart (excluding VAT).
|
|
138
|
+
* @param cart - The cart object.
|
|
139
|
+
* @returns The net shipping amount, or `0` if not set.
|
|
140
|
+
*/
|
|
26
141
|
declare function getShippingAmountNet(cart: Cart): number;
|
|
142
|
+
/**
|
|
143
|
+
* Returns the net item sum of the cart (excluding VAT).
|
|
144
|
+
* @param cart - The cart object.
|
|
145
|
+
* @returns The net item sum, or `0` if not set.
|
|
146
|
+
*/
|
|
27
147
|
declare function getItemSumNet(cart: Cart): number;
|
|
148
|
+
/**
|
|
149
|
+
* Returns the gross total from an agnostic totals object.
|
|
150
|
+
* @param total - The agnostic totals object.
|
|
151
|
+
* @returns The total, or `0` if not set.
|
|
152
|
+
*/
|
|
28
153
|
declare function getTotal(total: AgnosticTotals): number;
|
|
154
|
+
/**
|
|
155
|
+
* Returns the coupon discount amount applied to the cart.
|
|
156
|
+
* @param cart - The cart object.
|
|
157
|
+
* @returns The coupon discount, or `0` if not set.
|
|
158
|
+
*/
|
|
29
159
|
declare function getCouponDiscount(cart: Cart): number;
|
|
160
|
+
/**
|
|
161
|
+
* Returns the coupon code applied to the cart.
|
|
162
|
+
* @param cart - The cart object.
|
|
163
|
+
* @returns The coupon code string, or an empty string if not set.
|
|
164
|
+
*/
|
|
30
165
|
declare function getCouponCode(cart: Cart): string;
|
|
166
|
+
/**
|
|
167
|
+
* Returns the VAT value (rate) from an agnostic totals object.
|
|
168
|
+
* @param total - The agnostic totals object.
|
|
169
|
+
* @returns The VAT value, or `0` if not set.
|
|
170
|
+
*/
|
|
31
171
|
declare function getVatValue(total: PlentyAgnosticTotals): number;
|
|
172
|
+
/**
|
|
173
|
+
* Returns the amount yet to be paid from an agnostic totals object.
|
|
174
|
+
* @param total - The agnostic totals object.
|
|
175
|
+
* @returns The amount to be paid, or `0` if not set.
|
|
176
|
+
*/
|
|
32
177
|
declare function getToBePayed(total: PlentyAgnosticTotals): number;
|
|
178
|
+
/**
|
|
179
|
+
* Returns the shipping price of the cart.
|
|
180
|
+
* @param cart - The cart object.
|
|
181
|
+
* @returns The shipping amount, or `0` if not set.
|
|
182
|
+
*/
|
|
33
183
|
declare function getShippingPrice(cart: Cart): number;
|
|
184
|
+
/**
|
|
185
|
+
* Returns the shipping country ID set on the cart.
|
|
186
|
+
* @param cart - The cart object (optional).
|
|
187
|
+
* @returns The shipping country ID, or `0` if not set.
|
|
188
|
+
*/
|
|
34
189
|
declare function getShippingCountryId(cart?: Cart): number;
|
|
190
|
+
/**
|
|
191
|
+
* Returns the shop country ID set on the cart.
|
|
192
|
+
* @param cart - The cart object (optional).
|
|
193
|
+
* @returns The shop country ID, or `0` if not set.
|
|
194
|
+
*/
|
|
35
195
|
declare function getShopCountryId(cart?: Cart): number;
|
|
196
|
+
/**
|
|
197
|
+
* Returns the total number of distinct line items in the cart.
|
|
198
|
+
* @param cart - The cart object.
|
|
199
|
+
* @returns The number of cart items, or `0` if the cart is empty.
|
|
200
|
+
*/
|
|
36
201
|
declare function getTotalItems(cart: Cart): number;
|
|
202
|
+
/**
|
|
203
|
+
* @deprecated Not yet implemented — always returns an empty string.
|
|
204
|
+
* @param price - The price to format (currently unused).
|
|
205
|
+
* @returns An empty string.
|
|
206
|
+
*/
|
|
37
207
|
declare function getFormattedPrice(price: number): string;
|
|
208
|
+
/**
|
|
209
|
+
* @deprecated Not yet implemented — always returns an empty array.
|
|
210
|
+
* @param cart - The cart object (currently unused).
|
|
211
|
+
* @returns An empty array.
|
|
212
|
+
*/
|
|
38
213
|
declare function getCoupons(cart: Cart): AgnosticCoupon[];
|
|
214
|
+
/**
|
|
215
|
+
* @deprecated Not yet implemented — always returns an empty array.
|
|
216
|
+
* @param cart - The cart object (currently unused).
|
|
217
|
+
* @returns An empty array.
|
|
218
|
+
*/
|
|
39
219
|
declare function getDiscounts(cart: Cart): AgnosticDiscount[];
|
|
220
|
+
/**
|
|
221
|
+
* Returns the currency code used in the cart.
|
|
222
|
+
* @param cart - The cart object.
|
|
223
|
+
* @returns The ISO 4217 currency code string (e.g. `"EUR"`).
|
|
224
|
+
*/
|
|
40
225
|
declare function getCurrency(cart: Cart): string;
|
|
226
|
+
/**
|
|
227
|
+
* Returns the URL path to the product page for a cart item.
|
|
228
|
+
* Supports the legacy Callisto URL pattern when `useCallistoPattern` is `true`.
|
|
229
|
+
* @param item - The cart item.
|
|
230
|
+
* @param useCallistoPattern - When `true`, appends the item ID using the Callisto pattern (`/a-{itemId}`); otherwise uses the Ceres pattern (`_{itemId}_{variationId}`).
|
|
231
|
+
* @returns The product URL path, or an empty string if the variation URL path is not set.
|
|
232
|
+
*/
|
|
41
233
|
declare function getProductPath(item: CartItem, useCallistoPattern?: boolean): string;
|
|
234
|
+
/**
|
|
235
|
+
* Returns the product property with the given ID from a cart item's variation.
|
|
236
|
+
* @param item - The cart item.
|
|
237
|
+
* @param propertyId - The numeric ID of the property to look up.
|
|
238
|
+
* @returns The matching {@link ProductProperty}, or `null` if not found.
|
|
239
|
+
*/
|
|
42
240
|
declare function getPropertyFromCartItem(item: CartItem, propertyId: number): ProductProperty | null;
|
|
241
|
+
/**
|
|
242
|
+
* Returns all basket item order parameters for the cart that have a `"plus"` surcharge type
|
|
243
|
+
* (i.e. order properties whose surcharge is shown separately, without VAT).
|
|
244
|
+
* @param cart - The cart object.
|
|
245
|
+
* @returns An array of {@link BasketItemOrderParam} objects with aggregated prices.
|
|
246
|
+
*/
|
|
43
247
|
declare function getOrderPropertiesWithoutVat(cart: Cart): BasketItemOrderParam[];
|
|
248
|
+
/**
|
|
249
|
+
* Returns all basket item order parameters for the cart that are marked as additional costs
|
|
250
|
+
* and have a `"incl"` surcharge type (i.e. their surcharge includes VAT).
|
|
251
|
+
* @param cart - The cart object.
|
|
252
|
+
* @returns An array of {@link BasketItemOrderParam} objects with aggregated prices.
|
|
253
|
+
*/
|
|
44
254
|
declare function getOrderPropertiesAdditionalCostsWithVat(cart: Cart): BasketItemOrderParam[];
|
|
255
|
+
/**
|
|
256
|
+
* Returns the display name of a basket item order parameter.
|
|
257
|
+
* @param item - The basket item order parameter.
|
|
258
|
+
* @returns The name string.
|
|
259
|
+
*/
|
|
45
260
|
declare function getBasketItemOrderParamName(item: BasketItemOrderParam): string;
|
|
261
|
+
/**
|
|
262
|
+
* Returns the price of a basket item order parameter.
|
|
263
|
+
* @param item - The basket item order parameter.
|
|
264
|
+
* @returns The price as a number.
|
|
265
|
+
*/
|
|
46
266
|
declare function getBasketItemOrderParamPrice(item: BasketItemOrderParam): number;
|
|
267
|
+
/**
|
|
268
|
+
* Returns the value of a basket item order parameter.
|
|
269
|
+
* @param item - The basket item order parameter.
|
|
270
|
+
* @returns The value string.
|
|
271
|
+
*/
|
|
47
272
|
declare function getBasketItemOrderParamValue(item: BasketItemOrderParam): string;
|
|
273
|
+
/**
|
|
274
|
+
* Returns the type of a basket item order parameter (e.g. `"text"`, `"file"`, `"selection"`).
|
|
275
|
+
* @param item - The basket item order parameter.
|
|
276
|
+
* @returns The type string.
|
|
277
|
+
*/
|
|
48
278
|
declare function getBasketItemOrderParamType(item: BasketItemOrderParam): string;
|
|
279
|
+
/**
|
|
280
|
+
* Returns the cart item ID that the basket item order parameter belongs to.
|
|
281
|
+
* @param item - The basket item order parameter.
|
|
282
|
+
* @returns The basket item ID as a number.
|
|
283
|
+
*/
|
|
49
284
|
declare function getBasketItemOrderParamBasketItemId(item: BasketItemOrderParam): number;
|
|
285
|
+
/**
|
|
286
|
+
* Returns the property ID of a basket item order parameter.
|
|
287
|
+
* @param item - The basket item order parameter.
|
|
288
|
+
* @returns The property ID string.
|
|
289
|
+
*/
|
|
50
290
|
declare function getBasketItemOrderParamPropertyId(item: BasketItemOrderParam): string;
|
|
291
|
+
/**
|
|
292
|
+
* Returns the coupon campaign type applied to the cart.
|
|
293
|
+
* @param cart - The cart object.
|
|
294
|
+
* @returns The coupon campaign type string, or an empty string if not set.
|
|
295
|
+
*/
|
|
51
296
|
declare function getCouponCampaignType(cart: Cart): string;
|
|
297
|
+
/**
|
|
298
|
+
* Returns the outstanding open amount for the cart.
|
|
299
|
+
* @param cart - The cart object.
|
|
300
|
+
* @returns The open amount, or `null` if not set.
|
|
301
|
+
*/
|
|
52
302
|
declare function getOpenAmount(cart: Cart): number | null;
|
|
53
303
|
export declare const cartGetters: {
|
|
54
304
|
getCustomerInvoiceAddressId: typeof getCustomerInvoiceAddressId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartGetters.d.ts","sourceRoot":"","sources":["../../src/getters/cartGetters.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,IAAI,EACT,QAAQ,EACR,oBAAoB,EACpB,OAAO,EACP,eAAe,EACf,KAAK,QAAQ,EACd,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,iBAAS,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,EAAE,CAExC;AAED,iBAAS,2BAA2B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAE9D;AAED,iBAAS,4BAA4B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAE/D;AAED,iBAAS,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,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
|
|
1
1
|
import type { CategoryDetails, CategoryEntry, client, ItemCount } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the number of child categories for a category entry.
|
|
4
|
+
* @param categoryEntry - The category entry object.
|
|
5
|
+
* @returns The child count, or `0` if not set.
|
|
6
|
+
*/
|
|
2
7
|
declare function getChildCount(categoryEntry: CategoryEntry): number;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the child category entries of a category entry.
|
|
10
|
+
* @param categoryEntry - The category entry object.
|
|
11
|
+
* @returns An array of child {@link CategoryEntry} objects, or an empty array if none exist.
|
|
12
|
+
*/
|
|
3
13
|
declare function getChildren(categoryEntry: CategoryEntry): CategoryEntry[];
|
|
14
|
+
/**
|
|
15
|
+
* Returns the list of webstore clients associated with a category entry.
|
|
16
|
+
* @param categoryEntry - The category entry object.
|
|
17
|
+
* @returns An array of {@link client} objects, or an empty array if none exist.
|
|
18
|
+
*/
|
|
4
19
|
declare function getClients(categoryEntry: CategoryEntry): client[];
|
|
20
|
+
/**
|
|
21
|
+
* Returns the localised details of a category entry.
|
|
22
|
+
* @param categoryEntry - The category entry object.
|
|
23
|
+
* @returns An array of {@link CategoryDetails} objects, or an empty array if none exist.
|
|
24
|
+
*/
|
|
5
25
|
declare function getDetails(categoryEntry: CategoryEntry): CategoryDetails[];
|
|
26
|
+
/**
|
|
27
|
+
* Returns the numeric ID of a category entry.
|
|
28
|
+
* @param categoryEntry - The category entry object.
|
|
29
|
+
* @returns The category ID, or `0` if not set.
|
|
30
|
+
*/
|
|
6
31
|
declare function getId(categoryEntry: CategoryEntry): number;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the item count entries for a category entry.
|
|
34
|
+
* @param categoryEntry - The category entry object.
|
|
35
|
+
* @returns An array of {@link ItemCount} objects, or an empty array if not set.
|
|
36
|
+
*/
|
|
7
37
|
declare function getItemCount(categoryEntry: CategoryEntry): ItemCount[];
|
|
38
|
+
/**
|
|
39
|
+
* Returns the nesting level of a category entry in the category tree.
|
|
40
|
+
* @param categoryEntry - The category entry object.
|
|
41
|
+
* @returns The level number, or `0` if not set.
|
|
42
|
+
*/
|
|
8
43
|
declare function getLevel(categoryEntry: CategoryEntry): number;
|
|
44
|
+
/**
|
|
45
|
+
* Returns whether the category is displayed as a link list in the frontend.
|
|
46
|
+
* @param categoryEntry - The category entry object.
|
|
47
|
+
* @returns The linklist flag string (e.g. `"Y"` or `"N"`), or an empty string if not set.
|
|
48
|
+
*/
|
|
9
49
|
declare function getLinklist(categoryEntry: CategoryEntry): string;
|
|
50
|
+
/**
|
|
51
|
+
* Returns the ID of the parent category for a category entry.
|
|
52
|
+
* @param categoryEntry - The category entry object.
|
|
53
|
+
* @returns The parent category ID, or `0` if the category is a root category.
|
|
54
|
+
*/
|
|
10
55
|
declare function getParentCategoryId(categoryEntry: CategoryEntry): number;
|
|
56
|
+
/**
|
|
57
|
+
* Returns the access right of a category entry (e.g. `"all"`, `"customer"`).
|
|
58
|
+
* @param categoryEntry - The category entry object.
|
|
59
|
+
* @returns The right string, or an empty string if not set.
|
|
60
|
+
*/
|
|
11
61
|
declare function getRight(categoryEntry: CategoryEntry): string;
|
|
62
|
+
/**
|
|
63
|
+
* Returns the sitemap inclusion setting for a category entry.
|
|
64
|
+
* @param categoryEntry - The category entry object.
|
|
65
|
+
* @returns The sitemap flag string, or an empty string if not set.
|
|
66
|
+
*/
|
|
12
67
|
declare function getSitemap(categoryEntry: CategoryEntry): string;
|
|
68
|
+
/**
|
|
69
|
+
* Returns the type of a category entry (e.g. `"item"`, `"container"`, `"content"`).
|
|
70
|
+
* @param categoryEntry - The category entry object.
|
|
71
|
+
* @returns The category type string, or an empty string if not set.
|
|
72
|
+
*/
|
|
13
73
|
declare function getType(categoryEntry: CategoryEntry): string;
|
|
74
|
+
/**
|
|
75
|
+
* Returns the robots meta tag setting for a category entry.
|
|
76
|
+
* @param categoryEntry - The category entry object.
|
|
77
|
+
* @returns The robots string (e.g. `"ALL"`, `"NOINDEX"`), or an empty string if not set.
|
|
78
|
+
*/
|
|
14
79
|
declare function getRobots(categoryEntry: CategoryEntry): string;
|
|
80
|
+
/**
|
|
81
|
+
* Returns whether the category entry is linked to the active webstore.
|
|
82
|
+
* @param categoryEntry - The category entry object.
|
|
83
|
+
* @returns `true` if linked to the webstore, otherwise `false`.
|
|
84
|
+
*/
|
|
15
85
|
declare function isLinkedToWebstore(categoryEntry: CategoryEntry): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Returns whether the category entry has child categories.
|
|
88
|
+
* @param categoryEntry - The category entry object.
|
|
89
|
+
* @returns `true` if the category has children, otherwise `false`.
|
|
90
|
+
*/
|
|
16
91
|
declare function hasChildren(categoryEntry: CategoryEntry): boolean;
|
|
17
92
|
export declare const categoryEntryGetters: {
|
|
18
93
|
getChildCount: typeof getChildCount;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categoryEntryGetters.d.ts","sourceRoot":"","sources":["../../src/getters/categoryEntryGetters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,MAAM,EACN,SAAS,EACV,MAAM,UAAU,CAAC;AAElB,iBAAS,aAAa,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,CAE3D;AAED,iBAAS,WAAW,CAAC,aAAa,EAAE,aAAa,GAAG,aAAa,EAAE,CAElE;AAED,iBAAS,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,EAAE,CAE1D;AAED,iBAAS,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,eAAe,EAAE,CAEnE;AAED,iBAAS,KAAK,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,CAEnD;AAED,iBAAS,YAAY,CAAC,aAAa,EAAE,aAAa,GAAG,SAAS,EAAE,CAE/D;AAED,iBAAS,QAAQ,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,CAEtD;AAED,iBAAS,WAAW,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,CAEzD;AAED,iBAAS,mBAAmB,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