@phystack/products 4.3.40-dev
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/CHANGELOG.md +2736 -0
- package/dist/api.d.ts +11 -0
- package/dist/api.js +49 -0
- package/dist/helpers.d.ts +2 -0
- package/dist/helpers.js +11 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +29 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +1423 -0
- package/dist/services/grid-product-service-admin.d.ts +23 -0
- package/dist/services/grid-product-service-admin.js +120 -0
- package/dist/services/grid-product-service-client.d.ts +80 -0
- package/dist/services/grid-product-service-client.js +633 -0
- package/dist/services/grid-product-service-interface.d.ts +47 -0
- package/dist/services/grid-product-service-interface.js +2 -0
- package/dist/services/http-service.d.ts +14 -0
- package/dist/services/http-service.js +44 -0
- package/dist/types/grid-product.d.ts +458 -0
- package/dist/types/grid-product.js +38 -0
- package/dist/types/iso-currency-codes.d.ts +182 -0
- package/dist/types/iso-currency-codes.js +186 -0
- package/dist/types/iso-language-ids.d.ts +170 -0
- package/dist/types/iso-language-ids.js +174 -0
- package/dist/types/parameters.d.ts +242 -0
- package/dist/types/parameters.js +99 -0
- package/dist/utils.d.ts +27 -0
- package/dist/utils.js +187 -0
- package/jest.config.js +10 -0
- package/jest.setup.js +1 -0
- package/package.json +31 -0
- package/src/api.ts +47 -0
- package/src/helpers.ts +7 -0
- package/src/index.test.ts +1526 -0
- package/src/index.ts +8 -0
- package/src/services/grid-product-service-admin.ts +123 -0
- package/src/services/grid-product-service-client.ts +995 -0
- package/src/services/grid-product-service-interface.ts +105 -0
- package/src/services/http-service.ts +50 -0
- package/src/types/grid-product.ts +548 -0
- package/src/types/iso-currency-codes.ts +182 -0
- package/src/types/iso-language-ids.ts +170 -0
- package/src/types/parameters.ts +231 -0
- package/src/utils.ts +325 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IsoLanguageIds = void 0;
|
|
4
|
+
var IsoLanguageIds;
|
|
5
|
+
(function (IsoLanguageIds) {
|
|
6
|
+
IsoLanguageIds["af_ZA"] = "af-ZA";
|
|
7
|
+
IsoLanguageIds["am_ET"] = "am-ET";
|
|
8
|
+
IsoLanguageIds["ar_AE"] = "ar-AE";
|
|
9
|
+
IsoLanguageIds["ar_BH"] = "ar-BH";
|
|
10
|
+
IsoLanguageIds["ar_DZ"] = "ar-DZ";
|
|
11
|
+
IsoLanguageIds["ar_EG"] = "ar-EG";
|
|
12
|
+
IsoLanguageIds["ar_IQ"] = "ar-IQ";
|
|
13
|
+
IsoLanguageIds["ar_JO"] = "ar-JO";
|
|
14
|
+
IsoLanguageIds["ar_KW"] = "ar-KW";
|
|
15
|
+
IsoLanguageIds["ar_LB"] = "ar-LB";
|
|
16
|
+
IsoLanguageIds["ar_LY"] = "ar-LY";
|
|
17
|
+
IsoLanguageIds["ar_MA"] = "ar-MA";
|
|
18
|
+
IsoLanguageIds["ar_OM"] = "ar-OM";
|
|
19
|
+
IsoLanguageIds["ar_QA"] = "ar-QA";
|
|
20
|
+
IsoLanguageIds["ar_SA"] = "ar-SA";
|
|
21
|
+
IsoLanguageIds["ar_SY"] = "ar-SY";
|
|
22
|
+
IsoLanguageIds["ar_TN"] = "ar-TN";
|
|
23
|
+
IsoLanguageIds["ar_YE"] = "ar-YE";
|
|
24
|
+
IsoLanguageIds["as_IN"] = "as-IN";
|
|
25
|
+
IsoLanguageIds["ba_RU"] = "ba-RU";
|
|
26
|
+
IsoLanguageIds["be_BY"] = "be-BY";
|
|
27
|
+
IsoLanguageIds["bg_BG"] = "bg-BG";
|
|
28
|
+
IsoLanguageIds["bn_BD"] = "bn-BD";
|
|
29
|
+
IsoLanguageIds["bn_IN"] = "bn-IN";
|
|
30
|
+
IsoLanguageIds["bo_CN"] = "bo-CN";
|
|
31
|
+
IsoLanguageIds["br_FR"] = "br-FR";
|
|
32
|
+
IsoLanguageIds["ca_ES"] = "ca-ES";
|
|
33
|
+
IsoLanguageIds["co_FR"] = "co-FR";
|
|
34
|
+
IsoLanguageIds["cs_CZ"] = "cs-CZ";
|
|
35
|
+
IsoLanguageIds["cy_GB"] = "cy-GB";
|
|
36
|
+
IsoLanguageIds["da_DK"] = "da-DK";
|
|
37
|
+
IsoLanguageIds["de_AT"] = "de-AT";
|
|
38
|
+
IsoLanguageIds["de_CH"] = "de-CH";
|
|
39
|
+
IsoLanguageIds["de_DE"] = "de-DE";
|
|
40
|
+
IsoLanguageIds["de_LI"] = "de-LI";
|
|
41
|
+
IsoLanguageIds["de_LU"] = "de-LU";
|
|
42
|
+
IsoLanguageIds["dv_MV"] = "dv-MV";
|
|
43
|
+
IsoLanguageIds["el_GR"] = "el-GR";
|
|
44
|
+
IsoLanguageIds["en_AU"] = "en-AU";
|
|
45
|
+
IsoLanguageIds["en_BZ"] = "en-BZ";
|
|
46
|
+
IsoLanguageIds["en_CA"] = "en-CA";
|
|
47
|
+
IsoLanguageIds["en_GB"] = "en-GB";
|
|
48
|
+
IsoLanguageIds["en_IE"] = "en-IE";
|
|
49
|
+
IsoLanguageIds["en_IN"] = "en-IN";
|
|
50
|
+
IsoLanguageIds["en_JM"] = "en-JM";
|
|
51
|
+
IsoLanguageIds["en_MY"] = "en-MY";
|
|
52
|
+
IsoLanguageIds["en_NZ"] = "en-NZ";
|
|
53
|
+
IsoLanguageIds["en_PH"] = "en-PH";
|
|
54
|
+
IsoLanguageIds["en_SG"] = "en-SG";
|
|
55
|
+
IsoLanguageIds["en_TT"] = "en-TT";
|
|
56
|
+
IsoLanguageIds["en_US"] = "en-US";
|
|
57
|
+
IsoLanguageIds["en_ZA"] = "en-ZA";
|
|
58
|
+
IsoLanguageIds["en_ZW"] = "en-ZW";
|
|
59
|
+
IsoLanguageIds["es_AR"] = "es-AR";
|
|
60
|
+
IsoLanguageIds["es_BO"] = "es-BO";
|
|
61
|
+
IsoLanguageIds["es_CL"] = "es-CL";
|
|
62
|
+
IsoLanguageIds["es_CO"] = "es-CO";
|
|
63
|
+
IsoLanguageIds["es_CR"] = "es-CR";
|
|
64
|
+
IsoLanguageIds["es_DO"] = "es-DO";
|
|
65
|
+
IsoLanguageIds["es_EC"] = "es-EC";
|
|
66
|
+
IsoLanguageIds["es_ES"] = "es-ES";
|
|
67
|
+
IsoLanguageIds["es_GT"] = "es-GT";
|
|
68
|
+
IsoLanguageIds["es_HN"] = "es-HN";
|
|
69
|
+
IsoLanguageIds["es_MX"] = "es-MX";
|
|
70
|
+
IsoLanguageIds["es_NI"] = "es-NI";
|
|
71
|
+
IsoLanguageIds["es_PA"] = "es-PA";
|
|
72
|
+
IsoLanguageIds["es_PE"] = "es-PE";
|
|
73
|
+
IsoLanguageIds["es_PR"] = "es-PR";
|
|
74
|
+
IsoLanguageIds["es_PY"] = "es-PY";
|
|
75
|
+
IsoLanguageIds["es_SV"] = "es-SV";
|
|
76
|
+
IsoLanguageIds["es_US"] = "es-US";
|
|
77
|
+
IsoLanguageIds["es_UY"] = "es-UY";
|
|
78
|
+
IsoLanguageIds["es_VE"] = "es-VE";
|
|
79
|
+
IsoLanguageIds["et_EE"] = "et-EE";
|
|
80
|
+
IsoLanguageIds["eu_ES"] = "eu-ES";
|
|
81
|
+
IsoLanguageIds["fa_IR"] = "fa-IR";
|
|
82
|
+
IsoLanguageIds["fi_FI"] = "fi-FI";
|
|
83
|
+
IsoLanguageIds["fo_FO"] = "fo-FO";
|
|
84
|
+
IsoLanguageIds["fr_BE"] = "fr-BE";
|
|
85
|
+
IsoLanguageIds["fr_CA"] = "fr-CA";
|
|
86
|
+
IsoLanguageIds["fr_CH"] = "fr-CH";
|
|
87
|
+
IsoLanguageIds["fr_FR"] = "fr-FR";
|
|
88
|
+
IsoLanguageIds["fr_LU"] = "fr-LU";
|
|
89
|
+
IsoLanguageIds["fr_MC"] = "fr-MC";
|
|
90
|
+
IsoLanguageIds["fy_NL"] = "fy-NL";
|
|
91
|
+
IsoLanguageIds["ga_IE"] = "ga-IE";
|
|
92
|
+
IsoLanguageIds["gd_GB"] = "gd-GB";
|
|
93
|
+
IsoLanguageIds["gl_ES"] = "gl-ES";
|
|
94
|
+
IsoLanguageIds["gu_IN"] = "gu-IN";
|
|
95
|
+
IsoLanguageIds["he_IL"] = "he-IL";
|
|
96
|
+
IsoLanguageIds["hi_IN"] = "hi-IN";
|
|
97
|
+
IsoLanguageIds["hr_BA"] = "hr-BA";
|
|
98
|
+
IsoLanguageIds["hr_HR"] = "hr-HR";
|
|
99
|
+
IsoLanguageIds["hu_HU"] = "hu-HU";
|
|
100
|
+
IsoLanguageIds["hy_AM"] = "hy-AM";
|
|
101
|
+
IsoLanguageIds["id_ID"] = "id-ID";
|
|
102
|
+
IsoLanguageIds["ig_NG"] = "ig-NG";
|
|
103
|
+
IsoLanguageIds["ii_CN"] = "ii-CN";
|
|
104
|
+
IsoLanguageIds["is_IS"] = "is-IS";
|
|
105
|
+
IsoLanguageIds["it_CH"] = "it-CH";
|
|
106
|
+
IsoLanguageIds["it_IT"] = "it-IT";
|
|
107
|
+
IsoLanguageIds["ja_JP"] = "ja-JP";
|
|
108
|
+
IsoLanguageIds["ka_GE"] = "ka-GE";
|
|
109
|
+
IsoLanguageIds["kk_KZ"] = "kk-KZ";
|
|
110
|
+
IsoLanguageIds["kl_GL"] = "kl-GL";
|
|
111
|
+
IsoLanguageIds["km_KH"] = "km-KH";
|
|
112
|
+
IsoLanguageIds["kn_IN"] = "kn-IN";
|
|
113
|
+
IsoLanguageIds["ko_KR"] = "ko-KR";
|
|
114
|
+
IsoLanguageIds["ky_KG"] = "ky-KG";
|
|
115
|
+
IsoLanguageIds["lb_LU"] = "lb-LU";
|
|
116
|
+
IsoLanguageIds["lo_LA"] = "lo-LA";
|
|
117
|
+
IsoLanguageIds["lt_LT"] = "lt-LT";
|
|
118
|
+
IsoLanguageIds["lv_LV"] = "lv-LV";
|
|
119
|
+
IsoLanguageIds["mi_NZ"] = "mi-NZ";
|
|
120
|
+
IsoLanguageIds["mk_MK"] = "mk-MK";
|
|
121
|
+
IsoLanguageIds["ml_IN"] = "ml-IN";
|
|
122
|
+
IsoLanguageIds["mn_MN"] = "mn-MN";
|
|
123
|
+
IsoLanguageIds["mr_IN"] = "mr-IN";
|
|
124
|
+
IsoLanguageIds["ms_BN"] = "ms-BN";
|
|
125
|
+
IsoLanguageIds["ms_MY"] = "ms-MY";
|
|
126
|
+
IsoLanguageIds["mt_MT"] = "mt-MT";
|
|
127
|
+
IsoLanguageIds["nb_NO"] = "nb-NO";
|
|
128
|
+
IsoLanguageIds["ne_NP"] = "ne-NP";
|
|
129
|
+
IsoLanguageIds["nl_BE"] = "nl-BE";
|
|
130
|
+
IsoLanguageIds["nl_NL"] = "nl-NL";
|
|
131
|
+
IsoLanguageIds["nn_NO"] = "nn-NO";
|
|
132
|
+
IsoLanguageIds["oc_FR"] = "oc-FR";
|
|
133
|
+
IsoLanguageIds["or_IN"] = "or-IN";
|
|
134
|
+
IsoLanguageIds["pa_IN"] = "pa-IN";
|
|
135
|
+
IsoLanguageIds["pl_PL"] = "pl-PL";
|
|
136
|
+
IsoLanguageIds["ps_AF"] = "ps-AF";
|
|
137
|
+
IsoLanguageIds["pt_BR"] = "pt-BR";
|
|
138
|
+
IsoLanguageIds["pt_PT"] = "pt-PT";
|
|
139
|
+
IsoLanguageIds["rm_CH"] = "rm-CH";
|
|
140
|
+
IsoLanguageIds["ro_RO"] = "ro-RO";
|
|
141
|
+
IsoLanguageIds["ru_RU"] = "ru-RU";
|
|
142
|
+
IsoLanguageIds["rw_RW"] = "rw-RW";
|
|
143
|
+
IsoLanguageIds["sa_IN"] = "sa-IN";
|
|
144
|
+
IsoLanguageIds["se_FI"] = "se-FI";
|
|
145
|
+
IsoLanguageIds["se_NO"] = "se-NO";
|
|
146
|
+
IsoLanguageIds["se_SE"] = "se-SE";
|
|
147
|
+
IsoLanguageIds["si_LK"] = "si-LK";
|
|
148
|
+
IsoLanguageIds["sk_SK"] = "sk-SK";
|
|
149
|
+
IsoLanguageIds["sl_SI"] = "sl-SI";
|
|
150
|
+
IsoLanguageIds["sq_AL"] = "sq-AL";
|
|
151
|
+
IsoLanguageIds["sv_FI"] = "sv-FI";
|
|
152
|
+
IsoLanguageIds["sv_SE"] = "sv-SE";
|
|
153
|
+
IsoLanguageIds["sw_KE"] = "sw-KE";
|
|
154
|
+
IsoLanguageIds["ta_IN"] = "ta-IN";
|
|
155
|
+
IsoLanguageIds["te_IN"] = "te-IN";
|
|
156
|
+
IsoLanguageIds["th_TH"] = "th-TH";
|
|
157
|
+
IsoLanguageIds["tk_TM"] = "tk-TM";
|
|
158
|
+
IsoLanguageIds["tn_ZA"] = "tn-ZA";
|
|
159
|
+
IsoLanguageIds["tr_TR"] = "tr-TR";
|
|
160
|
+
IsoLanguageIds["tt_RU"] = "tt-RU";
|
|
161
|
+
IsoLanguageIds["ug_CN"] = "ug-CN";
|
|
162
|
+
IsoLanguageIds["uk_UA"] = "uk-UA";
|
|
163
|
+
IsoLanguageIds["ur_PK"] = "ur-PK";
|
|
164
|
+
IsoLanguageIds["vi_VN"] = "vi-VN";
|
|
165
|
+
IsoLanguageIds["wo_SN"] = "wo-SN";
|
|
166
|
+
IsoLanguageIds["xh_ZA"] = "xh-ZA";
|
|
167
|
+
IsoLanguageIds["yo_NG"] = "yo-NG";
|
|
168
|
+
IsoLanguageIds["zh_CN"] = "zh-CN";
|
|
169
|
+
IsoLanguageIds["zh_HK"] = "zh-HK";
|
|
170
|
+
IsoLanguageIds["zh_MO"] = "zh-MO";
|
|
171
|
+
IsoLanguageIds["zh_SG"] = "zh-SG";
|
|
172
|
+
IsoLanguageIds["zh_TW"] = "zh-TW";
|
|
173
|
+
IsoLanguageIds["zu_ZA"] = "zu-ZA";
|
|
174
|
+
})(IsoLanguageIds || (exports.IsoLanguageIds = IsoLanguageIds = {}));
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { ProductFeatureModel } from './grid-product';
|
|
2
|
+
import { IsoLanguageIds } from './iso-language-ids';
|
|
3
|
+
export type ProductQueryParameters = {
|
|
4
|
+
select?: string;
|
|
5
|
+
filter?: string;
|
|
6
|
+
additionalRawFilter?: string;
|
|
7
|
+
sort?: string;
|
|
8
|
+
limit?: number;
|
|
9
|
+
page?: number;
|
|
10
|
+
includeAttributeFilters?: boolean;
|
|
11
|
+
attributeFilters?: string;
|
|
12
|
+
productTypesCoverage?: string;
|
|
13
|
+
isSourceSearch?: string;
|
|
14
|
+
excludeUnavailable?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export interface SearchQueryParameters {
|
|
17
|
+
term: string;
|
|
18
|
+
select?: string;
|
|
19
|
+
filter?: string;
|
|
20
|
+
additionalRawFilter?: string;
|
|
21
|
+
productTypesCoverage?: string;
|
|
22
|
+
excludeUnavailable?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface ProductDetailsQueryParameters {
|
|
25
|
+
select?: string;
|
|
26
|
+
filter?: string;
|
|
27
|
+
includeProductsByVariantsByGroupId?: string;
|
|
28
|
+
productTypesCoverage?: string;
|
|
29
|
+
excludeUnavailable?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface ProductDetailsByCodeQueryParameters {
|
|
32
|
+
select?: string;
|
|
33
|
+
filter?: string;
|
|
34
|
+
includeProductsByVariantsByGroupId?: 'true' | 'false';
|
|
35
|
+
productTypesCoverage?: string;
|
|
36
|
+
excludeUnavailable?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface ProductFiltersQueryParameters {
|
|
39
|
+
productTypes?: string[];
|
|
40
|
+
filterKeys?: string[];
|
|
41
|
+
spaceId?: string;
|
|
42
|
+
productTypesCoverage?: string;
|
|
43
|
+
featureFilter?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare enum FilterNumericKeys {
|
|
46
|
+
shellLifeDays = "shellLifeDays",
|
|
47
|
+
productPriceList_suggestedRetailPrice = "productPriceList/suggestedRetailPrice",
|
|
48
|
+
productPriceList_listPrice = "productPriceList/listPrice",
|
|
49
|
+
productItemQuantity_productItemQuantity = "productItemQuantity/productItemQuantity"
|
|
50
|
+
}
|
|
51
|
+
export declare enum SameValueFilterKeys {
|
|
52
|
+
productName = "productName",
|
|
53
|
+
productShortDescription = "productShortDescription",
|
|
54
|
+
productInternalName = "productInternalName",
|
|
55
|
+
productStatus = "productStatus",
|
|
56
|
+
productLabel = "productLabel",
|
|
57
|
+
productTags = "productTags",
|
|
58
|
+
productItemQuantity = "productItemQuantity",
|
|
59
|
+
productVendor = "productVendor"
|
|
60
|
+
}
|
|
61
|
+
export declare enum ObjectFilterKeys {
|
|
62
|
+
variants_productId = "variants/productId",
|
|
63
|
+
variants_productGroupId = "variants/productGroupId",
|
|
64
|
+
variants_periodStartDate = "variants/periodStartDate",
|
|
65
|
+
variants_periodEndDate = "variants/periodEndDate",
|
|
66
|
+
variants_color = "variants/color",
|
|
67
|
+
variants_colorImageUrl = "variants/colorImageUrl",
|
|
68
|
+
variants_size = "variants/size",
|
|
69
|
+
variants_style = "variants/style",
|
|
70
|
+
brand_brandName = "brand/BrandName",
|
|
71
|
+
productStatus_isoLanguageId = "productStatus/isoLanguageId",
|
|
72
|
+
productStatus_periodStartDate = "productStatus/periodStartDate",
|
|
73
|
+
productStatus_periodEndDate = "productStatus/periodEndDate",
|
|
74
|
+
productFeature_productFeatureType = "productFeature/productFeatureType",
|
|
75
|
+
productFeature_productFeatureValue = "productFeature/productFeatureValue",
|
|
76
|
+
productLabel_isoLanguageId = "productLabel/isoLanguageId",
|
|
77
|
+
productTags_isoLanguageId = "productTags/isoLanguageId",
|
|
78
|
+
productItemQuantity_productId = "productItemQuantity/productId",
|
|
79
|
+
productItemQuantity_productItemQuantityStartDate = "productItemQuantity/productItemQuantityStartDate",
|
|
80
|
+
productItemQuantity_productItemQuantityEndDate = "productItemQuantity/productItemQuantityEndDate",
|
|
81
|
+
productItemQuantity_spaceId = "productItemQuantity/spaceId",
|
|
82
|
+
productPriceList_suggestedRetailPrice = "productPriceList/suggestedRetailPrice",
|
|
83
|
+
productPriceList_listPrice = "productPriceList/listPrice",
|
|
84
|
+
productPriceList_spaceId = "productPriceList/spaceId",
|
|
85
|
+
relatedProductGroups_relatedProductGroupId = "relatedProductGroups/relatedProductGroupId",
|
|
86
|
+
relatedProductGroups_productRelationshipType = "relatedProductGroups/productRelationshipType"
|
|
87
|
+
}
|
|
88
|
+
export declare enum SingleFilterKeys {
|
|
89
|
+
productGroupId = "productGroupId",
|
|
90
|
+
tenantId = "tenantId",
|
|
91
|
+
introductionDate = "introductionDate",
|
|
92
|
+
plannedAbandonmentDate = "plannedAbandonmentDate",
|
|
93
|
+
shellLifeDays = "shellLifeDays",
|
|
94
|
+
isDeleted = "isDeleted",
|
|
95
|
+
variantsGroupId = "variantsGroupId"
|
|
96
|
+
}
|
|
97
|
+
export declare enum SingleArrayFilterKeys {
|
|
98
|
+
spaceIds = "spaceIds",
|
|
99
|
+
productType = "productType"
|
|
100
|
+
}
|
|
101
|
+
export declare enum ObjectArrayFilterKeys {
|
|
102
|
+
variants_globalTradeItemNumber = "variants/globalTradeItemNumber",
|
|
103
|
+
variants_gtinName = "variants/gtinName",
|
|
104
|
+
variants_europeanArticleNumber = "variants/europeanArticleNumber",
|
|
105
|
+
variants_universalProductCode = "variants/universalProductCode"
|
|
106
|
+
}
|
|
107
|
+
export declare const FilterableKeys: {
|
|
108
|
+
variants_globalTradeItemNumber: ObjectArrayFilterKeys.variants_globalTradeItemNumber;
|
|
109
|
+
variants_gtinName: ObjectArrayFilterKeys.variants_gtinName;
|
|
110
|
+
variants_europeanArticleNumber: ObjectArrayFilterKeys.variants_europeanArticleNumber;
|
|
111
|
+
variants_universalProductCode: ObjectArrayFilterKeys.variants_universalProductCode;
|
|
112
|
+
shellLifeDays: FilterNumericKeys.shellLifeDays;
|
|
113
|
+
productPriceList_suggestedRetailPrice: FilterNumericKeys.productPriceList_suggestedRetailPrice;
|
|
114
|
+
productPriceList_listPrice: FilterNumericKeys.productPriceList_listPrice;
|
|
115
|
+
productItemQuantity_productItemQuantity: FilterNumericKeys.productItemQuantity_productItemQuantity;
|
|
116
|
+
productName: SameValueFilterKeys.productName;
|
|
117
|
+
productShortDescription: SameValueFilterKeys.productShortDescription;
|
|
118
|
+
productInternalName: SameValueFilterKeys.productInternalName;
|
|
119
|
+
productStatus: SameValueFilterKeys.productStatus;
|
|
120
|
+
productLabel: SameValueFilterKeys.productLabel;
|
|
121
|
+
productTags: SameValueFilterKeys.productTags;
|
|
122
|
+
productItemQuantity: SameValueFilterKeys.productItemQuantity;
|
|
123
|
+
productVendor: SameValueFilterKeys.productVendor;
|
|
124
|
+
variants_productId: ObjectFilterKeys.variants_productId;
|
|
125
|
+
variants_productGroupId: ObjectFilterKeys.variants_productGroupId;
|
|
126
|
+
variants_periodStartDate: ObjectFilterKeys.variants_periodStartDate;
|
|
127
|
+
variants_periodEndDate: ObjectFilterKeys.variants_periodEndDate;
|
|
128
|
+
variants_color: ObjectFilterKeys.variants_color;
|
|
129
|
+
variants_colorImageUrl: ObjectFilterKeys.variants_colorImageUrl;
|
|
130
|
+
variants_size: ObjectFilterKeys.variants_size;
|
|
131
|
+
variants_style: ObjectFilterKeys.variants_style;
|
|
132
|
+
brand_brandName: ObjectFilterKeys.brand_brandName;
|
|
133
|
+
productStatus_isoLanguageId: ObjectFilterKeys.productStatus_isoLanguageId;
|
|
134
|
+
productStatus_periodStartDate: ObjectFilterKeys.productStatus_periodStartDate;
|
|
135
|
+
productStatus_periodEndDate: ObjectFilterKeys.productStatus_periodEndDate;
|
|
136
|
+
productFeature_productFeatureType: ObjectFilterKeys.productFeature_productFeatureType;
|
|
137
|
+
productFeature_productFeatureValue: ObjectFilterKeys.productFeature_productFeatureValue;
|
|
138
|
+
productLabel_isoLanguageId: ObjectFilterKeys.productLabel_isoLanguageId;
|
|
139
|
+
productTags_isoLanguageId: ObjectFilterKeys.productTags_isoLanguageId;
|
|
140
|
+
productItemQuantity_productId: ObjectFilterKeys.productItemQuantity_productId;
|
|
141
|
+
productItemQuantity_productItemQuantityStartDate: ObjectFilterKeys.productItemQuantity_productItemQuantityStartDate;
|
|
142
|
+
productItemQuantity_productItemQuantityEndDate: ObjectFilterKeys.productItemQuantity_productItemQuantityEndDate;
|
|
143
|
+
productItemQuantity_spaceId: ObjectFilterKeys.productItemQuantity_spaceId;
|
|
144
|
+
productPriceList_spaceId: ObjectFilterKeys.productPriceList_spaceId;
|
|
145
|
+
relatedProductGroups_relatedProductGroupId: ObjectFilterKeys.relatedProductGroups_relatedProductGroupId;
|
|
146
|
+
relatedProductGroups_productRelationshipType: ObjectFilterKeys.relatedProductGroups_productRelationshipType;
|
|
147
|
+
spaceIds: SingleArrayFilterKeys.spaceIds;
|
|
148
|
+
productType: SingleArrayFilterKeys.productType;
|
|
149
|
+
productGroupId: SingleFilterKeys.productGroupId;
|
|
150
|
+
tenantId: SingleFilterKeys.tenantId;
|
|
151
|
+
introductionDate: SingleFilterKeys.introductionDate;
|
|
152
|
+
plannedAbandonmentDate: SingleFilterKeys.plannedAbandonmentDate;
|
|
153
|
+
isDeleted: SingleFilterKeys.isDeleted;
|
|
154
|
+
variantsGroupId: SingleFilterKeys.variantsGroupId;
|
|
155
|
+
};
|
|
156
|
+
export declare enum SortableKeys {
|
|
157
|
+
productGroupId = "productGroupId",
|
|
158
|
+
introductionDate = "introductionDate",
|
|
159
|
+
plannedAbandonmentDate = "plannedAbandonmentDate",
|
|
160
|
+
shellLifeDays = "shellLifeDays"
|
|
161
|
+
}
|
|
162
|
+
export type ProductFeatureParameters = Omit<ProductFeatureModel, 'id' | 'partitionKey'>;
|
|
163
|
+
export declare enum RequestTypeEnum {
|
|
164
|
+
GET = "GET",
|
|
165
|
+
POST = "POST"
|
|
166
|
+
}
|
|
167
|
+
export declare enum ProductRecommendationSourceEnum {
|
|
168
|
+
DEFAULT = "default",
|
|
169
|
+
STREAMOID = "streamoid",
|
|
170
|
+
UNBXD = "unbxd"
|
|
171
|
+
}
|
|
172
|
+
export declare enum ProductRecommendationInclusionEnum {
|
|
173
|
+
DEFAULT = "default",// Default from Grid Products
|
|
174
|
+
ALL = "all",// Both "Similar items" and "Complete the look"
|
|
175
|
+
SIMILAR_ITEMS = "similarItems",
|
|
176
|
+
COMPLETE_THE_LOOK = "completeTheLook",
|
|
177
|
+
SIMILAR = "similar",
|
|
178
|
+
STYLE_WITH = "styleWith"
|
|
179
|
+
}
|
|
180
|
+
export interface ProductRecommendationsBaseParameters {
|
|
181
|
+
source: ProductRecommendationSourceEnum;
|
|
182
|
+
recommendationInclusion?: ProductRecommendationInclusionEnum;
|
|
183
|
+
excludeUnavailable?: boolean;
|
|
184
|
+
}
|
|
185
|
+
export interface StreamoidRecommendationsQueryParameters extends ProductRecommendationsBaseParameters {
|
|
186
|
+
streamoidRefreshToken?: string;
|
|
187
|
+
}
|
|
188
|
+
export interface UnbxdRecommendationsQueryParameters extends ProductRecommendationsBaseParameters {
|
|
189
|
+
unbxdApiKey?: string;
|
|
190
|
+
unbxdSiteKey?: string;
|
|
191
|
+
}
|
|
192
|
+
export interface ProductRecommendationsQueryParameters extends StreamoidRecommendationsQueryParameters, UnbxdRecommendationsQueryParameters {
|
|
193
|
+
limit?: number;
|
|
194
|
+
storeId?: string;
|
|
195
|
+
spaceId?: string;
|
|
196
|
+
}
|
|
197
|
+
export interface ProductTypesListQueryParameters {
|
|
198
|
+
ids?: string[];
|
|
199
|
+
includeChildren?: boolean;
|
|
200
|
+
}
|
|
201
|
+
export interface ProductTypesListWithSpaceProductsQueryParameters {
|
|
202
|
+
spaceIds: string[];
|
|
203
|
+
}
|
|
204
|
+
export interface ProductGroupStoresInventoryParam {
|
|
205
|
+
storeId: string;
|
|
206
|
+
marketId: string;
|
|
207
|
+
storeSalesChannelId: string;
|
|
208
|
+
productGroupId: string;
|
|
209
|
+
requestedQty: number;
|
|
210
|
+
radiusMeters: number;
|
|
211
|
+
locale: IsoLanguageIds;
|
|
212
|
+
}
|
|
213
|
+
export interface ProductGroupInventory {
|
|
214
|
+
productGroupId: string;
|
|
215
|
+
productId: string;
|
|
216
|
+
quantity: number;
|
|
217
|
+
available: boolean;
|
|
218
|
+
}
|
|
219
|
+
export interface ProductGroupStoresInventoryResponse {
|
|
220
|
+
productGroupId: string;
|
|
221
|
+
store: {
|
|
222
|
+
storeId: string;
|
|
223
|
+
storeName?: string;
|
|
224
|
+
streetName1?: string;
|
|
225
|
+
streetName2?: string;
|
|
226
|
+
postCode?: string;
|
|
227
|
+
postalAddress?: string;
|
|
228
|
+
products: ProductGroupInventory[];
|
|
229
|
+
};
|
|
230
|
+
online: {
|
|
231
|
+
products: ProductGroupInventory[];
|
|
232
|
+
};
|
|
233
|
+
nearbyStores: {
|
|
234
|
+
storeId: string;
|
|
235
|
+
storeName?: string;
|
|
236
|
+
streetName1?: string;
|
|
237
|
+
streetName2?: string;
|
|
238
|
+
postCode?: string;
|
|
239
|
+
postalAddress?: string;
|
|
240
|
+
products: ProductGroupInventory[];
|
|
241
|
+
}[];
|
|
242
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductRecommendationInclusionEnum = exports.ProductRecommendationSourceEnum = exports.RequestTypeEnum = exports.SortableKeys = exports.FilterableKeys = exports.ObjectArrayFilterKeys = exports.SingleArrayFilterKeys = exports.SingleFilterKeys = exports.ObjectFilterKeys = exports.SameValueFilterKeys = exports.FilterNumericKeys = void 0;
|
|
4
|
+
var FilterNumericKeys;
|
|
5
|
+
(function (FilterNumericKeys) {
|
|
6
|
+
FilterNumericKeys["shellLifeDays"] = "shellLifeDays";
|
|
7
|
+
FilterNumericKeys["productPriceList_suggestedRetailPrice"] = "productPriceList/suggestedRetailPrice";
|
|
8
|
+
FilterNumericKeys["productPriceList_listPrice"] = "productPriceList/listPrice";
|
|
9
|
+
FilterNumericKeys["productItemQuantity_productItemQuantity"] = "productItemQuantity/productItemQuantity";
|
|
10
|
+
})(FilterNumericKeys || (exports.FilterNumericKeys = FilterNumericKeys = {}));
|
|
11
|
+
var SameValueFilterKeys;
|
|
12
|
+
(function (SameValueFilterKeys) {
|
|
13
|
+
SameValueFilterKeys["productName"] = "productName";
|
|
14
|
+
SameValueFilterKeys["productShortDescription"] = "productShortDescription";
|
|
15
|
+
SameValueFilterKeys["productInternalName"] = "productInternalName";
|
|
16
|
+
SameValueFilterKeys["productStatus"] = "productStatus";
|
|
17
|
+
SameValueFilterKeys["productLabel"] = "productLabel";
|
|
18
|
+
SameValueFilterKeys["productTags"] = "productTags";
|
|
19
|
+
SameValueFilterKeys["productItemQuantity"] = "productItemQuantity";
|
|
20
|
+
SameValueFilterKeys["productVendor"] = "productVendor";
|
|
21
|
+
})(SameValueFilterKeys || (exports.SameValueFilterKeys = SameValueFilterKeys = {}));
|
|
22
|
+
var ObjectFilterKeys;
|
|
23
|
+
(function (ObjectFilterKeys) {
|
|
24
|
+
ObjectFilterKeys["variants_productId"] = "variants/productId";
|
|
25
|
+
ObjectFilterKeys["variants_productGroupId"] = "variants/productGroupId";
|
|
26
|
+
ObjectFilterKeys["variants_periodStartDate"] = "variants/periodStartDate";
|
|
27
|
+
ObjectFilterKeys["variants_periodEndDate"] = "variants/periodEndDate";
|
|
28
|
+
ObjectFilterKeys["variants_color"] = "variants/color";
|
|
29
|
+
ObjectFilterKeys["variants_colorImageUrl"] = "variants/colorImageUrl";
|
|
30
|
+
ObjectFilterKeys["variants_size"] = "variants/size";
|
|
31
|
+
ObjectFilterKeys["variants_style"] = "variants/style";
|
|
32
|
+
ObjectFilterKeys["brand_brandName"] = "brand/BrandName";
|
|
33
|
+
ObjectFilterKeys["productStatus_isoLanguageId"] = "productStatus/isoLanguageId";
|
|
34
|
+
ObjectFilterKeys["productStatus_periodStartDate"] = "productStatus/periodStartDate";
|
|
35
|
+
ObjectFilterKeys["productStatus_periodEndDate"] = "productStatus/periodEndDate";
|
|
36
|
+
ObjectFilterKeys["productFeature_productFeatureType"] = "productFeature/productFeatureType";
|
|
37
|
+
ObjectFilterKeys["productFeature_productFeatureValue"] = "productFeature/productFeatureValue";
|
|
38
|
+
ObjectFilterKeys["productLabel_isoLanguageId"] = "productLabel/isoLanguageId";
|
|
39
|
+
ObjectFilterKeys["productTags_isoLanguageId"] = "productTags/isoLanguageId";
|
|
40
|
+
ObjectFilterKeys["productItemQuantity_productId"] = "productItemQuantity/productId";
|
|
41
|
+
ObjectFilterKeys["productItemQuantity_productItemQuantityStartDate"] = "productItemQuantity/productItemQuantityStartDate";
|
|
42
|
+
ObjectFilterKeys["productItemQuantity_productItemQuantityEndDate"] = "productItemQuantity/productItemQuantityEndDate";
|
|
43
|
+
ObjectFilterKeys["productItemQuantity_spaceId"] = "productItemQuantity/spaceId";
|
|
44
|
+
ObjectFilterKeys["productPriceList_suggestedRetailPrice"] = "productPriceList/suggestedRetailPrice";
|
|
45
|
+
ObjectFilterKeys["productPriceList_listPrice"] = "productPriceList/listPrice";
|
|
46
|
+
ObjectFilterKeys["productPriceList_spaceId"] = "productPriceList/spaceId";
|
|
47
|
+
ObjectFilterKeys["relatedProductGroups_relatedProductGroupId"] = "relatedProductGroups/relatedProductGroupId";
|
|
48
|
+
ObjectFilterKeys["relatedProductGroups_productRelationshipType"] = "relatedProductGroups/productRelationshipType";
|
|
49
|
+
})(ObjectFilterKeys || (exports.ObjectFilterKeys = ObjectFilterKeys = {}));
|
|
50
|
+
var SingleFilterKeys;
|
|
51
|
+
(function (SingleFilterKeys) {
|
|
52
|
+
SingleFilterKeys["productGroupId"] = "productGroupId";
|
|
53
|
+
SingleFilterKeys["tenantId"] = "tenantId";
|
|
54
|
+
SingleFilterKeys["introductionDate"] = "introductionDate";
|
|
55
|
+
SingleFilterKeys["plannedAbandonmentDate"] = "plannedAbandonmentDate";
|
|
56
|
+
SingleFilterKeys["shellLifeDays"] = "shellLifeDays";
|
|
57
|
+
SingleFilterKeys["isDeleted"] = "isDeleted";
|
|
58
|
+
SingleFilterKeys["variantsGroupId"] = "variantsGroupId";
|
|
59
|
+
})(SingleFilterKeys || (exports.SingleFilterKeys = SingleFilterKeys = {}));
|
|
60
|
+
var SingleArrayFilterKeys;
|
|
61
|
+
(function (SingleArrayFilterKeys) {
|
|
62
|
+
SingleArrayFilterKeys["spaceIds"] = "spaceIds";
|
|
63
|
+
SingleArrayFilterKeys["productType"] = "productType";
|
|
64
|
+
})(SingleArrayFilterKeys || (exports.SingleArrayFilterKeys = SingleArrayFilterKeys = {}));
|
|
65
|
+
var ObjectArrayFilterKeys;
|
|
66
|
+
(function (ObjectArrayFilterKeys) {
|
|
67
|
+
ObjectArrayFilterKeys["variants_globalTradeItemNumber"] = "variants/globalTradeItemNumber";
|
|
68
|
+
ObjectArrayFilterKeys["variants_gtinName"] = "variants/gtinName";
|
|
69
|
+
ObjectArrayFilterKeys["variants_europeanArticleNumber"] = "variants/europeanArticleNumber";
|
|
70
|
+
ObjectArrayFilterKeys["variants_universalProductCode"] = "variants/universalProductCode";
|
|
71
|
+
})(ObjectArrayFilterKeys || (exports.ObjectArrayFilterKeys = ObjectArrayFilterKeys = {}));
|
|
72
|
+
exports.FilterableKeys = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, SingleFilterKeys), SingleArrayFilterKeys), ObjectFilterKeys), SameValueFilterKeys), FilterNumericKeys), ObjectArrayFilterKeys);
|
|
73
|
+
var SortableKeys;
|
|
74
|
+
(function (SortableKeys) {
|
|
75
|
+
SortableKeys["productGroupId"] = "productGroupId";
|
|
76
|
+
SortableKeys["introductionDate"] = "introductionDate";
|
|
77
|
+
SortableKeys["plannedAbandonmentDate"] = "plannedAbandonmentDate";
|
|
78
|
+
SortableKeys["shellLifeDays"] = "shellLifeDays";
|
|
79
|
+
})(SortableKeys || (exports.SortableKeys = SortableKeys = {}));
|
|
80
|
+
var RequestTypeEnum;
|
|
81
|
+
(function (RequestTypeEnum) {
|
|
82
|
+
RequestTypeEnum["GET"] = "GET";
|
|
83
|
+
RequestTypeEnum["POST"] = "POST";
|
|
84
|
+
})(RequestTypeEnum || (exports.RequestTypeEnum = RequestTypeEnum = {}));
|
|
85
|
+
var ProductRecommendationSourceEnum;
|
|
86
|
+
(function (ProductRecommendationSourceEnum) {
|
|
87
|
+
ProductRecommendationSourceEnum["DEFAULT"] = "default";
|
|
88
|
+
ProductRecommendationSourceEnum["STREAMOID"] = "streamoid";
|
|
89
|
+
ProductRecommendationSourceEnum["UNBXD"] = "unbxd";
|
|
90
|
+
})(ProductRecommendationSourceEnum || (exports.ProductRecommendationSourceEnum = ProductRecommendationSourceEnum = {}));
|
|
91
|
+
var ProductRecommendationInclusionEnum;
|
|
92
|
+
(function (ProductRecommendationInclusionEnum) {
|
|
93
|
+
ProductRecommendationInclusionEnum["DEFAULT"] = "default";
|
|
94
|
+
ProductRecommendationInclusionEnum["ALL"] = "all";
|
|
95
|
+
ProductRecommendationInclusionEnum["SIMILAR_ITEMS"] = "similarItems";
|
|
96
|
+
ProductRecommendationInclusionEnum["COMPLETE_THE_LOOK"] = "completeTheLook";
|
|
97
|
+
ProductRecommendationInclusionEnum["SIMILAR"] = "similar";
|
|
98
|
+
ProductRecommendationInclusionEnum["STYLE_WITH"] = "styleWith";
|
|
99
|
+
})(ProductRecommendationInclusionEnum || (exports.ProductRecommendationInclusionEnum = ProductRecommendationInclusionEnum = {}));
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GridProduct, ProductConsumerStorageInstruction, ProductInternalName, ProductShortDescription, ProductStorageInstructions, ProductShippingInstruction, ProductName, ProductDescription, VariantProductName, Variant, ProductBrand, ProductStatus, ProductFeature, ProductPriceList, ProductLabel, ProductType, ProductTypeTitle } from './types/grid-product';
|
|
2
|
+
import { IsoLanguageIds } from './types/iso-language-ids';
|
|
3
|
+
export declare const getProductShortDescription: (product: Partial<GridProduct>, isoLanguageId?: IsoLanguageIds) => ProductShortDescription | undefined;
|
|
4
|
+
export declare const getProductInternalName: (product: Partial<GridProduct>, isoLanguageId?: IsoLanguageIds) => ProductInternalName | undefined;
|
|
5
|
+
export declare const getProductStorageInstructions: (product: Partial<GridProduct>, isoLanguageId?: IsoLanguageIds) => ProductStorageInstructions | undefined;
|
|
6
|
+
export declare const getProductConsumerStorageInstruction: (product: Partial<GridProduct>, isoLanguageId?: IsoLanguageIds) => ProductConsumerStorageInstruction | undefined;
|
|
7
|
+
export declare const getProductShippingInstruction: (product: Partial<GridProduct>, isoLanguageId?: IsoLanguageIds) => ProductShippingInstruction | undefined;
|
|
8
|
+
export declare const getProductName: (product: Partial<GridProduct>, isoLanguageId?: IsoLanguageIds) => ProductName | undefined;
|
|
9
|
+
export declare const getProductDescription: (product: Partial<GridProduct>, isoLanguageId?: IsoLanguageIds) => ProductDescription | undefined;
|
|
10
|
+
export declare const getVariantProductName: (variant: Variant, isoLanguageId?: IsoLanguageIds) => VariantProductName | undefined;
|
|
11
|
+
export declare const getProductBrand: (product: Partial<GridProduct>, isoLanguageId?: IsoLanguageIds) => ProductBrand | undefined;
|
|
12
|
+
export declare const getProductStatus: (product: Partial<GridProduct>) => ProductStatus[] | undefined;
|
|
13
|
+
export declare const getProductFeature: (product: Partial<GridProduct>, isoLanguageId?: IsoLanguageIds) => ProductFeature[] | undefined;
|
|
14
|
+
export declare const getProductPriceList: (product: Partial<GridProduct>) => ProductPriceList[] | undefined;
|
|
15
|
+
export interface PriceData {
|
|
16
|
+
label: string;
|
|
17
|
+
currency: string;
|
|
18
|
+
price: number | undefined;
|
|
19
|
+
}
|
|
20
|
+
export declare const getProductPrice: (productPriceList: ProductPriceList, isoLanguageId: IsoLanguageIds) => PriceData;
|
|
21
|
+
export declare const getProductLabel: (product: Partial<GridProduct>, isoLanguageId?: IsoLanguageIds) => ProductLabel[] | undefined;
|
|
22
|
+
export declare const getProductTypeTitle: (productType: ProductType, isoLanguageId?: IsoLanguageIds) => ProductTypeTitle | undefined;
|
|
23
|
+
export declare const getProductTypeById: (productTypes: ProductType[], productTypeId: string) => ProductType[];
|
|
24
|
+
export declare const getProductTypeChildren: (productTypes: ProductType[], productTypeId: string) => ProductType[];
|
|
25
|
+
export declare const getProductTypeChildrenAndSubchildrenIds: (productTypes: ProductType[], productTypeId: string) => string[];
|
|
26
|
+
export declare const isLeafProductType: (productTypes: ProductType[], productTypeId: string) => boolean;
|
|
27
|
+
export declare const getProductEanByEpc: (epc: string) => string;
|