@daffodil/cart 0.38.9 → 0.39.3

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 (430) hide show
  1. package/bundles/daffodil-cart-driver-in-memory.umd.js +111 -1202
  2. package/bundles/daffodil-cart-driver-in-memory.umd.js.map +1 -1
  3. package/bundles/daffodil-cart-driver-in-memory.umd.min.js +1 -1
  4. package/bundles/daffodil-cart-driver-in-memory.umd.min.js.map +1 -1
  5. package/bundles/daffodil-cart-driver-magento-testing.umd.js +12 -177
  6. package/bundles/daffodil-cart-driver-magento-testing.umd.js.map +1 -1
  7. package/bundles/daffodil-cart-driver-magento-testing.umd.min.js +1 -1
  8. package/bundles/daffodil-cart-driver-magento-testing.umd.min.js.map +1 -1
  9. package/bundles/daffodil-cart-driver-magento.umd.js +164 -1661
  10. package/bundles/daffodil-cart-driver-magento.umd.js.map +1 -1
  11. package/bundles/daffodil-cart-driver-magento.umd.min.js +1 -1
  12. package/bundles/daffodil-cart-driver-magento.umd.min.js.map +1 -1
  13. package/bundles/daffodil-cart-driver-testing.umd.js +23 -375
  14. package/bundles/daffodil-cart-driver-testing.umd.js.map +1 -1
  15. package/bundles/daffodil-cart-driver-testing.umd.min.js +1 -1
  16. package/bundles/daffodil-cart-driver-testing.umd.min.js.map +1 -1
  17. package/bundles/daffodil-cart-driver.umd.js +29 -466
  18. package/bundles/daffodil-cart-driver.umd.js.map +1 -1
  19. package/bundles/daffodil-cart-driver.umd.min.js +16 -1
  20. package/bundles/daffodil-cart-driver.umd.min.js.map +1 -1
  21. package/bundles/daffodil-cart-routing.umd.js +43 -518
  22. package/bundles/daffodil-cart-routing.umd.js.map +1 -1
  23. package/bundles/daffodil-cart-routing.umd.min.js +1 -1
  24. package/bundles/daffodil-cart-routing.umd.min.js.map +1 -1
  25. package/bundles/daffodil-cart-state-testing.umd.js +6 -241
  26. package/bundles/daffodil-cart-state-testing.umd.js.map +1 -1
  27. package/bundles/daffodil-cart-state-testing.umd.min.js +2 -2
  28. package/bundles/daffodil-cart-state-testing.umd.min.js.map +1 -1
  29. package/bundles/daffodil-cart-state.umd.js +656 -4198
  30. package/bundles/daffodil-cart-state.umd.js.map +1 -1
  31. package/bundles/daffodil-cart-state.umd.min.js +1 -1
  32. package/bundles/daffodil-cart-state.umd.min.js.map +1 -1
  33. package/bundles/daffodil-cart-testing.umd.js +13 -187
  34. package/bundles/daffodil-cart-testing.umd.js.map +1 -1
  35. package/bundles/daffodil-cart-testing.umd.min.js +1 -1
  36. package/bundles/daffodil-cart-testing.umd.min.js.map +1 -1
  37. package/bundles/daffodil-cart.umd.js +43 -271
  38. package/bundles/daffodil-cart.umd.js.map +1 -1
  39. package/bundles/daffodil-cart.umd.min.js +3 -2
  40. package/bundles/daffodil-cart.umd.min.js.map +1 -1
  41. package/driver/in-memory/package.json +1 -1
  42. package/driver/magento/package.json +1 -1
  43. package/driver/magento/testing/package.json +1 -1
  44. package/driver/package.json +1 -1
  45. package/driver/testing/package.json +1 -1
  46. package/esm2015/daffodil-cart.js +2 -7
  47. package/esm2015/driver/daffodil-cart-driver.js +2 -7
  48. package/esm2015/driver/errors/cart-not-found.js +1 -13
  49. package/esm2015/driver/errors/codes.enum.js +12 -18
  50. package/esm2015/driver/errors/expired-payment-token.js +1 -15
  51. package/esm2015/driver/errors/invalid-api-response.js +1 -15
  52. package/esm2015/driver/errors/invalid-country.js +1 -13
  53. package/esm2015/driver/errors/invalid-coupon-code.js +1 -16
  54. package/esm2015/driver/errors/invalid-region.js +1 -13
  55. package/esm2015/driver/errors/map.js +1 -7
  56. package/esm2015/driver/errors/product-not-found.js +1 -13
  57. package/esm2015/driver/errors/product-out-of-stock.js +1 -13
  58. package/esm2015/driver/errors/public_api.js +1 -6
  59. package/esm2015/driver/in-memory/backend/cart/cart.service.js +7 -65
  60. package/esm2015/driver/in-memory/backend/cart-address/cart-address.service.js +5 -39
  61. package/esm2015/driver/in-memory/backend/cart-billing-address/cart-billing-address.service.js +7 -53
  62. package/esm2015/driver/in-memory/backend/cart-coupon/cart-coupon.service.js +10 -85
  63. package/esm2015/driver/in-memory/backend/cart-items/cart-items.service.js +21 -169
  64. package/esm2015/driver/in-memory/backend/cart-order/cart-order.service.js +5 -22
  65. package/esm2015/driver/in-memory/backend/cart-payment/cart-payment.service.js +9 -67
  66. package/esm2015/driver/in-memory/backend/cart-payment-methods/cart-payment-methods.service.js +5 -27
  67. package/esm2015/driver/in-memory/backend/cart-root.service.js +4 -119
  68. package/esm2015/driver/in-memory/backend/cart-shipping-address/cart-shipping-address.service.js +7 -53
  69. package/esm2015/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.js +9 -68
  70. package/esm2015/driver/in-memory/backend/cart-shipping-methods/cart-shipping-methods.service.js +5 -38
  71. package/esm2015/driver/in-memory/backend/public_api.js +1 -6
  72. package/esm2015/driver/in-memory/daffodil-cart-driver-in-memory.js +2 -7
  73. package/esm2015/driver/in-memory/drivers/cart/cart.service.js +4 -48
  74. package/esm2015/driver/in-memory/drivers/cart-address/cart-address.service.js +3 -28
  75. package/esm2015/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.js +3 -32
  76. package/esm2015/driver/in-memory/drivers/cart-coupon/cart-coupon.service.js +3 -41
  77. package/esm2015/driver/in-memory/drivers/cart-driver.module.js +1 -9
  78. package/esm2015/driver/in-memory/drivers/cart-item/cart-item.service.js +3 -48
  79. package/esm2015/driver/in-memory/drivers/cart-order/cart-order.service.js +3 -28
  80. package/esm2015/driver/in-memory/drivers/cart-payment/cart-payment.service.js +3 -42
  81. package/esm2015/driver/in-memory/drivers/cart-payment-methods/cart-payment-methods.service.js +3 -27
  82. package/esm2015/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.js +3 -32
  83. package/esm2015/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.js +3 -36
  84. package/esm2015/driver/in-memory/drivers/cart-shipping-methods/cart-shipping-methods.service.js +3 -27
  85. package/esm2015/driver/in-memory/drivers/public_api.js +1 -6
  86. package/esm2015/driver/in-memory/index.js +2 -7
  87. package/esm2015/driver/in-memory/injection-tokens/extra-attributes-hook.token.js +2 -16
  88. package/esm2015/driver/in-memory/injection-tokens/public_api.js +1 -6
  89. package/esm2015/driver/in-memory/public_api.js +4 -9
  90. package/esm2015/driver/index.js +2 -7
  91. package/esm2015/driver/interfaces/cart-address-service.interface.js +1 -22
  92. package/esm2015/driver/interfaces/cart-billing-address-service.interface.js +1 -28
  93. package/esm2015/driver/interfaces/cart-coupon-service.interface.js +1 -41
  94. package/esm2015/driver/interfaces/cart-item-service.interface.js +1 -50
  95. package/esm2015/driver/interfaces/cart-order-service.interface.js +1 -22
  96. package/esm2015/driver/interfaces/cart-payment-methods-service.interface.js +1 -21
  97. package/esm2015/driver/interfaces/cart-payment-service.interface.js +1 -42
  98. package/esm2015/driver/interfaces/cart-service.interface.js +1 -42
  99. package/esm2015/driver/interfaces/cart-shipping-address-service.interface.js +1 -28
  100. package/esm2015/driver/interfaces/cart-shipping-information-service.interface.js +1 -36
  101. package/esm2015/driver/interfaces/cart-shipping-methods-service.interface.js +1 -21
  102. package/esm2015/driver/interfaces/public_api.js +1 -6
  103. package/esm2015/driver/magento/cart-address.service.js +5 -71
  104. package/esm2015/driver/magento/cart-billing-address.service.js +7 -93
  105. package/esm2015/driver/magento/cart-coupon.service.js +6 -75
  106. package/esm2015/driver/magento/cart-driver.module.js +1 -9
  107. package/esm2015/driver/magento/cart-item.service.js +10 -126
  108. package/esm2015/driver/magento/cart-order.service.js +5 -33
  109. package/esm2015/driver/magento/cart-payment-methods.service.js +4 -43
  110. package/esm2015/driver/magento/cart-payment.service.js +7 -115
  111. package/esm2015/driver/magento/cart-shipping-address.service.js +7 -93
  112. package/esm2015/driver/magento/cart-shipping-information.service.js +8 -87
  113. package/esm2015/driver/magento/cart-shipping-methods.service.js +4 -43
  114. package/esm2015/driver/magento/cart.service.js +6 -84
  115. package/esm2015/driver/magento/daffodil-cart-driver-magento.js +2 -7
  116. package/esm2015/driver/magento/errors/codes.js +6 -12
  117. package/esm2015/driver/magento/errors/map.js +1 -8
  118. package/esm2015/driver/magento/errors/transform.js +2 -19
  119. package/esm2015/driver/magento/index.js +2 -7
  120. package/esm2015/driver/magento/injection-tokens/cart-mutation-queue.token.js +2 -11
  121. package/esm2015/driver/magento/injection-tokens/fragments/cart.js +2 -11
  122. package/esm2015/driver/magento/injection-tokens/public_api.js +1 -6
  123. package/esm2015/driver/magento/models/public_api.js +3 -8
  124. package/esm2015/driver/magento/models/requests/billing-address.js +2 -20
  125. package/esm2015/driver/magento/models/requests/cart-address.js +2 -32
  126. package/esm2015/driver/magento/models/requests/cart-item-update.js +2 -16
  127. package/esm2015/driver/magento/models/requests/cart-item.js +2 -32
  128. package/esm2015/driver/magento/models/requests/payment-method.js +2 -16
  129. package/esm2015/driver/magento/models/requests/public_api.js +2 -7
  130. package/esm2015/driver/magento/models/requests/shipping-address.js +2 -18
  131. package/esm2015/driver/magento/models/requests/shipping-method.js +2 -16
  132. package/esm2015/driver/magento/models/responses/cart-address.js +2 -32
  133. package/esm2015/driver/magento/models/responses/cart-coupon.js +2 -14
  134. package/esm2015/driver/magento/models/responses/cart-item.js +7 -70
  135. package/esm2015/driver/magento/models/responses/cart-payment-method.js +2 -20
  136. package/esm2015/driver/magento/models/responses/cart-shipping-method.js +2 -22
  137. package/esm2015/driver/magento/models/responses/cart.js +2 -31
  138. package/esm2015/driver/magento/models/responses/public_api.js +2 -7
  139. package/esm2015/driver/magento/models/responses/shipping-address.js +2 -16
  140. package/esm2015/driver/magento/public_api.js +5 -10
  141. package/esm2015/driver/magento/queries/add-cart-item.js +3 -13
  142. package/esm2015/driver/magento/queries/apply-coupon.js +3 -13
  143. package/esm2015/driver/magento/queries/create-cart.js +1 -7
  144. package/esm2015/driver/magento/queries/fragments/available-payment-method.js +1 -7
  145. package/esm2015/driver/magento/queries/fragments/available-shipping-method.js +1 -7
  146. package/esm2015/driver/magento/queries/fragments/cart-address.js +1 -7
  147. package/esm2015/driver/magento/queries/fragments/cart-coupon.js +1 -7
  148. package/esm2015/driver/magento/queries/fragments/cart-item.js +1 -8
  149. package/esm2015/driver/magento/queries/fragments/cart-totals.js +1 -7
  150. package/esm2015/driver/magento/queries/fragments/cart.js +1 -7
  151. package/esm2015/driver/magento/queries/fragments/money.js +1 -7
  152. package/esm2015/driver/magento/queries/fragments/prices.js +1 -7
  153. package/esm2015/driver/magento/queries/fragments/public_api.js +1 -6
  154. package/esm2015/driver/magento/queries/fragments/selected-payment-method.js +1 -7
  155. package/esm2015/driver/magento/queries/fragments/selected-shipping-method.js +1 -7
  156. package/esm2015/driver/magento/queries/get-billing-address.js +3 -13
  157. package/esm2015/driver/magento/queries/get-cart.js +3 -13
  158. package/esm2015/driver/magento/queries/get-selected-payment-method.js +3 -13
  159. package/esm2015/driver/magento/queries/get-selected-shipping-method.js +3 -13
  160. package/esm2015/driver/magento/queries/get-shipping-address.js +3 -13
  161. package/esm2015/driver/magento/queries/list-cart-coupons.js +3 -13
  162. package/esm2015/driver/magento/queries/list-cart-items.js +3 -13
  163. package/esm2015/driver/magento/queries/list-payment-methods.js +3 -13
  164. package/esm2015/driver/magento/queries/list-shipping-methods.js +3 -13
  165. package/esm2015/driver/magento/queries/place-order.js +1 -7
  166. package/esm2015/driver/magento/queries/public_api.js +3 -8
  167. package/esm2015/driver/magento/queries/remove-all-coupons.js +3 -13
  168. package/esm2015/driver/magento/queries/remove-cart-item.js +3 -13
  169. package/esm2015/driver/magento/queries/responses/add-cart-item.js +2 -14
  170. package/esm2015/driver/magento/queries/responses/apply-coupon.js +2 -14
  171. package/esm2015/driver/magento/queries/responses/create-cart.js +2 -14
  172. package/esm2015/driver/magento/queries/responses/get-billing-address.js +2 -14
  173. package/esm2015/driver/magento/queries/responses/get-cart.js +2 -16
  174. package/esm2015/driver/magento/queries/responses/get-selected-payment-method.js +2 -14
  175. package/esm2015/driver/magento/queries/responses/get-selected-shipping-method.js +2 -14
  176. package/esm2015/driver/magento/queries/responses/get-shipping-address.js +2 -14
  177. package/esm2015/driver/magento/queries/responses/list-cart-coupons.js +2 -14
  178. package/esm2015/driver/magento/queries/responses/list-cart-items.js +2 -14
  179. package/esm2015/driver/magento/queries/responses/list-payment-methods.js +2 -14
  180. package/esm2015/driver/magento/queries/responses/list-shipping-methods.js +2 -14
  181. package/esm2015/driver/magento/queries/responses/place-order.js +2 -14
  182. package/esm2015/driver/magento/queries/responses/public_api.js +2 -7
  183. package/esm2015/driver/magento/queries/responses/remove-all-coupons.js +2 -14
  184. package/esm2015/driver/magento/queries/responses/remove-cart-item.js +2 -14
  185. package/esm2015/driver/magento/queries/responses/set-guest-email.js +2 -14
  186. package/esm2015/driver/magento/queries/responses/set-selected-payment-method-with-billing-and-email.js +2 -18
  187. package/esm2015/driver/magento/queries/responses/set-selected-payment-method-with-billing.js +2 -16
  188. package/esm2015/driver/magento/queries/responses/set-selected-payment-method.js +2 -14
  189. package/esm2015/driver/magento/queries/responses/set-selected-shipping-method.js +2 -14
  190. package/esm2015/driver/magento/queries/responses/update-address-with-email.js +2 -18
  191. package/esm2015/driver/magento/queries/responses/update-address.js +2 -16
  192. package/esm2015/driver/magento/queries/responses/update-billing-address-with-email.js +2 -16
  193. package/esm2015/driver/magento/queries/responses/update-billing-address.js +2 -14
  194. package/esm2015/driver/magento/queries/responses/update-cart-item.js +2 -14
  195. package/esm2015/driver/magento/queries/responses/update-shipping-address-with-email.js +2 -16
  196. package/esm2015/driver/magento/queries/responses/update-shipping-address.js +2 -14
  197. package/esm2015/driver/magento/queries/set-selected-payment-method-with-billing-and-email.js +3 -13
  198. package/esm2015/driver/magento/queries/set-selected-payment-method-with-billing.js +3 -13
  199. package/esm2015/driver/magento/queries/set-selected-payment-method.js +3 -13
  200. package/esm2015/driver/magento/queries/set-selected-shipping-method.js +3 -13
  201. package/esm2015/driver/magento/queries/update-address-with-email.js +3 -13
  202. package/esm2015/driver/magento/queries/update-address.js +3 -13
  203. package/esm2015/driver/magento/queries/update-billing-address-with-email.js +3 -13
  204. package/esm2015/driver/magento/queries/update-billing-address.js +3 -13
  205. package/esm2015/driver/magento/queries/update-cart-item.js +3 -13
  206. package/esm2015/driver/magento/queries/update-shipping-address-with-email.js +3 -13
  207. package/esm2015/driver/magento/queries/update-shipping-address.js +3 -13
  208. package/esm2015/driver/magento/testing/daffodil-cart-driver-magento-testing.js +2 -7
  209. package/esm2015/driver/magento/testing/factories/cart-address-input.factory.js +2 -29
  210. package/esm2015/driver/magento/testing/factories/cart-address.factory.js +2 -31
  211. package/esm2015/driver/magento/testing/factories/cart-coupon.factory.js +2 -11
  212. package/esm2015/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.js +2 -13
  213. package/esm2015/driver/magento/testing/factories/cart-item/cart-item.factory.js +2 -32
  214. package/esm2015/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.js +2 -13
  215. package/esm2015/driver/magento/testing/factories/cart-payment-method.factory.js +2 -15
  216. package/esm2015/driver/magento/testing/factories/cart-shipping-method.factory.js +2 -23
  217. package/esm2015/driver/magento/testing/factories/cart.factory.js +2 -33
  218. package/esm2015/driver/magento/testing/factories/public_api.js +1 -6
  219. package/esm2015/driver/magento/testing/factories/shipping-address.factory.js +2 -15
  220. package/esm2015/driver/magento/testing/index.js +2 -7
  221. package/esm2015/driver/magento/testing/public_api.js +2 -7
  222. package/esm2015/driver/magento/transforms/inputs/billing-address.service.js +2 -21
  223. package/esm2015/driver/magento/transforms/inputs/cart-address.service.js +2 -11
  224. package/esm2015/driver/magento/transforms/inputs/cart-item-input-transformers.js +2 -23
  225. package/esm2015/driver/magento/transforms/inputs/cart-item-update.service.js +2 -11
  226. package/esm2015/driver/magento/transforms/inputs/payment-method.service.js +2 -11
  227. package/esm2015/driver/magento/transforms/inputs/shipping-address.service.js +2 -21
  228. package/esm2015/driver/magento/transforms/inputs/shipping-method.service.js +2 -11
  229. package/esm2015/driver/magento/transforms/outputs/billing-address.service.js +3 -19
  230. package/esm2015/driver/magento/transforms/outputs/cart-address.service.js +3 -9
  231. package/esm2015/driver/magento/transforms/outputs/cart-coupon-response.service.js +3 -24
  232. package/esm2015/driver/magento/transforms/outputs/cart-coupon.js +1 -10
  233. package/esm2015/driver/magento/transforms/outputs/cart-item/bundle-cart-item-transformer.js +2 -12
  234. package/esm2015/driver/magento/transforms/outputs/cart-item/cart-item-transformer.js +4 -10
  235. package/esm2015/driver/magento/transforms/outputs/cart-item/configurable-cart-item-transformer.js +2 -12
  236. package/esm2015/driver/magento/transforms/outputs/cart-item/simple-cart-item-transformer.js +4 -14
  237. package/esm2015/driver/magento/transforms/outputs/cart-payment.service.js +3 -9
  238. package/esm2015/driver/magento/transforms/outputs/cart-shipping-information.service.js +6 -20
  239. package/esm2015/driver/magento/transforms/outputs/cart-shipping-rate.service.js +3 -9
  240. package/esm2015/driver/magento/transforms/outputs/cart-totals-transformer.js +4 -31
  241. package/esm2015/driver/magento/transforms/outputs/cart.service.js +5 -98
  242. package/esm2015/driver/magento/transforms/outputs/shipping-address.service.js +3 -19
  243. package/esm2015/driver/magento/transforms/public_api.js +1 -6
  244. package/esm2015/driver/public_api.js +3 -8
  245. package/esm2015/driver/testing/daffodil-cart-driver-testing.js +2 -7
  246. package/esm2015/driver/testing/drivers/cart/cart.service.js +3 -34
  247. package/esm2015/driver/testing/drivers/cart-address/cart-address.service.js +3 -29
  248. package/esm2015/driver/testing/drivers/cart-billing-address/cart-billing-address.service.js +3 -33
  249. package/esm2015/driver/testing/drivers/cart-coupon/cart-coupon.service.js +3 -42
  250. package/esm2015/driver/testing/drivers/cart-driver.module.js +1 -9
  251. package/esm2015/driver/testing/drivers/cart-item/cart-item.service.js +3 -49
  252. package/esm2015/driver/testing/drivers/cart-order/cart-order.service.js +3 -13
  253. package/esm2015/driver/testing/drivers/cart-payment/cart-payment.service.js +3 -43
  254. package/esm2015/driver/testing/drivers/cart-payment-methods/cart-payment-methods.service.js +3 -22
  255. package/esm2015/driver/testing/drivers/cart-shipping-address/cart-shipping-address.service.js +3 -33
  256. package/esm2015/driver/testing/drivers/cart-shipping-information/cart-shipping-information.service.js +3 -37
  257. package/esm2015/driver/testing/drivers/cart-shipping-methods/cart-shipping-methods.service.js +3 -22
  258. package/esm2015/driver/testing/drivers/public_api.js +1 -6
  259. package/esm2015/driver/testing/index.js +2 -7
  260. package/esm2015/driver/testing/public_api.js +2 -7
  261. package/esm2015/errors/codes.enum.js +10 -12
  262. package/esm2015/errors/map.js +1 -7
  263. package/esm2015/errors/public_api.js +2 -7
  264. package/esm2015/errors/resolution/cart-not-found-or-created-resolution.js +2 -14
  265. package/esm2015/errors/resolution/cart-resolution.js +2 -14
  266. package/esm2015/errors/resolution/cart-server-side-resolution.js +2 -14
  267. package/esm2015/errors/resolution/cart-storage-resolution.js +2 -14
  268. package/esm2015/errors/resolution/public_api.js +1 -6
  269. package/esm2015/index.js +2 -7
  270. package/esm2015/injection-tokens/error-matcher.token.js +2 -11
  271. package/esm2015/injection-tokens/payment-method-map.js +3 -12
  272. package/esm2015/injection-tokens/public_api.js +1 -6
  273. package/esm2015/models/cart-address.js +2 -23
  274. package/esm2015/models/cart-coupon.js +2 -31
  275. package/esm2015/models/cart-item-input.js +10 -93
  276. package/esm2015/models/cart-item.js +2 -88
  277. package/esm2015/models/cart-order-result.js +2 -29
  278. package/esm2015/models/cart-payment.js +2 -25
  279. package/esm2015/models/cart-shipping-info.js +2 -14
  280. package/esm2015/models/cart-shipping-rate.js +2 -43
  281. package/esm2015/models/cart-total.js +13 -41
  282. package/esm2015/models/cart.js +2 -76
  283. package/esm2015/models/composite-cart-item.js +2 -40
  284. package/esm2015/models/configurable-cart-item.js +2 -35
  285. package/esm2015/models/public_api.js +7 -12
  286. package/esm2015/public_api.js +4 -9
  287. package/esm2015/routing/cart-routing.module.js +2 -11
  288. package/esm2015/routing/config/config.js +4 -23
  289. package/esm2015/routing/config/resolution/config.js +1 -21
  290. package/esm2015/routing/daffodil-cart-routing.js +2 -7
  291. package/esm2015/routing/guards/billing-address/billing-address-guard-redirect.token.js +1 -7
  292. package/esm2015/routing/guards/billing-address/billing-address.guard.js +5 -39
  293. package/esm2015/routing/guards/cart-items/cart-items-guard-redirect.token.js +2 -8
  294. package/esm2015/routing/guards/cart-items/cart-items.guard.js +6 -44
  295. package/esm2015/routing/guards/order-result/order-result-guard-redirect.token.js +1 -7
  296. package/esm2015/routing/guards/order-result/order-result.guard.js +4 -38
  297. package/esm2015/routing/guards/payment-method/payment-method-guard-redirect.token.js +1 -7
  298. package/esm2015/routing/guards/payment-method/payment-method.guard.js +5 -39
  299. package/esm2015/routing/guards/public_api.js +1 -6
  300. package/esm2015/routing/guards/resolved-cart/resolved-cart.guard.js +7 -49
  301. package/esm2015/routing/guards/shipping-address/shipping-address-guard-redirect.token.js +1 -7
  302. package/esm2015/routing/guards/shipping-address/shipping-address.guard.js +5 -39
  303. package/esm2015/routing/guards/shipping-method/shipping-method-guard-redirect.token.js +1 -7
  304. package/esm2015/routing/guards/shipping-method/shipping-method.guard.js +5 -39
  305. package/esm2015/routing/index.js +2 -7
  306. package/esm2015/routing/public_api.js +3 -8
  307. package/esm2015/routing/resolvers/cart-resolver.service.js +5 -49
  308. package/esm2015/routing/resolvers/empty-cart-resolver.service.js +4 -42
  309. package/esm2015/routing/resolvers/public_api.js +1 -6
  310. package/esm2015/routing/resolvers/tokens/cart-resolver-redirect.token.js +1 -7
  311. package/esm2015/routing/resolvers/tokens/empty-cart-resolver-redirect.token.js +1 -7
  312. package/esm2015/state/actions/cart-address.actions.js +8 -40
  313. package/esm2015/state/actions/cart-billing-address.actions.js +11 -66
  314. package/esm2015/state/actions/cart-coupon.actions.js +17 -124
  315. package/esm2015/state/actions/cart-item.actions.js +22 -186
  316. package/esm2015/state/actions/cart-order.actions.js +8 -40
  317. package/esm2015/state/actions/cart-payment-methods.actions.js +8 -34
  318. package/esm2015/state/actions/cart-payment.actions.js +19 -133
  319. package/esm2015/state/actions/cart-shipping-address.actions.js +11 -66
  320. package/esm2015/state/actions/cart-shipping-information.actions.js +14 -100
  321. package/esm2015/state/actions/cart-shipping-methods.actions.js +8 -36
  322. package/esm2015/state/actions/cart.actions.js +22 -162
  323. package/esm2015/state/actions/public_api.js +12 -17
  324. package/esm2015/state/cart-state.module.js +1 -6
  325. package/esm2015/state/daffodil-cart-state.js +2 -7
  326. package/esm2015/state/effects/cart-address.effects.js +3 -60
  327. package/esm2015/state/effects/cart-billing-address.effects.js +3 -67
  328. package/esm2015/state/effects/cart-coupon.effects.js +9 -129
  329. package/esm2015/state/effects/cart-item.effects.js +6 -120
  330. package/esm2015/state/effects/cart-order.effects.js +3 -62
  331. package/esm2015/state/effects/cart-payment-methods.effects.js +2 -52
  332. package/esm2015/state/effects/cart-payment.effects.js +5 -93
  333. package/esm2015/state/effects/cart-resolver.effects.js +4 -80
  334. package/esm2015/state/effects/cart-shipping-address.effects.js +3 -67
  335. package/esm2015/state/effects/cart-shipping-information.effects.js +4 -82
  336. package/esm2015/state/effects/cart-shipping-methods.effects.js +2 -52
  337. package/esm2015/state/effects/cart.effects.js +9 -128
  338. package/esm2015/state/facades/cart/cart-facade.interface.js +2 -355
  339. package/esm2015/state/facades/cart/cart.facade.js +10 -275
  340. package/esm2015/state/index.js +2 -7
  341. package/esm2015/state/injection-tokens/cart-item-state-debounce-time.js +1 -7
  342. package/esm2015/state/injection-tokens/public_api.js +1 -6
  343. package/esm2015/state/models/public_api.js +4 -9
  344. package/esm2015/state/models/stateful-cart-item.js +9 -27
  345. package/esm2015/state/models/stateful-composite-cart-item.js +2 -10
  346. package/esm2015/state/models/stateful-configurable-cart-item.js +2 -10
  347. package/esm2015/state/public_api.js +6 -11
  348. package/esm2015/state/reducers/action-types.type.js +2 -6
  349. package/esm2015/state/reducers/cart/cart.reducer.js +1 -15
  350. package/esm2015/state/reducers/cart-billing-address/cart-billing-address.reducer.js +1 -15
  351. package/esm2015/state/reducers/cart-coupon/cart-coupon.reducer.js +1 -15
  352. package/esm2015/state/reducers/cart-initial-state.js +1 -7
  353. package/esm2015/state/reducers/cart-item/cart-item.reducer.js +3 -21
  354. package/esm2015/state/reducers/cart-item-entities/cart-item-entities-reducer-adapter.js +4 -22
  355. package/esm2015/state/reducers/cart-item-entities/cart-item-entities.reducer.js +12 -58
  356. package/esm2015/state/reducers/cart-operation-type.enum.js +16 -17
  357. package/esm2015/state/reducers/cart-order/cart-order-initial-state.js +1 -7
  358. package/esm2015/state/reducers/cart-order/cart-order-state.interface.js +2 -19
  359. package/esm2015/state/reducers/cart-order/cart-order.reducer.js +1 -12
  360. package/esm2015/state/reducers/cart-payment/cart-payment.reducer.js +1 -15
  361. package/esm2015/state/reducers/cart-payment-methods/cart-payment-methods.reducer.js +1 -15
  362. package/esm2015/state/reducers/cart-reducers-state.interface.js +1 -28
  363. package/esm2015/state/reducers/cart-reducers.js +1 -7
  364. package/esm2015/state/reducers/cart-resolve/cart-resolve-state.enum.js +9 -15
  365. package/esm2015/state/reducers/cart-resolve/cart-resolve.reducer.js +1 -12
  366. package/esm2015/state/reducers/cart-shipping-address/cart-shipping-address.reducer.js +1 -15
  367. package/esm2015/state/reducers/cart-shipping-information/cart-shipping-information.reducer.js +7 -17
  368. package/esm2015/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.js +1 -15
  369. package/esm2015/state/reducers/cart-state.interface.js +2 -21
  370. package/esm2015/state/reducers/cart-store-feature-key.js +1 -7
  371. package/esm2015/state/reducers/cart.reducer.js +1 -11
  372. package/esm2015/state/reducers/errors/cart-errors.type.js +2 -6
  373. package/esm2015/state/reducers/errors/error-state-helpers.js +5 -29
  374. package/esm2015/state/reducers/loading/cart-loading.type.js +3 -42
  375. package/esm2015/state/reducers/public_api.js +3 -8
  376. package/esm2015/state/reducers/token/extra.token.js +5 -21
  377. package/esm2015/state/reducers/token/public_api.js +1 -6
  378. package/esm2015/state/reducers/token/reducers.token.js +4 -13
  379. package/esm2015/state/selectors/cart/cart.selector.js +98 -811
  380. package/esm2015/state/selectors/cart-feature.selector.js +5 -28
  381. package/esm2015/state/selectors/cart-item-entities/cart-item-entities.selectors.js +29 -229
  382. package/esm2015/state/selectors/cart-order/cart-order.selector.js +15 -104
  383. package/esm2015/state/selectors/cart.selector.js +6 -30
  384. package/esm2015/state/selectors/public_api.js +2 -7
  385. package/esm2015/state/testing/cart-testing.module.js +1 -6
  386. package/esm2015/state/testing/daffodil-cart-state-testing.js +2 -7
  387. package/esm2015/state/testing/factories/stateful-cart-item.factory.js +2 -11
  388. package/esm2015/state/testing/factories/stateful-composite-cart-item.factory.js +2 -11
  389. package/esm2015/state/testing/factories/stateful-configurable-cart-item.factory.js +2 -11
  390. package/esm2015/state/testing/index.js +2 -7
  391. package/esm2015/state/testing/mock-cart-facade.js +2 -206
  392. package/esm2015/state/testing/public_api.js +4 -9
  393. package/esm2015/storage/cart-storage.service.js +2 -36
  394. package/esm2015/testing/daffodil-cart-testing.js +2 -7
  395. package/esm2015/testing/factories/cart-address.factory.js +2 -41
  396. package/esm2015/testing/factories/cart-coupon.factory.js +2 -17
  397. package/esm2015/testing/factories/cart-item/cart-item.factory.js +5 -51
  398. package/esm2015/testing/factories/cart-item/composite-cart-item.factory.js +2 -23
  399. package/esm2015/testing/factories/cart-item/configurable-cart-item.factory.js +2 -13
  400. package/esm2015/testing/factories/cart-payment.factory.js +2 -11
  401. package/esm2015/testing/factories/cart-shipping-rate.factory.js +2 -23
  402. package/esm2015/testing/factories/cart.factory.js +2 -35
  403. package/esm2015/testing/factories/public_api.js +4 -9
  404. package/esm2015/testing/index.js +2 -7
  405. package/esm2015/testing/public_api.js +2 -7
  406. package/fesm2015/daffodil-cart-driver-in-memory.js +108 -1228
  407. package/fesm2015/daffodil-cart-driver-in-memory.js.map +1 -1
  408. package/fesm2015/daffodil-cart-driver-magento-testing.js +12 -227
  409. package/fesm2015/daffodil-cart-driver-magento-testing.js.map +1 -1
  410. package/fesm2015/daffodil-cart-driver-magento.js +161 -1844
  411. package/fesm2015/daffodil-cart-driver-magento.js.map +1 -1
  412. package/fesm2015/daffodil-cart-driver-testing.js +24 -376
  413. package/fesm2015/daffodil-cart-driver-testing.js.map +1 -1
  414. package/fesm2015/daffodil-cart-driver.js +13 -493
  415. package/fesm2015/daffodil-cart-driver.js.map +1 -1
  416. package/fesm2015/daffodil-cart-routing.js +44 -498
  417. package/fesm2015/daffodil-cart-routing.js.map +1 -1
  418. package/fesm2015/daffodil-cart-state-testing.js +6 -256
  419. package/fesm2015/daffodil-cart-state-testing.js.map +1 -1
  420. package/fesm2015/daffodil-cart-state.js +403 -3921
  421. package/fesm2015/daffodil-cart-state.js.map +1 -1
  422. package/fesm2015/daffodil-cart-testing.js +13 -228
  423. package/fesm2015/daffodil-cart-testing.js.map +1 -1
  424. package/fesm2015/daffodil-cart.js +39 -532
  425. package/fesm2015/daffodil-cart.js.map +1 -1
  426. package/package.json +5 -5
  427. package/routing/package.json +1 -1
  428. package/state/package.json +1 -1
  429. package/state/testing/package.json +1 -1
  430. package/testing/package.json +1 -1
@@ -4,392 +4,40 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.daffodil = global.daffodil || {}, global.daffodil.cart = global.daffodil.cart || {}, global.daffodil.cart.driver = {}), global.ng.core, global.core$1));
5
5
  }(this, (function (exports, core, core$1) { 'use strict';
6
6
 
7
- /**
8
- * @fileoverview added by tsickle
9
- * Generated from: interfaces/cart-service.interface.ts
10
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11
- */
12
- /**
13
- * The interface responsible for managing a customer's cart.
14
- * @record
15
- * @template T
16
- */
17
- function DaffCartServiceInterface() { }
18
- if (false) {
19
- /**
20
- * Retrieve a cart
21
- * @param {?} id
22
- * @return {?}
23
- */
24
- DaffCartServiceInterface.prototype.get = function (id) { };
25
- /**
26
- * Creates a cart.
27
- * @return {?}
28
- */
29
- DaffCartServiceInterface.prototype.create = function () { };
30
- /**
31
- * @deprecated
32
- * Prefer DaffCartItemServiceInterface.add
33
- *
34
- * Add an item to the cart.
35
- * @param {?} productId
36
- * @param {?} qty
37
- * @return {?}
38
- */
39
- DaffCartServiceInterface.prototype.addToCart = function (productId, qty) { };
40
- /**
41
- * Remove all items from a cart.
42
- * @param {?} id
43
- * @return {?}
44
- */
45
- DaffCartServiceInterface.prototype.clear = function (id) { };
46
- }
47
- /** @type {?} */
48
7
  var DaffCartDriver = new core.InjectionToken('DaffCartDriver');
49
8
 
50
- /**
51
- * @fileoverview added by tsickle
52
- * Generated from: interfaces/cart-billing-address-service.interface.ts
53
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
54
- */
55
- /**
56
- * The interface responsible for managing the billing address of a cart.
57
- * @record
58
- * @template T, V
59
- */
60
- function DaffCartBillingAddressServiceInterface() { }
61
- if (false) {
62
- /**
63
- * Retrieve the billing address of a cart
64
- * @param {?} cartId
65
- * @return {?}
66
- */
67
- DaffCartBillingAddressServiceInterface.prototype.get = function (cartId) { };
68
- /**
69
- * Update the billing address of a cart
70
- * @param {?} cartId
71
- * @param {?} address
72
- * @return {?}
73
- */
74
- DaffCartBillingAddressServiceInterface.prototype.update = function (cartId, address) { };
75
- }
76
- /** @type {?} */
77
9
  var DaffCartBillingAddressDriver = new core.InjectionToken('DaffCartBillingAddressDriver');
78
10
 
79
- /**
80
- * @fileoverview added by tsickle
81
- * Generated from: interfaces/cart-address-service.interface.ts
82
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
83
- */
84
- /**
85
- * The interface responsible for managing the address of a cart.
86
- * @record
87
- * @template T, V
88
- */
89
- function DaffCartAddressServiceInterface() { }
90
- if (false) {
91
- /**
92
- * Update the billing and shipping address of a cart
93
- * @param {?} cartId
94
- * @param {?} address
95
- * @return {?}
96
- */
97
- DaffCartAddressServiceInterface.prototype.update = function (cartId, address) { };
98
- }
99
- /** @type {?} */
100
11
  var DaffCartAddressDriver = new core.InjectionToken('DaffCartAddressDriver');
101
12
 
102
- /**
103
- * @fileoverview added by tsickle
104
- * Generated from: interfaces/cart-coupon-service.interface.ts
105
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
106
- */
107
- /**
108
- * The interface responsible for applying a coupon to a cart.
109
- * @record
110
- * @template T, V
111
- */
112
- function DaffCartCouponServiceInterface() { }
113
- if (false) {
114
- /**
115
- * Apply a coupon to the cart and return a partial of the cart.
116
- * @param {?} cartId
117
- * @param {?} coupon
118
- * @return {?}
119
- */
120
- DaffCartCouponServiceInterface.prototype.apply = function (cartId, coupon) { };
121
- /**
122
- * List coupon codes applied to a cart.
123
- * @param {?} cartId
124
- * @return {?}
125
- */
126
- DaffCartCouponServiceInterface.prototype.list = function (cartId) { };
127
- /**
128
- * Remove a coupon from the cart and return a partial of the cart.
129
- * @param {?} cartId
130
- * @param {?} coupon
131
- * @return {?}
132
- */
133
- DaffCartCouponServiceInterface.prototype.remove = function (cartId, coupon) { };
134
- /**
135
- * Remove all coupons from the cart and return a partial of the cart.
136
- * @param {?} cartId
137
- * @return {?}
138
- */
139
- DaffCartCouponServiceInterface.prototype.removeAll = function (cartId) { };
140
- }
141
- /** @type {?} */
142
13
  var DaffCartCouponDriver = new core.InjectionToken('DaffCartCouponDriver');
143
14
 
144
- /**
145
- * @fileoverview added by tsickle
146
- * Generated from: interfaces/cart-item-service.interface.ts
147
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
148
- */
149
- /**
150
- * The interface responsible for managing the items of a cart.
151
- * @record
152
- * @template T, U, V
153
- */
154
- function DaffCartItemServiceInterface() { }
155
- if (false) {
156
- /**
157
- * List all of the available items of a cart
158
- * @param {?} cartId
159
- * @return {?}
160
- */
161
- DaffCartItemServiceInterface.prototype.list = function (cartId) { };
162
- /**
163
- * Get a specific cart item of a cart.
164
- * @param {?} cartId
165
- * @param {?} item_id
166
- * @return {?}
167
- */
168
- DaffCartItemServiceInterface.prototype.get = function (cartId, item_id) { };
169
- /**
170
- * Add something to a cart.
171
- * @param {?} id
172
- * @param {?} product
173
- * @return {?}
174
- */
175
- DaffCartItemServiceInterface.prototype.add = function (id, product) { };
176
- /**
177
- * Update an existing item in a cart
178
- * @param {?} cartId
179
- * @param {?} itemId
180
- * @param {?} changes
181
- * @return {?}
182
- */
183
- DaffCartItemServiceInterface.prototype.update = function (cartId, itemId, changes) { };
184
- /**
185
- * Remove an item from a cart.
186
- * @param {?} cartId
187
- * @param {?} itemId
188
- * @return {?}
189
- */
190
- DaffCartItemServiceInterface.prototype.delete = function (cartId, itemId) { };
191
- }
192
- /** @type {?} */
193
15
  var DaffCartItemDriver = new core.InjectionToken('DaffCartItemDriver');
194
16
 
195
- /**
196
- * @fileoverview added by tsickle
197
- * Generated from: interfaces/cart-payment-methods-service.interface.ts
198
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
199
- */
200
- /**
201
- * The interface responsible for retrieving the available payment methods of a cart.
202
- * @record
203
- * @template T
204
- */
205
- function DaffCartPaymentMethodsServiceInterface() { }
206
- if (false) {
207
- /**
208
- * List the available payment methods of a cart.
209
- * @param {?} cartId
210
- * @return {?}
211
- */
212
- DaffCartPaymentMethodsServiceInterface.prototype.list = function (cartId) { };
213
- }
214
- /** @type {?} */
215
17
  var DaffCartPaymentMethodsDriver = new core.InjectionToken('DaffCartPaymentMethodsDriver');
216
18
 
217
- /**
218
- * @fileoverview added by tsickle
219
- * Generated from: interfaces/cart-payment-service.interface.ts
220
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
221
- */
222
- /**
223
- * The interface responsible for managing the selected payment method of a cart.
224
- * @record
225
- * @template T, V, R
226
- */
227
- function DaffCartPaymentServiceInterface() { }
228
- if (false) {
229
- /**
230
- * Get the currently applied payment method of a cart.
231
- * @param {?} cartId
232
- * @return {?}
233
- */
234
- DaffCartPaymentServiceInterface.prototype.get = function (cartId) { };
235
- /**
236
- * Update the payment method applied to a cart.
237
- * @param {?} cartId
238
- * @param {?} payment
239
- * @return {?}
240
- */
241
- DaffCartPaymentServiceInterface.prototype.update = function (cartId, payment) { };
242
- /**
243
- * Update the billing address and payment method applied to a cart.
244
- * @param {?} cartId
245
- * @param {?} payment
246
- * @param {?} address
247
- * @return {?}
248
- */
249
- DaffCartPaymentServiceInterface.prototype.updateWithBilling = function (cartId, payment, address) { };
250
- /**
251
- * Remove the payment method applied to a cart.
252
- * @param {?} cartId
253
- * @return {?}
254
- */
255
- DaffCartPaymentServiceInterface.prototype.remove = function (cartId) { };
256
- }
257
- /** @type {?} */
258
19
  var DaffCartPaymentDriver = new core.InjectionToken('DaffCartPaymentDriver');
259
20
 
260
- /**
261
- * @fileoverview added by tsickle
262
- * Generated from: interfaces/cart-shipping-address-service.interface.ts
263
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
264
- */
265
- /**
266
- * The interface responsible for managing the shipping address of a cart.
267
- * @record
268
- * @template T, V
269
- */
270
- function DaffCartShippingAddressServiceInterface() { }
271
- if (false) {
272
- /**
273
- * Retrieve the shipping address of a cart.
274
- * @param {?} cartId
275
- * @return {?}
276
- */
277
- DaffCartShippingAddressServiceInterface.prototype.get = function (cartId) { };
278
- /**
279
- * Update the shipping address of a cart.
280
- * @param {?} cartId
281
- * @param {?} address
282
- * @return {?}
283
- */
284
- DaffCartShippingAddressServiceInterface.prototype.update = function (cartId, address) { };
285
- }
286
- /** @type {?} */
287
21
  var DaffCartShippingAddressDriver = new core.InjectionToken('DaffCartShippingAddressDriver');
288
22
 
289
- /**
290
- * @fileoverview added by tsickle
291
- * Generated from: interfaces/cart-shipping-information-service.interface.ts
292
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
293
- */
294
- /**
295
- * The interface responsible for mediating the interaction of the shipping
296
- * information of a cart with a given platform.
297
- * @record
298
- * @template T, V
299
- */
300
- function DaffCartShippingInformationServiceInterface() { }
301
- if (false) {
302
- /**
303
- * Get the currently selected shipping method of a cart.
304
- * @param {?} cartId
305
- * @return {?}
306
- */
307
- DaffCartShippingInformationServiceInterface.prototype.get = function (cartId) { };
308
- /**
309
- * Update the currently selected shipping method of a cart.
310
- * @param {?} cartId
311
- * @param {?} shippingInfo
312
- * @return {?}
313
- */
314
- DaffCartShippingInformationServiceInterface.prototype.update = function (cartId, shippingInfo) { };
315
- /**
316
- * Remove the currently selected shipping method from a cart.
317
- * @param {?} cartId
318
- * @param {?=} id
319
- * @return {?}
320
- */
321
- DaffCartShippingInformationServiceInterface.prototype.delete = function (cartId, id) { };
322
- }
323
- /** @type {?} */
324
23
  var DaffCartShippingInformationDriver = new core.InjectionToken('DaffCartShippingInformationDriver');
325
24
 
326
- /**
327
- * @fileoverview added by tsickle
328
- * Generated from: interfaces/cart-shipping-methods-service.interface.ts
329
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
330
- */
331
- /**
332
- * The interface responsible for retrieving the available shipping methods of a cart.
333
- * @record
334
- * @template T
335
- */
336
- function DaffCartShippingMethodsServiceInterface() { }
337
- if (false) {
338
- /**
339
- * List the available shipping methods for a cart.
340
- * @param {?} cartId
341
- * @return {?}
342
- */
343
- DaffCartShippingMethodsServiceInterface.prototype.list = function (cartId) { };
344
- }
345
- /** @type {?} */
346
25
  var DaffCartShippingMethodsDriver = new core.InjectionToken('DaffCartShippingMethodsDriver');
347
26
 
348
- /**
349
- * @fileoverview added by tsickle
350
- * Generated from: interfaces/cart-order-service.interface.ts
351
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
352
- */
353
- /**
354
- * The interface responsible for placing an order for the customer's cart.
355
- * @record
356
- * @template T, V, R
357
- */
358
- function DaffCartOrderServiceInterface() { }
359
- if (false) {
360
- /**
361
- * Place an order and return the order ID.
362
- * @param {?} id
363
- * @param {?=} payment
364
- * @return {?}
365
- */
366
- DaffCartOrderServiceInterface.prototype.placeOrder = function (id, payment) { };
367
- }
368
- /** @type {?} */
369
27
  var DaffCartOrderDriver = new core.InjectionToken('DaffCartOrderDriver');
370
28
 
371
- /**
372
- * @fileoverview added by tsickle
373
- * Generated from: interfaces/public_api.ts
374
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
375
- */
29
+ // Drivers
376
30
 
377
- /**
378
- * @fileoverview added by tsickle
379
- * Generated from: errors/codes.enum.ts
380
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
381
- */
382
- /** @enum {string} */
383
- var DaffCartDriverErrorCodes = {
384
- CART_NOT_FOUND: "DAFF_CART_NOT_FOUND",
385
- PRODUCT_NOT_FOUND: "DAFF_PRODUCT_NOT_FOUND",
386
- PRODUCT_OUT_OF_STOCK: "DAFF_PRODUCT_OUT_OF_STOCK",
387
- INVALID_COUPON_CODE: "DAFF_INVALID_COUPON_CODE",
388
- INVALID_COUNTRY: "DAFF_INVALID_COUNTRY",
389
- INVALID_REGION: "DAFF_INVALID_REGION",
390
- INVALID_API_RESPONSE: "DAFF_INVALID_API_RESPONSE",
391
- EXPIRED_PAYMENT_METHOD: "DAFF_EXPIRED_PAYMENT_METHOD",
392
- };
31
+ (function (DaffCartDriverErrorCodes) {
32
+ DaffCartDriverErrorCodes["CART_NOT_FOUND"] = "DAFF_CART_NOT_FOUND";
33
+ DaffCartDriverErrorCodes["PRODUCT_NOT_FOUND"] = "DAFF_PRODUCT_NOT_FOUND";
34
+ DaffCartDriverErrorCodes["PRODUCT_OUT_OF_STOCK"] = "DAFF_PRODUCT_OUT_OF_STOCK";
35
+ DaffCartDriverErrorCodes["INVALID_COUPON_CODE"] = "DAFF_INVALID_COUPON_CODE";
36
+ DaffCartDriverErrorCodes["INVALID_COUNTRY"] = "DAFF_INVALID_COUNTRY";
37
+ DaffCartDriverErrorCodes["INVALID_REGION"] = "DAFF_INVALID_REGION";
38
+ DaffCartDriverErrorCodes["INVALID_API_RESPONSE"] = "DAFF_INVALID_API_RESPONSE";
39
+ DaffCartDriverErrorCodes["EXPIRED_PAYMENT_METHOD"] = "DAFF_EXPIRED_PAYMENT_METHOD";
40
+ })(exports.DaffCartDriverErrorCodes || (exports.DaffCartDriverErrorCodes = {}));
393
41
 
394
42
  /*! *****************************************************************************
395
43
  Copyright (c) Microsoft Corporation.
@@ -626,7 +274,7 @@
626
274
  ar[i] = from[i];
627
275
  }
628
276
  }
629
- return to.concat(ar || from);
277
+ return to.concat(ar || Array.prototype.slice.call(from));
630
278
  }
631
279
  function __await(v) {
632
280
  return this instanceof __await ? (this.v = v, this) : new __await(v);
@@ -715,20 +363,13 @@
715
363
  */
716
364
  var DaffCartNotFoundError = /** @class */ (function (_super) {
717
365
  __extends(DaffCartNotFoundError, _super);
718
- /**
719
- * @param {?=} message
720
- */
721
366
  function DaffCartNotFoundError(message) {
722
367
  var _this = _super.call(this, message) || this;
723
- _this.code = DaffCartDriverErrorCodes.CART_NOT_FOUND;
368
+ _this.code = exports.DaffCartDriverErrorCodes.CART_NOT_FOUND;
724
369
  return _this;
725
370
  }
726
371
  return DaffCartNotFoundError;
727
372
  }(core$1.DaffInheritableError));
728
- if (false) {
729
- /** @type {?} */
730
- DaffCartNotFoundError.prototype.code;
731
- }
732
373
 
733
374
  /**
734
375
  * An error thrown when the payment token used for the payment method update has expired.
@@ -737,23 +378,14 @@
737
378
  */
738
379
  var DaffCartExpiredPaymentTokenError = /** @class */ (function (_super) {
739
380
  __extends(DaffCartExpiredPaymentTokenError, _super);
740
- /**
741
- * @param {?} message
742
- */
743
381
  function DaffCartExpiredPaymentTokenError(message) {
744
382
  var _this = _super.call(this, message) || this;
745
383
  _this.message = message;
746
- _this.code = DaffCartDriverErrorCodes.EXPIRED_PAYMENT_METHOD;
384
+ _this.code = exports.DaffCartDriverErrorCodes.EXPIRED_PAYMENT_METHOD;
747
385
  return _this;
748
386
  }
749
387
  return DaffCartExpiredPaymentTokenError;
750
388
  }(core$1.DaffInheritableError));
751
- if (false) {
752
- /** @type {?} */
753
- DaffCartExpiredPaymentTokenError.prototype.code;
754
- /** @type {?} */
755
- DaffCartExpiredPaymentTokenError.prototype.message;
756
- }
757
389
 
758
390
  /**
759
391
  * An error thrown when the platform's API response is missing required information
@@ -761,23 +393,14 @@
761
393
  */
762
394
  var DaffCartInvalidAPIResponseError = /** @class */ (function (_super) {
763
395
  __extends(DaffCartInvalidAPIResponseError, _super);
764
- /**
765
- * @param {?} message
766
- */
767
396
  function DaffCartInvalidAPIResponseError(message) {
768
397
  var _this = _super.call(this, message) || this;
769
398
  _this.message = message;
770
- _this.code = DaffCartDriverErrorCodes.INVALID_API_RESPONSE;
399
+ _this.code = exports.DaffCartDriverErrorCodes.INVALID_API_RESPONSE;
771
400
  return _this;
772
401
  }
773
402
  return DaffCartInvalidAPIResponseError;
774
403
  }(core$1.DaffInheritableError));
775
- if (false) {
776
- /** @type {?} */
777
- DaffCartInvalidAPIResponseError.prototype.code;
778
- /** @type {?} */
779
- DaffCartInvalidAPIResponseError.prototype.message;
780
- }
781
404
 
782
405
  /**
783
406
  * An error thrown when the specified country is invalid for the specified address
@@ -785,20 +408,13 @@
785
408
  */
786
409
  var DaffInvalidCountryError = /** @class */ (function (_super) {
787
410
  __extends(DaffInvalidCountryError, _super);
788
- /**
789
- * @param {?=} message
790
- */
791
411
  function DaffInvalidCountryError(message) {
792
412
  var _this = _super.call(this, message) || this;
793
- _this.code = DaffCartDriverErrorCodes.INVALID_COUNTRY;
413
+ _this.code = exports.DaffCartDriverErrorCodes.INVALID_COUNTRY;
794
414
  return _this;
795
415
  }
796
416
  return DaffInvalidCountryError;
797
417
  }(core$1.DaffInheritableError));
798
- if (false) {
799
- /** @type {?} */
800
- DaffInvalidCountryError.prototype.code;
801
- }
802
418
 
803
419
  /**
804
420
  * An error thrown when the specified coupon code cannot be applied to the cart.
@@ -806,24 +422,14 @@
806
422
  */
807
423
  var DaffInvalidCouponCodeError = /** @class */ (function (_super) {
808
424
  __extends(DaffInvalidCouponCodeError, _super);
809
- /**
810
- * @param {?=} message
811
- * @param {?=} coupon
812
- */
813
425
  function DaffInvalidCouponCodeError(message, coupon) {
814
426
  var _this = _super.call(this, message) || this;
815
427
  _this.coupon = coupon;
816
- _this.code = DaffCartDriverErrorCodes.INVALID_COUPON_CODE;
428
+ _this.code = exports.DaffCartDriverErrorCodes.INVALID_COUPON_CODE;
817
429
  return _this;
818
430
  }
819
431
  return DaffInvalidCouponCodeError;
820
432
  }(core$1.DaffInheritableError));
821
- if (false) {
822
- /** @type {?} */
823
- DaffInvalidCouponCodeError.prototype.code;
824
- /** @type {?} */
825
- DaffInvalidCouponCodeError.prototype.coupon;
826
- }
827
433
 
828
434
  /**
829
435
  * An error thrown when the specified region is invalid for the specified address
@@ -831,20 +437,13 @@
831
437
  */
832
438
  var DaffInvalidRegionError = /** @class */ (function (_super) {
833
439
  __extends(DaffInvalidRegionError, _super);
834
- /**
835
- * @param {?=} message
836
- */
837
440
  function DaffInvalidRegionError(message) {
838
441
  var _this = _super.call(this, message) || this;
839
- _this.code = DaffCartDriverErrorCodes.INVALID_REGION;
442
+ _this.code = exports.DaffCartDriverErrorCodes.INVALID_REGION;
840
443
  return _this;
841
444
  }
842
445
  return DaffInvalidRegionError;
843
446
  }(core$1.DaffInheritableError));
844
- if (false) {
845
- /** @type {?} */
846
- DaffInvalidRegionError.prototype.code;
847
- }
848
447
 
849
448
  /**
850
449
  * An error thrown when an add to cart request is sent
@@ -852,20 +451,13 @@
852
451
  */
853
452
  var DaffProductNotFoundError = /** @class */ (function (_super) {
854
453
  __extends(DaffProductNotFoundError, _super);
855
- /**
856
- * @param {?=} message
857
- */
858
454
  function DaffProductNotFoundError(message) {
859
455
  var _this = _super.call(this, message) || this;
860
- _this.code = DaffCartDriverErrorCodes.PRODUCT_NOT_FOUND;
456
+ _this.code = exports.DaffCartDriverErrorCodes.PRODUCT_NOT_FOUND;
861
457
  return _this;
862
458
  }
863
459
  return DaffProductNotFoundError;
864
460
  }(core$1.DaffInheritableError));
865
- if (false) {
866
- /** @type {?} */
867
- DaffProductNotFoundError.prototype.code;
868
- }
869
461
 
870
462
  /**
871
463
  * An error thrown when a cart item's requested quantity
@@ -873,66 +465,37 @@
873
465
  */
874
466
  var DaffProductOutOfStockError = /** @class */ (function (_super) {
875
467
  __extends(DaffProductOutOfStockError, _super);
876
- /**
877
- * @param {?=} message
878
- */
879
468
  function DaffProductOutOfStockError(message) {
880
469
  var _this = _super.call(this, message) || this;
881
- _this.code = DaffCartDriverErrorCodes.PRODUCT_OUT_OF_STOCK;
470
+ _this.code = exports.DaffCartDriverErrorCodes.PRODUCT_OUT_OF_STOCK;
882
471
  return _this;
883
472
  }
884
473
  return DaffProductOutOfStockError;
885
474
  }(core$1.DaffInheritableError));
886
- if (false) {
887
- /** @type {?} */
888
- DaffProductOutOfStockError.prototype.code;
889
- }
890
475
 
891
476
  var _a;
892
477
  /**
893
478
  * A mapping from error codes to error class constructors.
894
- * @type {?}
895
479
  */
896
480
  var DaffCartDriverErrorMap = (_a = {},
897
- _a[DaffCartDriverErrorCodes.CART_NOT_FOUND] = DaffCartNotFoundError,
898
- _a[DaffCartDriverErrorCodes.PRODUCT_NOT_FOUND] = DaffProductNotFoundError,
899
- _a[DaffCartDriverErrorCodes.PRODUCT_OUT_OF_STOCK] = DaffProductOutOfStockError,
900
- _a[DaffCartDriverErrorCodes.INVALID_COUPON_CODE] = DaffInvalidCouponCodeError,
901
- _a[DaffCartDriverErrorCodes.INVALID_COUNTRY] = DaffInvalidCountryError,
902
- _a[DaffCartDriverErrorCodes.INVALID_REGION] = DaffInvalidRegionError,
903
- _a[DaffCartDriverErrorCodes.INVALID_API_RESPONSE] = DaffCartInvalidAPIResponseError,
904
- _a[DaffCartDriverErrorCodes.EXPIRED_PAYMENT_METHOD] = DaffCartExpiredPaymentTokenError,
481
+ _a[exports.DaffCartDriverErrorCodes.CART_NOT_FOUND] = DaffCartNotFoundError,
482
+ _a[exports.DaffCartDriverErrorCodes.PRODUCT_NOT_FOUND] = DaffProductNotFoundError,
483
+ _a[exports.DaffCartDriverErrorCodes.PRODUCT_OUT_OF_STOCK] = DaffProductOutOfStockError,
484
+ _a[exports.DaffCartDriverErrorCodes.INVALID_COUPON_CODE] = DaffInvalidCouponCodeError,
485
+ _a[exports.DaffCartDriverErrorCodes.INVALID_COUNTRY] = DaffInvalidCountryError,
486
+ _a[exports.DaffCartDriverErrorCodes.INVALID_REGION] = DaffInvalidRegionError,
487
+ _a[exports.DaffCartDriverErrorCodes.INVALID_API_RESPONSE] = DaffCartInvalidAPIResponseError,
488
+ _a[exports.DaffCartDriverErrorCodes.EXPIRED_PAYMENT_METHOD] = DaffCartExpiredPaymentTokenError,
905
489
  _a);
906
490
 
907
491
  /**
908
- * @fileoverview added by tsickle
909
- * Generated from: errors/public_api.ts
910
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
911
- */
912
-
913
- /**
914
- * @fileoverview added by tsickle
915
- * Generated from: public_api.ts
916
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
917
- */
918
-
919
- /**
920
- * @fileoverview added by tsickle
921
- * Generated from: index.ts
922
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
923
- */
924
-
925
- /**
926
- * @fileoverview added by tsickle
927
- * Generated from: daffodil-cart-driver.ts
928
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
492
+ * Generated bundle index. Do not edit.
929
493
  */
930
494
 
931
495
  exports.DaffCartAddressDriver = DaffCartAddressDriver;
932
496
  exports.DaffCartBillingAddressDriver = DaffCartBillingAddressDriver;
933
497
  exports.DaffCartCouponDriver = DaffCartCouponDriver;
934
498
  exports.DaffCartDriver = DaffCartDriver;
935
- exports.DaffCartDriverErrorCodes = DaffCartDriverErrorCodes;
936
499
  exports.DaffCartDriverErrorMap = DaffCartDriverErrorMap;
937
500
  exports.DaffCartExpiredPaymentTokenError = DaffCartExpiredPaymentTokenError;
938
501
  exports.DaffCartInvalidAPIResponseError = DaffCartInvalidAPIResponseError;