@daffodil/cart 0.88.1 → 0.89.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 (463) hide show
  1. package/driver/in-memory/index.d.ts +382 -1
  2. package/driver/index.d.ts +364 -1
  3. package/driver/magento/index.d.ts +995 -1
  4. package/driver/magento/testing/index.d.ts +188 -1
  5. package/driver/testing/index.d.ts +163 -1
  6. package/fesm2022/daffodil-cart-driver-in-memory.mjs +73 -73
  7. package/fesm2022/daffodil-cart-driver-in-memory.mjs.map +1 -1
  8. package/fesm2022/daffodil-cart-driver-magento-testing.mjs +30 -30
  9. package/fesm2022/daffodil-cart-driver-magento-testing.mjs.map +1 -1
  10. package/fesm2022/daffodil-cart-driver-magento.mjs +76 -76
  11. package/fesm2022/daffodil-cart-driver-magento.mjs.map +1 -1
  12. package/fesm2022/daffodil-cart-driver-testing.mjs +37 -37
  13. package/fesm2022/daffodil-cart-driver-testing.mjs.map +1 -1
  14. package/fesm2022/daffodil-cart-driver.mjs +3 -3
  15. package/fesm2022/daffodil-cart-driver.mjs.map +1 -1
  16. package/fesm2022/daffodil-cart-routing.mjs +37 -37
  17. package/fesm2022/daffodil-cart-routing.mjs.map +1 -1
  18. package/fesm2022/daffodil-cart-state-testing.mjs +16 -16
  19. package/fesm2022/daffodil-cart-state-testing.mjs.map +1 -1
  20. package/fesm2022/daffodil-cart-state.mjs +46 -46
  21. package/fesm2022/daffodil-cart-state.mjs.map +1 -1
  22. package/fesm2022/daffodil-cart-testing.mjs +27 -28
  23. package/fesm2022/daffodil-cart-testing.mjs.map +1 -1
  24. package/fesm2022/daffodil-cart.mjs +3 -3
  25. package/fesm2022/daffodil-cart.mjs.map +1 -1
  26. package/index.d.ts +459 -1
  27. package/package.json +1 -1
  28. package/routing/index.d.ts +240 -1
  29. package/state/index.d.ts +1704 -1
  30. package/state/testing/index.d.ts +130 -1
  31. package/testing/index.d.ts +169 -1
  32. package/driver/errors/cart-not-found.d.ts +0 -9
  33. package/driver/errors/codes.enum.d.ts +0 -12
  34. package/driver/errors/expired-payment-token.d.ts +0 -11
  35. package/driver/errors/invalid-api-response.d.ts +0 -10
  36. package/driver/errors/invalid-country.d.ts +0 -9
  37. package/driver/errors/invalid-coupon-code.d.ts +0 -11
  38. package/driver/errors/invalid-email.d.ts +0 -8
  39. package/driver/errors/invalid-region.d.ts +0 -9
  40. package/driver/errors/item-exceeds-max-qty.d.ts +0 -9
  41. package/driver/errors/map.d.ts +0 -25
  42. package/driver/errors/product-out-of-stock.d.ts +0 -9
  43. package/driver/errors/public_api.d.ts +0 -12
  44. package/driver/errors/unauthorized-for-cart.d.ts +0 -8
  45. package/driver/in-memory/backend/cart/cart.service.d.ts +0 -28
  46. package/driver/in-memory/backend/cart-address/cart-address.service.d.ts +0 -17
  47. package/driver/in-memory/backend/cart-billing-address/cart-billing-address.service.d.ts +0 -19
  48. package/driver/in-memory/backend/cart-coupon/cart-coupon.service.d.ts +0 -26
  49. package/driver/in-memory/backend/cart-items/cart-items.service.d.ts +0 -33
  50. package/driver/in-memory/backend/cart-order/cart-order.service.d.ts +0 -13
  51. package/driver/in-memory/backend/cart-payment/cart-payment.service.d.ts +0 -21
  52. package/driver/in-memory/backend/cart-payment-methods/cart-payment-methods.service.d.ts +0 -14
  53. package/driver/in-memory/backend/cart-root.service.d.ts +0 -35
  54. package/driver/in-memory/backend/cart-shipping-address/cart-shipping-address.service.d.ts +0 -19
  55. package/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.d.ts +0 -23
  56. package/driver/in-memory/backend/cart-shipping-methods/cart-shipping-methods.service.d.ts +0 -17
  57. package/driver/in-memory/backend/public_api.d.ts +0 -12
  58. package/driver/in-memory/collection-names.d.ts +0 -11
  59. package/driver/in-memory/drivers/cart/cart.service.d.ts +0 -24
  60. package/driver/in-memory/drivers/cart-address/cart-address.service.d.ts +0 -17
  61. package/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.d.ts +0 -18
  62. package/driver/in-memory/drivers/cart-coupon/cart-coupon.service.d.ts +0 -20
  63. package/driver/in-memory/drivers/cart-driver.module.d.ts +0 -9
  64. package/driver/in-memory/drivers/cart-item/cart-item.service.d.ts +0 -21
  65. package/driver/in-memory/drivers/cart-order/cart-order.service.d.ts +0 -17
  66. package/driver/in-memory/drivers/cart-payment/cart-payment.service.d.ts +0 -20
  67. package/driver/in-memory/drivers/cart-payment-methods/cart-payment-methods.service.d.ts +0 -17
  68. package/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.d.ts +0 -18
  69. package/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.d.ts +0 -19
  70. package/driver/in-memory/drivers/cart-shipping-methods/cart-shipping-methods.service.d.ts +0 -17
  71. package/driver/in-memory/drivers/public_api.d.ts +0 -11
  72. package/driver/in-memory/helpers/compute-cart-item-prices.d.ts +0 -3
  73. package/driver/in-memory/helpers/compute-cart-totals.d.ts +0 -3
  74. package/driver/in-memory/injection-tokens/extra-attributes-hook.token.d.ts +0 -4
  75. package/driver/in-memory/injection-tokens/public_api.d.ts +0 -1
  76. package/driver/in-memory/public_api.d.ts +0 -4
  77. package/driver/injection-tokens/free-payment-method.d.ts +0 -2
  78. package/driver/injection-tokens/public_api.d.ts +0 -1
  79. package/driver/interfaces/cart-address-service.interface.d.ts +0 -12
  80. package/driver/interfaces/cart-billing-address-service.interface.d.ts +0 -16
  81. package/driver/interfaces/cart-coupon-service.interface.d.ts +0 -24
  82. package/driver/interfaces/cart-item-service.interface.d.ts +0 -28
  83. package/driver/interfaces/cart-order-service.interface.d.ts +0 -12
  84. package/driver/interfaces/cart-payment-methods-service.interface.d.ts +0 -12
  85. package/driver/interfaces/cart-payment-service.interface.d.ts +0 -22
  86. package/driver/interfaces/cart-service.interface.d.ts +0 -29
  87. package/driver/interfaces/cart-shipping-address-service.interface.d.ts +0 -16
  88. package/driver/interfaces/cart-shipping-information-service.interface.d.ts +0 -21
  89. package/driver/interfaces/cart-shipping-methods-service.interface.d.ts +0 -12
  90. package/driver/interfaces/public_api.d.ts +0 -11
  91. package/driver/magento/cart-address.service.d.ts +0 -26
  92. package/driver/magento/cart-billing-address.service.d.ts +0 -30
  93. package/driver/magento/cart-coupon.service.d.ts +0 -24
  94. package/driver/magento/cart-driver.module.d.ts +0 -9
  95. package/driver/magento/cart-item.service.d.ts +0 -35
  96. package/driver/magento/cart-order.service.d.ts +0 -17
  97. package/driver/magento/cart-payment-methods.service.d.ts +0 -21
  98. package/driver/magento/cart-payment.service.d.ts +0 -34
  99. package/driver/magento/cart-shipping-address.service.d.ts +0 -30
  100. package/driver/magento/cart-shipping-information.service.d.ts +0 -29
  101. package/driver/magento/cart-shipping-methods.service.d.ts +0 -21
  102. package/driver/magento/cart.service.d.ts +0 -32
  103. package/driver/magento/errors/codes.d.ts +0 -5
  104. package/driver/magento/errors/map.d.ts +0 -11
  105. package/driver/magento/errors/transform.d.ts +0 -15
  106. package/driver/magento/injection-tokens/cart-mutation-queue.token.d.ts +0 -2
  107. package/driver/magento/injection-tokens/fragments/cart.d.ts +0 -2
  108. package/driver/magento/injection-tokens/public_api.d.ts +0 -3
  109. package/driver/magento/injection-tokens/transforms/cart/token.d.ts +0 -2
  110. package/driver/magento/injection-tokens/transforms/cart-item/token.d.ts +0 -2
  111. package/driver/magento/interfaces/cart-item-transform.type.d.ts +0 -3
  112. package/driver/magento/interfaces/cart-transform.type.d.ts +0 -6
  113. package/driver/magento/interfaces/public_api.d.ts +0 -2
  114. package/driver/magento/models/public_api.d.ts +0 -2
  115. package/driver/magento/models/requests/billing-address.d.ts +0 -5
  116. package/driver/magento/models/requests/cart-address-base.d.ts +0 -5
  117. package/driver/magento/models/requests/cart-address.d.ts +0 -12
  118. package/driver/magento/models/requests/cart-item-update.d.ts +0 -4
  119. package/driver/magento/models/requests/cart-item.d.ts +0 -11
  120. package/driver/magento/models/requests/payment-method.d.ts +0 -4
  121. package/driver/magento/models/requests/public_api.d.ts +0 -8
  122. package/driver/magento/models/requests/shipping-address.d.ts +0 -4
  123. package/driver/magento/models/requests/shipping-method.d.ts +0 -4
  124. package/driver/magento/models/responses/cart-address.d.ts +0 -19
  125. package/driver/magento/models/responses/cart-coupon.d.ts +0 -3
  126. package/driver/magento/models/responses/cart-item.d.ts +0 -60
  127. package/driver/magento/models/responses/cart-payment-method.d.ts +0 -6
  128. package/driver/magento/models/responses/cart-shipping-method.d.ts +0 -8
  129. package/driver/magento/models/responses/cart.d.ts +0 -33
  130. package/driver/magento/models/responses/public_api.d.ts +0 -9
  131. package/driver/magento/models/responses/shipping-address.d.ts +0 -6
  132. package/driver/magento/models/responses/user-error.enum.d.ts +0 -6
  133. package/driver/magento/models/responses/user-error.type.d.ts +0 -5
  134. package/driver/magento/public_api.d.ts +0 -16
  135. package/driver/magento/queries/add-item/public_api.d.ts +0 -3
  136. package/driver/magento/queries/add-item/query.d.ts +0 -4
  137. package/driver/magento/queries/add-item/response.type.d.ts +0 -9
  138. package/driver/magento/queries/add-item/variables.type.d.ts +0 -5
  139. package/driver/magento/queries/apply-coupon/public_api.d.ts +0 -3
  140. package/driver/magento/queries/apply-coupon/query.d.ts +0 -4
  141. package/driver/magento/queries/apply-coupon/response.type.d.ts +0 -6
  142. package/driver/magento/queries/apply-coupon/variables.type.d.ts +0 -4
  143. package/driver/magento/queries/create-cart/public_api.d.ts +0 -3
  144. package/driver/magento/queries/create-cart/query.d.ts +0 -1
  145. package/driver/magento/queries/create-cart/response.type.d.ts +0 -4
  146. package/driver/magento/queries/create-cart/variables.type.d.ts +0 -2
  147. package/driver/magento/queries/fragments/available-payment-method.d.ts +0 -1
  148. package/driver/magento/queries/fragments/available-shipping-method.d.ts +0 -1
  149. package/driver/magento/queries/fragments/cart-address.d.ts +0 -1
  150. package/driver/magento/queries/fragments/cart-coupon.d.ts +0 -1
  151. package/driver/magento/queries/fragments/cart-item.d.ts +0 -2
  152. package/driver/magento/queries/fragments/cart.d.ts +0 -1
  153. package/driver/magento/queries/fragments/prices.d.ts +0 -1
  154. package/driver/magento/queries/fragments/public_api.d.ts +0 -10
  155. package/driver/magento/queries/fragments/selected-payment-method.d.ts +0 -1
  156. package/driver/magento/queries/fragments/selected-shipping-method.d.ts +0 -1
  157. package/driver/magento/queries/fragments/user-error.d.ts +0 -1
  158. package/driver/magento/queries/get-billing-address/public_api.d.ts +0 -3
  159. package/driver/magento/queries/get-billing-address/query.d.ts +0 -4
  160. package/driver/magento/queries/get-billing-address/response.type.d.ts +0 -8
  161. package/driver/magento/queries/get-billing-address/variables.type.d.ts +0 -3
  162. package/driver/magento/queries/get-cart/public_api.d.ts +0 -3
  163. package/driver/magento/queries/get-cart/query.d.ts +0 -4
  164. package/driver/magento/queries/get-cart/response.type.d.ts +0 -5
  165. package/driver/magento/queries/get-cart/variables.type.d.ts +0 -3
  166. package/driver/magento/queries/get-selected-payment-method/public_api.d.ts +0 -3
  167. package/driver/magento/queries/get-selected-payment-method/query.d.ts +0 -4
  168. package/driver/magento/queries/get-selected-payment-method/response.type.d.ts +0 -7
  169. package/driver/magento/queries/get-selected-payment-method/variables.type.d.ts +0 -3
  170. package/driver/magento/queries/get-selected-shipping-method/public_api.d.ts +0 -3
  171. package/driver/magento/queries/get-selected-shipping-method/query.d.ts +0 -4
  172. package/driver/magento/queries/get-selected-shipping-method/response.type.d.ts +0 -10
  173. package/driver/magento/queries/get-selected-shipping-method/variables.type.d.ts +0 -3
  174. package/driver/magento/queries/get-shipping-address/public_api.d.ts +0 -3
  175. package/driver/magento/queries/get-shipping-address/query.d.ts +0 -4
  176. package/driver/magento/queries/get-shipping-address/response.type.d.ts +0 -8
  177. package/driver/magento/queries/get-shipping-address/variables.type.d.ts +0 -3
  178. package/driver/magento/queries/list-coupons/public_api.d.ts +0 -3
  179. package/driver/magento/queries/list-coupons/query.d.ts +0 -4
  180. package/driver/magento/queries/list-coupons/response.type.d.ts +0 -6
  181. package/driver/magento/queries/list-coupons/variables.type.d.ts +0 -3
  182. package/driver/magento/queries/list-items/public_api.d.ts +0 -3
  183. package/driver/magento/queries/list-items/query.d.ts +0 -4
  184. package/driver/magento/queries/list-items/response.type.d.ts +0 -7
  185. package/driver/magento/queries/list-items/variables.type.d.ts +0 -3
  186. package/driver/magento/queries/list-payment-methods/public_api.d.ts +0 -3
  187. package/driver/magento/queries/list-payment-methods/query.d.ts +0 -4
  188. package/driver/magento/queries/list-payment-methods/response.type.d.ts +0 -7
  189. package/driver/magento/queries/list-payment-methods/variables.type.d.ts +0 -3
  190. package/driver/magento/queries/list-shipping-methods/public_api.d.ts +0 -3
  191. package/driver/magento/queries/list-shipping-methods/query.d.ts +0 -3
  192. package/driver/magento/queries/list-shipping-methods/response.type.d.ts +0 -7
  193. package/driver/magento/queries/list-shipping-methods/variables.type.d.ts +0 -3
  194. package/driver/magento/queries/merge-carts/public_api.d.ts +0 -3
  195. package/driver/magento/queries/merge-carts/query.d.ts +0 -4
  196. package/driver/magento/queries/merge-carts/response.type.d.ts +0 -4
  197. package/driver/magento/queries/merge-carts/variables.type.d.ts +0 -4
  198. package/driver/magento/queries/place-order/public_api.d.ts +0 -3
  199. package/driver/magento/queries/place-order/query.d.ts +0 -2
  200. package/driver/magento/queries/place-order/response.type.d.ts +0 -12
  201. package/driver/magento/queries/place-order/variables.type.d.ts +0 -3
  202. package/driver/magento/queries/public_api.d.ts +0 -28
  203. package/driver/magento/queries/remove-all-coupons/public_api.d.ts +0 -3
  204. package/driver/magento/queries/remove-all-coupons/query.d.ts +0 -4
  205. package/driver/magento/queries/remove-all-coupons/response.type.d.ts +0 -6
  206. package/driver/magento/queries/remove-all-coupons/variables.type.d.ts +0 -3
  207. package/driver/magento/queries/remove-item/public_api.d.ts +0 -3
  208. package/driver/magento/queries/remove-item/query.d.ts +0 -4
  209. package/driver/magento/queries/remove-item/response.type.d.ts +0 -4
  210. package/driver/magento/queries/remove-item/variables.type.d.ts +0 -4
  211. package/driver/magento/queries/set-selected-payment-method/public_api.d.ts +0 -3
  212. package/driver/magento/queries/set-selected-payment-method/query.d.ts +0 -4
  213. package/driver/magento/queries/set-selected-payment-method/response.type.d.ts +0 -4
  214. package/driver/magento/queries/set-selected-payment-method/variables.type.d.ts +0 -5
  215. package/driver/magento/queries/set-selected-payment-method-with-billing/public_api.d.ts +0 -3
  216. package/driver/magento/queries/set-selected-payment-method-with-billing/query.d.ts +0 -4
  217. package/driver/magento/queries/set-selected-payment-method-with-billing/response.type.d.ts +0 -10
  218. package/driver/magento/queries/set-selected-payment-method-with-billing/variables.type.d.ts +0 -6
  219. package/driver/magento/queries/set-selected-payment-method-with-billing-and-email/public_api.d.ts +0 -3
  220. package/driver/magento/queries/set-selected-payment-method-with-billing-and-email/query.d.ts +0 -4
  221. package/driver/magento/queries/set-selected-payment-method-with-billing-and-email/response.type.d.ts +0 -16
  222. package/driver/magento/queries/set-selected-payment-method-with-billing-and-email/variables.type.d.ts +0 -7
  223. package/driver/magento/queries/set-selected-shipping-method/public_api.d.ts +0 -3
  224. package/driver/magento/queries/set-selected-shipping-method/query.d.ts +0 -4
  225. package/driver/magento/queries/set-selected-shipping-method/response.type.d.ts +0 -4
  226. package/driver/magento/queries/set-selected-shipping-method/variables.type.d.ts +0 -5
  227. package/driver/magento/queries/update-address/public_api.d.ts +0 -3
  228. package/driver/magento/queries/update-address/query.d.ts +0 -11
  229. package/driver/magento/queries/update-address/response.type.d.ts +0 -11
  230. package/driver/magento/queries/update-address/variables.type.d.ts +0 -6
  231. package/driver/magento/queries/update-address-with-email/public_api.d.ts +0 -3
  232. package/driver/magento/queries/update-address-with-email/query.d.ts +0 -11
  233. package/driver/magento/queries/update-address-with-email/response.type.d.ts +0 -18
  234. package/driver/magento/queries/update-address-with-email/variables.type.d.ts +0 -7
  235. package/driver/magento/queries/update-billing-address/public_api.d.ts +0 -3
  236. package/driver/magento/queries/update-billing-address/query.d.ts +0 -4
  237. package/driver/magento/queries/update-billing-address/response.type.d.ts +0 -4
  238. package/driver/magento/queries/update-billing-address/variables.type.d.ts +0 -5
  239. package/driver/magento/queries/update-billing-address-with-email/public_api.d.ts +0 -3
  240. package/driver/magento/queries/update-billing-address-with-email/query.d.ts +0 -4
  241. package/driver/magento/queries/update-billing-address-with-email/response.type.d.ts +0 -11
  242. package/driver/magento/queries/update-billing-address-with-email/variables.type.d.ts +0 -6
  243. package/driver/magento/queries/update-item/public_api.d.ts +0 -3
  244. package/driver/magento/queries/update-item/query.d.ts +0 -4
  245. package/driver/magento/queries/update-item/response.type.d.ts +0 -4
  246. package/driver/magento/queries/update-item/variables.type.d.ts +0 -5
  247. package/driver/magento/queries/update-shipping-address/public_api.d.ts +0 -3
  248. package/driver/magento/queries/update-shipping-address/query.d.ts +0 -4
  249. package/driver/magento/queries/update-shipping-address/response.type.d.ts +0 -4
  250. package/driver/magento/queries/update-shipping-address/variables.type.d.ts +0 -5
  251. package/driver/magento/queries/update-shipping-address-with-email/public_api.d.ts +0 -3
  252. package/driver/magento/queries/update-shipping-address-with-email/query.d.ts +0 -4
  253. package/driver/magento/queries/update-shipping-address-with-email/response.type.d.ts +0 -11
  254. package/driver/magento/queries/update-shipping-address-with-email/variables.type.d.ts +0 -6
  255. package/driver/magento/testing/factories/cart-address-input.factory.d.ts +0 -20
  256. package/driver/magento/testing/factories/cart-address.factory.d.ts +0 -30
  257. package/driver/magento/testing/factories/cart-coupon.factory.d.ts +0 -11
  258. package/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.d.ts +0 -25
  259. package/driver/magento/testing/factories/cart-item/cart-item.factory.d.ts +0 -24
  260. package/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.d.ts +0 -16
  261. package/driver/magento/testing/factories/cart-payment-method.factory.d.ts +0 -13
  262. package/driver/magento/testing/factories/cart-shipping-method.factory.d.ts +0 -17
  263. package/driver/magento/testing/factories/cart.factory.d.ts +0 -38
  264. package/driver/magento/testing/factories/public_api.d.ts +0 -10
  265. package/driver/magento/testing/factories/shipping-address.factory.d.ts +0 -14
  266. package/driver/magento/testing/public_api.d.ts +0 -1
  267. package/driver/magento/transforms/inputs/billing-address.service.d.ts +0 -11
  268. package/driver/magento/transforms/inputs/cart-address.service.d.ts +0 -8
  269. package/driver/magento/transforms/inputs/cart-item-input-transformers.d.ts +0 -5
  270. package/driver/magento/transforms/inputs/cart-item-update.service.d.ts +0 -8
  271. package/driver/magento/transforms/inputs/payment-method.service.d.ts +0 -8
  272. package/driver/magento/transforms/inputs/shipping-address.service.d.ts +0 -11
  273. package/driver/magento/transforms/inputs/shipping-method.service.d.ts +0 -8
  274. package/driver/magento/transforms/outputs/billing-address.service.d.ts +0 -19
  275. package/driver/magento/transforms/outputs/cart-address.service.d.ts +0 -16
  276. package/driver/magento/transforms/outputs/cart-coupon-response.service.d.ts +0 -21
  277. package/driver/magento/transforms/outputs/cart-coupon.d.ts +0 -3
  278. package/driver/magento/transforms/outputs/cart-item/bundle-cart-item-transformer.d.ts +0 -8
  279. package/driver/magento/transforms/outputs/cart-item/cart-item-transformer.d.ts +0 -11
  280. package/driver/magento/transforms/outputs/cart-item/configurable-cart-item-transformer.d.ts +0 -8
  281. package/driver/magento/transforms/outputs/cart-item/simple-cart-item-transformer.d.ts +0 -8
  282. package/driver/magento/transforms/outputs/cart-payment.service.d.ts +0 -16
  283. package/driver/magento/transforms/outputs/cart-shipping-rate.service.d.ts +0 -16
  284. package/driver/magento/transforms/outputs/cart-totals-transformer.d.ts +0 -5
  285. package/driver/magento/transforms/outputs/cart.service.d.ts +0 -36
  286. package/driver/magento/transforms/outputs/shipping-address.service.d.ts +0 -19
  287. package/driver/magento/transforms/public_api.d.ts +0 -12
  288. package/driver/operators/handle-cart-not-found.d.ts +0 -8
  289. package/driver/operators/public_api.d.ts +0 -1
  290. package/driver/public_api.d.ts +0 -5
  291. package/driver/services/public_api.d.ts +0 -1
  292. package/driver/services/resolve.service.d.ts +0 -25
  293. package/driver/testing/drivers/cart/cart.service.d.ts +0 -22
  294. package/driver/testing/drivers/cart-address/cart-address.service.d.ts +0 -16
  295. package/driver/testing/drivers/cart-billing-address/cart-billing-address.service.d.ts +0 -17
  296. package/driver/testing/drivers/cart-coupon/cart-coupon.service.d.ts +0 -19
  297. package/driver/testing/drivers/cart-driver.module.d.ts +0 -9
  298. package/driver/testing/drivers/cart-item/cart-item.service.d.ts +0 -20
  299. package/driver/testing/drivers/cart-order/cart-order.service.d.ts +0 -12
  300. package/driver/testing/drivers/cart-payment/cart-payment.service.d.ts +0 -19
  301. package/driver/testing/drivers/cart-payment-methods/cart-payment-methods.service.d.ts +0 -15
  302. package/driver/testing/drivers/cart-shipping-address/cart-shipping-address.service.d.ts +0 -17
  303. package/driver/testing/drivers/cart-shipping-information/cart-shipping-information.service.d.ts +0 -18
  304. package/driver/testing/drivers/cart-shipping-methods/cart-shipping-methods.service.d.ts +0 -15
  305. package/driver/testing/drivers/public_api.d.ts +0 -12
  306. package/driver/testing/public_api.d.ts +0 -1
  307. package/errors/codes.enum.d.ts +0 -10
  308. package/errors/map.d.ts +0 -10
  309. package/errors/public_api.d.ts +0 -3
  310. package/errors/resolution/cart-not-found-or-created-resolution.d.ts +0 -11
  311. package/errors/resolution/cart-resolution.d.ts +0 -10
  312. package/errors/resolution/cart-server-side-resolution.d.ts +0 -12
  313. package/errors/resolution/cart-storage-resolution.d.ts +0 -11
  314. package/errors/resolution/public_api.d.ts +0 -4
  315. package/helpers/get-affected-item.d.ts +0 -5
  316. package/helpers/get-item-total-discount.d.ts +0 -5
  317. package/helpers/input-to-item-transform.d.ts +0 -5
  318. package/helpers/public_api.d.ts +0 -3
  319. package/injection-tokens/payment-method-map.d.ts +0 -7
  320. package/injection-tokens/public_api.d.ts +0 -1
  321. package/models/cart-address.d.ts +0 -11
  322. package/models/cart-coupon.d.ts +0 -15
  323. package/models/cart-item-input.d.ts +0 -70
  324. package/models/cart-item.d.ts +0 -63
  325. package/models/cart-order-result.d.ts +0 -15
  326. package/models/cart-payment.d.ts +0 -15
  327. package/models/cart-shipping-rate.d.ts +0 -30
  328. package/models/cart-total.d.ts +0 -37
  329. package/models/cart.d.ts +0 -55
  330. package/models/composite-cart-item.d.ts +0 -24
  331. package/models/configurable-cart-item.d.ts +0 -23
  332. package/models/public_api.d.ts +0 -11
  333. package/public_api.d.ts +0 -5
  334. package/routing/cart-routing.module.d.ts +0 -9
  335. package/routing/config/config.d.ts +0 -16
  336. package/routing/config/resolution/config.d.ts +0 -15
  337. package/routing/guards/billing-address/billing-address-guard-redirect.token.d.ts +0 -1
  338. package/routing/guards/billing-address/billing-address.guard.d.ts +0 -19
  339. package/routing/guards/cart-items/cart-items-guard-redirect.token.d.ts +0 -1
  340. package/routing/guards/cart-items/cart-items.guard.d.ts +0 -20
  341. package/routing/guards/in-stock-items/in-stock-items-guard-redirect.token.d.ts +0 -1
  342. package/routing/guards/in-stock-items/in-stock-items.guard.d.ts +0 -21
  343. package/routing/guards/order-result/order-result-guard-redirect.token.d.ts +0 -1
  344. package/routing/guards/order-result/order-result.guard.d.ts +0 -17
  345. package/routing/guards/payment-method/payment-method-guard-redirect.token.d.ts +0 -1
  346. package/routing/guards/payment-method/payment-method.guard.d.ts +0 -19
  347. package/routing/guards/public_api.d.ts +0 -17
  348. package/routing/guards/resolve-cart/redirect.token.d.ts +0 -1
  349. package/routing/guards/resolve-cart/resolve-cart.guard.d.ts +0 -22
  350. package/routing/guards/resolved-cart/resolved-cart.guard.d.ts +0 -21
  351. package/routing/guards/shipping-address/shipping-address-guard-redirect.token.d.ts +0 -1
  352. package/routing/guards/shipping-address/shipping-address.guard.d.ts +0 -19
  353. package/routing/guards/shipping-method/shipping-method-guard-redirect.token.d.ts +0 -1
  354. package/routing/guards/shipping-method/shipping-method.guard.d.ts +0 -19
  355. package/routing/public_api.d.ts +0 -5
  356. package/routing/resolvers/cart-resolver.service.d.ts +0 -20
  357. package/routing/resolvers/empty-cart-resolver.service.d.ts +0 -20
  358. package/routing/resolvers/public_api.d.ts +0 -4
  359. package/routing/resolvers/tokens/cart-resolver-redirect.token.d.ts +0 -1
  360. package/routing/resolvers/tokens/empty-cart-resolver-redirect.token.d.ts +0 -1
  361. package/state/actions/cart-address.actions.d.ts +0 -40
  362. package/state/actions/cart-billing-address.actions.d.ts +0 -65
  363. package/state/actions/cart-coupon.actions.d.ts +0 -124
  364. package/state/actions/cart-item.actions.d.ts +0 -188
  365. package/state/actions/cart-order.actions.d.ts +0 -51
  366. package/state/actions/cart-payment-methods.actions.d.ts +0 -38
  367. package/state/actions/cart-payment.actions.d.ts +0 -135
  368. package/state/actions/cart-retrieval.d.ts +0 -5
  369. package/state/actions/cart-shipping-address.actions.d.ts +0 -65
  370. package/state/actions/cart-shipping-information.actions.d.ts +0 -86
  371. package/state/actions/cart-shipping-methods.actions.d.ts +0 -32
  372. package/state/actions/cart.actions.d.ts +0 -184
  373. package/state/actions/public_api.d.ts +0 -12
  374. package/state/cart-retrieval/get-response.d.ts +0 -8
  375. package/state/cart-retrieval/public_api.d.ts +0 -3
  376. package/state/cart-retrieval/token.d.ts +0 -2
  377. package/state/cart-retrieval/type.d.ts +0 -40
  378. package/state/cart-state.module.d.ts +0 -8
  379. package/state/effects/cart-address.effects.d.ts +0 -16
  380. package/state/effects/cart-billing-address.effects.d.ts +0 -17
  381. package/state/effects/cart-coupon.effects.d.ts +0 -19
  382. package/state/effects/cart-item.effects.d.ts +0 -26
  383. package/state/effects/cart-order.effects.d.ts +0 -18
  384. package/state/effects/cart-payment-methods.effects.d.ts +0 -16
  385. package/state/effects/cart-payment-processor.effects.d.ts +0 -40
  386. package/state/effects/cart-payment.effects.d.ts +0 -19
  387. package/state/effects/cart-resolver.effects.d.ts +0 -27
  388. package/state/effects/cart-shipping-address.effects.d.ts +0 -17
  389. package/state/effects/cart-shipping-information.effects.d.ts +0 -18
  390. package/state/effects/cart-shipping-methods.effects.d.ts +0 -16
  391. package/state/effects/cart.effects.d.ts +0 -19
  392. package/state/effects/public_api.d.ts +0 -1
  393. package/state/facades/cart/cart-facade.interface.d.ts +0 -212
  394. package/state/facades/cart/cart.facade.d.ts +0 -90
  395. package/state/helpers/cart-items-entity-transform.d.ts +0 -12
  396. package/state/helpers/public_api.d.ts +0 -1
  397. package/state/injection-tokens/cart-item-state-debounce-time.d.ts +0 -1
  398. package/state/injection-tokens/error-matcher.token.d.ts +0 -2
  399. package/state/injection-tokens/public_api.d.ts +0 -2
  400. package/state/models/public_api.d.ts +0 -1
  401. package/state/models/stateful-cart.d.ts +0 -8
  402. package/state/public_api.d.ts +0 -10
  403. package/state/reducers/action-types.type.d.ts +0 -3
  404. package/state/reducers/cart/cart.reducer.d.ts +0 -4
  405. package/state/reducers/cart/retrieval-actions.reducer.d.ts +0 -9
  406. package/state/reducers/cart-billing-address/cart-billing-address.reducer.d.ts +0 -4
  407. package/state/reducers/cart-coupon/cart-coupon.reducer.d.ts +0 -4
  408. package/state/reducers/cart-initial-state.d.ts +0 -2
  409. package/state/reducers/cart-item/cart-item.reducer.d.ts +0 -4
  410. package/state/reducers/cart-item-entities/adapter.d.ts +0 -6
  411. package/state/reducers/cart-item-entities/cart-item-entities.reducer.d.ts +0 -11
  412. package/state/reducers/cart-item-entities/retrieval-actions.reducer.d.ts +0 -9
  413. package/state/reducers/cart-item-entities/set-state-meta-reducer.d.ts +0 -10
  414. package/state/reducers/cart-operation-type.enum.d.ts +0 -15
  415. package/state/reducers/cart-order/cart-order-initial-state.d.ts +0 -2
  416. package/state/reducers/cart-order/cart-order-state.interface.d.ts +0 -7
  417. package/state/reducers/cart-order/cart-order.reducer.d.ts +0 -4
  418. package/state/reducers/cart-payment/cart-payment.reducer.d.ts +0 -4
  419. package/state/reducers/cart-payment/payment.reducer.d.ts +0 -3
  420. package/state/reducers/cart-payment-methods/cart-payment-methods.reducer.d.ts +0 -4
  421. package/state/reducers/cart-reducers-state.interface.d.ts +0 -13
  422. package/state/reducers/cart-reducers.d.ts +0 -3
  423. package/state/reducers/cart-resolve/cart-resolve-state.enum.d.ts +0 -7
  424. package/state/reducers/cart-resolve/cart-resolve.reducer.d.ts +0 -4
  425. package/state/reducers/cart-shipping-address/cart-shipping-address.reducer.d.ts +0 -4
  426. package/state/reducers/cart-shipping-information/cart-shipping-information.reducer.d.ts +0 -4
  427. package/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.d.ts +0 -4
  428. package/state/reducers/cart-state.interface.d.ts +0 -10
  429. package/state/reducers/cart-store-feature-key.d.ts +0 -1
  430. package/state/reducers/cart.reducer.d.ts +0 -8
  431. package/state/reducers/errors/cart-errors.type.d.ts +0 -5
  432. package/state/reducers/errors/error-state-helpers.d.ts +0 -29
  433. package/state/reducers/loading/cart-loading.type.d.ts +0 -27
  434. package/state/reducers/public_api.d.ts +0 -17
  435. package/state/reducers/token/config.token.d.ts +0 -8
  436. package/state/reducers/token/extra.token.d.ts +0 -3
  437. package/state/reducers/token/meta.token.d.ts +0 -3
  438. package/state/reducers/token/public_api.d.ts +0 -2
  439. package/state/reducers/token/reducers.token.d.ts +0 -3
  440. package/state/selectors/cart/cart.selector.d.ts +0 -178
  441. package/state/selectors/cart-feature.selector.d.ts +0 -7
  442. package/state/selectors/cart-item-entities/cart-item-entities.selectors.d.ts +0 -26
  443. package/state/selectors/cart-order/cart-order.selector.d.ts +0 -20
  444. package/state/selectors/cart.selector.d.ts +0 -8
  445. package/state/selectors/public_api.d.ts +0 -1
  446. package/state/testing/cart-testing.module.d.ts +0 -6
  447. package/state/testing/factories/stateful-cart-item.factory.d.ts +0 -18
  448. package/state/testing/factories/stateful-composite-cart-item.factory.d.ts +0 -18
  449. package/state/testing/factories/stateful-configurable-cart-item.factory.d.ts +0 -18
  450. package/state/testing/mock-cart-facade.d.ts +0 -77
  451. package/state/testing/public_api.d.ts +0 -5
  452. package/storage/cart-storage.service.d.ts +0 -23
  453. package/testing/factories/cart-address.factory.d.ts +0 -26
  454. package/testing/factories/cart-coupon.factory.d.ts +0 -13
  455. package/testing/factories/cart-item/cart-item.factory.d.ts +0 -30
  456. package/testing/factories/cart-item/composite-cart-item.factory.d.ts +0 -20
  457. package/testing/factories/cart-item/configurable-cart-item.factory.d.ts +0 -19
  458. package/testing/factories/cart-payment.factory.d.ts +0 -11
  459. package/testing/factories/cart-shipping-rate.factory.d.ts +0 -17
  460. package/testing/factories/cart-total.factory.d.ts +0 -23
  461. package/testing/factories/cart.factory.d.ts +0 -26
  462. package/testing/factories/public_api.d.ts +0 -9
  463. package/testing/public_api.d.ts +0 -1
package/state/index.d.ts CHANGED
@@ -1 +1,1704 @@
1
- export * from './public_api';
1
+ import * as _ngrx_store from '@ngrx/store';
2
+ import { Action, ActionReducerMap, ActionReducer, MetaReducer, MemoizedSelector, DefaultProjectorFn, Store } from '@ngrx/store';
3
+ import * as _daffodil_cart from '@daffodil/cart';
4
+ import { DaffCart, DaffCartItem, DaffCartItemInput, DaffCartAddress, DaffCartShippingRate, DaffCartPaymentMethod, DaffCartOrderResult, DaffCartCoupon, DaffConfigurableCartItemAttribute, DaffCompositeCartItemOption, DaffCompositeCartItem, DaffConfigurableCartItem } from '@daffodil/cart';
5
+ import { DaffFailureAction, DaffStateError, DaffMutableLoadingState, DaffState, DaffLoadingState, DaffOperationEntityState, DaffOperationEntityStateAdapter, DaffOperationEntity, daffTransformErrorToStateError, DaffStoreFacade } from '@daffodil/core/state';
6
+ import { DaffProduct } from '@daffodil/product';
7
+ import * as _angular_core from '@angular/core';
8
+ import { Observable } from 'rxjs';
9
+ import { DaffCartPaymentServiceInterface, DaffCartDriverResolveService } from '@daffodil/cart/driver';
10
+ import { DaffError } from '@daffodil/core';
11
+ import { DaffPaymentRequest, DaffPaymentResponse } from '@daffodil/payment';
12
+ import { DaffPaymentDriverInterface } from '@daffodil/payment/driver';
13
+ import { DaffPaymentGenerateTokenPayload } from '@daffodil/payment/state';
14
+ import * as _ngrx_effects from '@ngrx/effects';
15
+ import { Dictionary } from '@ngrx/entity';
16
+
17
+ /**
18
+ * Represents an action that loads a portion of the cart.
19
+ */
20
+ interface DaffCartRetrievalAction<T extends DaffCart = DaffCart> extends Action {
21
+ readonly payload: Partial<T>;
22
+ }
23
+ /**
24
+ * Represents an injection of a retrieval action that implements the {@link DaffCartRetrievalAction} interface
25
+ * and therefore does not need transformation.
26
+ * If the injected action needs transformation, use {@link DaffCartRetrievalActionTransformedInjection}
27
+ */
28
+ interface DaffCartRetrievalActionDirectInjection<T extends DaffCartRetrievalAction = DaffCartRetrievalAction> {
29
+ /**
30
+ * The action type.
31
+ */
32
+ type: T['type'];
33
+ }
34
+ /**
35
+ * Represents an injection of a retrieval action that doesn't implement the {@link DaffCartRetrievalAction} interface.
36
+ * Contains a way to get the cart from the action.
37
+ */
38
+ interface DaffCartRetrievalActionTransformedInjection<T extends Action = Action> {
39
+ /**
40
+ * The action type.
41
+ */
42
+ type: T['type'];
43
+ /**
44
+ * A function that gets the retrieved cart from the action.
45
+ */
46
+ transform: <TCart extends DaffCart = DaffCart>(action: T) => Partial<TCart>;
47
+ }
48
+ /**
49
+ * Represents an injection of a cart retrieval action.
50
+ * These actions are typically dispatched when an operation that mutates or loads the cart completes.
51
+ * Actions provided to {@link DAFF_CART_RETRIEVAL_ACTIONS} are natively understood by Daffodil reducers and will automatically
52
+ * populate the appropriate pieces of state when they are dispatched.
53
+ */
54
+ type DaffCartRetrievalActionInjection = DaffCartRetrievalActionDirectInjection | DaffCartRetrievalActionTransformedInjection;
55
+
56
+ declare const DAFF_CART_RETRIEVAL_ACTIONS: _angular_core.InjectionToken<DaffCartRetrievalActionInjection[]>;
57
+ declare const daffCartProvideRetrievalActions: <R extends DaffCartRetrievalActionInjection = DaffCartRetrievalActionInjection>(...values: R[]) => Array<_angular_core.ValueProvider>;
58
+
59
+ /**
60
+ * Gets the cart from the passed action if it is a recognized retrieval action and applies the transformation if needed.
61
+ * If the action is not recognized as a retrieval action, returns `null`.
62
+ */
63
+ declare function daffCartRetrievalGetResponse<T extends DaffCart = DaffCart>(action: Action, retrievalActions: DaffCartRetrievalActionInjection[]): Partial<T> | null;
64
+
65
+ /**
66
+ * An enum for the cart action types.
67
+ */
68
+ declare enum DaffCartActionTypes {
69
+ CartStorageFailureAction = "[@daffodil/cart] Cart Storage Failure Action",
70
+ CartLoadAction = "[@daffodil/cart] Cart Load Action",
71
+ CartLoadSuccessAction = "[@daffodil/cart] Cart Load Success Action",
72
+ CartLoadPartialSuccessAction = "[@daffodil/cart] Cart Load Partial Success Action",
73
+ CartLoadFailureAction = "[@daffodil/cart] Cart Load Failure Action",
74
+ CartCreateAction = "[@daffodil/cart] Cart Create Action",
75
+ CartCreateSuccessAction = "[@daffodil/cart] Cart Create Success Action",
76
+ CartCreateFailureAction = "[@daffodil/cart] Cart Create Failure Action",
77
+ AddToCartAction = "[@daffodil/cart] Cart Add To Cart Action",
78
+ AddToCartSuccessAction = "[@daffodil/cart] Cart Add to Cart Success Action",
79
+ AddToCartFailureAction = "[@daffodil/cart] Cart Add to Cart Failure Action",
80
+ CartClearAction = "[@daffodil/cart] Cart Reset Action",
81
+ CartClearSuccessAction = "[@daffodil/cart] Cart Reset Success Action",
82
+ CartClearFailureAction = "[@daffodil/cart] Cart Reset Failure Action",
83
+ ResolveCartAction = "[@daffodil/cart] Resolve Cart Action",
84
+ ResolveCartSuccessAction = "[@daffodil/cart] Resolve Cart Success Action",
85
+ ResolveCartPartialSuccessAction = "[@daffodil/cart] Resolve Cart Partial Success Action",
86
+ ResolveCartServerSideAction = "[@daffodil/cart] Resolve Cart Server Side Action",
87
+ ResolveCartFailureAction = "[@daffodil/cart] Resolve Cart Failure Action"
88
+ }
89
+ /**
90
+ * Indicates that an error occured while either reading or writing the cart ID to or from storage.
91
+ */
92
+ declare class DaffCartStorageFailure implements DaffFailureAction {
93
+ payload: DaffStateError[];
94
+ readonly type = DaffCartActionTypes.CartStorageFailureAction;
95
+ constructor(payload: DaffStateError[]);
96
+ }
97
+ /**
98
+ * Triggers the load of the cart.
99
+ */
100
+ declare class DaffCartLoad implements Action {
101
+ readonly type = DaffCartActionTypes.CartLoadAction;
102
+ }
103
+ /**
104
+ * Indicates the successful load of the cart.
105
+ */
106
+ declare class DaffCartLoadSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
107
+ payload: T;
108
+ readonly type = DaffCartActionTypes.CartLoadSuccessAction;
109
+ constructor(payload: T);
110
+ }
111
+ /**
112
+ * An action that indicates a user's cart is loaded but recoverable errors occurred.
113
+ * There should be enough data to render the cart
114
+ * but the user should probably be shown error messages as well.
115
+ * A common example is some cart items being out of stock.
116
+ */
117
+ declare class DaffCartLoadPartialSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
118
+ payload: T;
119
+ errors: DaffStateError[];
120
+ readonly type = DaffCartActionTypes.CartLoadPartialSuccessAction;
121
+ constructor(payload: T, errors: DaffStateError[]);
122
+ }
123
+ /**
124
+ * Indicates the failed load of the cart.
125
+ */
126
+ declare class DaffCartLoadFailure implements DaffFailureAction {
127
+ payload: DaffStateError[];
128
+ readonly type = DaffCartActionTypes.CartLoadFailureAction;
129
+ constructor(payload: DaffStateError[]);
130
+ }
131
+ /**
132
+ * Triggers the creation of a new cart.
133
+ */
134
+ declare class DaffCartCreate implements Action {
135
+ readonly type = DaffCartActionTypes.CartCreateAction;
136
+ }
137
+ /**
138
+ * Indicates the successful creation of a new cart.
139
+ */
140
+ declare class DaffCartCreateSuccess<T extends DaffCart = DaffCart> implements Action {
141
+ payload: Pick<T, 'id'>;
142
+ readonly type = DaffCartActionTypes.CartCreateSuccessAction;
143
+ constructor(payload: Pick<T, 'id'>);
144
+ }
145
+ /**
146
+ * Indicates the failed creation of a new cart.
147
+ */
148
+ declare class DaffCartCreateFailure implements DaffFailureAction {
149
+ payload: DaffStateError[];
150
+ readonly type = DaffCartActionTypes.CartCreateFailureAction;
151
+ constructor(payload: DaffStateError[]);
152
+ }
153
+ declare class DaffAddToCart implements Action {
154
+ payload: {
155
+ productId: DaffProduct['id'];
156
+ qty: number;
157
+ };
158
+ readonly type = DaffCartActionTypes.AddToCartAction;
159
+ constructor(payload: {
160
+ productId: DaffProduct['id'];
161
+ qty: number;
162
+ });
163
+ }
164
+ declare class DaffAddToCartSuccess implements Action {
165
+ payload: DaffCart;
166
+ readonly type = DaffCartActionTypes.AddToCartSuccessAction;
167
+ constructor(payload: DaffCart);
168
+ }
169
+ declare class DaffAddToCartFailure implements DaffFailureAction {
170
+ payload: DaffStateError[];
171
+ readonly type = DaffCartActionTypes.AddToCartFailureAction;
172
+ constructor(payload: DaffStateError[]);
173
+ }
174
+ /**
175
+ * Triggers the removal of all items from the cart.
176
+ */
177
+ declare class DaffCartClear implements Action {
178
+ readonly type = DaffCartActionTypes.CartClearAction;
179
+ }
180
+ /**
181
+ * Indicates the successful removal of all items from the cart.
182
+ */
183
+ declare class DaffCartClearSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
184
+ payload: Partial<T>;
185
+ readonly type = DaffCartActionTypes.CartClearSuccessAction;
186
+ constructor(payload: Partial<T>);
187
+ }
188
+ /**
189
+ * Indicates the failed removal of all items from the cart.
190
+ */
191
+ declare class DaffCartClearFailure implements DaffFailureAction {
192
+ payload: DaffStateError[];
193
+ readonly type = DaffCartActionTypes.CartClearFailureAction;
194
+ constructor(payload: DaffStateError[]);
195
+ }
196
+ /**
197
+ * Triggers cart resolution.
198
+ * Will attempt to load a cart if it exists and create a cart otherwise.
199
+ */
200
+ declare class DaffResolveCart implements Action {
201
+ readonly type = DaffCartActionTypes.ResolveCartAction;
202
+ }
203
+ /**
204
+ * An action that indicates a user's cart is resolved successfully.
205
+ */
206
+ declare class DaffResolveCartSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
207
+ payload: T;
208
+ readonly type = DaffCartActionTypes.ResolveCartSuccessAction;
209
+ constructor(payload: T);
210
+ }
211
+ /**
212
+ * An action that indicates a user's cart is resolved but recoverable errors occurred.
213
+ * There should be enough data to render the cart
214
+ * but the user should probably be shown error messages as well.
215
+ * A common example is some cart items being out of stock.
216
+ */
217
+ declare class DaffResolveCartPartialSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
218
+ payload: T;
219
+ errors: DaffStateError[];
220
+ readonly type = DaffCartActionTypes.ResolveCartPartialSuccessAction;
221
+ constructor(payload: T, errors: DaffStateError[]);
222
+ }
223
+ /**
224
+ * An action that indicates that a cart failed to resolve.
225
+ */
226
+ declare class DaffResolveCartFailure implements DaffFailureAction {
227
+ payload: DaffStateError[];
228
+ readonly type = DaffCartActionTypes.ResolveCartFailureAction;
229
+ constructor(payload: DaffStateError[]);
230
+ }
231
+ /**
232
+ * An action indicating that the cart resolution terminated as a result
233
+ * of an attempted resolution on the server.
234
+ */
235
+ declare class DaffResolveCartServerSide implements Action {
236
+ payload: DaffStateError[];
237
+ readonly type = DaffCartActionTypes.ResolveCartServerSideAction;
238
+ constructor(payload: DaffStateError[]);
239
+ }
240
+ /**
241
+ * A union of all the cart action classes.
242
+ */
243
+ type DaffCartActions<T extends DaffCart = DaffCart> = DaffCartStorageFailure | DaffCartLoad | DaffCartLoadSuccess<T> | DaffCartLoadPartialSuccess<T> | DaffCartLoadFailure | DaffCartCreate | DaffCartCreateSuccess<T> | DaffCartCreateFailure | DaffAddToCart | DaffAddToCartSuccess | DaffAddToCartFailure | DaffCartClear | DaffCartClearSuccess<T> | DaffCartClearFailure | DaffResolveCart | DaffResolveCartSuccess<T> | DaffResolveCartPartialSuccess<T> | DaffResolveCartServerSide | DaffResolveCartFailure;
244
+
245
+ /**
246
+ * An enum for the cart item action types.
247
+ */
248
+ declare enum DaffCartItemActionTypes {
249
+ CartItemListAction = "[@daffodil/cart] Cart Items List Action",
250
+ CartItemListSuccessAction = "[@daffodil/cart] Cart Items List Success Action",
251
+ CartItemListFailureAction = "[@daffodil/cart] Cart Items List Failure Action",
252
+ CartItemLoadAction = "[@daffodil/cart] Cart Item Load Action",
253
+ CartItemLoadSuccessAction = "[@daffodil/cart] Cart Item Load Success Action",
254
+ CartItemLoadFailureAction = "[@daffodil/cart] Cart Item Load Failure Action",
255
+ CartItemUpdateAction = "[@daffodil/cart] Cart Item Update Action",
256
+ CartItemUpdateSuccessAction = "[@daffodil/cart] Cart Item Update Success Action",
257
+ CartItemUpdateFailureAction = "[@daffodil/cart] Cart Item Update Failure Action",
258
+ CartItemAddAction = "[@daffodil/cart] Cart Item Add Action",
259
+ CartItemAddSuccessAction = "[@daffodil/cart] Cart Item Add Success Action",
260
+ CartItemAddFailureAction = "[@daffodil/cart] Cart Item Add Failure Action",
261
+ CartItemDeleteAction = "[@daffodil/cart] Cart Item Remove Action",
262
+ CartItemDeleteSuccessAction = "[@daffodil/cart] Cart Item Remove Success Action",
263
+ CartItemDeleteFailureAction = "[@daffodil/cart] Cart Item Remove Failure Action",
264
+ CartItemDeleteOutOfStockAction = "[@daffodil/cart] Cart Item Delete Out Of Stock Action",
265
+ CartItemDeleteOutOfStockSuccessAction = "[@daffodil/cart] Cart Item Delete Out Of Stock Success Action",
266
+ CartItemDeleteOutOfStockFailureAction = "[@daffodil/cart] Cart Item Delete Out Of Stock Failure Action",
267
+ CartItemStateResetAction = "[@daffodil/cart] Cart Item State Reset Action"
268
+ }
269
+ /**
270
+ * Triggers the load of the cart's items.
271
+ */
272
+ declare class DaffCartItemList implements Action {
273
+ readonly type = DaffCartItemActionTypes.CartItemListAction;
274
+ }
275
+ /**
276
+ * Indicates the successful load of the cart's items.
277
+ */
278
+ declare class DaffCartItemListSuccess<T extends DaffCartItem = DaffCartItem> implements Action {
279
+ payload: T[];
280
+ readonly type = DaffCartItemActionTypes.CartItemListSuccessAction;
281
+ constructor(payload: T[]);
282
+ }
283
+ /**
284
+ * Indicates the failed load of the cart's items.
285
+ */
286
+ declare class DaffCartItemListFailure implements DaffFailureAction {
287
+ payload: DaffStateError[];
288
+ readonly type = DaffCartItemActionTypes.CartItemListFailureAction;
289
+ constructor(payload: DaffStateError[]);
290
+ }
291
+ /**
292
+ * Triggers the load of a specific cart item.
293
+ */
294
+ declare class DaffCartItemLoad<T extends DaffCartItem = DaffCartItem> implements Action {
295
+ itemId: T['id'];
296
+ readonly type = DaffCartItemActionTypes.CartItemLoadAction;
297
+ constructor(itemId: T['id']);
298
+ }
299
+ /**
300
+ * Indicates the successful load of a specific cart item.
301
+ */
302
+ declare class DaffCartItemLoadSuccess<T extends DaffCartItem = DaffCartItem> implements Action {
303
+ payload: T;
304
+ readonly type = DaffCartItemActionTypes.CartItemLoadSuccessAction;
305
+ constructor(payload: T);
306
+ }
307
+ /**
308
+ * Indicates the failed load of a specific cart item.
309
+ */
310
+ declare class DaffCartItemLoadFailure implements Action {
311
+ payload: DaffStateError[];
312
+ itemId: DaffCartItem['id'];
313
+ readonly type = DaffCartItemActionTypes.CartItemLoadFailureAction;
314
+ constructor(payload: DaffStateError[], itemId: DaffCartItem['id']);
315
+ }
316
+ /**
317
+ * Triggers the update of a specific cart item.
318
+ */
319
+ declare class DaffCartItemUpdate<T extends DaffCartItem = DaffCartItem> implements Action {
320
+ itemId: T['id'];
321
+ changes: Partial<T>;
322
+ readonly type = DaffCartItemActionTypes.CartItemUpdateAction;
323
+ constructor(itemId: T['id'], changes: Partial<T>);
324
+ }
325
+ /**
326
+ * Indicates the successful update of a specific cart item.
327
+ */
328
+ declare class DaffCartItemUpdateSuccess<T extends DaffCart = DaffCart> implements Action {
329
+ payload: Partial<T>;
330
+ itemId: T['items'][number]['id'];
331
+ readonly type = DaffCartItemActionTypes.CartItemUpdateSuccessAction;
332
+ constructor(payload: Partial<T>, itemId: T['items'][number]['id']);
333
+ }
334
+ /**
335
+ * Indicates the failed update of a specific cart item.
336
+ */
337
+ declare class DaffCartItemUpdateFailure implements Action {
338
+ payload: DaffStateError[];
339
+ itemId: DaffCartItem['id'];
340
+ readonly type = DaffCartItemActionTypes.CartItemUpdateFailureAction;
341
+ constructor(payload: DaffStateError[], itemId: DaffCartItem['id']);
342
+ }
343
+ /**
344
+ * Triggers the addition of a product to the cart.
345
+ */
346
+ declare class DaffCartItemAdd<T extends DaffCartItemInput = DaffCartItemInput> implements Action {
347
+ input: T;
348
+ placeholderId?: string;
349
+ readonly type = DaffCartItemActionTypes.CartItemAddAction;
350
+ constructor(input: T, placeholderId?: string);
351
+ }
352
+ /**
353
+ * Indicates the successful addition of a product to the cart.
354
+ */
355
+ declare class DaffCartItemAddSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
356
+ payload: Partial<T>;
357
+ itemId: DaffCartItem['id'];
358
+ readonly type = DaffCartItemActionTypes.CartItemAddSuccessAction;
359
+ constructor(payload: Partial<T>, itemId: DaffCartItem['id']);
360
+ }
361
+ /**
362
+ * Indicates the failed addition of a product to the cart.
363
+ */
364
+ declare class DaffCartItemAddFailure implements DaffFailureAction {
365
+ payload: DaffStateError[];
366
+ placeholderId?: string;
367
+ readonly type = DaffCartItemActionTypes.CartItemAddFailureAction;
368
+ constructor(payload: DaffStateError[], placeholderId?: string);
369
+ }
370
+ /**
371
+ * Triggers the deletion of a specific cart item.
372
+ */
373
+ declare class DaffCartItemDelete<T extends DaffCartItem = DaffCartItem> implements Action {
374
+ itemId: T['id'];
375
+ readonly type = DaffCartItemActionTypes.CartItemDeleteAction;
376
+ constructor(itemId: T['id']);
377
+ }
378
+ /**
379
+ * Indicates the successful deletion of a specific cart item.
380
+ */
381
+ declare class DaffCartItemDeleteSuccess<T extends DaffCart = DaffCart> implements Action {
382
+ payload: Partial<T>;
383
+ readonly type = DaffCartItemActionTypes.CartItemDeleteSuccessAction;
384
+ constructor(payload: Partial<T>);
385
+ }
386
+ /**
387
+ * Indicates the failed deletion of a specific cart item.
388
+ */
389
+ declare class DaffCartItemDeleteFailure implements Action {
390
+ payload: DaffStateError[];
391
+ itemId: DaffCartItem['id'];
392
+ readonly type = DaffCartItemActionTypes.CartItemDeleteFailureAction;
393
+ constructor(payload: DaffStateError[], itemId: DaffCartItem['id']);
394
+ }
395
+ /**
396
+ * Triggers the deletion of all out of stock cart items.
397
+ */
398
+ declare class DaffCartItemDeleteOutOfStock implements Action {
399
+ readonly type = DaffCartItemActionTypes.CartItemDeleteOutOfStockAction;
400
+ }
401
+ /**
402
+ * Indicates the successful deletion of all out of stock cart items.
403
+ */
404
+ declare class DaffCartItemDeleteOutOfStockSuccess<T extends DaffCart = DaffCart> implements Action {
405
+ payload: Partial<T>;
406
+ readonly type = DaffCartItemActionTypes.CartItemDeleteOutOfStockSuccessAction;
407
+ constructor(payload: Partial<T>);
408
+ }
409
+ /**
410
+ * Indicates the failed deletion of all out of stock cart items.
411
+ */
412
+ declare class DaffCartItemDeleteOutOfStockFailure implements DaffFailureAction {
413
+ payload: DaffStateError[];
414
+ readonly type = DaffCartItemActionTypes.CartItemDeleteOutOfStockFailureAction;
415
+ constructor(payload: DaffStateError[]);
416
+ }
417
+ /**
418
+ * Resets cart item "new" or "updated" states to default.
419
+ */
420
+ declare class DaffCartItemStateReset implements Action {
421
+ itemId: DaffCartItem['id'];
422
+ readonly type = DaffCartItemActionTypes.CartItemStateResetAction;
423
+ constructor(itemId: DaffCartItem['id']);
424
+ }
425
+ /**
426
+ * A union of all the cart item action classes.
427
+ */
428
+ type DaffCartItemActions<T extends DaffCart = DaffCart, U extends DaffCartItemInput = DaffCartItemInput> = DaffCartItemList | DaffCartItemListSuccess<T['items'][number]> | DaffCartItemListFailure | DaffCartItemLoad<T['items'][number]> | DaffCartItemLoadSuccess<T['items'][number]> | DaffCartItemLoadFailure | DaffCartItemUpdate<T['items'][number]> | DaffCartItemUpdateSuccess<T> | DaffCartItemUpdateFailure | DaffCartItemAdd<U> | DaffCartItemAddSuccess<T> | DaffCartItemAddFailure | DaffCartItemDelete<T['items'][number]> | DaffCartItemDeleteSuccess<T> | DaffCartItemDeleteFailure | DaffCartItemDeleteOutOfStock | DaffCartItemDeleteOutOfStockSuccess<T> | DaffCartItemDeleteOutOfStockFailure | DaffCartItemStateReset;
429
+
430
+ /**
431
+ * An enum for the cart billing address action types.
432
+ */
433
+ declare enum DaffCartBillingAddressActionTypes {
434
+ CartBillingAddressLoadAction = "[@daffodil/cart] Billing Address Load Action",
435
+ CartBillingAddressLoadSuccessAction = "[@daffodil/cart] Billing Address Load Success Action",
436
+ CartBillingAddressLoadFailureAction = "[@daffodil/cart] Billing Address Load Failure Action",
437
+ CartBillingAddressUpdateAction = "[@daffodil/cart] Billing Address Update Action",
438
+ CartBillingAddressUpdateSuccessAction = "[@daffodil/cart] Billing Address Update Success Action",
439
+ CartBillingAddressUpdateFailureAction = "[@daffodil/cart] Billing Address Update Failure Action"
440
+ }
441
+ /**
442
+ * Triggers the load of the cart's billing address.
443
+ */
444
+ declare class DaffCartBillingAddressLoad implements Action {
445
+ readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressLoadAction;
446
+ }
447
+ /**
448
+ * Indicates the successful load of the cart's billing address.
449
+ */
450
+ declare class DaffCartBillingAddressLoadSuccess<T extends DaffCart = DaffCart> implements Action {
451
+ payload: T['billing_address'];
452
+ readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressLoadSuccessAction;
453
+ constructor(payload: T['billing_address']);
454
+ }
455
+ /**
456
+ * Indicates the failed load of the cart's billing address.
457
+ */
458
+ declare class DaffCartBillingAddressLoadFailure implements DaffFailureAction {
459
+ payload: DaffStateError[];
460
+ readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressLoadFailureAction;
461
+ constructor(payload: DaffStateError[]);
462
+ }
463
+ /**
464
+ * Triggers the update of the cart's billing address.
465
+ */
466
+ declare class DaffCartBillingAddressUpdate<T extends DaffCart = DaffCart> implements Action {
467
+ payload: Partial<T['billing_address']>;
468
+ readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressUpdateAction;
469
+ constructor(payload: Partial<T['billing_address']>);
470
+ }
471
+ /**
472
+ * Indicates the successful update of the cart's billing address.
473
+ */
474
+ declare class DaffCartBillingAddressUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
475
+ payload: Partial<T>;
476
+ readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressUpdateSuccessAction;
477
+ constructor(payload: Partial<T>);
478
+ }
479
+ /**
480
+ * Indicates the failed update of the cart's billing address.
481
+ */
482
+ declare class DaffCartBillingAddressUpdateFailure implements DaffFailureAction {
483
+ payload: DaffStateError[];
484
+ readonly type = DaffCartBillingAddressActionTypes.CartBillingAddressUpdateFailureAction;
485
+ constructor(payload: DaffStateError[]);
486
+ }
487
+ /**
488
+ * A union of all the cart billing address action classes.
489
+ */
490
+ type DaffCartBillingAddressActions<T extends DaffCart = DaffCart> = DaffCartBillingAddressLoad | DaffCartBillingAddressLoadSuccess<T> | DaffCartBillingAddressLoadFailure | DaffCartBillingAddressUpdate<T> | DaffCartBillingAddressUpdateSuccess<T> | DaffCartBillingAddressUpdateFailure;
491
+
492
+ /**
493
+ * An enum for the cart shipping address action types.
494
+ */
495
+ declare enum DaffCartShippingAddressActionTypes {
496
+ CartShippingAddressLoadAction = "[@daffodil/cart] Shipping Address Load Action",
497
+ CartShippingAddressLoadSuccessAction = "[@daffodil/cart] Shipping Address Load Success Action",
498
+ CartShippingAddressLoadFailureAction = "[@daffodil/cart] Shipping Address Load Failure Action",
499
+ CartShippingAddressUpdateAction = "[@daffodil/cart] Shipping Address Update Action",
500
+ CartShippingAddressUpdateSuccessAction = "[@daffodil/cart] Shipping Address Update Success Action",
501
+ CartShippingAddressUpdateFailureAction = "[@daffodil/cart] Shipping Address Update Failure Action"
502
+ }
503
+ /**
504
+ * Triggers the load of the cart's shipping address.
505
+ */
506
+ declare class DaffCartShippingAddressLoad implements Action {
507
+ readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressLoadAction;
508
+ }
509
+ /**
510
+ * Indicates the successful load of the cart's shipping address.
511
+ */
512
+ declare class DaffCartShippingAddressLoadSuccess<T extends DaffCart = DaffCart> implements Action {
513
+ payload: T['shipping_address'];
514
+ readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressLoadSuccessAction;
515
+ constructor(payload: T['shipping_address']);
516
+ }
517
+ /**
518
+ * Indicates the failed load of the cart's shipping address.
519
+ */
520
+ declare class DaffCartShippingAddressLoadFailure implements DaffFailureAction {
521
+ payload: DaffStateError[];
522
+ readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressLoadFailureAction;
523
+ constructor(payload: DaffStateError[]);
524
+ }
525
+ /**
526
+ * Triggers the update of the cart's shipping address.
527
+ */
528
+ declare class DaffCartShippingAddressUpdate<T extends DaffCart = DaffCart> implements Action {
529
+ payload: Partial<T['shipping_address']>;
530
+ readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressUpdateAction;
531
+ constructor(payload: Partial<T['shipping_address']>);
532
+ }
533
+ /**
534
+ * Indicates the successful update of the cart's shipping address.
535
+ */
536
+ declare class DaffCartShippingAddressUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
537
+ payload: Partial<T>;
538
+ readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressUpdateSuccessAction;
539
+ constructor(payload: Partial<T>);
540
+ }
541
+ /**
542
+ * Indicates the failed update of the cart's shipping address.
543
+ */
544
+ declare class DaffCartShippingAddressUpdateFailure implements DaffFailureAction {
545
+ payload: DaffStateError[];
546
+ readonly type = DaffCartShippingAddressActionTypes.CartShippingAddressUpdateFailureAction;
547
+ constructor(payload: DaffStateError[]);
548
+ }
549
+ /**
550
+ * A union of all the cart shipping address action classes.
551
+ */
552
+ type DaffCartShippingAddressActions<T extends DaffCart = DaffCart> = DaffCartShippingAddressLoad | DaffCartShippingAddressLoadSuccess<T> | DaffCartShippingAddressLoadFailure | DaffCartShippingAddressUpdate<T> | DaffCartShippingAddressUpdateSuccess<T> | DaffCartShippingAddressUpdateFailure;
553
+
554
+ /**
555
+ * An enum for the cart address action types.
556
+ */
557
+ declare enum DaffCartAddressActionTypes {
558
+ CartAddressUpdateAction = "[@daffodil/cart] Cart Address Update Action",
559
+ CartAddressUpdateSuccessAction = "[@daffodil/cart] Cart Address Update Success Action",
560
+ CartAddressUpdateFailureAction = "[@daffodil/cart] Cart Address Update Failure Action"
561
+ }
562
+ /**
563
+ * Triggers the update of both the shipping and billing address of the cart.
564
+ */
565
+ declare class DaffCartAddressUpdate<T extends DaffCartAddress = DaffCartAddress> implements Action {
566
+ payload: Partial<T>;
567
+ readonly type = DaffCartAddressActionTypes.CartAddressUpdateAction;
568
+ constructor(payload: Partial<T>);
569
+ }
570
+ /**
571
+ * Indicates the successful update of both the shipping and billing address of the cart.
572
+ */
573
+ declare class DaffCartAddressUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
574
+ payload: Partial<T>;
575
+ readonly type = DaffCartAddressActionTypes.CartAddressUpdateSuccessAction;
576
+ constructor(payload: Partial<T>);
577
+ }
578
+ /**
579
+ * Indicates the failed update of either the shipping or billing address of the cart.
580
+ */
581
+ declare class DaffCartAddressUpdateFailure implements DaffFailureAction {
582
+ payload: DaffStateError[];
583
+ readonly type = DaffCartAddressActionTypes.CartAddressUpdateFailureAction;
584
+ constructor(payload: DaffStateError[]);
585
+ }
586
+ /**
587
+ * A union of all the cart address action classes.
588
+ */
589
+ type DaffCartAddressActions<T extends DaffCart = DaffCart> = DaffCartAddressUpdate<T['shipping_address'] | T['billing_address']> | DaffCartAddressUpdateSuccess<T> | DaffCartAddressUpdateFailure;
590
+
591
+ /**
592
+ * An enum for the cart shipping information action types.
593
+ */
594
+ declare enum DaffCartShippingInformationActionTypes {
595
+ CartShippingInformationLoadAction = "[@daffodil/cart] Shipping Information Load Action",
596
+ CartShippingInformationLoadSuccessAction = "[@daffodil/cart] Shipping Information Load Success Action",
597
+ CartShippingInformationLoadFailureAction = "[@daffodil/cart] Shipping Information Load Failure Action",
598
+ CartShippingInformationUpdateAction = "[@daffodil/cart] Shipping Information Update Action",
599
+ CartShippingInformationUpdateSuccessAction = "[@daffodil/cart] Shipping Information Update Success Action",
600
+ CartShippingInformationUpdateFailureAction = "[@daffodil/cart] Shipping Information Update Failure Action",
601
+ CartShippingInformationDeleteAction = "[@daffodil/cart] Shipping Information Remove Action",
602
+ CartShippingInformationDeleteSuccessAction = "[@daffodil/cart] Shipping Information Remove Success Action",
603
+ CartShippingInformationDeleteFailureAction = "[@daffodil/cart] Shipping Information Remove Failure Action"
604
+ }
605
+ /**
606
+ * Triggers the load of the cart's shipping information.
607
+ */
608
+ declare class DaffCartShippingInformationLoad implements Action {
609
+ readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationLoadAction;
610
+ }
611
+ /**
612
+ * Indicates the successful load of the cart's shipping information.
613
+ */
614
+ declare class DaffCartShippingInformationLoadSuccess<T extends DaffCartShippingRate = DaffCartShippingRate> implements Action {
615
+ payload: T;
616
+ readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationLoadSuccessAction;
617
+ constructor(payload: T);
618
+ }
619
+ /**
620
+ * Indicates the failed load of the cart's shipping information.
621
+ */
622
+ declare class DaffCartShippingInformationLoadFailure implements DaffFailureAction {
623
+ payload: DaffStateError[];
624
+ readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationLoadFailureAction;
625
+ constructor(payload: DaffStateError[]);
626
+ }
627
+ /**
628
+ * Triggers the update of the cart's shipping information.
629
+ */
630
+ declare class DaffCartShippingInformationUpdate<T extends DaffCartShippingRate = DaffCartShippingRate> implements Action {
631
+ payload: Partial<T>;
632
+ readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationUpdateAction;
633
+ constructor(payload: Partial<T>);
634
+ }
635
+ /**
636
+ * Indicates the successful update of the cart's shipping information.
637
+ */
638
+ declare class DaffCartShippingInformationUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
639
+ payload: Partial<T>;
640
+ readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationUpdateSuccessAction;
641
+ constructor(payload: Partial<T>);
642
+ }
643
+ /**
644
+ * Indicates the failed update of the cart's shipping information.
645
+ */
646
+ declare class DaffCartShippingInformationUpdateFailure implements DaffFailureAction {
647
+ payload: DaffStateError[];
648
+ readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationUpdateFailureAction;
649
+ constructor(payload: DaffStateError[]);
650
+ }
651
+ /**
652
+ * Triggers the deletion of the cart's shipping information.
653
+ */
654
+ declare class DaffCartShippingInformationDelete implements Action {
655
+ id?: DaffCartShippingRate['id'];
656
+ readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationDeleteAction;
657
+ constructor(id?: DaffCartShippingRate['id']);
658
+ }
659
+ declare class DaffCartShippingInformationDeleteSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
660
+ payload: Partial<T>;
661
+ readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationDeleteSuccessAction;
662
+ constructor(payload: Partial<T>);
663
+ }
664
+ declare class DaffCartShippingInformationDeleteFailure implements DaffFailureAction {
665
+ payload: DaffStateError[];
666
+ readonly type = DaffCartShippingInformationActionTypes.CartShippingInformationDeleteFailureAction;
667
+ constructor(payload: DaffStateError[]);
668
+ }
669
+ /**
670
+ * A union of all the cart shipping information action classes.
671
+ */
672
+ type DaffCartShippingInformationActions<T extends DaffCart = DaffCart> = DaffCartShippingInformationLoad | DaffCartShippingInformationLoadSuccess<T['shipping_information']> | DaffCartShippingInformationLoadFailure | DaffCartShippingInformationUpdate<T['shipping_information']> | DaffCartShippingInformationUpdateSuccess<T> | DaffCartShippingInformationUpdateFailure | DaffCartShippingInformationDelete | DaffCartShippingInformationDeleteSuccess<T> | DaffCartShippingInformationDeleteFailure;
673
+
674
+ /**
675
+ * An enum for the cart shipping methods action types.
676
+ */
677
+ declare enum DaffCartShippingMethodsActionTypes {
678
+ CartShippingMethodsLoadAction = "[@daffodil/cart] Shipping Methods Load Action",
679
+ CartShippingMethodsLoadSuccessAction = "[@daffodil/cart] Shipping Methods Load Success Action",
680
+ CartShippingMethodsLoadFailureAction = "[@daffodil/cart] Shipping Methods Load Failure Action"
681
+ }
682
+ /**
683
+ * Triggers the load of the cart's available shipping methods.
684
+ */
685
+ declare class DaffCartShippingMethodsLoad implements Action {
686
+ readonly type = DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadAction;
687
+ constructor();
688
+ }
689
+ declare class DaffCartShippingMethodsLoadSuccess<T extends DaffCartShippingRate = DaffCartShippingRate> implements Action {
690
+ payload: T[];
691
+ readonly type = DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadSuccessAction;
692
+ constructor(payload: T[]);
693
+ }
694
+ declare class DaffCartShippingMethodsLoadFailure implements DaffFailureAction {
695
+ payload: DaffStateError[];
696
+ readonly type = DaffCartShippingMethodsActionTypes.CartShippingMethodsLoadFailureAction;
697
+ constructor(payload: DaffStateError[]);
698
+ }
699
+ /**
700
+ * A union of all the cart shipping methods action classes.
701
+ */
702
+ type DaffCartShippingMethodsActions<T extends DaffCartShippingRate = DaffCartShippingRate> = DaffCartShippingMethodsLoad | DaffCartShippingMethodsLoadSuccess<T> | DaffCartShippingMethodsLoadFailure;
703
+
704
+ /**
705
+ * An enum for the cart payment action types.
706
+ */
707
+ declare enum DaffCartPaymentActionTypes {
708
+ CartPaymentLoadAction = "[@daffodil/cart] Payment Load Action",
709
+ CartPaymentLoadSuccessAction = "[@daffodil/cart] Payment Load Success Action",
710
+ CartPaymentLoadFailureAction = "[@daffodil/cart] Payment Load Failure Action",
711
+ CartPaymentUpdateAction = "[@daffodil/cart] Payment Update Action",
712
+ CartPaymentUpdateSuccessAction = "[@daffodil/cart] Payment Update Success Action",
713
+ CartPaymentUpdateFailureAction = "[@daffodil/cart] Payment Update Failure Action",
714
+ CartPaymentUpdateWithBillingAction = "[@daffodil/cart] Payment Update With Billing Action",
715
+ CartPaymentUpdateWithBillingSuccessAction = "[@daffodil/cart] Payment Update With Billing Success Action",
716
+ CartPaymentUpdateWithBillingFailureAction = "[@daffodil/cart] Payment Update With Billing Failure Action",
717
+ CartPaymentRemoveAction = "[@daffodil/cart] Payment Remove Action",
718
+ CartPaymentRemoveSuccessAction = "[@daffodil/cart] Payment Remove Success Action",
719
+ CartPaymentRemoveFailureAction = "[@daffodil/cart] Payment Remove Failure Action",
720
+ CartPaymentMethodAddAction = "[@daffodil/cart] Payment Method Add Action"
721
+ }
722
+ /**
723
+ * Triggers the load of the cart's selected payment method.
724
+ */
725
+ declare class DaffCartPaymentLoad implements Action {
726
+ readonly type = DaffCartPaymentActionTypes.CartPaymentLoadAction;
727
+ }
728
+ /**
729
+ * Indicates the successful load of the cart's selected payment method.
730
+ */
731
+ declare class DaffCartPaymentLoadSuccess<T extends DaffCart = DaffCart> implements Action {
732
+ payload: T['payment'];
733
+ readonly type = DaffCartPaymentActionTypes.CartPaymentLoadSuccessAction;
734
+ constructor(payload: T['payment']);
735
+ }
736
+ /**
737
+ * Indicates the failed load of the cart's selected payment method.
738
+ */
739
+ declare class DaffCartPaymentLoadFailure implements DaffFailureAction {
740
+ payload: DaffStateError[];
741
+ readonly type = DaffCartPaymentActionTypes.CartPaymentLoadFailureAction;
742
+ constructor(payload: DaffStateError[]);
743
+ }
744
+ /**
745
+ * Triggers the update of the cart's selected payment method.
746
+ */
747
+ declare class DaffCartPaymentUpdate<T extends DaffCart = DaffCart> implements Action {
748
+ payload: Partial<T['payment']>;
749
+ readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateAction;
750
+ constructor(payload: Partial<T['payment']>);
751
+ }
752
+ /**
753
+ * Indicates the successful update of the cart's selected payment method.
754
+ */
755
+ declare class DaffCartPaymentUpdateSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
756
+ payload: Partial<T>;
757
+ readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateSuccessAction;
758
+ constructor(payload: Partial<T>);
759
+ }
760
+ /**
761
+ * Indicates the failed update of the cart's selected payment method.
762
+ */
763
+ declare class DaffCartPaymentUpdateFailure implements DaffFailureAction {
764
+ payload: DaffStateError[];
765
+ readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateFailureAction;
766
+ constructor(payload: DaffStateError[]);
767
+ }
768
+ /**
769
+ * Triggers an update of the cart's selected payment method and billing address.
770
+ *
771
+ * @param payment The payment method.
772
+ * @param address The billing address.
773
+ */
774
+ declare class DaffCartPaymentUpdateWithBilling<T extends DaffCart = DaffCart> implements Action {
775
+ payment: Partial<T['payment']>;
776
+ address: Partial<T['billing_address']>;
777
+ readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingAction;
778
+ constructor(payment: Partial<T['payment']>, address: Partial<T['billing_address']>);
779
+ }
780
+ /**
781
+ * Indicates the success of an update of the cart's selected payment method and billing address.
782
+ *
783
+ * @param payload The updated cart.
784
+ */
785
+ declare class DaffCartPaymentUpdateWithBillingSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
786
+ payload: Partial<T>;
787
+ readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingSuccessAction;
788
+ constructor(payload: Partial<T>);
789
+ }
790
+ /**
791
+ * Indicates the failure of an update of the cart's selected payment method and billing address.
792
+ *
793
+ * @param payload The error message.
794
+ */
795
+ declare class DaffCartPaymentUpdateWithBillingFailure implements DaffFailureAction {
796
+ payload: DaffStateError[];
797
+ readonly type = DaffCartPaymentActionTypes.CartPaymentUpdateWithBillingFailureAction;
798
+ constructor(payload: DaffStateError[]);
799
+ }
800
+ /**
801
+ * Triggers the removal of the cart's selected payment method.
802
+ */
803
+ declare class DaffCartPaymentRemove implements Action {
804
+ readonly type = DaffCartPaymentActionTypes.CartPaymentRemoveAction;
805
+ }
806
+ /**
807
+ * Indicates the successful removal of the cart's selected payment method.
808
+ */
809
+ declare class DaffCartPaymentRemoveSuccess implements Action {
810
+ readonly type = DaffCartPaymentActionTypes.CartPaymentRemoveSuccessAction;
811
+ }
812
+ /**
813
+ * Indicates the failed removal of the cart's selected payment method.
814
+ */
815
+ declare class DaffCartPaymentRemoveFailure implements DaffFailureAction {
816
+ payload: DaffStateError[];
817
+ readonly type = DaffCartPaymentActionTypes.CartPaymentRemoveFailureAction;
818
+ constructor(payload: DaffStateError[]);
819
+ }
820
+ /**
821
+ * This action is temporary until custom reducers can be injected by the @daffodil/paymentSource modules. Right now,
822
+ * the payment modules need a way to update cart state with a payment token.
823
+ *
824
+ * todo: remove when possible.
825
+ */
826
+ declare class DaffCartPaymentMethodAdd<T extends DaffCart = DaffCart> implements Action {
827
+ payload: T['payment'];
828
+ readonly type = DaffCartPaymentActionTypes.CartPaymentMethodAddAction;
829
+ constructor(payload: T['payment']);
830
+ }
831
+ /**
832
+ * A union of all the cart payment action classes.
833
+ */
834
+ type DaffCartPaymentActions<T extends DaffCart = DaffCart> = DaffCartPaymentLoad | DaffCartPaymentLoadSuccess<T> | DaffCartPaymentLoadFailure | DaffCartPaymentUpdate<T> | DaffCartPaymentUpdateSuccess<T> | DaffCartPaymentUpdateFailure | DaffCartPaymentUpdateWithBilling<T> | DaffCartPaymentUpdateWithBillingSuccess<T> | DaffCartPaymentUpdateWithBillingFailure | DaffCartPaymentRemove | DaffCartPaymentRemoveSuccess | DaffCartPaymentRemoveFailure | DaffCartPaymentMethodAdd<T>;
835
+
836
+ /**
837
+ * An enum for the cart payment methods action types.
838
+ */
839
+ declare enum DaffCartPaymentMethodsActionTypes {
840
+ CartPaymentMethodsLoadAction = "[@daffodil/cart] Payment Methods Load Action",
841
+ CartPaymentMethodsLoadSuccessAction = "[@daffodil/cart] Payment Methods Load Success Action",
842
+ CartPaymentMethodsLoadFailureAction = "[@daffodil/cart] Payment Methods Load Failure Action"
843
+ }
844
+ /**
845
+ * Triggers the load of the cart's available payment methods.
846
+ */
847
+ declare class DaffCartPaymentMethodsLoad implements Action {
848
+ readonly type = DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadAction;
849
+ constructor();
850
+ }
851
+ /**
852
+ * Indicates the successful load of the cart's available payment methods.
853
+ */
854
+ declare class DaffCartPaymentMethodsLoadSuccess<T extends DaffCartPaymentMethod = DaffCartPaymentMethod> implements Action {
855
+ payload: T[];
856
+ readonly type = DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadSuccessAction;
857
+ constructor(payload: T[]);
858
+ }
859
+ /**
860
+ * Indicates the failed load of the cart's available payment methods.
861
+ */
862
+ declare class DaffCartPaymentMethodsLoadFailure implements DaffFailureAction {
863
+ payload: DaffStateError[];
864
+ readonly type = DaffCartPaymentMethodsActionTypes.CartPaymentMethodsLoadFailureAction;
865
+ constructor(payload: DaffStateError[]);
866
+ }
867
+ /**
868
+ * A union of all the cart payment methods action classes.
869
+ */
870
+ type DaffCartPaymentMethodsActions<T extends DaffCartPaymentMethod = DaffCartPaymentMethod> = DaffCartPaymentMethodsLoad | DaffCartPaymentMethodsLoadSuccess<T> | DaffCartPaymentMethodsLoadFailure;
871
+
872
+ /**
873
+ * An enum for the cart order action types.
874
+ */
875
+ declare enum DaffCartOrderActionTypes {
876
+ CartPlaceOrderAction = "[@daffodil/cart] Cart Place Order Action",
877
+ CartPlaceOrderSuccessAction = "[@daffodil/cart] Cart Place Order Success Action",
878
+ CartPlaceOrderFailureAction = "[@daffodil/cart] Cart Place Order Failure Action",
879
+ CartPlaceOrderFailureFromOutOfStockProductAction = "[@daffodil/cart] Cart Place Order Failure From Out of Stock Product Action"
880
+ }
881
+ /**
882
+ * Triggers the order placement for a cart.
883
+ */
884
+ declare class DaffCartPlaceOrder<T extends DaffCartPaymentMethod = DaffCartPaymentMethod> implements Action {
885
+ payload?: T;
886
+ readonly type = DaffCartOrderActionTypes.CartPlaceOrderAction;
887
+ constructor(payload?: T);
888
+ }
889
+ /**
890
+ * Indicates the successful order placement for a cart.
891
+ */
892
+ declare class DaffCartPlaceOrderSuccess<T extends DaffCartOrderResult = DaffCartOrderResult> implements Action {
893
+ payload: T;
894
+ readonly type = DaffCartOrderActionTypes.CartPlaceOrderSuccessAction;
895
+ constructor(payload: T);
896
+ }
897
+ /**
898
+ * Indicates the failed order placement for a cart.
899
+ */
900
+ declare class DaffCartPlaceOrderFailure implements DaffFailureAction {
901
+ payload: DaffStateError[];
902
+ readonly type = DaffCartOrderActionTypes.CartPlaceOrderFailureAction;
903
+ constructor(payload: DaffStateError[]);
904
+ }
905
+ /**
906
+ * Indicates the failed order placement for a cart due to a product being out of stock.
907
+ */
908
+ declare class DaffCartPlaceOrderFailureFromOutOfStockProduct<T extends DaffCart = DaffCart> implements DaffFailureAction {
909
+ payload: DaffStateError[];
910
+ cart: T;
911
+ readonly type = DaffCartOrderActionTypes.CartPlaceOrderFailureFromOutOfStockProductAction;
912
+ constructor(payload: DaffStateError[], cart: T);
913
+ }
914
+ declare const daffCartPlaceOrderFailureFromOutOfStockProductCartRetreivalInjection: DaffCartRetrievalActionTransformedInjection<DaffCartPlaceOrderFailureFromOutOfStockProduct<any>>;
915
+ /**
916
+ * A union of all the cart order action classes.
917
+ */
918
+ type DaffCartOrderActions<T extends DaffCartOrderResult = DaffCartOrderResult, V extends DaffCart = DaffCart> = DaffCartPlaceOrder<V['payment']> | DaffCartPlaceOrderSuccess<T> | DaffCartPlaceOrderFailureFromOutOfStockProduct<V> | DaffCartPlaceOrderFailure;
919
+
920
+ /**
921
+ * An enum for the cart coupon action types.
922
+ */
923
+ declare enum DaffCartCouponActionTypes {
924
+ CartCouponApplyAction = "[@daffodil/cart] Cart Coupon Apply Action",
925
+ CartCouponApplySuccessAction = "[@daffodil/cart] Cart Coupon Apply Success Action",
926
+ CartCouponApplyFailureAction = "[@daffodil/cart] Cart Coupon Apply Failure Action",
927
+ CartCouponListAction = "[@daffodil/cart] Cart Coupon List Action",
928
+ CartCouponListSuccessAction = "[@daffodil/cart] Cart Coupon List Success Action",
929
+ CartCouponListFailureAction = "[@daffodil/cart] Cart Coupon List Failure Action",
930
+ CartCouponRemoveAction = "[@daffodil/cart] Cart Coupon Remove Action",
931
+ CartCouponRemoveSuccessAction = "[@daffodil/cart] Cart Coupon Remove Success Action",
932
+ CartCouponRemoveFailureAction = "[@daffodil/cart] Cart Coupon Remove Failure Action",
933
+ CartCouponRemoveAllAction = "[@daffodil/cart] Cart Coupon Remove All Action",
934
+ CartCouponRemoveAllSuccessAction = "[@daffodil/cart] Cart Coupon Remove All Success Action",
935
+ CartCouponRemoveAllFailureAction = "[@daffodil/cart] Cart Coupon Remove All Failure Action",
936
+ CartCouponClearErrorsAction = "[@daffodil/cart] Cart Coupon Clear Errors Action"
937
+ }
938
+ /**
939
+ * Triggers the application of a cart coupon.
940
+ */
941
+ declare class DaffCartCouponApply<T extends DaffCartCoupon = DaffCartCoupon> implements Action {
942
+ payload: T;
943
+ readonly type = DaffCartCouponActionTypes.CartCouponApplyAction;
944
+ constructor(payload: T);
945
+ }
946
+ /**
947
+ * Indicates the successful application of a cart coupon.
948
+ */
949
+ declare class DaffCartCouponApplySuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
950
+ payload: Partial<T>;
951
+ readonly type = DaffCartCouponActionTypes.CartCouponApplySuccessAction;
952
+ constructor(payload: Partial<T>);
953
+ }
954
+ /**
955
+ * Indicates the failed application of a cart coupon.
956
+ */
957
+ declare class DaffCartCouponApplyFailure implements DaffFailureAction {
958
+ payload: DaffStateError[];
959
+ readonly type = DaffCartCouponActionTypes.CartCouponApplyFailureAction;
960
+ constructor(payload: DaffStateError[]);
961
+ }
962
+ /**
963
+ * Triggers the load of the cart's coupons.
964
+ */
965
+ declare class DaffCartCouponList implements Action {
966
+ readonly type = DaffCartCouponActionTypes.CartCouponListAction;
967
+ }
968
+ /**
969
+ * Indicates the successful load of the cart's coupons.
970
+ */
971
+ declare class DaffCartCouponListSuccess<T extends DaffCartCoupon = DaffCartCoupon> implements Action {
972
+ payload: T[];
973
+ readonly type = DaffCartCouponActionTypes.CartCouponListSuccessAction;
974
+ constructor(payload: T[]);
975
+ }
976
+ /**
977
+ * Indicates the failed load of the cart's coupons.
978
+ */
979
+ declare class DaffCartCouponListFailure implements DaffFailureAction {
980
+ payload: DaffStateError[];
981
+ readonly type = DaffCartCouponActionTypes.CartCouponListFailureAction;
982
+ constructor(payload: DaffStateError[]);
983
+ }
984
+ /**
985
+ * Triggers the removal of a cart coupon.
986
+ */
987
+ declare class DaffCartCouponRemove<T extends DaffCartCoupon = DaffCartCoupon> implements Action {
988
+ payload: T;
989
+ readonly type = DaffCartCouponActionTypes.CartCouponRemoveAction;
990
+ constructor(payload: T);
991
+ }
992
+ /**
993
+ * Indicates the successful removal of a cart coupon.
994
+ */
995
+ declare class DaffCartCouponRemoveSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
996
+ payload: Partial<T>;
997
+ readonly type = DaffCartCouponActionTypes.CartCouponRemoveSuccessAction;
998
+ constructor(payload: Partial<T>);
999
+ }
1000
+ /**
1001
+ * Indicates the failed removal of a cart coupon.
1002
+ */
1003
+ declare class DaffCartCouponRemoveFailure implements DaffFailureAction {
1004
+ payload: DaffStateError[];
1005
+ readonly type = DaffCartCouponActionTypes.CartCouponRemoveFailureAction;
1006
+ constructor(payload: DaffStateError[]);
1007
+ }
1008
+ /**
1009
+ * Triggers the removal of all of the cart's coupons.
1010
+ */
1011
+ declare class DaffCartCouponRemoveAll implements Action {
1012
+ readonly type = DaffCartCouponActionTypes.CartCouponRemoveAllAction;
1013
+ }
1014
+ /**
1015
+ * Indicates the successful removal of all of the cart's coupons.
1016
+ */
1017
+ declare class DaffCartCouponRemoveAllSuccess<T extends DaffCart = DaffCart> implements DaffCartRetrievalAction<T> {
1018
+ payload: Partial<T>;
1019
+ readonly type = DaffCartCouponActionTypes.CartCouponRemoveAllSuccessAction;
1020
+ constructor(payload: Partial<T>);
1021
+ }
1022
+ /**
1023
+ * Indicates the failed removal of all of the cart's coupons.
1024
+ */
1025
+ declare class DaffCartCouponRemoveAllFailure implements DaffFailureAction {
1026
+ payload: DaffStateError[];
1027
+ readonly type = DaffCartCouponActionTypes.CartCouponRemoveAllFailureAction;
1028
+ constructor(payload: DaffStateError[]);
1029
+ }
1030
+ /**
1031
+ * Removes the errors in cart coupon state.
1032
+ */
1033
+ declare class DaffCartCouponClearErrors implements Action {
1034
+ readonly type = DaffCartCouponActionTypes.CartCouponClearErrorsAction;
1035
+ }
1036
+ /**
1037
+ * A union of all the cart coupon action classes.
1038
+ */
1039
+ type DaffCartCouponActions<T extends DaffCart = DaffCart> = DaffCartCouponApply<T['coupons'][number]> | DaffCartCouponApplySuccess<T> | DaffCartCouponApplyFailure | DaffCartCouponList | DaffCartCouponListSuccess<T['coupons'][number]> | DaffCartCouponListFailure | DaffCartCouponRemove<T['coupons'][number]> | DaffCartCouponRemoveSuccess<T> | DaffCartCouponRemoveFailure | DaffCartCouponRemoveAll | DaffCartCouponRemoveAllSuccess<T> | DaffCartCouponRemoveAllFailure | DaffCartCouponClearErrors;
1040
+
1041
+ /**
1042
+ * A list of the Daffodil cart actions that are cart retrieval actions, in injection form.
1043
+ */
1044
+ declare const daffCartRetrivalActions: DaffCartRetrievalActionInjection[];
1045
+
1046
+ /**
1047
+ * Performs a payment update on the current cart.
1048
+ *
1049
+ * @param payload The generate token request.
1050
+ * @param deps DI deps.
1051
+ * @param cbs Return the actions and/or perform custom behavior in response to each particular case.
1052
+ */
1053
+ declare function daffCartPaymentProcessorUpdate<Cart extends DaffCart = DaffCart, Request extends DaffPaymentRequest = DaffPaymentRequest, Response extends DaffPaymentResponse = DaffPaymentResponse, Success = unknown, PaymentFailure = unknown, UpdateFailure = unknown>(payload: DaffPaymentGenerateTokenPayload<Request>, deps: {
1054
+ cartDriver: DaffCartPaymentServiceInterface<Cart>;
1055
+ paymentDriver: DaffPaymentDriverInterface<Response>;
1056
+ cartResolver: DaffCartDriverResolveService;
1057
+ }, cbs: {
1058
+ success: (resp: Cart) => Observable<Success>;
1059
+ paymentFailure: (errors: Array<DaffError>) => Observable<PaymentFailure>;
1060
+ updateFailure: (errors: Array<DaffError>) => Observable<UpdateFailure>;
1061
+ }): Observable<PaymentFailure>;
1062
+
1063
+ declare enum DaffCartResolveState {
1064
+ Default = "default",
1065
+ Resolving = "resolving",
1066
+ Succeeded = "succeeded",
1067
+ Failed = "failed",
1068
+ ServerSide = "server"
1069
+ }
1070
+
1071
+ interface DaffCartOrderReducerState<T extends DaffCartOrderResult = DaffCartOrderResult> {
1072
+ cartOrderResult: T;
1073
+ loading: DaffMutableLoadingState;
1074
+ errors: DaffStateError[];
1075
+ }
1076
+
1077
+ /**
1078
+ * The particular segment of DaffCart that an operation applies to.
1079
+ * Errors and loading are tracked separately for each type of cart operation.
1080
+ */
1081
+ declare enum DaffCartOperationType {
1082
+ Cart = "Cart",
1083
+ Item = "Item",
1084
+ BillingAddress = "Billing Address",
1085
+ ShippingAddress = "Shipping Address",
1086
+ Payment = "Payment",
1087
+ PaymentMethods = "Payment Methods",
1088
+ ShippingInformation = "Shipping Information",
1089
+ ShippingMethods = "Shipping Methods",
1090
+ Coupon = "Coupon"
1091
+ }
1092
+
1093
+ type DaffCartErrors = {
1094
+ [K in DaffCartOperationType]: DaffStateError[];
1095
+ };
1096
+
1097
+ interface DaffCartLoading {
1098
+ [DaffCartOperationType.Cart]: DaffMutableLoadingState;
1099
+ [DaffCartOperationType.Item]: DaffCartItemLoadingState;
1100
+ [DaffCartOperationType.BillingAddress]: DaffMutableLoadingState;
1101
+ [DaffCartOperationType.ShippingAddress]: DaffMutableLoadingState;
1102
+ [DaffCartOperationType.Payment]: DaffMutableLoadingState;
1103
+ [DaffCartOperationType.PaymentMethods]: DaffLoadingState;
1104
+ [DaffCartOperationType.ShippingInformation]: DaffMutableLoadingState;
1105
+ [DaffCartOperationType.ShippingMethods]: DaffLoadingState;
1106
+ [DaffCartOperationType.Coupon]: DaffMutableLoadingState;
1107
+ }
1108
+ type DaffCartItemLoadingState = DaffMutableLoadingState | DaffState.Adding;
1109
+ declare const initializeLoadingSetter: (loadingSpace: DaffCartOperationType) => (loadingObj: DaffCartLoading, loading: DaffLoadingState | DaffMutableLoadingState | DaffCartItemLoadingState) => {
1110
+ loading: {
1111
+ Cart: DaffMutableLoadingState;
1112
+ Item: DaffCartItemLoadingState;
1113
+ "Billing Address": DaffMutableLoadingState;
1114
+ "Shipping Address": DaffMutableLoadingState;
1115
+ Payment: DaffMutableLoadingState;
1116
+ "Payment Methods": DaffLoadingState;
1117
+ "Shipping Information": DaffMutableLoadingState;
1118
+ "Shipping Methods": DaffLoadingState;
1119
+ Coupon: DaffMutableLoadingState;
1120
+ };
1121
+ };
1122
+
1123
+ interface DaffCartReducerState<T extends DaffCart = DaffCart> {
1124
+ cart: T;
1125
+ loading: DaffCartLoading;
1126
+ errors: DaffCartErrors;
1127
+ resolved: DaffCartResolveState;
1128
+ }
1129
+
1130
+ declare const DAFF_CART_STORE_FEATURE_KEY = "daffCart";
1131
+
1132
+ interface DaffCartReducersState<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
1133
+ cart: DaffCartReducerState<T>;
1134
+ cartItems: DaffOperationEntityState<T['items'][number]>;
1135
+ order: DaffCartOrderReducerState<V>;
1136
+ }
1137
+ interface DaffCartStateRootSlice<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
1138
+ [DAFF_CART_STORE_FEATURE_KEY]: DaffCartReducersState<T, V>;
1139
+ }
1140
+
1141
+ declare const daffCartReducers: ActionReducerMap<DaffCartReducersState>;
1142
+
1143
+ type ActionTypes<T extends DaffCart = DaffCart, U extends DaffCartItemInput = DaffCartItemInput, TOrderResult extends DaffCartOrderResult = DaffCartOrderResult> = DaffCartActions<T> | DaffCartItemActions<T, U> | DaffCartBillingAddressActions<T> | DaffCartShippingAddressActions<T> | DaffCartAddressActions<T> | DaffCartShippingMethodsActions<T['available_shipping_methods'][number]> | DaffCartShippingInformationActions<T> | DaffCartPaymentActions<T> | DaffCartPaymentMethodsActions<T['available_payment_methods'][number]> | DaffCartOrderActions<TOrderResult> | DaffCartCouponActions<T>;
1144
+
1145
+ /**
1146
+ * Calls each of the individual cart reducers in turn,
1147
+ * passing the returned state into the next.
1148
+ */
1149
+ declare function daffCartReducer<T extends DaffCart = DaffCart>(state: DaffCartReducerState<any>, action: ActionTypes<T>): DaffCartReducerState<T>;
1150
+
1151
+ declare const daffCartReducerInitialState: DaffCartReducerState<any>;
1152
+
1153
+ declare function daffCartOrderReducer<T extends DaffCartOrderResult = DaffCartOrderResult>(state: DaffCartOrderReducerState<any>, action: ActionTypes<DaffCart, DaffCartItemInput, T>): DaffCartOrderReducerState<T>;
1154
+
1155
+ declare const daffCartOrderInitialState: DaffCartOrderReducerState<any>;
1156
+
1157
+ /**
1158
+ * Cart Item Entities Adapter for changing/overwriting entity state.
1159
+ */
1160
+ declare const daffCartItemEntitiesAdapter: <T extends DaffCartItem = DaffCartItem>() => DaffOperationEntityStateAdapter<T>;
1161
+
1162
+ /**
1163
+ * Reducer function factory that updates cart item entities according to a list of passed cart retrieval actions.
1164
+ * See {@link DaffCartRetrievalActionInjection}.
1165
+ */
1166
+ declare function daffCartItemEntitiesRetrievalActionsReducerFactory<T extends DaffCart = DaffCart>(retrievalActions: DaffCartRetrievalActionInjection[]): (state: DaffOperationEntityState<T["items"][number]>, action: Action) => DaffOperationEntityState<T["items"][number]>;
1167
+
1168
+ /**
1169
+ * Reducer function factory that updates cart state according to a list of passed cart retrieval actions.
1170
+ * See {@link DaffCartRetrievalActionInjection}.
1171
+ */
1172
+ declare function daffCartRetrievalActionsReducerFactory<T extends DaffCart = DaffCart>(retrievalActions: DaffCartRetrievalActionInjection[]): ActionReducer<DaffCartReducerState<T>>;
1173
+
1174
+ declare const DAFF_CART_EXTRA_REDUCERS: _angular_core.InjectionToken<ActionReducer<DaffCartReducersState<_daffodil_cart.DaffCart, _daffodil_cart.DaffCartOrderResult>, _ngrx_store.Action<string>>[]>;
1175
+ declare const daffCartProvideExtraReducers: <R extends ActionReducer<DaffCartReducersState<_daffodil_cart.DaffCart, _daffodil_cart.DaffCartOrderResult>, _ngrx_store.Action<string>> = ActionReducer<DaffCartReducersState<_daffodil_cart.DaffCart, _daffodil_cart.DaffCartOrderResult>, _ngrx_store.Action<string>>>(...values: R[]) => Array<_angular_core.ValueProvider>;
1176
+
1177
+ declare const DAFF_CART_META_REDUCERS: _angular_core.InjectionToken<MetaReducer<DaffCartReducersState<_daffodil_cart.DaffCart, _daffodil_cart.DaffCartOrderResult>>[]>;
1178
+ declare const daffCartProvideMetaReducers: <R extends MetaReducer<DaffCartReducersState<_daffodil_cart.DaffCart, _daffodil_cart.DaffCartOrderResult>> = MetaReducer<DaffCartReducersState<_daffodil_cart.DaffCart, _daffodil_cart.DaffCartOrderResult>>>(...values: R[]) => Array<_angular_core.ValueProvider>;
1179
+
1180
+ interface DaffCartStateMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
1181
+ selectCartState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducerState<T>>;
1182
+ selectCartValue: MemoizedSelector<DaffCartStateRootSlice<T, V>, T>;
1183
+ selectCartResolved: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartResolveState>;
1184
+ /**
1185
+ * The object that holds all the loading states for cart operations.
1186
+ */
1187
+ selectCartLoadingObject: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducerState<T>['loading']>;
1188
+ /**
1189
+ * Selects whether there is any cart operation in progress.
1190
+ * This includes operations specifically for cart subfields.
1191
+ */
1192
+ selectCartFeatureLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1193
+ /**
1194
+ * Selects whether there is any cart resolve operation in progress.
1195
+ * This includes operations for cart subfields.
1196
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1197
+ */
1198
+ selectCartFeatureResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1199
+ /**
1200
+ * Selects whether there is any cart mutate operation in progress.
1201
+ * This includes operations for cart subfields.
1202
+ * This pertains only to requests that mutate data such as "update".
1203
+ */
1204
+ selectCartFeatureMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1205
+ /**
1206
+ * Selects whether there is a cart operation in progress.
1207
+ * This does not include operations specifically for cart subfields.
1208
+ */
1209
+ selectCartLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1210
+ /**
1211
+ * Selects whether there is a cart resolve operation in progress.
1212
+ * This does not include operations specifically for cart subfields.
1213
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1214
+ */
1215
+ selectCartResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1216
+ /**
1217
+ * Selects whether there is a cart mutate operation in progress.
1218
+ * This does not include operations specifically for cart subfields.
1219
+ * This pertains only to requests that mutate data such as "update".
1220
+ */
1221
+ selectCartMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1222
+ /**
1223
+ * Selects whether there is a cart billing address operation in progress.
1224
+ */
1225
+ selectBillingAddressLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1226
+ /**
1227
+ * Selects whether there is a cart billing address resolve operation in progress.
1228
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1229
+ */
1230
+ selectBillingAddressResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1231
+ /**
1232
+ * Selects whether there is a cart billing address mutate operation in progress.
1233
+ * This pertains only to requests that mutate data such as "update".
1234
+ */
1235
+ selectBillingAddressMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1236
+ /**
1237
+ * Selects whether there is a cart shipping address operation in progress.
1238
+ */
1239
+ selectShippingAddressLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1240
+ /**
1241
+ * Selects whether there is a cart shipping address resolve operation in progress.
1242
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1243
+ */
1244
+ selectShippingAddressResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1245
+ /**
1246
+ * Selects whether there is a cart shipping address mutate operation in progress.
1247
+ * This pertains only to requests that mutate data such as "update".
1248
+ */
1249
+ selectShippingAddressMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1250
+ /**
1251
+ * Selects whether there is a cart shipping information operation in progress.
1252
+ */
1253
+ selectShippingInformationLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1254
+ /**
1255
+ * Selects whether there is a cart shipping information resolve operation in progress.
1256
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1257
+ */
1258
+ selectShippingInformationResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1259
+ /**
1260
+ * Selects whether there is a cart shipping information mutate operation in progress.
1261
+ * This pertains only to requests that mutate data such as "update".
1262
+ */
1263
+ selectShippingInformationMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1264
+ /**
1265
+ * Selects whether there is a cart shipping methods operation in progress.
1266
+ */
1267
+ selectShippingMethodsLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1268
+ /**
1269
+ * Selects whether there is a cart shipping methods resolve operation in progress.
1270
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1271
+ */
1272
+ selectShippingMethodsResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1273
+ /**
1274
+ * Selects whether there is a cart payment operation in progress.
1275
+ */
1276
+ selectPaymentLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1277
+ /**
1278
+ * Selects whether there is a cart payment resolve operation in progress.
1279
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1280
+ */
1281
+ selectPaymentResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1282
+ /**
1283
+ * Selects whether there is a cart payment mutate operation in progress.
1284
+ * This pertains only to requests that mutate data such as "update".
1285
+ */
1286
+ selectPaymentMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1287
+ /**
1288
+ * Selects whether there is a cart payment methods operation in progress.
1289
+ */
1290
+ selectPaymentMethodsLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1291
+ /**
1292
+ * Selects whether there is a cart payment methods resolve operation in progress.
1293
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1294
+ */
1295
+ selectPaymentMethodsResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1296
+ /**
1297
+ * Selects whether there is a cart coupon operation in progress.
1298
+ */
1299
+ selectCouponLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1300
+ /**
1301
+ * Selects whether there is a cart coupon resolve operation in progress.
1302
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1303
+ */
1304
+ selectCouponResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1305
+ /**
1306
+ * Selects whether there is a cart coupon mutate operation in progress.
1307
+ * This pertains only to requests that mutate data such as "update".
1308
+ */
1309
+ selectCouponMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1310
+ /**
1311
+ * Selects whether there is a cart item operation in progress.
1312
+ */
1313
+ selectItemLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1314
+ /**
1315
+ * Selects whether there is a cart item add operation in progress.
1316
+ */
1317
+ selectItemAdding: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1318
+ /**
1319
+ * Selects whether there is a cart item resolve operation in progress.
1320
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1321
+ */
1322
+ selectItemResolving: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1323
+ /**
1324
+ * Selects whether there is a cart item mutate operation in progress.
1325
+ * This pertains only to requests that mutate existing data such as update.
1326
+ * This does not apply to add requests. see {@link selectItemAdding} for that.
1327
+ */
1328
+ selectItemMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1329
+ selectCartErrorsObject: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducerState<T>['errors']>;
1330
+ selectCartErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
1331
+ selectBillingAddressErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
1332
+ selectShippingAddressErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
1333
+ selectShippingInformationErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
1334
+ selectShippingMethodsErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
1335
+ selectPaymentErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
1336
+ selectPaymentMethodsErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
1337
+ selectCouponErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
1338
+ selectItemErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffStateError[]>;
1339
+ selectCartHasOutOfStockItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1340
+ selectIsCartEmpty: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1341
+ /**
1342
+ * Selects whether the cart's shipping address equals the billing address.
1343
+ * Returns false if either address is null or undefined.
1344
+ */
1345
+ selectIsBillingSameAsShipping: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1346
+ selectHasBillingAddress: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1347
+ selectHasShippingAddress: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1348
+ selectHasShippingMethod: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1349
+ selectHasPaymentMethod: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1350
+ selectCanPlaceOrder: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean, DefaultProjectorFn<boolean>>;
1351
+ }
1352
+
1353
+ interface DaffCartFeatureMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
1354
+ selectCartFeatureState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartReducersState<T, V>>;
1355
+ }
1356
+
1357
+ interface DaffCartItemEntitiesMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
1358
+ selectCartItemEntitiesState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntityState<T['items'][number]>>;
1359
+ selectCartItemIds: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntityState<T['items'][number]>['ids']>;
1360
+ selectCartItemEntities: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntityState<T['items'][number]>['entities']>;
1361
+ selectAllCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>[]>;
1362
+ selectCartItemTotal: MemoizedSelector<DaffCartStateRootSlice<T, V>, number>;
1363
+ selectCartItem: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>>;
1364
+ selectTotalNumberOfCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, number>;
1365
+ selectCartItemConfiguredAttributes: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffConfigurableCartItemAttribute[]>;
1366
+ selectCartItemCompositeOptions: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCompositeCartItemOption[]>;
1367
+ selectIsCartItemOutOfStock: (id: T['items'][number]['id']) => MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1368
+ /**
1369
+ * Selects all cart items that are out of stock.
1370
+ */
1371
+ selectOutOfStockCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>[]>;
1372
+ /**
1373
+ * Selects all cart items that are in stock.
1374
+ */
1375
+ selectInStockCartItems: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffOperationEntity<T['items'][number]>[]>;
1376
+ selectCartItemMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1377
+ }
1378
+
1379
+ interface DaffCartOrderMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> {
1380
+ selectCartOrderState: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>>;
1381
+ /**
1382
+ * Selects whether there is a cart order operation in progress.
1383
+ */
1384
+ selectCartOrderLoading: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1385
+ /**
1386
+ * Selects whether there is a place order operation in progress.
1387
+ */
1388
+ selectCartOrderMutating: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1389
+ selectCartOrderErrors: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['errors']>;
1390
+ selectCartOrderValue: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['cartOrderResult']>;
1391
+ selectCartOrderId: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['cartOrderResult']['orderId']>;
1392
+ selectCartOrderCartId: MemoizedSelector<DaffCartStateRootSlice<T, V>, DaffCartOrderReducerState<V>['cartOrderResult']['cartId']>;
1393
+ selectHasOrderResult: MemoizedSelector<DaffCartStateRootSlice<T, V>, boolean>;
1394
+ }
1395
+
1396
+ interface DaffCartMemoizedSelectors<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> extends DaffCartFeatureMemoizedSelectors<T, V>, DaffCartOrderMemoizedSelectors<T, V>, DaffCartStateMemoizedSelectors<T>, DaffCartItemEntitiesMemoizedSelectors<T, V> {
1397
+ }
1398
+ declare const getDaffCartSelectors: <T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult>() => DaffCartMemoizedSelectors<T, V>;
1399
+
1400
+ declare const DaffCartItemStateDebounceTime: _angular_core.InjectionToken<number>;
1401
+ declare const provideDaffCartItemStateDebounceTime: <R extends number = number>(value: R) => _angular_core.ValueProvider;
1402
+
1403
+ declare const DAFF_CART_ERROR_MATCHER: _angular_core.InjectionToken<typeof daffTransformErrorToStateError>;
1404
+ declare const provideDaffCartErrorMatcher: <R extends typeof daffTransformErrorToStateError = typeof daffTransformErrorToStateError>(value: R) => _angular_core.ValueProvider;
1405
+
1406
+ /**
1407
+ * A cart with stateful cart items.
1408
+ */
1409
+ interface DaffStatefulCart extends DaffCart {
1410
+ items: Array<DaffOperationEntity<DaffCartItem | DaffCompositeCartItem | DaffConfigurableCartItem>>;
1411
+ }
1412
+
1413
+ declare class DaffCartStateModule {
1414
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DaffCartStateModule, never>;
1415
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<DaffCartStateModule, never, [typeof _ngrx_store.StoreFeatureModule, typeof _ngrx_effects.EffectsFeatureModule], never>;
1416
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<DaffCartStateModule>;
1417
+ }
1418
+
1419
+ interface DaffCartFacadeInterface<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> extends DaffStoreFacade<Action> {
1420
+ cart$: Observable<T>;
1421
+ resolved$: Observable<DaffCartResolveState>;
1422
+ /**
1423
+ * The object that holds all the loading states for cart operations.
1424
+ */
1425
+ loadingObject$: Observable<DaffCartLoading>;
1426
+ /**
1427
+ * Whether there is any cart operation in progress.
1428
+ * This includes operations specifically for cart subfields.
1429
+ */
1430
+ featureLoading$: Observable<boolean>;
1431
+ /**
1432
+ * Whether there is any cart resolve operation in progress.
1433
+ * This includes operations for cart subfields.
1434
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1435
+ */
1436
+ featureResolving$: Observable<boolean>;
1437
+ /**
1438
+ * Whether there is any cart mutate operation in progress.
1439
+ * This includes operations for cart subfields.
1440
+ * This pertains only to requests that mutate data such as "update".
1441
+ */
1442
+ featureMutating$: Observable<boolean>;
1443
+ /**
1444
+ * Whether there is a cart operation in progress.
1445
+ * This does not include operations specifically for cart subfields.
1446
+ */
1447
+ loading$: Observable<boolean>;
1448
+ /**
1449
+ * Whether there is a cart resolve operation in progress.
1450
+ * This does not include operations specifically for cart subfields.
1451
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1452
+ */
1453
+ resolving$: Observable<boolean>;
1454
+ /**
1455
+ * Whether there is a cart mutate operation in progress.
1456
+ * This does not include operations specifically for cart subfields.
1457
+ * This pertains only to requests that mutate data such as "update".
1458
+ */
1459
+ mutating$: Observable<boolean>;
1460
+ /**
1461
+ * Whether there is a cart billing address operation in progress.
1462
+ */
1463
+ billingAddressLoading$: Observable<boolean>;
1464
+ /**
1465
+ * Whether there is a cart billing address resolve operation in progress.
1466
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1467
+ */
1468
+ billingAddressResolving$: Observable<boolean>;
1469
+ /**
1470
+ * Whether there is a cart billing address mutate operation in progress.
1471
+ * This pertains only to requests that mutate data such as "update".
1472
+ */
1473
+ billingAddressMutating$: Observable<boolean>;
1474
+ /**
1475
+ * Whether there is a cart shipping address operation in progress.
1476
+ */
1477
+ shippingAddressLoading$: Observable<boolean>;
1478
+ /**
1479
+ * Whether there is a cart shipping address resolve operation in progress.
1480
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1481
+ */
1482
+ shippingAddressResolving$: Observable<boolean>;
1483
+ /**
1484
+ * Whether there is a cart shipping address mutate operation in progress.
1485
+ * This pertains only to requests that mutate data such as "update".
1486
+ */
1487
+ shippingAddressMutating$: Observable<boolean>;
1488
+ /**
1489
+ * Whether there is a cart shipping information operation in progress.
1490
+ */
1491
+ shippingInformationLoading$: Observable<boolean>;
1492
+ /**
1493
+ * Whether there is a cart shipping information resolve operation in progress.
1494
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1495
+ */
1496
+ shippingInformationResolving$: Observable<boolean>;
1497
+ /**
1498
+ * Whether there is a cart shipping information mutate operation in progress.
1499
+ * This pertains only to requests that mutate data such as "update".
1500
+ */
1501
+ shippingInformationMutating$: Observable<boolean>;
1502
+ /**
1503
+ * Whether there is a cart shipping methods operation in progress.
1504
+ */
1505
+ shippingMethodsLoading$: Observable<boolean>;
1506
+ /**
1507
+ * Whether there is a cart shipping methods resolve operation in progress.
1508
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1509
+ */
1510
+ shippingMethodsResolving$: Observable<boolean>;
1511
+ /**
1512
+ * Whether there is a cart payment operation in progress.
1513
+ */
1514
+ paymentLoading$: Observable<boolean>;
1515
+ /**
1516
+ * Whether there is a cart payment resolve operation in progress.
1517
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1518
+ */
1519
+ paymentResolving$: Observable<boolean>;
1520
+ /**
1521
+ * Whether there is a cart payment mutate operation in progress.
1522
+ * This pertains only to requests that mutate data such as "update".
1523
+ */
1524
+ paymentMutating$: Observable<boolean>;
1525
+ /**
1526
+ * Whether there is a cart payment methods operation in progress.
1527
+ */
1528
+ paymentMethodsLoading$: Observable<boolean>;
1529
+ /**
1530
+ * Whether there is a cart payment methods resolve operation in progress.
1531
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1532
+ */
1533
+ paymentMethodsResolving$: Observable<boolean>;
1534
+ /**
1535
+ * Whether there is a cart coupon operation in progress.
1536
+ */
1537
+ couponLoading$: Observable<boolean>;
1538
+ /**
1539
+ * Whether there is a cart coupon resolve operation in progress.
1540
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1541
+ */
1542
+ couponResolving$: Observable<boolean>;
1543
+ /**
1544
+ * Whether there is a cart coupon mutate operation in progress.
1545
+ * This pertains only to requests that mutate data such as "update".
1546
+ */
1547
+ couponMutating$: Observable<boolean>;
1548
+ /**
1549
+ * Whether there is a cart item operation in progress.
1550
+ */
1551
+ itemLoading$: Observable<boolean>;
1552
+ /**
1553
+ * Whether there is a cart item add operation in progress.
1554
+ */
1555
+ itemAdding$: Observable<boolean>;
1556
+ /**
1557
+ * Whether there is a cart item resolve operation in progress.
1558
+ * This pertains only to requests that do not mutate data such as "load" or "list".
1559
+ */
1560
+ itemResolving$: Observable<boolean>;
1561
+ /**
1562
+ * Whether there is a cart item mutate operation in progress.
1563
+ * This pertains only to requests that mutate data such as "update".
1564
+ */
1565
+ itemMutating$: Observable<boolean>;
1566
+ errors$: Observable<DaffCartErrors>;
1567
+ cartErrors$: Observable<DaffCartErrors[DaffCartOperationType.Cart]>;
1568
+ itemErrors$: Observable<DaffCartErrors[DaffCartOperationType.Item]>;
1569
+ billingAddressErrors$: Observable<DaffCartErrors[DaffCartOperationType.BillingAddress]>;
1570
+ shippingAddressErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingAddress]>;
1571
+ shippingInformationErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingInformation]>;
1572
+ shippingMethodsErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingMethods]>;
1573
+ paymentErrors$: Observable<DaffCartErrors[DaffCartOperationType.Payment]>;
1574
+ paymentMethodsErrors$: Observable<DaffCartErrors[DaffCartOperationType.PaymentMethods]>;
1575
+ couponErrors$: Observable<DaffCartErrors[DaffCartOperationType.Coupon]>;
1576
+ /**
1577
+ * A list of the cart items.
1578
+ */
1579
+ itemEntities$: Observable<DaffOperationEntity<T['items'][number]>[]>;
1580
+ /**
1581
+ * The total number of cart items, taking into account the quantity of each cart item.
1582
+ */
1583
+ totalItems$: Observable<number>;
1584
+ hasOutOfStockItems$: Observable<boolean>;
1585
+ /**
1586
+ * All cart items that are out of stock.
1587
+ */
1588
+ outOfStockItems$: Observable<DaffOperationEntity<T['items'][number]>[]>;
1589
+ /**
1590
+ * All cart items that are in stock.
1591
+ */
1592
+ inStockItems$: Observable<DaffOperationEntity<T['items'][number]>[]>;
1593
+ itemDictionary$: Observable<Dictionary<DaffOperationEntity<T['items'][number]>>>;
1594
+ /**
1595
+ * The user-defined platform-agnostic payment identifier that corresponds to the cart's current (platform-specific) payment method.
1596
+ * Define the mapping with the `DaffCartPaymentMethodIdMap` injection token.
1597
+ *
1598
+ * @see DaffCartPaymentMethodIdMap
1599
+ */
1600
+ paymentId$: Observable<any>;
1601
+ isCartEmpty$: Observable<boolean>;
1602
+ /**
1603
+ * Whether the cart's shipping address equals the billing address.
1604
+ * Returns false if either address is null or undefined.
1605
+ */
1606
+ isBillingSameAsShipping$: Observable<boolean>;
1607
+ hasBillingAddress$: Observable<boolean>;
1608
+ hasShippingAddress$: Observable<boolean>;
1609
+ hasShippingMethod$: Observable<boolean>;
1610
+ hasPaymentMethod$: Observable<boolean>;
1611
+ canPlaceOrder$: Observable<boolean>;
1612
+ orderResultLoading$: Observable<boolean>;
1613
+ orderResultErrors$: Observable<DaffStateError[]>;
1614
+ orderResult$: Observable<V>;
1615
+ orderResultId$: Observable<V['orderId']>;
1616
+ orderResultCartId$: Observable<V['cartId']>;
1617
+ hasOrderResult$: Observable<boolean>;
1618
+ getConfiguredCartItemAttributes(itemId: T['items'][number]['id']): Observable<DaffConfigurableCartItemAttribute[]>;
1619
+ getCompositeCartItemOptions(itemId: T['items'][number]['id']): Observable<DaffCompositeCartItemOption[]>;
1620
+ isCartItemOutOfStock(itemId: T['items'][number]['id']): Observable<boolean>;
1621
+ }
1622
+
1623
+ /**
1624
+ * @inheritdoc
1625
+ */
1626
+ declare class DaffCartFacade<T extends DaffCart = DaffCart, V extends DaffCartOrderResult = DaffCartOrderResult> implements DaffCartFacadeInterface<T, V> {
1627
+ private store;
1628
+ private paymentMethodMap;
1629
+ cart$: Observable<T>;
1630
+ resolved$: Observable<DaffCartResolveState>;
1631
+ loadingObject$: Observable<DaffCartLoading>;
1632
+ featureLoading$: Observable<boolean>;
1633
+ featureResolving$: Observable<boolean>;
1634
+ featureMutating$: Observable<boolean>;
1635
+ loading$: Observable<boolean>;
1636
+ resolving$: Observable<boolean>;
1637
+ mutating$: Observable<boolean>;
1638
+ billingAddressLoading$: Observable<boolean>;
1639
+ billingAddressResolving$: Observable<boolean>;
1640
+ billingAddressMutating$: Observable<boolean>;
1641
+ shippingAddressLoading$: Observable<boolean>;
1642
+ shippingAddressResolving$: Observable<boolean>;
1643
+ shippingAddressMutating$: Observable<boolean>;
1644
+ shippingInformationLoading$: Observable<boolean>;
1645
+ shippingInformationResolving$: Observable<boolean>;
1646
+ shippingInformationMutating$: Observable<boolean>;
1647
+ shippingMethodsLoading$: Observable<boolean>;
1648
+ shippingMethodsResolving$: Observable<boolean>;
1649
+ paymentLoading$: Observable<boolean>;
1650
+ paymentResolving$: Observable<boolean>;
1651
+ paymentMutating$: Observable<boolean>;
1652
+ paymentMethodsLoading$: Observable<boolean>;
1653
+ paymentMethodsResolving$: Observable<boolean>;
1654
+ couponLoading$: Observable<boolean>;
1655
+ couponResolving$: Observable<boolean>;
1656
+ couponMutating$: Observable<boolean>;
1657
+ itemLoading$: Observable<boolean>;
1658
+ itemAdding$: Observable<boolean>;
1659
+ itemResolving$: Observable<boolean>;
1660
+ itemMutating$: Observable<boolean>;
1661
+ errors$: Observable<DaffCartErrors>;
1662
+ cartErrors$: Observable<DaffCartErrors[DaffCartOperationType.Cart]>;
1663
+ itemErrors$: Observable<DaffCartErrors[DaffCartOperationType.Item]>;
1664
+ billingAddressErrors$: Observable<DaffCartErrors[DaffCartOperationType.BillingAddress]>;
1665
+ shippingAddressErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingAddress]>;
1666
+ shippingInformationErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingInformation]>;
1667
+ shippingMethodsErrors$: Observable<DaffCartErrors[DaffCartOperationType.ShippingMethods]>;
1668
+ paymentErrors$: Observable<DaffCartErrors[DaffCartOperationType.Payment]>;
1669
+ paymentMethodsErrors$: Observable<DaffCartErrors[DaffCartOperationType.PaymentMethods]>;
1670
+ couponErrors$: Observable<DaffCartErrors[DaffCartOperationType.Coupon]>;
1671
+ itemEntities$: Observable<DaffOperationEntity<T['items'][number]>[]>;
1672
+ totalItems$: Observable<number>;
1673
+ hasOutOfStockItems$: Observable<boolean>;
1674
+ outOfStockItems$: Observable<DaffOperationEntity<T['items'][number]>[]>;
1675
+ inStockItems$: Observable<DaffOperationEntity<T['items'][number]>[]>;
1676
+ itemDictionary$: Observable<Dictionary<DaffOperationEntity<T['items'][number]>>>;
1677
+ paymentId$: Observable<any>;
1678
+ isCartEmpty$: Observable<boolean>;
1679
+ isBillingSameAsShipping$: Observable<boolean>;
1680
+ hasBillingAddress$: Observable<boolean>;
1681
+ hasShippingAddress$: Observable<boolean>;
1682
+ hasShippingMethod$: Observable<boolean>;
1683
+ hasPaymentMethod$: Observable<boolean>;
1684
+ canPlaceOrder$: Observable<boolean>;
1685
+ orderResultLoading$: Observable<boolean>;
1686
+ orderResultErrors$: Observable<DaffStateError[]>;
1687
+ orderResult$: Observable<V>;
1688
+ orderResultId$: Observable<V['orderId']>;
1689
+ orderResultCartId$: Observable<V['cartId']>;
1690
+ hasOrderResult$: Observable<boolean>;
1691
+ private _selectCartItemConfiguredAttributes;
1692
+ private _selectCartItemCompositeOptions;
1693
+ private _selectIsCartItemOutOfStock;
1694
+ constructor(store: Store<DaffCartStateRootSlice<T, V>>, paymentMethodMap: object);
1695
+ getConfiguredCartItemAttributes(itemId: T['items'][number]['id']): Observable<DaffConfigurableCartItemAttribute[]>;
1696
+ getCompositeCartItemOptions(itemId: T['items'][number]['id']): Observable<DaffCompositeCartItemOption[]>;
1697
+ isCartItemOutOfStock(itemId: T['items'][number]['id']): Observable<boolean>;
1698
+ dispatch(action: Action): void;
1699
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DaffCartFacade<any, any>, never>;
1700
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<DaffCartFacade<any, any>>;
1701
+ }
1702
+
1703
+ export { DAFF_CART_ERROR_MATCHER, DAFF_CART_EXTRA_REDUCERS, DAFF_CART_META_REDUCERS, DAFF_CART_RETRIEVAL_ACTIONS, DAFF_CART_STORE_FEATURE_KEY, DaffAddToCart, DaffAddToCartFailure, DaffAddToCartSuccess, DaffCartActionTypes, DaffCartAddressActionTypes, DaffCartAddressUpdate, DaffCartAddressUpdateFailure, DaffCartAddressUpdateSuccess, DaffCartBillingAddressActionTypes, DaffCartBillingAddressLoad, DaffCartBillingAddressLoadFailure, DaffCartBillingAddressLoadSuccess, DaffCartBillingAddressUpdate, DaffCartBillingAddressUpdateFailure, DaffCartBillingAddressUpdateSuccess, DaffCartClear, DaffCartClearFailure, DaffCartClearSuccess, DaffCartCouponActionTypes, DaffCartCouponApply, DaffCartCouponApplyFailure, DaffCartCouponApplySuccess, DaffCartCouponClearErrors, DaffCartCouponList, DaffCartCouponListFailure, DaffCartCouponListSuccess, DaffCartCouponRemove, DaffCartCouponRemoveAll, DaffCartCouponRemoveAllFailure, DaffCartCouponRemoveAllSuccess, DaffCartCouponRemoveFailure, DaffCartCouponRemoveSuccess, DaffCartCreate, DaffCartCreateFailure, DaffCartCreateSuccess, DaffCartFacade, DaffCartItemActionTypes, DaffCartItemAdd, DaffCartItemAddFailure, DaffCartItemAddSuccess, DaffCartItemDelete, DaffCartItemDeleteFailure, DaffCartItemDeleteOutOfStock, DaffCartItemDeleteOutOfStockFailure, DaffCartItemDeleteOutOfStockSuccess, DaffCartItemDeleteSuccess, DaffCartItemList, DaffCartItemListFailure, DaffCartItemListSuccess, DaffCartItemLoad, DaffCartItemLoadFailure, DaffCartItemLoadSuccess, DaffCartItemStateDebounceTime, DaffCartItemStateReset, DaffCartItemUpdate, DaffCartItemUpdateFailure, DaffCartItemUpdateSuccess, DaffCartLoad, DaffCartLoadFailure, DaffCartLoadPartialSuccess, DaffCartLoadSuccess, DaffCartOperationType, DaffCartOrderActionTypes, DaffCartPaymentActionTypes, DaffCartPaymentLoad, DaffCartPaymentLoadFailure, DaffCartPaymentLoadSuccess, DaffCartPaymentMethodAdd, DaffCartPaymentMethodsActionTypes, DaffCartPaymentMethodsLoad, DaffCartPaymentMethodsLoadFailure, DaffCartPaymentMethodsLoadSuccess, DaffCartPaymentRemove, DaffCartPaymentRemoveFailure, DaffCartPaymentRemoveSuccess, DaffCartPaymentUpdate, DaffCartPaymentUpdateFailure, DaffCartPaymentUpdateSuccess, DaffCartPaymentUpdateWithBilling, DaffCartPaymentUpdateWithBillingFailure, DaffCartPaymentUpdateWithBillingSuccess, DaffCartPlaceOrder, DaffCartPlaceOrderFailure, DaffCartPlaceOrderFailureFromOutOfStockProduct, DaffCartPlaceOrderSuccess, DaffCartResolveState, DaffCartShippingAddressActionTypes, DaffCartShippingAddressLoad, DaffCartShippingAddressLoadFailure, DaffCartShippingAddressLoadSuccess, DaffCartShippingAddressUpdate, DaffCartShippingAddressUpdateFailure, DaffCartShippingAddressUpdateSuccess, DaffCartShippingInformationActionTypes, DaffCartShippingInformationDelete, DaffCartShippingInformationDeleteFailure, DaffCartShippingInformationDeleteSuccess, DaffCartShippingInformationLoad, DaffCartShippingInformationLoadFailure, DaffCartShippingInformationLoadSuccess, DaffCartShippingInformationUpdate, DaffCartShippingInformationUpdateFailure, DaffCartShippingInformationUpdateSuccess, DaffCartShippingMethodsActionTypes, DaffCartShippingMethodsLoad, DaffCartShippingMethodsLoadFailure, DaffCartShippingMethodsLoadSuccess, DaffCartStateModule, DaffCartStorageFailure, DaffResolveCart, DaffResolveCartFailure, DaffResolveCartPartialSuccess, DaffResolveCartServerSide, DaffResolveCartSuccess, daffCartItemEntitiesAdapter, daffCartItemEntitiesRetrievalActionsReducerFactory, daffCartOrderInitialState, daffCartOrderReducer, daffCartPaymentProcessorUpdate, daffCartPlaceOrderFailureFromOutOfStockProductCartRetreivalInjection, daffCartProvideExtraReducers, daffCartProvideMetaReducers, daffCartProvideRetrievalActions, daffCartReducer, daffCartReducerInitialState, daffCartReducers, daffCartRetrievalActionsReducerFactory, daffCartRetrievalGetResponse, daffCartRetrivalActions, getDaffCartSelectors, initializeLoadingSetter, provideDaffCartErrorMatcher, provideDaffCartItemStateDebounceTime };
1704
+ export type { DaffCartActions, DaffCartAddressActions, DaffCartBillingAddressActions, DaffCartCouponActions, DaffCartErrors, DaffCartFacadeInterface, DaffCartItemActions, DaffCartItemLoadingState, DaffCartLoading, DaffCartMemoizedSelectors, DaffCartOrderActions, DaffCartOrderReducerState, DaffCartPaymentActions, DaffCartPaymentMethodsActions, DaffCartReducerState, DaffCartReducersState, DaffCartRetrievalAction, DaffCartRetrievalActionDirectInjection, DaffCartRetrievalActionInjection, DaffCartRetrievalActionTransformedInjection, DaffCartShippingAddressActions, DaffCartShippingInformationActions, DaffCartShippingMethodsActions, DaffCartStateRootSlice, DaffStatefulCart };