@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
@@ -5,17 +5,9 @@
5
5
  }(this, (function (exports, i1, i0, rxjs, operators, driver, common, angularInMemoryWebApi, i1$1) { 'use strict';
6
6
 
7
7
  /**
8
- * @fileoverview added by tsickle
9
- * Generated from: drivers/cart/cart.service.ts
10
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11
- */
12
- /**
13
- * \@inheritdoc
8
+ * @inheritdoc
14
9
  */
15
10
  var DaffInMemoryCartService = /** @class */ (function () {
16
- /**
17
- * @param {?} http
18
- */
19
11
  function DaffInMemoryCartService(http) {
20
12
  this.http = http;
21
13
  /**
@@ -23,45 +15,21 @@
23
15
  */
24
16
  this.url = '/api/cart';
25
17
  }
26
- /**
27
- * @param {?} cartId
28
- * @return {?}
29
- */
30
18
  DaffInMemoryCartService.prototype.get = function (cartId) {
31
- return this.http.get(this.url + "/" + cartId).pipe(operators.catchError(( /**
32
- * @param {?} error
33
- * @return {?}
34
- */function (error) { return rxjs.throwError(new driver.DaffCartNotFoundError(error.message)); })), operators.map(( /**
35
- * @param {?} result
36
- * @return {?}
37
- */function (/**
38
- * @param {?} result
39
- * @return {?}
40
- */ result) { return result; })));
19
+ return this.http.get(this.url + "/" + cartId).pipe(operators.catchError(function (error) { return rxjs.throwError(new driver.DaffCartNotFoundError(error.message)); }), operators.map(function (result) { return result; }));
41
20
  };
42
- /**
43
- * @param {?} productId
44
- * @param {?} qty
45
- * @return {?}
46
- */
47
21
  DaffInMemoryCartService.prototype.addToCart = function (productId, qty) {
48
22
  return this.http.post(this.url + '/addToCart', { productId: productId, qty: qty });
49
23
  };
50
- /**
51
- * @param {?} cartId
52
- * @return {?}
53
- */
54
24
  DaffInMemoryCartService.prototype.clear = function (cartId) {
55
25
  return this.http.post(this.url + "/" + cartId + "/clear", {});
56
26
  };
57
- /**
58
- * @return {?}
59
- */
60
27
  DaffInMemoryCartService.prototype.create = function () {
61
28
  return this.http.post(this.url, {});
62
29
  };
63
30
  return DaffInMemoryCartService;
64
31
  }());
32
+ /** @nocollapse */ DaffInMemoryCartService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartService_Factory() { return new DaffInMemoryCartService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartService, providedIn: "root" });
65
33
  DaffInMemoryCartService.decorators = [
66
34
  { type: i0.Injectable, args: [{
67
35
  providedIn: 'root',
@@ -71,32 +39,11 @@
71
39
  DaffInMemoryCartService.ctorParameters = function () { return [
72
40
  { type: i1.HttpClient }
73
41
  ]; };
74
- /** @nocollapse */ DaffInMemoryCartService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartService_Factory() { return new DaffInMemoryCartService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartService, providedIn: "root" });
75
- if (false) {
76
- /**
77
- * The URL with which the driver makes calls to the backend.
78
- * @type {?}
79
- */
80
- DaffInMemoryCartService.prototype.url;
81
- /**
82
- * @type {?}
83
- * @private
84
- */
85
- DaffInMemoryCartService.prototype.http;
86
- }
87
42
 
88
43
  /**
89
- * @fileoverview added by tsickle
90
- * Generated from: drivers/cart-item/cart-item.service.ts
91
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
92
- */
93
- /**
94
- * \@inheritdoc
44
+ * @inheritdoc
95
45
  */
96
46
  var DaffInMemoryCartItemService = /** @class */ (function () {
97
- /**
98
- * @param {?} http
99
- */
100
47
  function DaffInMemoryCartItemService(http) {
101
48
  this.http = http;
102
49
  /**
@@ -104,48 +51,24 @@
104
51
  */
105
52
  this.url = '/api/cart-items';
106
53
  }
107
- /**
108
- * @param {?} cartId
109
- * @return {?}
110
- */
111
54
  DaffInMemoryCartItemService.prototype.list = function (cartId) {
112
55
  return this.http.get(this.url + "/" + cartId + "/");
113
56
  };
114
- /**
115
- * @param {?} cartId
116
- * @param {?} itemId
117
- * @return {?}
118
- */
119
57
  DaffInMemoryCartItemService.prototype.get = function (cartId, itemId) {
120
58
  return this.http.get(this.url + "/" + cartId + "/" + itemId);
121
59
  };
122
- /**
123
- * @param {?} cartId
124
- * @param {?} input
125
- * @return {?}
126
- */
127
60
  DaffInMemoryCartItemService.prototype.add = function (cartId, input) {
128
61
  return this.http.post(this.url + "/" + cartId + "/", input);
129
62
  };
130
- /**
131
- * @param {?} cartId
132
- * @param {?} itemId
133
- * @param {?} item
134
- * @return {?}
135
- */
136
63
  DaffInMemoryCartItemService.prototype.update = function (cartId, itemId, item) {
137
64
  return this.http.put(this.url + "/" + cartId + "/" + itemId, item);
138
65
  };
139
- /**
140
- * @param {?} cartId
141
- * @param {?} itemId
142
- * @return {?}
143
- */
144
66
  DaffInMemoryCartItemService.prototype.delete = function (cartId, itemId) {
145
67
  return this.http.delete(this.url + "/" + cartId + "/" + itemId);
146
68
  };
147
69
  return DaffInMemoryCartItemService;
148
70
  }());
71
+ /** @nocollapse */ DaffInMemoryCartItemService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartItemService_Factory() { return new DaffInMemoryCartItemService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartItemService, providedIn: "root" });
149
72
  DaffInMemoryCartItemService.decorators = [
150
73
  { type: i0.Injectable, args: [{
151
74
  providedIn: 'root',
@@ -155,32 +78,11 @@
155
78
  DaffInMemoryCartItemService.ctorParameters = function () { return [
156
79
  { type: i1.HttpClient }
157
80
  ]; };
158
- /** @nocollapse */ DaffInMemoryCartItemService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartItemService_Factory() { return new DaffInMemoryCartItemService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartItemService, providedIn: "root" });
159
- if (false) {
160
- /**
161
- * The URL with which the driver makes calls to the backend.
162
- * @type {?}
163
- */
164
- DaffInMemoryCartItemService.prototype.url;
165
- /**
166
- * @type {?}
167
- * @private
168
- */
169
- DaffInMemoryCartItemService.prototype.http;
170
- }
171
81
 
172
82
  /**
173
- * @fileoverview added by tsickle
174
- * Generated from: drivers/cart-billing-address/cart-billing-address.service.ts
175
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
176
- */
177
- /**
178
- * \@inheritdoc
83
+ * @inheritdoc
179
84
  */
180
85
  var DaffInMemoryCartBillingAddressService = /** @class */ (function () {
181
- /**
182
- * @param {?} http
183
- */
184
86
  function DaffInMemoryCartBillingAddressService(http) {
185
87
  this.http = http;
186
88
  /**
@@ -188,23 +90,15 @@
188
90
  */
189
91
  this.url = '/api/cart-billing-address';
190
92
  }
191
- /**
192
- * @param {?} cartId
193
- * @return {?}
194
- */
195
93
  DaffInMemoryCartBillingAddressService.prototype.get = function (cartId) {
196
94
  return this.http.get(this.url + "/" + cartId);
197
95
  };
198
- /**
199
- * @param {?} cartId
200
- * @param {?} address
201
- * @return {?}
202
- */
203
96
  DaffInMemoryCartBillingAddressService.prototype.update = function (cartId, address) {
204
97
  return this.http.put(this.url + "/" + cartId, address);
205
98
  };
206
99
  return DaffInMemoryCartBillingAddressService;
207
100
  }());
101
+ /** @nocollapse */ DaffInMemoryCartBillingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartBillingAddressService_Factory() { return new DaffInMemoryCartBillingAddressService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartBillingAddressService, providedIn: "root" });
208
102
  DaffInMemoryCartBillingAddressService.decorators = [
209
103
  { type: i0.Injectable, args: [{
210
104
  providedIn: 'root',
@@ -214,32 +108,11 @@
214
108
  DaffInMemoryCartBillingAddressService.ctorParameters = function () { return [
215
109
  { type: i1.HttpClient }
216
110
  ]; };
217
- /** @nocollapse */ DaffInMemoryCartBillingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartBillingAddressService_Factory() { return new DaffInMemoryCartBillingAddressService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartBillingAddressService, providedIn: "root" });
218
- if (false) {
219
- /**
220
- * The URL with which the driver makes calls to the backend.
221
- * @type {?}
222
- */
223
- DaffInMemoryCartBillingAddressService.prototype.url;
224
- /**
225
- * @type {?}
226
- * @private
227
- */
228
- DaffInMemoryCartBillingAddressService.prototype.http;
229
- }
230
111
 
231
112
  /**
232
- * @fileoverview added by tsickle
233
- * Generated from: drivers/cart-payment/cart-payment.service.ts
234
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
235
- */
236
- /**
237
- * \@inheritdoc
113
+ * @inheritdoc
238
114
  */
239
115
  var DaffInMemoryCartPaymentService = /** @class */ (function () {
240
- /**
241
- * @param {?} http
242
- */
243
116
  function DaffInMemoryCartPaymentService(http) {
244
117
  this.http = http;
245
118
  /**
@@ -247,39 +120,21 @@
247
120
  */
248
121
  this.url = '/api/cart-payment';
249
122
  }
250
- /**
251
- * @param {?} cartId
252
- * @return {?}
253
- */
254
123
  DaffInMemoryCartPaymentService.prototype.get = function (cartId) {
255
124
  return this.http.get(this.url + "/" + cartId);
256
125
  };
257
- /**
258
- * @param {?} cartId
259
- * @param {?} payment
260
- * @return {?}
261
- */
262
126
  DaffInMemoryCartPaymentService.prototype.update = function (cartId, payment) {
263
127
  return this.http.put(this.url + "/" + cartId, { payment: payment });
264
128
  };
265
- /**
266
- * @param {?} cartId
267
- * @param {?} payment
268
- * @param {?} address
269
- * @return {?}
270
- */
271
129
  DaffInMemoryCartPaymentService.prototype.updateWithBilling = function (cartId, payment, address) {
272
130
  return this.http.put(this.url + "/" + cartId, { payment: payment, address: address });
273
131
  };
274
- /**
275
- * @param {?} cartId
276
- * @return {?}
277
- */
278
132
  DaffInMemoryCartPaymentService.prototype.remove = function (cartId) {
279
133
  return this.http.delete(this.url + "/" + cartId);
280
134
  };
281
135
  return DaffInMemoryCartPaymentService;
282
136
  }());
137
+ /** @nocollapse */ DaffInMemoryCartPaymentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartPaymentService_Factory() { return new DaffInMemoryCartPaymentService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartPaymentService, providedIn: "root" });
283
138
  DaffInMemoryCartPaymentService.decorators = [
284
139
  { type: i0.Injectable, args: [{
285
140
  providedIn: 'root',
@@ -289,32 +144,11 @@
289
144
  DaffInMemoryCartPaymentService.ctorParameters = function () { return [
290
145
  { type: i1.HttpClient }
291
146
  ]; };
292
- /** @nocollapse */ DaffInMemoryCartPaymentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartPaymentService_Factory() { return new DaffInMemoryCartPaymentService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartPaymentService, providedIn: "root" });
293
- if (false) {
294
- /**
295
- * The URL with which the driver makes calls to the backend.
296
- * @type {?}
297
- */
298
- DaffInMemoryCartPaymentService.prototype.url;
299
- /**
300
- * @type {?}
301
- * @private
302
- */
303
- DaffInMemoryCartPaymentService.prototype.http;
304
- }
305
147
 
306
148
  /**
307
- * @fileoverview added by tsickle
308
- * Generated from: drivers/cart-payment-methods/cart-payment-methods.service.ts
309
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
310
- */
311
- /**
312
- * \@inheritdoc
149
+ * @inheritdoc
313
150
  */
314
151
  var DaffInMemoryCartPaymentMethodsService = /** @class */ (function () {
315
- /**
316
- * @param {?} http
317
- */
318
152
  function DaffInMemoryCartPaymentMethodsService(http) {
319
153
  this.http = http;
320
154
  /**
@@ -322,15 +156,12 @@
322
156
  */
323
157
  this.url = '/api/cart-payment-methods';
324
158
  }
325
- /**
326
- * @param {?} cartId
327
- * @return {?}
328
- */
329
159
  DaffInMemoryCartPaymentMethodsService.prototype.list = function (cartId) {
330
160
  return this.http.get(this.url + "/" + cartId);
331
161
  };
332
162
  return DaffInMemoryCartPaymentMethodsService;
333
163
  }());
164
+ /** @nocollapse */ DaffInMemoryCartPaymentMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartPaymentMethodsService_Factory() { return new DaffInMemoryCartPaymentMethodsService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartPaymentMethodsService, providedIn: "root" });
334
165
  DaffInMemoryCartPaymentMethodsService.decorators = [
335
166
  { type: i0.Injectable, args: [{
336
167
  providedIn: 'root',
@@ -340,32 +171,11 @@
340
171
  DaffInMemoryCartPaymentMethodsService.ctorParameters = function () { return [
341
172
  { type: i1.HttpClient }
342
173
  ]; };
343
- /** @nocollapse */ DaffInMemoryCartPaymentMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartPaymentMethodsService_Factory() { return new DaffInMemoryCartPaymentMethodsService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartPaymentMethodsService, providedIn: "root" });
344
- if (false) {
345
- /**
346
- * The URL with which the driver makes calls to the backend.
347
- * @type {?}
348
- */
349
- DaffInMemoryCartPaymentMethodsService.prototype.url;
350
- /**
351
- * @type {?}
352
- * @private
353
- */
354
- DaffInMemoryCartPaymentMethodsService.prototype.http;
355
- }
356
174
 
357
175
  /**
358
- * @fileoverview added by tsickle
359
- * Generated from: drivers/cart-shipping-address/cart-shipping-address.service.ts
360
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
361
- */
362
- /**
363
- * \@inheritdoc
176
+ * @inheritdoc
364
177
  */
365
178
  var DaffInMemoryCartShippingAddressService = /** @class */ (function () {
366
- /**
367
- * @param {?} http
368
- */
369
179
  function DaffInMemoryCartShippingAddressService(http) {
370
180
  this.http = http;
371
181
  /**
@@ -373,23 +183,15 @@
373
183
  */
374
184
  this.url = '/api/cart-shipping-address';
375
185
  }
376
- /**
377
- * @param {?} cartId
378
- * @return {?}
379
- */
380
186
  DaffInMemoryCartShippingAddressService.prototype.get = function (cartId) {
381
187
  return this.http.get(this.url + "/" + cartId);
382
188
  };
383
- /**
384
- * @param {?} cartId
385
- * @param {?} address
386
- * @return {?}
387
- */
388
189
  DaffInMemoryCartShippingAddressService.prototype.update = function (cartId, address) {
389
190
  return this.http.put(this.url + "/" + cartId, address);
390
191
  };
391
192
  return DaffInMemoryCartShippingAddressService;
392
193
  }());
194
+ /** @nocollapse */ DaffInMemoryCartShippingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingAddressService_Factory() { return new DaffInMemoryCartShippingAddressService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartShippingAddressService, providedIn: "root" });
393
195
  DaffInMemoryCartShippingAddressService.decorators = [
394
196
  { type: i0.Injectable, args: [{
395
197
  providedIn: 'root',
@@ -399,32 +201,11 @@
399
201
  DaffInMemoryCartShippingAddressService.ctorParameters = function () { return [
400
202
  { type: i1.HttpClient }
401
203
  ]; };
402
- /** @nocollapse */ DaffInMemoryCartShippingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingAddressService_Factory() { return new DaffInMemoryCartShippingAddressService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartShippingAddressService, providedIn: "root" });
403
- if (false) {
404
- /**
405
- * The URL with which the driver makes calls to the backend.
406
- * @type {?}
407
- */
408
- DaffInMemoryCartShippingAddressService.prototype.url;
409
- /**
410
- * @type {?}
411
- * @private
412
- */
413
- DaffInMemoryCartShippingAddressService.prototype.http;
414
- }
415
204
 
416
205
  /**
417
- * @fileoverview added by tsickle
418
- * Generated from: drivers/cart-shipping-information/cart-shipping-information.service.ts
419
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
420
- */
421
- /**
422
- * \@inheritdoc
206
+ * @inheritdoc
423
207
  */
424
208
  var DaffInMemoryCartShippingInformationService = /** @class */ (function () {
425
- /**
426
- * @param {?} http
427
- */
428
209
  function DaffInMemoryCartShippingInformationService(http) {
429
210
  this.http = http;
430
211
  /**
@@ -432,30 +213,18 @@
432
213
  */
433
214
  this.url = '/api/cart-shipping-information';
434
215
  }
435
- /**
436
- * @param {?} cartId
437
- * @return {?}
438
- */
439
216
  DaffInMemoryCartShippingInformationService.prototype.get = function (cartId) {
440
217
  return this.http.get(this.url + "/" + cartId);
441
218
  };
442
- /**
443
- * @param {?} cartId
444
- * @param {?} info
445
- * @return {?}
446
- */
447
219
  DaffInMemoryCartShippingInformationService.prototype.update = function (cartId, info) {
448
220
  return this.http.put(this.url + "/" + cartId, info);
449
221
  };
450
- /**
451
- * @param {?} cartId
452
- * @return {?}
453
- */
454
222
  DaffInMemoryCartShippingInformationService.prototype.delete = function (cartId) {
455
223
  return this.http.delete(this.url + "/" + cartId);
456
224
  };
457
225
  return DaffInMemoryCartShippingInformationService;
458
226
  }());
227
+ /** @nocollapse */ DaffInMemoryCartShippingInformationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingInformationService_Factory() { return new DaffInMemoryCartShippingInformationService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartShippingInformationService, providedIn: "root" });
459
228
  DaffInMemoryCartShippingInformationService.decorators = [
460
229
  { type: i0.Injectable, args: [{
461
230
  providedIn: 'root',
@@ -465,32 +234,11 @@
465
234
  DaffInMemoryCartShippingInformationService.ctorParameters = function () { return [
466
235
  { type: i1.HttpClient }
467
236
  ]; };
468
- /** @nocollapse */ DaffInMemoryCartShippingInformationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingInformationService_Factory() { return new DaffInMemoryCartShippingInformationService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartShippingInformationService, providedIn: "root" });
469
- if (false) {
470
- /**
471
- * The URL with which the driver makes calls to the backend.
472
- * @type {?}
473
- */
474
- DaffInMemoryCartShippingInformationService.prototype.url;
475
- /**
476
- * @type {?}
477
- * @private
478
- */
479
- DaffInMemoryCartShippingInformationService.prototype.http;
480
- }
481
237
 
482
238
  /**
483
- * @fileoverview added by tsickle
484
- * Generated from: drivers/cart-shipping-methods/cart-shipping-methods.service.ts
485
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
486
- */
487
- /**
488
- * \@inheritdoc
239
+ * @inheritdoc
489
240
  */
490
241
  var DaffInMemoryCartShippingMethodsService = /** @class */ (function () {
491
- /**
492
- * @param {?} http
493
- */
494
242
  function DaffInMemoryCartShippingMethodsService(http) {
495
243
  this.http = http;
496
244
  /**
@@ -498,15 +246,12 @@
498
246
  */
499
247
  this.url = '/api/cart-shipping-methods';
500
248
  }
501
- /**
502
- * @param {?} cartId
503
- * @return {?}
504
- */
505
249
  DaffInMemoryCartShippingMethodsService.prototype.list = function (cartId) {
506
250
  return this.http.get(this.url + "/" + cartId);
507
251
  };
508
252
  return DaffInMemoryCartShippingMethodsService;
509
253
  }());
254
+ /** @nocollapse */ DaffInMemoryCartShippingMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingMethodsService_Factory() { return new DaffInMemoryCartShippingMethodsService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartShippingMethodsService, providedIn: "root" });
510
255
  DaffInMemoryCartShippingMethodsService.decorators = [
511
256
  { type: i0.Injectable, args: [{
512
257
  providedIn: 'root',
@@ -516,32 +261,11 @@
516
261
  DaffInMemoryCartShippingMethodsService.ctorParameters = function () { return [
517
262
  { type: i1.HttpClient }
518
263
  ]; };
519
- /** @nocollapse */ DaffInMemoryCartShippingMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingMethodsService_Factory() { return new DaffInMemoryCartShippingMethodsService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartShippingMethodsService, providedIn: "root" });
520
- if (false) {
521
- /**
522
- * The URL with which the driver makes calls to the backend.
523
- * @type {?}
524
- */
525
- DaffInMemoryCartShippingMethodsService.prototype.url;
526
- /**
527
- * @type {?}
528
- * @private
529
- */
530
- DaffInMemoryCartShippingMethodsService.prototype.http;
531
- }
532
264
 
533
265
  /**
534
- * @fileoverview added by tsickle
535
- * Generated from: drivers/cart-order/cart-order.service.ts
536
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
537
- */
538
- /**
539
- * \@inheritdoc
266
+ * @inheritdoc
540
267
  */
541
268
  var DaffInMemoryCartOrderService = /** @class */ (function () {
542
- /**
543
- * @param {?} http
544
- */
545
269
  function DaffInMemoryCartOrderService(http) {
546
270
  this.http = http;
547
271
  /**
@@ -549,16 +273,12 @@
549
273
  */
550
274
  this.url = '/api/cart-order';
551
275
  }
552
- /**
553
- * @param {?} cartId
554
- * @param {?=} payment
555
- * @return {?}
556
- */
557
276
  DaffInMemoryCartOrderService.prototype.placeOrder = function (cartId, payment) {
558
277
  return this.http.post(this.url + "/" + cartId + "/", { payment: payment });
559
278
  };
560
279
  return DaffInMemoryCartOrderService;
561
280
  }());
281
+ /** @nocollapse */ DaffInMemoryCartOrderService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartOrderService_Factory() { return new DaffInMemoryCartOrderService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartOrderService, providedIn: "root" });
562
282
  DaffInMemoryCartOrderService.decorators = [
563
283
  { type: i0.Injectable, args: [{
564
284
  providedIn: 'root',
@@ -568,32 +288,11 @@
568
288
  DaffInMemoryCartOrderService.ctorParameters = function () { return [
569
289
  { type: i1.HttpClient }
570
290
  ]; };
571
- /** @nocollapse */ DaffInMemoryCartOrderService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartOrderService_Factory() { return new DaffInMemoryCartOrderService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartOrderService, providedIn: "root" });
572
- if (false) {
573
- /**
574
- * The URL with which the driver makes calls to the backend.
575
- * @type {?}
576
- */
577
- DaffInMemoryCartOrderService.prototype.url;
578
- /**
579
- * @type {?}
580
- * @private
581
- */
582
- DaffInMemoryCartOrderService.prototype.http;
583
- }
584
291
 
585
292
  /**
586
- * @fileoverview added by tsickle
587
- * Generated from: drivers/cart-coupon/cart-coupon.service.ts
588
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
589
- */
590
- /**
591
- * \@inheritdoc
293
+ * @inheritdoc
592
294
  */
593
295
  var DaffInMemoryCartCouponService = /** @class */ (function () {
594
- /**
595
- * @param {?} http
596
- */
597
296
  function DaffInMemoryCartCouponService(http) {
598
297
  this.http = http;
599
298
  /**
@@ -601,38 +300,21 @@
601
300
  */
602
301
  this.url = '/api/cart-coupon';
603
302
  }
604
- /**
605
- * @param {?} cartId
606
- * @return {?}
607
- */
608
303
  DaffInMemoryCartCouponService.prototype.list = function (cartId) {
609
304
  return this.http.get(this.url + "/" + cartId + "/");
610
305
  };
611
- /**
612
- * @param {?} cartId
613
- * @param {?} coupon
614
- * @return {?}
615
- */
616
306
  DaffInMemoryCartCouponService.prototype.apply = function (cartId, coupon) {
617
307
  return this.http.post(this.url + "/" + cartId + "/", coupon);
618
308
  };
619
- /**
620
- * @param {?} cartId
621
- * @param {?} coupon
622
- * @return {?}
623
- */
624
309
  DaffInMemoryCartCouponService.prototype.remove = function (cartId, coupon) {
625
310
  return this.http.delete(this.url + "/" + cartId + "/" + coupon.code);
626
311
  };
627
- /**
628
- * @param {?} cartId
629
- * @return {?}
630
- */
631
312
  DaffInMemoryCartCouponService.prototype.removeAll = function (cartId) {
632
313
  return this.http.delete(this.url + "/" + cartId + "/");
633
314
  };
634
315
  return DaffInMemoryCartCouponService;
635
316
  }());
317
+ /** @nocollapse */ DaffInMemoryCartCouponService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartCouponService_Factory() { return new DaffInMemoryCartCouponService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartCouponService, providedIn: "root" });
636
318
  DaffInMemoryCartCouponService.decorators = [
637
319
  { type: i0.Injectable, args: [{
638
320
  providedIn: 'root',
@@ -642,32 +324,11 @@
642
324
  DaffInMemoryCartCouponService.ctorParameters = function () { return [
643
325
  { type: i1.HttpClient }
644
326
  ]; };
645
- /** @nocollapse */ DaffInMemoryCartCouponService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartCouponService_Factory() { return new DaffInMemoryCartCouponService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartCouponService, providedIn: "root" });
646
- if (false) {
647
- /**
648
- * The URL with which the driver makes calls to the backend.
649
- * @type {?}
650
- */
651
- DaffInMemoryCartCouponService.prototype.url;
652
- /**
653
- * @type {?}
654
- * @private
655
- */
656
- DaffInMemoryCartCouponService.prototype.http;
657
- }
658
327
 
659
328
  /**
660
- * @fileoverview added by tsickle
661
- * Generated from: drivers/cart-address/cart-address.service.ts
662
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
663
- */
664
- /**
665
- * \@inheritdoc
329
+ * @inheritdoc
666
330
  */
667
331
  var DaffInMemoryCartAddressService = /** @class */ (function () {
668
- /**
669
- * @param {?} http
670
- */
671
332
  function DaffInMemoryCartAddressService(http) {
672
333
  this.http = http;
673
334
  /**
@@ -675,16 +336,12 @@
675
336
  */
676
337
  this.url = '/api/cart-address';
677
338
  }
678
- /**
679
- * @param {?} cartId
680
- * @param {?} address
681
- * @return {?}
682
- */
683
339
  DaffInMemoryCartAddressService.prototype.update = function (cartId, address) {
684
340
  return this.http.put(this.url + "/" + cartId, address);
685
341
  };
686
342
  return DaffInMemoryCartAddressService;
687
343
  }());
344
+ /** @nocollapse */ DaffInMemoryCartAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartAddressService_Factory() { return new DaffInMemoryCartAddressService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartAddressService, providedIn: "root" });
688
345
  DaffInMemoryCartAddressService.decorators = [
689
346
  { type: i0.Injectable, args: [{
690
347
  providedIn: 'root',
@@ -694,31 +351,10 @@
694
351
  DaffInMemoryCartAddressService.ctorParameters = function () { return [
695
352
  { type: i1.HttpClient }
696
353
  ]; };
697
- /** @nocollapse */ DaffInMemoryCartAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryCartAddressService_Factory() { return new DaffInMemoryCartAddressService(i0.ɵɵinject(i1.HttpClient)); }, token: DaffInMemoryCartAddressService, providedIn: "root" });
698
- if (false) {
699
- /**
700
- * The URL with which the driver makes calls to the backend.
701
- * @type {?}
702
- */
703
- DaffInMemoryCartAddressService.prototype.url;
704
- /**
705
- * @type {?}
706
- * @private
707
- */
708
- DaffInMemoryCartAddressService.prototype.http;
709
- }
710
354
 
711
- /**
712
- * @fileoverview added by tsickle
713
- * Generated from: drivers/cart-driver.module.ts
714
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
715
- */
716
355
  var DaffCartInMemoryDriverModule = /** @class */ (function () {
717
356
  function DaffCartInMemoryDriverModule() {
718
357
  }
719
- /**
720
- * @return {?}
721
- */
722
358
  DaffCartInMemoryDriverModule.forRoot = function () {
723
359
  return {
724
360
  ngModule: DaffCartInMemoryDriverModule,
@@ -780,17 +416,6 @@
780
416
  },] }
781
417
  ];
782
418
 
783
- /**
784
- * @fileoverview added by tsickle
785
- * Generated from: drivers/public_api.ts
786
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
787
- */
788
-
789
- /**
790
- * @fileoverview added by tsickle
791
- * Generated from: injection-tokens/extra-attributes-hook.token.ts
792
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
793
- */
794
419
  /**
795
420
  * Allows an app dev to generate extra fields in the in-memory backend.
796
421
  * This enables the in-memory drivers to return responses similar to what the
@@ -808,69 +433,30 @@
808
433
  *
809
434
  * Note that this and any `extra_attributes` features are for advanced users
810
435
  * and should be used with care.
811
- * @type {?}
812
436
  */
813
437
  var DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK = new i0.InjectionToken('DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK', {
814
- factory: ( /**
815
- * @return {?}
816
- */function () { return ( /**
817
- * @param {?} reqInfo
818
- * @param {?} cart
819
- * @return {?}
820
- */function (reqInfo, cart) { return ({}); }); }),
438
+ factory: function () { return function (reqInfo, cart) { return ({}); }; },
821
439
  });
822
440
 
823
441
  /**
824
- * @fileoverview added by tsickle
825
- * Generated from: injection-tokens/public_api.ts
826
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
827
- */
828
-
829
- /**
830
- * @fileoverview added by tsickle
831
- * Generated from: backend/cart-address/cart-address.service.ts
832
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
833
- */
834
- /**
835
- * \@inheritdoc
442
+ * @inheritdoc
836
443
  */
837
444
  var DaffInMemoryBackendCartAddressService = /** @class */ (function () {
838
- /**
839
- * @param {?} extraFieldsHook
840
- */
841
445
  function DaffInMemoryBackendCartAddressService(extraFieldsHook) {
842
446
  this.extraFieldsHook = extraFieldsHook;
843
447
  }
844
- /**
845
- * @param {?} reqInfo
846
- * @return {?}
847
- */
848
448
  DaffInMemoryBackendCartAddressService.prototype.put = function (reqInfo) {
849
449
  var _this = this;
850
- return reqInfo.utils.createResponse$(( /**
851
- * @return {?}
852
- */function () { return ({
450
+ return reqInfo.utils.createResponse$(function () { return ({
853
451
  body: _this.updateAddress(reqInfo),
854
452
  status: angularInMemoryWebApi.STATUS.OK,
855
- }); }));
453
+ }); });
856
454
  };
857
- /**
858
- * @private
859
- * @param {?} reqInfo
860
- * @return {?}
861
- */
862
455
  DaffInMemoryBackendCartAddressService.prototype.getCart = function (reqInfo) {
863
456
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
864
457
  };
865
- /**
866
- * @private
867
- * @param {?} reqInfo
868
- * @return {?}
869
- */
870
458
  DaffInMemoryBackendCartAddressService.prototype.updateAddress = function (reqInfo) {
871
- /** @type {?} */
872
459
  var cart = this.getCart(reqInfo);
873
- /** @type {?} */
874
460
  var address = reqInfo.utils.getJsonBody(reqInfo.req);
875
461
  cart.billing_address = address;
876
462
  cart.shipping_address = address;
@@ -878,6 +464,7 @@
878
464
  };
879
465
  return DaffInMemoryBackendCartAddressService;
880
466
  }());
467
+ /** @nocollapse */ DaffInMemoryBackendCartAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartAddressService_Factory() { return new DaffInMemoryBackendCartAddressService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartAddressService, providedIn: "root" });
881
468
  DaffInMemoryBackendCartAddressService.decorators = [
882
469
  { type: i0.Injectable, args: [{
883
470
  providedIn: 'root',
@@ -887,87 +474,43 @@
887
474
  DaffInMemoryBackendCartAddressService.ctorParameters = function () { return [
888
475
  { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
889
476
  ]; };
890
- /** @nocollapse */ DaffInMemoryBackendCartAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartAddressService_Factory() { return new DaffInMemoryBackendCartAddressService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartAddressService, providedIn: "root" });
891
- if (false) {
892
- /**
893
- * @type {?}
894
- * @private
895
- */
896
- DaffInMemoryBackendCartAddressService.prototype.extraFieldsHook;
897
- }
898
477
 
899
478
  /**
900
- * @fileoverview added by tsickle
901
- * Generated from: backend/cart-billing-address/cart-billing-address.service.ts
902
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
903
- */
904
- /**
905
- * \@inheritdoc
479
+ * @inheritdoc
906
480
  */
907
481
  var DaffInMemoryBackendCartBillingAddressService = /** @class */ (function () {
908
- /**
909
- * @param {?} extraFieldsHook
910
- */
911
482
  function DaffInMemoryBackendCartBillingAddressService(extraFieldsHook) {
912
483
  this.extraFieldsHook = extraFieldsHook;
913
484
  }
914
- /**
915
- * @param {?} reqInfo
916
- * @return {?}
917
- */
918
485
  DaffInMemoryBackendCartBillingAddressService.prototype.get = function (reqInfo) {
919
486
  var _this = this;
920
- return reqInfo.utils.createResponse$(( /**
921
- * @return {?}
922
- */function () { return ({
487
+ return reqInfo.utils.createResponse$(function () { return ({
923
488
  body: _this.getBillingAddress(reqInfo),
924
489
  status: angularInMemoryWebApi.STATUS.OK,
925
- }); }));
490
+ }); });
926
491
  };
927
- /**
928
- * @param {?} reqInfo
929
- * @return {?}
930
- */
931
492
  DaffInMemoryBackendCartBillingAddressService.prototype.put = function (reqInfo) {
932
493
  var _this = this;
933
- return reqInfo.utils.createResponse$(( /**
934
- * @return {?}
935
- */function () { return ({
494
+ return reqInfo.utils.createResponse$(function () { return ({
936
495
  body: _this.updateBillingAddress(reqInfo),
937
496
  status: angularInMemoryWebApi.STATUS.OK,
938
- }); }));
497
+ }); });
939
498
  };
940
- /**
941
- * @private
942
- * @param {?} reqInfo
943
- * @return {?}
944
- */
945
499
  DaffInMemoryBackendCartBillingAddressService.prototype.getCart = function (reqInfo) {
946
500
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
947
501
  };
948
- /**
949
- * @private
950
- * @param {?} reqInfo
951
- * @return {?}
952
- */
953
502
  DaffInMemoryBackendCartBillingAddressService.prototype.getBillingAddress = function (reqInfo) {
954
503
  return this.getCart(reqInfo).billing_address;
955
504
  };
956
- /**
957
- * @private
958
- * @param {?} reqInfo
959
- * @return {?}
960
- */
961
505
  DaffInMemoryBackendCartBillingAddressService.prototype.updateBillingAddress = function (reqInfo) {
962
- /** @type {?} */
963
506
  var cart = this.getCart(reqInfo);
964
- /** @type {?} */
965
507
  var address = reqInfo.utils.getJsonBody(reqInfo.req);
966
508
  cart.billing_address = address;
967
509
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
968
510
  };
969
511
  return DaffInMemoryBackendCartBillingAddressService;
970
512
  }());
513
+ /** @nocollapse */ DaffInMemoryBackendCartBillingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartBillingAddressService_Factory() { return new DaffInMemoryBackendCartBillingAddressService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartBillingAddressService, providedIn: "root" });
971
514
  DaffInMemoryBackendCartBillingAddressService.decorators = [
972
515
  { type: i0.Injectable, args: [{
973
516
  providedIn: 'root',
@@ -977,68 +520,32 @@
977
520
  DaffInMemoryBackendCartBillingAddressService.ctorParameters = function () { return [
978
521
  { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
979
522
  ]; };
980
- /** @nocollapse */ DaffInMemoryBackendCartBillingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartBillingAddressService_Factory() { return new DaffInMemoryBackendCartBillingAddressService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartBillingAddressService, providedIn: "root" });
981
- if (false) {
982
- /**
983
- * @type {?}
984
- * @private
985
- */
986
- DaffInMemoryBackendCartBillingAddressService.prototype.extraFieldsHook;
987
- }
988
523
 
989
524
  /**
990
- * @fileoverview added by tsickle
991
- * Generated from: backend/cart-coupon/cart-coupon.service.ts
992
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
993
- */
994
- /**
995
- * \@inheritdoc
525
+ * @inheritdoc
996
526
  */
997
527
  var DaffInMemoryBackendCartCouponService = /** @class */ (function () {
998
- /**
999
- * @param {?} extraFieldsHook
1000
- */
1001
528
  function DaffInMemoryBackendCartCouponService(extraFieldsHook) {
1002
529
  this.extraFieldsHook = extraFieldsHook;
1003
530
  }
1004
- /**
1005
- * @param {?} reqInfo
1006
- * @return {?}
1007
- */
1008
531
  DaffInMemoryBackendCartCouponService.prototype.get = function (reqInfo) {
1009
532
  var _this = this;
1010
- return reqInfo.utils.createResponse$(( /**
1011
- * @return {?}
1012
- */function () { return ({
533
+ return reqInfo.utils.createResponse$(function () { return ({
1013
534
  body: _this.listCoupons(reqInfo),
1014
535
  status: angularInMemoryWebApi.STATUS.OK,
1015
- }); }));
536
+ }); });
1016
537
  };
1017
- /**
1018
- * @param {?} reqInfo
1019
- * @return {?}
1020
- */
1021
538
  DaffInMemoryBackendCartCouponService.prototype.post = function (reqInfo) {
1022
539
  var _this = this;
1023
- return reqInfo.utils.createResponse$(( /**
1024
- * @return {?}
1025
- */function () { return ({
540
+ return reqInfo.utils.createResponse$(function () { return ({
1026
541
  body: _this.applyCoupon(reqInfo),
1027
542
  status: angularInMemoryWebApi.STATUS.OK,
1028
- }); }));
543
+ }); });
1029
544
  };
1030
- /**
1031
- * @param {?} reqInfo
1032
- * @return {?}
1033
- */
1034
545
  DaffInMemoryBackendCartCouponService.prototype.delete = function (reqInfo) {
1035
546
  var _this = this;
1036
- return reqInfo.utils.createResponse$(( /**
1037
- * @return {?}
1038
- */function () {
1039
- /** @type {?} */
547
+ return reqInfo.utils.createResponse$(function () {
1040
548
  var body;
1041
- /** @type {?} */
1042
549
  var action = _this.getAction(reqInfo);
1043
550
  if (action) {
1044
551
  body = _this.removeCoupon(reqInfo, action);
@@ -1050,77 +557,42 @@
1050
557
  body: body,
1051
558
  status: angularInMemoryWebApi.STATUS.OK,
1052
559
  };
1053
- }));
560
+ });
1054
561
  };
1055
562
  /**
1056
563
  * Gets whatever follows the cart ID section of the request URL.
1057
- * @private
1058
- * @param {?} reqInfo
1059
- * @return {?}
1060
564
  */
1061
565
  DaffInMemoryBackendCartCouponService.prototype.getAction = function (reqInfo) {
1062
566
  return reqInfo.url.replace("/" + reqInfo.resourceUrl + reqInfo.id + "/", '');
1063
567
  };
1064
- /**
1065
- * @private
1066
- * @param {?} reqInfo
1067
- * @return {?}
1068
- */
1069
568
  DaffInMemoryBackendCartCouponService.prototype.getCart = function (reqInfo) {
1070
569
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1071
570
  };
1072
- /**
1073
- * @private
1074
- * @param {?} reqInfo
1075
- * @return {?}
1076
- */
1077
571
  DaffInMemoryBackendCartCouponService.prototype.listCoupons = function (reqInfo) {
1078
572
  return this.getCart(reqInfo).coupons;
1079
573
  };
1080
- /**
1081
- * @private
1082
- * @param {?} reqInfo
1083
- * @return {?}
1084
- */
1085
574
  DaffInMemoryBackendCartCouponService.prototype.applyCoupon = function (reqInfo) {
1086
- /** @type {?} */
1087
575
  var cart = this.getCart(reqInfo);
1088
- /** @type {?} */
1089
576
  var coupon = reqInfo.utils.getJsonBody(reqInfo.req);
1090
577
  cart.coupons.push(coupon);
1091
578
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1092
579
  };
1093
- /**
1094
- * @private
1095
- * @param {?} reqInfo
1096
- * @param {?} couponCode
1097
- * @return {?}
1098
- */
1099
580
  DaffInMemoryBackendCartCouponService.prototype.removeCoupon = function (reqInfo, couponCode) {
1100
- /** @type {?} */
1101
581
  var cart = this.getCart(reqInfo);
1102
- cart.coupons = cart.coupons.filter(( /**
1103
- * @param {?} __0
1104
- * @return {?}
1105
- */function (_a) {
582
+ cart.coupons = cart.coupons.filter(function (_a) {
1106
583
  var code = _a.code;
1107
584
  return code !== couponCode;
1108
- }));
585
+ });
1109
586
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1110
587
  };
1111
- /**
1112
- * @private
1113
- * @param {?} reqInfo
1114
- * @return {?}
1115
- */
1116
588
  DaffInMemoryBackendCartCouponService.prototype.removeAllCoupons = function (reqInfo) {
1117
- /** @type {?} */
1118
589
  var cart = this.getCart(reqInfo);
1119
590
  cart.coupons = [];
1120
591
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1121
592
  };
1122
593
  return DaffInMemoryBackendCartCouponService;
1123
594
  }());
595
+ /** @nocollapse */ DaffInMemoryBackendCartCouponService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartCouponService_Factory() { return new DaffInMemoryBackendCartCouponService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartCouponService, providedIn: "root" });
1124
596
  DaffInMemoryBackendCartCouponService.decorators = [
1125
597
  { type: i0.Injectable, args: [{
1126
598
  providedIn: 'root',
@@ -1130,14 +602,6 @@
1130
602
  DaffInMemoryBackendCartCouponService.ctorParameters = function () { return [
1131
603
  { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1132
604
  ]; };
1133
- /** @nocollapse */ DaffInMemoryBackendCartCouponService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartCouponService_Factory() { return new DaffInMemoryBackendCartCouponService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartCouponService, providedIn: "root" });
1134
- if (false) {
1135
- /**
1136
- * @type {?}
1137
- * @private
1138
- */
1139
- DaffInMemoryBackendCartCouponService.prototype.extraFieldsHook;
1140
- }
1141
605
 
1142
606
  /*! *****************************************************************************
1143
607
  Copyright (c) Microsoft Corporation.
@@ -1374,7 +838,7 @@
1374
838
  ar[i] = from[i];
1375
839
  }
1376
840
  }
1377
- return to.concat(ar || from);
841
+ return to.concat(ar || Array.prototype.slice.call(from));
1378
842
  }
1379
843
  function __await(v) {
1380
844
  return this instanceof __await ? (this.v = v, this) : new __await(v);
@@ -1458,29 +922,17 @@
1458
922
  }
1459
923
 
1460
924
  /**
1461
- * \@inheritdoc
925
+ * @inheritdoc
1462
926
  */
1463
927
  var DaffInMemoryBackendCartItemsService = /** @class */ (function () {
1464
- /**
1465
- * @param {?} cartItemFactory
1466
- * @param {?} extraFieldsHook
1467
- */
1468
928
  function DaffInMemoryBackendCartItemsService(cartItemFactory, extraFieldsHook) {
1469
929
  this.cartItemFactory = cartItemFactory;
1470
930
  this.extraFieldsHook = extraFieldsHook;
1471
931
  }
1472
- /**
1473
- * @param {?} reqInfo
1474
- * @return {?}
1475
- */
1476
932
  DaffInMemoryBackendCartItemsService.prototype.get = function (reqInfo) {
1477
933
  var _this = this;
1478
- return reqInfo.utils.createResponse$(( /**
1479
- * @return {?}
1480
- */function () {
1481
- /** @type {?} */
934
+ return reqInfo.utils.createResponse$(function () {
1482
935
  var body;
1483
- /** @type {?} */
1484
936
  var action = _this.getAction(reqInfo);
1485
937
  if (action) {
1486
938
  body = _this.getItem(reqInfo, action);
@@ -1492,162 +944,67 @@
1492
944
  body: body,
1493
945
  status: angularInMemoryWebApi.STATUS.OK,
1494
946
  };
1495
- }));
947
+ });
1496
948
  };
1497
- /**
1498
- * @param {?} reqInfo
1499
- * @return {?}
1500
- */
1501
949
  DaffInMemoryBackendCartItemsService.prototype.put = function (reqInfo) {
1502
950
  var _this = this;
1503
- return reqInfo.utils.createResponse$(( /**
1504
- * @return {?}
1505
- */function () { return ({
951
+ return reqInfo.utils.createResponse$(function () { return ({
1506
952
  body: _this.updateItem(reqInfo, _this.getAction(reqInfo)),
1507
953
  status: angularInMemoryWebApi.STATUS.OK,
1508
- }); }));
954
+ }); });
1509
955
  };
1510
- /**
1511
- * @param {?} reqInfo
1512
- * @return {?}
1513
- */
1514
956
  DaffInMemoryBackendCartItemsService.prototype.post = function (reqInfo) {
1515
957
  var _this = this;
1516
- return reqInfo.utils.createResponse$(( /**
1517
- * @return {?}
1518
- */function () { return ({
958
+ return reqInfo.utils.createResponse$(function () { return ({
1519
959
  body: _this.addItem(reqInfo),
1520
960
  status: angularInMemoryWebApi.STATUS.OK,
1521
- }); }));
961
+ }); });
1522
962
  };
1523
- /**
1524
- * @param {?} reqInfo
1525
- * @return {?}
1526
- */
1527
963
  DaffInMemoryBackendCartItemsService.prototype.delete = function (reqInfo) {
1528
964
  var _this = this;
1529
- return reqInfo.utils.createResponse$(( /**
1530
- * @return {?}
1531
- */function () { return ({
965
+ return reqInfo.utils.createResponse$(function () { return ({
1532
966
  body: _this.deleteItem(reqInfo, _this.getAction(reqInfo)),
1533
967
  status: angularInMemoryWebApi.STATUS.OK,
1534
- }); }));
968
+ }); });
1535
969
  };
1536
970
  /**
1537
971
  * Gets whatever follows the cart ID section of the request URL.
1538
- * @private
1539
- * @param {?} reqInfo
1540
- * @return {?}
1541
972
  */
1542
973
  DaffInMemoryBackendCartItemsService.prototype.getAction = function (reqInfo) {
1543
974
  return reqInfo.url.replace("/" + reqInfo.resourceUrl + reqInfo.id + "/", '');
1544
975
  };
1545
- /**
1546
- * @private
1547
- * @param {?} reqInfo
1548
- * @return {?}
1549
- */
1550
976
  DaffInMemoryBackendCartItemsService.prototype.getCart = function (reqInfo) {
1551
977
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1552
978
  };
1553
- /**
1554
- * @private
1555
- * @param {?} itemInput
1556
- * @return {?}
1557
- */
1558
979
  DaffInMemoryBackendCartItemsService.prototype.transformItemInput = function (itemInput) {
1559
980
  return Object.assign(Object.assign(Object.assign({}, this.cartItemFactory.create()), itemInput), { product_id: itemInput.productId });
1560
981
  };
1561
- /**
1562
- * @private
1563
- * @param {?} reqInfo
1564
- * @return {?}
1565
- */
1566
982
  DaffInMemoryBackendCartItemsService.prototype.listItems = function (reqInfo) {
1567
983
  return this.getCart(reqInfo).items;
1568
984
  };
1569
- /**
1570
- * @private
1571
- * @param {?} reqInfo
1572
- * @param {?} itemId
1573
- * @return {?}
1574
- */
1575
985
  DaffInMemoryBackendCartItemsService.prototype.getItem = function (reqInfo, itemId) {
1576
- /** @type {?} */
1577
986
  var cart = this.getCart(reqInfo);
1578
- return cart.items.find(( /**
1579
- * @param {?} __0
1580
- * @return {?}
1581
- */function (_a) {
987
+ return cart.items.find(function (_a) {
1582
988
  var id = _a.id;
1583
989
  return itemId === id;
1584
- }));
990
+ });
1585
991
  };
1586
- /**
1587
- * @private
1588
- * @param {?} reqInfo
1589
- * @param {?} itemId
1590
- * @return {?}
1591
- */
1592
992
  DaffInMemoryBackendCartItemsService.prototype.updateItem = function (reqInfo, itemId) {
1593
- /** @type {?} */
1594
993
  var cart = this.getCart(reqInfo);
1595
- /** @type {?} */
1596
- var cartIndex = reqInfo.collection.findIndex(( /**
1597
- * @param {?} c
1598
- * @return {?}
1599
- */function (/**
1600
- * @param {?} c
1601
- * @return {?}
1602
- */ c) { return c.id === reqInfo.id; }));
1603
- /** @type {?} */
994
+ var cartIndex = reqInfo.collection.findIndex(function (c) { return c.id === reqInfo.id; });
1604
995
  var itemChanges = reqInfo.utils.getJsonBody(reqInfo.req);
1605
- /** @type {?} */
1606
- var itemIndex = cart.items.findIndex(( /**
1607
- * @param {?} item
1608
- * @return {?}
1609
- */function (item) { return itemId === item.id; }));
1610
- reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.map(( /**
1611
- * @param {?} item
1612
- * @param {?} index
1613
- * @return {?}
1614
- */function (item, index) { return index === itemIndex ? Object.assign(Object.assign({}, cart.items[itemIndex]), itemChanges) : item; })), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
996
+ var itemIndex = cart.items.findIndex(function (item) { return itemId === item.id; });
997
+ reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.map(function (item, index) { return index === itemIndex ? Object.assign(Object.assign({}, cart.items[itemIndex]), itemChanges) : item; }), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1615
998
  return reqInfo.collection[cartIndex];
1616
999
  };
1617
- /**
1618
- * @private
1619
- * @param {?} reqInfo
1620
- * @return {?}
1621
- */
1622
1000
  DaffInMemoryBackendCartItemsService.prototype.addItem = function (reqInfo) {
1623
- /** @type {?} */
1624
1001
  var cart = this.getCart(reqInfo);
1625
- /** @type {?} */
1626
- var cartIndex = reqInfo.collection.findIndex(( /**
1627
- * @param {?} c
1628
- * @return {?}
1629
- */function (/**
1630
- * @param {?} c
1631
- * @return {?}
1632
- */ c) { return c.id === reqInfo.id; }));
1633
- /** @type {?} */
1002
+ var cartIndex = reqInfo.collection.findIndex(function (c) { return c.id === reqInfo.id; });
1634
1003
  var itemInput = reqInfo.utils.getJsonBody(reqInfo.req);
1635
- /** @type {?} */
1636
- var existingCartItemIndex = cart.items.findIndex(( /**
1637
- * @param {?} item
1638
- * @return {?}
1639
- */function (/**
1640
- * @param {?} item
1641
- * @return {?}
1642
- */ item) { return item.product_id === itemInput.productId; }));
1004
+ var existingCartItemIndex = cart.items.findIndex(function (item) { return item.product_id === itemInput.productId; });
1643
1005
  if (existingCartItemIndex > -1) {
1644
- /** @type {?} */
1645
1006
  var updatedCartItem_1 = Object.assign(Object.assign({}, cart.items[existingCartItemIndex]), { qty: cart.items[existingCartItemIndex].qty + itemInput.qty });
1646
- reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.map(( /**
1647
- * @param {?} item
1648
- * @param {?} index
1649
- * @return {?}
1650
- */function (item, index) { return index === existingCartItemIndex ? updatedCartItem_1 : item; })), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1007
+ reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.map(function (item, index) { return index === existingCartItemIndex ? updatedCartItem_1 : item; }), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1651
1008
  }
1652
1009
  else {
1653
1010
  reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: __spread(cart.items, [
@@ -1656,40 +1013,19 @@
1656
1013
  }
1657
1014
  return reqInfo.collection[cartIndex];
1658
1015
  };
1659
- /**
1660
- * @private
1661
- * @param {?} reqInfo
1662
- * @param {?} itemId
1663
- * @return {?}
1664
- */
1665
1016
  DaffInMemoryBackendCartItemsService.prototype.deleteItem = function (reqInfo, itemId) {
1666
- /** @type {?} */
1667
1017
  var cart = this.getCart(reqInfo);
1668
- /** @type {?} */
1669
- var itemIndex = cart.items.findIndex(( /**
1670
- * @param {?} __0
1671
- * @return {?}
1672
- */function (_a) {
1018
+ var itemIndex = cart.items.findIndex(function (_a) {
1673
1019
  var id = _a.id;
1674
1020
  return itemId === id;
1675
- }));
1676
- /** @type {?} */
1677
- var cartIndex = reqInfo.collection.findIndex(( /**
1678
- * @param {?} c
1679
- * @return {?}
1680
- */function (/**
1681
- * @param {?} c
1682
- * @return {?}
1683
- */ c) { return c.id === reqInfo.id; }));
1684
- reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.filter(( /**
1685
- * @param {?} item
1686
- * @param {?} index
1687
- * @return {?}
1688
- */function (item, index) { return index !== itemIndex; })), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1021
+ });
1022
+ var cartIndex = reqInfo.collection.findIndex(function (c) { return c.id === reqInfo.id; });
1023
+ reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.filter(function (item, index) { return index !== itemIndex; }), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1689
1024
  return reqInfo.collection[cartIndex];
1690
1025
  };
1691
1026
  return DaffInMemoryBackendCartItemsService;
1692
1027
  }());
1028
+ /** @nocollapse */ DaffInMemoryBackendCartItemsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartItemsService_Factory() { return new DaffInMemoryBackendCartItemsService(i0.ɵɵinject(i1$1.DaffCartItemFactory), i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartItemsService, providedIn: "root" });
1693
1029
  DaffInMemoryBackendCartItemsService.decorators = [
1694
1030
  { type: i0.Injectable, args: [{
1695
1031
  providedIn: 'root',
@@ -1700,49 +1036,20 @@
1700
1036
  { type: i1$1.DaffCartItemFactory },
1701
1037
  { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1702
1038
  ]; };
1703
- /** @nocollapse */ DaffInMemoryBackendCartItemsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartItemsService_Factory() { return new DaffInMemoryBackendCartItemsService(i0.ɵɵinject(i1$1.DaffCartItemFactory), i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartItemsService, providedIn: "root" });
1704
- if (false) {
1705
- /**
1706
- * @type {?}
1707
- * @private
1708
- */
1709
- DaffInMemoryBackendCartItemsService.prototype.cartItemFactory;
1710
- /**
1711
- * @type {?}
1712
- * @private
1713
- */
1714
- DaffInMemoryBackendCartItemsService.prototype.extraFieldsHook;
1715
- }
1716
1039
 
1717
1040
  /**
1718
- * @fileoverview added by tsickle
1719
- * Generated from: backend/cart-order/cart-order.service.ts
1720
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1721
- */
1722
- /**
1723
- * \@inheritdoc
1041
+ * @inheritdoc
1724
1042
  */
1725
1043
  var DaffInMemoryBackendCartOrderService = /** @class */ (function () {
1726
1044
  function DaffInMemoryBackendCartOrderService() {
1727
1045
  }
1728
- /**
1729
- * @param {?} reqInfo
1730
- * @return {?}
1731
- */
1732
1046
  DaffInMemoryBackendCartOrderService.prototype.post = function (reqInfo) {
1733
1047
  var _this = this;
1734
- return reqInfo.utils.createResponse$(( /**
1735
- * @return {?}
1736
- */function () { return ({
1048
+ return reqInfo.utils.createResponse$(function () { return ({
1737
1049
  body: _this.placeOrder(reqInfo),
1738
1050
  status: angularInMemoryWebApi.STATUS.OK,
1739
- }); }));
1051
+ }); });
1740
1052
  };
1741
- /**
1742
- * @private
1743
- * @param {?} reqInfo
1744
- * @return {?}
1745
- */
1746
1053
  DaffInMemoryBackendCartOrderService.prototype.placeOrder = function (reqInfo) {
1747
1054
  return {
1748
1055
  id: '8235422034',
@@ -1752,139 +1059,76 @@
1752
1059
  };
1753
1060
  return DaffInMemoryBackendCartOrderService;
1754
1061
  }());
1062
+ /** @nocollapse */ DaffInMemoryBackendCartOrderService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartOrderService_Factory() { return new DaffInMemoryBackendCartOrderService(); }, token: DaffInMemoryBackendCartOrderService, providedIn: "root" });
1755
1063
  DaffInMemoryBackendCartOrderService.decorators = [
1756
1064
  { type: i0.Injectable, args: [{
1757
1065
  providedIn: 'root',
1758
1066
  },] }
1759
1067
  ];
1760
- /** @nocollapse */ DaffInMemoryBackendCartOrderService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartOrderService_Factory() { return new DaffInMemoryBackendCartOrderService(); }, token: DaffInMemoryBackendCartOrderService, providedIn: "root" });
1761
1068
 
1762
1069
  /**
1763
- * @fileoverview added by tsickle
1764
- * Generated from: backend/cart-payment-methods/cart-payment-methods.service.ts
1765
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1766
- */
1767
- /**
1768
- * \@inheritdoc
1070
+ * @inheritdoc
1769
1071
  */
1770
1072
  var DaffInMemoryBackendCartPaymentMethodsService = /** @class */ (function () {
1771
1073
  function DaffInMemoryBackendCartPaymentMethodsService() {
1772
1074
  }
1773
- /**
1774
- * @param {?} reqInfo
1775
- * @return {?}
1776
- */
1777
1075
  DaffInMemoryBackendCartPaymentMethodsService.prototype.get = function (reqInfo) {
1778
1076
  var _this = this;
1779
- return reqInfo.utils.createResponse$(( /**
1780
- * @return {?}
1781
- */function () { return ({
1077
+ return reqInfo.utils.createResponse$(function () { return ({
1782
1078
  body: _this.listPaymentMethods(reqInfo),
1783
1079
  status: angularInMemoryWebApi.STATUS.OK,
1784
- }); }));
1080
+ }); });
1785
1081
  };
1786
- /**
1787
- * @private
1788
- * @param {?} reqInfo
1789
- * @return {?}
1790
- */
1791
1082
  DaffInMemoryBackendCartPaymentMethodsService.prototype.getCart = function (reqInfo) {
1792
1083
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1793
1084
  };
1794
- /**
1795
- * @private
1796
- * @param {?} reqInfo
1797
- * @return {?}
1798
- */
1799
1085
  DaffInMemoryBackendCartPaymentMethodsService.prototype.listPaymentMethods = function (reqInfo) {
1800
1086
  return this.getCart(reqInfo).available_payment_methods;
1801
1087
  };
1802
1088
  return DaffInMemoryBackendCartPaymentMethodsService;
1803
1089
  }());
1090
+ /** @nocollapse */ DaffInMemoryBackendCartPaymentMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartPaymentMethodsService_Factory() { return new DaffInMemoryBackendCartPaymentMethodsService(); }, token: DaffInMemoryBackendCartPaymentMethodsService, providedIn: "root" });
1804
1091
  DaffInMemoryBackendCartPaymentMethodsService.decorators = [
1805
1092
  { type: i0.Injectable, args: [{
1806
1093
  providedIn: 'root',
1807
1094
  },] }
1808
1095
  ];
1809
- /** @nocollapse */ DaffInMemoryBackendCartPaymentMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartPaymentMethodsService_Factory() { return new DaffInMemoryBackendCartPaymentMethodsService(); }, token: DaffInMemoryBackendCartPaymentMethodsService, providedIn: "root" });
1810
1096
 
1811
1097
  /**
1812
- * @fileoverview added by tsickle
1813
- * Generated from: backend/cart-payment/cart-payment.service.ts
1814
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1815
- */
1816
- /**
1817
- * \@inheritdoc
1098
+ * @inheritdoc
1818
1099
  */
1819
1100
  var DaffInMemoryBackendCartPaymentService = /** @class */ (function () {
1820
- /**
1821
- * @param {?} extraFieldsHook
1822
- */
1823
1101
  function DaffInMemoryBackendCartPaymentService(extraFieldsHook) {
1824
1102
  this.extraFieldsHook = extraFieldsHook;
1825
1103
  }
1826
- /**
1827
- * @param {?} reqInfo
1828
- * @return {?}
1829
- */
1830
1104
  DaffInMemoryBackendCartPaymentService.prototype.get = function (reqInfo) {
1831
1105
  var _this = this;
1832
- return reqInfo.utils.createResponse$(( /**
1833
- * @return {?}
1834
- */function () { return ({
1106
+ return reqInfo.utils.createResponse$(function () { return ({
1835
1107
  body: _this.getPayment(reqInfo),
1836
1108
  status: angularInMemoryWebApi.STATUS.OK,
1837
- }); }));
1109
+ }); });
1838
1110
  };
1839
- /**
1840
- * @param {?} reqInfo
1841
- * @return {?}
1842
- */
1843
1111
  DaffInMemoryBackendCartPaymentService.prototype.put = function (reqInfo) {
1844
1112
  var _this = this;
1845
- return reqInfo.utils.createResponse$(( /**
1846
- * @return {?}
1847
- */function () { return ({
1113
+ return reqInfo.utils.createResponse$(function () { return ({
1848
1114
  body: _this.updatePayment(reqInfo),
1849
1115
  status: angularInMemoryWebApi.STATUS.OK,
1850
- }); }));
1116
+ }); });
1851
1117
  };
1852
- /**
1853
- * @param {?} reqInfo
1854
- * @return {?}
1855
- */
1856
1118
  DaffInMemoryBackendCartPaymentService.prototype.delete = function (reqInfo) {
1857
1119
  var _this = this;
1858
- return reqInfo.utils.createResponse$(( /**
1859
- * @return {?}
1860
- */function () { return ({
1120
+ return reqInfo.utils.createResponse$(function () { return ({
1861
1121
  body: _this.removePayment(reqInfo),
1862
1122
  status: angularInMemoryWebApi.STATUS.OK,
1863
- }); }));
1123
+ }); });
1864
1124
  };
1865
- /**
1866
- * @private
1867
- * @param {?} reqInfo
1868
- * @return {?}
1869
- */
1870
1125
  DaffInMemoryBackendCartPaymentService.prototype.getCart = function (reqInfo) {
1871
1126
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1872
1127
  };
1873
- /**
1874
- * @private
1875
- * @param {?} reqInfo
1876
- * @return {?}
1877
- */
1878
1128
  DaffInMemoryBackendCartPaymentService.prototype.getPayment = function (reqInfo) {
1879
1129
  return this.getCart(reqInfo).payment;
1880
1130
  };
1881
- /**
1882
- * @private
1883
- * @param {?} reqInfo
1884
- * @return {?}
1885
- */
1886
1131
  DaffInMemoryBackendCartPaymentService.prototype.updatePayment = function (reqInfo) {
1887
- /** @type {?} */
1888
1132
  var cart = this.getCart(reqInfo);
1889
1133
  var _a = reqInfo.utils.getJsonBody(reqInfo.req), payment = _a.payment, address = _a.address;
1890
1134
  cart.payment = payment;
@@ -1893,19 +1137,14 @@
1893
1137
  }
1894
1138
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1895
1139
  };
1896
- /**
1897
- * @private
1898
- * @param {?} reqInfo
1899
- * @return {?}
1900
- */
1901
1140
  DaffInMemoryBackendCartPaymentService.prototype.removePayment = function (reqInfo) {
1902
- /** @type {?} */
1903
1141
  var cart = this.getCart(reqInfo);
1904
1142
  cart.payment = null;
1905
1143
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1906
1144
  };
1907
1145
  return DaffInMemoryBackendCartPaymentService;
1908
1146
  }());
1147
+ /** @nocollapse */ DaffInMemoryBackendCartPaymentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartPaymentService_Factory() { return new DaffInMemoryBackendCartPaymentService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartPaymentService, providedIn: "root" });
1909
1148
  DaffInMemoryBackendCartPaymentService.decorators = [
1910
1149
  { type: i0.Injectable, args: [{
1911
1150
  providedIn: 'root',
@@ -1915,87 +1154,43 @@
1915
1154
  DaffInMemoryBackendCartPaymentService.ctorParameters = function () { return [
1916
1155
  { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1917
1156
  ]; };
1918
- /** @nocollapse */ DaffInMemoryBackendCartPaymentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartPaymentService_Factory() { return new DaffInMemoryBackendCartPaymentService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartPaymentService, providedIn: "root" });
1919
- if (false) {
1920
- /**
1921
- * @type {?}
1922
- * @private
1923
- */
1924
- DaffInMemoryBackendCartPaymentService.prototype.extraFieldsHook;
1925
- }
1926
1157
 
1927
1158
  /**
1928
- * @fileoverview added by tsickle
1929
- * Generated from: backend/cart-shipping-address/cart-shipping-address.service.ts
1930
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1931
- */
1932
- /**
1933
- * \@inheritdoc
1159
+ * @inheritdoc
1934
1160
  */
1935
1161
  var DaffInMemoryBackendCartShippingAddressService = /** @class */ (function () {
1936
- /**
1937
- * @param {?} extraFieldsHook
1938
- */
1939
1162
  function DaffInMemoryBackendCartShippingAddressService(extraFieldsHook) {
1940
1163
  this.extraFieldsHook = extraFieldsHook;
1941
1164
  }
1942
- /**
1943
- * @param {?} reqInfo
1944
- * @return {?}
1945
- */
1946
1165
  DaffInMemoryBackendCartShippingAddressService.prototype.get = function (reqInfo) {
1947
1166
  var _this = this;
1948
- return reqInfo.utils.createResponse$(( /**
1949
- * @return {?}
1950
- */function () { return ({
1167
+ return reqInfo.utils.createResponse$(function () { return ({
1951
1168
  body: _this.getShippingAddress(reqInfo),
1952
1169
  status: angularInMemoryWebApi.STATUS.OK,
1953
- }); }));
1170
+ }); });
1954
1171
  };
1955
- /**
1956
- * @param {?} reqInfo
1957
- * @return {?}
1958
- */
1959
1172
  DaffInMemoryBackendCartShippingAddressService.prototype.put = function (reqInfo) {
1960
1173
  var _this = this;
1961
- return reqInfo.utils.createResponse$(( /**
1962
- * @return {?}
1963
- */function () { return ({
1174
+ return reqInfo.utils.createResponse$(function () { return ({
1964
1175
  body: _this.updateShippingAddress(reqInfo),
1965
1176
  status: angularInMemoryWebApi.STATUS.OK,
1966
- }); }));
1177
+ }); });
1967
1178
  };
1968
- /**
1969
- * @private
1970
- * @param {?} reqInfo
1971
- * @return {?}
1972
- */
1973
1179
  DaffInMemoryBackendCartShippingAddressService.prototype.getCart = function (reqInfo) {
1974
1180
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1975
1181
  };
1976
- /**
1977
- * @private
1978
- * @param {?} reqInfo
1979
- * @return {?}
1980
- */
1981
1182
  DaffInMemoryBackendCartShippingAddressService.prototype.getShippingAddress = function (reqInfo) {
1982
1183
  return this.getCart(reqInfo).shipping_address;
1983
1184
  };
1984
- /**
1985
- * @private
1986
- * @param {?} reqInfo
1987
- * @return {?}
1988
- */
1989
1185
  DaffInMemoryBackendCartShippingAddressService.prototype.updateShippingAddress = function (reqInfo) {
1990
- /** @type {?} */
1991
1186
  var cart = this.getCart(reqInfo);
1992
- /** @type {?} */
1993
1187
  var address = reqInfo.utils.getJsonBody(reqInfo.req);
1994
1188
  cart.shipping_address = address;
1995
1189
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1996
1190
  };
1997
1191
  return DaffInMemoryBackendCartShippingAddressService;
1998
1192
  }());
1193
+ /** @nocollapse */ DaffInMemoryBackendCartShippingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingAddressService_Factory() { return new DaffInMemoryBackendCartShippingAddressService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartShippingAddressService, providedIn: "root" });
1999
1194
  DaffInMemoryBackendCartShippingAddressService.decorators = [
2000
1195
  { type: i0.Injectable, args: [{
2001
1196
  providedIn: 'root',
@@ -2005,111 +1200,55 @@
2005
1200
  DaffInMemoryBackendCartShippingAddressService.ctorParameters = function () { return [
2006
1201
  { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
2007
1202
  ]; };
2008
- /** @nocollapse */ DaffInMemoryBackendCartShippingAddressService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingAddressService_Factory() { return new DaffInMemoryBackendCartShippingAddressService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartShippingAddressService, providedIn: "root" });
2009
- if (false) {
2010
- /**
2011
- * @type {?}
2012
- * @private
2013
- */
2014
- DaffInMemoryBackendCartShippingAddressService.prototype.extraFieldsHook;
2015
- }
2016
1203
 
2017
1204
  /**
2018
- * @fileoverview added by tsickle
2019
- * Generated from: backend/cart-shipping-information/cart-shipping-information.service.ts
2020
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2021
- */
2022
- /**
2023
- * \@inheritdoc
1205
+ * @inheritdoc
2024
1206
  */
2025
1207
  var DaffInMemoryBackendCartShippingInformationService = /** @class */ (function () {
2026
- /**
2027
- * @param {?} extraFieldsHook
2028
- */
2029
1208
  function DaffInMemoryBackendCartShippingInformationService(extraFieldsHook) {
2030
1209
  this.extraFieldsHook = extraFieldsHook;
2031
1210
  }
2032
- /**
2033
- * @param {?} reqInfo
2034
- * @return {?}
2035
- */
2036
1211
  DaffInMemoryBackendCartShippingInformationService.prototype.get = function (reqInfo) {
2037
1212
  var _this = this;
2038
- return reqInfo.utils.createResponse$(( /**
2039
- * @return {?}
2040
- */function () { return ({
1213
+ return reqInfo.utils.createResponse$(function () { return ({
2041
1214
  body: _this.getShippingInformation(reqInfo),
2042
1215
  status: angularInMemoryWebApi.STATUS.OK,
2043
- }); }));
1216
+ }); });
2044
1217
  };
2045
- /**
2046
- * @param {?} reqInfo
2047
- * @return {?}
2048
- */
2049
1218
  DaffInMemoryBackendCartShippingInformationService.prototype.put = function (reqInfo) {
2050
1219
  var _this = this;
2051
- return reqInfo.utils.createResponse$(( /**
2052
- * @return {?}
2053
- */function () { return ({
1220
+ return reqInfo.utils.createResponse$(function () { return ({
2054
1221
  body: _this.updateShippingInformation(reqInfo),
2055
1222
  status: angularInMemoryWebApi.STATUS.OK,
2056
- }); }));
1223
+ }); });
2057
1224
  };
2058
- /**
2059
- * @param {?} reqInfo
2060
- * @return {?}
2061
- */
2062
1225
  DaffInMemoryBackendCartShippingInformationService.prototype.delete = function (reqInfo) {
2063
1226
  var _this = this;
2064
- return reqInfo.utils.createResponse$(( /**
2065
- * @return {?}
2066
- */function () { return ({
1227
+ return reqInfo.utils.createResponse$(function () { return ({
2067
1228
  body: _this.removeShippingInformation(reqInfo),
2068
1229
  status: angularInMemoryWebApi.STATUS.OK,
2069
- }); }));
1230
+ }); });
2070
1231
  };
2071
- /**
2072
- * @private
2073
- * @param {?} reqInfo
2074
- * @return {?}
2075
- */
2076
1232
  DaffInMemoryBackendCartShippingInformationService.prototype.getCart = function (reqInfo) {
2077
1233
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
2078
1234
  };
2079
- /**
2080
- * @private
2081
- * @param {?} reqInfo
2082
- * @return {?}
2083
- */
2084
1235
  DaffInMemoryBackendCartShippingInformationService.prototype.getShippingInformation = function (reqInfo) {
2085
1236
  return this.getCart(reqInfo).shipping_information;
2086
1237
  };
2087
- /**
2088
- * @private
2089
- * @param {?} reqInfo
2090
- * @return {?}
2091
- */
2092
1238
  DaffInMemoryBackendCartShippingInformationService.prototype.updateShippingInformation = function (reqInfo) {
2093
- /** @type {?} */
2094
1239
  var cart = this.getCart(reqInfo);
2095
- /** @type {?} */
2096
1240
  var shippingInformation = reqInfo.utils.getJsonBody(reqInfo.req);
2097
1241
  cart.shipping_information = shippingInformation;
2098
1242
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
2099
1243
  };
2100
- /**
2101
- * @private
2102
- * @param {?} reqInfo
2103
- * @return {?}
2104
- */
2105
1244
  DaffInMemoryBackendCartShippingInformationService.prototype.removeShippingInformation = function (reqInfo) {
2106
- /** @type {?} */
2107
1245
  var cart = this.getCart(reqInfo);
2108
1246
  cart.shipping_information = null;
2109
1247
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
2110
1248
  };
2111
1249
  return DaffInMemoryBackendCartShippingInformationService;
2112
1250
  }());
1251
+ /** @nocollapse */ DaffInMemoryBackendCartShippingInformationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingInformationService_Factory() { return new DaffInMemoryBackendCartShippingInformationService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartShippingInformationService, providedIn: "root" });
2113
1252
  DaffInMemoryBackendCartShippingInformationService.decorators = [
2114
1253
  { type: i0.Injectable, args: [{
2115
1254
  providedIn: 'root',
@@ -2119,59 +1258,26 @@
2119
1258
  DaffInMemoryBackendCartShippingInformationService.ctorParameters = function () { return [
2120
1259
  { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
2121
1260
  ]; };
2122
- /** @nocollapse */ DaffInMemoryBackendCartShippingInformationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingInformationService_Factory() { return new DaffInMemoryBackendCartShippingInformationService(i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartShippingInformationService, providedIn: "root" });
2123
- if (false) {
2124
- /**
2125
- * @type {?}
2126
- * @private
2127
- */
2128
- DaffInMemoryBackendCartShippingInformationService.prototype.extraFieldsHook;
2129
- }
2130
1261
 
2131
1262
  /**
2132
- * @fileoverview added by tsickle
2133
- * Generated from: backend/cart-shipping-methods/cart-shipping-methods.service.ts
2134
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2135
- */
2136
- /**
2137
- * \@inheritdoc
1263
+ * @inheritdoc
2138
1264
  */
2139
1265
  var DaffInMemoryBackendCartShippingMethodsService = /** @class */ (function () {
2140
- /**
2141
- * @param {?} shippingMethodFactory
2142
- */
2143
1266
  function DaffInMemoryBackendCartShippingMethodsService(shippingMethodFactory) {
2144
1267
  this.shippingMethodFactory = shippingMethodFactory;
2145
1268
  }
2146
- /**
2147
- * @param {?} reqInfo
2148
- * @return {?}
2149
- */
2150
1269
  DaffInMemoryBackendCartShippingMethodsService.prototype.get = function (reqInfo) {
2151
1270
  var _this = this;
2152
- return reqInfo.utils.createResponse$(( /**
2153
- * @return {?}
2154
- */function () { return ({
1271
+ return reqInfo.utils.createResponse$(function () { return ({
2155
1272
  body: _this.listShippingMethods(reqInfo),
2156
1273
  status: angularInMemoryWebApi.STATUS.OK,
2157
- }); }));
1274
+ }); });
2158
1275
  };
2159
- /**
2160
- * @private
2161
- * @param {?} reqInfo
2162
- * @return {?}
2163
- */
2164
1276
  DaffInMemoryBackendCartShippingMethodsService.prototype.getCart = function (reqInfo) {
2165
1277
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
2166
1278
  };
2167
- /**
2168
- * @private
2169
- * @param {?} reqInfo
2170
- * @return {?}
2171
- */
2172
1279
  DaffInMemoryBackendCartShippingMethodsService.prototype.listShippingMethods = function (reqInfo) {
2173
1280
  var _a;
2174
- /** @type {?} */
2175
1281
  var cart = this.getCart(reqInfo);
2176
1282
  if (cart.shipping_address) {
2177
1283
  if (((_a = cart.available_shipping_methods) === null || _a === void 0 ? void 0 : _a.length) === 0) {
@@ -2185,6 +1291,7 @@
2185
1291
  };
2186
1292
  return DaffInMemoryBackendCartShippingMethodsService;
2187
1293
  }());
1294
+ /** @nocollapse */ DaffInMemoryBackendCartShippingMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingMethodsService_Factory() { return new DaffInMemoryBackendCartShippingMethodsService(i0.ɵɵinject(i1$1.DaffCartShippingRateFactory)); }, token: DaffInMemoryBackendCartShippingMethodsService, providedIn: "root" });
2188
1295
  DaffInMemoryBackendCartShippingMethodsService.decorators = [
2189
1296
  { type: i0.Injectable, args: [{
2190
1297
  providedIn: 'root',
@@ -2194,59 +1301,27 @@
2194
1301
  DaffInMemoryBackendCartShippingMethodsService.ctorParameters = function () { return [
2195
1302
  { type: i1$1.DaffCartShippingRateFactory }
2196
1303
  ]; };
2197
- /** @nocollapse */ DaffInMemoryBackendCartShippingMethodsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingMethodsService_Factory() { return new DaffInMemoryBackendCartShippingMethodsService(i0.ɵɵinject(i1$1.DaffCartShippingRateFactory)); }, token: DaffInMemoryBackendCartShippingMethodsService, providedIn: "root" });
2198
- if (false) {
2199
- /**
2200
- * @type {?}
2201
- * @private
2202
- */
2203
- DaffInMemoryBackendCartShippingMethodsService.prototype.shippingMethodFactory;
2204
- }
2205
1304
 
2206
1305
  /**
2207
- * @fileoverview added by tsickle
2208
- * Generated from: backend/cart/cart.service.ts
2209
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2210
- */
2211
- /**
2212
- * \@inheritdoc
1306
+ * @inheritdoc
2213
1307
  */
2214
1308
  var DaffInMemoryBackendCartService = /** @class */ (function () {
2215
- /**
2216
- * @param {?} cartFactory
2217
- * @param {?} extraFieldsHook
2218
- */
2219
1309
  function DaffInMemoryBackendCartService(cartFactory, extraFieldsHook) {
2220
1310
  this.cartFactory = cartFactory;
2221
1311
  this.extraFieldsHook = extraFieldsHook;
2222
1312
  }
2223
- /**
2224
- * @param {?} reqInfo
2225
- * @return {?}
2226
- */
2227
1313
  DaffInMemoryBackendCartService.prototype.get = function (reqInfo) {
2228
1314
  var _this = this;
2229
- /** @type {?} */
2230
1315
  var cart = this.getCart(reqInfo);
2231
- return reqInfo.utils.createResponse$(( /**
2232
- * @return {?}
2233
- */function () { return ({
1316
+ return reqInfo.utils.createResponse$(function () { return ({
2234
1317
  body: cart ? Object.assign(Object.assign({}, cart), { extra_attributes: _this.extraFieldsHook(reqInfo, cart) }) : cart,
2235
1318
  status: cart ? angularInMemoryWebApi.STATUS.OK : angularInMemoryWebApi.STATUS.NOT_FOUND,
2236
- }); }));
1319
+ }); });
2237
1320
  };
2238
- /**
2239
- * @param {?} reqInfo
2240
- * @return {?}
2241
- */
2242
1321
  DaffInMemoryBackendCartService.prototype.post = function (reqInfo) {
2243
1322
  var _this = this;
2244
- return reqInfo.utils.createResponse$(( /**
2245
- * @return {?}
2246
- */function () {
2247
- /** @type {?} */
1323
+ return reqInfo.utils.createResponse$(function () {
2248
1324
  var body;
2249
- /** @type {?} */
2250
1325
  var action = _this.getAction(reqInfo);
2251
1326
  if (reqInfo.id === 'addToCart') {
2252
1327
  // deprecated
@@ -2262,51 +1337,32 @@
2262
1337
  body: body,
2263
1338
  status: angularInMemoryWebApi.STATUS.OK,
2264
1339
  };
2265
- }));
1340
+ });
2266
1341
  };
2267
1342
  /**
2268
1343
  * Gets whatever follows the cart ID section of the request URL.
2269
- * @private
2270
- * @param {?} reqInfo
2271
- * @return {?}
2272
1344
  */
2273
1345
  DaffInMemoryBackendCartService.prototype.getAction = function (reqInfo) {
2274
1346
  return reqInfo.url.replace("/" + reqInfo.resourceUrl + reqInfo.id + "/", '');
2275
1347
  };
2276
- /**
2277
- * @private
2278
- * @param {?} reqInfo
2279
- * @return {?}
2280
- */
2281
1348
  DaffInMemoryBackendCartService.prototype.clear = function (reqInfo) {
2282
- /** @type {?} */
2283
1349
  var cart = this.getCart(reqInfo);
2284
1350
  cart.items = [];
2285
1351
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
2286
1352
  };
2287
- /**
2288
- * @private
2289
- * @param {?} reqInfo
2290
- * @return {?}
2291
- */
2292
1353
  DaffInMemoryBackendCartService.prototype.create = function (reqInfo) {
2293
- /** @type {?} */
2294
1354
  var cart = this.cartFactory.create();
2295
1355
  reqInfo.collection.push(cart);
2296
1356
  return {
2297
1357
  id: cart.id,
2298
1358
  };
2299
1359
  };
2300
- /**
2301
- * @private
2302
- * @param {?} reqInfo
2303
- * @return {?}
2304
- */
2305
1360
  DaffInMemoryBackendCartService.prototype.getCart = function (reqInfo) {
2306
1361
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
2307
1362
  };
2308
1363
  return DaffInMemoryBackendCartService;
2309
1364
  }());
1365
+ /** @nocollapse */ DaffInMemoryBackendCartService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartService_Factory() { return new DaffInMemoryBackendCartService(i0.ɵɵinject(i1$1.DaffCartFactory), i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartService, providedIn: "root" });
2310
1366
  DaffInMemoryBackendCartService.decorators = [
2311
1367
  { type: i0.Injectable, args: [{
2312
1368
  providedIn: 'root',
@@ -2317,43 +1373,12 @@
2317
1373
  { type: i1$1.DaffCartFactory },
2318
1374
  { type: undefined, decorators: [{ type: i0.Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
2319
1375
  ]; };
2320
- /** @nocollapse */ DaffInMemoryBackendCartService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartService_Factory() { return new DaffInMemoryBackendCartService(i0.ɵɵinject(i1$1.DaffCartFactory), i0.ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartService, providedIn: "root" });
2321
- if (false) {
2322
- /**
2323
- * @type {?}
2324
- * @private
2325
- */
2326
- DaffInMemoryBackendCartService.prototype.cartFactory;
2327
- /**
2328
- * @type {?}
2329
- * @private
2330
- */
2331
- DaffInMemoryBackendCartService.prototype.extraFieldsHook;
2332
- }
2333
1376
 
2334
- /**
2335
- * @fileoverview added by tsickle
2336
- * Generated from: backend/cart-root.service.ts
2337
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2338
- */
2339
1377
  /**
2340
1378
  * The root cart in-memory backend.
2341
1379
  * Creates the database and delegates requests to child backends.
2342
1380
  */
2343
1381
  var DaffInMemoryBackendCartRootService = /** @class */ (function () {
2344
- /**
2345
- * @param {?} cartService
2346
- * @param {?} cartItemsService
2347
- * @param {?} cartOrderService
2348
- * @param {?} cartCouponService
2349
- * @param {?} cartAddressService
2350
- * @param {?} cartShippingAddressService
2351
- * @param {?} cartBillingAddressService
2352
- * @param {?} cartPaymentMethodsService
2353
- * @param {?} cartShippingMethodsService
2354
- * @param {?} cartPaymentService
2355
- * @param {?} cartShippingInformationService
2356
- */
2357
1382
  function DaffInMemoryBackendCartRootService(cartService, cartItemsService, cartOrderService, cartCouponService, cartAddressService, cartShippingAddressService, cartBillingAddressService, cartPaymentMethodsService, cartShippingMethodsService, cartPaymentService, cartShippingInformationService) {
2358
1383
  this.cartService = cartService;
2359
1384
  this.cartItemsService = cartItemsService;
@@ -2371,13 +1396,8 @@
2371
1396
  */
2372
1397
  this.carts = [];
2373
1398
  }
2374
- /**
2375
- * @param {?} reqInfo
2376
- * @return {?}
2377
- */
2378
1399
  DaffInMemoryBackendCartRootService.prototype.createDb = function (reqInfo) {
2379
1400
  if (reqInfo) {
2380
- /** @type {?} */
2381
1401
  var seedData = reqInfo.utils.getJsonBody(reqInfo.req).carts;
2382
1402
  if (seedData) {
2383
1403
  this.carts = seedData;
@@ -2387,39 +1407,18 @@
2387
1407
  cart: this.carts,
2388
1408
  };
2389
1409
  };
2390
- /**
2391
- * @param {?} reqInfo
2392
- * @return {?}
2393
- */
2394
1410
  DaffInMemoryBackendCartRootService.prototype.get = function (reqInfo) {
2395
1411
  return this.delegateRequest(reqInfo);
2396
1412
  };
2397
- /**
2398
- * @param {?} reqInfo
2399
- * @return {?}
2400
- */
2401
1413
  DaffInMemoryBackendCartRootService.prototype.post = function (reqInfo) {
2402
1414
  return this.delegateRequest(reqInfo);
2403
1415
  };
2404
- /**
2405
- * @param {?} reqInfo
2406
- * @return {?}
2407
- */
2408
1416
  DaffInMemoryBackendCartRootService.prototype.put = function (reqInfo) {
2409
1417
  return this.delegateRequest(reqInfo);
2410
1418
  };
2411
- /**
2412
- * @param {?} reqInfo
2413
- * @return {?}
2414
- */
2415
1419
  DaffInMemoryBackendCartRootService.prototype.delete = function (reqInfo) {
2416
1420
  return this.delegateRequest(reqInfo);
2417
1421
  };
2418
- /**
2419
- * @private
2420
- * @param {?} reqInfo
2421
- * @return {?}
2422
- */
2423
1422
  DaffInMemoryBackendCartRootService.prototype.delegateRequest = function (reqInfo) {
2424
1423
  reqInfo.collection = this.carts;
2425
1424
  switch (reqInfo.collectionName) {
@@ -2446,12 +1445,10 @@
2446
1445
  case 'cart-shipping-information':
2447
1446
  return this.cartShippingInformationService[reqInfo.method](reqInfo);
2448
1447
  default:
2449
- return reqInfo.utils.createResponse$(( /**
2450
- * @return {?}
2451
- */function () { return ({
1448
+ return reqInfo.utils.createResponse$(function () { return ({
2452
1449
  body: {},
2453
1450
  status: angularInMemoryWebApi.STATUS.OK,
2454
- }); }));
1451
+ }); });
2455
1452
  }
2456
1453
  };
2457
1454
  return DaffInMemoryBackendCartRootService;
@@ -2473,6 +1470,7 @@
2473
1470
  'cart-payment',
2474
1471
  'cart-shipping-information',
2475
1472
  ];
1473
+ /** @nocollapse */ DaffInMemoryBackendCartRootService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartRootService_Factory() { return new DaffInMemoryBackendCartRootService(i0.ɵɵinject(DaffInMemoryBackendCartService), i0.ɵɵinject(DaffInMemoryBackendCartItemsService), i0.ɵɵinject(DaffInMemoryBackendCartOrderService), i0.ɵɵinject(DaffInMemoryBackendCartCouponService), i0.ɵɵinject(DaffInMemoryBackendCartAddressService), i0.ɵɵinject(DaffInMemoryBackendCartShippingAddressService), i0.ɵɵinject(DaffInMemoryBackendCartBillingAddressService), i0.ɵɵinject(DaffInMemoryBackendCartPaymentMethodsService), i0.ɵɵinject(DaffInMemoryBackendCartShippingMethodsService), i0.ɵɵinject(DaffInMemoryBackendCartPaymentService), i0.ɵɵinject(DaffInMemoryBackendCartShippingInformationService)); }, token: DaffInMemoryBackendCartRootService, providedIn: "root" });
2476
1474
  DaffInMemoryBackendCartRootService.decorators = [
2477
1475
  { type: i0.Injectable, args: [{
2478
1476
  providedIn: 'root',
@@ -2492,98 +1490,9 @@
2492
1490
  { type: DaffInMemoryBackendCartPaymentService },
2493
1491
  { type: DaffInMemoryBackendCartShippingInformationService }
2494
1492
  ]; };
2495
- /** @nocollapse */ DaffInMemoryBackendCartRootService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartRootService_Factory() { return new DaffInMemoryBackendCartRootService(i0.ɵɵinject(DaffInMemoryBackendCartService), i0.ɵɵinject(DaffInMemoryBackendCartItemsService), i0.ɵɵinject(DaffInMemoryBackendCartOrderService), i0.ɵɵinject(DaffInMemoryBackendCartCouponService), i0.ɵɵinject(DaffInMemoryBackendCartAddressService), i0.ɵɵinject(DaffInMemoryBackendCartShippingAddressService), i0.ɵɵinject(DaffInMemoryBackendCartBillingAddressService), i0.ɵɵinject(DaffInMemoryBackendCartPaymentMethodsService), i0.ɵɵinject(DaffInMemoryBackendCartShippingMethodsService), i0.ɵɵinject(DaffInMemoryBackendCartPaymentService), i0.ɵɵinject(DaffInMemoryBackendCartShippingInformationService)); }, token: DaffInMemoryBackendCartRootService, providedIn: "root" });
2496
- if (false) {
2497
- /**
2498
- * The collections that the root service manages.
2499
- * Useful for a higher-level backend that delegates to this one based on collection name.
2500
- * @type {?}
2501
- */
2502
- DaffInMemoryBackendCartRootService.COLLECTION_NAMES;
2503
- /**
2504
- * The collection of carts in the backend.
2505
- * @type {?}
2506
- */
2507
- DaffInMemoryBackendCartRootService.prototype.carts;
2508
- /**
2509
- * @type {?}
2510
- * @private
2511
- */
2512
- DaffInMemoryBackendCartRootService.prototype.cartService;
2513
- /**
2514
- * @type {?}
2515
- * @private
2516
- */
2517
- DaffInMemoryBackendCartRootService.prototype.cartItemsService;
2518
- /**
2519
- * @type {?}
2520
- * @private
2521
- */
2522
- DaffInMemoryBackendCartRootService.prototype.cartOrderService;
2523
- /**
2524
- * @type {?}
2525
- * @private
2526
- */
2527
- DaffInMemoryBackendCartRootService.prototype.cartCouponService;
2528
- /**
2529
- * @type {?}
2530
- * @private
2531
- */
2532
- DaffInMemoryBackendCartRootService.prototype.cartAddressService;
2533
- /**
2534
- * @type {?}
2535
- * @private
2536
- */
2537
- DaffInMemoryBackendCartRootService.prototype.cartShippingAddressService;
2538
- /**
2539
- * @type {?}
2540
- * @private
2541
- */
2542
- DaffInMemoryBackendCartRootService.prototype.cartBillingAddressService;
2543
- /**
2544
- * @type {?}
2545
- * @private
2546
- */
2547
- DaffInMemoryBackendCartRootService.prototype.cartPaymentMethodsService;
2548
- /**
2549
- * @type {?}
2550
- * @private
2551
- */
2552
- DaffInMemoryBackendCartRootService.prototype.cartShippingMethodsService;
2553
- /**
2554
- * @type {?}
2555
- * @private
2556
- */
2557
- DaffInMemoryBackendCartRootService.prototype.cartPaymentService;
2558
- /**
2559
- * @type {?}
2560
- * @private
2561
- */
2562
- DaffInMemoryBackendCartRootService.prototype.cartShippingInformationService;
2563
- }
2564
-
2565
- /**
2566
- * @fileoverview added by tsickle
2567
- * Generated from: backend/public_api.ts
2568
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2569
- */
2570
-
2571
- /**
2572
- * @fileoverview added by tsickle
2573
- * Generated from: public_api.ts
2574
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2575
- */
2576
-
2577
- /**
2578
- * @fileoverview added by tsickle
2579
- * Generated from: index.ts
2580
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2581
- */
2582
1493
 
2583
1494
  /**
2584
- * @fileoverview added by tsickle
2585
- * Generated from: daffodil-cart-driver-in-memory.ts
2586
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1495
+ * Generated bundle index. Do not edit.
2587
1496
  */
2588
1497
 
2589
1498
  exports.DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK = DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK;