@salesforce/b2c-tooling-sdk 1.21.3 → 1.22.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.
Files changed (122) hide show
  1. package/data/guides/enrichment.json +294 -0
  2. package/data/guides/index.json +376 -16
  3. package/data/help/index.json +6 -1
  4. package/data/job-steps/index.json +1 -1
  5. package/data/job-steps/job-steps.json +1 -1
  6. package/data/script-api/index.json +49 -5
  7. package/data/tooling/index.json +2 -2
  8. package/data/xsd/commercefeaturestate.xsd +1 -0
  9. package/data/xsd/index.json +2 -1
  10. package/data/xsd/redirecturl.xsd +2 -0
  11. package/dist/esm/auth/index.d.ts +6 -3
  12. package/dist/esm/auth/index.js +4 -2
  13. package/dist/esm/auth/index.js.map +1 -1
  14. package/dist/esm/auth/oauth-implicit.d.ts +19 -0
  15. package/dist/esm/auth/oauth-implicit.js +103 -10
  16. package/dist/esm/auth/oauth-implicit.js.map +1 -1
  17. package/dist/esm/auth/oauth-pkce-fallback.d.ts +68 -0
  18. package/dist/esm/auth/oauth-pkce-fallback.js +128 -0
  19. package/dist/esm/auth/oauth-pkce-fallback.js.map +1 -0
  20. package/dist/esm/auth/oauth-pkce.d.ts +94 -0
  21. package/dist/esm/auth/oauth-pkce.js +579 -0
  22. package/dist/esm/auth/oauth-pkce.js.map +1 -0
  23. package/dist/esm/auth/resolve.d.ts +4 -3
  24. package/dist/esm/auth/resolve.js +17 -2
  25. package/dist/esm/auth/resolve.js.map +1 -1
  26. package/dist/esm/auth/session-store.d.ts +99 -0
  27. package/dist/esm/auth/session-store.js +242 -0
  28. package/dist/esm/auth/session-store.js.map +1 -0
  29. package/dist/esm/auth/stateful-oauth-strategy.d.ts +20 -24
  30. package/dist/esm/auth/stateful-oauth-strategy.js +16 -114
  31. package/dist/esm/auth/stateful-oauth-strategy.js.map +1 -1
  32. package/dist/esm/auth/types.d.ts +20 -4
  33. package/dist/esm/auth/types.js +1 -1
  34. package/dist/esm/auth/types.js.map +1 -1
  35. package/dist/esm/cli/am-command.d.ts +2 -2
  36. package/dist/esm/cli/am-command.js +13 -4
  37. package/dist/esm/cli/am-command.js.map +1 -1
  38. package/dist/esm/cli/base-command.js +3 -3
  39. package/dist/esm/cli/base-command.js.map +1 -1
  40. package/dist/esm/cli/config.js +3 -1
  41. package/dist/esm/cli/config.js.map +1 -1
  42. package/dist/esm/cli/lifecycle.d.ts +1 -1
  43. package/dist/esm/cli/lifecycle.js.map +1 -1
  44. package/dist/esm/cli/oauth-command.d.ts +12 -11
  45. package/dist/esm/cli/oauth-command.js +73 -41
  46. package/dist/esm/cli/oauth-command.js.map +1 -1
  47. package/dist/esm/cli/ods-command.d.ts +1 -1
  48. package/dist/esm/cli/ods-command.js +5 -3
  49. package/dist/esm/cli/ods-command.js.map +1 -1
  50. package/dist/esm/clients/ods.generated.d.ts +16 -0
  51. package/dist/esm/config/dw-json.d.ts +10 -0
  52. package/dist/esm/config/dw-json.js.map +1 -1
  53. package/dist/esm/config/index.d.ts +1 -0
  54. package/dist/esm/config/index.js +2 -0
  55. package/dist/esm/config/index.js.map +1 -1
  56. package/dist/esm/config/mapping.d.ts +13 -0
  57. package/dist/esm/config/mapping.js +66 -3
  58. package/dist/esm/config/mapping.js.map +1 -1
  59. package/dist/esm/config/redaction.d.ts +39 -0
  60. package/dist/esm/config/redaction.js +51 -0
  61. package/dist/esm/config/redaction.js.map +1 -0
  62. package/dist/esm/config/resolver.js +1 -0
  63. package/dist/esm/config/resolver.js.map +1 -1
  64. package/dist/esm/config/sources/env-source.js +2 -0
  65. package/dist/esm/config/sources/env-source.js.map +1 -1
  66. package/dist/esm/config/sources/package-json-source.js +1 -0
  67. package/dist/esm/config/sources/package-json-source.js.map +1 -1
  68. package/dist/esm/config/types.d.ts +14 -4
  69. package/dist/esm/defaults.d.ts +23 -4
  70. package/dist/esm/defaults.js +36 -4
  71. package/dist/esm/defaults.js.map +1 -1
  72. package/dist/esm/docs/content-cache.d.ts +1 -1
  73. package/dist/esm/docs/content-cache.js +1 -1
  74. package/dist/esm/docs/index.d.ts +1 -1
  75. package/dist/esm/docs/index.js.map +1 -1
  76. package/dist/esm/docs/types.d.ts +29 -0
  77. package/dist/esm/index.d.ts +6 -4
  78. package/dist/esm/index.js +3 -3
  79. package/dist/esm/index.js.map +1 -1
  80. package/dist/esm/instance/index.js +3 -3
  81. package/dist/esm/instance/index.js.map +1 -1
  82. package/dist/esm/operations/cap/index.d.ts +2 -2
  83. package/dist/esm/operations/cap/index.js +1 -1
  84. package/dist/esm/operations/cap/index.js.map +1 -1
  85. package/dist/esm/operations/cap/install.d.ts +17 -0
  86. package/dist/esm/operations/cap/install.js +29 -0
  87. package/dist/esm/operations/cap/install.js.map +1 -1
  88. package/dist/esm/operations/cap/package.js +36 -0
  89. package/dist/esm/operations/cap/package.js.map +1 -1
  90. package/dist/esm/operations/cap/validate.d.ts +9 -0
  91. package/dist/esm/operations/cap/validate.js +29 -0
  92. package/dist/esm/operations/cap/validate.js.map +1 -1
  93. package/dist/esm/operations/content/export.js +7 -3
  94. package/dist/esm/operations/content/export.js.map +1 -1
  95. package/dist/esm/operations/content/library.d.ts +26 -0
  96. package/dist/esm/operations/content/library.js +83 -2
  97. package/dist/esm/operations/content/library.js.map +1 -1
  98. package/dist/esm/operations/content/types.d.ts +10 -1
  99. package/dist/esm/operations/jobs/import-set.d.ts +170 -0
  100. package/dist/esm/operations/jobs/import-set.js +538 -0
  101. package/dist/esm/operations/jobs/import-set.js.map +1 -0
  102. package/dist/esm/operations/jobs/index.d.ts +3 -0
  103. package/dist/esm/operations/jobs/index.js +3 -0
  104. package/dist/esm/operations/jobs/index.js.map +1 -1
  105. package/dist/esm/operations/jobs/run.js +0 -11
  106. package/dist/esm/operations/jobs/run.js.map +1 -1
  107. package/dist/esm/operations/jobs/site-archive.js +13 -75
  108. package/dist/esm/operations/jobs/site-archive.js.map +1 -1
  109. package/dist/esm/operations/ods/index.d.ts +4 -0
  110. package/dist/esm/operations/ods/index.js +2 -0
  111. package/dist/esm/operations/ods/index.js.map +1 -1
  112. package/dist/esm/operations/ods/sandbox-settings.d.ts +51 -0
  113. package/dist/esm/operations/ods/sandbox-settings.js +63 -0
  114. package/dist/esm/operations/ods/sandbox-settings.js.map +1 -0
  115. package/dist/esm/operations/ods/wait-for-clones.d.ts +97 -0
  116. package/dist/esm/operations/ods/wait-for-clones.js +145 -0
  117. package/dist/esm/operations/ods/wait-for-clones.js.map +1 -0
  118. package/package.json +1 -1
  119. package/specs/ods-api-v1.json +43 -0
  120. package/dist/esm/auth/stateful-store.d.ts +0 -49
  121. package/dist/esm/auth/stateful-store.js +0 -166
  122. package/dist/esm/auth/stateful-store.js.map +0 -1
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "version": "2.0.0",
3
- "generatedAt": "2026-07-17T15:31:19.255Z",
3
+ "generatedAt": "2026-08-03T18:06:26.853Z",
4
+ "source": {
5
+ "sha": "073f7f276321e25b00034d3a9a467690024ad9b8",
6
+ "committedAt": "2026-07-02T11:30:54-06:00",
7
+ "ref": "dev"
8
+ },
4
9
  "entries": [
5
10
  {
6
11
  "id": "help-admin/b2c__replication_best_practices",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "generatedAt": "2026-07-02T00:13:16.337Z",
3
+ "generatedAt": "2026-08-03T18:22:27.295Z",
4
4
  "entries": [
5
5
  {
6
6
  "id": "CatalogDeltaExport",
@@ -3,7 +3,7 @@
3
3
  "provenance": {
4
4
  "description": "Catalog of standard (system) B2C Commerce job step type IDs available in Business Manager job flows and jobs.xml site-import flows.",
5
5
  "derivation": "Generated from the public B2C Commerce Job Step API documentation (the jobstepapi section of the Script API documentation archive obtained via `b2c docs download`). Each step lists its purpose, execution scope, and input parameters (required, description, allowed values, default) as published in that documentation.",
6
- "platformDocVersion": "DWAPP 26.7",
6
+ "platformDocVersion": "DWAPP 26.8",
7
7
  "regenerate": "pnpm --filter @salesforce/b2c-tooling-sdk run refresh:docs-data (or, standalone: build:job-steps-dataset -- <jobstep-html-dir> [version]; then generate:job-steps-docs)"
8
8
  },
9
9
  "steps": [
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "generatedAt": "2026-07-09T21:59:05.025Z",
3
+ "generatedAt": "2026-08-03T18:24:52.134Z",
4
+ "platformDocVersion": "DWAPP 26.8",
4
5
  "entries": [
5
6
  {
6
7
  "id": "dw.alert",
@@ -545,7 +546,7 @@
545
546
  "category": "script-api",
546
547
  "url": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.catalog.ProductSearchModel.html",
547
548
  "sourceUrl": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.catalog.ProductSearchModel.md",
548
- "headings": "Constant Summary • Property Summary • Constructor Summary • Method Summary • Methods inherited from class SearchModel • Methods inherited from class Object • Constant Details • CATEGORYID_PARAMETER • INVENTORY_LIST_IDS_PARAMETER • MAXIMUM_INVENTORY_LIST_IDS • MAXIMUM_PRODUCT_IDS • MAXIMUM_STORE_INVENTORY_FILTER_VALUES • PRICE_MAX_PARAMETER • PRICE_MIN_PARAMETER • PRODUCTID_PARAMETER • PROMOTIONID_PARAMETER • PROMOTION_PRODUCT_TYPE_ALL • PROMOTION_PRODUCT_TYPE_BONUS • PROMOTION_PRODUCT_TYPE_DISCOUNTED • PROMOTION_PRODUCT_TYPE_PARAMETER • PROMOTION_PRODUCT_TYPE_QUALIFYING • REFINE_NAME_PARAMETER_PREFIX • REFINE_VALUE_PARAMETER_PREFIX • SORTING_OPTION_PARAMETER • SORTING_RULE_PARAMETER • SORT_BY_PARAMETER_PREFIX • SORT_DIRECTION_PARAMETER_PREFIX • Property Details • category • categoryID • categorySearch • deepestCommonCategory • effectiveSortingRule • inventoryIDs • orderableProductsOnly • pageMetaTags • personalizedSort • priceMax • priceMin • productID • productIDs • productSearchHits • products • promotionID • promotionIDs • promotionProductType • recursiveCategorySearch • refinedByCategory • refinedByPrice • refinedByPromotion • refinedCategorySearch • refinementCategory • refinements • searchPhraseSuggestions • searchableImageUploadURL • sortingRule • storeInventoryFilter • suggestedSearchPhrase • suggestedSearchPhrases • trackingEmptySearchesEnabled • visualSearch • Constructor Details • ProductSearchModel() • Method Details • addHitTypeRefinement(String...) • excludeHitType(String...) • getCategory() • getCategoryID() • getDeepestCommonCategory() • getEffectiveSortingRule() • getInventoryIDs() • getOrderableProductsOnly() • getPageMetaTag(String) • getPageMetaTags() • getPriceMax() • getPriceMin() • getProductID() • getProductIDs() • getProductSearchHit(Product) • getProductSearchHits() • getProducts() • getPromotionID() • getPromotionIDs() • getPromotionProductType() • getRefinementCategory() • getRefinements() • getSearchPhraseSuggestions() • getSearchableImageUploadURL() • getSortingRule() • getStoreInventoryFilter() • getSuggestedSearchPhrase() • getSuggestedSearchPhrases() • isCategorySearch() • isPersonalizedSort() • isRecursiveCategorySearch() • isRefinedByCategory() • isRefinedByPrice() • isRefinedByPriceRange(Number, Number) • isRefinedByPromotion() • isRefinedByPromotion(String) • isRefinedCategorySearch() • isTrackingEmptySearchesEnabled() • isVisualSearch() • search() • setCategoryID(String) • setEnableTrackingEmptySearches(Boolean) • setInventoryListIDs(List) • setOrderableProductsOnly(Boolean) • setPriceMax(Number) • setPriceMin(Number) • setProductID(String) • setProductIDs(List) • setPromotionID(String) • setPromotionIDs(List) • setPromotionProductType(String) • setRecursiveCategorySearch(Boolean) • setRefinementCategory(Category) • setSearchableImageID(String) • setSortingCondition(String, Number) • setSortingOption(SortingOption) • setSortingRule(SortingRule) • setStoreInventoryFilter(StoreInventoryFilter) • urlForCategory(URL, String) • urlForCategory(String, String) • urlForProduct(URL, String, String) • urlForProduct(String, String, String) • urlForRefine(URL, String, String) • urlForRefine(String, String, String) • urlRefineCategory(URL, String) • urlRefineCategory(String, String) • urlRefinePrice(URL, Number, Number) • urlRefinePrice(String, Number, Number) • urlRefinePromotion(URL, String) • urlRefinePromotion(String, String) • urlRelaxCategory(URL) • urlRelaxCategory(String) • urlRelaxPrice(URL) • urlRelaxPrice(String) • urlRelaxPromotion(URL) • urlRelaxPromotion(String) • urlSortingOption(URL, SortingOption) • urlSortingOption(String, SortingOption) • urlSortingRule(URL, SortingRule) • urlSortingRule(String, SortingRule)",
549
+ "headings": "Constant Summary • Property Summary • Constructor Summary • Method Summary • Methods inherited from class SearchModel • Methods inherited from class Object • Constant Details • CATEGORYID_PARAMETER • INVENTORY_LIST_IDS_PARAMETER • MAXIMUM_INVENTORY_LIST_IDS • MAXIMUM_PRODUCT_IDS • MAXIMUM_STORE_INVENTORY_FILTER_VALUES • PRICE_MAX_PARAMETER • PRICE_MIN_PARAMETER • PRODUCTID_PARAMETER • PROMOTIONID_PARAMETER • PROMOTION_PRODUCT_TYPE_ALL • PROMOTION_PRODUCT_TYPE_BONUS • PROMOTION_PRODUCT_TYPE_DISCOUNTED • PROMOTION_PRODUCT_TYPE_PARAMETER • PROMOTION_PRODUCT_TYPE_QUALIFYING • REFINE_NAME_PARAMETER_PREFIX • REFINE_VALUE_PARAMETER_PREFIX • SORTING_OPTION_PARAMETER • SORTING_RULE_PARAMETER • SORT_BY_PARAMETER_PREFIX • SORT_DIRECTION_PARAMETER_PREFIX • Property Details • category • categoryID • categorySearch • deepestCommonCategory • effectiveSearchMode • effectiveSortingRule • inventoryIDs • orderableProductsOnly • pageMetaTags • personalizedSort • priceMax • priceMin • productID • productIDs • productSearchHits • products • promotionID • promotionIDs • promotionProductType • recursiveCategorySearch • refinedByCategory • refinedByPrice • refinedByPromotion • refinedCategorySearch • refinementCategory • refinements • searchMode • searchPhraseSuggestions • searchableImageUploadURL • sortingRule • storeInventoryFilter • suggestedSearchPhrase • suggestedSearchPhrases • trackingEmptySearchesEnabled • visualSearch • Constructor Details • ProductSearchModel() • Method Details • addHitTypeRefinement(String...) • excludeHitType(String...) • getCategory() • getCategoryID() • getDeepestCommonCategory() • getEffectiveSearchMode() • getEffectiveSortingRule() • getInventoryIDs() • getOrderableProductsOnly() • getPageMetaTag(String) • getPageMetaTags() • getPriceMax() • getPriceMin() • getProductID() • getProductIDs() • getProductSearchHit(Product) • getProductSearchHits() • getProducts() • getPromotionID() • getPromotionIDs() • getPromotionProductType() • getRefinementCategory() • getRefinements() • getSearchMode() • getSearchPhraseSuggestions() • getSearchableImageUploadURL() • getSortingRule() • getStoreInventoryFilter() • getSuggestedSearchPhrase() • getSuggestedSearchPhrases() • isCategorySearch() • isPersonalizedSort() • isRecursiveCategorySearch() • isRefinedByCategory() • isRefinedByPrice() • isRefinedByPriceRange(Number, Number) • isRefinedByPromotion() • isRefinedByPromotion(String) • isRefinedCategorySearch() • isTrackingEmptySearchesEnabled() • isVisualSearch() • search() • setCategoryID(String) • setEnableTrackingEmptySearches(Boolean) • setInventoryListIDs(List) • setOrderableProductsOnly(Boolean) • setPriceMax(Number) • setPriceMin(Number) • setProductID(String) • setProductIDs(List) • setPromotionID(String) • setPromotionIDs(List) • setPromotionProductType(String) • setRecursiveCategorySearch(Boolean) • setRefinementCategory(Category) • setSearchMode(String) • setSearchableImageID(String) • setSortingCondition(String, Number) • setSortingOption(SortingOption) • setSortingRule(SortingRule) • setStoreInventoryFilter(StoreInventoryFilter) • urlForCategory(URL, String) • urlForCategory(String, String) • urlForProduct(URL, String, String) • urlForProduct(String, String, String) • urlForRefine(URL, String, String) • urlForRefine(String, String, String) • urlRefineCategory(URL, String) • urlRefineCategory(String, String) • urlRefinePrice(URL, Number, Number) • urlRefinePrice(String, Number, Number) • urlRefinePromotion(URL, String) • urlRefinePromotion(String, String) • urlRelaxCategory(URL) • urlRelaxCategory(String) • urlRelaxPrice(URL) • urlRelaxPrice(String) • urlRelaxPromotion(URL) • urlRelaxPromotion(String) • urlSortingOption(URL, SortingOption) • urlSortingOption(String, SortingOption) • urlSortingRule(URL, SortingRule) • urlSortingRule(String, SortingRule)",
549
550
  "preview": "- [dw.catalog.SearchModel](dw.catalog.SearchModel.md)"
550
551
  },
551
552
  {
@@ -728,6 +729,40 @@
728
729
  "headings": "Property Summary • Constructor Summary • Method Summary • Methods inherited from class Product • Methods inherited from class ExtensibleObject • Methods inherited from class PersistentObject • Methods inherited from class Object • Property Details • EAN • UPC • allProductLinks • brand • classificationCategory • custom • image • longDescription • manufacturerName • manufacturerSKU • masterProduct • name • onlineFrom • onlineTo • optionProduct • pageDescription • pageKeywords • pageTitle • pageURL • productLinks • shortDescription • taxClassID • template • thumbnail • unit • unitQuantity • Method Details • getAllProductLinks() • getAllProductLinks(Number) • getBrand() • getClassificationCategory() • getCustom() • getEAN() • getImage() • getLongDescription() • getManufacturerName() • getManufacturerSKU() • getMasterProduct() • getName() • getOnlineFrom() • getOnlineTo() • getPageDescription() • getPageKeywords() • getPageTitle() • getPageURL() • getProductLinks() • getProductLinks(Number) • getRecommendations(Number) • getShortDescription() • getTaxClassID() • getTemplate() • getThumbnail() • getUPC() • getUnit() • getUnitQuantity() • isOptionProduct()",
729
730
  "preview": "- [dw.object.PersistentObject](dw.object.PersistentObject.md)"
730
731
  },
732
+ {
733
+ "id": "dw.commerceapps",
734
+ "title": "Package dw.commerceapps",
735
+ "category": "script-api",
736
+ "url": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.commerceapps.html",
737
+ "sourceUrl": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.commerceapps.md",
738
+ "headings": "Classes"
739
+ },
740
+ {
741
+ "id": "dw.commerceapps.ConnectionHealthStatusCodes",
742
+ "title": "Class ConnectionHealthStatusCodes",
743
+ "category": "script-api",
744
+ "url": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.commerceapps.ConnectionHealthStatusCodes.html",
745
+ "sourceUrl": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.commerceapps.ConnectionHealthStatusCodes.md",
746
+ "headings": "Constant Summary • Constructor Summary • Method Summary • Methods inherited from class Object • Constant Details • DETAIL_MESSAGE • DETAIL_REMEDIATION • STATUS_CODE_DEGRADED • STATUS_CODE_UNHEALTHY • Constructor Details • ConnectionHealthStatusCodes()",
747
+ "preview": "- [dw.commerceapps.ConnectionHealthStatusCodes](dw.commerceapps.ConnectionHealthStatusCodes.md)"
748
+ },
749
+ {
750
+ "id": "dw.commerceapps.hooks",
751
+ "title": "Package dw.commerceapps.hooks",
752
+ "category": "script-api",
753
+ "url": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.commerceapps.hooks.html",
754
+ "sourceUrl": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.commerceapps.hooks.md",
755
+ "headings": "Classes"
756
+ },
757
+ {
758
+ "id": "dw.commerceapps.hooks.ConnectionHealthCheckHooks",
759
+ "title": "Class ConnectionHealthCheckHooks",
760
+ "category": "script-api",
761
+ "url": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.commerceapps.hooks.ConnectionHealthCheckHooks.html",
762
+ "sourceUrl": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.commerceapps.hooks.ConnectionHealthCheckHooks.md",
763
+ "headings": "Constructor Summary • Method Summary • Methods inherited from class Object • Method Details • checkConnectionHealth()",
764
+ "preview": "- [dw.commerceapps.hooks.ConnectionHealthCheckHooks](dw.commerceapps.hooks.ConnectionHealthCheckHooks.md)"
765
+ },
731
766
  {
732
767
  "id": "dw.content",
733
768
  "title": "Package dw.content",
@@ -2534,6 +2569,15 @@
2534
2569
  "headings": "Constant Summary • Constructor Summary • Method Summary • Methods inherited from class Object • Constant Details • extensionPointAddReturnItem • extensionPointAfterStatusChange • extensionPointChangeStatus • extensionPointCreateReturn • extensionPointNotifyStatusChange • Method Details • addReturnItem(Return, ReturnItemWO) • afterStatusChange(Return) • changeStatus(Return, ReturnWO) • createReturn(ReturnWO) • notifyStatusChange(Return)",
2535
2570
  "preview": "- [dw.order.hooks.ReturnHooks](dw.order.hooks.ReturnHooks.md)"
2536
2571
  },
2572
+ {
2573
+ "id": "dw.order.hooks.ShippingHooks",
2574
+ "title": "Class ShippingHooks",
2575
+ "category": "script-api",
2576
+ "url": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.hooks.ShippingHooks.html",
2577
+ "sourceUrl": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.hooks.ShippingHooks.md",
2578
+ "headings": "Constant Summary • Constructor Summary • Method Summary • Methods inherited from class Object • Constant Details • SHIPPING_DOMAIN • extensionPointCalculate • extensionPointQuote • Method Details • calculate(LineItemCtnr) • quote(Shipment, ShippingMethodResultWO)",
2579
+ "preview": "- [dw.order.hooks.ShippingHooks](dw.order.hooks.ShippingHooks.md)"
2580
+ },
2537
2581
  {
2538
2582
  "id": "dw.order.hooks.ShippingOrderHooks",
2539
2583
  "title": "Class ShippingOrderHooks",
@@ -2864,7 +2908,7 @@
2864
2908
  "category": "script-api",
2865
2909
  "url": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingMgr.html",
2866
2910
  "sourceUrl": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingMgr.md",
2867
- "headings": "Property Summary • Constructor Summary • Method Summary • Methods inherited from class Object • Property Details • allShippingMethods • defaultShippingMethod • Method Details • applyShippingCost(LineItemCtnr) • getAllShippingMethods() • getDefaultShippingMethod() • getProductShippingModel(Product) • getShipmentShippingModel(Shipment) • getShippingCost(ShippingMethod, Money)",
2911
+ "headings": "Property Summary • Constructor Summary • Method Summary • Methods inherited from class Object • Property Details • allShippingMethods • defaultShippingMethod • Method Details • applyShipping(Basket) • applyShippingCost(LineItemCtnr) • getAllShippingMethods() • getDefaultShippingMethod() • getProductShippingModel(Product) • getShipmentShippingModel(Shipment) • getShippingCost(ShippingMethod, Money)",
2868
2912
  "preview": "- [dw.order.ShippingMgr](dw.order.ShippingMgr.md)"
2869
2913
  },
2870
2914
  {
@@ -3131,7 +3175,7 @@
3131
3175
  "category": "script-api",
3132
3176
  "url": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.suggest.SuggestModel.html",
3133
3177
  "sourceUrl": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/dw.suggest.SuggestModel.md",
3134
- "headings": "Constant Summary • Property Summary • Constructor Summary • Method Summary • Methods inherited from class Object • Constant Details • MAX_SUGGESTIONS • Property Details • brandSuggestions • categorySuggestions • contentSuggestions • customSuggestions • filteredByFolder • popularSearchPhrases • productSuggestions • recentSearchPhrases • Constructor Details • SuggestModel() • Method Details • addRefinementValues(String, String) • getBrandSuggestions() • getCategorySuggestions() • getContentSuggestions() • getCustomSuggestions() • getPopularSearchPhrases() • getProductSuggestions() • getRecentSearchPhrases() • isFilteredByFolder() • removeRefinementValues(String, String) • setCategoryID(String) • setFilteredByFolder(Boolean) • setMaxSuggestions(Number) • setRefinementValues(String, String) • setSearchPhrase(String)",
3178
+ "headings": "Constant Summary • Property Summary • Constructor Summary • Method Summary • Methods inherited from class Object • Constant Details • MAX_SUGGESTIONS • Property Details • brandSuggestions • categorySuggestions • contentSuggestions • customSuggestions • effectiveSearchMode • filteredByFolder • popularSearchPhrases • productSuggestions • recentSearchPhrases • searchMode • Constructor Details • SuggestModel() • Method Details • addRefinementValues(String, String) • getBrandSuggestions() • getCategorySuggestions() • getContentSuggestions() • getCustomSuggestions() • getEffectiveSearchMode() • getPopularSearchPhrases() • getProductSuggestions() • getRecentSearchPhrases() • getSearchMode() • isFilteredByFolder() • removeRefinementValues(String, String) • setCategoryID(String) • setFilteredByFolder(Boolean) • setMaxSuggestions(Number) • setRefinementValues(String, String) • setSearchMode(String) • setSearchPhrase(String)",
3135
3179
  "preview": "- [dw.suggest.SuggestModel](dw.suggest.SuggestModel.md)"
3136
3180
  },
3137
3181
  {
@@ -4218,7 +4262,7 @@
4218
4262
  },
4219
4263
  {
4220
4264
  "id": "index",
4221
- "title": "B2C Commerce Script API 26.7",
4265
+ "title": "B2C Commerce Script API 26.8",
4222
4266
  "category": "script-api",
4223
4267
  "url": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/index.html",
4224
4268
  "sourceUrl": "https://developer.salesforce.com/docs/commerce/b2c-commerce/references/b2c-script-api/index.md",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "2.0.0",
3
- "generatedAt": "2026-07-10T21:10:52.949Z",
3
+ "generatedAt": "2026-08-03T18:28:01.841Z",
4
4
  "entries": [
5
5
  {
6
6
  "id": "guide-account-manager",
@@ -80,7 +80,7 @@
80
80
  "category": "tooling",
81
81
  "url": "https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/ide-integration.html",
82
82
  "sourceUrl": "https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/ide-integration.md",
83
- "headings": "Script API IntelliSense • B2C DX VS Code Extension (recommended) • Standalone VS Code, WebStorm, or IntelliJ Ultimate • Neovim, Helix, Zed, Sublime, or other LSP-based editors • Notes • IntelliJ SFCC Plugin • Setup",
83
+ "headings": "Script API IntelliSense • Salesforce B2C Commerce VS Code Extension (recommended) • Standalone VS Code, WebStorm, or IntelliJ Ultimate • Neovim, Helix, Zed, Sublime, or other LSP-based editors • Notes • IntelliJ SFCC Plugin • Setup",
84
84
  "preview": "Configure IDE tooling like the IntelliJ SFCC plugin to consume resolved B2C CLI configuration, plus enable Script API IntelliSense via TypeScript definitions."
85
85
  },
86
86
  {
@@ -43,6 +43,7 @@
43
43
  <xsd:enumeration value="ISV_APP" />
44
44
  <xsd:enumeration value="NATIVE_FEATURE" />
45
45
  <xsd:enumeration value="CUSTOM_FEATURE" />
46
+ <xsd:enumeration value="CUSTOM_APP" />
46
47
  </xsd:restriction>
47
48
  </xsd:simpleType>
48
49
 
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "generatedAt": "2026-07-09T21:59:05.031Z",
3
+ "generatedAt": "2026-08-03T18:24:52.137Z",
4
+ "platformDocVersion": "DWAPP 26.8",
4
5
  "entries": [
5
6
  {
6
7
  "id": "abtest",
@@ -29,6 +29,8 @@
29
29
  <xsd:element name="destination-url" type="Generic.String.256" minOccurs="0" maxOccurs="1" />
30
30
  <xsd:element name="additional-url-params" type="Generic.String.2048" minOccurs="0" maxOccurs="1" />
31
31
  <xsd:element name="copy-source-params" type="CopySourceParamsType" minOccurs="0" maxOccurs="1" />
32
+ <xsd:element name="online-from" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true" />
33
+ <xsd:element name="online-to" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true" />
32
34
  </xsd:sequence>
33
35
  <xsd:attribute name="uri" type="Generic.NonEmptyString.2048" use="optional" />
34
36
  <xsd:attribute name="source-id" type="Generic.NonEmptyString.256" use="optional" />
@@ -54,7 +54,7 @@
54
54
  *
55
55
  * @module auth
56
56
  */
57
- export type { AuthStrategy, FetchInit, AccessTokenResponse, DecodedJWT, AuthConfig, BasicAuthConfig, OAuthAuthConfig, ApiKeyAuthConfig, AuthMethod, AuthCredentials, } from './types.js';
57
+ export type { AuthStrategy, UserAuthStrategy, FetchInit, AccessTokenResponse, DecodedJWT, AuthConfig, BasicAuthConfig, OAuthAuthConfig, ApiKeyAuthConfig, AuthMethod, AuthCredentials, } from './types.js';
58
58
  export { ALL_AUTH_METHODS } from './types.js';
59
59
  export { encodeBasicClientCredentials } from './client-credentials.js';
60
60
  export { BasicAuthStrategy } from './basic.js';
@@ -62,13 +62,16 @@ export { OAuthStrategy, decodeJWT } from './oauth.js';
62
62
  export type { OAuthConfig } from './oauth.js';
63
63
  export { ImplicitOAuthStrategy } from './oauth-implicit.js';
64
64
  export type { ImplicitOAuthConfig } from './oauth-implicit.js';
65
+ export { PkceOAuthStrategy, PkceGrantUnsupportedError } from './oauth-pkce.js';
66
+ export type { PkceOAuthConfig } from './oauth-pkce.js';
67
+ export { PkceWithImplicitFallbackStrategy, createUserAuthStrategy, isPkceFallbackDisabled, } from './oauth-pkce-fallback.js';
65
68
  export { JwtOAuthStrategy } from './oauth-jwt.js';
66
69
  export type { JwtOAuthConfig } from './oauth-jwt.js';
67
70
  export { ApiKeyStrategy } from './api-key.js';
68
71
  export { StatefulOAuthStrategy } from './stateful-oauth-strategy.js';
69
72
  export type { StatefulOAuthStrategyOptions } from './stateful-oauth-strategy.js';
70
- export { initializeStatefulStore, getStoredSession, setStoredSession, clearStoredSession, isStatefulTokenValid, resetStatefulStoreForTesting, } from './stateful-store.js';
71
- export type { StatefulSession } from './stateful-store.js';
73
+ export { initializeFileAuthSessionStore, setAuthSessionBackend, getAuthSessionBackend, FileAuthSessionBackend, InMemoryAuthSessionBackend, findAuthSession, saveAuthSession, deleteAuthSession, listAuthSessions, clearAllAuthSessions, isAuthSessionTokenValid, resetAuthSessionStoreForTesting, } from './session-store.js';
74
+ export type { AuthSession, AuthSessionBackend, AuthSessionFlow } from './session-store.js';
72
75
  export { resolveAuthStrategy, checkAvailableAuthMethods } from './resolve.js';
73
76
  export type { ResolveAuthStrategyOptions, AvailableAuthMethods } from './resolve.js';
74
77
  export { globalAuthMiddlewareRegistry, AuthMiddlewareRegistry, applyAuthRequestMiddleware, applyAuthResponseMiddleware, } from './middleware.js';
@@ -66,11 +66,13 @@ export { encodeBasicClientCredentials } from './client-credentials.js';
66
66
  export { BasicAuthStrategy } from './basic.js';
67
67
  export { OAuthStrategy, decodeJWT } from './oauth.js';
68
68
  export { ImplicitOAuthStrategy } from './oauth-implicit.js';
69
+ export { PkceOAuthStrategy, PkceGrantUnsupportedError } from './oauth-pkce.js';
70
+ export { PkceWithImplicitFallbackStrategy, createUserAuthStrategy, isPkceFallbackDisabled, } from './oauth-pkce-fallback.js';
69
71
  export { JwtOAuthStrategy } from './oauth-jwt.js';
70
72
  export { ApiKeyStrategy } from './api-key.js';
71
73
  export { StatefulOAuthStrategy } from './stateful-oauth-strategy.js';
72
- // Stateful auth store
73
- export { initializeStatefulStore, getStoredSession, setStoredSession, clearStoredSession, isStatefulTokenValid, resetStatefulStoreForTesting, } from './stateful-store.js';
74
+ // Unified auth-session store (PKCE, implicit, and client-credentials sessions)
75
+ export { initializeFileAuthSessionStore, setAuthSessionBackend, getAuthSessionBackend, FileAuthSessionBackend, InMemoryAuthSessionBackend, findAuthSession, saveAuthSession, deleteAuthSession, listAuthSessions, clearAllAuthSessions, isAuthSessionTokenValid, resetAuthSessionStoreForTesting, } from './session-store.js';
74
76
  // Resolution helpers
75
77
  export { resolveAuthStrategy, checkAvailableAuthMethods } from './resolve.js';
76
78
  // Auth middleware
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAeH,OAAO,EAAC,gBAAgB,EAAC,MAAM,YAAY,CAAC;AAE5C,+CAA+C;AAC/C,OAAO,EAAC,4BAA4B,EAAC,MAAM,yBAAyB,CAAC;AAErE,aAAa;AACb,OAAO,EAAC,iBAAiB,EAAC,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AAEpD,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAC,qBAAqB,EAAC,MAAM,8BAA8B,CAAC;AAGnE,sBAAsB;AACtB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAG7B,qBAAqB;AACrB,OAAO,EAAC,mBAAmB,EAAE,yBAAyB,EAAC,MAAM,cAAc,CAAC;AAG5E,kBAAkB;AAClB,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,GAC5B,MA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icitOAuthConfig {
27
27
  * doesn't work (e.g., VS Code remote/Codespaces where `vscode.env.openExternal` is needed).
28
28
  */
29
29
  openBrowser?: (url: string) => Promise<void>;
30
+ /**
31
+ * Persist the access token to the unified auth-session store between CLI
32
+ * invocations. The implicit flow returns no refresh token, so when the
33
+ * stored token expires the user is prompted again.
34
+ * Defaults to `true`.
35
+ */
36
+ persistSession?: boolean;
30
37
  }
31
38
  /**
32
39
  * OAuth 2.0 Implicit Grant Flow authentication strategy.
@@ -56,13 +63,25 @@ export declare class ImplicitOAuthStrategy implements AuthStrategy {
56
63
  private accountManagerHost;
57
64
  private localPort;
58
65
  private redirectUri;
66
+ private persistSession;
59
67
  private _hasHadSuccess;
68
+ private _sub;
69
+ private _hydrated;
60
70
  /**
61
71
  * Creates a new ImplicitOAuthStrategy instance.
62
72
  *
63
73
  * @param config - OAuth implicit flow configuration containing clientId, optional scopes, accountManagerHost, localPort, redirectUri, and openBrowser callback.
64
74
  */
65
75
  constructor(config: ImplicitOAuthConfig);
76
+ /**
77
+ * Load any persisted implicit session for this clientId. Idempotent.
78
+ * Skips PKCE-flow records (different shape, different flow tag).
79
+ */
80
+ private hydrate;
81
+ /**
82
+ * Persist the current access token. Implicit flow has no refresh token.
83
+ */
84
+ private persistTokens;
66
85
  fetch(url: string, init?: FetchInit): Promise<Response>;
67
86
  getAuthorizationHeader(): Promise<string>;
68
87
  /**
@@ -9,6 +9,7 @@ import { dispatchFetch } from './dispatch-fetch.js';
9
9
  import { getLogger } from '../logging/logger.js';
10
10
  import { decodeJWT } from './oauth.js';
11
11
  import { DEFAULT_ACCOUNT_MANAGER_HOST } from '../defaults.js';
12
+ import { findAuthSession, saveAuthSession } from './session-store.js';
12
13
  const DEFAULT_LOCAL_PORT = 8080;
13
14
  // Module-level token cache to support multiple instances with same clientId
14
15
  const ACCESS_TOKEN_CACHE = new Map();
@@ -79,7 +80,10 @@ export class ImplicitOAuthStrategy {
79
80
  accountManagerHost;
80
81
  localPort;
81
82
  redirectUri;
83
+ persistSession;
82
84
  _hasHadSuccess = false;
85
+ _sub = '';
86
+ _hydrated = false;
83
87
  /**
84
88
  * Creates a new ImplicitOAuthStrategy instance.
85
89
  *
@@ -90,15 +94,78 @@ export class ImplicitOAuthStrategy {
90
94
  this.accountManagerHost = config.accountManagerHost || DEFAULT_ACCOUNT_MANAGER_HOST;
91
95
  this.localPort = config.localPort || parseInt(process.env.SFCC_OAUTH_LOCAL_PORT || '', 10) || DEFAULT_LOCAL_PORT;
92
96
  this.redirectUri = config.redirectUri || process.env.SFCC_REDIRECT_URI || `http://localhost:${this.localPort}`;
97
+ this.persistSession = config.persistSession !== false;
93
98
  const logger = getLogger();
94
99
  logger.debug({
95
100
  clientId: this.config.clientId,
96
101
  accountManagerHost: this.accountManagerHost,
97
102
  port: this.localPort,
98
103
  redirectUri: this.redirectUri,
104
+ persistSession: this.persistSession,
99
105
  }, '[Auth] ImplicitOAuthStrategy initialized');
100
106
  logger.trace({ scopes: this.config.scopes }, '[Auth] Configured scopes');
101
107
  }
108
+ /**
109
+ * Load any persisted implicit session for this clientId. Idempotent.
110
+ * Skips PKCE-flow records (different shape, different flow tag).
111
+ */
112
+ hydrate() {
113
+ if (!this.persistSession || this._hydrated)
114
+ return;
115
+ this._hydrated = true;
116
+ try {
117
+ const stored = findAuthSession(this.config.clientId);
118
+ if (!stored || stored.flow !== 'implicit')
119
+ return;
120
+ this._sub = stored.sub ?? '';
121
+ if (!ACCESS_TOKEN_CACHE.has(this.config.clientId) && stored.accessToken) {
122
+ const expires = stored.expiresAt ? new Date(stored.expiresAt) : new Date(0);
123
+ ACCESS_TOKEN_CACHE.set(this.config.clientId, {
124
+ accessToken: stored.accessToken,
125
+ expires,
126
+ scopes: stored.scopes ?? [],
127
+ });
128
+ }
129
+ getLogger().debug({ clientId: this.config.clientId, sub: this._sub }, '[Auth] Hydrated implicit session from store');
130
+ }
131
+ catch (error) {
132
+ getLogger().debug({ err: error }, '[Auth] Implicit store hydration failed');
133
+ }
134
+ }
135
+ /**
136
+ * Persist the current access token. Implicit flow has no refresh token.
137
+ */
138
+ persistTokens(tokenResponse) {
139
+ if (!this.persistSession)
140
+ return;
141
+ let sub = this._sub;
142
+ try {
143
+ const decoded = decodeJWT(tokenResponse.accessToken);
144
+ if (typeof decoded.payload.sub === 'string' && decoded.payload.sub.length > 0) {
145
+ sub = decoded.payload.sub;
146
+ }
147
+ }
148
+ catch {
149
+ // ignore
150
+ }
151
+ this._sub = sub;
152
+ const record = {
153
+ clientId: this.config.clientId,
154
+ flow: 'implicit',
155
+ accessToken: tokenResponse.accessToken,
156
+ refreshToken: null,
157
+ sub,
158
+ expiresAt: tokenResponse.expires.toISOString(),
159
+ scopes: tokenResponse.scopes,
160
+ accountManagerHost: this.accountManagerHost,
161
+ };
162
+ try {
163
+ saveAuthSession(record);
164
+ }
165
+ catch (error) {
166
+ getLogger().debug({ err: error }, '[Auth] Failed to persist implicit session');
167
+ }
168
+ }
102
169
  async fetch(url, init = {}) {
103
170
  const logger = getLogger();
104
171
  const method = init.method || 'GET';
@@ -147,6 +214,7 @@ export class ImplicitOAuthStrategy {
147
214
  */
148
215
  async getTokenResponse() {
149
216
  const logger = getLogger();
217
+ this.hydrate();
150
218
  const cached = ACCESS_TOKEN_CACHE.get(this.config.clientId);
151
219
  if (cached) {
152
220
  const now = new Date();
@@ -160,6 +228,7 @@ export class ImplicitOAuthStrategy {
160
228
  // Get new token via implicit flow
161
229
  const tokenResponse = await this.implicitFlowLogin();
162
230
  ACCESS_TOKEN_CACHE.set(this.config.clientId, tokenResponse);
231
+ this.persistTokens(tokenResponse);
163
232
  return tokenResponse;
164
233
  }
165
234
  /**
@@ -174,6 +243,7 @@ export class ImplicitOAuthStrategy {
174
243
  */
175
244
  async getAccessToken() {
176
245
  const logger = getLogger();
246
+ this.hydrate();
177
247
  const clientId = this.config.clientId;
178
248
  const cached = ACCESS_TOKEN_CACHE.get(clientId);
179
249
  logger.trace({ clientId, hasCached: !!cached }, '[Auth] Getting access token');
@@ -216,6 +286,7 @@ export class ImplicitOAuthStrategy {
216
286
  try {
217
287
  const tokenResponse = await authPromise;
218
288
  ACCESS_TOKEN_CACHE.set(clientId, tokenResponse);
289
+ this.persistTokens(tokenResponse);
219
290
  logger.debug({ expiresAt: tokenResponse.expires.toISOString(), scopes: tokenResponse.scopes }, '[Auth] New token cached');
220
291
  return tokenResponse.accessToken;
221
292
  }
@@ -252,17 +323,20 @@ export class ImplicitOAuthStrategy {
252
323
  // Print URL to console (in case machine has no default browser)
253
324
  logger.info({ url: authorizeUrl }, `Login URL: ${authorizeUrl}`);
254
325
  logger.info('If the URL does not open automatically, copy/paste it into a browser on this machine.');
255
- // Attempt to open the browser (prefer injected opener, fall back to `open` package)
256
- logger.debug('[Auth] Attempting to open browser');
257
- if (this.config.openBrowser) {
258
- await this.config.openBrowser(authorizeUrl);
259
- }
260
- else {
261
- await openBrowserDefault(authorizeUrl);
262
- }
263
326
  return new Promise((resolve, reject) => {
264
327
  const sockets = new Set();
265
328
  const startTime = Date.now();
329
+ let settled = false;
330
+ const rejectAndClose = (error) => {
331
+ if (settled)
332
+ return;
333
+ settled = true;
334
+ server.close(() => reject(error));
335
+ setTimeout(() => {
336
+ for (const socket of sockets)
337
+ socket.destroy();
338
+ }, 100);
339
+ };
266
340
  const server = createServer((request, response) => {
267
341
  const requestUrl = new URL(request.url || '/', `http://localhost:${this.localPort}`);
268
342
  const accessToken = requestUrl.searchParams.get('access_token');
@@ -297,6 +371,7 @@ export class ImplicitOAuthStrategy {
297
371
  const expiration = new Date(now.getTime() + expiresIn * 1000);
298
372
  const scopes = requestUrl.searchParams.get('scope')?.split(' ') ?? [];
299
373
  logger.debug({ expiresIn, expiresAt: expiration.toISOString(), scopes }, `[Auth] Token expires in ${expiresIn}s, scopes: ${scopes.join(' ')}`);
374
+ settled = true;
300
375
  resolve({
301
376
  accessToken,
302
377
  expires: expiration,
@@ -322,6 +397,7 @@ export class ImplicitOAuthStrategy {
322
397
  response.writeHead(500, { 'Content-Type': 'text/plain' });
323
398
  response.write(`Authentication failed: ${errorMessage}`);
324
399
  response.end();
400
+ settled = true;
325
401
  reject(new Error(`OAuth error: ${errorMessage}`));
326
402
  setTimeout(() => {
327
403
  server.close();
@@ -339,16 +415,33 @@ export class ImplicitOAuthStrategy {
339
415
  logger.trace({ socketCount: sockets.size }, '[Auth] Socket closed');
340
416
  });
341
417
  });
342
- server.listen(this.localPort, () => {
418
+ server.listen(this.localPort, async () => {
343
419
  logger.debug({ port: this.localPort }, `[Auth] OAuth redirect server listening on port ${this.localPort}`);
344
420
  logger.info('Waiting for user to authenticate...');
421
+ // Bind the callback listener before opening the browser so an existing
422
+ // SSO session cannot redirect back to a closed port.
423
+ logger.debug('[Auth] Attempting to open browser');
424
+ try {
425
+ if (this.config.openBrowser) {
426
+ await this.config.openBrowser(authorizeUrl);
427
+ }
428
+ else {
429
+ await openBrowserDefault(authorizeUrl);
430
+ }
431
+ }
432
+ catch (error) {
433
+ rejectAndClose(error instanceof Error ? error : new Error(String(error)));
434
+ }
345
435
  });
346
436
  server.on('error', (err) => {
347
437
  logger.error({ error: err.message, port: this.localPort }, '[Auth] Failed to start OAuth redirect server');
348
438
  const hint = 'code' in err && err.code === 'EADDRINUSE'
349
439
  ? ` Port ${this.localPort} is in use; set SFCC_OAUTH_LOCAL_PORT or pass localPort to use a different port.`
350
440
  : '';
351
- reject(new Error(`Failed to start OAuth redirect server: ${err.message}.${hint}`));
441
+ if (!settled) {
442
+ settled = true;
443
+ reject(new Error(`Failed to start OAuth redirect server: ${err.message}.${hint}`));
444
+ }
352
445
  });
353
446
  });
354
447
  }
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-implicit.js","sourceRoot":"","sources":["../../../src/auth/oauth-implicit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,YAAY,EAAyD,MAAM,WAAW,CAAC;AAE/F,OAAO,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAE7B,OAAO,EAAC,aAAa,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