commerce-sdk-isomorphic 4.0.1 → 4.2.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.
@@ -1384,6 +1384,7 @@ type removeShipmentFromBasketPathParameters = {
1384
1384
  type transferBasketQueryParameters = {
1385
1385
  siteId: string;
1386
1386
  overrideExisting?: boolean;
1387
+ merge?: boolean;
1387
1388
  locale?: LocaleCode$0;
1388
1389
  };
1389
1390
  type transferBasketPathParameters = {
@@ -1524,7 +1525,9 @@ type ShopperBasketsParameters = ShopperBasketsPathParameters & BaseUriParameters
1524
1525
  * [Shopper Baskets](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-baskets:Summary)
1525
1526
  * ==================================
1526
1527
  *
1527
- * *# API Overview
1528
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-baskets/shopper-baskets-oas-v1-public.yaml)
1529
+
1530
+ # API Overview
1528
1531
 
1529
1532
  Use the Shopper Baskets API to create a basket in the B2C Commerce system and populate it with all the data required to ready the basket for checkout.
1530
1533
 
@@ -1957,6 +1960,7 @@ declare class ShopperBaskets<ConfigParameters extends ShopperBasketsParameters &
1957
1960
  "siteId",
1958
1961
  "organizationId",
1959
1962
  "overrideExisting",
1963
+ "merge",
1960
1964
  "locale"
1961
1965
  ];
1962
1966
  readonly transferBasketRequired: readonly [
@@ -3066,7 +3070,9 @@ declare class ShopperBaskets<ConfigParameters extends ShopperBasketsParameters &
3066
3070
  };
3067
3071
  }>, rawResponse?: T): Promise<T extends true ? Response : Taxes>;
3068
3072
  /**
3069
- * Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
3073
+ * ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected.
3074
+
3075
+ Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
3070
3076
 
3071
3077
  The following information is merged:
3072
3078
  - custom attributes on the basket and on all copied records
@@ -3138,7 +3144,9 @@ declare class ShopperBaskets<ConfigParameters extends ShopperBasketsParameters &
3138
3144
  };
3139
3145
  }>): Promise<Basket>;
3140
3146
  /**
3141
- * Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
3147
+ * ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected.
3148
+
3149
+ Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
3142
3150
 
3143
3151
  The following information is merged:
3144
3152
  - custom attributes on the basket and on all copied records
@@ -3545,12 +3553,16 @@ declare class ShopperBaskets<ConfigParameters extends ShopperBasketsParameters &
3545
3553
  /**
3546
3554
  * Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token.
3547
3555
 
3548
- A success response contains the transferred basket.
3556
+ This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows:
3557
+ - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation.
3558
+ - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below.
3549
3559
 
3550
- If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options:
3560
+ If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed:
3551
3561
  - Keep the current shopper's active basket.
3552
- - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint.
3553
- - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
3562
+ - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint.
3563
+ - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
3564
+
3565
+ A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned.
3554
3566
  *
3555
3567
  * If you would like to get a raw Response object use the other transferBasket function.
3556
3568
  *
@@ -3561,6 +3573,31 @@ declare class ShopperBaskets<ConfigParameters extends ShopperBasketsParameters &
3561
3573
  * @param options.parameters.overrideExisting - If the current shopper has no active basket, this parameter is ignored. If the current shopper has an active basket, this parameter controls the behavior:
3562
3574
  - `false` (default): Return a BasketTransferException (HTTP status 409). The basket owner doesn't change.
3563
3575
  - `true`: Force the transfer by deleting the current shopper's active basket and making the current shopper the owner of the previous shopper's basket. Returns the transferred basket (HTTP status 200).
3576
+ * @param options.parameters.merge - This parameter controls the behavior:
3577
+ - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).
3578
+ - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.
3579
+
3580
+ The hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown
3581
+ in this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).
3582
+
3583
+ There are four possible use cases:
3584
+
3585
+ a) Guest basket and registered basket exist
3586
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
3587
+ dw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).
3588
+
3589
+ b) Guest basket exists but no registered basket exists
3590
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
3591
+ dw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).
3592
+
3593
+ c) No guest basket exists but a registered basket exists
3594
+ The registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null
3595
+ passed to the hook).
3596
+
3597
+ d) Neither basket exists
3598
+ The hook dw.order.mergeBasket is not called.
3599
+
3600
+ The API returns the current basket (after executing dw.order.mergeBasket).
3564
3601
  * @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
3565
3602
  * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
3566
3603
  *
@@ -3571,6 +3608,7 @@ declare class ShopperBaskets<ConfigParameters extends ShopperBasketsParameters &
3571
3608
  siteId: string;
3572
3609
  organizationId: string;
3573
3610
  overrideExisting?: boolean;
3611
+ merge?: boolean;
3574
3612
  locale?: LocaleCode$0;
3575
3613
  } & QueryParameters, ConfigParameters>;
3576
3614
  headers?: {
@@ -3580,12 +3618,16 @@ declare class ShopperBaskets<ConfigParameters extends ShopperBasketsParameters &
3580
3618
  /**
3581
3619
  * Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token.
3582
3620
 
3583
- A success response contains the transferred basket.
3621
+ This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows:
3622
+ - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation.
3623
+ - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below.
3584
3624
 
3585
- If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options:
3625
+ If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed:
3586
3626
  - Keep the current shopper's active basket.
3587
- - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint.
3588
- - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
3627
+ - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint.
3628
+ - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
3629
+
3630
+ A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned.
3589
3631
  *
3590
3632
  * @param options - An object containing the options for this method.
3591
3633
  * @param options.parameters - An object containing the parameters for this method.
@@ -3594,6 +3636,31 @@ declare class ShopperBaskets<ConfigParameters extends ShopperBasketsParameters &
3594
3636
  * @param options.parameters.overrideExisting - If the current shopper has no active basket, this parameter is ignored. If the current shopper has an active basket, this parameter controls the behavior:
3595
3637
  - `false` (default): Return a BasketTransferException (HTTP status 409). The basket owner doesn't change.
3596
3638
  - `true`: Force the transfer by deleting the current shopper's active basket and making the current shopper the owner of the previous shopper's basket. Returns the transferred basket (HTTP status 200).
3639
+ * @param options.parameters.merge - This parameter controls the behavior:
3640
+ - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).
3641
+ - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.
3642
+
3643
+ The hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown
3644
+ in this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).
3645
+
3646
+ There are four possible use cases:
3647
+
3648
+ a) Guest basket and registered basket exist
3649
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
3650
+ dw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).
3651
+
3652
+ b) Guest basket exists but no registered basket exists
3653
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
3654
+ dw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).
3655
+
3656
+ c) No guest basket exists but a registered basket exists
3657
+ The registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null
3658
+ passed to the hook).
3659
+
3660
+ d) Neither basket exists
3661
+ The hook dw.order.mergeBasket is not called.
3662
+
3663
+ The API returns the current basket (after executing dw.order.mergeBasket).
3597
3664
  * @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
3598
3665
  * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
3599
3666
  * @param rawResponse - Set to true to return entire Response object instead of DTO.
@@ -3605,6 +3672,7 @@ declare class ShopperBaskets<ConfigParameters extends ShopperBasketsParameters &
3605
3672
  siteId: string;
3606
3673
  organizationId: string;
3607
3674
  overrideExisting?: boolean;
3675
+ merge?: boolean;
3608
3676
  locale?: LocaleCode$0;
3609
3677
  } & QueryParameters, ConfigParameters>;
3610
3678
  headers?: {
@@ -5899,6 +5967,7 @@ declare namespace ShopperBasketsApiTypes {
5899
5967
  type transferBasketQueryParameters = {
5900
5968
  siteId: string;
5901
5969
  overrideExisting?: boolean;
5970
+ merge?: boolean;
5902
5971
  locale?: LocaleCode$0;
5903
5972
  };
5904
5973
  type transferBasketPathParameters = {
@@ -6039,7 +6108,9 @@ declare namespace ShopperBasketsApiTypes {
6039
6108
  * [Shopper Baskets](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-baskets:Summary)
6040
6109
  * ==================================
6041
6110
  *
6042
- * *# API Overview
6111
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-baskets/shopper-baskets-oas-v1-public.yaml)
6112
+
6113
+ # API Overview
6043
6114
 
6044
6115
  Use the Shopper Baskets API to create a basket in the B2C Commerce system and populate it with all the data required to ready the basket for checkout.
6045
6116
 
@@ -6472,6 +6543,7 @@ declare namespace ShopperBasketsApiTypes {
6472
6543
  "siteId",
6473
6544
  "organizationId",
6474
6545
  "overrideExisting",
6546
+ "merge",
6475
6547
  "locale"
6476
6548
  ];
6477
6549
  readonly transferBasketRequired: readonly [
@@ -7581,7 +7653,9 @@ declare namespace ShopperBasketsApiTypes {
7581
7653
  };
7582
7654
  }>, rawResponse?: T): Promise<T extends true ? Response : Taxes>;
7583
7655
  /**
7584
- * Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
7656
+ * ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected.
7657
+
7658
+ Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
7585
7659
 
7586
7660
  The following information is merged:
7587
7661
  - custom attributes on the basket and on all copied records
@@ -7653,7 +7727,9 @@ declare namespace ShopperBasketsApiTypes {
7653
7727
  };
7654
7728
  }>): Promise<Basket>;
7655
7729
  /**
7656
- * Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
7730
+ * ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected.
7731
+
7732
+ Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
7657
7733
 
7658
7734
  The following information is merged:
7659
7735
  - custom attributes on the basket and on all copied records
@@ -8060,12 +8136,16 @@ declare namespace ShopperBasketsApiTypes {
8060
8136
  /**
8061
8137
  * Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token.
8062
8138
 
8063
- A success response contains the transferred basket.
8139
+ This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows:
8140
+ - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation.
8141
+ - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below.
8064
8142
 
8065
- If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options:
8143
+ If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed:
8066
8144
  - Keep the current shopper's active basket.
8067
- - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint.
8068
- - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
8145
+ - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint.
8146
+ - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
8147
+
8148
+ A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned.
8069
8149
  *
8070
8150
  * If you would like to get a raw Response object use the other transferBasket function.
8071
8151
  *
@@ -8076,6 +8156,31 @@ declare namespace ShopperBasketsApiTypes {
8076
8156
  * @param options.parameters.overrideExisting - If the current shopper has no active basket, this parameter is ignored. If the current shopper has an active basket, this parameter controls the behavior:
8077
8157
  - `false` (default): Return a BasketTransferException (HTTP status 409). The basket owner doesn't change.
8078
8158
  - `true`: Force the transfer by deleting the current shopper's active basket and making the current shopper the owner of the previous shopper's basket. Returns the transferred basket (HTTP status 200).
8159
+ * @param options.parameters.merge - This parameter controls the behavior:
8160
+ - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).
8161
+ - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.
8162
+
8163
+ The hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown
8164
+ in this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).
8165
+
8166
+ There are four possible use cases:
8167
+
8168
+ a) Guest basket and registered basket exist
8169
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
8170
+ dw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).
8171
+
8172
+ b) Guest basket exists but no registered basket exists
8173
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
8174
+ dw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).
8175
+
8176
+ c) No guest basket exists but a registered basket exists
8177
+ The registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null
8178
+ passed to the hook).
8179
+
8180
+ d) Neither basket exists
8181
+ The hook dw.order.mergeBasket is not called.
8182
+
8183
+ The API returns the current basket (after executing dw.order.mergeBasket).
8079
8184
  * @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
8080
8185
  * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
8081
8186
  *
@@ -8086,6 +8191,7 @@ declare namespace ShopperBasketsApiTypes {
8086
8191
  siteId: string;
8087
8192
  organizationId: string;
8088
8193
  overrideExisting?: boolean;
8194
+ merge?: boolean;
8089
8195
  locale?: LocaleCode$0;
8090
8196
  } & QueryParameters, ConfigParameters>;
8091
8197
  headers?: {
@@ -8095,12 +8201,16 @@ declare namespace ShopperBasketsApiTypes {
8095
8201
  /**
8096
8202
  * Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token.
8097
8203
 
8098
- A success response contains the transferred basket.
8204
+ This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows:
8205
+ - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation.
8206
+ - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below.
8099
8207
 
8100
- If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options:
8208
+ If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed:
8101
8209
  - Keep the current shopper's active basket.
8102
- - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint.
8103
- - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
8210
+ - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint.
8211
+ - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
8212
+
8213
+ A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned.
8104
8214
  *
8105
8215
  * @param options - An object containing the options for this method.
8106
8216
  * @param options.parameters - An object containing the parameters for this method.
@@ -8109,6 +8219,31 @@ declare namespace ShopperBasketsApiTypes {
8109
8219
  * @param options.parameters.overrideExisting - If the current shopper has no active basket, this parameter is ignored. If the current shopper has an active basket, this parameter controls the behavior:
8110
8220
  - `false` (default): Return a BasketTransferException (HTTP status 409). The basket owner doesn't change.
8111
8221
  - `true`: Force the transfer by deleting the current shopper's active basket and making the current shopper the owner of the previous shopper's basket. Returns the transferred basket (HTTP status 200).
8222
+ * @param options.parameters.merge - This parameter controls the behavior:
8223
+ - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).
8224
+ - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.
8225
+
8226
+ The hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown
8227
+ in this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).
8228
+
8229
+ There are four possible use cases:
8230
+
8231
+ a) Guest basket and registered basket exist
8232
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
8233
+ dw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).
8234
+
8235
+ b) Guest basket exists but no registered basket exists
8236
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
8237
+ dw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).
8238
+
8239
+ c) No guest basket exists but a registered basket exists
8240
+ The registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null
8241
+ passed to the hook).
8242
+
8243
+ d) Neither basket exists
8244
+ The hook dw.order.mergeBasket is not called.
8245
+
8246
+ The API returns the current basket (after executing dw.order.mergeBasket).
8112
8247
  * @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
8113
8248
  * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
8114
8249
  * @param rawResponse - Set to true to return entire Response object instead of DTO.
@@ -8120,6 +8255,7 @@ declare namespace ShopperBasketsApiTypes {
8120
8255
  siteId: string;
8121
8256
  organizationId: string;
8122
8257
  overrideExisting?: boolean;
8258
+ merge?: boolean;
8123
8259
  locale?: LocaleCode$0;
8124
8260
  } & QueryParameters, ConfigParameters>;
8125
8261
  headers?: {
@@ -11541,6 +11677,7 @@ type removeShipmentFromBasketPathParameters$0 = {
11541
11677
  type transferBasketQueryParameters$0 = {
11542
11678
  siteId: string;
11543
11679
  overrideExisting?: boolean;
11680
+ merge?: boolean;
11544
11681
  locale?: LocaleCode$1;
11545
11682
  };
11546
11683
  type transferBasketPathParameters$0 = {
@@ -11681,7 +11818,9 @@ type ShopperBasketsParameters$0 = ShopperBasketsPathParameters$0 & BaseUriParame
11681
11818
  * [Shopper Baskets](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-baskets:Summary)
11682
11819
  * ==================================
11683
11820
  *
11684
- * *# API Overview
11821
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-baskets-v2/shopper-baskets-oas-v2-public.yaml)
11822
+
11823
+ # API Overview
11685
11824
 
11686
11825
  Shopper Baskets V2 provides all Shopper Basket V1 functionality and adds support for temporary baskets.
11687
11826
  Temporary baskets can perform calculations to generate totals, line items, promotions, and item availability without affecting the shopper’s storefront cart, and you can use those calculations for temporary basket checkout. You can also use a temporary basket for an immediate order request.
@@ -12129,6 +12268,7 @@ declare class ShopperBasketsV2<ConfigParameters extends ShopperBasketsParameters
12129
12268
  "siteId",
12130
12269
  "organizationId",
12131
12270
  "overrideExisting",
12271
+ "merge",
12132
12272
  "locale"
12133
12273
  ];
12134
12274
  readonly transferBasketRequired: readonly [
@@ -13244,7 +13384,9 @@ declare class ShopperBasketsV2<ConfigParameters extends ShopperBasketsParameters
13244
13384
  };
13245
13385
  }>, rawResponse?: T): Promise<T extends true ? Response : Taxes$0>;
13246
13386
  /**
13247
- * Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
13387
+ * ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected.
13388
+
13389
+ Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
13248
13390
 
13249
13391
  The following information is merged:
13250
13392
  - custom attributes on the basket and on all copied records
@@ -13316,7 +13458,9 @@ declare class ShopperBasketsV2<ConfigParameters extends ShopperBasketsParameters
13316
13458
  };
13317
13459
  }>): Promise<Basket$0>;
13318
13460
  /**
13319
- * Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
13461
+ * ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected.
13462
+
13463
+ Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
13320
13464
 
13321
13465
  The following information is merged:
13322
13466
  - custom attributes on the basket and on all copied records
@@ -13723,12 +13867,16 @@ declare class ShopperBasketsV2<ConfigParameters extends ShopperBasketsParameters
13723
13867
  /**
13724
13868
  * Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token.
13725
13869
 
13726
- A success response contains the transferred basket.
13870
+ This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows:
13871
+ - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation.
13872
+ - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below.
13727
13873
 
13728
- If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options:
13874
+ If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed:
13729
13875
  - Keep the current shopper's active basket.
13730
- - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint.
13731
- - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
13876
+ - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint.
13877
+ - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
13878
+
13879
+ A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned.
13732
13880
  *
13733
13881
  * If you would like to get a raw Response object use the other transferBasket function.
13734
13882
  *
@@ -13739,6 +13887,31 @@ declare class ShopperBasketsV2<ConfigParameters extends ShopperBasketsParameters
13739
13887
  * @param options.parameters.overrideExisting - If the current shopper has no active basket, this parameter is ignored. If the current shopper has an active basket, this parameter controls the behavior:
13740
13888
  - `false` (default): Return a BasketTransferException (HTTP status 409). The basket owner doesn't change.
13741
13889
  - `true`: Force the transfer by deleting the current shopper's active basket and making the current shopper the owner of the previous shopper's basket. Returns the transferred basket (HTTP status 200).
13890
+ * @param options.parameters.merge - This parameter controls the behavior:
13891
+ - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).
13892
+ - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.
13893
+
13894
+ The hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown
13895
+ in this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).
13896
+
13897
+ There are four possible use cases:
13898
+
13899
+ a) Guest basket and registered basket exist
13900
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
13901
+ dw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).
13902
+
13903
+ b) Guest basket exists but no registered basket exists
13904
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
13905
+ dw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).
13906
+
13907
+ c) No guest basket exists but a registered basket exists
13908
+ The registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null
13909
+ passed to the hook).
13910
+
13911
+ d) Neither basket exists
13912
+ The hook dw.order.mergeBasket is not called.
13913
+
13914
+ The API returns the current basket (after executing dw.order.mergeBasket).
13742
13915
  * @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
13743
13916
  * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
13744
13917
  *
@@ -13749,6 +13922,7 @@ declare class ShopperBasketsV2<ConfigParameters extends ShopperBasketsParameters
13749
13922
  siteId: string;
13750
13923
  organizationId: string;
13751
13924
  overrideExisting?: boolean;
13925
+ merge?: boolean;
13752
13926
  locale?: LocaleCode$1;
13753
13927
  } & QueryParameters, ConfigParameters>;
13754
13928
  headers?: {
@@ -13758,12 +13932,16 @@ declare class ShopperBasketsV2<ConfigParameters extends ShopperBasketsParameters
13758
13932
  /**
13759
13933
  * Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token.
13760
13934
 
13761
- A success response contains the transferred basket.
13935
+ This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows:
13936
+ - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation.
13937
+ - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below.
13762
13938
 
13763
- If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options:
13939
+ If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed:
13764
13940
  - Keep the current shopper's active basket.
13765
- - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint.
13766
- - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
13941
+ - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint.
13942
+ - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
13943
+
13944
+ A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned.
13767
13945
  *
13768
13946
  * @param options - An object containing the options for this method.
13769
13947
  * @param options.parameters - An object containing the parameters for this method.
@@ -13772,6 +13950,31 @@ declare class ShopperBasketsV2<ConfigParameters extends ShopperBasketsParameters
13772
13950
  * @param options.parameters.overrideExisting - If the current shopper has no active basket, this parameter is ignored. If the current shopper has an active basket, this parameter controls the behavior:
13773
13951
  - `false` (default): Return a BasketTransferException (HTTP status 409). The basket owner doesn't change.
13774
13952
  - `true`: Force the transfer by deleting the current shopper's active basket and making the current shopper the owner of the previous shopper's basket. Returns the transferred basket (HTTP status 200).
13953
+ * @param options.parameters.merge - This parameter controls the behavior:
13954
+ - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).
13955
+ - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.
13956
+
13957
+ The hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown
13958
+ in this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).
13959
+
13960
+ There are four possible use cases:
13961
+
13962
+ a) Guest basket and registered basket exist
13963
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
13964
+ dw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).
13965
+
13966
+ b) Guest basket exists but no registered basket exists
13967
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
13968
+ dw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).
13969
+
13970
+ c) No guest basket exists but a registered basket exists
13971
+ The registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null
13972
+ passed to the hook).
13973
+
13974
+ d) Neither basket exists
13975
+ The hook dw.order.mergeBasket is not called.
13976
+
13977
+ The API returns the current basket (after executing dw.order.mergeBasket).
13775
13978
  * @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
13776
13979
  * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
13777
13980
  * @param rawResponse - Set to true to return entire Response object instead of DTO.
@@ -13783,6 +13986,7 @@ declare class ShopperBasketsV2<ConfigParameters extends ShopperBasketsParameters
13783
13986
  siteId: string;
13784
13987
  organizationId: string;
13785
13988
  overrideExisting?: boolean;
13989
+ merge?: boolean;
13786
13990
  locale?: LocaleCode$1;
13787
13991
  } & QueryParameters, ConfigParameters>;
13788
13992
  headers?: {
@@ -16141,6 +16345,7 @@ declare namespace ShopperBasketsV2ApiTypes {
16141
16345
  type transferBasketQueryParameters = {
16142
16346
  siteId: string;
16143
16347
  overrideExisting?: boolean;
16348
+ merge?: boolean;
16144
16349
  locale?: LocaleCode$0;
16145
16350
  };
16146
16351
  type transferBasketPathParameters = {
@@ -16281,7 +16486,9 @@ declare namespace ShopperBasketsV2ApiTypes {
16281
16486
  * [Shopper Baskets](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-baskets:Summary)
16282
16487
  * ==================================
16283
16488
  *
16284
- * *# API Overview
16489
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-baskets-v2/shopper-baskets-oas-v2-public.yaml)
16490
+
16491
+ # API Overview
16285
16492
 
16286
16493
  Shopper Baskets V2 provides all Shopper Basket V1 functionality and adds support for temporary baskets.
16287
16494
  Temporary baskets can perform calculations to generate totals, line items, promotions, and item availability without affecting the shopper’s storefront cart, and you can use those calculations for temporary basket checkout. You can also use a temporary basket for an immediate order request.
@@ -16729,6 +16936,7 @@ declare namespace ShopperBasketsV2ApiTypes {
16729
16936
  "siteId",
16730
16937
  "organizationId",
16731
16938
  "overrideExisting",
16939
+ "merge",
16732
16940
  "locale"
16733
16941
  ];
16734
16942
  readonly transferBasketRequired: readonly [
@@ -17844,7 +18052,9 @@ declare namespace ShopperBasketsV2ApiTypes {
17844
18052
  };
17845
18053
  }>, rawResponse?: T): Promise<T extends true ? Response : Taxes>;
17846
18054
  /**
17847
- * Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
18055
+ * ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected.
18056
+
18057
+ Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
17848
18058
 
17849
18059
  The following information is merged:
17850
18060
  - custom attributes on the basket and on all copied records
@@ -17916,7 +18126,9 @@ declare namespace ShopperBasketsV2ApiTypes {
17916
18126
  };
17917
18127
  }>): Promise<Basket>;
17918
18128
  /**
17919
- * Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
18129
+ * ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected.
18130
+
18131
+ Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.
17920
18132
 
17921
18133
  The following information is merged:
17922
18134
  - custom attributes on the basket and on all copied records
@@ -18323,12 +18535,16 @@ declare namespace ShopperBasketsV2ApiTypes {
18323
18535
  /**
18324
18536
  * Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token.
18325
18537
 
18326
- A success response contains the transferred basket.
18538
+ This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows:
18539
+ - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation.
18540
+ - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below.
18327
18541
 
18328
- If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options:
18542
+ If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed:
18329
18543
  - Keep the current shopper's active basket.
18330
- - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint.
18331
- - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
18544
+ - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint.
18545
+ - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
18546
+
18547
+ A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned.
18332
18548
  *
18333
18549
  * If you would like to get a raw Response object use the other transferBasket function.
18334
18550
  *
@@ -18339,6 +18555,31 @@ declare namespace ShopperBasketsV2ApiTypes {
18339
18555
  * @param options.parameters.overrideExisting - If the current shopper has no active basket, this parameter is ignored. If the current shopper has an active basket, this parameter controls the behavior:
18340
18556
  - `false` (default): Return a BasketTransferException (HTTP status 409). The basket owner doesn't change.
18341
18557
  - `true`: Force the transfer by deleting the current shopper's active basket and making the current shopper the owner of the previous shopper's basket. Returns the transferred basket (HTTP status 200).
18558
+ * @param options.parameters.merge - This parameter controls the behavior:
18559
+ - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).
18560
+ - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.
18561
+
18562
+ The hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown
18563
+ in this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).
18564
+
18565
+ There are four possible use cases:
18566
+
18567
+ a) Guest basket and registered basket exist
18568
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
18569
+ dw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).
18570
+
18571
+ b) Guest basket exists but no registered basket exists
18572
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
18573
+ dw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).
18574
+
18575
+ c) No guest basket exists but a registered basket exists
18576
+ The registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null
18577
+ passed to the hook).
18578
+
18579
+ d) Neither basket exists
18580
+ The hook dw.order.mergeBasket is not called.
18581
+
18582
+ The API returns the current basket (after executing dw.order.mergeBasket).
18342
18583
  * @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
18343
18584
  * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
18344
18585
  *
@@ -18349,6 +18590,7 @@ declare namespace ShopperBasketsV2ApiTypes {
18349
18590
  siteId: string;
18350
18591
  organizationId: string;
18351
18592
  overrideExisting?: boolean;
18593
+ merge?: boolean;
18352
18594
  locale?: LocaleCode$0;
18353
18595
  } & QueryParameters, ConfigParameters>;
18354
18596
  headers?: {
@@ -18358,12 +18600,16 @@ declare namespace ShopperBasketsV2ApiTypes {
18358
18600
  /**
18359
18601
  * Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token.
18360
18602
 
18361
- A success response contains the transferred basket.
18603
+ This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows:
18604
+ - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation.
18605
+ - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below.
18362
18606
 
18363
- If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options:
18607
+ If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed:
18364
18608
  - Keep the current shopper's active basket.
18365
- - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint.
18366
- - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
18609
+ - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint.
18610
+ - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket.
18611
+
18612
+ A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned.
18367
18613
  *
18368
18614
  * @param options - An object containing the options for this method.
18369
18615
  * @param options.parameters - An object containing the parameters for this method.
@@ -18372,6 +18618,31 @@ declare namespace ShopperBasketsV2ApiTypes {
18372
18618
  * @param options.parameters.overrideExisting - If the current shopper has no active basket, this parameter is ignored. If the current shopper has an active basket, this parameter controls the behavior:
18373
18619
  - `false` (default): Return a BasketTransferException (HTTP status 409). The basket owner doesn't change.
18374
18620
  - `true`: Force the transfer by deleting the current shopper's active basket and making the current shopper the owner of the previous shopper's basket. Returns the transferred basket (HTTP status 200).
18621
+ * @param options.parameters.merge - This parameter controls the behavior:
18622
+ - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).
18623
+ - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.
18624
+
18625
+ The hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown
18626
+ in this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).
18627
+
18628
+ There are four possible use cases:
18629
+
18630
+ a) Guest basket and registered basket exist
18631
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
18632
+ dw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).
18633
+
18634
+ b) Guest basket exists but no registered basket exists
18635
+ The guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook
18636
+ dw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).
18637
+
18638
+ c) No guest basket exists but a registered basket exists
18639
+ The registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null
18640
+ passed to the hook).
18641
+
18642
+ d) Neither basket exists
18643
+ The hook dw.order.mergeBasket is not called.
18644
+
18645
+ The API returns the current basket (after executing dw.order.mergeBasket).
18375
18646
  * @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
18376
18647
  * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
18377
18648
  * @param rawResponse - Set to true to return entire Response object instead of DTO.
@@ -18383,6 +18654,7 @@ declare namespace ShopperBasketsV2ApiTypes {
18383
18654
  siteId: string;
18384
18655
  organizationId: string;
18385
18656
  overrideExisting?: boolean;
18657
+ merge?: boolean;
18386
18658
  locale?: LocaleCode$0;
18387
18659
  } & QueryParameters, ConfigParameters>;
18388
18660
  headers?: {
@@ -20570,6 +20842,824 @@ declare namespace ShopperBasketsV2Types {
20570
20842
  type TaxItems = ShopperBasketsV2ModelTypes.TaxItems;
20571
20843
  type Taxes = ShopperBasketsV2ModelTypes.Taxes;
20572
20844
  }
20845
+ /**
20846
+ * @type ModelConfiguration: Configuration object
20847
+ *
20848
+ * @property id: identifier
20849
+ * - **Max Length:** 255
20850
+ *
20851
+ * @property value: value for identifier
20852
+ * - **Max Length:** 255
20853
+ *
20854
+ * @property configurationType: type of configuration value
20855
+ * - **Max Length:** 255
20856
+ *
20857
+ */
20858
+ type ModelConfiguration = {
20859
+ id: string;
20860
+ value: any | null;
20861
+ configurationType?: string;
20862
+ } & {
20863
+ [key: string]: any;
20864
+ };
20865
+ /**
20866
+ * @type SiteConfiguration: Site Configuration object
20867
+ *
20868
+ * @property configurations: List configurations for the instance and site
20869
+ *
20870
+ */
20871
+ type SiteConfiguration = {
20872
+ configurations: Array<ModelConfiguration>;
20873
+ } & {
20874
+ [key: string]: any;
20875
+ };
20876
+ type getConfigurationsQueryParameters = {
20877
+ siteId: string;
20878
+ };
20879
+ type getConfigurationsPathParameters = {
20880
+ organizationId: string;
20881
+ };
20882
+ /**
20883
+ * All path parameters that are used by at least one ShopperConfigurations method.
20884
+ */
20885
+ type ShopperConfigurationsPathParameters = Partial<getConfigurationsPathParameters & {}>;
20886
+ /**
20887
+ * All query parameters that are used by at least one ShopperConfigurations method.
20888
+ */
20889
+ type ShopperConfigurationsQueryParameters = Partial<getConfigurationsQueryParameters & {}>;
20890
+ /**
20891
+ * All parameters that are used by ShopperConfigurations.
20892
+ */
20893
+ type ShopperConfigurationsParameters = ShopperConfigurationsPathParameters & BaseUriParameters & ShopperConfigurationsQueryParameters;
20894
+ /**
20895
+ * [Shopper Configurations](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-configurations:Summary)
20896
+ * ==================================
20897
+ *
20898
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-configurations/shopper-configurations-oas-v1-public.yaml)
20899
+
20900
+ # API Overview
20901
+ In commerce, there is a need to provide information to the shopper facing application to allow for making decisions on execution. This is highly cache-able data that rarely changes.
20902
+
20903
+ It encompasses toggles, preferences, and configuration that allow the application to be reactive to changes performed by the merchant, admin, or support engineer.
20904
+
20905
+ ## Use Cases
20906
+ 1. What is the site name and site status (online / offline)
20907
+ 2. What is the default and supported currencies
20908
+ 3. What is the default and supported locales
20909
+ 4. Which features are enabled
20910
+
20911
+ # Example
20912
+
20913
+ ```
20914
+ {
20915
+ "configurations":[
20916
+ {
20917
+ "configurationType":"siteConfiguration",
20918
+ "id":"id",
20919
+ "value":"TestWapi"
20920
+ },
20921
+ {
20922
+ "configurationType":"siteConfiguration",
20923
+ "id":"name",
20924
+ "value":"Test WAPI"
20925
+ },
20926
+ {
20927
+ "configurationType":"siteConfiguration",
20928
+ "id":"status",
20929
+ "value":"online"
20930
+ },
20931
+ {
20932
+ "configurationType":"siteConfiguration",
20933
+ "id":"timezone",
20934
+ "value":"Etc/UTC"
20935
+ },
20936
+ {
20937
+ "configurationType":"siteConfiguration",
20938
+ "id":"timezoneOffset",
20939
+ "value":0
20940
+ },
20941
+ {
20942
+ "configurationType":"siteConfiguration",
20943
+ "id":"defaultCurrency",
20944
+ "value":"USD"
20945
+ },
20946
+ {
20947
+ "configurationType":"siteConfiguration",
20948
+ "id":"allowedCurrencies",
20949
+ "value":[
20950
+ "USD",
20951
+ "EUR"
20952
+ ]
20953
+ },
20954
+ {
20955
+ "configurationType":"siteConfiguration",
20956
+ "id":"defaultLocale",
20957
+ "value":"default"
20958
+ },
20959
+ {
20960
+ "configurationType":"siteConfiguration",
20961
+ "id":"allowedLocales",
20962
+ "value":[
20963
+ {
20964
+ "country":"",
20965
+ "default":true,
20966
+ "displayCountry":"",
20967
+ "displayLanguage":"",
20968
+ "displayName":"default",
20969
+ "id":"default",
20970
+ "iso3Country":"",
20971
+ "iso3Language":"",
20972
+ "language":"",
20973
+ "name":"default"
20974
+ },
20975
+ {
20976
+ "country":"DE",
20977
+ "default":false,
20978
+ "displayCountry":"Deutschland",
20979
+ "displayLanguage":"Deutsch",
20980
+ "displayName":"Deutsch (Deutschland)",
20981
+ "id":"de-DE",
20982
+ "iso3Country":"DEU",
20983
+ "iso3Language":"deu",
20984
+ "language":"de",
20985
+ "name":"German (Germany)"
20986
+ },
20987
+ {
20988
+ "country":"",
20989
+ "default":false,
20990
+ "displayCountry":"",
20991
+ "displayLanguage":"Deutsch",
20992
+ "displayName":"Deutsch",
20993
+ "id":"de",
20994
+ "iso3Country":"",
20995
+ "iso3Language":"deu",
20996
+ "language":"de",
20997
+ "name":"German"
20998
+ },
20999
+ {
21000
+ "country":"US",
21001
+ "default":false,
21002
+ "displayCountry":"United States",
21003
+ "displayLanguage":"English",
21004
+ "displayName":"English (United States)",
21005
+ "id":"en-US",
21006
+ "iso3Country":"USA",
21007
+ "iso3Language":"eng",
21008
+ "language":"en",
21009
+ "name":"English (United States)"
21010
+ },
21011
+ {
21012
+ "country":"CA",
21013
+ "default":false,
21014
+ "displayCountry":"Canada",
21015
+ "displayLanguage":"English",
21016
+ "displayName":"English (Canada)",
21017
+ "id":"en-CA",
21018
+ "iso3Country":"CAN",
21019
+ "iso3Language":"eng",
21020
+ "language":"en",
21021
+ "name":"English (Canada)"
21022
+ },
21023
+ {
21024
+ "country":"",
21025
+ "default":false,
21026
+ "displayCountry":"",
21027
+ "displayLanguage":"English",
21028
+ "displayName":"English",
21029
+ "id":"en",
21030
+ "iso3Country":"",
21031
+ "iso3Language":"eng",
21032
+ "language":"en",
21033
+ "name":"English"
21034
+ },
21035
+ {
21036
+ "country":"",
21037
+ "default":false,
21038
+ "displayCountry":"",
21039
+ "displayLanguage":"español",
21040
+ "displayName":"español",
21041
+ "id":"es",
21042
+ "iso3Country":"",
21043
+ "iso3Language":"spa",
21044
+ "language":"es",
21045
+ "name":"Spanish"
21046
+ }
21047
+ ]
21048
+ },
21049
+ {
21050
+ "configurationType":"globalConfiguration",
21051
+ "id":"SalesforcePaymentsAllowed",
21052
+ "value":true
21053
+ },
21054
+ {
21055
+ "configurationType":"globalConfiguration",
21056
+ "id":"gcp",
21057
+ "value":"test-gcp-key"
21058
+ }
21059
+ ]
21060
+ }
21061
+ ```
21062
+
21063
+ ### Caching
21064
+
21065
+ Caching capabilities are available for the Shopper Configuration APIs. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)*<br />
21066
+ *
21067
+ * Simple example:
21068
+ *
21069
+ * ```typescript
21070
+ * import { ShopperConfigurations } from "commerce-sdk-isomorphic";
21071
+ *
21072
+ * const clientConfig = {
21073
+ * parameters: {
21074
+ * clientId: "XXXXXX",
21075
+ * organizationId: "XXXX",
21076
+ * shortCode: "XXX",
21077
+ * siteId: "XX"
21078
+ * }
21079
+ * };
21080
+ * const shopperConfigurationsClient = new ShopperConfigurations(clientConfig);
21081
+ * ```
21082
+ *
21083
+ * <span style="font-size:.7em; display:block; text-align: right">
21084
+ * API Version: 0.0.33<br />
21085
+ * Last Updated: <br />
21086
+ * </span>
21087
+ *
21088
+ *
21089
+ */
21090
+ declare class ShopperConfigurations<ConfigParameters extends ShopperConfigurationsParameters & Record<string, unknown>> {
21091
+ // baseUri is not required on ClientConfig, but we know that we provide one in the class constructor
21092
+ clientConfig: ClientConfig<ConfigParameters> & {
21093
+ baseUri: string;
21094
+ };
21095
+ static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/configuration/shopper-configurations/v1";
21096
+ static readonly apiPaths: {
21097
+ getConfigurations: string;
21098
+ };
21099
+ constructor(config: ClientConfigInit<ConfigParameters>);
21100
+ static readonly paramKeys: {
21101
+ readonly getConfigurations: readonly [
21102
+ "organizationId",
21103
+ "siteId"
21104
+ ];
21105
+ readonly getConfigurationsRequired: readonly [
21106
+ "organizationId",
21107
+ "siteId"
21108
+ ];
21109
+ };
21110
+ /**
21111
+ * Retrieves configurations for the specified organization and site.
21112
+ *
21113
+ * If you would like to get a raw Response object use the other getConfigurations function.
21114
+ *
21115
+ * @param options - An object containing the options for this method.
21116
+ * @param options.parameters - An object containing the parameters for this method.
21117
+ * @param options.parameters.organizationId - An identifier for the organization the request is being made by
21118
+ * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
21119
+ * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
21120
+ *
21121
+ * @returns A promise of type SiteConfiguration.
21122
+ */
21123
+ getConfigurations(options?: RequireParametersUnlessAllAreOptional<{
21124
+ parameters?: CompositeParameters<{
21125
+ organizationId: string;
21126
+ siteId: string;
21127
+ } & QueryParameters, ConfigParameters>;
21128
+ headers?: {
21129
+ [key: string]: string;
21130
+ };
21131
+ }>): Promise<SiteConfiguration>;
21132
+ /**
21133
+ * Retrieves configurations for the specified organization and site.
21134
+ *
21135
+ * @param options - An object containing the options for this method.
21136
+ * @param options.parameters - An object containing the parameters for this method.
21137
+ * @param options.parameters.organizationId - An identifier for the organization the request is being made by
21138
+ * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
21139
+ * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
21140
+ * @param rawResponse - Set to true to return entire Response object instead of DTO.
21141
+ *
21142
+ * @returns A promise of type Response if rawResponse is true, a promise of type SiteConfiguration otherwise.
21143
+ */
21144
+ getConfigurations<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
21145
+ parameters?: CompositeParameters<{
21146
+ organizationId: string;
21147
+ siteId: string;
21148
+ } & QueryParameters, ConfigParameters>;
21149
+ headers?: {
21150
+ [key: string]: string;
21151
+ };
21152
+ }>, rawResponse?: T): Promise<T extends true ? Response : SiteConfiguration>;
21153
+ }
21154
+ declare namespace ShopperConfigurationsApiTypes {
21155
+ /*
21156
+ * Copyright (c) 2023, Salesforce, Inc.
21157
+ * All rights reserved.
21158
+ * SPDX-License-Identifier: BSD-3-Clause
21159
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
21160
+ */
21161
+ /**
21162
+ * Makes a type easier to read.
21163
+ */
21164
+ type Prettify<T> = NonNullable<{
21165
+ [K in keyof T]: T[K];
21166
+ }>;
21167
+ /**
21168
+ * Generates the types required on a method, based on those provided in the config.
21169
+ */
21170
+ type CompositeParameters<MethodParameters extends Record<string, unknown>, ConfigParameters extends Record<string, unknown>> = Prettify<Omit<MethodParameters, keyof ConfigParameters> & Partial<MethodParameters>>;
21171
+ /**
21172
+ * If an object has a `parameters` property, and the `parameters` object has required properties,
21173
+ * then the `parameters` property on the root object is marked as required.
21174
+ */
21175
+ type RequireParametersUnlessAllAreOptional<T extends {
21176
+ parameters?: Record<string, unknown>;
21177
+ }> = Record<string, never> extends NonNullable<T["parameters"]> ? T : Prettify<T & Required<Pick<T, "parameters">>>;
21178
+ /**
21179
+ * Template parameters used in the base URI of all API endpoints. `version` will default to `"v1"`
21180
+ * if not specified.
21181
+ */
21182
+ interface BaseUriParameters {
21183
+ shortCode: string;
21184
+ }
21185
+ type LocaleCode = {
21186
+ [key: string]: any;
21187
+ };
21188
+ /**
21189
+ * Generic interface for path parameters.
21190
+ */
21191
+ interface PathParameters {
21192
+ [key: string]: string | number | boolean;
21193
+ }
21194
+ /**
21195
+ * Generic interface for query parameters.
21196
+ */
21197
+ interface QueryParameters {
21198
+ [key: string]: string | number | boolean | string[] | number[] | LocaleCode;
21199
+ }
21200
+ /**
21201
+ * Generic interface for all parameter types.
21202
+ */
21203
+ type UrlParameters = PathParameters | QueryParameters;
21204
+ /**
21205
+ * Custom query parameter type with any string prefixed with `c_` as the key and the allowed
21206
+ * types for query parameters for the value.
21207
+ */
21208
+ type CustomQueryParameters = {
21209
+ [key in `c_${string}`]: string | number | boolean | string[] | number[];
21210
+ };
21211
+ /**
21212
+ * Custom body request type with any string prefixed with `c_` as the key and the allowed
21213
+ * types for the value.
21214
+ */
21215
+ type CustomRequestBody = {
21216
+ [key in `c_${string}`]: string | number | boolean | string[] | number[] | {
21217
+ [key: string]: unknown;
21218
+ };
21219
+ };
21220
+ /**
21221
+ * Alias for `RequestInit` from TypeScript's DOM lib, to more clearly differentiate
21222
+ * it from the `RequestInit` provided by node-fetch.
21223
+ */
21224
+ type BrowserRequestInit = RequestInit;
21225
+ /**
21226
+ * Any properties supported in either the browser or node are accepted.
21227
+ * Using the right properties in the right context is left to the user.
21228
+ */
21229
+ type FetchOptions = NodeRequestInit & BrowserRequestInit;
21230
+ /**
21231
+ * Base options that can be passed to the `ClientConfig` class.
21232
+ */
21233
+ interface ClientConfigInit<Params extends BaseUriParameters> {
21234
+ baseUri?: string;
21235
+ proxy?: string;
21236
+ headers?: {
21237
+ [key: string]: string;
21238
+ };
21239
+ parameters: Params;
21240
+ fetchOptions?: FetchOptions;
21241
+ transformRequest?: (data: unknown, headers: {
21242
+ [key: string]: string;
21243
+ }) => Required<FetchOptions>["body"];
21244
+ throwOnBadResponse?: boolean;
21245
+ }
21246
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
21247
+ /**
21248
+ * Configuration parameters common to Commerce SDK clients
21249
+ */
21250
+ class ClientConfig<Params extends BaseUriParameters> implements ClientConfigInit<Params> {
21251
+ baseUri?: string;
21252
+ proxy?: string;
21253
+ headers: {
21254
+ [key: string]: string;
21255
+ };
21256
+ parameters: Params;
21257
+ fetchOptions: FetchOptions;
21258
+ transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
21259
+ throwOnBadResponse: boolean;
21260
+ constructor(config: ClientConfigInit<Params>);
21261
+ static readonly defaults: Pick<Required<ClientConfigInit<never>>, "transformRequest">;
21262
+ }
21263
+ /**
21264
+ * @type ErrorResponse:
21265
+ *
21266
+ * @property title: A short, human-readable summary of the problem type. It will not change from occurrence to occurrence of the problem, except for purposes of localization
21267
+ * - **Max Length:** 256
21268
+ *
21269
+ * @property type: A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be \"about:blank\". It accepts relative URIs; this means that they must be resolved relative to the document\'s base URI, as per [RFC3986], Section 5.
21270
+ * - **Max Length:** 2048
21271
+ *
21272
+ * @property detail: A human-readable explanation specific to this occurrence of the problem.
21273
+ *
21274
+ * @property instance: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. It accepts relative URIs; this means that they must be resolved relative to the document\'s base URI, as per [RFC3986], Section 5.
21275
+ * - **Max Length:** 2048
21276
+ *
21277
+ */
21278
+ type ErrorResponse = {
21279
+ title: string;
21280
+ type: string;
21281
+ detail: string;
21282
+ instance?: string;
21283
+ } & {
21284
+ [key: string]: any;
21285
+ };
21286
+ /**
21287
+ * @type ModelConfiguration: Configuration object
21288
+ *
21289
+ * @property id: identifier
21290
+ * - **Max Length:** 255
21291
+ *
21292
+ * @property value: value for identifier
21293
+ * - **Max Length:** 255
21294
+ *
21295
+ * @property configurationType: type of configuration value
21296
+ * - **Max Length:** 255
21297
+ *
21298
+ */
21299
+ type ModelConfiguration = {
21300
+ id: string;
21301
+ value: any | null;
21302
+ configurationType?: string;
21303
+ } & {
21304
+ [key: string]: any;
21305
+ };
21306
+ /**
21307
+ * @type SiteConfiguration: Site Configuration object
21308
+ *
21309
+ * @property configurations: List configurations for the instance and site
21310
+ *
21311
+ */
21312
+ type SiteConfiguration = {
21313
+ configurations: Array<ModelConfiguration>;
21314
+ } & {
21315
+ [key: string]: any;
21316
+ };
21317
+ type getConfigurationsQueryParameters = {
21318
+ siteId: string;
21319
+ };
21320
+ type getConfigurationsPathParameters = {
21321
+ organizationId: string;
21322
+ };
21323
+ /**
21324
+ * All path parameters that are used by at least one ShopperConfigurations method.
21325
+ */
21326
+ type ShopperConfigurationsPathParameters = Partial<getConfigurationsPathParameters & {}>;
21327
+ /**
21328
+ * All query parameters that are used by at least one ShopperConfigurations method.
21329
+ */
21330
+ type ShopperConfigurationsQueryParameters = Partial<getConfigurationsQueryParameters & {}>;
21331
+ /**
21332
+ * All parameters that are used by ShopperConfigurations.
21333
+ */
21334
+ type ShopperConfigurationsParameters = ShopperConfigurationsPathParameters & BaseUriParameters & ShopperConfigurationsQueryParameters;
21335
+ /**
21336
+ * [Shopper Configurations](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-configurations:Summary)
21337
+ * ==================================
21338
+ *
21339
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-configurations/shopper-configurations-oas-v1-public.yaml)
21340
+
21341
+ # API Overview
21342
+ In commerce, there is a need to provide information to the shopper facing application to allow for making decisions on execution. This is highly cache-able data that rarely changes.
21343
+
21344
+ It encompasses toggles, preferences, and configuration that allow the application to be reactive to changes performed by the merchant, admin, or support engineer.
21345
+
21346
+ ## Use Cases
21347
+ 1. What is the site name and site status (online / offline)
21348
+ 2. What is the default and supported currencies
21349
+ 3. What is the default and supported locales
21350
+ 4. Which features are enabled
21351
+
21352
+ # Example
21353
+
21354
+ ```
21355
+ {
21356
+ "configurations":[
21357
+ {
21358
+ "configurationType":"siteConfiguration",
21359
+ "id":"id",
21360
+ "value":"TestWapi"
21361
+ },
21362
+ {
21363
+ "configurationType":"siteConfiguration",
21364
+ "id":"name",
21365
+ "value":"Test WAPI"
21366
+ },
21367
+ {
21368
+ "configurationType":"siteConfiguration",
21369
+ "id":"status",
21370
+ "value":"online"
21371
+ },
21372
+ {
21373
+ "configurationType":"siteConfiguration",
21374
+ "id":"timezone",
21375
+ "value":"Etc/UTC"
21376
+ },
21377
+ {
21378
+ "configurationType":"siteConfiguration",
21379
+ "id":"timezoneOffset",
21380
+ "value":0
21381
+ },
21382
+ {
21383
+ "configurationType":"siteConfiguration",
21384
+ "id":"defaultCurrency",
21385
+ "value":"USD"
21386
+ },
21387
+ {
21388
+ "configurationType":"siteConfiguration",
21389
+ "id":"allowedCurrencies",
21390
+ "value":[
21391
+ "USD",
21392
+ "EUR"
21393
+ ]
21394
+ },
21395
+ {
21396
+ "configurationType":"siteConfiguration",
21397
+ "id":"defaultLocale",
21398
+ "value":"default"
21399
+ },
21400
+ {
21401
+ "configurationType":"siteConfiguration",
21402
+ "id":"allowedLocales",
21403
+ "value":[
21404
+ {
21405
+ "country":"",
21406
+ "default":true,
21407
+ "displayCountry":"",
21408
+ "displayLanguage":"",
21409
+ "displayName":"default",
21410
+ "id":"default",
21411
+ "iso3Country":"",
21412
+ "iso3Language":"",
21413
+ "language":"",
21414
+ "name":"default"
21415
+ },
21416
+ {
21417
+ "country":"DE",
21418
+ "default":false,
21419
+ "displayCountry":"Deutschland",
21420
+ "displayLanguage":"Deutsch",
21421
+ "displayName":"Deutsch (Deutschland)",
21422
+ "id":"de-DE",
21423
+ "iso3Country":"DEU",
21424
+ "iso3Language":"deu",
21425
+ "language":"de",
21426
+ "name":"German (Germany)"
21427
+ },
21428
+ {
21429
+ "country":"",
21430
+ "default":false,
21431
+ "displayCountry":"",
21432
+ "displayLanguage":"Deutsch",
21433
+ "displayName":"Deutsch",
21434
+ "id":"de",
21435
+ "iso3Country":"",
21436
+ "iso3Language":"deu",
21437
+ "language":"de",
21438
+ "name":"German"
21439
+ },
21440
+ {
21441
+ "country":"US",
21442
+ "default":false,
21443
+ "displayCountry":"United States",
21444
+ "displayLanguage":"English",
21445
+ "displayName":"English (United States)",
21446
+ "id":"en-US",
21447
+ "iso3Country":"USA",
21448
+ "iso3Language":"eng",
21449
+ "language":"en",
21450
+ "name":"English (United States)"
21451
+ },
21452
+ {
21453
+ "country":"CA",
21454
+ "default":false,
21455
+ "displayCountry":"Canada",
21456
+ "displayLanguage":"English",
21457
+ "displayName":"English (Canada)",
21458
+ "id":"en-CA",
21459
+ "iso3Country":"CAN",
21460
+ "iso3Language":"eng",
21461
+ "language":"en",
21462
+ "name":"English (Canada)"
21463
+ },
21464
+ {
21465
+ "country":"",
21466
+ "default":false,
21467
+ "displayCountry":"",
21468
+ "displayLanguage":"English",
21469
+ "displayName":"English",
21470
+ "id":"en",
21471
+ "iso3Country":"",
21472
+ "iso3Language":"eng",
21473
+ "language":"en",
21474
+ "name":"English"
21475
+ },
21476
+ {
21477
+ "country":"",
21478
+ "default":false,
21479
+ "displayCountry":"",
21480
+ "displayLanguage":"español",
21481
+ "displayName":"español",
21482
+ "id":"es",
21483
+ "iso3Country":"",
21484
+ "iso3Language":"spa",
21485
+ "language":"es",
21486
+ "name":"Spanish"
21487
+ }
21488
+ ]
21489
+ },
21490
+ {
21491
+ "configurationType":"globalConfiguration",
21492
+ "id":"SalesforcePaymentsAllowed",
21493
+ "value":true
21494
+ },
21495
+ {
21496
+ "configurationType":"globalConfiguration",
21497
+ "id":"gcp",
21498
+ "value":"test-gcp-key"
21499
+ }
21500
+ ]
21501
+ }
21502
+ ```
21503
+
21504
+ ### Caching
21505
+
21506
+ Caching capabilities are available for the Shopper Configuration APIs. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)*<br />
21507
+ *
21508
+ * Simple example:
21509
+ *
21510
+ * ```typescript
21511
+ * import { ShopperConfigurations } from "commerce-sdk-isomorphic";
21512
+ *
21513
+ * const clientConfig = {
21514
+ * parameters: {
21515
+ * clientId: "XXXXXX",
21516
+ * organizationId: "XXXX",
21517
+ * shortCode: "XXX",
21518
+ * siteId: "XX"
21519
+ * }
21520
+ * };
21521
+ * const shopperConfigurationsClient = new ShopperConfigurations(clientConfig);
21522
+ * ```
21523
+ *
21524
+ * <span style="font-size:.7em; display:block; text-align: right">
21525
+ * API Version: 0.0.33<br />
21526
+ * Last Updated: <br />
21527
+ * </span>
21528
+ *
21529
+ *
21530
+ */
21531
+ class ShopperConfigurations<ConfigParameters extends ShopperConfigurationsParameters & Record<string, unknown>> {
21532
+ // baseUri is not required on ClientConfig, but we know that we provide one in the class constructor
21533
+ clientConfig: ClientConfig<ConfigParameters> & {
21534
+ baseUri: string;
21535
+ };
21536
+ static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/configuration/shopper-configurations/v1";
21537
+ static readonly apiPaths: {
21538
+ getConfigurations: string;
21539
+ };
21540
+ constructor(config: ClientConfigInit<ConfigParameters>);
21541
+ static readonly paramKeys: {
21542
+ readonly getConfigurations: readonly [
21543
+ "organizationId",
21544
+ "siteId"
21545
+ ];
21546
+ readonly getConfigurationsRequired: readonly [
21547
+ "organizationId",
21548
+ "siteId"
21549
+ ];
21550
+ };
21551
+ /**
21552
+ * Retrieves configurations for the specified organization and site.
21553
+ *
21554
+ * If you would like to get a raw Response object use the other getConfigurations function.
21555
+ *
21556
+ * @param options - An object containing the options for this method.
21557
+ * @param options.parameters - An object containing the parameters for this method.
21558
+ * @param options.parameters.organizationId - An identifier for the organization the request is being made by
21559
+ * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
21560
+ * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
21561
+ *
21562
+ * @returns A promise of type SiteConfiguration.
21563
+ */
21564
+ getConfigurations(options?: RequireParametersUnlessAllAreOptional<{
21565
+ parameters?: CompositeParameters<{
21566
+ organizationId: string;
21567
+ siteId: string;
21568
+ } & QueryParameters, ConfigParameters>;
21569
+ headers?: {
21570
+ [key: string]: string;
21571
+ };
21572
+ }>): Promise<SiteConfiguration>;
21573
+ /**
21574
+ * Retrieves configurations for the specified organization and site.
21575
+ *
21576
+ * @param options - An object containing the options for this method.
21577
+ * @param options.parameters - An object containing the parameters for this method.
21578
+ * @param options.parameters.organizationId - An identifier for the organization the request is being made by
21579
+ * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
21580
+ * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
21581
+ * @param rawResponse - Set to true to return entire Response object instead of DTO.
21582
+ *
21583
+ * @returns A promise of type Response if rawResponse is true, a promise of type SiteConfiguration otherwise.
21584
+ */
21585
+ getConfigurations<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
21586
+ parameters?: CompositeParameters<{
21587
+ organizationId: string;
21588
+ siteId: string;
21589
+ } & QueryParameters, ConfigParameters>;
21590
+ headers?: {
21591
+ [key: string]: string;
21592
+ };
21593
+ }>, rawResponse?: T): Promise<T extends true ? Response : SiteConfiguration>;
21594
+ }
21595
+ }
21596
+ declare namespace ShopperConfigurationsModelTypes {
21597
+ /**
21598
+ * @type ErrorResponse:
21599
+ *
21600
+ * @property title: A short, human-readable summary of the problem type. It will not change from occurrence to occurrence of the problem, except for purposes of localization
21601
+ * - **Max Length:** 256
21602
+ *
21603
+ * @property type: A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be \"about:blank\". It accepts relative URIs; this means that they must be resolved relative to the document\'s base URI, as per [RFC3986], Section 5.
21604
+ * - **Max Length:** 2048
21605
+ *
21606
+ * @property detail: A human-readable explanation specific to this occurrence of the problem.
21607
+ *
21608
+ * @property instance: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. It accepts relative URIs; this means that they must be resolved relative to the document\'s base URI, as per [RFC3986], Section 5.
21609
+ * - **Max Length:** 2048
21610
+ *
21611
+ */
21612
+ type ErrorResponse = {
21613
+ title: string;
21614
+ type: string;
21615
+ detail: string;
21616
+ instance?: string;
21617
+ } & {
21618
+ [key: string]: any;
21619
+ };
21620
+ /**
21621
+ * @type ModelConfiguration: Configuration object
21622
+ *
21623
+ * @property id: identifier
21624
+ * - **Max Length:** 255
21625
+ *
21626
+ * @property value: value for identifier
21627
+ * - **Max Length:** 255
21628
+ *
21629
+ * @property configurationType: type of configuration value
21630
+ * - **Max Length:** 255
21631
+ *
21632
+ */
21633
+ type ModelConfiguration = {
21634
+ id: string;
21635
+ value: any | null;
21636
+ configurationType?: string;
21637
+ } & {
21638
+ [key: string]: any;
21639
+ };
21640
+ /**
21641
+ * @type SiteConfiguration: Site Configuration object
21642
+ *
21643
+ * @property configurations: List configurations for the instance and site
21644
+ *
21645
+ */
21646
+ type SiteConfiguration = {
21647
+ configurations: Array<ModelConfiguration>;
21648
+ } & {
21649
+ [key: string]: any;
21650
+ };
21651
+ }
21652
+ declare namespace ShopperConfigurationsTypes {
21653
+ // API types
21654
+ type ShopperConfigurationsPathParameters = ShopperConfigurationsApiTypes.ShopperConfigurationsPathParameters;
21655
+ type ShopperConfigurationsQueryParameters = ShopperConfigurationsApiTypes.ShopperConfigurationsQueryParameters;
21656
+ type getConfigurationsQueryParameters = ShopperConfigurationsApiTypes.getConfigurationsQueryParameters;
21657
+ type getConfigurationsPathParameters = ShopperConfigurationsApiTypes.getConfigurationsPathParameters;
21658
+ // Model types
21659
+ type ErrorResponse = ShopperConfigurationsModelTypes.ErrorResponse;
21660
+ type ModelConfiguration = ShopperConfigurationsModelTypes.ModelConfiguration;
21661
+ type SiteConfiguration = ShopperConfigurationsModelTypes.SiteConfiguration;
21662
+ }
20573
21663
  /**
20574
21664
  * The consent status of the subscription as supplied or recorded by this system
20575
21665
  */
@@ -20697,9 +21787,9 @@ type ShopperConsentsParameters = ShopperConsentsPathParameters & BaseUriParamete
20697
21787
  * [Shopper Consents](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-consents:Summary)
20698
21788
  * ==================================
20699
21789
  *
20700
- * *# Shopper Consent
21790
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-consents/shopper-consents-oas-v1-public.yaml)
20701
21791
 
20702
- ## API Overview
21792
+ # API Overview
20703
21793
 
20704
21794
  The Shopper Consent API offers a centralized method for managing shopper consent. With this API, shoppers can view and update subscription preferences for marketing communications across various channels. This API controls how and where shoppers receive marketing messages while ensuring compliance with privacy regulations.
20705
21795
 
@@ -21201,9 +22291,9 @@ declare namespace ShopperConsentsApiTypes {
21201
22291
  * [Shopper Consents](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-consents:Summary)
21202
22292
  * ==================================
21203
22293
  *
21204
- * *# Shopper Consent
22294
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-consents/shopper-consents-oas-v1-public.yaml)
21205
22295
 
21206
- ## API Overview
22296
+ # API Overview
21207
22297
 
21208
22298
  The Shopper Consent API offers a centralized method for managing shopper consent. With this API, shoppers can view and update subscription preferences for marketing communications across various channels. This API controls how and where shoppers receive marketing messages while ensuring compliance with privacy regulations.
21209
22299
 
@@ -21638,6 +22728,8 @@ type ShopperContextGeoLocation = {
21638
22728
  *
21639
22729
  * @property geoLocation:
21640
22730
  *
22731
+ * @property couponCodes: Array of coupon codes to be saved in the shopper context. Set the coupon codes to evaluate promotions that can be triggered by these codes.
22732
+ *
21641
22733
  */
21642
22734
  type ShopperContext = {
21643
22735
  effectiveDateTime?: string | null;
@@ -21651,6 +22743,7 @@ type ShopperContext = {
21651
22743
  };
21652
22744
  clientIp?: string;
21653
22745
  geoLocation?: ShopperContextGeoLocation;
22746
+ couponCodes?: Array<string>;
21654
22747
  } & {
21655
22748
  [key: string]: any;
21656
22749
  };
@@ -21700,7 +22793,9 @@ type ShopperContextParameters = ShopperContextPathParameters & BaseUriParameters
21700
22793
  * [Shopper Context](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-context:Summary)
21701
22794
  * ==================================
21702
22795
  *
21703
- * *# API Overview
22796
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-context/shopper-context-oas-v1-public.yaml)
22797
+
22798
+ # API Overview
21704
22799
 
21705
22800
  With the Shopper Context API, you can set any context information as a key/value pair and use it to retrieve personalized promotions, payment methods, and shipping methods. The context information that is set is evaluated against the customer group definitions to determine a customer group (shopper segment), and is then used to activate the experiences that are associated with a particular segment, such as promotions.
21706
22801
 
@@ -22286,6 +23381,8 @@ declare namespace ShopperContextsApiTypes {
22286
23381
  *
22287
23382
  * @property geoLocation:
22288
23383
  *
23384
+ * @property couponCodes: Array of coupon codes to be saved in the shopper context. Set the coupon codes to evaluate promotions that can be triggered by these codes.
23385
+ *
22289
23386
  */
22290
23387
  type ShopperContext = {
22291
23388
  effectiveDateTime?: string | null;
@@ -22299,6 +23396,7 @@ declare namespace ShopperContextsApiTypes {
22299
23396
  };
22300
23397
  clientIp?: string;
22301
23398
  geoLocation?: ShopperContextGeoLocation;
23399
+ couponCodes?: Array<string>;
22302
23400
  } & {
22303
23401
  [key: string]: any;
22304
23402
  };
@@ -22348,7 +23446,9 @@ declare namespace ShopperContextsApiTypes {
22348
23446
  * [Shopper Context](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-context:Summary)
22349
23447
  * ==================================
22350
23448
  *
22351
- * *# API Overview
23449
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-context/shopper-context-oas-v1-public.yaml)
23450
+
23451
+ # API Overview
22352
23452
 
22353
23453
  With the Shopper Context API, you can set any context information as a key/value pair and use it to retrieve personalized promotions, payment methods, and shipping methods. The context information that is set is evaluated against the customer group definitions to determine a customer group (shopper segment), and is then used to activate the experiences that are associated with a particular segment, such as promotions.
22354
23454
 
@@ -22827,6 +23927,8 @@ declare namespace ShopperContextsModelTypes {
22827
23927
  *
22828
23928
  * @property geoLocation:
22829
23929
  *
23930
+ * @property couponCodes: Array of coupon codes to be saved in the shopper context. Set the coupon codes to evaluate promotions that can be triggered by these codes.
23931
+ *
22830
23932
  */
22831
23933
  type ShopperContext = {
22832
23934
  effectiveDateTime?: string | null;
@@ -22840,6 +23942,7 @@ declare namespace ShopperContextsModelTypes {
22840
23942
  };
22841
23943
  clientIp?: string;
22842
23944
  geoLocation?: ShopperContextGeoLocation;
23945
+ couponCodes?: Array<string>;
22843
23946
  } & {
22844
23947
  [key: string]: any;
22845
23948
  };
@@ -25504,7 +26607,9 @@ type ShopperCustomersParameters = ShopperCustomersPathParameters & BaseUriParame
25504
26607
  * [Shopper Customers](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-customers:Summary)
25505
26608
  * ==================================
25506
26609
  *
25507
- * *# API Overview
26610
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-customers/shopper-customers-oas-v1-public.yaml)
26611
+
26612
+ # API Overview
25508
26613
 
25509
26614
  The Shopper Customers API enables you to develop functionality that lets customers log in, and manage their profiles and product lists. Profile management includes ability for shoppers to add or modify addresses and payment methods, and add or modify products to wishlists or favorites. Commerce Cloud provides a rich set of Authentication APIs that include logging in guest shoppers, registered shoppers, agents on behalf of customers and a trusted system authentication on behalf of customers. In all authentication scenarios involving customers, a JSON Web Token (JWT) is generated in Commerce Cloud. Using the JWT, customers can access other Shopper API resources like Orders and Baskets. The application must refresh the JWT every 30 minutes to save the shopper activity (for example, retain products in a shopper's cart) for prolonged periods of time.
25510
26615
 
@@ -30290,7 +31395,9 @@ declare namespace ShopperCustomersApiTypes {
30290
31395
  * [Shopper Customers](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-customers:Summary)
30291
31396
  * ==================================
30292
31397
  *
30293
- * *# API Overview
31398
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-customers/shopper-customers-oas-v1-public.yaml)
31399
+
31400
+ # API Overview
30294
31401
 
30295
31402
  The Shopper Customers API enables you to develop functionality that lets customers log in, and manage their profiles and product lists. Profile management includes ability for shoppers to add or modify addresses and payment methods, and add or modify products to wishlists or favorites. Commerce Cloud provides a rich set of Authentication APIs that include logging in guest shoppers, registered shoppers, agents on behalf of customers and a trusted system authentication on behalf of customers. In all authentication scenarios involving customers, a JSON Web Token (JWT) is generated in Commerce Cloud. Using the JWT, customers can access other Shopper API resources like Orders and Baskets. The application must refresh the JWT every 30 minutes to save the shopper activity (for example, retain products in a shopper's cart) for prolonged periods of time.
30296
31403
 
@@ -35036,7 +36143,10 @@ type ShopperExperienceParameters = ShopperExperiencePathParameters & BaseUriPara
35036
36143
  * [Shopper Experience](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-experience:Summary)
35037
36144
  * ==================================
35038
36145
  *
35039
- * *Use the Shopper Experience API to look up page information for pages that are created in Page Designer.
36146
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-experience/shopper-experience-oas-v1-public.yaml)
36147
+
36148
+ # API Overview
36149
+ Use the Shopper Experience API to look up page information for pages that are created in Page Designer.
35040
36150
 
35041
36151
  Responses include the following:
35042
36152
 
@@ -35552,7 +36662,10 @@ declare namespace ShopperExperienceApiTypes {
35552
36662
  * [Shopper Experience](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-experience:Summary)
35553
36663
  * ==================================
35554
36664
  *
35555
- * *Use the Shopper Experience API to look up page information for pages that are created in Page Designer.
36665
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-experience/shopper-experience-oas-v1-public.yaml)
36666
+
36667
+ # API Overview
36668
+ Use the Shopper Experience API to look up page information for pages that are created in Page Designer.
35556
36669
 
35557
36670
  Responses include the following:
35558
36671
 
@@ -36017,6 +37130,7 @@ type ShopperGiftCertificatesParameters = ShopperGiftCertificatesPathParameters &
36017
37130
  * ==================================
36018
37131
  *
36019
37132
  * *# API Overview
37133
+ [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-gift-certificates/shopper-gift-certificates-oas-v1-public.yaml)
36020
37134
 
36021
37135
  Use the Shopper Gift Certificates API to obtain gift certificate details.
36022
37136
 
@@ -36339,6 +37453,7 @@ declare namespace ShopperGiftCertificatesApiTypes {
36339
37453
  * ==================================
36340
37454
  *
36341
37455
  * *# API Overview
37456
+ [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-gift-certificates/shopper-gift-certificates-oas-v1-public.yaml)
36342
37457
 
36343
37458
  Use the Shopper Gift Certificates API to obtain gift certificate details.
36344
37459
 
@@ -36595,6 +37710,12 @@ type TokenType = "Bearer";
36595
37710
  * @property idp_access_token: This is the access token that is returned from the IDP. The IDP access token is returned to be able to make calls into the IDP outside of SLAS.
36596
37711
  * - **Max Length:** 8192
36597
37712
  *
37713
+ * @property idp_refresh_token: This is the refresh token that is returned from the IDP. The IDP refresh token is returned to be able to make calls into the IDP outside of SLAS.
37714
+ * - **Max Length:** 128
37715
+ *
37716
+ * @property dnt: Do not track
37717
+ * - **Max Length:** 5
37718
+ *
36598
37719
  */
36599
37720
  type TokenResponse = {
36600
37721
  access_token: string;
@@ -36607,6 +37728,8 @@ type TokenResponse = {
36607
37728
  customer_id: string;
36608
37729
  enc_user_id: string;
36609
37730
  idp_access_token: string;
37731
+ idp_refresh_token?: string;
37732
+ dnt?: string;
36610
37733
  } & {
36611
37734
  [key: string]: any;
36612
37735
  };
@@ -36684,6 +37807,7 @@ type getPasswordLessAccessTokenBodyType = {
36684
37807
  pwdless_login_token: string;
36685
37808
  client_id?: string;
36686
37809
  code_verifier?: string;
37810
+ login_id?: string;
36687
37811
  };
36688
37812
  type getPasswordResetTokenQueryParameters = {};
36689
37813
  type getPasswordResetTokenPathParameters = {
@@ -36823,7 +37947,9 @@ type ShopperLoginParameters = ShopperLoginPathParameters & BaseUriParameters & S
36823
37947
  * [Shopper Login](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary)
36824
37948
  * ==================================
36825
37949
  *
36826
- * *# API Overview
37950
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-login/shopper-login-oas-v1-public.yaml)
37951
+
37952
+ # API Overview
36827
37953
 
36828
37954
  The Shopper Login and API Access Service (SLAS) enables secure access to Commerce Cloud’s Shopper APIs for a wide range of headless commerce applications.
36829
37955
 
@@ -36959,7 +38085,8 @@ declare class ShopperLogin<ConfigParameters extends ShopperLoginParameters & Rec
36959
38085
  "hint",
36960
38086
  "pwdless_login_token",
36961
38087
  "client_id",
36962
- "code_verifier"
38088
+ "code_verifier",
38089
+ "login_id"
36963
38090
  ];
36964
38091
  readonly getPasswordLessAccessTokenRequired: readonly [
36965
38092
  "organizationId",
@@ -37533,6 +38660,7 @@ declare class ShopperLogin<ConfigParameters extends ShopperLoginParameters & Rec
37533
38660
  * @param options.body.pwdless_login_token - Passwordless login token that was created from the user ID.
37534
38661
  * @param options.body.client_id - The public client ID.
37535
38662
  * @param options.body.code_verifier - PKCE code verifier. Created by the client. The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters.
38663
+ * @param options.body.login_id - The ID used by the shopper for password token request. When provided, login_id must exactly match the ID used during passwordless login. ex. If passwordless login used `samantha.sampleson@example.com`, but the passwordless login token request provides `sam.sampleson@example.com`, the request fails due to mismatch.
37536
38664
  *
37537
38665
  * @returns A promise of type TokenResponse.
37538
38666
  */
@@ -37558,6 +38686,7 @@ declare class ShopperLogin<ConfigParameters extends ShopperLoginParameters & Rec
37558
38686
  * @param options.body.pwdless_login_token - Passwordless login token that was created from the user ID.
37559
38687
  * @param options.body.client_id - The public client ID.
37560
38688
  * @param options.body.code_verifier - PKCE code verifier. Created by the client. The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters.
38689
+ * @param options.body.login_id - The ID used by the shopper for password token request. When provided, login_id must exactly match the ID used during passwordless login. ex. If passwordless login used `samantha.sampleson@example.com`, but the passwordless login token request provides `sam.sampleson@example.com`, the request fails due to mismatch.
37561
38690
  * @param rawResponse - Set to true to return entire Response object instead of DTO.
37562
38691
  *
37563
38692
  * @returns A promise of type Response if rawResponse is true, a promise of type TokenResponse otherwise.
@@ -38094,7 +39223,9 @@ declare class ShopperLogin<ConfigParameters extends ShopperLoginParameters & Rec
38094
39223
  * @param options.parameters.client_id - The SLAS public client ID or SLAS private client ID for use with trusted-agent requests. When using a private client ID a PKCE code challenge is not required.
38095
39224
  * @param options.parameters.refresh_token - Refresh token that was given during the access token request.
38096
39225
  * @param options.parameters.channel_id - The `channel_id` parameter must be provided if the shopper authenticated using the `login` endpoint with B2C Commerce.
38097
- * @param options.parameters.hint - `hint=all-sessions` logs out all sessions of the shopper and invalidates all active refresh tokens for the shopper.
39226
+ * @param options.parameters.hint - `hint=all-sessions` logs out all sessions and invalidates all refresh tokens for a shopper with the same SLAS user ID.
39227
+ This only works within the same session type. Sessions created through different authentication methods (/authorize vs. Trusted System On Behalf) are treated as separate sessions. To invalidate tokens with different SLAS User IDs, you must make explicit logout calls with each token.
39228
+ A shopper authenticated via both /authorize and TSOB has two separate sessions. You will need two logout calls (one per token) to fully log them out.
38098
39229
 
38099
39230
  If this query parameter is not provided, the default behavior is to log out only the current session that matches the refresh token in the request.
38100
39231
 
@@ -38128,7 +39259,9 @@ declare class ShopperLogin<ConfigParameters extends ShopperLoginParameters & Rec
38128
39259
  * @param options.parameters.client_id - The SLAS public client ID or SLAS private client ID for use with trusted-agent requests. When using a private client ID a PKCE code challenge is not required.
38129
39260
  * @param options.parameters.refresh_token - Refresh token that was given during the access token request.
38130
39261
  * @param options.parameters.channel_id - The `channel_id` parameter must be provided if the shopper authenticated using the `login` endpoint with B2C Commerce.
38131
- * @param options.parameters.hint - `hint=all-sessions` logs out all sessions of the shopper and invalidates all active refresh tokens for the shopper.
39262
+ * @param options.parameters.hint - `hint=all-sessions` logs out all sessions and invalidates all refresh tokens for a shopper with the same SLAS user ID.
39263
+ This only works within the same session type. Sessions created through different authentication methods (/authorize vs. Trusted System On Behalf) are treated as separate sessions. To invalidate tokens with different SLAS User IDs, you must make explicit logout calls with each token.
39264
+ A shopper authenticated via both /authorize and TSOB has two separate sessions. You will need two logout calls (one per token) to fully log them out.
38132
39265
 
38133
39266
  If this query parameter is not provided, the default behavior is to log out only the current session that matches the refresh token in the request.
38134
39267
 
@@ -38427,6 +39560,12 @@ declare namespace ShopperLoginApiTypes {
38427
39560
  * @property idp_access_token: This is the access token that is returned from the IDP. The IDP access token is returned to be able to make calls into the IDP outside of SLAS.
38428
39561
  * - **Max Length:** 8192
38429
39562
  *
39563
+ * @property idp_refresh_token: This is the refresh token that is returned from the IDP. The IDP refresh token is returned to be able to make calls into the IDP outside of SLAS.
39564
+ * - **Max Length:** 128
39565
+ *
39566
+ * @property dnt: Do not track
39567
+ * - **Max Length:** 5
39568
+ *
38430
39569
  */
38431
39570
  type TokenResponse = {
38432
39571
  access_token: string;
@@ -38439,6 +39578,8 @@ declare namespace ShopperLoginApiTypes {
38439
39578
  customer_id: string;
38440
39579
  enc_user_id: string;
38441
39580
  idp_access_token: string;
39581
+ idp_refresh_token?: string;
39582
+ dnt?: string;
38442
39583
  } & {
38443
39584
  [key: string]: any;
38444
39585
  };
@@ -38526,6 +39667,7 @@ declare namespace ShopperLoginApiTypes {
38526
39667
  pwdless_login_token: string;
38527
39668
  client_id?: string;
38528
39669
  code_verifier?: string;
39670
+ login_id?: string;
38529
39671
  };
38530
39672
  type getPasswordResetTokenQueryParameters = {};
38531
39673
  type getPasswordResetTokenPathParameters = {
@@ -38665,7 +39807,9 @@ declare namespace ShopperLoginApiTypes {
38665
39807
  * [Shopper Login](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary)
38666
39808
  * ==================================
38667
39809
  *
38668
- * *# API Overview
39810
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-login/shopper-login-oas-v1-public.yaml)
39811
+
39812
+ # API Overview
38669
39813
 
38670
39814
  The Shopper Login and API Access Service (SLAS) enables secure access to Commerce Cloud’s Shopper APIs for a wide range of headless commerce applications.
38671
39815
 
@@ -38801,7 +39945,8 @@ declare namespace ShopperLoginApiTypes {
38801
39945
  "hint",
38802
39946
  "pwdless_login_token",
38803
39947
  "client_id",
38804
- "code_verifier"
39948
+ "code_verifier",
39949
+ "login_id"
38805
39950
  ];
38806
39951
  readonly getPasswordLessAccessTokenRequired: readonly [
38807
39952
  "organizationId",
@@ -39375,6 +40520,7 @@ declare namespace ShopperLoginApiTypes {
39375
40520
  * @param options.body.pwdless_login_token - Passwordless login token that was created from the user ID.
39376
40521
  * @param options.body.client_id - The public client ID.
39377
40522
  * @param options.body.code_verifier - PKCE code verifier. Created by the client. The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters.
40523
+ * @param options.body.login_id - The ID used by the shopper for password token request. When provided, login_id must exactly match the ID used during passwordless login. ex. If passwordless login used `samantha.sampleson@example.com`, but the passwordless login token request provides `sam.sampleson@example.com`, the request fails due to mismatch.
39378
40524
  *
39379
40525
  * @returns A promise of type TokenResponse.
39380
40526
  */
@@ -39400,6 +40546,7 @@ declare namespace ShopperLoginApiTypes {
39400
40546
  * @param options.body.pwdless_login_token - Passwordless login token that was created from the user ID.
39401
40547
  * @param options.body.client_id - The public client ID.
39402
40548
  * @param options.body.code_verifier - PKCE code verifier. Created by the client. The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters.
40549
+ * @param options.body.login_id - The ID used by the shopper for password token request. When provided, login_id must exactly match the ID used during passwordless login. ex. If passwordless login used `samantha.sampleson@example.com`, but the passwordless login token request provides `sam.sampleson@example.com`, the request fails due to mismatch.
39403
40550
  * @param rawResponse - Set to true to return entire Response object instead of DTO.
39404
40551
  *
39405
40552
  * @returns A promise of type Response if rawResponse is true, a promise of type TokenResponse otherwise.
@@ -39936,7 +41083,9 @@ declare namespace ShopperLoginApiTypes {
39936
41083
  * @param options.parameters.client_id - The SLAS public client ID or SLAS private client ID for use with trusted-agent requests. When using a private client ID a PKCE code challenge is not required.
39937
41084
  * @param options.parameters.refresh_token - Refresh token that was given during the access token request.
39938
41085
  * @param options.parameters.channel_id - The `channel_id` parameter must be provided if the shopper authenticated using the `login` endpoint with B2C Commerce.
39939
- * @param options.parameters.hint - `hint=all-sessions` logs out all sessions of the shopper and invalidates all active refresh tokens for the shopper.
41086
+ * @param options.parameters.hint - `hint=all-sessions` logs out all sessions and invalidates all refresh tokens for a shopper with the same SLAS user ID.
41087
+ This only works within the same session type. Sessions created through different authentication methods (/authorize vs. Trusted System On Behalf) are treated as separate sessions. To invalidate tokens with different SLAS User IDs, you must make explicit logout calls with each token.
41088
+ A shopper authenticated via both /authorize and TSOB has two separate sessions. You will need two logout calls (one per token) to fully log them out.
39940
41089
 
39941
41090
  If this query parameter is not provided, the default behavior is to log out only the current session that matches the refresh token in the request.
39942
41091
 
@@ -39970,7 +41119,9 @@ declare namespace ShopperLoginApiTypes {
39970
41119
  * @param options.parameters.client_id - The SLAS public client ID or SLAS private client ID for use with trusted-agent requests. When using a private client ID a PKCE code challenge is not required.
39971
41120
  * @param options.parameters.refresh_token - Refresh token that was given during the access token request.
39972
41121
  * @param options.parameters.channel_id - The `channel_id` parameter must be provided if the shopper authenticated using the `login` endpoint with B2C Commerce.
39973
- * @param options.parameters.hint - `hint=all-sessions` logs out all sessions of the shopper and invalidates all active refresh tokens for the shopper.
41122
+ * @param options.parameters.hint - `hint=all-sessions` logs out all sessions and invalidates all refresh tokens for a shopper with the same SLAS user ID.
41123
+ This only works within the same session type. Sessions created through different authentication methods (/authorize vs. Trusted System On Behalf) are treated as separate sessions. To invalidate tokens with different SLAS User IDs, you must make explicit logout calls with each token.
41124
+ A shopper authenticated via both /authorize and TSOB has two separate sessions. You will need two logout calls (one per token) to fully log them out.
39974
41125
 
39975
41126
  If this query parameter is not provided, the default behavior is to log out only the current session that matches the refresh token in the request.
39976
41127
 
@@ -40162,6 +41313,12 @@ declare namespace ShopperLoginModelTypes {
40162
41313
  * @property idp_access_token: This is the access token that is returned from the IDP. The IDP access token is returned to be able to make calls into the IDP outside of SLAS.
40163
41314
  * - **Max Length:** 8192
40164
41315
  *
41316
+ * @property idp_refresh_token: This is the refresh token that is returned from the IDP. The IDP refresh token is returned to be able to make calls into the IDP outside of SLAS.
41317
+ * - **Max Length:** 128
41318
+ *
41319
+ * @property dnt: Do not track
41320
+ * - **Max Length:** 5
41321
+ *
40165
41322
  */
40166
41323
  type TokenResponse = {
40167
41324
  access_token: string;
@@ -40174,6 +41331,8 @@ declare namespace ShopperLoginModelTypes {
40174
41331
  customer_id: string;
40175
41332
  enc_user_id: string;
40176
41333
  idp_access_token: string;
41334
+ idp_refresh_token?: string;
41335
+ dnt?: string;
40177
41336
  } & {
40178
41337
  [key: string]: any;
40179
41338
  };
@@ -41536,6 +42695,7 @@ type ShopperOrdersParameters = ShopperOrdersPathParameters & BaseUriParameters &
41536
42695
  * ==================================
41537
42696
  *
41538
42697
  * *# API Overview
42698
+ [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-orders/shopper-orders-oas-v1-public.yaml)
41539
42699
 
41540
42700
  The Shopper Orders API enables you to:
41541
42701
 
@@ -43584,6 +44744,7 @@ declare namespace ShopperOrdersApiTypes {
43584
44744
  * ==================================
43585
44745
  *
43586
44746
  * *# API Overview
44747
+ [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-orders/shopper-orders-oas-v1-public.yaml)
43587
44748
 
43588
44749
  The Shopper Orders API enables you to:
43589
44750
 
@@ -46262,7 +47423,9 @@ type ShopperProductsParameters = ShopperProductsPathParameters & BaseUriParamete
46262
47423
  * [Shopper Products](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-products:Summary)
46263
47424
  * ==================================
46264
47425
  *
46265
- * *# API Overview
47426
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-products/shopper-products-oas-v1-public.yaml)
47427
+
47428
+ # API Overview
46266
47429
 
46267
47430
  The Shopper Products API enables you to access product details for products that are online, merchandised to a particular site catalog, and ready to be sold. You can use these product details to merchandise the product on other ecommerce channels. To set up category navigation paths on other commerce apps or storefronts, you can use the Categories API.
46268
47431
 
@@ -47625,7 +48788,9 @@ declare namespace ShopperProductsApiTypes {
47625
48788
  * [Shopper Products](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-products:Summary)
47626
48789
  * ==================================
47627
48790
  *
47628
- * *# API Overview
48791
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-products/shopper-products-oas-v1-public.yaml)
48792
+
48793
+ # API Overview
47629
48794
 
47630
48795
  The Shopper Products API enables you to access product details for products that are online, merchandised to a particular site catalog, and ready to be sold. You can use these product details to merchandise the product on other ecommerce channels. To set up category navigation paths on other commerce apps or storefronts, you can use the Categories API.
47631
48796
 
@@ -48958,6 +50123,7 @@ type ShopperPromotionsParameters = ShopperPromotionsPathParameters & BaseUriPara
48958
50123
  * ==================================
48959
50124
  *
48960
50125
  * *# API Overview
50126
+ [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-promotions/shopper-promotions-oas-v1-public.yaml)
48961
50127
 
48962
50128
  Retrieve information about active promotions within the context of a shopper and a site. You can use this API to retrieve promotions that you configured in the commerce platform by searching for specific promotion IDs or by searching for promotions associated with a campaign.
48963
50129
 
@@ -49409,6 +50575,7 @@ declare namespace ShopperPromotionsApiTypes {
49409
50575
  * ==================================
49410
50576
  *
49411
50577
  * *# API Overview
50578
+ [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-promotions/shopper-promotions-oas-v1-public.yaml)
49412
50579
 
49413
50580
  Retrieve information about active promotions within the context of a shopper and a site. You can use this API to retrieve promotions that you configured in the commerce platform by searching for specific promotion IDs or by searching for promotions associated with a campaign.
49414
50581
 
@@ -50469,7 +51636,9 @@ type ShopperSearchParameters = ShopperSearchPathParameters & BaseUriParameters &
50469
51636
  * [Shopper Search](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-search:Summary)
50470
51637
  * ==================================
50471
51638
  *
50472
- * *# API Overview
51639
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-search/shopper-search-oas-v1-public.yaml)
51640
+
51641
+ # API Overview
50473
51642
 
50474
51643
  Use the Shopper Search API for search functionality that lets shoppers search for products using keywords and refinement. The search results can be products or suggestions based on the endpoint you choose in the API.
50475
51644
 
@@ -50728,11 +51897,13 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
50728
51897
  * @param options.parameters - An object containing the parameters for this method.
50729
51898
  * @param options.parameters.organizationId - An identifier for the organization the request is being made by
50730
51899
  * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
50731
- * @param options.parameters.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 specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
51900
+ * @param options.parameters.select -
50732
51901
  * @param options.parameters.q - The query phrase to search for. For example to search for a product "shirt", type q=shirt.
50733
- * @param options.parameters.refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='. Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \"|\") i.e. refine=c_refinementColor=red|green|blue. Value ranges can be specified like this: refine=price=(100..500) .
50734
- 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
50735
- and the system defined attributes IDs but the search can only accept a total of 9 refinements at a time.
51902
+ * @param options.parameters.refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='.<br>
51903
+ Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \"|\"), for example: refine=c_refinementColor=red|green|blue.<br>
51904
+ Value ranges can be specified like this: refine=price=(100..500).<br>
51905
+ Multiple refine parameters can be provided by using the refine as the key, for example: refine=price=(0..10)&refine=c_refinementColor=green.<br>
51906
+ 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.<br>
50736
51907
 
50737
51908
  The following system refinement attribute ids are supported:<br>
50738
51909
  `cgid`: Allows refinement per single category ID. Multiple category ids are not supported.
@@ -50754,7 +51925,6 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
50754
51925
  * @param options.parameters.expand - A comma-separated list with allowed values - `availability`, `images`, `prices`, `represented_products`, `variations`, `promotions`, `custom_properties`.
50755
51926
  By default, the expand parameter includes `availability, images, prices, represented_products, variations`.
50756
51927
  Use none to disable all expand options.
50757
- **The page_meta_tags expand value is optional and is available B2C Commerce version 25.2.**"
50758
51928
  * @param options.parameters.allImages - When the `images` expand parameter is used with this flag, the response includes the `imageGroups property`, which contains an image model.
50759
51929
  If this flag is true, the full image model is returned. If false, only matching images are included.
50760
51930
  If no flag is passed, the `imageGroups` property is omitted from the response.
@@ -50798,11 +51968,13 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
50798
51968
  * @param options.parameters - An object containing the parameters for this method.
50799
51969
  * @param options.parameters.organizationId - An identifier for the organization the request is being made by
50800
51970
  * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
50801
- * @param options.parameters.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 specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
51971
+ * @param options.parameters.select -
50802
51972
  * @param options.parameters.q - The query phrase to search for. For example to search for a product "shirt", type q=shirt.
50803
- * @param options.parameters.refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='. Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \"|\") i.e. refine=c_refinementColor=red|green|blue. Value ranges can be specified like this: refine=price=(100..500) .
50804
- 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
50805
- and the system defined attributes IDs but the search can only accept a total of 9 refinements at a time.
51973
+ * @param options.parameters.refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='.<br>
51974
+ Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \"|\"), for example: refine=c_refinementColor=red|green|blue.<br>
51975
+ Value ranges can be specified like this: refine=price=(100..500).<br>
51976
+ Multiple refine parameters can be provided by using the refine as the key, for example: refine=price=(0..10)&refine=c_refinementColor=green.<br>
51977
+ 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.<br>
50806
51978
 
50807
51979
  The following system refinement attribute ids are supported:<br>
50808
51980
  `cgid`: Allows refinement per single category ID. Multiple category ids are not supported.
@@ -50824,7 +51996,6 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
50824
51996
  * @param options.parameters.expand - A comma-separated list with allowed values - `availability`, `images`, `prices`, `represented_products`, `variations`, `promotions`, `custom_properties`.
50825
51997
  By default, the expand parameter includes `availability, images, prices, represented_products, variations`.
50826
51998
  Use none to disable all expand options.
50827
- **The page_meta_tags expand value is optional and is available B2C Commerce version 25.2.**"
50828
51999
  * @param options.parameters.allImages - When the `images` expand parameter is used with this flag, the response includes the `imageGroups property`, which contains an image model.
50829
52000
  If this flag is true, the full image model is returned. If false, only matching images are included.
50830
52001
  If no flag is passed, the `imageGroups` property is omitted from the response.
@@ -51758,7 +52929,9 @@ declare namespace ShopperSearchApiTypes {
51758
52929
  * [Shopper Search](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-search:Summary)
51759
52930
  * ==================================
51760
52931
  *
51761
- * *# API Overview
52932
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-search/shopper-search-oas-v1-public.yaml)
52933
+
52934
+ # API Overview
51762
52935
 
51763
52936
  Use the Shopper Search API for search functionality that lets shoppers search for products using keywords and refinement. The search results can be products or suggestions based on the endpoint you choose in the API.
51764
52937
 
@@ -52017,11 +53190,13 @@ declare namespace ShopperSearchApiTypes {
52017
53190
  * @param options.parameters - An object containing the parameters for this method.
52018
53191
  * @param options.parameters.organizationId - An identifier for the organization the request is being made by
52019
53192
  * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
52020
- * @param options.parameters.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 specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
53193
+ * @param options.parameters.select -
52021
53194
  * @param options.parameters.q - The query phrase to search for. For example to search for a product "shirt", type q=shirt.
52022
- * @param options.parameters.refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='. Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \"|\") i.e. refine=c_refinementColor=red|green|blue. Value ranges can be specified like this: refine=price=(100..500) .
52023
- 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
52024
- and the system defined attributes IDs but the search can only accept a total of 9 refinements at a time.
53195
+ * @param options.parameters.refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='.<br>
53196
+ Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \"|\"), for example: refine=c_refinementColor=red|green|blue.<br>
53197
+ Value ranges can be specified like this: refine=price=(100..500).<br>
53198
+ Multiple refine parameters can be provided by using the refine as the key, for example: refine=price=(0..10)&refine=c_refinementColor=green.<br>
53199
+ 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.<br>
52025
53200
 
52026
53201
  The following system refinement attribute ids are supported:<br>
52027
53202
  `cgid`: Allows refinement per single category ID. Multiple category ids are not supported.
@@ -52043,7 +53218,6 @@ declare namespace ShopperSearchApiTypes {
52043
53218
  * @param options.parameters.expand - A comma-separated list with allowed values - `availability`, `images`, `prices`, `represented_products`, `variations`, `promotions`, `custom_properties`.
52044
53219
  By default, the expand parameter includes `availability, images, prices, represented_products, variations`.
52045
53220
  Use none to disable all expand options.
52046
- **The page_meta_tags expand value is optional and is available B2C Commerce version 25.2.**"
52047
53221
  * @param options.parameters.allImages - When the `images` expand parameter is used with this flag, the response includes the `imageGroups property`, which contains an image model.
52048
53222
  If this flag is true, the full image model is returned. If false, only matching images are included.
52049
53223
  If no flag is passed, the `imageGroups` property is omitted from the response.
@@ -52087,11 +53261,13 @@ declare namespace ShopperSearchApiTypes {
52087
53261
  * @param options.parameters - An object containing the parameters for this method.
52088
53262
  * @param options.parameters.organizationId - An identifier for the organization the request is being made by
52089
53263
  * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
52090
- * @param options.parameters.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 specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
53264
+ * @param options.parameters.select -
52091
53265
  * @param options.parameters.q - The query phrase to search for. For example to search for a product "shirt", type q=shirt.
52092
- * @param options.parameters.refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='. Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \"|\") i.e. refine=c_refinementColor=red|green|blue. Value ranges can be specified like this: refine=price=(100..500) .
52093
- 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
52094
- and the system defined attributes IDs but the search can only accept a total of 9 refinements at a time.
53266
+ * @param options.parameters.refine - Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='.<br>
53267
+ Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \"|\"), for example: refine=c_refinementColor=red|green|blue.<br>
53268
+ Value ranges can be specified like this: refine=price=(100..500).<br>
53269
+ Multiple refine parameters can be provided by using the refine as the key, for example: refine=price=(0..10)&refine=c_refinementColor=green.<br>
53270
+ 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.<br>
52095
53271
 
52096
53272
  The following system refinement attribute ids are supported:<br>
52097
53273
  `cgid`: Allows refinement per single category ID. Multiple category ids are not supported.
@@ -52113,7 +53289,6 @@ declare namespace ShopperSearchApiTypes {
52113
53289
  * @param options.parameters.expand - A comma-separated list with allowed values - `availability`, `images`, `prices`, `represented_products`, `variations`, `promotions`, `custom_properties`.
52114
53290
  By default, the expand parameter includes `availability, images, prices, represented_products, variations`.
52115
53291
  Use none to disable all expand options.
52116
- **The page_meta_tags expand value is optional and is available B2C Commerce version 25.2.**"
52117
53292
  * @param options.parameters.allImages - When the `images` expand parameter is used with this flag, the response includes the `imageGroups property`, which contains an image model.
52118
53293
  If this flag is true, the full image model is returned. If false, only matching images are included.
52119
53294
  If no flag is passed, the `imageGroups` property is omitted from the response.
@@ -53021,7 +54196,9 @@ type ShopperSEOParameters = ShopperSEOPathParameters & BaseUriParameters & Shopp
53021
54196
  * [Shopper SEO](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-seo:Summary)
53022
54197
  * ==================================
53023
54198
  *
53024
- * *# API Overview
54199
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-seo/shopper-seo-oas-v1-public.yaml)
54200
+
54201
+ # API Overview
53025
54202
 
53026
54203
  The Shopper SEO API Provides access to SEO-related information, such as URL mapping information.
53027
54204
 
@@ -53365,7 +54542,9 @@ declare namespace ShopperSEOApiTypes {
53365
54542
  * [Shopper SEO](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-seo:Summary)
53366
54543
  * ==================================
53367
54544
  *
53368
- * *# API Overview
54545
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-seo/shopper-seo-oas-v1-public.yaml)
54546
+
54547
+ # API Overview
53369
54548
 
53370
54549
  The Shopper SEO API Provides access to SEO-related information, such as URL mapping information.
53371
54550
 
@@ -53758,7 +54937,9 @@ type ShopperStoresParameters = ShopperStoresPathParameters & BaseUriParameters &
53758
54937
  * [Shopper Stores](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-stores:Summary)
53759
54938
  * ==================================
53760
54939
  *
53761
- * *# API Overview
54940
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-stores/shopper-stores-oas-v1-public.yaml)
54941
+
54942
+ # API Overview
53762
54943
 
53763
54944
  Provides access to stores via search or ID lookup.
53764
54945
 
@@ -54308,7 +55489,9 @@ declare namespace ShopperStoresApiTypes {
54308
55489
  * [Shopper Stores](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-stores:Summary)
54309
55490
  * ==================================
54310
55491
  *
54311
- * *# API Overview
55492
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-stores/shopper-stores-oas-v1-public.yaml)
55493
+
55494
+ # API Overview
54312
55495
 
54313
55496
  Provides access to stores via search or ID lookup.
54314
55497
 
@@ -54956,6 +56139,12 @@ declare namespace helpers {
54956
56139
  * @property idp_access_token: This is the access token that is returned from the IDP. The IDP access token is returned to be able to make calls into the IDP outside of SLAS.
54957
56140
  * - **Max Length:** 8192
54958
56141
  *
56142
+ * @property idp_refresh_token: This is the refresh token that is returned from the IDP. The IDP refresh token is returned to be able to make calls into the IDP outside of SLAS.
56143
+ * - **Max Length:** 128
56144
+ *
56145
+ * @property dnt: Do not track
56146
+ * - **Max Length:** 5
56147
+ *
54959
56148
  */
54960
56149
  type TokenResponse = {
54961
56150
  access_token: string;
@@ -54968,6 +56157,8 @@ declare namespace helpers {
54968
56157
  customer_id: string;
54969
56158
  enc_user_id: string;
54970
56159
  idp_access_token: string;
56160
+ idp_refresh_token?: string;
56161
+ dnt?: string;
54971
56162
  } & {
54972
56163
  [key: string]: any;
54973
56164
  };
@@ -55055,6 +56246,7 @@ declare namespace helpers {
55055
56246
  pwdless_login_token: string;
55056
56247
  client_id?: string;
55057
56248
  code_verifier?: string;
56249
+ login_id?: string;
55058
56250
  };
55059
56251
  type getPasswordResetTokenQueryParameters = {};
55060
56252
  type getPasswordResetTokenPathParameters = {
@@ -55194,7 +56386,9 @@ declare namespace helpers {
55194
56386
  * [Shopper Login](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary)
55195
56387
  * ==================================
55196
56388
  *
55197
- * *# API Overview
56389
+ * *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-login/shopper-login-oas-v1-public.yaml)
56390
+
56391
+ # API Overview
55198
56392
 
55199
56393
  The Shopper Login and API Access Service (SLAS) enables secure access to Commerce Cloud’s Shopper APIs for a wide range of headless commerce applications.
55200
56394
 
@@ -55330,7 +56524,8 @@ declare namespace helpers {
55330
56524
  "hint",
55331
56525
  "pwdless_login_token",
55332
56526
  "client_id",
55333
- "code_verifier"
56527
+ "code_verifier",
56528
+ "login_id"
55334
56529
  ];
55335
56530
  readonly getPasswordLessAccessTokenRequired: readonly [
55336
56531
  "organizationId",
@@ -55904,6 +57099,7 @@ declare namespace helpers {
55904
57099
  * @param options.body.pwdless_login_token - Passwordless login token that was created from the user ID.
55905
57100
  * @param options.body.client_id - The public client ID.
55906
57101
  * @param options.body.code_verifier - PKCE code verifier. Created by the client. The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters.
57102
+ * @param options.body.login_id - The ID used by the shopper for password token request. When provided, login_id must exactly match the ID used during passwordless login. ex. If passwordless login used `samantha.sampleson@example.com`, but the passwordless login token request provides `sam.sampleson@example.com`, the request fails due to mismatch.
55907
57103
  *
55908
57104
  * @returns A promise of type TokenResponse.
55909
57105
  */
@@ -55929,6 +57125,7 @@ declare namespace helpers {
55929
57125
  * @param options.body.pwdless_login_token - Passwordless login token that was created from the user ID.
55930
57126
  * @param options.body.client_id - The public client ID.
55931
57127
  * @param options.body.code_verifier - PKCE code verifier. Created by the client. The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters.
57128
+ * @param options.body.login_id - The ID used by the shopper for password token request. When provided, login_id must exactly match the ID used during passwordless login. ex. If passwordless login used `samantha.sampleson@example.com`, but the passwordless login token request provides `sam.sampleson@example.com`, the request fails due to mismatch.
55932
57129
  * @param rawResponse - Set to true to return entire Response object instead of DTO.
55933
57130
  *
55934
57131
  * @returns A promise of type Response if rawResponse is true, a promise of type TokenResponse otherwise.
@@ -56465,7 +57662,9 @@ declare namespace helpers {
56465
57662
  * @param options.parameters.client_id - The SLAS public client ID or SLAS private client ID for use with trusted-agent requests. When using a private client ID a PKCE code challenge is not required.
56466
57663
  * @param options.parameters.refresh_token - Refresh token that was given during the access token request.
56467
57664
  * @param options.parameters.channel_id - The `channel_id` parameter must be provided if the shopper authenticated using the `login` endpoint with B2C Commerce.
56468
- * @param options.parameters.hint - `hint=all-sessions` logs out all sessions of the shopper and invalidates all active refresh tokens for the shopper.
57665
+ * @param options.parameters.hint - `hint=all-sessions` logs out all sessions and invalidates all refresh tokens for a shopper with the same SLAS user ID.
57666
+ This only works within the same session type. Sessions created through different authentication methods (/authorize vs. Trusted System On Behalf) are treated as separate sessions. To invalidate tokens with different SLAS User IDs, you must make explicit logout calls with each token.
57667
+ A shopper authenticated via both /authorize and TSOB has two separate sessions. You will need two logout calls (one per token) to fully log them out.
56469
57668
 
56470
57669
  If this query parameter is not provided, the default behavior is to log out only the current session that matches the refresh token in the request.
56471
57670
 
@@ -56499,7 +57698,9 @@ declare namespace helpers {
56499
57698
  * @param options.parameters.client_id - The SLAS public client ID or SLAS private client ID for use with trusted-agent requests. When using a private client ID a PKCE code challenge is not required.
56500
57699
  * @param options.parameters.refresh_token - Refresh token that was given during the access token request.
56501
57700
  * @param options.parameters.channel_id - The `channel_id` parameter must be provided if the shopper authenticated using the `login` endpoint with B2C Commerce.
56502
- * @param options.parameters.hint - `hint=all-sessions` logs out all sessions of the shopper and invalidates all active refresh tokens for the shopper.
57701
+ * @param options.parameters.hint - `hint=all-sessions` logs out all sessions and invalidates all refresh tokens for a shopper with the same SLAS user ID.
57702
+ This only works within the same session type. Sessions created through different authentication methods (/authorize vs. Trusted System On Behalf) are treated as separate sessions. To invalidate tokens with different SLAS User IDs, you must make explicit logout calls with each token.
57703
+ A shopper authenticated via both /authorize and TSOB has two separate sessions. You will need two logout calls (one per token) to fully log them out.
56503
57704
 
56504
57705
  If this query parameter is not provided, the default behavior is to log out only the current session that matches the refresh token in the request.
56505
57706
 
@@ -57011,5 +58212,5 @@ declare namespace helpers {
57011
58212
  */
57012
58213
  const encodeSCAPISpecialCharacters: (str: string) => string;
57013
58214
  }
57014
- export { ShopperBaskets, ShopperBasketsV2, ShopperConsents, ShopperContexts, ShopperCustomers, ShopperExperience, ShopperGiftCertificates, ShopperLogin, ShopperOrders, ShopperProducts, ShopperPromotions, ShopperSearch, ShopperSEO, ShopperStores, ClientConfig, TemplateURL, helpers };
57015
- export type { ShopperBasketsTypes, ShopperBasketsV2Types, ShopperConsentsTypes, ShopperContextsTypes, ShopperCustomersTypes, ShopperExperienceTypes, ShopperGiftCertificatesTypes, ShopperLoginTypes, ShopperOrdersTypes, ShopperProductsTypes, ShopperPromotionsTypes, ShopperSearchTypes, ShopperSEOTypes, ShopperStoresTypes, ClientConfigInit, FetchFunction, FetchOptions };
58215
+ export { ShopperBaskets, ShopperBasketsV2, ShopperConfigurations, ShopperConsents, ShopperContexts, ShopperCustomers, ShopperExperience, ShopperGiftCertificates, ShopperLogin, ShopperOrders, ShopperProducts, ShopperPromotions, ShopperSearch, ShopperSEO, ShopperStores, ClientConfig, TemplateURL, helpers };
58216
+ export type { ShopperBasketsTypes, ShopperBasketsV2Types, ShopperConfigurationsTypes, ShopperConsentsTypes, ShopperContextsTypes, ShopperCustomersTypes, ShopperExperienceTypes, ShopperGiftCertificatesTypes, ShopperLoginTypes, ShopperOrdersTypes, ShopperProductsTypes, ShopperPromotionsTypes, ShopperSearchTypes, ShopperSEOTypes, ShopperStoresTypes, ClientConfigInit, FetchFunction, FetchOptions };