commerce-sdk-isomorphic 1.11.0 → 1.13.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/CHANGELOG.md +11 -0
- package/lib/index.cjs.d.ts +1159 -522
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +1159 -522
- package/lib/index.esm.js +1 -1
- package/package.json +1 -1
package/lib/index.esm.d.ts
CHANGED
|
@@ -697,7 +697,7 @@ type ShopperBasketsParameters = ShopperBasketsPathParameters & BaseUriParameters
|
|
|
697
697
|
* ```
|
|
698
698
|
*
|
|
699
699
|
* <span style="font-size:.7em; display:block; text-align: right">
|
|
700
|
-
* API Version: 2.0.
|
|
700
|
+
* API Version: 2.0.3<br />
|
|
701
701
|
* Last Updated: <br />
|
|
702
702
|
* </span>
|
|
703
703
|
|
|
@@ -726,7 +726,7 @@ declare class ShopperBaskets<ConfigParameters extends ShopperBasketsParameters &
|
|
|
726
726
|
* @param taxMode - Determines how taxes are calculated.
|
|
727
727
|
|
|
728
728
|
The default value is `internal` where the tax calculation is done automatically based on internal tax tables. Setting `taxMode` to `external` allows manual modification of the tax rates and values. External tax data is mandatory for product line items, option line items, shipping line items, coupon line items, and bonus discount line item. Gift certificate line items are optional and use zero tax rate by default, which can be overwritten. Price adjustments cannot be set because they are either calculated or inherited. Depending on the type, the tax rate is either obtained from the related line item or computed as a prorate of the basket.
|
|
729
|
-
* @param temporary - If true,
|
|
729
|
+
* @param temporary - If set to true, the basket created is a temporary basket.
|
|
730
730
|
* @param siteId -
|
|
731
731
|
* @param locale - A descriptor to provide locale context for a geographical region by both a language and/or country code. The locale pattern in the query param follows the ISO 639-1 for the language code (e.g. en, de, fr) and ISO 3166-1 for the country code (e.g. US, DE, AT). The param can be a combination of language code and country code or can just refer to the language code.
|
|
732
732
|
Below are some valid examples:
|
|
@@ -769,7 +769,7 @@ declare class ShopperBaskets<ConfigParameters extends ShopperBasketsParameters &
|
|
|
769
769
|
* @param taxMode - Determines how taxes are calculated.
|
|
770
770
|
|
|
771
771
|
The default value is `internal` where the tax calculation is done automatically based on internal tax tables. Setting `taxMode` to `external` allows manual modification of the tax rates and values. External tax data is mandatory for product line items, option line items, shipping line items, coupon line items, and bonus discount line item. Gift certificate line items are optional and use zero tax rate by default, which can be overwritten. Price adjustments cannot be set because they are either calculated or inherited. Depending on the type, the tax rate is either obtained from the related line item or computed as a prorate of the basket.
|
|
772
|
-
* @param temporary - If true,
|
|
772
|
+
* @param temporary - If set to true, the basket created is a temporary basket.
|
|
773
773
|
* @param siteId -
|
|
774
774
|
* @param locale - A descriptor to provide locale context for a geographical region by both a language and/or country code. The locale pattern in the query param follows the ISO 639-1 for the language code (e.g. en, de, fr) and ISO 3166-1 for the country code (e.g. US, DE, AT). The param can be a combination of language code and country code or can just refer to the language code.
|
|
775
775
|
Below are some valid examples:
|
|
@@ -4397,7 +4397,7 @@ declare namespace ShopperBasketsTypes {
|
|
|
4397
4397
|
* ```
|
|
4398
4398
|
*
|
|
4399
4399
|
* <span style="font-size:.7em; display:block; text-align: right">
|
|
4400
|
-
* API Version: 2.0.
|
|
4400
|
+
* API Version: 2.0.3<br />
|
|
4401
4401
|
* Last Updated: <br />
|
|
4402
4402
|
* </span>
|
|
4403
4403
|
|
|
@@ -4426,7 +4426,7 @@ declare namespace ShopperBasketsTypes {
|
|
|
4426
4426
|
* @param taxMode - Determines how taxes are calculated.
|
|
4427
4427
|
|
|
4428
4428
|
The default value is `internal` where the tax calculation is done automatically based on internal tax tables. Setting `taxMode` to `external` allows manual modification of the tax rates and values. External tax data is mandatory for product line items, option line items, shipping line items, coupon line items, and bonus discount line item. Gift certificate line items are optional and use zero tax rate by default, which can be overwritten. Price adjustments cannot be set because they are either calculated or inherited. Depending on the type, the tax rate is either obtained from the related line item or computed as a prorate of the basket.
|
|
4429
|
-
* @param temporary - If true,
|
|
4429
|
+
* @param temporary - If set to true, the basket created is a temporary basket.
|
|
4430
4430
|
* @param siteId -
|
|
4431
4431
|
* @param locale - A descriptor to provide locale context for a geographical region by both a language and/or country code. The locale pattern in the query param follows the ISO 639-1 for the language code (e.g. en, de, fr) and ISO 3166-1 for the country code (e.g. US, DE, AT). The param can be a combination of language code and country code or can just refer to the language code.
|
|
4432
4432
|
Below are some valid examples:
|
|
@@ -4469,7 +4469,7 @@ declare namespace ShopperBasketsTypes {
|
|
|
4469
4469
|
* @param taxMode - Determines how taxes are calculated.
|
|
4470
4470
|
|
|
4471
4471
|
The default value is `internal` where the tax calculation is done automatically based on internal tax tables. Setting `taxMode` to `external` allows manual modification of the tax rates and values. External tax data is mandatory for product line items, option line items, shipping line items, coupon line items, and bonus discount line item. Gift certificate line items are optional and use zero tax rate by default, which can be overwritten. Price adjustments cannot be set because they are either calculated or inherited. Depending on the type, the tax rate is either obtained from the related line item or computed as a prorate of the basket.
|
|
4472
|
-
* @param temporary - If true,
|
|
4472
|
+
* @param temporary - If set to true, the basket created is a temporary basket.
|
|
4473
4473
|
* @param siteId -
|
|
4474
4474
|
* @param locale - A descriptor to provide locale context for a geographical region by both a language and/or country code. The locale pattern in the query param follows the ISO 639-1 for the language code (e.g. en, de, fr) and ISO 3166-1 for the country code (e.g. US, DE, AT). The param can be a combination of language code and country code or can just refer to the language code.
|
|
4475
4475
|
Below are some valid examples:
|
|
@@ -17326,6 +17326,7 @@ type TrustedAgentTokenRequest = {
|
|
|
17326
17326
|
login_id: string;
|
|
17327
17327
|
idp_origin: string;
|
|
17328
17328
|
usid?: string;
|
|
17329
|
+
dnt?: string;
|
|
17329
17330
|
} & {
|
|
17330
17331
|
[key: string]: any;
|
|
17331
17332
|
};
|
|
@@ -17366,6 +17367,7 @@ type TrustedSystemTokenRequest = {
|
|
|
17366
17367
|
client_id: string;
|
|
17367
17368
|
channel_id: string;
|
|
17368
17369
|
email_id?: string;
|
|
17370
|
+
dnt?: string;
|
|
17369
17371
|
} & {
|
|
17370
17372
|
[key: string]: any;
|
|
17371
17373
|
};
|
|
@@ -17404,6 +17406,7 @@ type TokenRequest = {
|
|
|
17404
17406
|
code_verifier?: string;
|
|
17405
17407
|
client_id?: string;
|
|
17406
17408
|
channel_id?: string;
|
|
17409
|
+
dnt?: string;
|
|
17407
17410
|
} & {
|
|
17408
17411
|
[key: string]: any;
|
|
17409
17412
|
};
|
|
@@ -17423,6 +17426,7 @@ type SessionBridgeTokenRequest = {
|
|
|
17423
17426
|
login_id: string;
|
|
17424
17427
|
dwsgst?: string;
|
|
17425
17428
|
usid?: string;
|
|
17429
|
+
dnt?: string;
|
|
17426
17430
|
} & {
|
|
17427
17431
|
[key: string]: any;
|
|
17428
17432
|
};
|
|
@@ -17580,7 +17584,7 @@ type ShopperLoginParameters = ShopperLoginPathParameters & BaseUriParameters & S
|
|
|
17580
17584
|
* ```
|
|
17581
17585
|
*
|
|
17582
17586
|
* <span style="font-size:.7em; display:block; text-align: right">
|
|
17583
|
-
* API Version: 1.39.
|
|
17587
|
+
* API Version: 1.39.22<br />
|
|
17584
17588
|
* Last Updated: <br />
|
|
17585
17589
|
* </span>
|
|
17586
17590
|
|
|
@@ -18779,6 +18783,7 @@ declare namespace ShopperLoginTypes {
|
|
|
18779
18783
|
login_id: string;
|
|
18780
18784
|
idp_origin: string;
|
|
18781
18785
|
usid?: string;
|
|
18786
|
+
dnt?: string;
|
|
18782
18787
|
} & {
|
|
18783
18788
|
[key: string]: any;
|
|
18784
18789
|
};
|
|
@@ -18837,6 +18842,7 @@ declare namespace ShopperLoginTypes {
|
|
|
18837
18842
|
client_id: string;
|
|
18838
18843
|
channel_id: string;
|
|
18839
18844
|
email_id?: string;
|
|
18845
|
+
dnt?: string;
|
|
18840
18846
|
} & {
|
|
18841
18847
|
[key: string]: any;
|
|
18842
18848
|
};
|
|
@@ -18875,6 +18881,7 @@ declare namespace ShopperLoginTypes {
|
|
|
18875
18881
|
code_verifier?: string;
|
|
18876
18882
|
client_id?: string;
|
|
18877
18883
|
channel_id?: string;
|
|
18884
|
+
dnt?: string;
|
|
18878
18885
|
} & {
|
|
18879
18886
|
[key: string]: any;
|
|
18880
18887
|
};
|
|
@@ -18894,6 +18901,7 @@ declare namespace ShopperLoginTypes {
|
|
|
18894
18901
|
login_id: string;
|
|
18895
18902
|
dwsgst?: string;
|
|
18896
18903
|
usid?: string;
|
|
18904
|
+
dnt?: string;
|
|
18897
18905
|
} & {
|
|
18898
18906
|
[key: string]: any;
|
|
18899
18907
|
};
|
|
@@ -19206,7 +19214,7 @@ declare namespace ShopperLoginTypes {
|
|
|
19206
19214
|
* ```
|
|
19207
19215
|
*
|
|
19208
19216
|
* <span style="font-size:.7em; display:block; text-align: right">
|
|
19209
|
-
* API Version: 1.39.
|
|
19217
|
+
* API Version: 1.39.22<br />
|
|
19210
19218
|
* Last Updated: <br />
|
|
19211
19219
|
* </span>
|
|
19212
19220
|
|
|
@@ -24389,6 +24397,39 @@ type PromotionResult = {
|
|
|
24389
24397
|
} & {
|
|
24390
24398
|
[key: string]: any;
|
|
24391
24399
|
};
|
|
24400
|
+
type RangeFilter$8 = {
|
|
24401
|
+
[key: string]: any;
|
|
24402
|
+
};
|
|
24403
|
+
type BoolFilter$8 = {
|
|
24404
|
+
filters?: Array<any>;
|
|
24405
|
+
operator: string;
|
|
24406
|
+
} & {
|
|
24407
|
+
[key: string]: any;
|
|
24408
|
+
};
|
|
24409
|
+
type MatchAllQuery$8 = {} & {
|
|
24410
|
+
[key: string]: any;
|
|
24411
|
+
};
|
|
24412
|
+
type FilteredQuery$8 = {
|
|
24413
|
+
filter: any;
|
|
24414
|
+
query: any;
|
|
24415
|
+
} & {
|
|
24416
|
+
[key: string]: any;
|
|
24417
|
+
};
|
|
24418
|
+
type QueryFilter$8 = {
|
|
24419
|
+
query: any;
|
|
24420
|
+
} & {
|
|
24421
|
+
[key: string]: any;
|
|
24422
|
+
};
|
|
24423
|
+
type Query$8 = {
|
|
24424
|
+
boolQuery?: BoolQuery$7;
|
|
24425
|
+
filteredQuery?: FilteredQuery$8;
|
|
24426
|
+
matchAllQuery?: MatchAllQuery$8;
|
|
24427
|
+
nestedQuery?: NestedQuery$7;
|
|
24428
|
+
termQuery?: TermQuery$7;
|
|
24429
|
+
textQuery?: TextQuery$7;
|
|
24430
|
+
} & {
|
|
24431
|
+
[key: string]: any;
|
|
24432
|
+
};
|
|
24392
24433
|
type TermQuery$8 = {
|
|
24393
24434
|
fields: Array<string>;
|
|
24394
24435
|
operator: string;
|
|
@@ -24396,12 +24437,30 @@ type TermQuery$8 = {
|
|
|
24396
24437
|
} & {
|
|
24397
24438
|
[key: string]: any;
|
|
24398
24439
|
};
|
|
24440
|
+
type TermFilter$8 = {
|
|
24441
|
+
field: string;
|
|
24442
|
+
operator: string;
|
|
24443
|
+
values?: Array<any>;
|
|
24444
|
+
} & {
|
|
24445
|
+
[key: string]: any;
|
|
24446
|
+
};
|
|
24399
24447
|
type TextQuery$8 = {
|
|
24400
24448
|
fields: Array<string>;
|
|
24401
24449
|
searchPhrase: string;
|
|
24402
24450
|
} & {
|
|
24403
24451
|
[key: string]: any;
|
|
24404
24452
|
};
|
|
24453
|
+
type Range2Filter$8 = {
|
|
24454
|
+
filterMode?: string;
|
|
24455
|
+
fromField: string;
|
|
24456
|
+
fromInclusive?: boolean;
|
|
24457
|
+
fromValue?: any;
|
|
24458
|
+
toField: string;
|
|
24459
|
+
toInclusive?: boolean;
|
|
24460
|
+
toValue?: any;
|
|
24461
|
+
} & {
|
|
24462
|
+
[key: string]: any;
|
|
24463
|
+
};
|
|
24405
24464
|
type BoolQuery$8 = {
|
|
24406
24465
|
must?: Array<any>;
|
|
24407
24466
|
mustNot?: Array<any>;
|
|
@@ -24416,6 +24475,15 @@ type NestedQuery$8 = {
|
|
|
24416
24475
|
} & {
|
|
24417
24476
|
[key: string]: any;
|
|
24418
24477
|
};
|
|
24478
|
+
type Filter$8 = {
|
|
24479
|
+
boolFilter?: BoolFilter$8;
|
|
24480
|
+
queryFilter?: QueryFilter$8;
|
|
24481
|
+
range2Filter?: Range2Filter$8;
|
|
24482
|
+
rangeFilter?: RangeFilter$8;
|
|
24483
|
+
termFilter?: TermFilter$8;
|
|
24484
|
+
} & {
|
|
24485
|
+
[key: string]: any;
|
|
24486
|
+
};
|
|
24419
24487
|
type Sort$8 = {
|
|
24420
24488
|
field: string;
|
|
24421
24489
|
sortOrder?: string;
|
|
@@ -25185,58 +25253,13 @@ declare namespace ShopperPromotionsTypes {
|
|
|
25185
25253
|
}>, rawResponse?: T): Promise<T extends true ? Response : PromotionResult>;
|
|
25186
25254
|
}
|
|
25187
25255
|
}
|
|
25188
|
-
type
|
|
25189
|
-
|
|
25190
|
-
|
|
25191
|
-
|
|
25192
|
-
} & {
|
|
25193
|
-
[key: string]: any;
|
|
25194
|
-
};
|
|
25195
|
-
type TextQuery$9 = {
|
|
25196
|
-
fields: Array<string>;
|
|
25197
|
-
searchPhrase: string;
|
|
25198
|
-
} & {
|
|
25199
|
-
[key: string]: any;
|
|
25200
|
-
};
|
|
25201
|
-
type BoolQuery$9 = {
|
|
25202
|
-
must?: Array<any>;
|
|
25203
|
-
mustNot?: Array<any>;
|
|
25204
|
-
should?: Array<any>;
|
|
25205
|
-
} & {
|
|
25206
|
-
[key: string]: any;
|
|
25207
|
-
};
|
|
25208
|
-
type NestedQuery$9 = {
|
|
25209
|
-
path: string;
|
|
25210
|
-
query: any;
|
|
25211
|
-
scoreMode?: string;
|
|
25212
|
-
} & {
|
|
25213
|
-
[key: string]: any;
|
|
25214
|
-
};
|
|
25215
|
-
type Sort$9 = {
|
|
25216
|
-
field: string;
|
|
25217
|
-
sortOrder?: string;
|
|
25218
|
-
} & {
|
|
25219
|
-
[key: string]: any;
|
|
25220
|
-
};
|
|
25221
|
-
type RangeFilter$9 = {
|
|
25222
|
-
field: string;
|
|
25223
|
-
from?: any;
|
|
25224
|
-
fromInclusive?: boolean;
|
|
25225
|
-
to?: any;
|
|
25226
|
-
toInclusive?: boolean;
|
|
25256
|
+
type ProductPriceTable$0 = {
|
|
25257
|
+
price?: number;
|
|
25258
|
+
pricebook?: string;
|
|
25259
|
+
quantity?: number;
|
|
25227
25260
|
} & {
|
|
25228
25261
|
[key: string]: any;
|
|
25229
25262
|
};
|
|
25230
|
-
type L10nString$8 = {} & {
|
|
25231
|
-
[key: string]: any;
|
|
25232
|
-
};
|
|
25233
|
-
type PropertyValueDefinition$8 = {
|
|
25234
|
-
description: L10nString$8;
|
|
25235
|
-
displayValue: L10nString$8;
|
|
25236
|
-
id: string;
|
|
25237
|
-
position?: number;
|
|
25238
|
-
value: string;
|
|
25239
|
-
};
|
|
25240
25263
|
type ProductRef = {
|
|
25241
25264
|
id: string;
|
|
25242
25265
|
} & {
|
|
@@ -25248,6 +25271,13 @@ type SuggestedTerms = {
|
|
|
25248
25271
|
} & {
|
|
25249
25272
|
[key: string]: any;
|
|
25250
25273
|
};
|
|
25274
|
+
type PriceRange$0 = {
|
|
25275
|
+
maxPrice?: number;
|
|
25276
|
+
minPrice?: number;
|
|
25277
|
+
pricebook?: string;
|
|
25278
|
+
} & {
|
|
25279
|
+
[key: string]: any;
|
|
25280
|
+
};
|
|
25251
25281
|
type CategorySuggestions = {
|
|
25252
25282
|
categories?: Array<SuggestedCategory>;
|
|
25253
25283
|
suggestedPhrases?: Array<SuggestedPhrase>;
|
|
@@ -25256,7 +25286,7 @@ type CategorySuggestions = {
|
|
|
25256
25286
|
[key: string]: any;
|
|
25257
25287
|
};
|
|
25258
25288
|
type SuggestedProduct = {
|
|
25259
|
-
currency:
|
|
25289
|
+
currency: any;
|
|
25260
25290
|
price: number;
|
|
25261
25291
|
productId: string;
|
|
25262
25292
|
productName: string;
|
|
@@ -25301,6 +25331,28 @@ type ProductType$1 = {
|
|
|
25301
25331
|
} & {
|
|
25302
25332
|
[key: string]: any;
|
|
25303
25333
|
};
|
|
25334
|
+
type Variant$1 = {
|
|
25335
|
+
orderable?: boolean;
|
|
25336
|
+
price?: number;
|
|
25337
|
+
productId: string;
|
|
25338
|
+
tieredPrices?: Array<ProductPriceTable$0>;
|
|
25339
|
+
variationValues?: {} & {
|
|
25340
|
+
[key: string]: any;
|
|
25341
|
+
};
|
|
25342
|
+
productPromotions?: Array<ProductPromotion$0>;
|
|
25343
|
+
} & {
|
|
25344
|
+
[key: string]: any;
|
|
25345
|
+
};
|
|
25346
|
+
type VariationGroup$1 = {
|
|
25347
|
+
orderable: boolean;
|
|
25348
|
+
price: number;
|
|
25349
|
+
productId: string;
|
|
25350
|
+
variationValues: {} & {
|
|
25351
|
+
[key: string]: any;
|
|
25352
|
+
};
|
|
25353
|
+
} & {
|
|
25354
|
+
[key: string]: any;
|
|
25355
|
+
};
|
|
25304
25356
|
type BrandSuggestions = {} & {
|
|
25305
25357
|
[key: string]: any;
|
|
25306
25358
|
};
|
|
@@ -25320,6 +25372,13 @@ type ProductSearchSortingOption = {
|
|
|
25320
25372
|
} & {
|
|
25321
25373
|
[key: string]: any;
|
|
25322
25374
|
};
|
|
25375
|
+
type ImageGroup$1 = {
|
|
25376
|
+
images: Array<Image$0>;
|
|
25377
|
+
variationAttributes?: Array<VariationAttribute$1>;
|
|
25378
|
+
viewType: string;
|
|
25379
|
+
} & {
|
|
25380
|
+
[key: string]: any;
|
|
25381
|
+
};
|
|
25323
25382
|
type SuggestedTerm = {
|
|
25324
25383
|
completed: boolean;
|
|
25325
25384
|
corrected: boolean;
|
|
@@ -25343,7 +25402,7 @@ type CustomSuggestions = {
|
|
|
25343
25402
|
[key: string]: any;
|
|
25344
25403
|
};
|
|
25345
25404
|
type ProductSearchHit = {
|
|
25346
|
-
currency?:
|
|
25405
|
+
currency?: any;
|
|
25347
25406
|
hitType?: string;
|
|
25348
25407
|
image?: Image$0;
|
|
25349
25408
|
orderable?: boolean;
|
|
@@ -25358,11 +25417,17 @@ type ProductSearchHit = {
|
|
|
25358
25417
|
representedProduct?: ProductRef;
|
|
25359
25418
|
representedProducts?: Array<ProductRef>;
|
|
25360
25419
|
variationAttributes?: Array<VariationAttribute$1>;
|
|
25420
|
+
imageGroups?: Array<ImageGroup$1>;
|
|
25421
|
+
priceRanges?: Array<PriceRange$0>;
|
|
25422
|
+
productPromotions?: Array<ProductPromotion$0>;
|
|
25423
|
+
tieredPrices?: Array<ProductPriceTable$0>;
|
|
25424
|
+
variants?: Array<Variant$1>;
|
|
25425
|
+
variationGroups?: Array<VariationGroup$1>;
|
|
25361
25426
|
} & {
|
|
25362
25427
|
[key: string]: any;
|
|
25363
25428
|
};
|
|
25364
25429
|
type ProductSearchResult = {
|
|
25365
|
-
limit:
|
|
25430
|
+
limit: any;
|
|
25366
25431
|
hits: Array<ProductSearchHit>;
|
|
25367
25432
|
query: string;
|
|
25368
25433
|
refinements: Array<ProductSearchRefinement>;
|
|
@@ -25395,6 +25460,13 @@ type VariationAttributeValue$1 = {
|
|
|
25395
25460
|
} & {
|
|
25396
25461
|
[key: string]: any;
|
|
25397
25462
|
};
|
|
25463
|
+
type ProductPromotion$1 = {
|
|
25464
|
+
calloutMsg: string;
|
|
25465
|
+
promotionId: string;
|
|
25466
|
+
promotionalPrice: number;
|
|
25467
|
+
} & {
|
|
25468
|
+
[key: string]: any;
|
|
25469
|
+
};
|
|
25398
25470
|
type Suggestion$0 = {
|
|
25399
25471
|
suggestedPhrases?: Array<SuggestedPhrase>;
|
|
25400
25472
|
suggestedTerms: Array<SuggestedTerms>;
|
|
@@ -25420,14 +25492,17 @@ type ShopperSearchPathParameters = {
|
|
|
25420
25492
|
* All query parameters that are used by at least one ShopperSearch method.
|
|
25421
25493
|
*/
|
|
25422
25494
|
type ShopperSearchQueryParameters = {
|
|
25423
|
-
|
|
25495
|
+
select?: any;
|
|
25496
|
+
siteId?: any;
|
|
25424
25497
|
q?: string;
|
|
25425
25498
|
refine?: Array<string>;
|
|
25426
25499
|
sort?: string;
|
|
25427
|
-
currency?:
|
|
25428
|
-
locale?:
|
|
25500
|
+
currency?: any;
|
|
25501
|
+
locale?: any;
|
|
25429
25502
|
expand?: Array<string>;
|
|
25430
|
-
|
|
25503
|
+
allImages?: boolean;
|
|
25504
|
+
perPricebook?: boolean;
|
|
25505
|
+
allVariationProperties?: boolean;
|
|
25431
25506
|
limit?: number;
|
|
25432
25507
|
};
|
|
25433
25508
|
/**
|
|
@@ -25457,7 +25532,7 @@ type ShopperSearchParameters = ShopperSearchPathParameters & BaseUriParameters &
|
|
|
25457
25532
|
* ```
|
|
25458
25533
|
*
|
|
25459
25534
|
* <span style="font-size:.7em; display:block; text-align: right">
|
|
25460
|
-
* API Version: 1.0.
|
|
25535
|
+
* API Version: 1.0.38<br />
|
|
25461
25536
|
* Last Updated: <br />
|
|
25462
25537
|
* </span>
|
|
25463
25538
|
|
|
@@ -25479,7 +25554,8 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
|
|
|
25479
25554
|
*
|
|
25480
25555
|
* @param options - An object containing the options for this method.
|
|
25481
25556
|
* @param parameters - An object containing the parameters for this method.
|
|
25482
|
-
* @param organizationId -
|
|
25557
|
+
* @param organizationId -
|
|
25558
|
+
* @param select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names, or work with wildcards.You can also sepcify Array Operations and filter expressions.The actual selector value must be enclosed within parentheses.
|
|
25483
25559
|
* @param siteId -
|
|
25484
25560
|
* @param q - The query phrase to search for. For example to search for a product "shirt", type q=shirt.
|
|
25485
25561
|
* @param refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and
|
|
@@ -25496,9 +25572,10 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
|
|
|
25496
25572
|
* @param sort - The ID of the sorting option to sort the search hits.
|
|
25497
25573
|
* @param currency - The currency mnemonic specified for price. This parameter is effective only if the returned results contain prices.
|
|
25498
25574
|
* @param locale -
|
|
25499
|
-
* @param expand - The expand parameter. A list with the allowed values (availability, images, prices, represented_products, variations).
|
|
25500
|
-
* @param
|
|
25501
|
-
* @param
|
|
25575
|
+
* @param expand - The expand parameter. A comma-separated list with the allowed values (availability, images, prices, represented_products, variations, promotions, custom_properties). The expand parameter `availability, images, prices, represented_products, variations` is used as the default value when no expand parameter is provided. The value `none` can be used to turn off all expand options. The expand values `promotions` and `custom_properties` are optional and are available from version 24.3 and 24.4, respectively.
|
|
25576
|
+
* @param allImages - When this flag is passed along with the expand parameter `images` in the request, a property named `imageGroups`, which contains an image model, is returned in the response. If the flag is set to `true`, the whole image model is returned. If it is set to `false`, the returned image model contains only matching images. If no flag is passed in the request, the response does not include the `imageGroups property`. This parameter is available from version 24.3.
|
|
25577
|
+
* @param perPricebook - When this flag is passed as `true` in the request, along with the expand parameter `prices`, then per PriceBook prices and tiered prices (if available) are returned. This parameter is available from version 24.3.
|
|
25578
|
+
* @param allVariationProperties - The flag that indicates which variation properties are to be included in the result. When the flag is passed as `true` along with the expand parameter `variations` in the request, all variation properties (`variationAttributes`, `variationGroups`, and `variants`) are returned. When it is passed as `false` along with the expand parameter `variations` in the request, only the default property (`variationAttributes`) is returned. This parameter is available from version 24.3.
|
|
25502
25579
|
* @param headers - An object literal of key value pairs of the headers to be
|
|
25503
25580
|
* sent with this request.
|
|
25504
25581
|
*
|
|
@@ -25508,15 +25585,17 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
|
|
|
25508
25585
|
productSearch(options?: RequireParametersUnlessAllAreOptional<{
|
|
25509
25586
|
parameters?: CompositeParameters<{
|
|
25510
25587
|
organizationId: string;
|
|
25511
|
-
|
|
25588
|
+
select?: any;
|
|
25589
|
+
siteId: any;
|
|
25512
25590
|
q?: string;
|
|
25513
25591
|
refine?: Array<string>;
|
|
25514
25592
|
sort?: string;
|
|
25515
|
-
currency?:
|
|
25516
|
-
locale?:
|
|
25593
|
+
currency?: any;
|
|
25594
|
+
locale?: any;
|
|
25517
25595
|
expand?: Array<string>;
|
|
25518
|
-
|
|
25519
|
-
|
|
25596
|
+
allImages?: boolean;
|
|
25597
|
+
perPricebook?: boolean;
|
|
25598
|
+
allVariationProperties?: boolean;
|
|
25520
25599
|
} & {
|
|
25521
25600
|
[key in `c_${string}`]: any;
|
|
25522
25601
|
}, ConfigParameters>;
|
|
@@ -25530,7 +25609,8 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
|
|
|
25530
25609
|
*
|
|
25531
25610
|
* @param options - An object containing the options for this method.
|
|
25532
25611
|
* @param parameters - An object containing the parameters for this method.
|
|
25533
|
-
* @param organizationId -
|
|
25612
|
+
* @param organizationId -
|
|
25613
|
+
* @param select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names, or work with wildcards.You can also sepcify Array Operations and filter expressions.The actual selector value must be enclosed within parentheses.
|
|
25534
25614
|
* @param siteId -
|
|
25535
25615
|
* @param q - The query phrase to search for. For example to search for a product "shirt", type q=shirt.
|
|
25536
25616
|
* @param refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and
|
|
@@ -25547,9 +25627,10 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
|
|
|
25547
25627
|
* @param sort - The ID of the sorting option to sort the search hits.
|
|
25548
25628
|
* @param currency - The currency mnemonic specified for price. This parameter is effective only if the returned results contain prices.
|
|
25549
25629
|
* @param locale -
|
|
25550
|
-
* @param expand - The expand parameter. A list with the allowed values (availability, images, prices, represented_products, variations).
|
|
25551
|
-
* @param
|
|
25552
|
-
* @param
|
|
25630
|
+
* @param expand - The expand parameter. A comma-separated list with the allowed values (availability, images, prices, represented_products, variations, promotions, custom_properties). The expand parameter `availability, images, prices, represented_products, variations` is used as the default value when no expand parameter is provided. The value `none` can be used to turn off all expand options. The expand values `promotions` and `custom_properties` are optional and are available from version 24.3 and 24.4, respectively.
|
|
25631
|
+
* @param allImages - When this flag is passed along with the expand parameter `images` in the request, a property named `imageGroups`, which contains an image model, is returned in the response. If the flag is set to `true`, the whole image model is returned. If it is set to `false`, the returned image model contains only matching images. If no flag is passed in the request, the response does not include the `imageGroups property`. This parameter is available from version 24.3.
|
|
25632
|
+
* @param perPricebook - When this flag is passed as `true` in the request, along with the expand parameter `prices`, then per PriceBook prices and tiered prices (if available) are returned. This parameter is available from version 24.3.
|
|
25633
|
+
* @param allVariationProperties - The flag that indicates which variation properties are to be included in the result. When the flag is passed as `true` along with the expand parameter `variations` in the request, all variation properties (`variationAttributes`, `variationGroups`, and `variants`) are returned. When it is passed as `false` along with the expand parameter `variations` in the request, only the default property (`variationAttributes`) is returned. This parameter is available from version 24.3.
|
|
25553
25634
|
* @param headers - An object literal of key value pairs of the headers to be
|
|
25554
25635
|
* sent with this request.
|
|
25555
25636
|
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
@@ -25559,15 +25640,17 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
|
|
|
25559
25640
|
productSearch<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
25560
25641
|
parameters?: CompositeParameters<{
|
|
25561
25642
|
organizationId: string;
|
|
25562
|
-
|
|
25643
|
+
select?: any;
|
|
25644
|
+
siteId: any;
|
|
25563
25645
|
q?: string;
|
|
25564
25646
|
refine?: Array<string>;
|
|
25565
25647
|
sort?: string;
|
|
25566
|
-
currency?:
|
|
25567
|
-
locale?:
|
|
25648
|
+
currency?: any;
|
|
25649
|
+
locale?: any;
|
|
25568
25650
|
expand?: Array<string>;
|
|
25569
|
-
|
|
25570
|
-
|
|
25651
|
+
allImages?: boolean;
|
|
25652
|
+
perPricebook?: boolean;
|
|
25653
|
+
allVariationProperties?: boolean;
|
|
25571
25654
|
} & {
|
|
25572
25655
|
[key in `c_${string}`]: any;
|
|
25573
25656
|
}, ConfigParameters>;
|
|
@@ -25582,7 +25665,7 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
|
|
|
25582
25665
|
*
|
|
25583
25666
|
* @param options - An object containing the options for this method.
|
|
25584
25667
|
* @param parameters - An object containing the parameters for this method.
|
|
25585
|
-
* @param organizationId -
|
|
25668
|
+
* @param organizationId -
|
|
25586
25669
|
* @param siteId -
|
|
25587
25670
|
* @param q - The search phrase (q) for which suggestions are evaluated. Search suggestions are determined when the search phrase input is at least three (default) characters long. The value is configurable in the Business Manager.
|
|
25588
25671
|
* @param limit - The maximum number of suggestions made per request. If no value is defined, by default five suggestions per suggestion type are evaluated. This affects all types of suggestions (category, product, brand, and custom suggestions).
|
|
@@ -25597,11 +25680,11 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
|
|
|
25597
25680
|
getSearchSuggestions(options?: RequireParametersUnlessAllAreOptional<{
|
|
25598
25681
|
parameters?: CompositeParameters<{
|
|
25599
25682
|
organizationId: string;
|
|
25600
|
-
siteId:
|
|
25683
|
+
siteId: any;
|
|
25601
25684
|
q: string;
|
|
25602
25685
|
limit?: number;
|
|
25603
|
-
currency?:
|
|
25604
|
-
locale?:
|
|
25686
|
+
currency?: any;
|
|
25687
|
+
locale?: any;
|
|
25605
25688
|
} & {
|
|
25606
25689
|
[key in `c_${string}`]: any;
|
|
25607
25690
|
}, ConfigParameters>;
|
|
@@ -25614,7 +25697,7 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
|
|
|
25614
25697
|
*
|
|
25615
25698
|
* @param options - An object containing the options for this method.
|
|
25616
25699
|
* @param parameters - An object containing the parameters for this method.
|
|
25617
|
-
* @param organizationId -
|
|
25700
|
+
* @param organizationId -
|
|
25618
25701
|
* @param siteId -
|
|
25619
25702
|
* @param q - The search phrase (q) for which suggestions are evaluated. Search suggestions are determined when the search phrase input is at least three (default) characters long. The value is configurable in the Business Manager.
|
|
25620
25703
|
* @param limit - The maximum number of suggestions made per request. If no value is defined, by default five suggestions per suggestion type are evaluated. This affects all types of suggestions (category, product, brand, and custom suggestions).
|
|
@@ -25629,11 +25712,11 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
|
|
|
25629
25712
|
getSearchSuggestions<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
25630
25713
|
parameters?: CompositeParameters<{
|
|
25631
25714
|
organizationId: string;
|
|
25632
|
-
siteId:
|
|
25715
|
+
siteId: any;
|
|
25633
25716
|
q: string;
|
|
25634
25717
|
limit?: number;
|
|
25635
|
-
currency?:
|
|
25636
|
-
locale?:
|
|
25718
|
+
currency?: any;
|
|
25719
|
+
locale?: any;
|
|
25637
25720
|
} & {
|
|
25638
25721
|
[key in `c_${string}`]: any;
|
|
25639
25722
|
}, ConfigParameters>;
|
|
@@ -25733,83 +25816,897 @@ declare namespace ShopperSearchTypes {
|
|
|
25733
25816
|
constructor(config: ClientConfigInit<Params>);
|
|
25734
25817
|
static readonly defaults: Pick<Required<ClientConfigInit<never>>, "transformRequest">;
|
|
25735
25818
|
}
|
|
25736
|
-
type
|
|
25737
|
-
|
|
25738
|
-
|
|
25819
|
+
type ProductPriceTable = {
|
|
25820
|
+
price?: number;
|
|
25821
|
+
pricebook?: string;
|
|
25822
|
+
quantity?: number;
|
|
25739
25823
|
} & {
|
|
25740
25824
|
[key: string]: any;
|
|
25741
25825
|
};
|
|
25742
|
-
type
|
|
25743
|
-
|
|
25744
|
-
hits?: Array<object>;
|
|
25745
|
-
offset: any;
|
|
25746
|
-
total: any;
|
|
25826
|
+
type ProductRef = {
|
|
25827
|
+
id: string;
|
|
25747
25828
|
} & {
|
|
25748
25829
|
[key: string]: any;
|
|
25749
25830
|
};
|
|
25750
|
-
type
|
|
25751
|
-
|
|
25752
|
-
|
|
25753
|
-
sorts?: Array<Sort$9>;
|
|
25754
|
-
offset?: any;
|
|
25831
|
+
type SuggestedTerms = {
|
|
25832
|
+
originalTerm: string;
|
|
25833
|
+
terms?: Array<SuggestedTerm>;
|
|
25755
25834
|
} & {
|
|
25756
25835
|
[key: string]: any;
|
|
25757
25836
|
};
|
|
25758
|
-
type
|
|
25759
|
-
|
|
25760
|
-
|
|
25761
|
-
|
|
25762
|
-
description: L10nString$8;
|
|
25763
|
-
key?: boolean;
|
|
25764
|
-
localizable?: boolean;
|
|
25765
|
-
mandatory?: boolean;
|
|
25766
|
-
max?: number;
|
|
25767
|
-
minLength?: number;
|
|
25768
|
-
min?: number;
|
|
25769
|
-
multiValueType?: boolean;
|
|
25770
|
-
regularExpression?: string;
|
|
25771
|
-
scale?: number;
|
|
25772
|
-
searchable?: boolean;
|
|
25773
|
-
siteSpecific?: boolean;
|
|
25774
|
-
system?: boolean;
|
|
25775
|
-
unit?: L10nString$8;
|
|
25776
|
-
possibleValues?: Array<PropertyValueDefinition$8>;
|
|
25777
|
-
type: string;
|
|
25778
|
-
visible?: boolean;
|
|
25837
|
+
type PriceRange = {
|
|
25838
|
+
maxPrice?: number;
|
|
25839
|
+
minPrice?: number;
|
|
25840
|
+
pricebook?: string;
|
|
25779
25841
|
} & {
|
|
25780
25842
|
[key: string]: any;
|
|
25781
25843
|
};
|
|
25782
|
-
type
|
|
25844
|
+
type CategorySuggestions = {
|
|
25845
|
+
categories?: Array<SuggestedCategory>;
|
|
25846
|
+
suggestedPhrases?: Array<SuggestedPhrase>;
|
|
25847
|
+
suggestedTerms: Array<SuggestedTerms>;
|
|
25848
|
+
} & {
|
|
25783
25849
|
[key: string]: any;
|
|
25784
25850
|
};
|
|
25785
|
-
type
|
|
25786
|
-
|
|
25787
|
-
|
|
25788
|
-
|
|
25789
|
-
|
|
25790
|
-
offset: any;
|
|
25791
|
-
total: any;
|
|
25851
|
+
type SuggestedProduct = {
|
|
25852
|
+
currency: any;
|
|
25853
|
+
price: number;
|
|
25854
|
+
productId: string;
|
|
25855
|
+
productName: string;
|
|
25792
25856
|
} & {
|
|
25793
25857
|
[key: string]: any;
|
|
25794
25858
|
};
|
|
25795
|
-
type
|
|
25859
|
+
type SuggestedPhrase = {
|
|
25860
|
+
exactMatch: boolean;
|
|
25861
|
+
phrase: string;
|
|
25862
|
+
} & {
|
|
25796
25863
|
[key: string]: any;
|
|
25797
25864
|
};
|
|
25798
|
-
type
|
|
25865
|
+
type VariationAttribute = {
|
|
25866
|
+
id: string;
|
|
25867
|
+
name?: string;
|
|
25868
|
+
values?: Array<VariationAttributeValue$1>;
|
|
25869
|
+
} & {
|
|
25799
25870
|
[key: string]: any;
|
|
25800
25871
|
};
|
|
25801
|
-
type
|
|
25802
|
-
|
|
25872
|
+
type ProductSuggestions = {
|
|
25873
|
+
products?: Array<SuggestedProduct>;
|
|
25874
|
+
suggestedPhrases?: Array<SuggestedPhrase>;
|
|
25875
|
+
suggestedTerms: Array<SuggestedTerms>;
|
|
25876
|
+
} & {
|
|
25803
25877
|
[key: string]: any;
|
|
25804
25878
|
};
|
|
25805
|
-
type
|
|
25806
|
-
|
|
25807
|
-
|
|
25879
|
+
type SuggestedCategory = {
|
|
25880
|
+
id: string;
|
|
25881
|
+
name: string;
|
|
25882
|
+
parentCategoryName: string;
|
|
25808
25883
|
} & {
|
|
25809
25884
|
[key: string]: any;
|
|
25810
25885
|
};
|
|
25811
|
-
type
|
|
25812
|
-
|
|
25886
|
+
type ProductType = {
|
|
25887
|
+
bundle?: boolean;
|
|
25888
|
+
item?: boolean;
|
|
25889
|
+
master?: boolean;
|
|
25890
|
+
option?: boolean;
|
|
25891
|
+
set?: boolean;
|
|
25892
|
+
variant?: boolean;
|
|
25893
|
+
variationGroup?: boolean;
|
|
25894
|
+
} & {
|
|
25895
|
+
[key: string]: any;
|
|
25896
|
+
};
|
|
25897
|
+
type Variant = {
|
|
25898
|
+
orderable?: boolean;
|
|
25899
|
+
price?: number;
|
|
25900
|
+
productId: string;
|
|
25901
|
+
tieredPrices?: Array<ProductPriceTable>;
|
|
25902
|
+
variationValues?: {} & {
|
|
25903
|
+
[key: string]: any;
|
|
25904
|
+
};
|
|
25905
|
+
productPromotions?: Array<ProductPromotion$1>;
|
|
25906
|
+
} & {
|
|
25907
|
+
[key: string]: any;
|
|
25908
|
+
};
|
|
25909
|
+
type VariationGroup = {
|
|
25910
|
+
orderable: boolean;
|
|
25911
|
+
price: number;
|
|
25912
|
+
productId: string;
|
|
25913
|
+
variationValues: {} & {
|
|
25914
|
+
[key: string]: any;
|
|
25915
|
+
};
|
|
25916
|
+
} & {
|
|
25917
|
+
[key: string]: any;
|
|
25918
|
+
};
|
|
25919
|
+
type BrandSuggestions = {} & {
|
|
25920
|
+
[key: string]: any;
|
|
25921
|
+
};
|
|
25922
|
+
type ProductSearchRefinementValue = {
|
|
25923
|
+
description?: string;
|
|
25924
|
+
hitCount: number;
|
|
25925
|
+
label: string;
|
|
25926
|
+
presentationId?: string;
|
|
25927
|
+
value: string;
|
|
25928
|
+
values?: Array<ProductSearchRefinementValue>;
|
|
25929
|
+
} & {
|
|
25930
|
+
[key: string]: any;
|
|
25931
|
+
};
|
|
25932
|
+
type ProductSearchSortingOption = {
|
|
25933
|
+
id: string;
|
|
25934
|
+
label: string;
|
|
25935
|
+
} & {
|
|
25936
|
+
[key: string]: any;
|
|
25937
|
+
};
|
|
25938
|
+
type ImageGroup = {
|
|
25939
|
+
images: Array<Image$1>;
|
|
25940
|
+
variationAttributes?: Array<VariationAttribute>;
|
|
25941
|
+
viewType: string;
|
|
25942
|
+
} & {
|
|
25943
|
+
[key: string]: any;
|
|
25944
|
+
};
|
|
25945
|
+
type SuggestedTerm = {
|
|
25946
|
+
completed: boolean;
|
|
25947
|
+
corrected: boolean;
|
|
25948
|
+
exactMatch: boolean;
|
|
25949
|
+
value: string;
|
|
25950
|
+
} & {
|
|
25951
|
+
[key: string]: any;
|
|
25952
|
+
};
|
|
25953
|
+
type ProductSearchRefinement = {
|
|
25954
|
+
attributeId: string;
|
|
25955
|
+
label?: string;
|
|
25956
|
+
values?: Array<ProductSearchRefinementValue>;
|
|
25957
|
+
} & {
|
|
25958
|
+
[key: string]: any;
|
|
25959
|
+
};
|
|
25960
|
+
type CustomSuggestions = {
|
|
25961
|
+
customSuggestion?: string;
|
|
25962
|
+
suggestedPhrases?: Array<SuggestedPhrase>;
|
|
25963
|
+
suggestedTerms: Array<SuggestedTerms>;
|
|
25964
|
+
} & {
|
|
25965
|
+
[key: string]: any;
|
|
25966
|
+
};
|
|
25967
|
+
type ProductSearchHit = {
|
|
25968
|
+
currency?: any;
|
|
25969
|
+
hitType?: string;
|
|
25970
|
+
image?: Image$1;
|
|
25971
|
+
orderable?: boolean;
|
|
25972
|
+
price?: number;
|
|
25973
|
+
priceMax?: number;
|
|
25974
|
+
prices?: {} & {
|
|
25975
|
+
[key: string]: any;
|
|
25976
|
+
};
|
|
25977
|
+
productId: string;
|
|
25978
|
+
productName?: string;
|
|
25979
|
+
productType?: ProductType;
|
|
25980
|
+
representedProduct?: ProductRef;
|
|
25981
|
+
representedProducts?: Array<ProductRef>;
|
|
25982
|
+
variationAttributes?: Array<VariationAttribute>;
|
|
25983
|
+
imageGroups?: Array<ImageGroup>;
|
|
25984
|
+
priceRanges?: Array<PriceRange>;
|
|
25985
|
+
productPromotions?: Array<ProductPromotion$1>;
|
|
25986
|
+
tieredPrices?: Array<ProductPriceTable>;
|
|
25987
|
+
variants?: Array<Variant>;
|
|
25988
|
+
variationGroups?: Array<VariationGroup>;
|
|
25989
|
+
} & {
|
|
25990
|
+
[key: string]: any;
|
|
25991
|
+
};
|
|
25992
|
+
type ProductSearchResult = {
|
|
25993
|
+
limit: any;
|
|
25994
|
+
hits: Array<ProductSearchHit>;
|
|
25995
|
+
query: string;
|
|
25996
|
+
refinements: Array<ProductSearchRefinement>;
|
|
25997
|
+
searchPhraseSuggestions: Suggestion$0;
|
|
25998
|
+
selectedRefinements?: {} & {
|
|
25999
|
+
[key: string]: any;
|
|
26000
|
+
};
|
|
26001
|
+
selectedSortingOption?: string;
|
|
26002
|
+
sortingOptions: Array<ProductSearchSortingOption>;
|
|
26003
|
+
offset: number;
|
|
26004
|
+
total: number;
|
|
26005
|
+
} & {
|
|
26006
|
+
[key: string]: any;
|
|
26007
|
+
};
|
|
26008
|
+
type Image = {
|
|
26009
|
+
alt?: string;
|
|
26010
|
+
disBaseLink?: string;
|
|
26011
|
+
link: string;
|
|
26012
|
+
title?: string;
|
|
26013
|
+
} & {
|
|
26014
|
+
[key: string]: any;
|
|
26015
|
+
};
|
|
26016
|
+
type VariationAttributeValue = {
|
|
26017
|
+
description?: string;
|
|
26018
|
+
image?: Image;
|
|
26019
|
+
imageSwatch?: Image;
|
|
26020
|
+
name?: string;
|
|
26021
|
+
orderable?: boolean;
|
|
26022
|
+
value: string;
|
|
26023
|
+
} & {
|
|
26024
|
+
[key: string]: any;
|
|
26025
|
+
};
|
|
26026
|
+
type ProductPromotion = {
|
|
26027
|
+
calloutMsg: string;
|
|
26028
|
+
promotionId: string;
|
|
26029
|
+
promotionalPrice: number;
|
|
26030
|
+
} & {
|
|
26031
|
+
[key: string]: any;
|
|
26032
|
+
};
|
|
26033
|
+
type Suggestion = {
|
|
26034
|
+
suggestedPhrases?: Array<SuggestedPhrase>;
|
|
26035
|
+
suggestedTerms: Array<SuggestedTerms>;
|
|
26036
|
+
} & {
|
|
26037
|
+
[key: string]: any;
|
|
26038
|
+
};
|
|
26039
|
+
type SuggestionResult = {
|
|
26040
|
+
brandSuggestions?: BrandSuggestions;
|
|
26041
|
+
categorySuggestions?: CategorySuggestions;
|
|
26042
|
+
productSuggestions?: ProductSuggestions;
|
|
26043
|
+
customSuggestion?: CustomSuggestions;
|
|
26044
|
+
searchPhrase: string;
|
|
26045
|
+
} & {
|
|
26046
|
+
[key: string]: any;
|
|
26047
|
+
};
|
|
26048
|
+
/**
|
|
26049
|
+
* All path parameters that are used by at least one ShopperSearch method.
|
|
26050
|
+
*/
|
|
26051
|
+
type ShopperSearchPathParameters = {
|
|
26052
|
+
organizationId?: string;
|
|
26053
|
+
};
|
|
26054
|
+
/**
|
|
26055
|
+
* All query parameters that are used by at least one ShopperSearch method.
|
|
26056
|
+
*/
|
|
26057
|
+
type ShopperSearchQueryParameters = {
|
|
26058
|
+
select?: any;
|
|
26059
|
+
siteId?: any;
|
|
26060
|
+
q?: string;
|
|
26061
|
+
refine?: Array<string>;
|
|
26062
|
+
sort?: string;
|
|
26063
|
+
currency?: any;
|
|
26064
|
+
locale?: any;
|
|
26065
|
+
expand?: Array<string>;
|
|
26066
|
+
allImages?: boolean;
|
|
26067
|
+
perPricebook?: boolean;
|
|
26068
|
+
allVariationProperties?: boolean;
|
|
26069
|
+
limit?: number;
|
|
26070
|
+
};
|
|
26071
|
+
/**
|
|
26072
|
+
* All parameters that are used by ShopperSearch.
|
|
26073
|
+
*/
|
|
26074
|
+
type ShopperSearchParameters = ShopperSearchPathParameters & BaseUriParameters & ShopperSearchQueryParameters;
|
|
26075
|
+
/**
|
|
26076
|
+
* [Shopper Search](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-search:Summary)
|
|
26077
|
+
* ==================================
|
|
26078
|
+
*
|
|
26079
|
+
* *product search and helpful search suggestions.*<br />
|
|
26080
|
+
*
|
|
26081
|
+
* Simple example:
|
|
26082
|
+
*
|
|
26083
|
+
* ```typescript
|
|
26084
|
+
* import { ShopperSearch } from "commerce-sdk-isomorphic";
|
|
26085
|
+
*
|
|
26086
|
+
* const clientConfig = {
|
|
26087
|
+
* parameters: {
|
|
26088
|
+
* clientId: "XXXXXX",
|
|
26089
|
+
* organizationId: "XXXX",
|
|
26090
|
+
* shortCode: "XXX",
|
|
26091
|
+
* siteId: "XX"
|
|
26092
|
+
* }
|
|
26093
|
+
* };
|
|
26094
|
+
* const shopperSearchClient = new ShopperSearch(clientConfig);
|
|
26095
|
+
* ```
|
|
26096
|
+
*
|
|
26097
|
+
* <span style="font-size:.7em; display:block; text-align: right">
|
|
26098
|
+
* API Version: 1.0.38<br />
|
|
26099
|
+
* Last Updated: <br />
|
|
26100
|
+
* </span>
|
|
26101
|
+
|
|
26102
|
+
*
|
|
26103
|
+
|
|
26104
|
+
*/
|
|
26105
|
+
class ShopperSearch<ConfigParameters extends ShopperSearchParameters & Record<string, unknown>> {
|
|
26106
|
+
// baseUri is not required on ClientConfig, but we know that we provide one in the class constructor
|
|
26107
|
+
clientConfig: ClientConfig<ConfigParameters> & {
|
|
26108
|
+
baseUri: string;
|
|
26109
|
+
};
|
|
26110
|
+
static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/";
|
|
26111
|
+
constructor(config: ClientConfigInit<ConfigParameters>);
|
|
26112
|
+
/**
|
|
26113
|
+
* Provides keyword and refinement search functionality for products. Only returns the product ID, link, and name in
|
|
26114
|
+
the product search hit. The search result contains only products that are online and assigned to site catalog.
|
|
26115
|
+
*
|
|
26116
|
+
* If you would like to get a raw Response object use the other productSearch function.
|
|
26117
|
+
*
|
|
26118
|
+
* @param options - An object containing the options for this method.
|
|
26119
|
+
* @param parameters - An object containing the parameters for this method.
|
|
26120
|
+
* @param organizationId -
|
|
26121
|
+
* @param select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names, or work with wildcards.You can also sepcify Array Operations and filter expressions.The actual selector value must be enclosed within parentheses.
|
|
26122
|
+
* @param siteId -
|
|
26123
|
+
* @param q - The query phrase to search for. For example to search for a product "shirt", type q=shirt.
|
|
26124
|
+
* @param refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and
|
|
26125
|
+
values are separated by '='. Multiple values are supported by a subset of refinement attributes and
|
|
26126
|
+
can be provided by separating them using a pipe (URL
|
|
26127
|
+
encoded = "|") i.e. refine=c_refinementColor=red|green|blue. Value ranges can be specified like this: refine=price=(100..500) . Multiple refine parameters can be provided by using the refine as the key i.e refine=price=(0..10)&refine=c_refinementColor=green. The refinements can be a collection of custom defined attributes IDs and the system defined attributes IDs but the search can only accept a total of 9 refinements at a time.
|
|
26128
|
+
The following system refinement attribute ids are supported:
|
|
26129
|
+
|
|
26130
|
+
cgid: Allows refinement per single category ID. Multiple category ids are not supported.
|
|
26131
|
+
price: Allows refinement per single price range. Multiple price ranges are not supported.
|
|
26132
|
+
pmid: Allows refinement per promotion ID.
|
|
26133
|
+
htype: Allow refinement by including only the provided hit types. Accepted types are 'product', 'master', 'set', 'bundle', 'slicing_group' (deprecated), 'variation_group'.
|
|
26134
|
+
orderable_only: Unavailable products are excluded from the search results if true is set. Multiple refinement values are not supported.
|
|
26135
|
+
* @param sort - The ID of the sorting option to sort the search hits.
|
|
26136
|
+
* @param currency - The currency mnemonic specified for price. This parameter is effective only if the returned results contain prices.
|
|
26137
|
+
* @param locale -
|
|
26138
|
+
* @param expand - The expand parameter. A comma-separated list with the allowed values (availability, images, prices, represented_products, variations, promotions, custom_properties). The expand parameter `availability, images, prices, represented_products, variations` is used as the default value when no expand parameter is provided. The value `none` can be used to turn off all expand options. The expand values `promotions` and `custom_properties` are optional and are available from version 24.3 and 24.4, respectively.
|
|
26139
|
+
* @param allImages - When this flag is passed along with the expand parameter `images` in the request, a property named `imageGroups`, which contains an image model, is returned in the response. If the flag is set to `true`, the whole image model is returned. If it is set to `false`, the returned image model contains only matching images. If no flag is passed in the request, the response does not include the `imageGroups property`. This parameter is available from version 24.3.
|
|
26140
|
+
* @param perPricebook - When this flag is passed as `true` in the request, along with the expand parameter `prices`, then per PriceBook prices and tiered prices (if available) are returned. This parameter is available from version 24.3.
|
|
26141
|
+
* @param allVariationProperties - The flag that indicates which variation properties are to be included in the result. When the flag is passed as `true` along with the expand parameter `variations` in the request, all variation properties (`variationAttributes`, `variationGroups`, and `variants`) are returned. When it is passed as `false` along with the expand parameter `variations` in the request, only the default property (`variationAttributes`) is returned. This parameter is available from version 24.3.
|
|
26142
|
+
* @param headers - An object literal of key value pairs of the headers to be
|
|
26143
|
+
* sent with this request.
|
|
26144
|
+
*
|
|
26145
|
+
* @returns A promise of type ProductSearchResult.
|
|
26146
|
+
*
|
|
26147
|
+
*/
|
|
26148
|
+
productSearch(options?: RequireParametersUnlessAllAreOptional<{
|
|
26149
|
+
parameters?: CompositeParameters<{
|
|
26150
|
+
organizationId: string;
|
|
26151
|
+
select?: any;
|
|
26152
|
+
siteId: any;
|
|
26153
|
+
q?: string;
|
|
26154
|
+
refine?: Array<string>;
|
|
26155
|
+
sort?: string;
|
|
26156
|
+
currency?: any;
|
|
26157
|
+
locale?: any;
|
|
26158
|
+
expand?: Array<string>;
|
|
26159
|
+
allImages?: boolean;
|
|
26160
|
+
perPricebook?: boolean;
|
|
26161
|
+
allVariationProperties?: boolean;
|
|
26162
|
+
} & {
|
|
26163
|
+
[key in `c_${string}`]: any;
|
|
26164
|
+
}, ConfigParameters>;
|
|
26165
|
+
headers?: {
|
|
26166
|
+
[key: string]: string;
|
|
26167
|
+
};
|
|
26168
|
+
}>): Promise<ProductSearchResult>;
|
|
26169
|
+
/**
|
|
26170
|
+
* Provides keyword and refinement search functionality for products. Only returns the product ID, link, and name in
|
|
26171
|
+
the product search hit. The search result contains only products that are online and assigned to site catalog.
|
|
26172
|
+
*
|
|
26173
|
+
* @param options - An object containing the options for this method.
|
|
26174
|
+
* @param parameters - An object containing the parameters for this method.
|
|
26175
|
+
* @param organizationId -
|
|
26176
|
+
* @param select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names, or work with wildcards.You can also sepcify Array Operations and filter expressions.The actual selector value must be enclosed within parentheses.
|
|
26177
|
+
* @param siteId -
|
|
26178
|
+
* @param q - The query phrase to search for. For example to search for a product "shirt", type q=shirt.
|
|
26179
|
+
* @param refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and
|
|
26180
|
+
values are separated by '='. Multiple values are supported by a subset of refinement attributes and
|
|
26181
|
+
can be provided by separating them using a pipe (URL
|
|
26182
|
+
encoded = "|") i.e. refine=c_refinementColor=red|green|blue. Value ranges can be specified like this: refine=price=(100..500) . Multiple refine parameters can be provided by using the refine as the key i.e refine=price=(0..10)&refine=c_refinementColor=green. The refinements can be a collection of custom defined attributes IDs and the system defined attributes IDs but the search can only accept a total of 9 refinements at a time.
|
|
26183
|
+
The following system refinement attribute ids are supported:
|
|
26184
|
+
|
|
26185
|
+
cgid: Allows refinement per single category ID. Multiple category ids are not supported.
|
|
26186
|
+
price: Allows refinement per single price range. Multiple price ranges are not supported.
|
|
26187
|
+
pmid: Allows refinement per promotion ID.
|
|
26188
|
+
htype: Allow refinement by including only the provided hit types. Accepted types are 'product', 'master', 'set', 'bundle', 'slicing_group' (deprecated), 'variation_group'.
|
|
26189
|
+
orderable_only: Unavailable products are excluded from the search results if true is set. Multiple refinement values are not supported.
|
|
26190
|
+
* @param sort - The ID of the sorting option to sort the search hits.
|
|
26191
|
+
* @param currency - The currency mnemonic specified for price. This parameter is effective only if the returned results contain prices.
|
|
26192
|
+
* @param locale -
|
|
26193
|
+
* @param expand - The expand parameter. A comma-separated list with the allowed values (availability, images, prices, represented_products, variations, promotions, custom_properties). The expand parameter `availability, images, prices, represented_products, variations` is used as the default value when no expand parameter is provided. The value `none` can be used to turn off all expand options. The expand values `promotions` and `custom_properties` are optional and are available from version 24.3 and 24.4, respectively.
|
|
26194
|
+
* @param allImages - When this flag is passed along with the expand parameter `images` in the request, a property named `imageGroups`, which contains an image model, is returned in the response. If the flag is set to `true`, the whole image model is returned. If it is set to `false`, the returned image model contains only matching images. If no flag is passed in the request, the response does not include the `imageGroups property`. This parameter is available from version 24.3.
|
|
26195
|
+
* @param perPricebook - When this flag is passed as `true` in the request, along with the expand parameter `prices`, then per PriceBook prices and tiered prices (if available) are returned. This parameter is available from version 24.3.
|
|
26196
|
+
* @param allVariationProperties - The flag that indicates which variation properties are to be included in the result. When the flag is passed as `true` along with the expand parameter `variations` in the request, all variation properties (`variationAttributes`, `variationGroups`, and `variants`) are returned. When it is passed as `false` along with the expand parameter `variations` in the request, only the default property (`variationAttributes`) is returned. This parameter is available from version 24.3.
|
|
26197
|
+
* @param headers - An object literal of key value pairs of the headers to be
|
|
26198
|
+
* sent with this request.
|
|
26199
|
+
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
26200
|
+
* @returns A promise of type Response if rawResponse is true, a promise of type ProductSearchResult otherwise.
|
|
26201
|
+
*
|
|
26202
|
+
*/
|
|
26203
|
+
productSearch<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
26204
|
+
parameters?: CompositeParameters<{
|
|
26205
|
+
organizationId: string;
|
|
26206
|
+
select?: any;
|
|
26207
|
+
siteId: any;
|
|
26208
|
+
q?: string;
|
|
26209
|
+
refine?: Array<string>;
|
|
26210
|
+
sort?: string;
|
|
26211
|
+
currency?: any;
|
|
26212
|
+
locale?: any;
|
|
26213
|
+
expand?: Array<string>;
|
|
26214
|
+
allImages?: boolean;
|
|
26215
|
+
perPricebook?: boolean;
|
|
26216
|
+
allVariationProperties?: boolean;
|
|
26217
|
+
} & {
|
|
26218
|
+
[key in `c_${string}`]: any;
|
|
26219
|
+
}, ConfigParameters>;
|
|
26220
|
+
headers?: {
|
|
26221
|
+
[key: string]: string;
|
|
26222
|
+
};
|
|
26223
|
+
}>, rawResponse?: T): Promise<T extends true ? Response : ProductSearchResult>;
|
|
26224
|
+
/**
|
|
26225
|
+
* Provides keyword search functionality for products, categories, and brands suggestions. Returns suggested products, suggested categories, and suggested brands for the given search phrase.
|
|
26226
|
+
*
|
|
26227
|
+
* If you would like to get a raw Response object use the other getSearchSuggestions function.
|
|
26228
|
+
*
|
|
26229
|
+
* @param options - An object containing the options for this method.
|
|
26230
|
+
* @param parameters - An object containing the parameters for this method.
|
|
26231
|
+
* @param organizationId -
|
|
26232
|
+
* @param siteId -
|
|
26233
|
+
* @param q - The search phrase (q) for which suggestions are evaluated. Search suggestions are determined when the search phrase input is at least three (default) characters long. The value is configurable in the Business Manager.
|
|
26234
|
+
* @param limit - The maximum number of suggestions made per request. If no value is defined, by default five suggestions per suggestion type are evaluated. This affects all types of suggestions (category, product, brand, and custom suggestions).
|
|
26235
|
+
* @param currency - The currency code specified for price. This parameter is effective only for product suggestions.
|
|
26236
|
+
* @param locale -
|
|
26237
|
+
* @param headers - An object literal of key value pairs of the headers to be
|
|
26238
|
+
* sent with this request.
|
|
26239
|
+
*
|
|
26240
|
+
* @returns A promise of type SuggestionResult.
|
|
26241
|
+
*
|
|
26242
|
+
*/
|
|
26243
|
+
getSearchSuggestions(options?: RequireParametersUnlessAllAreOptional<{
|
|
26244
|
+
parameters?: CompositeParameters<{
|
|
26245
|
+
organizationId: string;
|
|
26246
|
+
siteId: any;
|
|
26247
|
+
q: string;
|
|
26248
|
+
limit?: number;
|
|
26249
|
+
currency?: any;
|
|
26250
|
+
locale?: any;
|
|
26251
|
+
} & {
|
|
26252
|
+
[key in `c_${string}`]: any;
|
|
26253
|
+
}, ConfigParameters>;
|
|
26254
|
+
headers?: {
|
|
26255
|
+
[key: string]: string;
|
|
26256
|
+
};
|
|
26257
|
+
}>): Promise<SuggestionResult>;
|
|
26258
|
+
/**
|
|
26259
|
+
* Provides keyword search functionality for products, categories, and brands suggestions. Returns suggested products, suggested categories, and suggested brands for the given search phrase.
|
|
26260
|
+
*
|
|
26261
|
+
* @param options - An object containing the options for this method.
|
|
26262
|
+
* @param parameters - An object containing the parameters for this method.
|
|
26263
|
+
* @param organizationId -
|
|
26264
|
+
* @param siteId -
|
|
26265
|
+
* @param q - The search phrase (q) for which suggestions are evaluated. Search suggestions are determined when the search phrase input is at least three (default) characters long. The value is configurable in the Business Manager.
|
|
26266
|
+
* @param limit - The maximum number of suggestions made per request. If no value is defined, by default five suggestions per suggestion type are evaluated. This affects all types of suggestions (category, product, brand, and custom suggestions).
|
|
26267
|
+
* @param currency - The currency code specified for price. This parameter is effective only for product suggestions.
|
|
26268
|
+
* @param locale -
|
|
26269
|
+
* @param headers - An object literal of key value pairs of the headers to be
|
|
26270
|
+
* sent with this request.
|
|
26271
|
+
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
26272
|
+
* @returns A promise of type Response if rawResponse is true, a promise of type SuggestionResult otherwise.
|
|
26273
|
+
*
|
|
26274
|
+
*/
|
|
26275
|
+
getSearchSuggestions<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
26276
|
+
parameters?: CompositeParameters<{
|
|
26277
|
+
organizationId: string;
|
|
26278
|
+
siteId: any;
|
|
26279
|
+
q: string;
|
|
26280
|
+
limit?: number;
|
|
26281
|
+
currency?: any;
|
|
26282
|
+
locale?: any;
|
|
26283
|
+
} & {
|
|
26284
|
+
[key in `c_${string}`]: any;
|
|
26285
|
+
}, ConfigParameters>;
|
|
26286
|
+
headers?: {
|
|
26287
|
+
[key: string]: string;
|
|
26288
|
+
};
|
|
26289
|
+
}>, rawResponse?: T): Promise<T extends true ? Response : SuggestionResult>;
|
|
26290
|
+
}
|
|
26291
|
+
}
|
|
26292
|
+
type BoolFilter$9 = {
|
|
26293
|
+
filters?: Array<Filter$8>;
|
|
26294
|
+
operator: string;
|
|
26295
|
+
} & {
|
|
26296
|
+
[key: string]: any;
|
|
26297
|
+
};
|
|
26298
|
+
type MatchAllQuery$9 = {} & {
|
|
26299
|
+
[key: string]: any;
|
|
26300
|
+
};
|
|
26301
|
+
type FilteredQuery$9 = {
|
|
26302
|
+
filter: Filter$8;
|
|
26303
|
+
query: Query$8;
|
|
26304
|
+
} & {
|
|
26305
|
+
[key: string]: any;
|
|
26306
|
+
};
|
|
26307
|
+
type QueryFilter$9 = {
|
|
26308
|
+
query: Query$8;
|
|
26309
|
+
} & {
|
|
26310
|
+
[key: string]: any;
|
|
26311
|
+
};
|
|
26312
|
+
type Query$9 = {
|
|
26313
|
+
boolQuery?: BoolQuery$8;
|
|
26314
|
+
filteredQuery?: FilteredQuery$9;
|
|
26315
|
+
matchAllQuery?: MatchAllQuery$9;
|
|
26316
|
+
nestedQuery?: NestedQuery$8;
|
|
26317
|
+
termQuery?: TermQuery$8;
|
|
26318
|
+
textQuery?: TextQuery$8;
|
|
26319
|
+
} & {
|
|
26320
|
+
[key: string]: any;
|
|
26321
|
+
};
|
|
26322
|
+
type TermQuery$9 = {
|
|
26323
|
+
fields: Array<string>;
|
|
26324
|
+
operator: string;
|
|
26325
|
+
values?: Array<any>;
|
|
26326
|
+
} & {
|
|
26327
|
+
[key: string]: any;
|
|
26328
|
+
};
|
|
26329
|
+
type TermFilter$9 = {
|
|
26330
|
+
field: string;
|
|
26331
|
+
operator: string;
|
|
26332
|
+
values?: Array<any>;
|
|
26333
|
+
} & {
|
|
26334
|
+
[key: string]: any;
|
|
26335
|
+
};
|
|
26336
|
+
type TextQuery$9 = {
|
|
26337
|
+
fields: Array<string>;
|
|
26338
|
+
searchPhrase: string;
|
|
26339
|
+
} & {
|
|
26340
|
+
[key: string]: any;
|
|
26341
|
+
};
|
|
26342
|
+
type Range2Filter$9 = {
|
|
26343
|
+
filterMode?: string;
|
|
26344
|
+
fromField: string;
|
|
26345
|
+
fromInclusive?: boolean;
|
|
26346
|
+
fromValue?: any;
|
|
26347
|
+
toField: string;
|
|
26348
|
+
toInclusive?: boolean;
|
|
26349
|
+
toValue?: any;
|
|
26350
|
+
} & {
|
|
26351
|
+
[key: string]: any;
|
|
26352
|
+
};
|
|
26353
|
+
type BoolQuery$9 = {
|
|
26354
|
+
must?: Array<Query$9>;
|
|
26355
|
+
mustNot?: Array<Query$9>;
|
|
26356
|
+
should?: Array<Query$9>;
|
|
26357
|
+
} & {
|
|
26358
|
+
[key: string]: any;
|
|
26359
|
+
};
|
|
26360
|
+
type NestedQuery$9 = {
|
|
26361
|
+
path: string;
|
|
26362
|
+
query: Query$9;
|
|
26363
|
+
scoreMode?: string;
|
|
26364
|
+
} & {
|
|
26365
|
+
[key: string]: any;
|
|
26366
|
+
};
|
|
26367
|
+
type Filter$9 = {
|
|
26368
|
+
boolFilter?: BoolFilter$9;
|
|
26369
|
+
queryFilter?: QueryFilter$9;
|
|
26370
|
+
range2Filter?: Range2Filter$9;
|
|
26371
|
+
rangeFilter?: RangeFilter$8;
|
|
26372
|
+
termFilter?: TermFilter$9;
|
|
26373
|
+
} & {
|
|
26374
|
+
[key: string]: any;
|
|
26375
|
+
};
|
|
26376
|
+
type Sort$9 = {
|
|
26377
|
+
field: string;
|
|
26378
|
+
sortOrder?: string;
|
|
26379
|
+
} & {
|
|
26380
|
+
[key: string]: any;
|
|
26381
|
+
};
|
|
26382
|
+
type RangeFilter$9 = {
|
|
26383
|
+
field: string;
|
|
26384
|
+
from?: any;
|
|
26385
|
+
fromInclusive?: boolean;
|
|
26386
|
+
to?: any;
|
|
26387
|
+
toInclusive?: boolean;
|
|
26388
|
+
} & {
|
|
26389
|
+
[key: string]: any;
|
|
26390
|
+
};
|
|
26391
|
+
type L10nString$8 = {} & {
|
|
26392
|
+
[key: string]: any;
|
|
26393
|
+
};
|
|
26394
|
+
type PropertyValueDefinition$8 = {
|
|
26395
|
+
description: L10nString$8;
|
|
26396
|
+
displayValue: L10nString$8;
|
|
26397
|
+
id: string;
|
|
26398
|
+
position?: number;
|
|
26399
|
+
value: string;
|
|
26400
|
+
};
|
|
26401
|
+
type UrlMapping = {
|
|
26402
|
+
resourceType?: string;
|
|
26403
|
+
resourceSubType?: string;
|
|
26404
|
+
resourceId?: string;
|
|
26405
|
+
refinements?: {} & {
|
|
26406
|
+
[key: string]: any;
|
|
26407
|
+
};
|
|
26408
|
+
statusCode?: number;
|
|
26409
|
+
destinationUrl?: string;
|
|
26410
|
+
copySourceParams?: boolean;
|
|
26411
|
+
additionalUrlParams?: string;
|
|
26412
|
+
productCategoryId?: string;
|
|
26413
|
+
} & {
|
|
26414
|
+
[key: string]: any;
|
|
26415
|
+
};
|
|
26416
|
+
/**
|
|
26417
|
+
* All path parameters that are used by at least one ShopperSeo method.
|
|
26418
|
+
*/
|
|
26419
|
+
type ShopperSeoPathParameters = {
|
|
26420
|
+
organizationId?: string;
|
|
26421
|
+
};
|
|
26422
|
+
/**
|
|
26423
|
+
* All query parameters that are used by at least one ShopperSeo method.
|
|
26424
|
+
*/
|
|
26425
|
+
type ShopperSeoQueryParameters = {
|
|
26426
|
+
urlSegment?: string;
|
|
26427
|
+
siteId?: string;
|
|
26428
|
+
locale?: string;
|
|
26429
|
+
};
|
|
26430
|
+
/**
|
|
26431
|
+
* All parameters that are used by ShopperSeo.
|
|
26432
|
+
*/
|
|
26433
|
+
type ShopperSeoParameters = ShopperSeoPathParameters & BaseUriParameters & ShopperSeoQueryParameters;
|
|
26434
|
+
/**
|
|
26435
|
+
* [Shopper Seo](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-seo:Summary)
|
|
26436
|
+
* ==================================
|
|
26437
|
+
*
|
|
26438
|
+
* **<br />
|
|
26439
|
+
*
|
|
26440
|
+
* Simple example:
|
|
26441
|
+
*
|
|
26442
|
+
* ```typescript
|
|
26443
|
+
* import { ShopperSeo } from "commerce-sdk-isomorphic";
|
|
26444
|
+
*
|
|
26445
|
+
* const clientConfig = {
|
|
26446
|
+
* parameters: {
|
|
26447
|
+
* clientId: "XXXXXX",
|
|
26448
|
+
* organizationId: "XXXX",
|
|
26449
|
+
* shortCode: "XXX",
|
|
26450
|
+
* siteId: "XX"
|
|
26451
|
+
* }
|
|
26452
|
+
* };
|
|
26453
|
+
* const shopperSeoClient = new ShopperSeo(clientConfig);
|
|
26454
|
+
* ```
|
|
26455
|
+
*
|
|
26456
|
+
* <span style="font-size:.7em; display:block; text-align: right">
|
|
26457
|
+
* API Version: 1.0.6<br />
|
|
26458
|
+
* Last Updated: <br />
|
|
26459
|
+
* </span>
|
|
26460
|
+
|
|
26461
|
+
*
|
|
26462
|
+
|
|
26463
|
+
*/
|
|
26464
|
+
declare class ShopperSeo<ConfigParameters extends ShopperSeoParameters & Record<string, unknown>> {
|
|
26465
|
+
// baseUri is not required on ClientConfig, but we know that we provide one in the class constructor
|
|
26466
|
+
clientConfig: ClientConfig<ConfigParameters> & {
|
|
26467
|
+
baseUri: string;
|
|
26468
|
+
};
|
|
26469
|
+
static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}";
|
|
26470
|
+
constructor(config: ClientConfigInit<ConfigParameters>);
|
|
26471
|
+
/**
|
|
26472
|
+
* Gets URL mapping information for a URL that a shopper clicked or typed in. The mapping information is based on URL rules and redirects set up in Business Manager. For more information about prerequisites and sample usage, see [URL Resolution](/docs/commerce/commerce-api/guide/url-resolution.html). You can customize the behavior of this endpoint by using hooks. See the hooks for getUrlMapping in the [Hook List](https://developer.salesforce.com/docs/commerce/commerce-api/guide/hook_list.html).
|
|
26473
|
+
*
|
|
26474
|
+
* If you would like to get a raw Response object use the other getUrlMapping function.
|
|
26475
|
+
*
|
|
26476
|
+
* @param options - An object containing the options for this method.
|
|
26477
|
+
* @param parameters - An object containing the parameters for this method.
|
|
26478
|
+
* @param organizationId - An identifier for the organization the request is being made by.
|
|
26479
|
+
* @param urlSegment - The part of the requested URL that comes after the domain name. For example, the urlSegment for "www.abc.com/blue/new-arrivals/tops" is "blue/new-arrivals/tops". There's no limit on the length of the urlSegment. However, for this endpoint, the maximum allowed length of the URL (after URL encoding) is 2047 characters. Make this field URL-encoded so that it properly handles special values such as whitespace. If a urlSegment includes a query string, a 404 error code is returned.
|
|
26480
|
+
* @param siteId -
|
|
26481
|
+
* @param locale - A descriptor to provide locale context for a geographical region by both a language and/or country code. The locale pattern in the query param follows the ISO 639-1 for the language code (e.g. en, de, fr) and ISO 3166-1 for the country code (e.g. US, DE, AT). The param can be a combination of language code and country code or can just refer to the language code.
|
|
26482
|
+
Below are some valid examples:
|
|
26483
|
+
- en-US
|
|
26484
|
+
- de-AT
|
|
26485
|
+
- de
|
|
26486
|
+
- default
|
|
26487
|
+
Please note that if no locale is specified, the default site locale will be used.
|
|
26488
|
+
* @param headers - An object literal of key value pairs of the headers to be
|
|
26489
|
+
* sent with this request.
|
|
26490
|
+
*
|
|
26491
|
+
* @returns A promise of type UrlMapping.
|
|
26492
|
+
*
|
|
26493
|
+
*/
|
|
26494
|
+
getUrlMapping(options?: RequireParametersUnlessAllAreOptional<{
|
|
26495
|
+
parameters?: CompositeParameters<{
|
|
26496
|
+
organizationId: string;
|
|
26497
|
+
urlSegment: string;
|
|
26498
|
+
siteId: string;
|
|
26499
|
+
locale?: string;
|
|
26500
|
+
} & {
|
|
26501
|
+
[key in `c_${string}`]: any;
|
|
26502
|
+
}, ConfigParameters>;
|
|
26503
|
+
headers?: {
|
|
26504
|
+
[key: string]: string;
|
|
26505
|
+
};
|
|
26506
|
+
}>): Promise<UrlMapping>;
|
|
26507
|
+
/**
|
|
26508
|
+
* Gets URL mapping information for a URL that a shopper clicked or typed in. The mapping information is based on URL rules and redirects set up in Business Manager. For more information about prerequisites and sample usage, see [URL Resolution](/docs/commerce/commerce-api/guide/url-resolution.html). You can customize the behavior of this endpoint by using hooks. See the hooks for getUrlMapping in the [Hook List](https://developer.salesforce.com/docs/commerce/commerce-api/guide/hook_list.html).
|
|
26509
|
+
*
|
|
26510
|
+
* @param options - An object containing the options for this method.
|
|
26511
|
+
* @param parameters - An object containing the parameters for this method.
|
|
26512
|
+
* @param organizationId - An identifier for the organization the request is being made by.
|
|
26513
|
+
* @param urlSegment - The part of the requested URL that comes after the domain name. For example, the urlSegment for "www.abc.com/blue/new-arrivals/tops" is "blue/new-arrivals/tops". There's no limit on the length of the urlSegment. However, for this endpoint, the maximum allowed length of the URL (after URL encoding) is 2047 characters. Make this field URL-encoded so that it properly handles special values such as whitespace. If a urlSegment includes a query string, a 404 error code is returned.
|
|
26514
|
+
* @param siteId -
|
|
26515
|
+
* @param locale - A descriptor to provide locale context for a geographical region by both a language and/or country code. The locale pattern in the query param follows the ISO 639-1 for the language code (e.g. en, de, fr) and ISO 3166-1 for the country code (e.g. US, DE, AT). The param can be a combination of language code and country code or can just refer to the language code.
|
|
26516
|
+
Below are some valid examples:
|
|
26517
|
+
- en-US
|
|
26518
|
+
- de-AT
|
|
26519
|
+
- de
|
|
26520
|
+
- default
|
|
26521
|
+
Please note that if no locale is specified, the default site locale will be used.
|
|
26522
|
+
* @param headers - An object literal of key value pairs of the headers to be
|
|
26523
|
+
* sent with this request.
|
|
26524
|
+
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
26525
|
+
* @returns A promise of type Response if rawResponse is true, a promise of type UrlMapping otherwise.
|
|
26526
|
+
*
|
|
26527
|
+
*/
|
|
26528
|
+
getUrlMapping<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
26529
|
+
parameters?: CompositeParameters<{
|
|
26530
|
+
organizationId: string;
|
|
26531
|
+
urlSegment: string;
|
|
26532
|
+
siteId: string;
|
|
26533
|
+
locale?: string;
|
|
26534
|
+
} & {
|
|
26535
|
+
[key in `c_${string}`]: any;
|
|
26536
|
+
}, ConfigParameters>;
|
|
26537
|
+
headers?: {
|
|
26538
|
+
[key: string]: string;
|
|
26539
|
+
};
|
|
26540
|
+
}>, rawResponse?: T): Promise<T extends true ? Response : UrlMapping>;
|
|
26541
|
+
}
|
|
26542
|
+
declare namespace ShopperSeoTypes {
|
|
26543
|
+
/*
|
|
26544
|
+
* Copyright (c) 2023, Salesforce, Inc.
|
|
26545
|
+
* All rights reserved.
|
|
26546
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
26547
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
26548
|
+
*/
|
|
26549
|
+
/**
|
|
26550
|
+
* Makes a type easier to read.
|
|
26551
|
+
*/
|
|
26552
|
+
type Prettify<T> = NonNullable<{
|
|
26553
|
+
[K in keyof T]: T[K];
|
|
26554
|
+
}>;
|
|
26555
|
+
/**
|
|
26556
|
+
* Generates the types required on a method, based on those provided in the config.
|
|
26557
|
+
*/
|
|
26558
|
+
type CompositeParameters<MethodParameters extends Record<string, unknown>, ConfigParameters extends Record<string, unknown>> = Prettify<Omit<MethodParameters, keyof ConfigParameters> & Partial<MethodParameters>>;
|
|
26559
|
+
/**
|
|
26560
|
+
* If an object has a `parameters` property, and the `parameters` object has required properties,
|
|
26561
|
+
* then the `parameters` property on the root object is marked as required.
|
|
26562
|
+
*/
|
|
26563
|
+
type RequireParametersUnlessAllAreOptional<T extends {
|
|
26564
|
+
parameters?: Record<string, unknown>;
|
|
26565
|
+
}> = Record<string, never> extends NonNullable<T["parameters"]> ? T : Prettify<T & Required<Pick<T, "parameters">>>;
|
|
26566
|
+
/**
|
|
26567
|
+
* Template parameters used in the base URI of all API endpoints. `version` will default to `"v1"`
|
|
26568
|
+
* if not specified.
|
|
26569
|
+
*/
|
|
26570
|
+
interface BaseUriParameters {
|
|
26571
|
+
shortCode: string;
|
|
26572
|
+
version?: string; // Optional, will default to "v1" if not provided.
|
|
26573
|
+
}
|
|
26574
|
+
/**
|
|
26575
|
+
* Generic interface for path parameters.
|
|
26576
|
+
*/
|
|
26577
|
+
interface PathParameters {
|
|
26578
|
+
[key: string]: string | number | boolean;
|
|
26579
|
+
}
|
|
26580
|
+
/**
|
|
26581
|
+
* Generic interface for query parameters.
|
|
26582
|
+
*/
|
|
26583
|
+
interface QueryParameters {
|
|
26584
|
+
[key: string]: string | number | boolean | string[] | number[];
|
|
26585
|
+
}
|
|
26586
|
+
/**
|
|
26587
|
+
* Generic interface for all parameter types.
|
|
26588
|
+
*/
|
|
26589
|
+
type UrlParameters = PathParameters | QueryParameters;
|
|
26590
|
+
/**
|
|
26591
|
+
* Alias for `RequestInit` from TypeScript's DOM lib, to more clearly differentiate
|
|
26592
|
+
* it from the `RequestInit` provided by node-fetch.
|
|
26593
|
+
*/
|
|
26594
|
+
type BrowserRequestInit = RequestInit;
|
|
26595
|
+
/**
|
|
26596
|
+
* Any properties supported in either the browser or node are accepted.
|
|
26597
|
+
* Using the right properties in the right context is left to the user.
|
|
26598
|
+
*/
|
|
26599
|
+
type FetchOptions = NodeRequestInit & BrowserRequestInit;
|
|
26600
|
+
/**
|
|
26601
|
+
* Base options that can be passed to the `ClientConfig` class.
|
|
26602
|
+
*/
|
|
26603
|
+
interface ClientConfigInit<Params extends BaseUriParameters> {
|
|
26604
|
+
baseUri?: string;
|
|
26605
|
+
proxy?: string;
|
|
26606
|
+
headers?: {
|
|
26607
|
+
[key: string]: string;
|
|
26608
|
+
};
|
|
26609
|
+
parameters: Params;
|
|
26610
|
+
fetchOptions?: FetchOptions;
|
|
26611
|
+
transformRequest?: (data: unknown, headers: {
|
|
26612
|
+
[key: string]: string;
|
|
26613
|
+
}) => Required<FetchOptions>["body"];
|
|
26614
|
+
throwOnBadResponse?: boolean;
|
|
26615
|
+
}
|
|
26616
|
+
type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
|
|
26617
|
+
/**
|
|
26618
|
+
* Configuration parameters common to Commerce SDK clients
|
|
26619
|
+
*/
|
|
26620
|
+
class ClientConfig<Params extends BaseUriParameters> implements ClientConfigInit<Params> {
|
|
26621
|
+
baseUri?: string;
|
|
26622
|
+
proxy?: string;
|
|
26623
|
+
headers: {
|
|
26624
|
+
[key: string]: string;
|
|
26625
|
+
};
|
|
26626
|
+
parameters: Params;
|
|
26627
|
+
fetchOptions: FetchOptions;
|
|
26628
|
+
transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
|
|
26629
|
+
throwOnBadResponse: boolean;
|
|
26630
|
+
constructor(config: ClientConfigInit<Params>);
|
|
26631
|
+
static readonly defaults: Pick<Required<ClientConfigInit<never>>, "transformRequest">;
|
|
26632
|
+
}
|
|
26633
|
+
type Money = {
|
|
26634
|
+
currencyMnemonic?: string;
|
|
26635
|
+
value?: number;
|
|
26636
|
+
} & {
|
|
26637
|
+
[key: string]: any;
|
|
26638
|
+
};
|
|
26639
|
+
type SimpleSearchResult = {
|
|
26640
|
+
limit: number;
|
|
26641
|
+
hits?: Array<object>;
|
|
26642
|
+
offset: any;
|
|
26643
|
+
total: any;
|
|
26644
|
+
} & {
|
|
26645
|
+
[key: string]: any;
|
|
26646
|
+
};
|
|
26647
|
+
type SearchRequest = {
|
|
26648
|
+
limit?: number;
|
|
26649
|
+
query: Query$9;
|
|
26650
|
+
sorts?: Array<Sort$9>;
|
|
26651
|
+
offset?: any;
|
|
26652
|
+
} & {
|
|
26653
|
+
[key: string]: any;
|
|
26654
|
+
};
|
|
26655
|
+
type PropertyDefinition = {
|
|
26656
|
+
defaultValue?: PropertyValueDefinition$8;
|
|
26657
|
+
id?: string;
|
|
26658
|
+
name: L10nString$8;
|
|
26659
|
+
description: L10nString$8;
|
|
26660
|
+
key?: boolean;
|
|
26661
|
+
localizable?: boolean;
|
|
26662
|
+
mandatory?: boolean;
|
|
26663
|
+
max?: number;
|
|
26664
|
+
minLength?: number;
|
|
26665
|
+
min?: number;
|
|
26666
|
+
multiValueType?: boolean;
|
|
26667
|
+
regularExpression?: string;
|
|
26668
|
+
scale?: number;
|
|
26669
|
+
searchable?: boolean;
|
|
26670
|
+
siteSpecific?: boolean;
|
|
26671
|
+
system?: boolean;
|
|
26672
|
+
unit?: L10nString$8;
|
|
26673
|
+
possibleValues?: Array<PropertyValueDefinition$8>;
|
|
26674
|
+
type: string;
|
|
26675
|
+
visible?: boolean;
|
|
26676
|
+
} & {
|
|
26677
|
+
[key: string]: any;
|
|
26678
|
+
};
|
|
26679
|
+
type LocalizedString = {} & {
|
|
26680
|
+
[key: string]: any;
|
|
26681
|
+
};
|
|
26682
|
+
type PaginatedSearchResult = {
|
|
26683
|
+
query: Query$9;
|
|
26684
|
+
sorts?: Array<Sort$9>;
|
|
26685
|
+
limit: number;
|
|
26686
|
+
hits?: Array<object>;
|
|
26687
|
+
offset: any;
|
|
26688
|
+
total: any;
|
|
26689
|
+
} & {
|
|
26690
|
+
[key: string]: any;
|
|
26691
|
+
};
|
|
26692
|
+
type ClosedObject = {} & {
|
|
26693
|
+
[key: string]: any;
|
|
26694
|
+
};
|
|
26695
|
+
type OpenObject = {} & {
|
|
26696
|
+
[key: string]: any;
|
|
26697
|
+
};
|
|
26698
|
+
type NoPropertiesAllowed = {};
|
|
26699
|
+
type SpecifiedPropertiesAllowed = {} & {
|
|
26700
|
+
[key: string]: any;
|
|
26701
|
+
};
|
|
26702
|
+
type BoolFilter = {
|
|
26703
|
+
filters?: Array<Filter$9>;
|
|
26704
|
+
operator: string;
|
|
26705
|
+
} & {
|
|
26706
|
+
[key: string]: any;
|
|
26707
|
+
};
|
|
26708
|
+
type PaginatedSearchResultBase = {
|
|
26709
|
+
query: Query$9;
|
|
25813
26710
|
sorts?: Array<Sort$9>;
|
|
25814
26711
|
limit: number;
|
|
25815
26712
|
hits?: Array<object>;
|
|
@@ -25822,13 +26719,13 @@ declare namespace ShopperSearchTypes {
|
|
|
25822
26719
|
[key: string]: any;
|
|
25823
26720
|
};
|
|
25824
26721
|
type FilteredQuery = {
|
|
25825
|
-
filter:
|
|
25826
|
-
query:
|
|
26722
|
+
filter: Filter$9;
|
|
26723
|
+
query: Query$9;
|
|
25827
26724
|
} & {
|
|
25828
26725
|
[key: string]: any;
|
|
25829
26726
|
};
|
|
25830
26727
|
type QueryFilter = {
|
|
25831
|
-
query:
|
|
26728
|
+
query: Query$9;
|
|
25832
26729
|
} & {
|
|
25833
26730
|
[key: string]: any;
|
|
25834
26731
|
};
|
|
@@ -25874,9 +26771,9 @@ declare namespace ShopperSearchTypes {
|
|
|
25874
26771
|
[key: string]: any;
|
|
25875
26772
|
};
|
|
25876
26773
|
type BoolQuery = {
|
|
25877
|
-
must?: Array<
|
|
25878
|
-
mustNot?: Array<
|
|
25879
|
-
should?: Array<
|
|
26774
|
+
must?: Array<Query>;
|
|
26775
|
+
mustNot?: Array<Query>;
|
|
26776
|
+
should?: Array<Query>;
|
|
25880
26777
|
} & {
|
|
25881
26778
|
[key: string]: any;
|
|
25882
26779
|
};
|
|
@@ -25890,7 +26787,7 @@ declare namespace ShopperSearchTypes {
|
|
|
25890
26787
|
};
|
|
25891
26788
|
type NestedQuery = {
|
|
25892
26789
|
path: string;
|
|
25893
|
-
query:
|
|
26790
|
+
query: Query;
|
|
25894
26791
|
scoreMode?: string;
|
|
25895
26792
|
} & {
|
|
25896
26793
|
[key: string]: any;
|
|
@@ -25921,289 +26818,125 @@ declare namespace ShopperSearchTypes {
|
|
|
25921
26818
|
};
|
|
25922
26819
|
type SearchRequestBase = {
|
|
25923
26820
|
limit?: number;
|
|
25924
|
-
query:
|
|
26821
|
+
query: Query;
|
|
25925
26822
|
sorts?: Array<Sort>;
|
|
25926
26823
|
offset?: any;
|
|
25927
26824
|
} & {
|
|
25928
26825
|
[key: string]: any;
|
|
25929
26826
|
};
|
|
25930
|
-
type MoneyMnemonic = {
|
|
25931
|
-
currencyMnemonic?: string;
|
|
25932
|
-
value?: number;
|
|
25933
|
-
} & {
|
|
25934
|
-
[key: string]: any;
|
|
25935
|
-
};
|
|
25936
|
-
type L10nString = {} & {
|
|
25937
|
-
[key: string]: any;
|
|
25938
|
-
};
|
|
25939
|
-
type AttributeDefinition = {
|
|
25940
|
-
defaultValue?: PropertyValueDefinition$8;
|
|
25941
|
-
id?: string;
|
|
25942
|
-
name: L10nString;
|
|
25943
|
-
description: L10nString;
|
|
25944
|
-
key?: boolean;
|
|
25945
|
-
localizable?: boolean;
|
|
25946
|
-
mandatory?: boolean;
|
|
25947
|
-
max?: number;
|
|
25948
|
-
minLength?: number;
|
|
25949
|
-
min?: number;
|
|
25950
|
-
multiValueType?: boolean;
|
|
25951
|
-
regularExpression?: string;
|
|
25952
|
-
scale?: number;
|
|
25953
|
-
searchable?: boolean;
|
|
25954
|
-
siteSpecific?: boolean;
|
|
25955
|
-
system?: boolean;
|
|
25956
|
-
unit?: L10nString;
|
|
25957
|
-
possibleValues?: Array<PropertyValueDefinition$8>;
|
|
25958
|
-
type: string;
|
|
25959
|
-
visible?: boolean;
|
|
25960
|
-
};
|
|
25961
|
-
type PropertyValueDefinition = {
|
|
25962
|
-
description: L10nString;
|
|
25963
|
-
displayValue: L10nString;
|
|
25964
|
-
id: string;
|
|
25965
|
-
position?: number;
|
|
25966
|
-
value: string;
|
|
25967
|
-
};
|
|
25968
|
-
type ErrorResponse = {
|
|
25969
|
-
type: string;
|
|
25970
|
-
title?: string;
|
|
25971
|
-
detail?: string;
|
|
25972
|
-
instance?: string;
|
|
25973
|
-
} & {
|
|
25974
|
-
[key: string]: any;
|
|
25975
|
-
};
|
|
25976
|
-
type ChangeControlled = {
|
|
25977
|
-
creationDate?: any;
|
|
25978
|
-
modificationDate?: any;
|
|
25979
|
-
createdBy?: string;
|
|
25980
|
-
lastModifiedBy?: string;
|
|
25981
|
-
} & {
|
|
25982
|
-
[key: string]: any;
|
|
25983
|
-
};
|
|
25984
|
-
type ChangeControlledDataType = {
|
|
25985
|
-
creationDate?: any;
|
|
25986
|
-
modificationDate?: any;
|
|
25987
|
-
createdBy?: string;
|
|
25988
|
-
lastModifiedBy?: string;
|
|
25989
|
-
} & {
|
|
25990
|
-
[key: string]: any;
|
|
25991
|
-
};
|
|
25992
|
-
type Error = {
|
|
25993
|
-
type: string;
|
|
25994
|
-
title?: string;
|
|
25995
|
-
detail?: string;
|
|
25996
|
-
instance?: string;
|
|
25997
|
-
} & {
|
|
25998
|
-
[key: string]: any;
|
|
25999
|
-
};
|
|
26000
|
-
type ProductRef = {
|
|
26001
|
-
id: string;
|
|
26002
|
-
} & {
|
|
26003
|
-
[key: string]: any;
|
|
26004
|
-
};
|
|
26005
|
-
type SuggestedTerms = {
|
|
26006
|
-
originalTerm: string;
|
|
26007
|
-
terms?: Array<SuggestedTerm>;
|
|
26008
|
-
} & {
|
|
26009
|
-
[key: string]: any;
|
|
26010
|
-
};
|
|
26011
|
-
type CategorySuggestions = {
|
|
26012
|
-
categories?: Array<SuggestedCategory>;
|
|
26013
|
-
suggestedPhrases?: Array<SuggestedPhrase>;
|
|
26014
|
-
suggestedTerms: Array<SuggestedTerms>;
|
|
26015
|
-
} & {
|
|
26016
|
-
[key: string]: any;
|
|
26017
|
-
};
|
|
26018
|
-
type SuggestedProduct = {
|
|
26019
|
-
currency: string;
|
|
26020
|
-
price: number;
|
|
26021
|
-
productId: string;
|
|
26022
|
-
productName: string;
|
|
26023
|
-
} & {
|
|
26024
|
-
[key: string]: any;
|
|
26025
|
-
};
|
|
26026
|
-
type SuggestedPhrase = {
|
|
26027
|
-
exactMatch: boolean;
|
|
26028
|
-
phrase: string;
|
|
26029
|
-
} & {
|
|
26030
|
-
[key: string]: any;
|
|
26031
|
-
};
|
|
26032
|
-
type VariationAttribute = {
|
|
26033
|
-
id: string;
|
|
26034
|
-
name?: string;
|
|
26035
|
-
values?: Array<VariationAttributeValue$1>;
|
|
26036
|
-
} & {
|
|
26037
|
-
[key: string]: any;
|
|
26038
|
-
};
|
|
26039
|
-
type ProductSuggestions = {
|
|
26040
|
-
products?: Array<SuggestedProduct>;
|
|
26041
|
-
suggestedPhrases?: Array<SuggestedPhrase>;
|
|
26042
|
-
suggestedTerms: Array<SuggestedTerms>;
|
|
26043
|
-
} & {
|
|
26044
|
-
[key: string]: any;
|
|
26045
|
-
};
|
|
26046
|
-
type SuggestedCategory = {
|
|
26047
|
-
id: string;
|
|
26048
|
-
name: string;
|
|
26049
|
-
parentCategoryName: string;
|
|
26050
|
-
} & {
|
|
26051
|
-
[key: string]: any;
|
|
26052
|
-
};
|
|
26053
|
-
type ProductType = {
|
|
26054
|
-
bundle?: boolean;
|
|
26055
|
-
item?: boolean;
|
|
26056
|
-
master?: boolean;
|
|
26057
|
-
option?: boolean;
|
|
26058
|
-
set?: boolean;
|
|
26059
|
-
variant?: boolean;
|
|
26060
|
-
variationGroup?: boolean;
|
|
26061
|
-
} & {
|
|
26062
|
-
[key: string]: any;
|
|
26063
|
-
};
|
|
26064
|
-
type BrandSuggestions = {} & {
|
|
26065
|
-
[key: string]: any;
|
|
26066
|
-
};
|
|
26067
|
-
type ProductSearchRefinementValue = {
|
|
26068
|
-
description?: string;
|
|
26069
|
-
hitCount: number;
|
|
26070
|
-
label: string;
|
|
26071
|
-
presentationId?: string;
|
|
26072
|
-
value: string;
|
|
26073
|
-
values?: Array<ProductSearchRefinementValue>;
|
|
26074
|
-
} & {
|
|
26075
|
-
[key: string]: any;
|
|
26076
|
-
};
|
|
26077
|
-
type ProductSearchSortingOption = {
|
|
26078
|
-
id: string;
|
|
26079
|
-
label: string;
|
|
26080
|
-
} & {
|
|
26081
|
-
[key: string]: any;
|
|
26082
|
-
};
|
|
26083
|
-
type SuggestedTerm = {
|
|
26084
|
-
completed: boolean;
|
|
26085
|
-
corrected: boolean;
|
|
26086
|
-
exactMatch: boolean;
|
|
26087
|
-
value: string;
|
|
26088
|
-
} & {
|
|
26089
|
-
[key: string]: any;
|
|
26090
|
-
};
|
|
26091
|
-
type ProductSearchRefinement = {
|
|
26092
|
-
attributeId: string;
|
|
26093
|
-
label?: string;
|
|
26094
|
-
values?: Array<ProductSearchRefinementValue>;
|
|
26095
|
-
} & {
|
|
26096
|
-
[key: string]: any;
|
|
26097
|
-
};
|
|
26098
|
-
type CustomSuggestions = {
|
|
26099
|
-
customSuggestion?: string;
|
|
26100
|
-
suggestedPhrases?: Array<SuggestedPhrase>;
|
|
26101
|
-
suggestedTerms: Array<SuggestedTerms>;
|
|
26102
|
-
} & {
|
|
26103
|
-
[key: string]: any;
|
|
26104
|
-
};
|
|
26105
|
-
type ProductSearchHit = {
|
|
26106
|
-
currency?: string;
|
|
26107
|
-
hitType?: string;
|
|
26108
|
-
image?: Image$1;
|
|
26109
|
-
orderable?: boolean;
|
|
26110
|
-
price?: number;
|
|
26111
|
-
priceMax?: number;
|
|
26112
|
-
prices?: {} & {
|
|
26113
|
-
[key: string]: any;
|
|
26114
|
-
};
|
|
26115
|
-
productId: string;
|
|
26116
|
-
productName?: string;
|
|
26117
|
-
productType?: ProductType;
|
|
26118
|
-
representedProduct?: ProductRef;
|
|
26119
|
-
representedProducts?: Array<ProductRef>;
|
|
26120
|
-
variationAttributes?: Array<VariationAttribute>;
|
|
26827
|
+
type MoneyMnemonic = {
|
|
26828
|
+
currencyMnemonic?: string;
|
|
26829
|
+
value?: number;
|
|
26121
26830
|
} & {
|
|
26122
26831
|
[key: string]: any;
|
|
26123
26832
|
};
|
|
26124
|
-
type
|
|
26125
|
-
|
|
26126
|
-
|
|
26127
|
-
|
|
26128
|
-
|
|
26129
|
-
|
|
26130
|
-
|
|
26833
|
+
type L10nString = {} & {
|
|
26834
|
+
[key: string]: any;
|
|
26835
|
+
};
|
|
26836
|
+
type AttributeDefinition = {
|
|
26837
|
+
defaultValue?: PropertyValueDefinition$8;
|
|
26838
|
+
id?: string;
|
|
26839
|
+
name: L10nString;
|
|
26840
|
+
description: L10nString;
|
|
26841
|
+
key?: boolean;
|
|
26842
|
+
localizable?: boolean;
|
|
26843
|
+
mandatory?: boolean;
|
|
26844
|
+
max?: number;
|
|
26845
|
+
minLength?: number;
|
|
26846
|
+
min?: number;
|
|
26847
|
+
multiValueType?: boolean;
|
|
26848
|
+
regularExpression?: string;
|
|
26849
|
+
scale?: number;
|
|
26850
|
+
searchable?: boolean;
|
|
26851
|
+
siteSpecific?: boolean;
|
|
26852
|
+
system?: boolean;
|
|
26853
|
+
unit?: L10nString;
|
|
26854
|
+
possibleValues?: Array<PropertyValueDefinition$8>;
|
|
26855
|
+
type: string;
|
|
26856
|
+
visible?: boolean;
|
|
26857
|
+
};
|
|
26858
|
+
type PropertyValueDefinition = {
|
|
26859
|
+
description: L10nString;
|
|
26860
|
+
displayValue: L10nString;
|
|
26861
|
+
id: string;
|
|
26862
|
+
position?: number;
|
|
26863
|
+
value: string;
|
|
26864
|
+
};
|
|
26865
|
+
type UrlMapping = {
|
|
26866
|
+
resourceType?: string;
|
|
26867
|
+
resourceSubType?: string;
|
|
26868
|
+
resourceId?: string;
|
|
26869
|
+
refinements?: {} & {
|
|
26131
26870
|
[key: string]: any;
|
|
26132
26871
|
};
|
|
26133
|
-
|
|
26134
|
-
|
|
26135
|
-
|
|
26136
|
-
|
|
26872
|
+
statusCode?: number;
|
|
26873
|
+
destinationUrl?: string;
|
|
26874
|
+
copySourceParams?: boolean;
|
|
26875
|
+
additionalUrlParams?: string;
|
|
26876
|
+
productCategoryId?: string;
|
|
26137
26877
|
} & {
|
|
26138
26878
|
[key: string]: any;
|
|
26139
26879
|
};
|
|
26140
|
-
type
|
|
26141
|
-
|
|
26142
|
-
disBaseLink?: string;
|
|
26143
|
-
link: string;
|
|
26880
|
+
type ErrorResponse = {
|
|
26881
|
+
type: string;
|
|
26144
26882
|
title?: string;
|
|
26883
|
+
detail?: string;
|
|
26884
|
+
instance?: string;
|
|
26145
26885
|
} & {
|
|
26146
26886
|
[key: string]: any;
|
|
26147
26887
|
};
|
|
26148
|
-
type
|
|
26149
|
-
|
|
26150
|
-
|
|
26151
|
-
|
|
26152
|
-
|
|
26153
|
-
orderable?: boolean;
|
|
26154
|
-
value: string;
|
|
26888
|
+
type ChangeControlled = {
|
|
26889
|
+
creationDate?: any;
|
|
26890
|
+
modificationDate?: any;
|
|
26891
|
+
createdBy?: string;
|
|
26892
|
+
lastModifiedBy?: string;
|
|
26155
26893
|
} & {
|
|
26156
26894
|
[key: string]: any;
|
|
26157
26895
|
};
|
|
26158
|
-
type
|
|
26159
|
-
|
|
26160
|
-
|
|
26896
|
+
type ChangeControlledDataType = {
|
|
26897
|
+
creationDate?: any;
|
|
26898
|
+
modificationDate?: any;
|
|
26899
|
+
createdBy?: string;
|
|
26900
|
+
lastModifiedBy?: string;
|
|
26161
26901
|
} & {
|
|
26162
26902
|
[key: string]: any;
|
|
26163
26903
|
};
|
|
26164
|
-
type
|
|
26165
|
-
|
|
26166
|
-
|
|
26167
|
-
|
|
26168
|
-
|
|
26169
|
-
searchPhrase: string;
|
|
26904
|
+
type Error = {
|
|
26905
|
+
type: string;
|
|
26906
|
+
title?: string;
|
|
26907
|
+
detail?: string;
|
|
26908
|
+
instance?: string;
|
|
26170
26909
|
} & {
|
|
26171
26910
|
[key: string]: any;
|
|
26172
26911
|
};
|
|
26173
26912
|
/**
|
|
26174
|
-
* All path parameters that are used by at least one
|
|
26913
|
+
* All path parameters that are used by at least one ShopperSeo method.
|
|
26175
26914
|
*/
|
|
26176
|
-
type
|
|
26915
|
+
type ShopperSeoPathParameters = {
|
|
26177
26916
|
organizationId?: string;
|
|
26178
26917
|
};
|
|
26179
26918
|
/**
|
|
26180
|
-
* All query parameters that are used by at least one
|
|
26919
|
+
* All query parameters that are used by at least one ShopperSeo method.
|
|
26181
26920
|
*/
|
|
26182
|
-
type
|
|
26921
|
+
type ShopperSeoQueryParameters = {
|
|
26922
|
+
urlSegment?: string;
|
|
26183
26923
|
siteId?: string;
|
|
26184
|
-
q?: string;
|
|
26185
|
-
refine?: Array<string>;
|
|
26186
|
-
sort?: string;
|
|
26187
|
-
currency?: string;
|
|
26188
26924
|
locale?: string;
|
|
26189
|
-
expand?: Array<string>;
|
|
26190
|
-
offset?: any;
|
|
26191
|
-
limit?: number;
|
|
26192
26925
|
};
|
|
26193
26926
|
/**
|
|
26194
|
-
* All parameters that are used by
|
|
26927
|
+
* All parameters that are used by ShopperSeo.
|
|
26195
26928
|
*/
|
|
26196
|
-
type
|
|
26929
|
+
type ShopperSeoParameters = ShopperSeoPathParameters & BaseUriParameters & ShopperSeoQueryParameters;
|
|
26197
26930
|
/**
|
|
26198
|
-
* [Shopper
|
|
26931
|
+
* [Shopper Seo](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-seo:Summary)
|
|
26199
26932
|
* ==================================
|
|
26200
26933
|
*
|
|
26201
|
-
*
|
|
26934
|
+
* **<br />
|
|
26202
26935
|
*
|
|
26203
26936
|
* Simple example:
|
|
26204
26937
|
*
|
|
26205
26938
|
* ```typescript
|
|
26206
|
-
* import {
|
|
26939
|
+
* import { ShopperSeo } from "commerce-sdk-isomorphic";
|
|
26207
26940
|
*
|
|
26208
26941
|
* const clientConfig = {
|
|
26209
26942
|
* parameters: {
|
|
@@ -26213,154 +26946,52 @@ declare namespace ShopperSearchTypes {
|
|
|
26213
26946
|
* siteId: "XX"
|
|
26214
26947
|
* }
|
|
26215
26948
|
* };
|
|
26216
|
-
* const
|
|
26949
|
+
* const shopperSeoClient = new ShopperSeo(clientConfig);
|
|
26217
26950
|
* ```
|
|
26218
26951
|
*
|
|
26219
26952
|
* <span style="font-size:.7em; display:block; text-align: right">
|
|
26220
|
-
* API Version: 1.0.
|
|
26953
|
+
* API Version: 1.0.6<br />
|
|
26221
26954
|
* Last Updated: <br />
|
|
26222
26955
|
* </span>
|
|
26223
26956
|
|
|
26224
26957
|
*
|
|
26225
26958
|
|
|
26226
26959
|
*/
|
|
26227
|
-
class
|
|
26960
|
+
class ShopperSeo<ConfigParameters extends ShopperSeoParameters & Record<string, unknown>> {
|
|
26228
26961
|
// baseUri is not required on ClientConfig, but we know that we provide one in the class constructor
|
|
26229
26962
|
clientConfig: ClientConfig<ConfigParameters> & {
|
|
26230
26963
|
baseUri: string;
|
|
26231
26964
|
};
|
|
26232
|
-
static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/
|
|
26965
|
+
static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}";
|
|
26233
26966
|
constructor(config: ClientConfigInit<ConfigParameters>);
|
|
26234
26967
|
/**
|
|
26235
|
-
*
|
|
26236
|
-
the product search hit. The search result contains only products that are online and assigned to site catalog.
|
|
26237
|
-
*
|
|
26238
|
-
* If you would like to get a raw Response object use the other productSearch function.
|
|
26239
|
-
*
|
|
26240
|
-
* @param options - An object containing the options for this method.
|
|
26241
|
-
* @param parameters - An object containing the parameters for this method.
|
|
26242
|
-
* @param organizationId - An identifier for the organization the request is being made by.
|
|
26243
|
-
* @param siteId -
|
|
26244
|
-
* @param q - The query phrase to search for. For example to search for a product "shirt", type q=shirt.
|
|
26245
|
-
* @param refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and
|
|
26246
|
-
values are separated by '='. Multiple values are supported by a subset of refinement attributes and
|
|
26247
|
-
can be provided by separating them using a pipe (URL
|
|
26248
|
-
encoded = "|") i.e. refine=c_refinementColor=red|green|blue. Value ranges can be specified like this: refine=price=(100..500) . Multiple refine parameters can be provided by using the refine as the key i.e refine=price=(0..10)&refine=c_refinementColor=green. The refinements can be a collection of custom defined attributes IDs and the system defined attributes IDs but the search can only accept a total of 9 refinements at a time.
|
|
26249
|
-
The following system refinement attribute ids are supported:
|
|
26250
|
-
|
|
26251
|
-
cgid: Allows refinement per single category ID. Multiple category ids are not supported.
|
|
26252
|
-
price: Allows refinement per single price range. Multiple price ranges are not supported.
|
|
26253
|
-
pmid: Allows refinement per promotion ID.
|
|
26254
|
-
htype: Allow refinement by including only the provided hit types. Accepted types are 'product', 'master', 'set', 'bundle', 'slicing_group' (deprecated), 'variation_group'.
|
|
26255
|
-
orderable_only: Unavailable products are excluded from the search results if true is set. Multiple refinement values are not supported.
|
|
26256
|
-
* @param sort - The ID of the sorting option to sort the search hits.
|
|
26257
|
-
* @param currency - The currency mnemonic specified for price. This parameter is effective only if the returned results contain prices.
|
|
26258
|
-
* @param locale -
|
|
26259
|
-
* @param expand - The expand parameter. A list with the allowed values (availability, images, prices, represented_products, variations). If the parameter is missing all the values will be returned.
|
|
26260
|
-
* @param offset -
|
|
26261
|
-
* @param limit - Maximum records to retrieve per request, not to exceed 200. Defaults to 25.
|
|
26262
|
-
* @param headers - An object literal of key value pairs of the headers to be
|
|
26263
|
-
* sent with this request.
|
|
26264
|
-
*
|
|
26265
|
-
* @returns A promise of type ProductSearchResult.
|
|
26266
|
-
*
|
|
26267
|
-
*/
|
|
26268
|
-
productSearch(options?: RequireParametersUnlessAllAreOptional<{
|
|
26269
|
-
parameters?: CompositeParameters<{
|
|
26270
|
-
organizationId: string;
|
|
26271
|
-
siteId: string;
|
|
26272
|
-
q?: string;
|
|
26273
|
-
refine?: Array<string>;
|
|
26274
|
-
sort?: string;
|
|
26275
|
-
currency?: string;
|
|
26276
|
-
locale?: string;
|
|
26277
|
-
expand?: Array<string>;
|
|
26278
|
-
offset?: any;
|
|
26279
|
-
limit?: number;
|
|
26280
|
-
} & {
|
|
26281
|
-
[key in `c_${string}`]: any;
|
|
26282
|
-
}, ConfigParameters>;
|
|
26283
|
-
headers?: {
|
|
26284
|
-
[key: string]: string;
|
|
26285
|
-
};
|
|
26286
|
-
}>): Promise<ProductSearchResult>;
|
|
26287
|
-
/**
|
|
26288
|
-
* Provides keyword and refinement search functionality for products. Only returns the product ID, link, and name in
|
|
26289
|
-
the product search hit. The search result contains only products that are online and assigned to site catalog.
|
|
26290
|
-
*
|
|
26291
|
-
* @param options - An object containing the options for this method.
|
|
26292
|
-
* @param parameters - An object containing the parameters for this method.
|
|
26293
|
-
* @param organizationId - An identifier for the organization the request is being made by.
|
|
26294
|
-
* @param siteId -
|
|
26295
|
-
* @param q - The query phrase to search for. For example to search for a product "shirt", type q=shirt.
|
|
26296
|
-
* @param refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and
|
|
26297
|
-
values are separated by '='. Multiple values are supported by a subset of refinement attributes and
|
|
26298
|
-
can be provided by separating them using a pipe (URL
|
|
26299
|
-
encoded = "|") i.e. refine=c_refinementColor=red|green|blue. Value ranges can be specified like this: refine=price=(100..500) . Multiple refine parameters can be provided by using the refine as the key i.e refine=price=(0..10)&refine=c_refinementColor=green. The refinements can be a collection of custom defined attributes IDs and the system defined attributes IDs but the search can only accept a total of 9 refinements at a time.
|
|
26300
|
-
The following system refinement attribute ids are supported:
|
|
26301
|
-
|
|
26302
|
-
cgid: Allows refinement per single category ID. Multiple category ids are not supported.
|
|
26303
|
-
price: Allows refinement per single price range. Multiple price ranges are not supported.
|
|
26304
|
-
pmid: Allows refinement per promotion ID.
|
|
26305
|
-
htype: Allow refinement by including only the provided hit types. Accepted types are 'product', 'master', 'set', 'bundle', 'slicing_group' (deprecated), 'variation_group'.
|
|
26306
|
-
orderable_only: Unavailable products are excluded from the search results if true is set. Multiple refinement values are not supported.
|
|
26307
|
-
* @param sort - The ID of the sorting option to sort the search hits.
|
|
26308
|
-
* @param currency - The currency mnemonic specified for price. This parameter is effective only if the returned results contain prices.
|
|
26309
|
-
* @param locale -
|
|
26310
|
-
* @param expand - The expand parameter. A list with the allowed values (availability, images, prices, represented_products, variations). If the parameter is missing all the values will be returned.
|
|
26311
|
-
* @param offset -
|
|
26312
|
-
* @param limit - Maximum records to retrieve per request, not to exceed 200. Defaults to 25.
|
|
26313
|
-
* @param headers - An object literal of key value pairs of the headers to be
|
|
26314
|
-
* sent with this request.
|
|
26315
|
-
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
26316
|
-
* @returns A promise of type Response if rawResponse is true, a promise of type ProductSearchResult otherwise.
|
|
26317
|
-
*
|
|
26318
|
-
*/
|
|
26319
|
-
productSearch<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
26320
|
-
parameters?: CompositeParameters<{
|
|
26321
|
-
organizationId: string;
|
|
26322
|
-
siteId: string;
|
|
26323
|
-
q?: string;
|
|
26324
|
-
refine?: Array<string>;
|
|
26325
|
-
sort?: string;
|
|
26326
|
-
currency?: string;
|
|
26327
|
-
locale?: string;
|
|
26328
|
-
expand?: Array<string>;
|
|
26329
|
-
offset?: any;
|
|
26330
|
-
limit?: number;
|
|
26331
|
-
} & {
|
|
26332
|
-
[key in `c_${string}`]: any;
|
|
26333
|
-
}, ConfigParameters>;
|
|
26334
|
-
headers?: {
|
|
26335
|
-
[key: string]: string;
|
|
26336
|
-
};
|
|
26337
|
-
}>, rawResponse?: T): Promise<T extends true ? Response : ProductSearchResult>;
|
|
26338
|
-
/**
|
|
26339
|
-
* Provides keyword search functionality for products, categories, and brands suggestions. Returns suggested products, suggested categories, and suggested brands for the given search phrase.
|
|
26968
|
+
* Gets URL mapping information for a URL that a shopper clicked or typed in. The mapping information is based on URL rules and redirects set up in Business Manager. For more information about prerequisites and sample usage, see [URL Resolution](/docs/commerce/commerce-api/guide/url-resolution.html). You can customize the behavior of this endpoint by using hooks. See the hooks for getUrlMapping in the [Hook List](https://developer.salesforce.com/docs/commerce/commerce-api/guide/hook_list.html).
|
|
26340
26969
|
*
|
|
26341
|
-
* If you would like to get a raw Response object use the other
|
|
26970
|
+
* If you would like to get a raw Response object use the other getUrlMapping function.
|
|
26342
26971
|
*
|
|
26343
26972
|
* @param options - An object containing the options for this method.
|
|
26344
26973
|
* @param parameters - An object containing the parameters for this method.
|
|
26345
26974
|
* @param organizationId - An identifier for the organization the request is being made by.
|
|
26975
|
+
* @param urlSegment - The part of the requested URL that comes after the domain name. For example, the urlSegment for "www.abc.com/blue/new-arrivals/tops" is "blue/new-arrivals/tops". There's no limit on the length of the urlSegment. However, for this endpoint, the maximum allowed length of the URL (after URL encoding) is 2047 characters. Make this field URL-encoded so that it properly handles special values such as whitespace. If a urlSegment includes a query string, a 404 error code is returned.
|
|
26346
26976
|
* @param siteId -
|
|
26347
|
-
* @param
|
|
26348
|
-
|
|
26349
|
-
|
|
26350
|
-
|
|
26977
|
+
* @param locale - A descriptor to provide locale context for a geographical region by both a language and/or country code. The locale pattern in the query param follows the ISO 639-1 for the language code (e.g. en, de, fr) and ISO 3166-1 for the country code (e.g. US, DE, AT). The param can be a combination of language code and country code or can just refer to the language code.
|
|
26978
|
+
Below are some valid examples:
|
|
26979
|
+
- en-US
|
|
26980
|
+
- de-AT
|
|
26981
|
+
- de
|
|
26982
|
+
- default
|
|
26983
|
+
Please note that if no locale is specified, the default site locale will be used.
|
|
26351
26984
|
* @param headers - An object literal of key value pairs of the headers to be
|
|
26352
26985
|
* sent with this request.
|
|
26353
26986
|
*
|
|
26354
|
-
* @returns A promise of type
|
|
26987
|
+
* @returns A promise of type UrlMapping.
|
|
26355
26988
|
*
|
|
26356
26989
|
*/
|
|
26357
|
-
|
|
26990
|
+
getUrlMapping(options?: RequireParametersUnlessAllAreOptional<{
|
|
26358
26991
|
parameters?: CompositeParameters<{
|
|
26359
26992
|
organizationId: string;
|
|
26993
|
+
urlSegment: string;
|
|
26360
26994
|
siteId: string;
|
|
26361
|
-
q: string;
|
|
26362
|
-
limit?: number;
|
|
26363
|
-
currency?: string;
|
|
26364
26995
|
locale?: string;
|
|
26365
26996
|
} & {
|
|
26366
26997
|
[key in `c_${string}`]: any;
|
|
@@ -26368,31 +26999,33 @@ declare namespace ShopperSearchTypes {
|
|
|
26368
26999
|
headers?: {
|
|
26369
27000
|
[key: string]: string;
|
|
26370
27001
|
};
|
|
26371
|
-
}>): Promise<
|
|
27002
|
+
}>): Promise<UrlMapping>;
|
|
26372
27003
|
/**
|
|
26373
|
-
*
|
|
27004
|
+
* Gets URL mapping information for a URL that a shopper clicked or typed in. The mapping information is based on URL rules and redirects set up in Business Manager. For more information about prerequisites and sample usage, see [URL Resolution](/docs/commerce/commerce-api/guide/url-resolution.html). You can customize the behavior of this endpoint by using hooks. See the hooks for getUrlMapping in the [Hook List](https://developer.salesforce.com/docs/commerce/commerce-api/guide/hook_list.html).
|
|
26374
27005
|
*
|
|
26375
27006
|
* @param options - An object containing the options for this method.
|
|
26376
27007
|
* @param parameters - An object containing the parameters for this method.
|
|
26377
27008
|
* @param organizationId - An identifier for the organization the request is being made by.
|
|
27009
|
+
* @param urlSegment - The part of the requested URL that comes after the domain name. For example, the urlSegment for "www.abc.com/blue/new-arrivals/tops" is "blue/new-arrivals/tops". There's no limit on the length of the urlSegment. However, for this endpoint, the maximum allowed length of the URL (after URL encoding) is 2047 characters. Make this field URL-encoded so that it properly handles special values such as whitespace. If a urlSegment includes a query string, a 404 error code is returned.
|
|
26378
27010
|
* @param siteId -
|
|
26379
|
-
* @param
|
|
26380
|
-
|
|
26381
|
-
|
|
26382
|
-
|
|
27011
|
+
* @param locale - A descriptor to provide locale context for a geographical region by both a language and/or country code. The locale pattern in the query param follows the ISO 639-1 for the language code (e.g. en, de, fr) and ISO 3166-1 for the country code (e.g. US, DE, AT). The param can be a combination of language code and country code or can just refer to the language code.
|
|
27012
|
+
Below are some valid examples:
|
|
27013
|
+
- en-US
|
|
27014
|
+
- de-AT
|
|
27015
|
+
- de
|
|
27016
|
+
- default
|
|
27017
|
+
Please note that if no locale is specified, the default site locale will be used.
|
|
26383
27018
|
* @param headers - An object literal of key value pairs of the headers to be
|
|
26384
27019
|
* sent with this request.
|
|
26385
27020
|
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
26386
|
-
* @returns A promise of type Response if rawResponse is true, a promise of type
|
|
27021
|
+
* @returns A promise of type Response if rawResponse is true, a promise of type UrlMapping otherwise.
|
|
26387
27022
|
*
|
|
26388
27023
|
*/
|
|
26389
|
-
|
|
27024
|
+
getUrlMapping<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
26390
27025
|
parameters?: CompositeParameters<{
|
|
26391
27026
|
organizationId: string;
|
|
27027
|
+
urlSegment: string;
|
|
26392
27028
|
siteId: string;
|
|
26393
|
-
q: string;
|
|
26394
|
-
limit?: number;
|
|
26395
|
-
currency?: string;
|
|
26396
27029
|
locale?: string;
|
|
26397
27030
|
} & {
|
|
26398
27031
|
[key in `c_${string}`]: any;
|
|
@@ -26400,7 +27033,7 @@ declare namespace ShopperSearchTypes {
|
|
|
26400
27033
|
headers?: {
|
|
26401
27034
|
[key: string]: string;
|
|
26402
27035
|
};
|
|
26403
|
-
}>, rawResponse?: T): Promise<T extends true ? Response :
|
|
27036
|
+
}>, rawResponse?: T): Promise<T extends true ? Response : UrlMapping>;
|
|
26404
27037
|
}
|
|
26405
27038
|
}
|
|
26406
27039
|
declare class TemplateURL extends URL {
|
|
@@ -26562,6 +27195,7 @@ declare namespace helpers {
|
|
|
26562
27195
|
login_id: string;
|
|
26563
27196
|
idp_origin: string;
|
|
26564
27197
|
usid?: string;
|
|
27198
|
+
dnt?: string;
|
|
26565
27199
|
} & {
|
|
26566
27200
|
[key: string]: any;
|
|
26567
27201
|
};
|
|
@@ -26620,6 +27254,7 @@ declare namespace helpers {
|
|
|
26620
27254
|
client_id: string;
|
|
26621
27255
|
channel_id: string;
|
|
26622
27256
|
email_id?: string;
|
|
27257
|
+
dnt?: string;
|
|
26623
27258
|
} & {
|
|
26624
27259
|
[key: string]: any;
|
|
26625
27260
|
};
|
|
@@ -26658,6 +27293,7 @@ declare namespace helpers {
|
|
|
26658
27293
|
code_verifier?: string;
|
|
26659
27294
|
client_id?: string;
|
|
26660
27295
|
channel_id?: string;
|
|
27296
|
+
dnt?: string;
|
|
26661
27297
|
} & {
|
|
26662
27298
|
[key: string]: any;
|
|
26663
27299
|
};
|
|
@@ -26677,6 +27313,7 @@ declare namespace helpers {
|
|
|
26677
27313
|
login_id: string;
|
|
26678
27314
|
dwsgst?: string;
|
|
26679
27315
|
usid?: string;
|
|
27316
|
+
dnt?: string;
|
|
26680
27317
|
} & {
|
|
26681
27318
|
[key: string]: any;
|
|
26682
27319
|
};
|
|
@@ -26989,7 +27626,7 @@ declare namespace helpers {
|
|
|
26989
27626
|
* ```
|
|
26990
27627
|
*
|
|
26991
27628
|
* <span style="font-size:.7em; display:block; text-align: right">
|
|
26992
|
-
* API Version: 1.39.
|
|
27629
|
+
* API Version: 1.39.22<br />
|
|
26993
27630
|
* Last Updated: <br />
|
|
26994
27631
|
* </span>
|
|
26995
27632
|
|
|
@@ -28222,5 +28859,5 @@ declare namespace helpers {
|
|
|
28222
28859
|
refreshToken: string;
|
|
28223
28860
|
}): Promise<TokenResponse>;
|
|
28224
28861
|
}
|
|
28225
|
-
export { ShopperBaskets, ShopperContexts, ShopperCustomers, ShopperDiscoverySearch, ShopperExperience, ShopperGiftCertificates, ShopperLogin, ShopperOrders, ShopperProducts, ShopperPromotions, ShopperSearch, ClientConfig, TemplateURL, helpers };
|
|
28226
|
-
export type { ShopperBasketsTypes, ShopperContextsTypes, ShopperCustomersTypes, ShopperDiscoverySearchTypes, ShopperExperienceTypes, ShopperGiftCertificatesTypes, ShopperLoginTypes, ShopperOrdersTypes, ShopperProductsTypes, ShopperPromotionsTypes, ShopperSearchTypes, ClientConfigInit };
|
|
28862
|
+
export { ShopperBaskets, ShopperContexts, ShopperCustomers, ShopperDiscoverySearch, ShopperExperience, ShopperGiftCertificates, ShopperLogin, ShopperOrders, ShopperProducts, ShopperPromotions, ShopperSearch, ShopperSeo, ClientConfig, TemplateURL, helpers };
|
|
28863
|
+
export type { ShopperBasketsTypes, ShopperContextsTypes, ShopperCustomersTypes, ShopperDiscoverySearchTypes, ShopperExperienceTypes, ShopperGiftCertificatesTypes, ShopperLoginTypes, ShopperOrdersTypes, ShopperProductsTypes, ShopperPromotionsTypes, ShopperSearchTypes, ShopperSeoTypes, ClientConfigInit };
|