@coveo/quantic 3.28.1 → 3.28.2-pre.04d5730f85

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 (242) hide show
  1. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +10 -8
  2. package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/search-analytics.d.ts +5 -3
  3. package/force-app/main/default/staticresources/coveoheadless/definitions/api/api-client-utils.d.ts +1 -1
  4. package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/request.d.ts +1 -1
  5. package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/recommendations/recommendations-request.d.ts +1 -1
  6. package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/query-suggest/query-suggest-request.d.ts +1 -1
  7. package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +4 -3
  8. package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/tests/stream-answer-api-state-mock.d.ts +8 -0
  9. package/force-app/main/default/staticresources/coveoheadless/definitions/api/platform-client.d.ts +2 -2
  10. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-case-classifications/get-case-classifications-request.d.ts +1 -1
  11. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-document-suggestions/get-document-suggestions-request.d.ts +1 -1
  12. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/get-interface/get-interface-config-request.d.ts +1 -1
  13. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/query/query-request.d.ts +2 -2
  14. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/user-actions/user-actions-request.d.ts +1 -1
  15. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product-listing/product-listing-selectors.d.ts +2 -2
  16. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-selectors.d.ts +2 -2
  17. package/force-app/main/default/staticresources/coveoheadless/definitions/features/did-you-mean/did-you-mean-selectors.d.ts +1 -1
  18. package/force-app/main/default/staticresources/coveoheadless/definitions/features/error/error-actions.d.ts +16 -0
  19. package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-selectors.d.ts +1 -2
  20. package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-search/insight-search-actions-thunk-processor.d.ts +1 -1
  21. package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-search/insight-search-actions.d.ts +1 -1
  22. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-actions-thunk-processor.d.ts +1 -1
  23. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-request.d.ts +1 -1
  24. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions-thunk-processor.d.ts +1 -1
  25. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-request.d.ts +1 -1
  26. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controller-utils.d.ts +19 -0
  27. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.d.ts +10 -0
  28. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/cart/headless-cart.ssr.d.ts +15 -0
  29. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/context/headless-context.ssr.d.ts +12 -0
  30. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/did-you-mean/headless-did-you-mean.ssr.d.ts +10 -0
  31. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/filter-suggestions/headless-filter-suggestions-generator.ssr.d.ts +15 -0
  32. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/generator/headless-commerce-facet-generator.ssr.d.ts +66 -0
  33. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/instant-products/headless-instant-products.ssr.d.ts +12 -0
  34. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/pagination/headless-core-commerce-pagination.ssr.d.ts +11 -0
  35. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/parameter-manager/headless-core-parameter-manager.ssr.d.ts +25 -0
  36. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/product-list/headless-product-list.ssr.d.ts +12 -0
  37. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/product-view/headless-product-view.ssr.d.ts +20 -0
  38. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/recent-queries-list/headless-recent-queries-list.ssr.d.ts +13 -0
  39. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/recommendations/headless-recommendations.ssr.d.ts +17 -0
  40. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/search-box/headless-search-box.ssr.d.ts +12 -0
  41. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/sort/headless-core-commerce-sort.ssr.d.ts +11 -0
  42. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/standalone-search-box/headless-standalone-search-box.ssr.d.ts +14 -0
  43. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/summary/headless-core-summary.ssr.d.ts +13 -0
  44. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/triggers/headless-notify-trigger.ssr.d.ts +12 -0
  45. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/triggers/headless-query-trigger.ssr.d.ts +13 -0
  46. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/triggers/headless-redirection-trigger.ssr.d.ts +12 -0
  47. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/engine/commerce-engine.ssr.d.ts +25 -0
  48. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/factories/build-factory.d.ts +22 -0
  49. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/factories/hydrated-state-factory.d.ts +4 -0
  50. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/factories/recommendation-hydrated-state-factory.d.ts +3 -0
  51. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/factories/recommendation-static-state-factory.d.ts +3 -0
  52. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/factories/static-state-factory.d.ts +4 -0
  53. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/build.d.ts +10 -0
  54. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-constants.d.ts +7 -0
  55. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-definitions.d.ts +220 -0
  56. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-inference.d.ts +24 -0
  57. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/controller-scopes.d.ts +71 -0
  58. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/engine.d.ts +75 -0
  59. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/fetch-static-state.d.ts +17 -0
  60. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/from-build-result.d.ts +19 -0
  61. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/hydrate-static-state.d.ts +20 -0
  62. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/kind.d.ts +9 -0
  63. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/utils/recommendation-filter.d.ts +11 -0
  64. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/augment-preprocess-request.d.ts +9 -0
  65. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/controller-utils.d.ts +16 -0
  66. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/errors.d.ts +9 -0
  67. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/build.d.ts +9 -0
  68. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/controllers.d.ts +37 -0
  69. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/engine.d.ts +60 -0
  70. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/fetch-static-state.d.ts +17 -0
  71. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/from-build-result.d.ts +8 -0
  72. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/hydrate-static-state.d.ts +21 -0
  73. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/inference.d.ts +19 -0
  74. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/utilities.d.ts +14 -0
  75. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/breadcrumb-manager/headless-breadcrumb-manager.ssr.d.ts +13 -0
  76. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/context/headless-context.ssr.d.ts +14 -0
  77. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/dictionary-field-context/headless-dictionary-field-context.ssr.d.ts +13 -0
  78. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/did-you-mean/headless-did-you-mean.ssr.d.ts +13 -0
  79. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facet-manager/headless-facet-manager.ssr.d.ts +13 -0
  80. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/automatic-facet-generator/headless-automatic-facet-generator.ssr.d.ts +14 -0
  81. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/category-facet/headless-category-facet.ssr.d.ts +14 -0
  82. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/facet/headless-facet.ssr.d.ts +14 -0
  83. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/range-facet/date-facet/headless-date-facet.ssr.d.ts +15 -0
  84. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/range-facet/date-facet/headless-date-filter.ssr.d.ts +14 -0
  85. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/range-facet/numeric-facet/headless-numeric-facet.ssr.d.ts +15 -0
  86. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/range-facet/numeric-facet/headless-numeric-filter.ssr.d.ts +14 -0
  87. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/field-suggestions/category-facet/headless-category-field-suggestions.ssr.d.ts +14 -0
  88. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/field-suggestions/facet/headless-field-suggestions.ssr.d.ts +14 -0
  89. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/folded-result-list/headless-folded-result-list.ssr.d.ts +14 -0
  90. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/history-manager/headless-history-manager.ssr.d.ts +13 -0
  91. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/instant-results/instant-results.ssr.d.ts +14 -0
  92. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/pager/headless-pager.ssr.d.ts +14 -0
  93. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/query-error/headless-query-error.ssr.d.ts +13 -0
  94. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/query-summary/headless-query-summary.ssr.d.ts +13 -0
  95. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/quickview/headless-quickview.ssr.d.ts +14 -0
  96. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/recent-queries-list/headless-recent-queries-list.ssr.d.ts +14 -0
  97. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/recent-results-list/headless-recent-results-list.ssr.d.ts +14 -0
  98. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/relevance-inspector/headless-relevance-inspector.ssr.d.ts +14 -0
  99. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/result-list/headless-result-list.ssr.d.ts +14 -0
  100. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/results-per-page/headless-results-per-page.ssr.d.ts +14 -0
  101. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/search-box/headless-search-box.ssr.d.ts +14 -0
  102. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/search-parameter-manager/headless-search-parameter-manager.ssr.d.ts +16 -0
  103. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/search-status/headless-search-status.ssr.d.ts +13 -0
  104. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/smart-snippet/headless-smart-snippet.ssr.d.ts +14 -0
  105. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.ssr.d.ts +15 -0
  106. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/sort/headless-sort.ssr.d.ts +14 -0
  107. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/standalone-search-box/headless-standalone-search-box.ssr.d.ts +14 -0
  108. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/static-filter/headless-static-filter.ssr.d.ts +15 -0
  109. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/tab/headless-tab.ssr.d.ts +14 -0
  110. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/tab-manager/headless-tab-manager.ssr.d.ts +13 -0
  111. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/triggers/headless-execute-trigger.ssr.d.ts +13 -0
  112. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/triggers/headless-notify-trigger.ssr.d.ts +13 -0
  113. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/triggers/headless-query-trigger.ssr.d.ts +14 -0
  114. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/triggers/headless-redirection-trigger.ssr.d.ts +13 -0
  115. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/url-manager/headless-url-manager.ssr.d.ts +16 -0
  116. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/engine/search-engine.ssr.d.ts +35 -0
  117. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce-next.index.d.ts +170 -0
  118. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +48 -47
  119. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine/common.d.ts → ssr-next/commerce/controller-utils.d.ts} +5 -2
  120. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/core → ssr-next/commerce/controllers}/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.d.ts +2 -2
  121. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/context → ssr-next/commerce/controllers}/cart/headless-cart.ssr.d.ts +3 -4
  122. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/context/headless-context.ssr.d.ts +3 -4
  123. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/search → ssr-next/commerce/controllers}/did-you-mean/headless-did-you-mean.ssr.d.ts +2 -2
  124. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/filter-suggestions/headless-filter-suggestions-generator.ssr.d.ts +15 -0
  125. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/core/facets → ssr-next/commerce/controllers}/generator/headless-commerce-facet-generator.ssr.d.ts +13 -12
  126. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/instant-products/headless-instant-products.ssr.d.ts +3 -4
  127. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/core → ssr-next/commerce/controllers}/pagination/headless-core-commerce-pagination.ssr.d.ts +2 -2
  128. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/core → ssr-next/commerce/controllers}/parameter-manager/headless-core-parameter-manager.ssr.d.ts +2 -2
  129. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/product-list/headless-product-list.ssr.d.ts +12 -0
  130. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/product-view/headless-product-view.ssr.d.ts +3 -3
  131. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/recent-queries-list/headless-recent-queries-list.ssr.d.ts +3 -4
  132. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/recommendations/headless-recommendations.ssr.d.ts +3 -3
  133. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/search-box/headless-search-box.ssr.d.ts +3 -4
  134. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce/core → ssr-next/commerce/controllers}/sort/headless-core-commerce-sort.ssr.d.ts +2 -2
  135. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/standalone-search-box/headless-standalone-search-box.ssr.d.ts +4 -5
  136. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/summary/headless-core-summary.ssr.d.ts +13 -0
  137. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/triggers/headless-notify-trigger.ssr.d.ts +3 -4
  138. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/triggers/headless-query-trigger.ssr.d.ts +3 -3
  139. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers/commerce → ssr-next/commerce/controllers}/triggers/headless-redirection-trigger.ssr.d.ts +3 -4
  140. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-engine → ssr-next/commerce/engine}/commerce-engine.ssr.d.ts +6 -5
  141. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/factories/build-factory.d.ts +5 -4
  142. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/factories/hydrated-state-factory.d.ts +2 -2
  143. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/factories/recommendation-hydrated-state-factory.d.ts +1 -1
  144. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/factories/recommendation-static-state-factory.d.ts +1 -1
  145. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/factories/static-state-factory.d.ts +2 -2
  146. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/types/build.d.ts +4 -2
  147. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-constants.d.ts +7 -0
  148. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine/types/common.d.ts → ssr-next/commerce/types/controller-definitions.d.ts} +10 -97
  149. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-inference.d.ts +24 -0
  150. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-scopes.d.ts +71 -0
  151. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine/types/core-engine.d.ts → ssr-next/commerce/types/engine.d.ts} +12 -14
  152. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/types/fetch-static-state.d.ts +4 -2
  153. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/types/from-build-result.d.ts +2 -2
  154. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/types/hydrate-static-state.d.ts +4 -2
  155. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine/factories → ssr-next/commerce}/utils/recommendation-filter.d.ts +2 -2
  156. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine → ssr-next/common}/augment-preprocess-request.d.ts +2 -2
  157. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine/common.d.ts → ssr-next/common/controller-utils.d.ts} +4 -2
  158. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/errors.d.ts +9 -0
  159. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine → ssr-next/common}/types/build.d.ts +4 -2
  160. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/controllers.d.ts +37 -0
  161. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine/types/core-engine.d.ts → ssr-next/common/types/engine.d.ts} +18 -5
  162. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine → ssr-next/common}/types/fetch-static-state.d.ts +4 -2
  163. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine → ssr-next/common}/types/from-build-result.d.ts +3 -2
  164. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/ssr-engine → ssr-next/common}/types/hydrate-static-state.d.ts +6 -2
  165. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/inference.d.ts +19 -0
  166. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/utilities.d.ts +14 -0
  167. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/breadcrumb-manager/headless-breadcrumb-manager.ssr.d.ts +13 -0
  168. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/context/headless-context.ssr.d.ts +14 -0
  169. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/dictionary-field-context/headless-dictionary-field-context.ssr.d.ts +13 -0
  170. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/did-you-mean/headless-did-you-mean.ssr.d.ts +13 -0
  171. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/facet-manager/headless-facet-manager.ssr.d.ts +13 -0
  172. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/facets/automatic-facet-generator/headless-automatic-facet-generator.ssr.d.ts +4 -4
  173. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/facets/category-facet/headless-category-facet.ssr.d.ts +4 -4
  174. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/facets/facet/headless-facet.ssr.d.ts +4 -4
  175. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/facets/range-facet/date-facet/headless-date-facet.ssr.d.ts +15 -0
  176. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/facets/range-facet/date-facet/headless-date-filter.ssr.d.ts +4 -4
  177. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/facets/range-facet/numeric-facet/headless-numeric-facet.ssr.d.ts +15 -0
  178. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/facets/range-facet/numeric-facet/headless-numeric-filter.ssr.d.ts +4 -4
  179. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/field-suggestions/category-facet/headless-category-field-suggestions.ssr.d.ts +4 -4
  180. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/field-suggestions/facet/headless-field-suggestions.ssr.d.ts +4 -4
  181. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/folded-result-list/headless-folded-result-list.ssr.d.ts +4 -4
  182. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/history-manager/headless-history-manager.ssr.d.ts +13 -0
  183. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/instant-results/instant-results.ssr.d.ts +4 -4
  184. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/pager/headless-pager.ssr.d.ts +4 -4
  185. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/query-error/headless-query-error.ssr.d.ts +13 -0
  186. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/query-summary/headless-query-summary.ssr.d.ts +13 -0
  187. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/quickview/headless-quickview.ssr.d.ts +4 -4
  188. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/recent-queries-list/headless-recent-queries-list.ssr.d.ts +4 -4
  189. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/recent-results-list/headless-recent-results-list.ssr.d.ts +4 -4
  190. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/relevance-inspector/headless-relevance-inspector.ssr.d.ts +4 -4
  191. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/result-list/headless-result-list.ssr.d.ts +4 -4
  192. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/results-per-page/headless-results-per-page.ssr.d.ts +4 -4
  193. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/search-box/headless-search-box.ssr.d.ts +4 -4
  194. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/search-parameter-manager/headless-search-parameter-manager.ssr.d.ts +4 -4
  195. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/search-status/headless-search-status.ssr.d.ts +13 -0
  196. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/smart-snippet/headless-smart-snippet.ssr.d.ts +4 -4
  197. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.ssr.d.ts +15 -0
  198. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/sort/headless-sort.ssr.d.ts +4 -4
  199. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/standalone-search-box/headless-standalone-search-box.ssr.d.ts +4 -4
  200. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/static-filter/headless-static-filter.ssr.d.ts +15 -0
  201. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/tab/headless-tab.ssr.d.ts +4 -4
  202. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/tab-manager/headless-tab-manager.ssr.d.ts +13 -0
  203. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/triggers/headless-execute-trigger.ssr.d.ts +13 -0
  204. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/triggers/headless-notify-trigger.ssr.d.ts +13 -0
  205. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/triggers/headless-query-trigger.ssr.d.ts +14 -0
  206. package/force-app/main/default/staticresources/coveoheadless/definitions/{controllers → ssr-next/search/controllers}/triggers/headless-redirection-trigger.ssr.d.ts +4 -4
  207. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/url-manager/headless-url-manager.ssr.d.ts +16 -0
  208. package/force-app/main/default/staticresources/coveoheadless/definitions/{app/search-engine → ssr-next/search/engine}/search-engine.ssr.d.ts +5 -5
  209. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next.index.d.ts +219 -0
  210. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr.index.d.ts +88 -87
  211. package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-engine-v2.d.ts +2 -2
  212. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/errors.d.ts +1 -10
  213. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/facet-utils.d.ts +1 -1
  214. package/force-app/main/default/staticresources/coveoheadless/headless.js +12 -10
  215. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +11 -9
  216. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +9 -7
  217. package/package.json +16 -17
  218. package/docs/out/quantic-docs.json +0 -6431
  219. package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/common.d.ts +0 -80
  220. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/breadcrumb-manager/headless-breadcrumb-manager.ssr.d.ts +0 -13
  221. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/summary/headless-core-summary.ssr.d.ts +0 -13
  222. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-filter-suggestions-generator.ssr.d.ts +0 -16
  223. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-list/headless-product-list.ssr.d.ts +0 -13
  224. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/context/headless-context.ssr.d.ts +0 -14
  225. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/dictionary-field-context/headless-dictionary-field-context.ssr.d.ts +0 -13
  226. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/did-you-mean/headless-did-you-mean.ssr.d.ts +0 -13
  227. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facet-manager/headless-facet-manager.ssr.d.ts +0 -13
  228. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/range-facet/date-facet/headless-date-facet.ssr.d.ts +0 -15
  229. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/range-facet/numeric-facet/headless-numeric-facet.ssr.d.ts +0 -15
  230. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/history-manager/headless-history-manager.ssr.d.ts +0 -13
  231. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/query-error/headless-query-error.ssr.d.ts +0 -13
  232. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/query-summary/headless-query-summary.ssr.d.ts +0 -13
  233. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/search-status/headless-search-status.ssr.d.ts +0 -13
  234. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.ssr.d.ts +0 -15
  235. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/static-filter/headless-static-filter.ssr.d.ts +0 -15
  236. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/tab-manager/headless-tab-manager.ssr.d.ts +0 -13
  237. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-execute-trigger.ssr.d.ts +0 -13
  238. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-notify-trigger.ssr.d.ts +0 -13
  239. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-query-trigger.ssr.d.ts +0 -14
  240. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/url-manager/headless-url-manager.ssr.d.ts +0 -16
  241. package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-context/case-context-slice.spec.d.ts +0 -1
  242. /package/force-app/main/default/staticresources/coveoheadless/definitions/{app/commerce-ssr-engine → ssr-next/commerce}/types/kind.d.ts +0 -0
@@ -1,7 +1,6 @@
1
- import type { SearchOnlyControllerDefinitionWithoutProps } from '../../../app/commerce-ssr-engine/types/common.js';
2
- import type { RedirectionTrigger } from '../../core/triggers/headless-core-redirection-trigger.js';
3
- export type { RedirectionTriggerState } from '../../core/triggers/headless-core-redirection-trigger.js';
4
- export type { RedirectionTrigger };
1
+ import type { RedirectionTrigger, RedirectionTriggerState } from '../../../../controllers/core/triggers/headless-core-redirection-trigger.js';
2
+ import type { SearchOnlyControllerDefinitionWithoutProps } from '../../types/controller-definitions.js';
3
+ export type { RedirectionTrigger, RedirectionTriggerState };
5
4
  export interface RedirectionTriggerDefinition extends SearchOnlyControllerDefinitionWithoutProps<RedirectionTrigger> {
6
5
  }
7
6
  /**
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * Utility functions to be used for Commerce Server Side Rendering.
3
3
  */
4
- import type { Controller } from '../../controllers/controller/headless-controller.js';
5
- import { type CommerceEngineDefinitionOptions } from '../commerce-ssr-engine/factories/build-factory.js';
6
- import { type ControllerDefinitionsMap, SolutionType } from '../commerce-ssr-engine/types/common.js';
7
- import type { EngineDefinition } from '../commerce-ssr-engine/types/core-engine.js';
8
- import type { CommerceEngineOptions } from './commerce-engine.js';
4
+ import type { CommerceEngineOptions } from '../../../app/commerce-engine/commerce-engine.js';
5
+ import type { Controller } from '../../../controllers/controller/headless-controller.js';
6
+ import { type CommerceEngineDefinitionOptions } from '../factories/build-factory.js';
7
+ import { SolutionType } from '../types/controller-constants.js';
8
+ import type { ControllerDefinitionsMap } from '../types/controller-definitions.js';
9
+ import type { EngineDefinition } from '../types/engine.js';
9
10
  export interface CommerceEngineDefinition<TControllers extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> extends EngineDefinition<TControllers, CommerceEngineOptions, TSolutionType> {
10
11
  }
11
12
  /**
@@ -1,8 +1,9 @@
1
1
  import type { Action } from '@reduxjs/toolkit';
2
+ import { type CommerceEngine, type CommerceEngineOptions } from '../../../app/commerce-engine/commerce-engine.js';
2
3
  import type { Controller } from '../../../controllers/controller/headless-controller.js';
3
- import { type CommerceEngine, type CommerceEngineOptions } from '../../commerce-engine/commerce-engine.js';
4
- import { type ControllerDefinitionsMap, SolutionType } from '../types/common.js';
5
- import type { BuildParameters, CommerceControllerDefinitionsMap, EngineDefinitionOptions } from '../types/core-engine.js';
4
+ import { SolutionType } from '../types/controller-constants.js';
5
+ import type { ControllerDefinitionsMap } from '../types/controller-definitions.js';
6
+ import type { BuildParameters, CommerceControllerDefinitionsMap, EngineDefinitionOptions } from '../types/engine.js';
6
7
  /**
7
8
  * The SSR commerce engine.
8
9
  *
@@ -17,5 +18,5 @@ export interface SSRCommerceEngine extends CommerceEngine {
17
18
  export type CommerceEngineDefinitionOptions<TControllers extends ControllerDefinitionsMap<Controller> = ControllerDefinitionsMap<Controller>> = EngineDefinitionOptions<CommerceEngineOptions, TControllers>;
18
19
  export declare const buildFactory: <TControllerDefinitions extends CommerceControllerDefinitionsMap>(controllerDefinitions: TControllerDefinitions | undefined, options: CommerceEngineDefinitionOptions<TControllerDefinitions>) => <T extends SolutionType>(solutionType: T) => (...[buildOptions]: BuildParameters<TControllerDefinitions>) => Promise<{
19
20
  engine: SSRCommerceEngine;
20
- controllers: import("../types/common.js").InferControllersMapFromDefinition<TControllerDefinitions, T>;
21
+ controllers: import("../types/controller-inference.js").InferControllersMapFromDefinition<TControllerDefinitions, T>;
21
22
  }>;
@@ -1,4 +1,4 @@
1
- import type { SolutionType } from '../types/common.js';
2
- import type { CommerceControllerDefinitionsMap, HydrateStaticStateFunction } from '../types/core-engine.js';
1
+ import type { SolutionType } from '../types/controller-constants.js';
2
+ import type { CommerceControllerDefinitionsMap, HydrateStaticStateFunction } from '../types/engine.js';
3
3
  import { type CommerceEngineDefinitionOptions } from './build-factory.js';
4
4
  export declare const hydratedStaticStateFactory: <TControllerDefinitions extends CommerceControllerDefinitionsMap>(controllerDefinitions: TControllerDefinitions | undefined, options: CommerceEngineDefinitionOptions<TControllerDefinitions>) => (solutionType: SolutionType) => HydrateStaticStateFunction<TControllerDefinitions>;
@@ -1,3 +1,3 @@
1
- import type { CommerceControllerDefinitionsMap, HydrateStaticStateFunction } from '../types/core-engine.js';
1
+ import type { CommerceControllerDefinitionsMap, HydrateStaticStateFunction } from '../types/engine.js';
2
2
  import { type CommerceEngineDefinitionOptions } from './build-factory.js';
3
3
  export declare function hydratedRecommendationStaticStateFactory<TControllerDefinitions extends CommerceControllerDefinitionsMap>(controllerDefinitions: TControllerDefinitions | undefined, options: CommerceEngineDefinitionOptions<TControllerDefinitions>): HydrateStaticStateFunction<TControllerDefinitions>;
@@ -1,3 +1,3 @@
1
- import type { CommerceControllerDefinitionsMap, FetchStaticStateFunction } from '../types/core-engine.js';
1
+ import type { CommerceControllerDefinitionsMap, FetchStaticStateFunction } from '../types/engine.js';
2
2
  import { type CommerceEngineDefinitionOptions } from './build-factory.js';
3
3
  export declare function fetchRecommendationStaticStateFactory<TControllerDefinitions extends CommerceControllerDefinitionsMap>(controllerDefinitions: TControllerDefinitions | undefined, options: CommerceEngineDefinitionOptions<TControllerDefinitions>): FetchStaticStateFunction<TControllerDefinitions>;
@@ -1,4 +1,4 @@
1
- import { SolutionType } from '../types/common.js';
2
- import type { CommerceControllerDefinitionsMap, FetchStaticStateFunction } from '../types/core-engine.js';
1
+ import { SolutionType } from '../types/controller-constants.js';
2
+ import type { CommerceControllerDefinitionsMap, FetchStaticStateFunction } from '../types/engine.js';
3
3
  import { type CommerceEngineDefinitionOptions } from './build-factory.js';
4
4
  export declare const fetchStaticStateFactory: <TControllerDefinitions extends CommerceControllerDefinitionsMap>(controllerDefinitions: TControllerDefinitions | undefined, options: CommerceEngineDefinitionOptions<TControllerDefinitions>) => (solutionType: SolutionType) => FetchStaticStateFunction<TControllerDefinitions>;
@@ -1,7 +1,9 @@
1
1
  import type { Controller } from '../../../controllers/controller/headless-controller.js';
2
- import type { ControllersMap, ControllersPropsMap, EngineDefinitionBuildResult, OptionsExtender, OptionsTuple } from '../../ssr-engine/types/common.js';
2
+ import type { ControllersMap, ControllersPropsMap } from '../../common/types/controllers.js';
3
+ import type { OptionsExtender, OptionsTuple } from '../../common/types/utilities.js';
3
4
  import type { SSRCommerceEngine } from '../factories/build-factory.js';
4
- import type { ControllerDefinitionsMap, EngineDefinitionControllersPropsOption, SolutionType } from './common.js';
5
+ import type { SolutionType } from './controller-constants.js';
6
+ import type { ControllerDefinitionsMap, EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption } from './controller-definitions.js';
5
7
  export interface BuildOptions<TEngineOptions> {
6
8
  extend?: OptionsExtender<TEngineOptions>;
7
9
  }
@@ -0,0 +1,7 @@
1
+ export declare enum SolutionType {
2
+ search = "search",
3
+ listing = "listing",
4
+ standalone = "standalone",
5
+ recommendation = "recommendation"
6
+ }
7
+ export declare const recommendationInternalOptionKey: unique symbol;
@@ -1,17 +1,15 @@
1
- import type { UnknownAction } from '@reduxjs/toolkit';
2
1
  import type { Controller } from '../../../controllers/controller/headless-controller.js';
3
- import type { InvalidControllerDefinition } from '../../../utils/errors.js';
4
- import type { ControllerStaticStateMap, ControllersPropsMap, EngineDefinitionBuildResult, HasKey, HasKeys, HasOptionalKeys, HasRequiredKeys, HydratedState, InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers, OptionsTuple } from '../../ssr-engine/types/common.js';
2
+ import type { InvalidControllerDefinition } from '../../common/errors.js';
3
+ import type { ControllersPropsMap } from '../../common/types/controllers.js';
4
+ import type { EngineDefinitionBuildResult } from '../../common/types/engine.js';
5
+ import type { HydratedState } from '../../common/types/hydrate-static-state.js';
6
+ import type { InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers } from '../../common/types/inference.js';
7
+ import type { HasKey, HasOptionalKeys, HasRequiredKeys, OptionsTuple } from '../../common/types/utilities.js';
5
8
  import type { SSRCommerceEngine } from '../factories/build-factory.js';
9
+ import { type recommendationInternalOptionKey, SolutionType } from './controller-constants.js';
10
+ import type { ListingAndStandaloneController, ListingOnlyController, NonRecommendationController, RecommendationOnlyController, SearchAndListingController, SearchOnlyController, UniversalController } from './controller-scopes.js';
6
11
  import type { Kind } from './kind.js';
7
12
  export type { EngineDefinitionBuildResult, HydratedState, OptionsTuple, InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers, };
8
- export declare enum SolutionType {
9
- search = "search",
10
- listing = "listing",
11
- standalone = "standalone",
12
- recommendation = "recommendation"
13
- }
14
- export declare const recommendationInternalOptionKey: unique symbol;
15
13
  export type RecommendationControllerSettings = {
16
14
  /**
17
15
  * Toggle to enable or disable the recommendation controller.
@@ -21,7 +19,7 @@ export type RecommendationControllerSettings = {
21
19
  */
22
20
  enabled?: boolean;
23
21
  };
24
- interface ControllerDefinitionWithoutProps<TController extends Controller> {
22
+ export interface ControllerDefinitionWithoutProps<TController extends Controller> {
25
23
  /**
26
24
  * Creates an instance of the given controller.
27
25
  *
@@ -34,7 +32,7 @@ interface ControllerDefinitionWithoutProps<TController extends Controller> {
34
32
  export interface ControllerWithKind extends Controller {
35
33
  _kind: Kind;
36
34
  }
37
- interface ControllerDefinitionWithProps<TController extends Controller, TProps> {
35
+ export interface ControllerDefinitionWithProps<TController extends Controller, TProps> {
38
36
  /**
39
37
  * Creates an instance of the given controller.
40
38
  *
@@ -45,10 +43,6 @@ interface ControllerDefinitionWithProps<TController extends Controller, TProps>
45
43
  */
46
44
  buildWithProps(engine: SSRCommerceEngine, props?: TProps, solutionType?: SolutionType): TController & ControllerWithKind;
47
45
  }
48
- export interface EngineStaticState<TSearchAction extends UnknownAction, TControllers extends ControllerStaticStateMap> {
49
- searchActions: TSearchAction[];
50
- controllers: TControllers;
51
- }
52
46
  interface SolutionTypeAvailability {
53
47
  [SolutionType.search]?: boolean;
54
48
  [SolutionType.listing]?: boolean;
@@ -59,17 +53,6 @@ export type ControllerDefinition<TController extends Controller> = SolutionTypeA
59
53
  export interface ControllerDefinitionsMap<TController extends Controller> {
60
54
  [customName: string]: ControllerDefinition<TController>;
61
55
  }
62
- export type InferControllerPropsFromDefinition<TController extends ControllerDefinition<Controller>> = TController extends ControllerDefinitionWithProps<Controller, infer Props> ? HasKey<TController, typeof recommendationInternalOptionKey> extends never ? Props : Props & RecommendationControllerSettings : TController extends ControllerDefinitionWithoutProps<Controller> ? HasKey<TController, typeof recommendationInternalOptionKey> extends never ? {} : RecommendationControllerSettings : unknown;
63
- export type InferControllerPropsMapFromDefinitions<TControllers extends ControllerDefinitionsMap<Controller>> = {
64
- [K in keyof TControllers as HasKeys<InferControllerPropsFromDefinition<TControllers[K]>> extends false ? never : K]: InferControllerPropsFromDefinition<TControllers[K]>;
65
- };
66
- export type InferControllerFromDefinition<TDefinition extends ControllerDefinition<Controller>> = TDefinition extends ControllerDefinition<infer TController> ? TController : never;
67
- export type InferControllersMapFromDefinition<TControllers extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> = {
68
- [K in keyof TControllers as HasKey<TControllers[K], TSolutionType> extends never ? never : K]: InferControllerFromDefinition<TControllers[K]>;
69
- };
70
- export type InferControllerStaticStateMapFromDefinitionsWithSolutionType<TControllers extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> = {
71
- [K in keyof TControllers as HasKey<TControllers[K], TSolutionType> extends never ? never : K]: InferControllerStaticStateFromController<InferControllerFromDefinition<TControllers[K]>>;
72
- };
73
56
  /**
74
57
  * This type defines the required and optional controller props for the engine definition.
75
58
  */
@@ -199,76 +182,6 @@ export interface ControllerDefinitionOption {
199
182
  */
200
183
  search?: boolean;
201
184
  }
202
- interface NonRecommendationController {
203
- /**
204
- * @internal
205
- */
206
- [SolutionType.search]: true;
207
- /**
208
- * @internal
209
- */
210
- [SolutionType.listing]: true;
211
- /**
212
- * @internal
213
- */
214
- [SolutionType.standalone]: true;
215
- }
216
- interface UniversalController {
217
- /**
218
- * @internal
219
- */
220
- [SolutionType.search]: true;
221
- /**
222
- * @internal
223
- */
224
- [SolutionType.listing]: true;
225
- /**
226
- * @internal
227
- */
228
- [SolutionType.standalone]: true;
229
- /**
230
- * @internal
231
- */
232
- [SolutionType.recommendation]: true;
233
- }
234
- interface SearchOnlyController {
235
- /**
236
- * @internal
237
- */
238
- [SolutionType.search]: true;
239
- }
240
- interface ListingOnlyController {
241
- /**
242
- * @internal
243
- */
244
- [SolutionType.listing]: true;
245
- }
246
- interface RecommendationOnlyController {
247
- /**
248
- * @internal
249
- */
250
- [SolutionType.recommendation]: true;
251
- }
252
- interface SearchAndListingController {
253
- /**
254
- * @internal
255
- */
256
- [SolutionType.search]: true;
257
- /**
258
- * @internal
259
- */
260
- [SolutionType.listing]: true;
261
- }
262
- interface ListingAndStandaloneController {
263
- /**
264
- * @internal
265
- */
266
- [SolutionType.listing]: true;
267
- /**
268
- * @internal
269
- */
270
- [SolutionType.standalone]: true;
271
- }
272
185
  export type SearchOnlyControllerDefinitionWithoutProps<TController extends Controller> = ControllerDefinitionWithoutProps<TController> & SearchOnlyController;
273
186
  type SearchOnlyControllerDefinitionWithProps<TController extends Controller, TProps> = ControllerDefinitionWithProps<TController, TProps> & SearchOnlyController;
274
187
  export type ListingAndStandaloneControllerWithoutProps<TController extends Controller> = ControllerDefinitionWithoutProps<TController> & ListingAndStandaloneController;
@@ -0,0 +1,24 @@
1
+ import type { Controller } from '../../../controllers/controller/headless-controller.js';
2
+ import type { HasKey, HasKeys } from '../../common/types/utilities.js';
3
+ import type { recommendationInternalOptionKey, SolutionType } from './controller-constants.js';
4
+ import type { ControllerDefinition, ControllerDefinitionsMap, ControllerDefinitionWithoutProps, ControllerDefinitionWithProps, InferControllerStaticStateFromController, RecommendationControllerSettings } from './controller-definitions.js';
5
+ export type InferStaticState<T extends {
6
+ fetchStaticState(...args: unknown[]): Promise<unknown>;
7
+ }> = Awaited<ReturnType<T['fetchStaticState']>>;
8
+ export type InferHydratedState<T extends {
9
+ hydrateStaticState(...args: unknown[]): Promise<unknown>;
10
+ }> = Awaited<ReturnType<T['hydrateStaticState']>>;
11
+ export type InferBuildResult<T extends {
12
+ build(...args: unknown[]): Promise<unknown>;
13
+ }> = Awaited<ReturnType<T['build']>>;
14
+ export type InferControllerPropsFromDefinition<TController extends ControllerDefinition<Controller>> = TController extends ControllerDefinitionWithProps<Controller, infer Props> ? HasKey<TController, typeof recommendationInternalOptionKey> extends never ? Props : Props & RecommendationControllerSettings : TController extends ControllerDefinitionWithoutProps<Controller> ? HasKey<TController, typeof recommendationInternalOptionKey> extends never ? {} : RecommendationControllerSettings : unknown;
15
+ export type InferControllerPropsMapFromDefinitions<TControllers extends ControllerDefinitionsMap<Controller>> = {
16
+ [K in keyof TControllers as HasKeys<InferControllerPropsFromDefinition<TControllers[K]>> extends false ? never : K]: InferControllerPropsFromDefinition<TControllers[K]>;
17
+ };
18
+ export type InferControllerFromDefinition<TDefinition extends ControllerDefinition<Controller>> = TDefinition extends ControllerDefinition<infer TController> ? TController : never;
19
+ export type InferControllersMapFromDefinition<TControllers extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> = {
20
+ [K in keyof TControllers as HasKey<TControllers[K], TSolutionType> extends never ? never : K]: InferControllerFromDefinition<TControllers[K]>;
21
+ };
22
+ export type InferControllerStaticStateMapFromDefinitionsWithSolutionType<TControllers extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> = {
23
+ [K in keyof TControllers as HasKey<TControllers[K], TSolutionType> extends never ? never : K]: InferControllerStaticStateFromController<InferControllerFromDefinition<TControllers[K]>>;
24
+ };
@@ -0,0 +1,71 @@
1
+ import { SolutionType } from './controller-constants.js';
2
+ export interface NonRecommendationController {
3
+ /**
4
+ * @internal
5
+ */
6
+ [SolutionType.search]: true;
7
+ /**
8
+ * @internal
9
+ */
10
+ [SolutionType.listing]: true;
11
+ /**
12
+ * @internal
13
+ */
14
+ [SolutionType.standalone]: true;
15
+ }
16
+ export interface UniversalController {
17
+ /**
18
+ * @internal
19
+ */
20
+ [SolutionType.search]: true;
21
+ /**
22
+ * @internal
23
+ */
24
+ [SolutionType.listing]: true;
25
+ /**
26
+ * @internal
27
+ */
28
+ [SolutionType.standalone]: true;
29
+ /**
30
+ * @internal
31
+ */
32
+ [SolutionType.recommendation]: true;
33
+ }
34
+ export interface SearchOnlyController {
35
+ /**
36
+ * @internal
37
+ */
38
+ [SolutionType.search]: true;
39
+ }
40
+ export interface ListingOnlyController {
41
+ /**
42
+ * @internal
43
+ */
44
+ [SolutionType.listing]: true;
45
+ }
46
+ export interface RecommendationOnlyController {
47
+ /**
48
+ * @internal
49
+ */
50
+ [SolutionType.recommendation]: true;
51
+ }
52
+ export interface SearchAndListingController {
53
+ /**
54
+ * @internal
55
+ */
56
+ [SolutionType.search]: true;
57
+ /**
58
+ * @internal
59
+ */
60
+ [SolutionType.listing]: true;
61
+ }
62
+ export interface ListingAndStandaloneController {
63
+ /**
64
+ * @internal
65
+ */
66
+ [SolutionType.listing]: true;
67
+ /**
68
+ * @internal
69
+ */
70
+ [SolutionType.standalone]: true;
71
+ }
@@ -1,16 +1,23 @@
1
1
  import type { UnknownAction } from '@reduxjs/toolkit';
2
+ import type { EngineConfiguration } from '../../../app/engine-configuration.js';
3
+ import type { NavigatorContextProvider } from '../../../app/navigator-context-provider.js';
2
4
  import type { Controller } from '../../../controllers/controller/headless-controller.js';
3
- import type { CommerceEngineDefinition } from '../../commerce-engine/commerce-engine.ssr.js';
4
- import type { EngineConfiguration } from '../../engine-configuration.js';
5
- import type { NavigatorContextProvider } from '../../navigator-context-provider.js';
6
- import type { FromBuildResultOptions } from '../../ssr-engine/types/from-build-result.js';
5
+ import type { ControllerStaticStateMap } from '../../common/types/controllers.js';
6
+ import type { FromBuildResultOptions } from '../../common/types/from-build-result.js';
7
+ import type { CommerceEngineDefinition } from '../engine/commerce-engine.ssr.js';
7
8
  import type { SSRCommerceEngine } from '../factories/build-factory.js';
8
9
  import type { Build, BuildOptions } from './build.js';
9
- import type { ControllerDefinitionsMap, InferControllerPropsMapFromDefinitions, InferControllerStaticStateMapFromDefinitionsWithSolutionType, InferControllersMapFromDefinition, SolutionType } from './common.js';
10
+ import type { SolutionType } from './controller-constants.js';
11
+ import type { ControllerDefinitionsMap } from './controller-definitions.js';
12
+ import type { InferControllerPropsMapFromDefinitions, InferControllerStaticStateMapFromDefinitionsWithSolutionType, InferControllersMapFromDefinition } from './controller-inference.js';
10
13
  import type { FetchStaticState, FetchStaticStateOptions } from './fetch-static-state.js';
11
14
  import type { FromBuildResult } from './from-build-result.js';
12
15
  import type { HydrateStaticState, HydrateStaticStateOptions } from './hydrate-static-state.js';
13
16
  export type { FromBuildResult, FromBuildResultOptions, HydrateStaticState, HydrateStaticStateOptions, FetchStaticState, FetchStaticStateOptions, Build, BuildOptions, };
17
+ export interface EngineStaticState<TSearchAction extends UnknownAction, TControllers extends ControllerStaticStateMap> {
18
+ searchActions: TSearchAction[];
19
+ controllers: TControllers;
20
+ }
14
21
  export type EngineDefinitionOptions<TOptions extends {
15
22
  configuration: EngineConfiguration;
16
23
  }, TControllers extends ControllerDefinitionsMap<Controller>> = TOptions & {
@@ -49,15 +56,6 @@ export interface EngineDefinition<TControllers extends ControllerDefinitionsMap<
49
56
  */
50
57
  setAccessToken: (accessToken: string) => void;
51
58
  }
52
- export type InferStaticState<T extends {
53
- fetchStaticState(...args: unknown[]): Promise<unknown>;
54
- }> = Awaited<ReturnType<T['fetchStaticState']>>;
55
- export type InferHydratedState<T extends {
56
- hydrateStaticState(...args: unknown[]): Promise<unknown>;
57
- }> = Awaited<ReturnType<T['hydrateStaticState']>>;
58
- export type InferBuildResult<T extends {
59
- build(...args: unknown[]): Promise<unknown>;
60
- }> = Awaited<ReturnType<T['build']>>;
61
59
  export type CommerceControllerDefinitionsMap = ControllerDefinitionsMap<Controller>;
62
60
  type Definition<TControllerDefinitions extends CommerceControllerDefinitionsMap> = CommerceEngineDefinition<TControllerDefinitions, SolutionType>;
63
61
  type BuildFunction<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Definition<TControllerDefinitions>['build'];
@@ -1,7 +1,9 @@
1
1
  import type { UnknownAction } from '@reduxjs/toolkit';
2
2
  import type { Controller } from '../../../controllers/controller/headless-controller.js';
3
- import type { ControllerDefinitionsMap, EngineDefinitionControllersPropsOption, EngineStaticState, SolutionType } from '../../commerce-ssr-engine/types/common.js';
4
- import type { ControllerStaticStateMap, ControllersMap, ControllersPropsMap, OptionsTuple } from '../../ssr-engine/types/common.js';
3
+ import type { ControllerStaticStateMap, ControllersMap, ControllersPropsMap } from '../../common/types/controllers.js';
4
+ import type { SolutionType } from './controller-constants.js';
5
+ import type { ControllerDefinitionsMap, EngineDefinitionControllersPropsOption, OptionsTuple } from './controller-definitions.js';
6
+ import type { EngineStaticState } from './engine.js';
5
7
  import type { FromBuildResult } from './from-build-result.js';
6
8
  export type FetchStaticStateOptions = {};
7
9
  export type FetchStaticState<TControllers extends ControllersMap, TSearchAction extends UnknownAction, TControllersStaticState extends ControllerStaticStateMap, TControllersProps extends ControllersPropsMap, TControllersDefinitionsMap extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> = {
@@ -1,6 +1,6 @@
1
- import type { ControllersMap } from '../../ssr-engine/types/common.js';
1
+ import type { ControllersMap } from '../../common/types/controllers.js';
2
2
  import type { SSRCommerceEngine } from '../factories/build-factory.js';
3
- import type { EngineDefinitionBuildResult } from './common.js';
3
+ import type { EngineDefinitionBuildResult } from './controller-definitions.js';
4
4
  interface FromBuildResultOptions<TControllers extends ControllersMap> {
5
5
  /**
6
6
  * The build result of the engine
@@ -1,8 +1,10 @@
1
1
  import type { UnknownAction } from '@reduxjs/toolkit';
2
2
  import type { Controller } from '../../../controllers/controller/headless-controller.js';
3
- import type { ControllersMap, ControllersPropsMap, HydratedState, OptionsTuple } from '../../ssr-engine/types/common.js';
3
+ import type { ControllersMap, ControllersPropsMap } from '../../common/types/controllers.js';
4
+ import type { HydratedState } from '../../common/types/hydrate-static-state.js';
4
5
  import type { SSRCommerceEngine } from '../factories/build-factory.js';
5
- import type { ControllerDefinitionsMap, EngineDefinitionControllersPropsOption, SolutionType } from './common.js';
6
+ import type { SolutionType } from './controller-constants.js';
7
+ import type { ControllerDefinitionsMap, EngineDefinitionControllersPropsOption, OptionsTuple } from './controller-definitions.js';
6
8
  import type { FromBuildResult } from './from-build-result.js';
7
9
  export interface HydrateStaticStateOptions<TSearchAction> {
8
10
  searchActions: TSearchAction[];
@@ -1,5 +1,5 @@
1
- import type { Controller } from '../../../../controllers/controller/headless-controller.js';
2
- import { type ControllerDefinitionsMap } from '../../types/common.js';
1
+ import type { Controller } from '../../../controllers/controller/headless-controller.js';
2
+ import type { ControllerDefinitionsMap } from '../types/controller-definitions.js';
3
3
  export declare function filterRecommendationControllers<TControllerDefinitions extends ControllerDefinitionsMap<Controller>>(controllers: Record<string, Controller>, controllerDefinitions: TControllerDefinitions): {
4
4
  /**
5
5
  * Go through all the controllers passed in argument and only refresh recommendation controllers.
@@ -1,6 +1,6 @@
1
1
  import type { PlatformClientOrigin, PlatformRequestOptions, PreprocessRequest, RequestMetadata } from '../../api/preprocess-request.js';
2
- import { type LoggerOptions } from '../logger.js';
3
- import type { NavigatorContextProvider } from '../navigator-context-provider.js';
2
+ import { type LoggerOptions } from '../../app/logger.js';
3
+ import type { NavigatorContextProvider } from '../../app/navigator-context-provider.js';
4
4
  export interface AugmentPreprocessRequestOptions {
5
5
  preprocessRequest?: PreprocessRequest;
6
6
  navigatorContextProvider?: NavigatorContextProvider;
@@ -1,7 +1,9 @@
1
1
  import type { UnknownAction } from '@reduxjs/toolkit';
2
+ import type { CoreEngine, CoreEngineNext } from '../../app/engine.js';
2
3
  import type { Controller } from '../../controllers/controller/headless-controller.js';
3
- import type { CoreEngine, CoreEngineNext } from '../engine.js';
4
- import type { ControllerDefinitionsMap, ControllersMap, EngineStaticState, InferControllerPropsMapFromDefinitions, InferControllerStaticStateMapFromControllers, InferControllersMapFromDefinition } from './types/common.js';
4
+ import type { ControllerDefinitionsMap, ControllersMap } from './types/controllers.js';
5
+ import type { EngineStaticState } from './types/engine.js';
6
+ import type { InferControllerPropsMapFromDefinitions, InferControllerStaticStateMapFromControllers, InferControllersMapFromDefinition } from './types/inference.js';
5
7
  export declare function buildControllerDefinitions<TControllerDefinitionsMap extends ControllerDefinitionsMap<CoreEngine | CoreEngineNext, Controller>, TEngine extends CoreEngine | CoreEngineNext>({ definitionsMap, engine, propsMap, }: {
6
8
  definitionsMap: TControllerDefinitionsMap;
7
9
  engine: TEngine;
@@ -0,0 +1,9 @@
1
+ export declare class InvalidControllerDefinition extends Error {
2
+ constructor();
3
+ }
4
+ export declare class MissingControllerProps extends Error {
5
+ constructor(controller: string);
6
+ }
7
+ export declare class MultipleRecommendationError extends Error {
8
+ constructor(slotId: string);
9
+ }
@@ -1,5 +1,7 @@
1
- import type { CoreEngine, CoreEngineNext } from '../../engine.js';
2
- import type { ControllersMap, ControllersPropsMap, EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption, OptionsExtender, OptionsTuple } from './common.js';
1
+ import type { CoreEngine, CoreEngineNext } from '../../../app/engine.js';
2
+ import type { ControllersMap, ControllersPropsMap } from './controllers.js';
3
+ import type { EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption } from './engine.js';
4
+ import type { OptionsExtender, OptionsTuple } from './utilities.js';
3
5
  interface BuildOptions<TEngineOptions> {
4
6
  extend?: OptionsExtender<TEngineOptions>;
5
7
  }
@@ -0,0 +1,37 @@
1
+ import type { CoreEngine, CoreEngineNext } from '../../../app/engine.js';
2
+ import type { Controller } from '../../../controllers/controller/headless-controller.js';
3
+ export interface ControllersMap {
4
+ [customName: string]: Controller;
5
+ }
6
+ export interface ControllerStaticState<TState> {
7
+ state: TState;
8
+ }
9
+ export interface ControllerStaticStateMap {
10
+ [customName: string]: ControllerStaticState<unknown>;
11
+ }
12
+ export interface ControllerDefinitionWithoutProps<TEngine extends CoreEngine | CoreEngineNext, TController extends Controller> {
13
+ /**
14
+ * Creates an instance of the given controller.
15
+ *
16
+ * @param engine - The search engine.
17
+ * @returns The controller.
18
+ */
19
+ build(engine: TEngine): TController;
20
+ }
21
+ export interface ControllerDefinitionWithProps<TEngine extends CoreEngine | CoreEngineNext, TController extends Controller, TProps> {
22
+ /**
23
+ * Creates an instance of the given controller.
24
+ *
25
+ * @param engine - The search engine.
26
+ * @param props - The controller properties.
27
+ * @returns The controller.
28
+ */
29
+ buildWithProps(engine: TEngine, props?: TProps): TController;
30
+ }
31
+ export type ControllerDefinition<TEngine extends CoreEngine | CoreEngineNext, TController extends Controller> = ControllerDefinitionWithoutProps<TEngine, TController> | ControllerDefinitionWithProps<TEngine, TController, unknown>;
32
+ export interface ControllerDefinitionsMap<TEngine extends CoreEngine | CoreEngineNext, TController extends Controller> {
33
+ [customName: string]: ControllerDefinition<TEngine, TController>;
34
+ }
35
+ export interface ControllersPropsMap {
36
+ [customName: string]: unknown;
37
+ }
@@ -1,12 +1,14 @@
1
- import type { AnyAction } from '@reduxjs/toolkit';
1
+ import type { AnyAction, UnknownAction } from '@reduxjs/toolkit';
2
+ import type { CoreEngine, CoreEngineNext } from '../../../app/engine.js';
3
+ import type { EngineConfiguration } from '../../../app/engine-configuration.js';
4
+ import type { NavigatorContextProvider } from '../../../app/navigator-context-provider.js';
2
5
  import type { Controller } from '../../../controllers/controller/headless-controller.js';
3
- import type { CoreEngine, CoreEngineNext } from '../../engine.js';
4
- import type { EngineConfiguration } from '../../engine-configuration.js';
5
- import type { NavigatorContextProvider } from '../../navigator-context-provider.js';
6
6
  import type { Build } from './build.js';
7
- import type { ControllerDefinitionsMap, InferControllerPropsMapFromDefinitions, InferControllerStaticStateMapFromDefinitions, InferControllersMapFromDefinition } from './common.js';
7
+ import type { ControllerDefinitionsMap, ControllerStaticStateMap, ControllersMap, ControllersPropsMap } from './controllers.js';
8
8
  import type { FetchStaticState } from './fetch-static-state.js';
9
9
  import type { HydrateStaticState } from './hydrate-static-state.js';
10
+ import type { InferControllerPropsMapFromDefinitions, InferControllerStaticStateMapFromDefinitions, InferControllersMapFromDefinition } from './inference.js';
11
+ import type { HasKeys } from './utilities.js';
10
12
  export type EngineDefinitionOptions<TOptions extends {
11
13
  configuration: EngineConfiguration;
12
14
  }, TControllers extends ControllerDefinitionsMap<CoreEngine | CoreEngineNext, Controller>> = TOptions & {
@@ -36,6 +38,17 @@ export interface EngineDefinition<TEngine extends CoreEngine | CoreEngineNext, T
36
38
  */
37
39
  build: Build<TEngine, TEngineOptions, InferControllersMapFromDefinition<TControllers>, InferControllerPropsMapFromDefinitions<TControllers>>;
38
40
  }
41
+ export interface EngineDefinitionBuildResult<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap> {
42
+ engine: TEngine;
43
+ controllers: TControllers;
44
+ }
45
+ export type EngineDefinitionControllersPropsOption<TControllersPropsMap extends ControllersPropsMap> = HasKeys<TControllersPropsMap> extends false ? {} : {
46
+ controllers: TControllersPropsMap;
47
+ };
48
+ export interface EngineStaticState<TSearchAction extends UnknownAction, TControllers extends ControllerStaticStateMap> {
49
+ searchAction: TSearchAction;
50
+ controllers: TControllers;
51
+ }
39
52
  export type InferStaticState<T extends {
40
53
  fetchStaticState(...args: unknown[]): Promise<unknown>;
41
54
  }> = Awaited<ReturnType<T['fetchStaticState']>>;
@@ -1,7 +1,9 @@
1
1
  import type { UnknownAction } from '@reduxjs/toolkit';
2
- import type { CoreEngine, CoreEngineNext } from '../../engine.js';
3
- import type { ControllerStaticStateMap, ControllersMap, ControllersPropsMap, EngineDefinitionControllersPropsOption, EngineStaticState, OptionsTuple } from './common.js';
2
+ import type { CoreEngine, CoreEngineNext } from '../../../app/engine.js';
3
+ import type { ControllerStaticStateMap, ControllersMap, ControllersPropsMap } from './controllers.js';
4
+ import type { EngineDefinitionControllersPropsOption, EngineStaticState } from './engine.js';
4
5
  import type { FromBuildResult } from './from-build-result.js';
6
+ import type { OptionsTuple } from './utilities.js';
5
7
  type FetchStaticStateOptions = {};
6
8
  export type FetchStaticState<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap, TSearchAction extends UnknownAction, TControllersStaticState extends ControllerStaticStateMap, TControllersProps extends ControllersPropsMap> = {
7
9
  /**
@@ -1,5 +1,6 @@
1
- import type { CoreEngine, CoreEngineNext } from '../../engine.js';
2
- import type { ControllersMap, EngineDefinitionBuildResult } from './common.js';
1
+ import type { CoreEngine, CoreEngineNext } from '../../../app/engine.js';
2
+ import type { ControllersMap } from './controllers.js';
3
+ import type { EngineDefinitionBuildResult } from './engine.js';
3
4
  export interface FromBuildResultOptions<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap> {
4
5
  buildResult: EngineDefinitionBuildResult<TEngine, TControllers>;
5
6
  allowedRecommendationKeys?: (keyof TControllers)[];
@@ -1,10 +1,14 @@
1
1
  import type { UnknownAction } from '@reduxjs/toolkit';
2
- import type { CoreEngine, CoreEngineNext } from '../../engine.js';
3
- import type { ControllersMap, ControllersPropsMap, EngineDefinitionControllersPropsOption, HydratedState, OptionsTuple } from './common.js';
2
+ import type { CoreEngine, CoreEngineNext } from '../../../app/engine.js';
3
+ import type { ControllersMap, ControllersPropsMap } from './controllers.js';
4
+ import type { EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption } from './engine.js';
4
5
  import type { FromBuildResult } from './from-build-result.js';
6
+ import type { OptionsTuple } from './utilities.js';
5
7
  interface HydrateStaticStateOptions<TSearchAction> {
6
8
  searchAction: TSearchAction;
7
9
  }
10
+ export interface HydratedState<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap> extends EngineDefinitionBuildResult<TEngine, TControllers> {
11
+ }
8
12
  export type HydrateStaticState<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap, TSearchAction extends UnknownAction, TControllersProps extends ControllersPropsMap> = {
9
13
  /**
10
14
  * Creates a new engine from the snapshot of the engine created in SSR with fetchStaticState.