commerce-sdk-isomorphic 1.11.0 → 1.12.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 +7 -0
- package/lib/index.cjs.d.ts +830 -11
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +830 -11
- package/lib/index.esm.js +1 -1
- package/package.json +1 -1
package/lib/index.cjs.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.2<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.2<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.21<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.21<br />
|
|
19210
19218
|
* Last Updated: <br />
|
|
19211
19219
|
* </span>
|
|
19212
19220
|
|
|
@@ -24389,6 +24397,9 @@ type PromotionResult = {
|
|
|
24389
24397
|
} & {
|
|
24390
24398
|
[key: string]: any;
|
|
24391
24399
|
};
|
|
24400
|
+
type RangeFilter$8 = {
|
|
24401
|
+
[key: string]: any;
|
|
24402
|
+
};
|
|
24392
24403
|
type TermQuery$8 = {
|
|
24393
24404
|
fields: Array<string>;
|
|
24394
24405
|
operator: string;
|
|
@@ -25185,6 +25196,36 @@ declare namespace ShopperPromotionsTypes {
|
|
|
25185
25196
|
}>, rawResponse?: T): Promise<T extends true ? Response : PromotionResult>;
|
|
25186
25197
|
}
|
|
25187
25198
|
}
|
|
25199
|
+
type BoolFilter$9 = {
|
|
25200
|
+
filters?: Array<any>;
|
|
25201
|
+
operator: string;
|
|
25202
|
+
} & {
|
|
25203
|
+
[key: string]: any;
|
|
25204
|
+
};
|
|
25205
|
+
type MatchAllQuery$9 = {} & {
|
|
25206
|
+
[key: string]: any;
|
|
25207
|
+
};
|
|
25208
|
+
type FilteredQuery$9 = {
|
|
25209
|
+
filter: any;
|
|
25210
|
+
query: any;
|
|
25211
|
+
} & {
|
|
25212
|
+
[key: string]: any;
|
|
25213
|
+
};
|
|
25214
|
+
type QueryFilter$9 = {
|
|
25215
|
+
query: any;
|
|
25216
|
+
} & {
|
|
25217
|
+
[key: string]: any;
|
|
25218
|
+
};
|
|
25219
|
+
type Query$9 = {
|
|
25220
|
+
boolQuery?: BoolQuery$8;
|
|
25221
|
+
filteredQuery?: FilteredQuery$9;
|
|
25222
|
+
matchAllQuery?: MatchAllQuery$9;
|
|
25223
|
+
nestedQuery?: NestedQuery$8;
|
|
25224
|
+
termQuery?: TermQuery$8;
|
|
25225
|
+
textQuery?: TextQuery$8;
|
|
25226
|
+
} & {
|
|
25227
|
+
[key: string]: any;
|
|
25228
|
+
};
|
|
25188
25229
|
type TermQuery$9 = {
|
|
25189
25230
|
fields: Array<string>;
|
|
25190
25231
|
operator: string;
|
|
@@ -25192,12 +25233,30 @@ type TermQuery$9 = {
|
|
|
25192
25233
|
} & {
|
|
25193
25234
|
[key: string]: any;
|
|
25194
25235
|
};
|
|
25236
|
+
type TermFilter$9 = {
|
|
25237
|
+
field: string;
|
|
25238
|
+
operator: string;
|
|
25239
|
+
values?: Array<any>;
|
|
25240
|
+
} & {
|
|
25241
|
+
[key: string]: any;
|
|
25242
|
+
};
|
|
25195
25243
|
type TextQuery$9 = {
|
|
25196
25244
|
fields: Array<string>;
|
|
25197
25245
|
searchPhrase: string;
|
|
25198
25246
|
} & {
|
|
25199
25247
|
[key: string]: any;
|
|
25200
25248
|
};
|
|
25249
|
+
type Range2Filter$9 = {
|
|
25250
|
+
filterMode?: string;
|
|
25251
|
+
fromField: string;
|
|
25252
|
+
fromInclusive?: boolean;
|
|
25253
|
+
fromValue?: any;
|
|
25254
|
+
toField: string;
|
|
25255
|
+
toInclusive?: boolean;
|
|
25256
|
+
toValue?: any;
|
|
25257
|
+
} & {
|
|
25258
|
+
[key: string]: any;
|
|
25259
|
+
};
|
|
25201
25260
|
type BoolQuery$9 = {
|
|
25202
25261
|
must?: Array<any>;
|
|
25203
25262
|
mustNot?: Array<any>;
|
|
@@ -25212,6 +25271,15 @@ type NestedQuery$9 = {
|
|
|
25212
25271
|
} & {
|
|
25213
25272
|
[key: string]: any;
|
|
25214
25273
|
};
|
|
25274
|
+
type Filter$9 = {
|
|
25275
|
+
boolFilter?: BoolFilter$9;
|
|
25276
|
+
queryFilter?: QueryFilter$9;
|
|
25277
|
+
range2Filter?: Range2Filter$9;
|
|
25278
|
+
rangeFilter?: RangeFilter$8;
|
|
25279
|
+
termFilter?: TermFilter$9;
|
|
25280
|
+
} & {
|
|
25281
|
+
[key: string]: any;
|
|
25282
|
+
};
|
|
25215
25283
|
type Sort$9 = {
|
|
25216
25284
|
field: string;
|
|
25217
25285
|
sortOrder?: string;
|
|
@@ -26403,6 +26471,753 @@ declare namespace ShopperSearchTypes {
|
|
|
26403
26471
|
}>, rawResponse?: T): Promise<T extends true ? Response : SuggestionResult>;
|
|
26404
26472
|
}
|
|
26405
26473
|
}
|
|
26474
|
+
type BoolFilter$10 = {
|
|
26475
|
+
filters?: Array<Filter$9>;
|
|
26476
|
+
operator: string;
|
|
26477
|
+
} & {
|
|
26478
|
+
[key: string]: any;
|
|
26479
|
+
};
|
|
26480
|
+
type MatchAllQuery$10 = {} & {
|
|
26481
|
+
[key: string]: any;
|
|
26482
|
+
};
|
|
26483
|
+
type FilteredQuery$10 = {
|
|
26484
|
+
filter: Filter$9;
|
|
26485
|
+
query: Query$9;
|
|
26486
|
+
} & {
|
|
26487
|
+
[key: string]: any;
|
|
26488
|
+
};
|
|
26489
|
+
type QueryFilter$10 = {
|
|
26490
|
+
query: Query$9;
|
|
26491
|
+
} & {
|
|
26492
|
+
[key: string]: any;
|
|
26493
|
+
};
|
|
26494
|
+
type Query$10 = {
|
|
26495
|
+
boolQuery?: BoolQuery$9;
|
|
26496
|
+
filteredQuery?: FilteredQuery$10;
|
|
26497
|
+
matchAllQuery?: MatchAllQuery$10;
|
|
26498
|
+
nestedQuery?: NestedQuery$9;
|
|
26499
|
+
termQuery?: TermQuery$9;
|
|
26500
|
+
textQuery?: TextQuery$9;
|
|
26501
|
+
} & {
|
|
26502
|
+
[key: string]: any;
|
|
26503
|
+
};
|
|
26504
|
+
type TermQuery$10 = {
|
|
26505
|
+
fields: Array<string>;
|
|
26506
|
+
operator: string;
|
|
26507
|
+
values?: Array<any>;
|
|
26508
|
+
} & {
|
|
26509
|
+
[key: string]: any;
|
|
26510
|
+
};
|
|
26511
|
+
type TermFilter$10 = {
|
|
26512
|
+
field: string;
|
|
26513
|
+
operator: string;
|
|
26514
|
+
values?: Array<any>;
|
|
26515
|
+
} & {
|
|
26516
|
+
[key: string]: any;
|
|
26517
|
+
};
|
|
26518
|
+
type TextQuery$10 = {
|
|
26519
|
+
fields: Array<string>;
|
|
26520
|
+
searchPhrase: string;
|
|
26521
|
+
} & {
|
|
26522
|
+
[key: string]: any;
|
|
26523
|
+
};
|
|
26524
|
+
type Range2Filter$10 = {
|
|
26525
|
+
filterMode?: string;
|
|
26526
|
+
fromField: string;
|
|
26527
|
+
fromInclusive?: boolean;
|
|
26528
|
+
fromValue?: any;
|
|
26529
|
+
toField: string;
|
|
26530
|
+
toInclusive?: boolean;
|
|
26531
|
+
toValue?: any;
|
|
26532
|
+
} & {
|
|
26533
|
+
[key: string]: any;
|
|
26534
|
+
};
|
|
26535
|
+
type BoolQuery$10 = {
|
|
26536
|
+
must?: Array<Query$10>;
|
|
26537
|
+
mustNot?: Array<Query$10>;
|
|
26538
|
+
should?: Array<Query$10>;
|
|
26539
|
+
} & {
|
|
26540
|
+
[key: string]: any;
|
|
26541
|
+
};
|
|
26542
|
+
type NestedQuery$10 = {
|
|
26543
|
+
path: string;
|
|
26544
|
+
query: Query$10;
|
|
26545
|
+
scoreMode?: string;
|
|
26546
|
+
} & {
|
|
26547
|
+
[key: string]: any;
|
|
26548
|
+
};
|
|
26549
|
+
type Filter$10 = {
|
|
26550
|
+
boolFilter?: BoolFilter$10;
|
|
26551
|
+
queryFilter?: QueryFilter$10;
|
|
26552
|
+
range2Filter?: Range2Filter$10;
|
|
26553
|
+
rangeFilter?: RangeFilter$9;
|
|
26554
|
+
termFilter?: TermFilter$10;
|
|
26555
|
+
} & {
|
|
26556
|
+
[key: string]: any;
|
|
26557
|
+
};
|
|
26558
|
+
type Sort$10 = {
|
|
26559
|
+
field: string;
|
|
26560
|
+
sortOrder?: string;
|
|
26561
|
+
} & {
|
|
26562
|
+
[key: string]: any;
|
|
26563
|
+
};
|
|
26564
|
+
type RangeFilter$10 = {
|
|
26565
|
+
field: string;
|
|
26566
|
+
from?: any;
|
|
26567
|
+
fromInclusive?: boolean;
|
|
26568
|
+
to?: any;
|
|
26569
|
+
toInclusive?: boolean;
|
|
26570
|
+
} & {
|
|
26571
|
+
[key: string]: any;
|
|
26572
|
+
};
|
|
26573
|
+
type L10nString$9 = {} & {
|
|
26574
|
+
[key: string]: any;
|
|
26575
|
+
};
|
|
26576
|
+
type PropertyValueDefinition$9 = {
|
|
26577
|
+
description: L10nString$9;
|
|
26578
|
+
displayValue: L10nString$9;
|
|
26579
|
+
id: string;
|
|
26580
|
+
position?: number;
|
|
26581
|
+
value: string;
|
|
26582
|
+
};
|
|
26583
|
+
type UrlMapping = {
|
|
26584
|
+
resourceType?: string;
|
|
26585
|
+
resourceSubType?: string;
|
|
26586
|
+
resourceId?: string;
|
|
26587
|
+
refinements?: {} & {
|
|
26588
|
+
[key: string]: any;
|
|
26589
|
+
};
|
|
26590
|
+
statusCode?: number;
|
|
26591
|
+
destinationUrl?: string;
|
|
26592
|
+
copySourceParams?: boolean;
|
|
26593
|
+
additionalUrlParams?: string;
|
|
26594
|
+
productCategoryId?: string;
|
|
26595
|
+
} & {
|
|
26596
|
+
[key: string]: any;
|
|
26597
|
+
};
|
|
26598
|
+
/**
|
|
26599
|
+
* All path parameters that are used by at least one ShopperSeo method.
|
|
26600
|
+
*/
|
|
26601
|
+
type ShopperSeoPathParameters = {
|
|
26602
|
+
organizationId?: string;
|
|
26603
|
+
};
|
|
26604
|
+
/**
|
|
26605
|
+
* All query parameters that are used by at least one ShopperSeo method.
|
|
26606
|
+
*/
|
|
26607
|
+
type ShopperSeoQueryParameters = {
|
|
26608
|
+
urlSegment?: string;
|
|
26609
|
+
siteId?: string;
|
|
26610
|
+
locale?: string;
|
|
26611
|
+
};
|
|
26612
|
+
/**
|
|
26613
|
+
* All parameters that are used by ShopperSeo.
|
|
26614
|
+
*/
|
|
26615
|
+
type ShopperSeoParameters = ShopperSeoPathParameters & BaseUriParameters & ShopperSeoQueryParameters;
|
|
26616
|
+
/**
|
|
26617
|
+
* [Shopper Seo](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-seo:Summary)
|
|
26618
|
+
* ==================================
|
|
26619
|
+
*
|
|
26620
|
+
* **<br />
|
|
26621
|
+
*
|
|
26622
|
+
* Simple example:
|
|
26623
|
+
*
|
|
26624
|
+
* ```typescript
|
|
26625
|
+
* import { ShopperSeo } from "commerce-sdk-isomorphic";
|
|
26626
|
+
*
|
|
26627
|
+
* const clientConfig = {
|
|
26628
|
+
* parameters: {
|
|
26629
|
+
* clientId: "XXXXXX",
|
|
26630
|
+
* organizationId: "XXXX",
|
|
26631
|
+
* shortCode: "XXX",
|
|
26632
|
+
* siteId: "XX"
|
|
26633
|
+
* }
|
|
26634
|
+
* };
|
|
26635
|
+
* const shopperSeoClient = new ShopperSeo(clientConfig);
|
|
26636
|
+
* ```
|
|
26637
|
+
*
|
|
26638
|
+
* <span style="font-size:.7em; display:block; text-align: right">
|
|
26639
|
+
* API Version: 1.0.5<br />
|
|
26640
|
+
* Last Updated: <br />
|
|
26641
|
+
* </span>
|
|
26642
|
+
|
|
26643
|
+
*
|
|
26644
|
+
|
|
26645
|
+
*/
|
|
26646
|
+
declare class ShopperSeo<ConfigParameters extends ShopperSeoParameters & Record<string, unknown>> {
|
|
26647
|
+
// baseUri is not required on ClientConfig, but we know that we provide one in the class constructor
|
|
26648
|
+
clientConfig: ClientConfig<ConfigParameters> & {
|
|
26649
|
+
baseUri: string;
|
|
26650
|
+
};
|
|
26651
|
+
static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}";
|
|
26652
|
+
constructor(config: ClientConfigInit<ConfigParameters>);
|
|
26653
|
+
/**
|
|
26654
|
+
* 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).
|
|
26655
|
+
*
|
|
26656
|
+
* If you would like to get a raw Response object use the other getUrlMapping function.
|
|
26657
|
+
*
|
|
26658
|
+
* @param options - An object containing the options for this method.
|
|
26659
|
+
* @param parameters - An object containing the parameters for this method.
|
|
26660
|
+
* @param organizationId - An identifier for the organization the request is being made by.
|
|
26661
|
+
* @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.
|
|
26662
|
+
* @param siteId -
|
|
26663
|
+
* @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.
|
|
26664
|
+
Below are some valid examples:
|
|
26665
|
+
- en-US
|
|
26666
|
+
- de-AT
|
|
26667
|
+
- de
|
|
26668
|
+
- default
|
|
26669
|
+
Please note that if no locale is specified, the default site locale will be used.
|
|
26670
|
+
* @param headers - An object literal of key value pairs of the headers to be
|
|
26671
|
+
* sent with this request.
|
|
26672
|
+
*
|
|
26673
|
+
* @returns A promise of type UrlMapping.
|
|
26674
|
+
*
|
|
26675
|
+
*/
|
|
26676
|
+
getUrlMapping(options?: RequireParametersUnlessAllAreOptional<{
|
|
26677
|
+
parameters?: CompositeParameters<{
|
|
26678
|
+
organizationId: string;
|
|
26679
|
+
urlSegment: string;
|
|
26680
|
+
siteId: string;
|
|
26681
|
+
locale?: string;
|
|
26682
|
+
} & {
|
|
26683
|
+
[key in `c_${string}`]: any;
|
|
26684
|
+
}, ConfigParameters>;
|
|
26685
|
+
headers?: {
|
|
26686
|
+
[key: string]: string;
|
|
26687
|
+
};
|
|
26688
|
+
}>): Promise<UrlMapping>;
|
|
26689
|
+
/**
|
|
26690
|
+
* 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).
|
|
26691
|
+
*
|
|
26692
|
+
* @param options - An object containing the options for this method.
|
|
26693
|
+
* @param parameters - An object containing the parameters for this method.
|
|
26694
|
+
* @param organizationId - An identifier for the organization the request is being made by.
|
|
26695
|
+
* @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.
|
|
26696
|
+
* @param siteId -
|
|
26697
|
+
* @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.
|
|
26698
|
+
Below are some valid examples:
|
|
26699
|
+
- en-US
|
|
26700
|
+
- de-AT
|
|
26701
|
+
- de
|
|
26702
|
+
- default
|
|
26703
|
+
Please note that if no locale is specified, the default site locale will be used.
|
|
26704
|
+
* @param headers - An object literal of key value pairs of the headers to be
|
|
26705
|
+
* sent with this request.
|
|
26706
|
+
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
26707
|
+
* @returns A promise of type Response if rawResponse is true, a promise of type UrlMapping otherwise.
|
|
26708
|
+
*
|
|
26709
|
+
*/
|
|
26710
|
+
getUrlMapping<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
26711
|
+
parameters?: CompositeParameters<{
|
|
26712
|
+
organizationId: string;
|
|
26713
|
+
urlSegment: string;
|
|
26714
|
+
siteId: string;
|
|
26715
|
+
locale?: string;
|
|
26716
|
+
} & {
|
|
26717
|
+
[key in `c_${string}`]: any;
|
|
26718
|
+
}, ConfigParameters>;
|
|
26719
|
+
headers?: {
|
|
26720
|
+
[key: string]: string;
|
|
26721
|
+
};
|
|
26722
|
+
}>, rawResponse?: T): Promise<T extends true ? Response : UrlMapping>;
|
|
26723
|
+
}
|
|
26724
|
+
declare namespace ShopperSeoTypes {
|
|
26725
|
+
/*
|
|
26726
|
+
* Copyright (c) 2023, Salesforce, Inc.
|
|
26727
|
+
* All rights reserved.
|
|
26728
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
26729
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
26730
|
+
*/
|
|
26731
|
+
/**
|
|
26732
|
+
* Makes a type easier to read.
|
|
26733
|
+
*/
|
|
26734
|
+
type Prettify<T> = NonNullable<{
|
|
26735
|
+
[K in keyof T]: T[K];
|
|
26736
|
+
}>;
|
|
26737
|
+
/**
|
|
26738
|
+
* Generates the types required on a method, based on those provided in the config.
|
|
26739
|
+
*/
|
|
26740
|
+
type CompositeParameters<MethodParameters extends Record<string, unknown>, ConfigParameters extends Record<string, unknown>> = Prettify<Omit<MethodParameters, keyof ConfigParameters> & Partial<MethodParameters>>;
|
|
26741
|
+
/**
|
|
26742
|
+
* If an object has a `parameters` property, and the `parameters` object has required properties,
|
|
26743
|
+
* then the `parameters` property on the root object is marked as required.
|
|
26744
|
+
*/
|
|
26745
|
+
type RequireParametersUnlessAllAreOptional<T extends {
|
|
26746
|
+
parameters?: Record<string, unknown>;
|
|
26747
|
+
}> = Record<string, never> extends NonNullable<T["parameters"]> ? T : Prettify<T & Required<Pick<T, "parameters">>>;
|
|
26748
|
+
/**
|
|
26749
|
+
* Template parameters used in the base URI of all API endpoints. `version` will default to `"v1"`
|
|
26750
|
+
* if not specified.
|
|
26751
|
+
*/
|
|
26752
|
+
interface BaseUriParameters {
|
|
26753
|
+
shortCode: string;
|
|
26754
|
+
version?: string; // Optional, will default to "v1" if not provided.
|
|
26755
|
+
}
|
|
26756
|
+
/**
|
|
26757
|
+
* Generic interface for path parameters.
|
|
26758
|
+
*/
|
|
26759
|
+
interface PathParameters {
|
|
26760
|
+
[key: string]: string | number | boolean;
|
|
26761
|
+
}
|
|
26762
|
+
/**
|
|
26763
|
+
* Generic interface for query parameters.
|
|
26764
|
+
*/
|
|
26765
|
+
interface QueryParameters {
|
|
26766
|
+
[key: string]: string | number | boolean | string[] | number[];
|
|
26767
|
+
}
|
|
26768
|
+
/**
|
|
26769
|
+
* Generic interface for all parameter types.
|
|
26770
|
+
*/
|
|
26771
|
+
type UrlParameters = PathParameters | QueryParameters;
|
|
26772
|
+
/**
|
|
26773
|
+
* Alias for `RequestInit` from TypeScript's DOM lib, to more clearly differentiate
|
|
26774
|
+
* it from the `RequestInit` provided by node-fetch.
|
|
26775
|
+
*/
|
|
26776
|
+
type BrowserRequestInit = RequestInit;
|
|
26777
|
+
/**
|
|
26778
|
+
* Any properties supported in either the browser or node are accepted.
|
|
26779
|
+
* Using the right properties in the right context is left to the user.
|
|
26780
|
+
*/
|
|
26781
|
+
type FetchOptions = NodeRequestInit & BrowserRequestInit;
|
|
26782
|
+
/**
|
|
26783
|
+
* Base options that can be passed to the `ClientConfig` class.
|
|
26784
|
+
*/
|
|
26785
|
+
interface ClientConfigInit<Params extends BaseUriParameters> {
|
|
26786
|
+
baseUri?: string;
|
|
26787
|
+
proxy?: string;
|
|
26788
|
+
headers?: {
|
|
26789
|
+
[key: string]: string;
|
|
26790
|
+
};
|
|
26791
|
+
parameters: Params;
|
|
26792
|
+
fetchOptions?: FetchOptions;
|
|
26793
|
+
transformRequest?: (data: unknown, headers: {
|
|
26794
|
+
[key: string]: string;
|
|
26795
|
+
}) => Required<FetchOptions>["body"];
|
|
26796
|
+
throwOnBadResponse?: boolean;
|
|
26797
|
+
}
|
|
26798
|
+
type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
|
|
26799
|
+
/**
|
|
26800
|
+
* Configuration parameters common to Commerce SDK clients
|
|
26801
|
+
*/
|
|
26802
|
+
class ClientConfig<Params extends BaseUriParameters> implements ClientConfigInit<Params> {
|
|
26803
|
+
baseUri?: string;
|
|
26804
|
+
proxy?: string;
|
|
26805
|
+
headers: {
|
|
26806
|
+
[key: string]: string;
|
|
26807
|
+
};
|
|
26808
|
+
parameters: Params;
|
|
26809
|
+
fetchOptions: FetchOptions;
|
|
26810
|
+
transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
|
|
26811
|
+
throwOnBadResponse: boolean;
|
|
26812
|
+
constructor(config: ClientConfigInit<Params>);
|
|
26813
|
+
static readonly defaults: Pick<Required<ClientConfigInit<never>>, "transformRequest">;
|
|
26814
|
+
}
|
|
26815
|
+
type Money = {
|
|
26816
|
+
currencyMnemonic?: string;
|
|
26817
|
+
value?: number;
|
|
26818
|
+
} & {
|
|
26819
|
+
[key: string]: any;
|
|
26820
|
+
};
|
|
26821
|
+
type SimpleSearchResult = {
|
|
26822
|
+
limit: number;
|
|
26823
|
+
hits?: Array<object>;
|
|
26824
|
+
offset: any;
|
|
26825
|
+
total: any;
|
|
26826
|
+
} & {
|
|
26827
|
+
[key: string]: any;
|
|
26828
|
+
};
|
|
26829
|
+
type SearchRequest = {
|
|
26830
|
+
limit?: number;
|
|
26831
|
+
query: Query$10;
|
|
26832
|
+
sorts?: Array<Sort$10>;
|
|
26833
|
+
offset?: any;
|
|
26834
|
+
} & {
|
|
26835
|
+
[key: string]: any;
|
|
26836
|
+
};
|
|
26837
|
+
type PropertyDefinition = {
|
|
26838
|
+
defaultValue?: PropertyValueDefinition$9;
|
|
26839
|
+
id?: string;
|
|
26840
|
+
name: L10nString$9;
|
|
26841
|
+
description: L10nString$9;
|
|
26842
|
+
key?: boolean;
|
|
26843
|
+
localizable?: boolean;
|
|
26844
|
+
mandatory?: boolean;
|
|
26845
|
+
max?: number;
|
|
26846
|
+
minLength?: number;
|
|
26847
|
+
min?: number;
|
|
26848
|
+
multiValueType?: boolean;
|
|
26849
|
+
regularExpression?: string;
|
|
26850
|
+
scale?: number;
|
|
26851
|
+
searchable?: boolean;
|
|
26852
|
+
siteSpecific?: boolean;
|
|
26853
|
+
system?: boolean;
|
|
26854
|
+
unit?: L10nString$9;
|
|
26855
|
+
possibleValues?: Array<PropertyValueDefinition$9>;
|
|
26856
|
+
type: string;
|
|
26857
|
+
visible?: boolean;
|
|
26858
|
+
} & {
|
|
26859
|
+
[key: string]: any;
|
|
26860
|
+
};
|
|
26861
|
+
type LocalizedString = {} & {
|
|
26862
|
+
[key: string]: any;
|
|
26863
|
+
};
|
|
26864
|
+
type PaginatedSearchResult = {
|
|
26865
|
+
query: Query$10;
|
|
26866
|
+
sorts?: Array<Sort$10>;
|
|
26867
|
+
limit: number;
|
|
26868
|
+
hits?: Array<object>;
|
|
26869
|
+
offset: any;
|
|
26870
|
+
total: any;
|
|
26871
|
+
} & {
|
|
26872
|
+
[key: string]: any;
|
|
26873
|
+
};
|
|
26874
|
+
type ClosedObject = {} & {
|
|
26875
|
+
[key: string]: any;
|
|
26876
|
+
};
|
|
26877
|
+
type OpenObject = {} & {
|
|
26878
|
+
[key: string]: any;
|
|
26879
|
+
};
|
|
26880
|
+
type NoPropertiesAllowed = {};
|
|
26881
|
+
type SpecifiedPropertiesAllowed = {} & {
|
|
26882
|
+
[key: string]: any;
|
|
26883
|
+
};
|
|
26884
|
+
type BoolFilter = {
|
|
26885
|
+
filters?: Array<Filter$10>;
|
|
26886
|
+
operator: string;
|
|
26887
|
+
} & {
|
|
26888
|
+
[key: string]: any;
|
|
26889
|
+
};
|
|
26890
|
+
type PaginatedSearchResultBase = {
|
|
26891
|
+
query: Query$10;
|
|
26892
|
+
sorts?: Array<Sort$10>;
|
|
26893
|
+
limit: number;
|
|
26894
|
+
hits?: Array<object>;
|
|
26895
|
+
offset: any;
|
|
26896
|
+
total: any;
|
|
26897
|
+
} & {
|
|
26898
|
+
[key: string]: any;
|
|
26899
|
+
};
|
|
26900
|
+
type MatchAllQuery = {} & {
|
|
26901
|
+
[key: string]: any;
|
|
26902
|
+
};
|
|
26903
|
+
type FilteredQuery = {
|
|
26904
|
+
filter: Filter$10;
|
|
26905
|
+
query: Query$10;
|
|
26906
|
+
} & {
|
|
26907
|
+
[key: string]: any;
|
|
26908
|
+
};
|
|
26909
|
+
type QueryFilter = {
|
|
26910
|
+
query: Query$10;
|
|
26911
|
+
} & {
|
|
26912
|
+
[key: string]: any;
|
|
26913
|
+
};
|
|
26914
|
+
type Query = {
|
|
26915
|
+
boolQuery?: BoolQuery$10;
|
|
26916
|
+
filteredQuery?: FilteredQuery;
|
|
26917
|
+
matchAllQuery?: MatchAllQuery;
|
|
26918
|
+
nestedQuery?: NestedQuery$10;
|
|
26919
|
+
termQuery?: TermQuery$10;
|
|
26920
|
+
textQuery?: TextQuery$10;
|
|
26921
|
+
} & {
|
|
26922
|
+
[key: string]: any;
|
|
26923
|
+
};
|
|
26924
|
+
type TermQuery = {
|
|
26925
|
+
fields: Array<string>;
|
|
26926
|
+
operator: string;
|
|
26927
|
+
values?: Array<any>;
|
|
26928
|
+
} & {
|
|
26929
|
+
[key: string]: any;
|
|
26930
|
+
};
|
|
26931
|
+
type TermFilter = {
|
|
26932
|
+
field: string;
|
|
26933
|
+
operator: string;
|
|
26934
|
+
values?: Array<any>;
|
|
26935
|
+
} & {
|
|
26936
|
+
[key: string]: any;
|
|
26937
|
+
};
|
|
26938
|
+
type TextQuery = {
|
|
26939
|
+
fields: Array<string>;
|
|
26940
|
+
searchPhrase: string;
|
|
26941
|
+
} & {
|
|
26942
|
+
[key: string]: any;
|
|
26943
|
+
};
|
|
26944
|
+
type Range2Filter = {
|
|
26945
|
+
filterMode?: string;
|
|
26946
|
+
fromField: string;
|
|
26947
|
+
fromInclusive?: boolean;
|
|
26948
|
+
fromValue?: any;
|
|
26949
|
+
toField: string;
|
|
26950
|
+
toInclusive?: boolean;
|
|
26951
|
+
toValue?: any;
|
|
26952
|
+
} & {
|
|
26953
|
+
[key: string]: any;
|
|
26954
|
+
};
|
|
26955
|
+
type BoolQuery = {
|
|
26956
|
+
must?: Array<Query>;
|
|
26957
|
+
mustNot?: Array<Query>;
|
|
26958
|
+
should?: Array<Query>;
|
|
26959
|
+
} & {
|
|
26960
|
+
[key: string]: any;
|
|
26961
|
+
};
|
|
26962
|
+
type SimpleSearchResultBase = {
|
|
26963
|
+
limit: number;
|
|
26964
|
+
hits?: Array<object>;
|
|
26965
|
+
offset: any;
|
|
26966
|
+
total: any;
|
|
26967
|
+
} & {
|
|
26968
|
+
[key: string]: any;
|
|
26969
|
+
};
|
|
26970
|
+
type NestedQuery = {
|
|
26971
|
+
path: string;
|
|
26972
|
+
query: Query;
|
|
26973
|
+
scoreMode?: string;
|
|
26974
|
+
} & {
|
|
26975
|
+
[key: string]: any;
|
|
26976
|
+
};
|
|
26977
|
+
type Filter = {
|
|
26978
|
+
boolFilter?: BoolFilter;
|
|
26979
|
+
queryFilter?: QueryFilter;
|
|
26980
|
+
range2Filter?: Range2Filter;
|
|
26981
|
+
rangeFilter?: RangeFilter$10;
|
|
26982
|
+
termFilter?: TermFilter;
|
|
26983
|
+
} & {
|
|
26984
|
+
[key: string]: any;
|
|
26985
|
+
};
|
|
26986
|
+
type Sort = {
|
|
26987
|
+
field: string;
|
|
26988
|
+
sortOrder?: string;
|
|
26989
|
+
} & {
|
|
26990
|
+
[key: string]: any;
|
|
26991
|
+
};
|
|
26992
|
+
type RangeFilter = {
|
|
26993
|
+
field: string;
|
|
26994
|
+
from?: any;
|
|
26995
|
+
fromInclusive?: boolean;
|
|
26996
|
+
to?: any;
|
|
26997
|
+
toInclusive?: boolean;
|
|
26998
|
+
} & {
|
|
26999
|
+
[key: string]: any;
|
|
27000
|
+
};
|
|
27001
|
+
type SearchRequestBase = {
|
|
27002
|
+
limit?: number;
|
|
27003
|
+
query: Query;
|
|
27004
|
+
sorts?: Array<Sort>;
|
|
27005
|
+
offset?: any;
|
|
27006
|
+
} & {
|
|
27007
|
+
[key: string]: any;
|
|
27008
|
+
};
|
|
27009
|
+
type MoneyMnemonic = {
|
|
27010
|
+
currencyMnemonic?: string;
|
|
27011
|
+
value?: number;
|
|
27012
|
+
} & {
|
|
27013
|
+
[key: string]: any;
|
|
27014
|
+
};
|
|
27015
|
+
type L10nString = {} & {
|
|
27016
|
+
[key: string]: any;
|
|
27017
|
+
};
|
|
27018
|
+
type AttributeDefinition = {
|
|
27019
|
+
defaultValue?: PropertyValueDefinition$9;
|
|
27020
|
+
id?: string;
|
|
27021
|
+
name: L10nString;
|
|
27022
|
+
description: L10nString;
|
|
27023
|
+
key?: boolean;
|
|
27024
|
+
localizable?: boolean;
|
|
27025
|
+
mandatory?: boolean;
|
|
27026
|
+
max?: number;
|
|
27027
|
+
minLength?: number;
|
|
27028
|
+
min?: number;
|
|
27029
|
+
multiValueType?: boolean;
|
|
27030
|
+
regularExpression?: string;
|
|
27031
|
+
scale?: number;
|
|
27032
|
+
searchable?: boolean;
|
|
27033
|
+
siteSpecific?: boolean;
|
|
27034
|
+
system?: boolean;
|
|
27035
|
+
unit?: L10nString;
|
|
27036
|
+
possibleValues?: Array<PropertyValueDefinition$9>;
|
|
27037
|
+
type: string;
|
|
27038
|
+
visible?: boolean;
|
|
27039
|
+
};
|
|
27040
|
+
type PropertyValueDefinition = {
|
|
27041
|
+
description: L10nString;
|
|
27042
|
+
displayValue: L10nString;
|
|
27043
|
+
id: string;
|
|
27044
|
+
position?: number;
|
|
27045
|
+
value: string;
|
|
27046
|
+
};
|
|
27047
|
+
type UrlMapping = {
|
|
27048
|
+
resourceType?: string;
|
|
27049
|
+
resourceSubType?: string;
|
|
27050
|
+
resourceId?: string;
|
|
27051
|
+
refinements?: {} & {
|
|
27052
|
+
[key: string]: any;
|
|
27053
|
+
};
|
|
27054
|
+
statusCode?: number;
|
|
27055
|
+
destinationUrl?: string;
|
|
27056
|
+
copySourceParams?: boolean;
|
|
27057
|
+
additionalUrlParams?: string;
|
|
27058
|
+
productCategoryId?: string;
|
|
27059
|
+
} & {
|
|
27060
|
+
[key: string]: any;
|
|
27061
|
+
};
|
|
27062
|
+
type ErrorResponse = {
|
|
27063
|
+
type: string;
|
|
27064
|
+
title?: string;
|
|
27065
|
+
detail?: string;
|
|
27066
|
+
instance?: string;
|
|
27067
|
+
} & {
|
|
27068
|
+
[key: string]: any;
|
|
27069
|
+
};
|
|
27070
|
+
type ChangeControlled = {
|
|
27071
|
+
creationDate?: any;
|
|
27072
|
+
modificationDate?: any;
|
|
27073
|
+
createdBy?: string;
|
|
27074
|
+
lastModifiedBy?: string;
|
|
27075
|
+
} & {
|
|
27076
|
+
[key: string]: any;
|
|
27077
|
+
};
|
|
27078
|
+
type ChangeControlledDataType = {
|
|
27079
|
+
creationDate?: any;
|
|
27080
|
+
modificationDate?: any;
|
|
27081
|
+
createdBy?: string;
|
|
27082
|
+
lastModifiedBy?: string;
|
|
27083
|
+
} & {
|
|
27084
|
+
[key: string]: any;
|
|
27085
|
+
};
|
|
27086
|
+
type Error = {
|
|
27087
|
+
type: string;
|
|
27088
|
+
title?: string;
|
|
27089
|
+
detail?: string;
|
|
27090
|
+
instance?: string;
|
|
27091
|
+
} & {
|
|
27092
|
+
[key: string]: any;
|
|
27093
|
+
};
|
|
27094
|
+
/**
|
|
27095
|
+
* All path parameters that are used by at least one ShopperSeo method.
|
|
27096
|
+
*/
|
|
27097
|
+
type ShopperSeoPathParameters = {
|
|
27098
|
+
organizationId?: string;
|
|
27099
|
+
};
|
|
27100
|
+
/**
|
|
27101
|
+
* All query parameters that are used by at least one ShopperSeo method.
|
|
27102
|
+
*/
|
|
27103
|
+
type ShopperSeoQueryParameters = {
|
|
27104
|
+
urlSegment?: string;
|
|
27105
|
+
siteId?: string;
|
|
27106
|
+
locale?: string;
|
|
27107
|
+
};
|
|
27108
|
+
/**
|
|
27109
|
+
* All parameters that are used by ShopperSeo.
|
|
27110
|
+
*/
|
|
27111
|
+
type ShopperSeoParameters = ShopperSeoPathParameters & BaseUriParameters & ShopperSeoQueryParameters;
|
|
27112
|
+
/**
|
|
27113
|
+
* [Shopper Seo](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-seo:Summary)
|
|
27114
|
+
* ==================================
|
|
27115
|
+
*
|
|
27116
|
+
* **<br />
|
|
27117
|
+
*
|
|
27118
|
+
* Simple example:
|
|
27119
|
+
*
|
|
27120
|
+
* ```typescript
|
|
27121
|
+
* import { ShopperSeo } from "commerce-sdk-isomorphic";
|
|
27122
|
+
*
|
|
27123
|
+
* const clientConfig = {
|
|
27124
|
+
* parameters: {
|
|
27125
|
+
* clientId: "XXXXXX",
|
|
27126
|
+
* organizationId: "XXXX",
|
|
27127
|
+
* shortCode: "XXX",
|
|
27128
|
+
* siteId: "XX"
|
|
27129
|
+
* }
|
|
27130
|
+
* };
|
|
27131
|
+
* const shopperSeoClient = new ShopperSeo(clientConfig);
|
|
27132
|
+
* ```
|
|
27133
|
+
*
|
|
27134
|
+
* <span style="font-size:.7em; display:block; text-align: right">
|
|
27135
|
+
* API Version: 1.0.5<br />
|
|
27136
|
+
* Last Updated: <br />
|
|
27137
|
+
* </span>
|
|
27138
|
+
|
|
27139
|
+
*
|
|
27140
|
+
|
|
27141
|
+
*/
|
|
27142
|
+
class ShopperSeo<ConfigParameters extends ShopperSeoParameters & Record<string, unknown>> {
|
|
27143
|
+
// baseUri is not required on ClientConfig, but we know that we provide one in the class constructor
|
|
27144
|
+
clientConfig: ClientConfig<ConfigParameters> & {
|
|
27145
|
+
baseUri: string;
|
|
27146
|
+
};
|
|
27147
|
+
static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}";
|
|
27148
|
+
constructor(config: ClientConfigInit<ConfigParameters>);
|
|
27149
|
+
/**
|
|
27150
|
+
* 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).
|
|
27151
|
+
*
|
|
27152
|
+
* If you would like to get a raw Response object use the other getUrlMapping function.
|
|
27153
|
+
*
|
|
27154
|
+
* @param options - An object containing the options for this method.
|
|
27155
|
+
* @param parameters - An object containing the parameters for this method.
|
|
27156
|
+
* @param organizationId - An identifier for the organization the request is being made by.
|
|
27157
|
+
* @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.
|
|
27158
|
+
* @param siteId -
|
|
27159
|
+
* @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.
|
|
27160
|
+
Below are some valid examples:
|
|
27161
|
+
- en-US
|
|
27162
|
+
- de-AT
|
|
27163
|
+
- de
|
|
27164
|
+
- default
|
|
27165
|
+
Please note that if no locale is specified, the default site locale will be used.
|
|
27166
|
+
* @param headers - An object literal of key value pairs of the headers to be
|
|
27167
|
+
* sent with this request.
|
|
27168
|
+
*
|
|
27169
|
+
* @returns A promise of type UrlMapping.
|
|
27170
|
+
*
|
|
27171
|
+
*/
|
|
27172
|
+
getUrlMapping(options?: RequireParametersUnlessAllAreOptional<{
|
|
27173
|
+
parameters?: CompositeParameters<{
|
|
27174
|
+
organizationId: string;
|
|
27175
|
+
urlSegment: string;
|
|
27176
|
+
siteId: string;
|
|
27177
|
+
locale?: string;
|
|
27178
|
+
} & {
|
|
27179
|
+
[key in `c_${string}`]: any;
|
|
27180
|
+
}, ConfigParameters>;
|
|
27181
|
+
headers?: {
|
|
27182
|
+
[key: string]: string;
|
|
27183
|
+
};
|
|
27184
|
+
}>): Promise<UrlMapping>;
|
|
27185
|
+
/**
|
|
27186
|
+
* 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).
|
|
27187
|
+
*
|
|
27188
|
+
* @param options - An object containing the options for this method.
|
|
27189
|
+
* @param parameters - An object containing the parameters for this method.
|
|
27190
|
+
* @param organizationId - An identifier for the organization the request is being made by.
|
|
27191
|
+
* @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.
|
|
27192
|
+
* @param siteId -
|
|
27193
|
+
* @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.
|
|
27194
|
+
Below are some valid examples:
|
|
27195
|
+
- en-US
|
|
27196
|
+
- de-AT
|
|
27197
|
+
- de
|
|
27198
|
+
- default
|
|
27199
|
+
Please note that if no locale is specified, the default site locale will be used.
|
|
27200
|
+
* @param headers - An object literal of key value pairs of the headers to be
|
|
27201
|
+
* sent with this request.
|
|
27202
|
+
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
27203
|
+
* @returns A promise of type Response if rawResponse is true, a promise of type UrlMapping otherwise.
|
|
27204
|
+
*
|
|
27205
|
+
*/
|
|
27206
|
+
getUrlMapping<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
27207
|
+
parameters?: CompositeParameters<{
|
|
27208
|
+
organizationId: string;
|
|
27209
|
+
urlSegment: string;
|
|
27210
|
+
siteId: string;
|
|
27211
|
+
locale?: string;
|
|
27212
|
+
} & {
|
|
27213
|
+
[key in `c_${string}`]: any;
|
|
27214
|
+
}, ConfigParameters>;
|
|
27215
|
+
headers?: {
|
|
27216
|
+
[key: string]: string;
|
|
27217
|
+
};
|
|
27218
|
+
}>, rawResponse?: T): Promise<T extends true ? Response : UrlMapping>;
|
|
27219
|
+
}
|
|
27220
|
+
}
|
|
26406
27221
|
declare class TemplateURL extends URL {
|
|
26407
27222
|
/**
|
|
26408
27223
|
* @param url -
|
|
@@ -26562,6 +27377,7 @@ declare namespace helpers {
|
|
|
26562
27377
|
login_id: string;
|
|
26563
27378
|
idp_origin: string;
|
|
26564
27379
|
usid?: string;
|
|
27380
|
+
dnt?: string;
|
|
26565
27381
|
} & {
|
|
26566
27382
|
[key: string]: any;
|
|
26567
27383
|
};
|
|
@@ -26620,6 +27436,7 @@ declare namespace helpers {
|
|
|
26620
27436
|
client_id: string;
|
|
26621
27437
|
channel_id: string;
|
|
26622
27438
|
email_id?: string;
|
|
27439
|
+
dnt?: string;
|
|
26623
27440
|
} & {
|
|
26624
27441
|
[key: string]: any;
|
|
26625
27442
|
};
|
|
@@ -26658,6 +27475,7 @@ declare namespace helpers {
|
|
|
26658
27475
|
code_verifier?: string;
|
|
26659
27476
|
client_id?: string;
|
|
26660
27477
|
channel_id?: string;
|
|
27478
|
+
dnt?: string;
|
|
26661
27479
|
} & {
|
|
26662
27480
|
[key: string]: any;
|
|
26663
27481
|
};
|
|
@@ -26677,6 +27495,7 @@ declare namespace helpers {
|
|
|
26677
27495
|
login_id: string;
|
|
26678
27496
|
dwsgst?: string;
|
|
26679
27497
|
usid?: string;
|
|
27498
|
+
dnt?: string;
|
|
26680
27499
|
} & {
|
|
26681
27500
|
[key: string]: any;
|
|
26682
27501
|
};
|
|
@@ -26989,7 +27808,7 @@ declare namespace helpers {
|
|
|
26989
27808
|
* ```
|
|
26990
27809
|
*
|
|
26991
27810
|
* <span style="font-size:.7em; display:block; text-align: right">
|
|
26992
|
-
* API Version: 1.39.
|
|
27811
|
+
* API Version: 1.39.21<br />
|
|
26993
27812
|
* Last Updated: <br />
|
|
26994
27813
|
* </span>
|
|
26995
27814
|
|
|
@@ -28222,5 +29041,5 @@ declare namespace helpers {
|
|
|
28222
29041
|
refreshToken: string;
|
|
28223
29042
|
}): Promise<TokenResponse>;
|
|
28224
29043
|
}
|
|
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 };
|
|
29044
|
+
export { ShopperBaskets, ShopperContexts, ShopperCustomers, ShopperDiscoverySearch, ShopperExperience, ShopperGiftCertificates, ShopperLogin, ShopperOrders, ShopperProducts, ShopperPromotions, ShopperSearch, ShopperSeo, ClientConfig, TemplateURL, helpers };
|
|
29045
|
+
export type { ShopperBasketsTypes, ShopperContextsTypes, ShopperCustomersTypes, ShopperDiscoverySearchTypes, ShopperExperienceTypes, ShopperGiftCertificatesTypes, ShopperLoginTypes, ShopperOrdersTypes, ShopperProductsTypes, ShopperPromotionsTypes, ShopperSearchTypes, ShopperSeoTypes, ClientConfigInit };
|