@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
@@ -1,5 +1,5 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
- import { Injectable, ɵɵdefineInjectable, ɵɵinject, NgModule, InjectionToken, Inject } from '@angular/core';
2
+ import { ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, InjectionToken, Inject } from '@angular/core';
3
3
  import { throwError } from 'rxjs';
4
4
  import { catchError, map } from 'rxjs/operators';
5
5
  import { DaffCartNotFoundError, DaffCartDriver, DaffCartAddressDriver, DaffCartBillingAddressDriver, DaffCartItemDriver, DaffCartPaymentDriver, DaffCartPaymentMethodsDriver, DaffCartShippingAddressDriver, DaffCartShippingInformationDriver, DaffCartShippingMethodsDriver, DaffCartOrderDriver, DaffCartCouponDriver } from '@daffodil/cart/driver';
@@ -8,17 +8,9 @@ import { STATUS } from 'angular-in-memory-web-api';
8
8
  import { DaffCartItemFactory, DaffCartShippingRateFactory, DaffCartFactory } from '@daffodil/cart/testing';
9
9
 
10
10
  /**
11
- * @fileoverview added by tsickle
12
- * Generated from: drivers/cart/cart.service.ts
13
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
14
- */
15
- /**
16
- * \@inheritdoc
11
+ * @inheritdoc
17
12
  */
18
13
  class DaffInMemoryCartService {
19
- /**
20
- * @param {?} http
21
- */
22
14
  constructor(http) {
23
15
  this.http = http;
24
16
  /**
@@ -26,43 +18,20 @@ class DaffInMemoryCartService {
26
18
  */
27
19
  this.url = '/api/cart';
28
20
  }
29
- /**
30
- * @param {?} cartId
31
- * @return {?}
32
- */
33
21
  get(cartId) {
34
- return this.http.get(`${this.url}/${cartId}`).pipe(catchError((/**
35
- * @param {?} error
36
- * @return {?}
37
- */
38
- (error) => throwError(new DaffCartNotFoundError(error.message)))), map((/**
39
- * @param {?} result
40
- * @return {?}
41
- */
42
- result => result)));
22
+ return this.http.get(`${this.url}/${cartId}`).pipe(catchError((error) => throwError(new DaffCartNotFoundError(error.message))), map(result => result));
43
23
  }
44
- /**
45
- * @param {?} productId
46
- * @param {?} qty
47
- * @return {?}
48
- */
49
24
  addToCart(productId, qty) {
50
25
  return this.http.post(this.url + '/addToCart', { productId, qty });
51
26
  }
52
- /**
53
- * @param {?} cartId
54
- * @return {?}
55
- */
56
27
  clear(cartId) {
57
28
  return this.http.post(`${this.url}/${cartId}/clear`, {});
58
29
  }
59
- /**
60
- * @return {?}
61
- */
62
30
  create() {
63
31
  return this.http.post(this.url, {});
64
32
  }
65
33
  }
34
+ /** @nocollapse */ DaffInMemoryCartService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartService_Factory() { return new DaffInMemoryCartService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartService, providedIn: "root" });
66
35
  DaffInMemoryCartService.decorators = [
67
36
  { type: Injectable, args: [{
68
37
  providedIn: 'root',
@@ -72,32 +41,11 @@ DaffInMemoryCartService.decorators = [
72
41
  DaffInMemoryCartService.ctorParameters = () => [
73
42
  { type: HttpClient }
74
43
  ];
75
- /** @nocollapse */ DaffInMemoryCartService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartService_Factory() { return new DaffInMemoryCartService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartService, providedIn: "root" });
76
- if (false) {
77
- /**
78
- * The URL with which the driver makes calls to the backend.
79
- * @type {?}
80
- */
81
- DaffInMemoryCartService.prototype.url;
82
- /**
83
- * @type {?}
84
- * @private
85
- */
86
- DaffInMemoryCartService.prototype.http;
87
- }
88
44
 
89
45
  /**
90
- * @fileoverview added by tsickle
91
- * Generated from: drivers/cart-item/cart-item.service.ts
92
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
93
- */
94
- /**
95
- * \@inheritdoc
46
+ * @inheritdoc
96
47
  */
97
48
  class DaffInMemoryCartItemService {
98
- /**
99
- * @param {?} http
100
- */
101
49
  constructor(http) {
102
50
  this.http = http;
103
51
  /**
@@ -105,47 +53,23 @@ class DaffInMemoryCartItemService {
105
53
  */
106
54
  this.url = '/api/cart-items';
107
55
  }
108
- /**
109
- * @param {?} cartId
110
- * @return {?}
111
- */
112
56
  list(cartId) {
113
57
  return this.http.get(`${this.url}/${cartId}/`);
114
58
  }
115
- /**
116
- * @param {?} cartId
117
- * @param {?} itemId
118
- * @return {?}
119
- */
120
59
  get(cartId, itemId) {
121
60
  return this.http.get(`${this.url}/${cartId}/${itemId}`);
122
61
  }
123
- /**
124
- * @param {?} cartId
125
- * @param {?} input
126
- * @return {?}
127
- */
128
62
  add(cartId, input) {
129
63
  return this.http.post(`${this.url}/${cartId}/`, input);
130
64
  }
131
- /**
132
- * @param {?} cartId
133
- * @param {?} itemId
134
- * @param {?} item
135
- * @return {?}
136
- */
137
65
  update(cartId, itemId, item) {
138
66
  return this.http.put(`${this.url}/${cartId}/${itemId}`, item);
139
67
  }
140
- /**
141
- * @param {?} cartId
142
- * @param {?} itemId
143
- * @return {?}
144
- */
145
68
  delete(cartId, itemId) {
146
69
  return this.http.delete(`${this.url}/${cartId}/${itemId}`);
147
70
  }
148
71
  }
72
+ /** @nocollapse */ DaffInMemoryCartItemService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartItemService_Factory() { return new DaffInMemoryCartItemService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartItemService, providedIn: "root" });
149
73
  DaffInMemoryCartItemService.decorators = [
150
74
  { type: Injectable, args: [{
151
75
  providedIn: 'root',
@@ -155,32 +79,11 @@ DaffInMemoryCartItemService.decorators = [
155
79
  DaffInMemoryCartItemService.ctorParameters = () => [
156
80
  { type: HttpClient }
157
81
  ];
158
- /** @nocollapse */ DaffInMemoryCartItemService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartItemService_Factory() { return new DaffInMemoryCartItemService(ɵɵinject(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
82
 
172
83
  /**
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
84
+ * @inheritdoc
179
85
  */
180
86
  class DaffInMemoryCartBillingAddressService {
181
- /**
182
- * @param {?} http
183
- */
184
87
  constructor(http) {
185
88
  this.http = http;
186
89
  /**
@@ -188,22 +91,14 @@ class DaffInMemoryCartBillingAddressService {
188
91
  */
189
92
  this.url = '/api/cart-billing-address';
190
93
  }
191
- /**
192
- * @param {?} cartId
193
- * @return {?}
194
- */
195
94
  get(cartId) {
196
95
  return this.http.get(`${this.url}/${cartId}`);
197
96
  }
198
- /**
199
- * @param {?} cartId
200
- * @param {?} address
201
- * @return {?}
202
- */
203
97
  update(cartId, address) {
204
98
  return this.http.put(`${this.url}/${cartId}`, address);
205
99
  }
206
100
  }
101
+ /** @nocollapse */ DaffInMemoryCartBillingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartBillingAddressService_Factory() { return new DaffInMemoryCartBillingAddressService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartBillingAddressService, providedIn: "root" });
207
102
  DaffInMemoryCartBillingAddressService.decorators = [
208
103
  { type: Injectable, args: [{
209
104
  providedIn: 'root',
@@ -213,32 +108,11 @@ DaffInMemoryCartBillingAddressService.decorators = [
213
108
  DaffInMemoryCartBillingAddressService.ctorParameters = () => [
214
109
  { type: HttpClient }
215
110
  ];
216
- /** @nocollapse */ DaffInMemoryCartBillingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartBillingAddressService_Factory() { return new DaffInMemoryCartBillingAddressService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartBillingAddressService, providedIn: "root" });
217
- if (false) {
218
- /**
219
- * The URL with which the driver makes calls to the backend.
220
- * @type {?}
221
- */
222
- DaffInMemoryCartBillingAddressService.prototype.url;
223
- /**
224
- * @type {?}
225
- * @private
226
- */
227
- DaffInMemoryCartBillingAddressService.prototype.http;
228
- }
229
111
 
230
112
  /**
231
- * @fileoverview added by tsickle
232
- * Generated from: drivers/cart-payment/cart-payment.service.ts
233
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
234
- */
235
- /**
236
- * \@inheritdoc
113
+ * @inheritdoc
237
114
  */
238
115
  class DaffInMemoryCartPaymentService {
239
- /**
240
- * @param {?} http
241
- */
242
116
  constructor(http) {
243
117
  this.http = http;
244
118
  /**
@@ -246,38 +120,20 @@ class DaffInMemoryCartPaymentService {
246
120
  */
247
121
  this.url = '/api/cart-payment';
248
122
  }
249
- /**
250
- * @param {?} cartId
251
- * @return {?}
252
- */
253
123
  get(cartId) {
254
124
  return this.http.get(`${this.url}/${cartId}`);
255
125
  }
256
- /**
257
- * @param {?} cartId
258
- * @param {?} payment
259
- * @return {?}
260
- */
261
126
  update(cartId, payment) {
262
127
  return this.http.put(`${this.url}/${cartId}`, { payment });
263
128
  }
264
- /**
265
- * @param {?} cartId
266
- * @param {?} payment
267
- * @param {?} address
268
- * @return {?}
269
- */
270
129
  updateWithBilling(cartId, payment, address) {
271
130
  return this.http.put(`${this.url}/${cartId}`, { payment, address });
272
131
  }
273
- /**
274
- * @param {?} cartId
275
- * @return {?}
276
- */
277
132
  remove(cartId) {
278
133
  return this.http.delete(`${this.url}/${cartId}`);
279
134
  }
280
135
  }
136
+ /** @nocollapse */ DaffInMemoryCartPaymentService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartPaymentService_Factory() { return new DaffInMemoryCartPaymentService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartPaymentService, providedIn: "root" });
281
137
  DaffInMemoryCartPaymentService.decorators = [
282
138
  { type: Injectable, args: [{
283
139
  providedIn: 'root',
@@ -287,32 +143,11 @@ DaffInMemoryCartPaymentService.decorators = [
287
143
  DaffInMemoryCartPaymentService.ctorParameters = () => [
288
144
  { type: HttpClient }
289
145
  ];
290
- /** @nocollapse */ DaffInMemoryCartPaymentService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartPaymentService_Factory() { return new DaffInMemoryCartPaymentService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartPaymentService, providedIn: "root" });
291
- if (false) {
292
- /**
293
- * The URL with which the driver makes calls to the backend.
294
- * @type {?}
295
- */
296
- DaffInMemoryCartPaymentService.prototype.url;
297
- /**
298
- * @type {?}
299
- * @private
300
- */
301
- DaffInMemoryCartPaymentService.prototype.http;
302
- }
303
146
 
304
147
  /**
305
- * @fileoverview added by tsickle
306
- * Generated from: drivers/cart-payment-methods/cart-payment-methods.service.ts
307
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
308
- */
309
- /**
310
- * \@inheritdoc
148
+ * @inheritdoc
311
149
  */
312
150
  class DaffInMemoryCartPaymentMethodsService {
313
- /**
314
- * @param {?} http
315
- */
316
151
  constructor(http) {
317
152
  this.http = http;
318
153
  /**
@@ -320,14 +155,11 @@ class DaffInMemoryCartPaymentMethodsService {
320
155
  */
321
156
  this.url = '/api/cart-payment-methods';
322
157
  }
323
- /**
324
- * @param {?} cartId
325
- * @return {?}
326
- */
327
158
  list(cartId) {
328
159
  return this.http.get(`${this.url}/${cartId}`);
329
160
  }
330
161
  }
162
+ /** @nocollapse */ DaffInMemoryCartPaymentMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartPaymentMethodsService_Factory() { return new DaffInMemoryCartPaymentMethodsService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartPaymentMethodsService, providedIn: "root" });
331
163
  DaffInMemoryCartPaymentMethodsService.decorators = [
332
164
  { type: Injectable, args: [{
333
165
  providedIn: 'root',
@@ -337,32 +169,11 @@ DaffInMemoryCartPaymentMethodsService.decorators = [
337
169
  DaffInMemoryCartPaymentMethodsService.ctorParameters = () => [
338
170
  { type: HttpClient }
339
171
  ];
340
- /** @nocollapse */ DaffInMemoryCartPaymentMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartPaymentMethodsService_Factory() { return new DaffInMemoryCartPaymentMethodsService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartPaymentMethodsService, providedIn: "root" });
341
- if (false) {
342
- /**
343
- * The URL with which the driver makes calls to the backend.
344
- * @type {?}
345
- */
346
- DaffInMemoryCartPaymentMethodsService.prototype.url;
347
- /**
348
- * @type {?}
349
- * @private
350
- */
351
- DaffInMemoryCartPaymentMethodsService.prototype.http;
352
- }
353
172
 
354
173
  /**
355
- * @fileoverview added by tsickle
356
- * Generated from: drivers/cart-shipping-address/cart-shipping-address.service.ts
357
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
358
- */
359
- /**
360
- * \@inheritdoc
174
+ * @inheritdoc
361
175
  */
362
176
  class DaffInMemoryCartShippingAddressService {
363
- /**
364
- * @param {?} http
365
- */
366
177
  constructor(http) {
367
178
  this.http = http;
368
179
  /**
@@ -370,22 +181,14 @@ class DaffInMemoryCartShippingAddressService {
370
181
  */
371
182
  this.url = '/api/cart-shipping-address';
372
183
  }
373
- /**
374
- * @param {?} cartId
375
- * @return {?}
376
- */
377
184
  get(cartId) {
378
185
  return this.http.get(`${this.url}/${cartId}`);
379
186
  }
380
- /**
381
- * @param {?} cartId
382
- * @param {?} address
383
- * @return {?}
384
- */
385
187
  update(cartId, address) {
386
188
  return this.http.put(`${this.url}/${cartId}`, address);
387
189
  }
388
190
  }
191
+ /** @nocollapse */ DaffInMemoryCartShippingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingAddressService_Factory() { return new DaffInMemoryCartShippingAddressService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartShippingAddressService, providedIn: "root" });
389
192
  DaffInMemoryCartShippingAddressService.decorators = [
390
193
  { type: Injectable, args: [{
391
194
  providedIn: 'root',
@@ -395,32 +198,11 @@ DaffInMemoryCartShippingAddressService.decorators = [
395
198
  DaffInMemoryCartShippingAddressService.ctorParameters = () => [
396
199
  { type: HttpClient }
397
200
  ];
398
- /** @nocollapse */ DaffInMemoryCartShippingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingAddressService_Factory() { return new DaffInMemoryCartShippingAddressService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartShippingAddressService, providedIn: "root" });
399
- if (false) {
400
- /**
401
- * The URL with which the driver makes calls to the backend.
402
- * @type {?}
403
- */
404
- DaffInMemoryCartShippingAddressService.prototype.url;
405
- /**
406
- * @type {?}
407
- * @private
408
- */
409
- DaffInMemoryCartShippingAddressService.prototype.http;
410
- }
411
201
 
412
202
  /**
413
- * @fileoverview added by tsickle
414
- * Generated from: drivers/cart-shipping-information/cart-shipping-information.service.ts
415
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
416
- */
417
- /**
418
- * \@inheritdoc
203
+ * @inheritdoc
419
204
  */
420
205
  class DaffInMemoryCartShippingInformationService {
421
- /**
422
- * @param {?} http
423
- */
424
206
  constructor(http) {
425
207
  this.http = http;
426
208
  /**
@@ -428,29 +210,17 @@ class DaffInMemoryCartShippingInformationService {
428
210
  */
429
211
  this.url = '/api/cart-shipping-information';
430
212
  }
431
- /**
432
- * @param {?} cartId
433
- * @return {?}
434
- */
435
213
  get(cartId) {
436
214
  return this.http.get(`${this.url}/${cartId}`);
437
215
  }
438
- /**
439
- * @param {?} cartId
440
- * @param {?} info
441
- * @return {?}
442
- */
443
216
  update(cartId, info) {
444
217
  return this.http.put(`${this.url}/${cartId}`, info);
445
218
  }
446
- /**
447
- * @param {?} cartId
448
- * @return {?}
449
- */
450
219
  delete(cartId) {
451
220
  return this.http.delete(`${this.url}/${cartId}`);
452
221
  }
453
222
  }
223
+ /** @nocollapse */ DaffInMemoryCartShippingInformationService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingInformationService_Factory() { return new DaffInMemoryCartShippingInformationService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartShippingInformationService, providedIn: "root" });
454
224
  DaffInMemoryCartShippingInformationService.decorators = [
455
225
  { type: Injectable, args: [{
456
226
  providedIn: 'root',
@@ -460,32 +230,11 @@ DaffInMemoryCartShippingInformationService.decorators = [
460
230
  DaffInMemoryCartShippingInformationService.ctorParameters = () => [
461
231
  { type: HttpClient }
462
232
  ];
463
- /** @nocollapse */ DaffInMemoryCartShippingInformationService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingInformationService_Factory() { return new DaffInMemoryCartShippingInformationService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartShippingInformationService, providedIn: "root" });
464
- if (false) {
465
- /**
466
- * The URL with which the driver makes calls to the backend.
467
- * @type {?}
468
- */
469
- DaffInMemoryCartShippingInformationService.prototype.url;
470
- /**
471
- * @type {?}
472
- * @private
473
- */
474
- DaffInMemoryCartShippingInformationService.prototype.http;
475
- }
476
233
 
477
234
  /**
478
- * @fileoverview added by tsickle
479
- * Generated from: drivers/cart-shipping-methods/cart-shipping-methods.service.ts
480
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
481
- */
482
- /**
483
- * \@inheritdoc
235
+ * @inheritdoc
484
236
  */
485
237
  class DaffInMemoryCartShippingMethodsService {
486
- /**
487
- * @param {?} http
488
- */
489
238
  constructor(http) {
490
239
  this.http = http;
491
240
  /**
@@ -493,14 +242,11 @@ class DaffInMemoryCartShippingMethodsService {
493
242
  */
494
243
  this.url = '/api/cart-shipping-methods';
495
244
  }
496
- /**
497
- * @param {?} cartId
498
- * @return {?}
499
- */
500
245
  list(cartId) {
501
246
  return this.http.get(`${this.url}/${cartId}`);
502
247
  }
503
248
  }
249
+ /** @nocollapse */ DaffInMemoryCartShippingMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingMethodsService_Factory() { return new DaffInMemoryCartShippingMethodsService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartShippingMethodsService, providedIn: "root" });
504
250
  DaffInMemoryCartShippingMethodsService.decorators = [
505
251
  { type: Injectable, args: [{
506
252
  providedIn: 'root',
@@ -510,32 +256,11 @@ DaffInMemoryCartShippingMethodsService.decorators = [
510
256
  DaffInMemoryCartShippingMethodsService.ctorParameters = () => [
511
257
  { type: HttpClient }
512
258
  ];
513
- /** @nocollapse */ DaffInMemoryCartShippingMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartShippingMethodsService_Factory() { return new DaffInMemoryCartShippingMethodsService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartShippingMethodsService, providedIn: "root" });
514
- if (false) {
515
- /**
516
- * The URL with which the driver makes calls to the backend.
517
- * @type {?}
518
- */
519
- DaffInMemoryCartShippingMethodsService.prototype.url;
520
- /**
521
- * @type {?}
522
- * @private
523
- */
524
- DaffInMemoryCartShippingMethodsService.prototype.http;
525
- }
526
259
 
527
260
  /**
528
- * @fileoverview added by tsickle
529
- * Generated from: drivers/cart-order/cart-order.service.ts
530
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
531
- */
532
- /**
533
- * \@inheritdoc
261
+ * @inheritdoc
534
262
  */
535
263
  class DaffInMemoryCartOrderService {
536
- /**
537
- * @param {?} http
538
- */
539
264
  constructor(http) {
540
265
  this.http = http;
541
266
  /**
@@ -543,15 +268,11 @@ class DaffInMemoryCartOrderService {
543
268
  */
544
269
  this.url = '/api/cart-order';
545
270
  }
546
- /**
547
- * @param {?} cartId
548
- * @param {?=} payment
549
- * @return {?}
550
- */
551
271
  placeOrder(cartId, payment) {
552
272
  return this.http.post(`${this.url}/${cartId}/`, { payment });
553
273
  }
554
274
  }
275
+ /** @nocollapse */ DaffInMemoryCartOrderService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartOrderService_Factory() { return new DaffInMemoryCartOrderService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartOrderService, providedIn: "root" });
555
276
  DaffInMemoryCartOrderService.decorators = [
556
277
  { type: Injectable, args: [{
557
278
  providedIn: 'root',
@@ -561,32 +282,11 @@ DaffInMemoryCartOrderService.decorators = [
561
282
  DaffInMemoryCartOrderService.ctorParameters = () => [
562
283
  { type: HttpClient }
563
284
  ];
564
- /** @nocollapse */ DaffInMemoryCartOrderService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartOrderService_Factory() { return new DaffInMemoryCartOrderService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartOrderService, providedIn: "root" });
565
- if (false) {
566
- /**
567
- * The URL with which the driver makes calls to the backend.
568
- * @type {?}
569
- */
570
- DaffInMemoryCartOrderService.prototype.url;
571
- /**
572
- * @type {?}
573
- * @private
574
- */
575
- DaffInMemoryCartOrderService.prototype.http;
576
- }
577
285
 
578
286
  /**
579
- * @fileoverview added by tsickle
580
- * Generated from: drivers/cart-coupon/cart-coupon.service.ts
581
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
582
- */
583
- /**
584
- * \@inheritdoc
287
+ * @inheritdoc
585
288
  */
586
289
  class DaffInMemoryCartCouponService {
587
- /**
588
- * @param {?} http
589
- */
590
290
  constructor(http) {
591
291
  this.http = http;
592
292
  /**
@@ -594,37 +294,20 @@ class DaffInMemoryCartCouponService {
594
294
  */
595
295
  this.url = '/api/cart-coupon';
596
296
  }
597
- /**
598
- * @param {?} cartId
599
- * @return {?}
600
- */
601
297
  list(cartId) {
602
298
  return this.http.get(`${this.url}/${cartId}/`);
603
299
  }
604
- /**
605
- * @param {?} cartId
606
- * @param {?} coupon
607
- * @return {?}
608
- */
609
300
  apply(cartId, coupon) {
610
301
  return this.http.post(`${this.url}/${cartId}/`, coupon);
611
302
  }
612
- /**
613
- * @param {?} cartId
614
- * @param {?} coupon
615
- * @return {?}
616
- */
617
303
  remove(cartId, coupon) {
618
304
  return this.http.delete(`${this.url}/${cartId}/${coupon.code}`);
619
305
  }
620
- /**
621
- * @param {?} cartId
622
- * @return {?}
623
- */
624
306
  removeAll(cartId) {
625
307
  return this.http.delete(`${this.url}/${cartId}/`);
626
308
  }
627
309
  }
310
+ /** @nocollapse */ DaffInMemoryCartCouponService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartCouponService_Factory() { return new DaffInMemoryCartCouponService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartCouponService, providedIn: "root" });
628
311
  DaffInMemoryCartCouponService.decorators = [
629
312
  { type: Injectable, args: [{
630
313
  providedIn: 'root',
@@ -634,32 +317,11 @@ DaffInMemoryCartCouponService.decorators = [
634
317
  DaffInMemoryCartCouponService.ctorParameters = () => [
635
318
  { type: HttpClient }
636
319
  ];
637
- /** @nocollapse */ DaffInMemoryCartCouponService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartCouponService_Factory() { return new DaffInMemoryCartCouponService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartCouponService, providedIn: "root" });
638
- if (false) {
639
- /**
640
- * The URL with which the driver makes calls to the backend.
641
- * @type {?}
642
- */
643
- DaffInMemoryCartCouponService.prototype.url;
644
- /**
645
- * @type {?}
646
- * @private
647
- */
648
- DaffInMemoryCartCouponService.prototype.http;
649
- }
650
320
 
651
321
  /**
652
- * @fileoverview added by tsickle
653
- * Generated from: drivers/cart-address/cart-address.service.ts
654
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
655
- */
656
- /**
657
- * \@inheritdoc
322
+ * @inheritdoc
658
323
  */
659
324
  class DaffInMemoryCartAddressService {
660
- /**
661
- * @param {?} http
662
- */
663
325
  constructor(http) {
664
326
  this.http = http;
665
327
  /**
@@ -667,15 +329,11 @@ class DaffInMemoryCartAddressService {
667
329
  */
668
330
  this.url = '/api/cart-address';
669
331
  }
670
- /**
671
- * @param {?} cartId
672
- * @param {?} address
673
- * @return {?}
674
- */
675
332
  update(cartId, address) {
676
333
  return this.http.put(`${this.url}/${cartId}`, address);
677
334
  }
678
335
  }
336
+ /** @nocollapse */ DaffInMemoryCartAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartAddressService_Factory() { return new DaffInMemoryCartAddressService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartAddressService, providedIn: "root" });
679
337
  DaffInMemoryCartAddressService.decorators = [
680
338
  { type: Injectable, args: [{
681
339
  providedIn: 'root',
@@ -685,29 +343,8 @@ DaffInMemoryCartAddressService.decorators = [
685
343
  DaffInMemoryCartAddressService.ctorParameters = () => [
686
344
  { type: HttpClient }
687
345
  ];
688
- /** @nocollapse */ DaffInMemoryCartAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryCartAddressService_Factory() { return new DaffInMemoryCartAddressService(ɵɵinject(HttpClient)); }, token: DaffInMemoryCartAddressService, providedIn: "root" });
689
- if (false) {
690
- /**
691
- * The URL with which the driver makes calls to the backend.
692
- * @type {?}
693
- */
694
- DaffInMemoryCartAddressService.prototype.url;
695
- /**
696
- * @type {?}
697
- * @private
698
- */
699
- DaffInMemoryCartAddressService.prototype.http;
700
- }
701
346
 
702
- /**
703
- * @fileoverview added by tsickle
704
- * Generated from: drivers/cart-driver.module.ts
705
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
706
- */
707
347
  class DaffCartInMemoryDriverModule {
708
- /**
709
- * @return {?}
710
- */
711
348
  static forRoot() {
712
349
  return {
713
350
  ngModule: DaffCartInMemoryDriverModule,
@@ -768,17 +405,6 @@ DaffCartInMemoryDriverModule.decorators = [
768
405
  },] }
769
406
  ];
770
407
 
771
- /**
772
- * @fileoverview added by tsickle
773
- * Generated from: drivers/public_api.ts
774
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
775
- */
776
-
777
- /**
778
- * @fileoverview added by tsickle
779
- * Generated from: injection-tokens/extra-attributes-hook.token.ts
780
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
781
- */
782
408
  /**
783
409
  * Allows an app dev to generate extra fields in the in-memory backend.
784
410
  * This enables the in-memory drivers to return responses similar to what the
@@ -796,77 +422,36 @@ DaffCartInMemoryDriverModule.decorators = [
796
422
  *
797
423
  * Note that this and any `extra_attributes` features are for advanced users
798
424
  * and should be used with care.
799
- * @type {?}
800
425
  */
801
426
  const DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK = new InjectionToken('DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK', {
802
- factory: (/**
803
- * @return {?}
804
- */
805
- () => (/**
806
- * @param {?} reqInfo
807
- * @param {?} cart
808
- * @return {?}
809
- */
810
- (reqInfo, cart) => ({}))),
427
+ factory: () => (reqInfo, cart) => ({}),
811
428
  });
812
429
 
813
430
  /**
814
- * @fileoverview added by tsickle
815
- * Generated from: injection-tokens/public_api.ts
816
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
817
- */
818
-
819
- /**
820
- * @fileoverview added by tsickle
821
- * Generated from: backend/cart-address/cart-address.service.ts
822
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
823
- */
824
- /**
825
- * \@inheritdoc
431
+ * @inheritdoc
826
432
  */
827
433
  class DaffInMemoryBackendCartAddressService {
828
- /**
829
- * @param {?} extraFieldsHook
830
- */
831
434
  constructor(extraFieldsHook) {
832
435
  this.extraFieldsHook = extraFieldsHook;
833
436
  }
834
- /**
835
- * @param {?} reqInfo
836
- * @return {?}
837
- */
838
437
  put(reqInfo) {
839
- return reqInfo.utils.createResponse$((/**
840
- * @return {?}
841
- */
842
- () => ({
438
+ return reqInfo.utils.createResponse$(() => ({
843
439
  body: this.updateAddress(reqInfo),
844
440
  status: STATUS.OK,
845
- })));
441
+ }));
846
442
  }
847
- /**
848
- * @private
849
- * @param {?} reqInfo
850
- * @return {?}
851
- */
852
443
  getCart(reqInfo) {
853
444
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
854
445
  }
855
- /**
856
- * @private
857
- * @param {?} reqInfo
858
- * @return {?}
859
- */
860
446
  updateAddress(reqInfo) {
861
- /** @type {?} */
862
447
  const cart = this.getCart(reqInfo);
863
- /** @type {?} */
864
448
  const address = reqInfo.utils.getJsonBody(reqInfo.req);
865
449
  cart.billing_address = address;
866
450
  cart.shipping_address = address;
867
451
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
868
452
  }
869
453
  }
454
+ /** @nocollapse */ DaffInMemoryBackendCartAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartAddressService_Factory() { return new DaffInMemoryBackendCartAddressService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartAddressService, providedIn: "root" });
870
455
  DaffInMemoryBackendCartAddressService.decorators = [
871
456
  { type: Injectable, args: [{
872
457
  providedIn: 'root',
@@ -876,86 +461,40 @@ DaffInMemoryBackendCartAddressService.decorators = [
876
461
  DaffInMemoryBackendCartAddressService.ctorParameters = () => [
877
462
  { type: undefined, decorators: [{ type: Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
878
463
  ];
879
- /** @nocollapse */ DaffInMemoryBackendCartAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartAddressService_Factory() { return new DaffInMemoryBackendCartAddressService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartAddressService, providedIn: "root" });
880
- if (false) {
881
- /**
882
- * @type {?}
883
- * @private
884
- */
885
- DaffInMemoryBackendCartAddressService.prototype.extraFieldsHook;
886
- }
887
464
 
888
465
  /**
889
- * @fileoverview added by tsickle
890
- * Generated from: backend/cart-billing-address/cart-billing-address.service.ts
891
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
892
- */
893
- /**
894
- * \@inheritdoc
466
+ * @inheritdoc
895
467
  */
896
468
  class DaffInMemoryBackendCartBillingAddressService {
897
- /**
898
- * @param {?} extraFieldsHook
899
- */
900
469
  constructor(extraFieldsHook) {
901
470
  this.extraFieldsHook = extraFieldsHook;
902
471
  }
903
- /**
904
- * @param {?} reqInfo
905
- * @return {?}
906
- */
907
472
  get(reqInfo) {
908
- return reqInfo.utils.createResponse$((/**
909
- * @return {?}
910
- */
911
- () => ({
473
+ return reqInfo.utils.createResponse$(() => ({
912
474
  body: this.getBillingAddress(reqInfo),
913
475
  status: STATUS.OK,
914
- })));
476
+ }));
915
477
  }
916
- /**
917
- * @param {?} reqInfo
918
- * @return {?}
919
- */
920
478
  put(reqInfo) {
921
- return reqInfo.utils.createResponse$((/**
922
- * @return {?}
923
- */
924
- () => ({
479
+ return reqInfo.utils.createResponse$(() => ({
925
480
  body: this.updateBillingAddress(reqInfo),
926
481
  status: STATUS.OK,
927
- })));
482
+ }));
928
483
  }
929
- /**
930
- * @private
931
- * @param {?} reqInfo
932
- * @return {?}
933
- */
934
484
  getCart(reqInfo) {
935
485
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
936
486
  }
937
- /**
938
- * @private
939
- * @param {?} reqInfo
940
- * @return {?}
941
- */
942
487
  getBillingAddress(reqInfo) {
943
488
  return this.getCart(reqInfo).billing_address;
944
489
  }
945
- /**
946
- * @private
947
- * @param {?} reqInfo
948
- * @return {?}
949
- */
950
490
  updateBillingAddress(reqInfo) {
951
- /** @type {?} */
952
491
  const cart = this.getCart(reqInfo);
953
- /** @type {?} */
954
492
  const address = reqInfo.utils.getJsonBody(reqInfo.req);
955
493
  cart.billing_address = address;
956
494
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
957
495
  }
958
496
  }
497
+ /** @nocollapse */ DaffInMemoryBackendCartBillingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartBillingAddressService_Factory() { return new DaffInMemoryBackendCartBillingAddressService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartBillingAddressService, providedIn: "root" });
959
498
  DaffInMemoryBackendCartBillingAddressService.decorators = [
960
499
  { type: Injectable, args: [{
961
500
  providedIn: 'root',
@@ -965,68 +504,29 @@ DaffInMemoryBackendCartBillingAddressService.decorators = [
965
504
  DaffInMemoryBackendCartBillingAddressService.ctorParameters = () => [
966
505
  { type: undefined, decorators: [{ type: Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
967
506
  ];
968
- /** @nocollapse */ DaffInMemoryBackendCartBillingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartBillingAddressService_Factory() { return new DaffInMemoryBackendCartBillingAddressService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartBillingAddressService, providedIn: "root" });
969
- if (false) {
970
- /**
971
- * @type {?}
972
- * @private
973
- */
974
- DaffInMemoryBackendCartBillingAddressService.prototype.extraFieldsHook;
975
- }
976
507
 
977
508
  /**
978
- * @fileoverview added by tsickle
979
- * Generated from: backend/cart-coupon/cart-coupon.service.ts
980
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
981
- */
982
- /**
983
- * \@inheritdoc
509
+ * @inheritdoc
984
510
  */
985
511
  class DaffInMemoryBackendCartCouponService {
986
- /**
987
- * @param {?} extraFieldsHook
988
- */
989
512
  constructor(extraFieldsHook) {
990
513
  this.extraFieldsHook = extraFieldsHook;
991
514
  }
992
- /**
993
- * @param {?} reqInfo
994
- * @return {?}
995
- */
996
515
  get(reqInfo) {
997
- return reqInfo.utils.createResponse$((/**
998
- * @return {?}
999
- */
1000
- () => ({
516
+ return reqInfo.utils.createResponse$(() => ({
1001
517
  body: this.listCoupons(reqInfo),
1002
518
  status: STATUS.OK,
1003
- })));
519
+ }));
1004
520
  }
1005
- /**
1006
- * @param {?} reqInfo
1007
- * @return {?}
1008
- */
1009
521
  post(reqInfo) {
1010
- return reqInfo.utils.createResponse$((/**
1011
- * @return {?}
1012
- */
1013
- () => ({
522
+ return reqInfo.utils.createResponse$(() => ({
1014
523
  body: this.applyCoupon(reqInfo),
1015
524
  status: STATUS.OK,
1016
- })));
525
+ }));
1017
526
  }
1018
- /**
1019
- * @param {?} reqInfo
1020
- * @return {?}
1021
- */
1022
527
  delete(reqInfo) {
1023
- return reqInfo.utils.createResponse$((/**
1024
- * @return {?}
1025
- */
1026
- () => {
1027
- /** @type {?} */
528
+ return reqInfo.utils.createResponse$(() => {
1028
529
  let body;
1029
- /** @type {?} */
1030
530
  const action = this.getAction(reqInfo);
1031
531
  if (action) {
1032
532
  body = this.removeCoupon(reqInfo, action);
@@ -1038,74 +538,38 @@ class DaffInMemoryBackendCartCouponService {
1038
538
  body,
1039
539
  status: STATUS.OK,
1040
540
  };
1041
- }));
541
+ });
1042
542
  }
1043
543
  /**
1044
544
  * Gets whatever follows the cart ID section of the request URL.
1045
- * @private
1046
- * @param {?} reqInfo
1047
- * @return {?}
1048
545
  */
1049
546
  getAction(reqInfo) {
1050
547
  return reqInfo.url.replace(`/${reqInfo.resourceUrl}${reqInfo.id}/`, '');
1051
548
  }
1052
- /**
1053
- * @private
1054
- * @param {?} reqInfo
1055
- * @return {?}
1056
- */
1057
549
  getCart(reqInfo) {
1058
550
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1059
551
  }
1060
- /**
1061
- * @private
1062
- * @param {?} reqInfo
1063
- * @return {?}
1064
- */
1065
552
  listCoupons(reqInfo) {
1066
553
  return this.getCart(reqInfo).coupons;
1067
554
  }
1068
- /**
1069
- * @private
1070
- * @param {?} reqInfo
1071
- * @return {?}
1072
- */
1073
555
  applyCoupon(reqInfo) {
1074
- /** @type {?} */
1075
556
  const cart = this.getCart(reqInfo);
1076
- /** @type {?} */
1077
557
  const coupon = reqInfo.utils.getJsonBody(reqInfo.req);
1078
558
  cart.coupons.push(coupon);
1079
559
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1080
560
  }
1081
- /**
1082
- * @private
1083
- * @param {?} reqInfo
1084
- * @param {?} couponCode
1085
- * @return {?}
1086
- */
1087
561
  removeCoupon(reqInfo, couponCode) {
1088
- /** @type {?} */
1089
562
  const cart = this.getCart(reqInfo);
1090
- cart.coupons = cart.coupons.filter((/**
1091
- * @param {?} __0
1092
- * @return {?}
1093
- */
1094
- ({ code }) => code !== couponCode));
563
+ cart.coupons = cart.coupons.filter(({ code }) => code !== couponCode);
1095
564
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1096
565
  }
1097
- /**
1098
- * @private
1099
- * @param {?} reqInfo
1100
- * @return {?}
1101
- */
1102
566
  removeAllCoupons(reqInfo) {
1103
- /** @type {?} */
1104
567
  const cart = this.getCart(reqInfo);
1105
568
  cart.coupons = [];
1106
569
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1107
570
  }
1108
571
  }
572
+ /** @nocollapse */ DaffInMemoryBackendCartCouponService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartCouponService_Factory() { return new DaffInMemoryBackendCartCouponService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartCouponService, providedIn: "root" });
1109
573
  DaffInMemoryBackendCartCouponService.decorators = [
1110
574
  { type: Injectable, args: [{
1111
575
  providedIn: 'root',
@@ -1115,44 +579,18 @@ DaffInMemoryBackendCartCouponService.decorators = [
1115
579
  DaffInMemoryBackendCartCouponService.ctorParameters = () => [
1116
580
  { type: undefined, decorators: [{ type: Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1117
581
  ];
1118
- /** @nocollapse */ DaffInMemoryBackendCartCouponService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartCouponService_Factory() { return new DaffInMemoryBackendCartCouponService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartCouponService, providedIn: "root" });
1119
- if (false) {
1120
- /**
1121
- * @type {?}
1122
- * @private
1123
- */
1124
- DaffInMemoryBackendCartCouponService.prototype.extraFieldsHook;
1125
- }
1126
582
 
1127
583
  /**
1128
- * @fileoverview added by tsickle
1129
- * Generated from: backend/cart-items/cart-items.service.ts
1130
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1131
- */
1132
- /**
1133
- * \@inheritdoc
584
+ * @inheritdoc
1134
585
  */
1135
586
  class DaffInMemoryBackendCartItemsService {
1136
- /**
1137
- * @param {?} cartItemFactory
1138
- * @param {?} extraFieldsHook
1139
- */
1140
587
  constructor(cartItemFactory, extraFieldsHook) {
1141
588
  this.cartItemFactory = cartItemFactory;
1142
589
  this.extraFieldsHook = extraFieldsHook;
1143
590
  }
1144
- /**
1145
- * @param {?} reqInfo
1146
- * @return {?}
1147
- */
1148
591
  get(reqInfo) {
1149
- return reqInfo.utils.createResponse$((/**
1150
- * @return {?}
1151
- */
1152
- () => {
1153
- /** @type {?} */
592
+ return reqInfo.utils.createResponse$(() => {
1154
593
  let body;
1155
- /** @type {?} */
1156
594
  const action = this.getAction(reqInfo);
1157
595
  if (action) {
1158
596
  body = this.getItem(reqInfo, action);
@@ -1164,157 +602,61 @@ class DaffInMemoryBackendCartItemsService {
1164
602
  body,
1165
603
  status: STATUS.OK,
1166
604
  };
1167
- }));
605
+ });
1168
606
  }
1169
- /**
1170
- * @param {?} reqInfo
1171
- * @return {?}
1172
- */
1173
607
  put(reqInfo) {
1174
- return reqInfo.utils.createResponse$((/**
1175
- * @return {?}
1176
- */
1177
- () => ({
608
+ return reqInfo.utils.createResponse$(() => ({
1178
609
  body: this.updateItem(reqInfo, this.getAction(reqInfo)),
1179
610
  status: STATUS.OK,
1180
- })));
611
+ }));
1181
612
  }
1182
- /**
1183
- * @param {?} reqInfo
1184
- * @return {?}
1185
- */
1186
613
  post(reqInfo) {
1187
- return reqInfo.utils.createResponse$((/**
1188
- * @return {?}
1189
- */
1190
- () => ({
614
+ return reqInfo.utils.createResponse$(() => ({
1191
615
  body: this.addItem(reqInfo),
1192
616
  status: STATUS.OK,
1193
- })));
617
+ }));
1194
618
  }
1195
- /**
1196
- * @param {?} reqInfo
1197
- * @return {?}
1198
- */
1199
619
  delete(reqInfo) {
1200
- return reqInfo.utils.createResponse$((/**
1201
- * @return {?}
1202
- */
1203
- () => ({
620
+ return reqInfo.utils.createResponse$(() => ({
1204
621
  body: this.deleteItem(reqInfo, this.getAction(reqInfo)),
1205
622
  status: STATUS.OK,
1206
- })));
623
+ }));
1207
624
  }
1208
625
  /**
1209
626
  * Gets whatever follows the cart ID section of the request URL.
1210
- * @private
1211
- * @param {?} reqInfo
1212
- * @return {?}
1213
627
  */
1214
628
  getAction(reqInfo) {
1215
629
  return reqInfo.url.replace(`/${reqInfo.resourceUrl}${reqInfo.id}/`, '');
1216
630
  }
1217
- /**
1218
- * @private
1219
- * @param {?} reqInfo
1220
- * @return {?}
1221
- */
1222
631
  getCart(reqInfo) {
1223
632
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1224
633
  }
1225
- /**
1226
- * @private
1227
- * @param {?} itemInput
1228
- * @return {?}
1229
- */
1230
634
  transformItemInput(itemInput) {
1231
635
  return Object.assign(Object.assign(Object.assign({}, this.cartItemFactory.create()), itemInput), { product_id: itemInput.productId });
1232
636
  }
1233
- /**
1234
- * @private
1235
- * @param {?} reqInfo
1236
- * @return {?}
1237
- */
1238
637
  listItems(reqInfo) {
1239
638
  return this.getCart(reqInfo).items;
1240
639
  }
1241
- /**
1242
- * @private
1243
- * @param {?} reqInfo
1244
- * @param {?} itemId
1245
- * @return {?}
1246
- */
1247
640
  getItem(reqInfo, itemId) {
1248
- /** @type {?} */
1249
641
  const cart = this.getCart(reqInfo);
1250
- return cart.items.find((/**
1251
- * @param {?} __0
1252
- * @return {?}
1253
- */
1254
- ({ id }) => itemId === id));
642
+ return cart.items.find(({ id }) => itemId === id);
1255
643
  }
1256
- /**
1257
- * @private
1258
- * @param {?} reqInfo
1259
- * @param {?} itemId
1260
- * @return {?}
1261
- */
1262
644
  updateItem(reqInfo, itemId) {
1263
- /** @type {?} */
1264
645
  const cart = this.getCart(reqInfo);
1265
- /** @type {?} */
1266
- const cartIndex = reqInfo.collection.findIndex((/**
1267
- * @param {?} c
1268
- * @return {?}
1269
- */
1270
- c => c.id === reqInfo.id));
1271
- /** @type {?} */
646
+ const cartIndex = reqInfo.collection.findIndex(c => c.id === reqInfo.id);
1272
647
  const itemChanges = reqInfo.utils.getJsonBody(reqInfo.req);
1273
- /** @type {?} */
1274
- const itemIndex = cart.items.findIndex((/**
1275
- * @param {?} item
1276
- * @return {?}
1277
- */
1278
- (item) => itemId === item.id));
1279
- reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.map((/**
1280
- * @param {?} item
1281
- * @param {?} index
1282
- * @return {?}
1283
- */
1284
- (item, index) => index === itemIndex ? Object.assign(Object.assign({}, cart.items[itemIndex]), itemChanges) : item)), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
648
+ const itemIndex = cart.items.findIndex((item) => itemId === item.id);
649
+ reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.map((item, index) => index === itemIndex ? Object.assign(Object.assign({}, cart.items[itemIndex]), itemChanges) : item), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1285
650
  return reqInfo.collection[cartIndex];
1286
651
  }
1287
- /**
1288
- * @private
1289
- * @param {?} reqInfo
1290
- * @return {?}
1291
- */
1292
652
  addItem(reqInfo) {
1293
- /** @type {?} */
1294
653
  const cart = this.getCart(reqInfo);
1295
- /** @type {?} */
1296
- const cartIndex = reqInfo.collection.findIndex((/**
1297
- * @param {?} c
1298
- * @return {?}
1299
- */
1300
- c => c.id === reqInfo.id));
1301
- /** @type {?} */
654
+ const cartIndex = reqInfo.collection.findIndex(c => c.id === reqInfo.id);
1302
655
  const itemInput = reqInfo.utils.getJsonBody(reqInfo.req);
1303
- /** @type {?} */
1304
- const existingCartItemIndex = cart.items.findIndex((/**
1305
- * @param {?} item
1306
- * @return {?}
1307
- */
1308
- item => item.product_id === itemInput.productId));
656
+ const existingCartItemIndex = cart.items.findIndex(item => item.product_id === itemInput.productId);
1309
657
  if (existingCartItemIndex > -1) {
1310
- /** @type {?} */
1311
658
  const updatedCartItem = Object.assign(Object.assign({}, cart.items[existingCartItemIndex]), { qty: cart.items[existingCartItemIndex].qty + itemInput.qty });
1312
- reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.map((/**
1313
- * @param {?} item
1314
- * @param {?} index
1315
- * @return {?}
1316
- */
1317
- (item, index) => index === existingCartItemIndex ? updatedCartItem : item)), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
659
+ reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.map((item, index) => index === existingCartItemIndex ? updatedCartItem : item), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1318
660
  }
1319
661
  else {
1320
662
  reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: [
@@ -1324,36 +666,15 @@ class DaffInMemoryBackendCartItemsService {
1324
666
  }
1325
667
  return reqInfo.collection[cartIndex];
1326
668
  }
1327
- /**
1328
- * @private
1329
- * @param {?} reqInfo
1330
- * @param {?} itemId
1331
- * @return {?}
1332
- */
1333
669
  deleteItem(reqInfo, itemId) {
1334
- /** @type {?} */
1335
670
  const cart = this.getCart(reqInfo);
1336
- /** @type {?} */
1337
- const itemIndex = cart.items.findIndex((/**
1338
- * @param {?} __0
1339
- * @return {?}
1340
- */
1341
- ({ id }) => itemId === id));
1342
- /** @type {?} */
1343
- const cartIndex = reqInfo.collection.findIndex((/**
1344
- * @param {?} c
1345
- * @return {?}
1346
- */
1347
- c => c.id === reqInfo.id));
1348
- reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.filter((/**
1349
- * @param {?} item
1350
- * @param {?} index
1351
- * @return {?}
1352
- */
1353
- (item, index) => index !== itemIndex)), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
671
+ const itemIndex = cart.items.findIndex(({ id }) => itemId === id);
672
+ const cartIndex = reqInfo.collection.findIndex(c => c.id === reqInfo.id);
673
+ reqInfo.collection[cartIndex] = Object.assign(Object.assign({}, cart), { items: cart.items.filter((item, index) => index !== itemIndex), extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1354
674
  return reqInfo.collection[cartIndex];
1355
675
  }
1356
676
  }
677
+ /** @nocollapse */ DaffInMemoryBackendCartItemsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartItemsService_Factory() { return new DaffInMemoryBackendCartItemsService(ɵɵinject(DaffCartItemFactory), ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartItemsService, providedIn: "root" });
1357
678
  DaffInMemoryBackendCartItemsService.decorators = [
1358
679
  { type: Injectable, args: [{
1359
680
  providedIn: 'root',
@@ -1364,47 +685,17 @@ DaffInMemoryBackendCartItemsService.ctorParameters = () => [
1364
685
  { type: DaffCartItemFactory },
1365
686
  { type: undefined, decorators: [{ type: Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1366
687
  ];
1367
- /** @nocollapse */ DaffInMemoryBackendCartItemsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartItemsService_Factory() { return new DaffInMemoryBackendCartItemsService(ɵɵinject(DaffCartItemFactory), ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartItemsService, providedIn: "root" });
1368
- if (false) {
1369
- /**
1370
- * @type {?}
1371
- * @private
1372
- */
1373
- DaffInMemoryBackendCartItemsService.prototype.cartItemFactory;
1374
- /**
1375
- * @type {?}
1376
- * @private
1377
- */
1378
- DaffInMemoryBackendCartItemsService.prototype.extraFieldsHook;
1379
- }
1380
688
 
1381
689
  /**
1382
- * @fileoverview added by tsickle
1383
- * Generated from: backend/cart-order/cart-order.service.ts
1384
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1385
- */
1386
- /**
1387
- * \@inheritdoc
690
+ * @inheritdoc
1388
691
  */
1389
692
  class DaffInMemoryBackendCartOrderService {
1390
- /**
1391
- * @param {?} reqInfo
1392
- * @return {?}
1393
- */
1394
693
  post(reqInfo) {
1395
- return reqInfo.utils.createResponse$((/**
1396
- * @return {?}
1397
- */
1398
- () => ({
694
+ return reqInfo.utils.createResponse$(() => ({
1399
695
  body: this.placeOrder(reqInfo),
1400
696
  status: STATUS.OK,
1401
- })));
697
+ }));
1402
698
  }
1403
- /**
1404
- * @private
1405
- * @param {?} reqInfo
1406
- * @return {?}
1407
- */
1408
699
  placeOrder(reqInfo) {
1409
700
  return {
1410
701
  id: '8235422034',
@@ -1413,136 +704,69 @@ class DaffInMemoryBackendCartOrderService {
1413
704
  };
1414
705
  }
1415
706
  }
707
+ /** @nocollapse */ DaffInMemoryBackendCartOrderService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartOrderService_Factory() { return new DaffInMemoryBackendCartOrderService(); }, token: DaffInMemoryBackendCartOrderService, providedIn: "root" });
1416
708
  DaffInMemoryBackendCartOrderService.decorators = [
1417
709
  { type: Injectable, args: [{
1418
710
  providedIn: 'root',
1419
711
  },] }
1420
712
  ];
1421
- /** @nocollapse */ DaffInMemoryBackendCartOrderService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartOrderService_Factory() { return new DaffInMemoryBackendCartOrderService(); }, token: DaffInMemoryBackendCartOrderService, providedIn: "root" });
1422
713
 
1423
714
  /**
1424
- * @fileoverview added by tsickle
1425
- * Generated from: backend/cart-payment-methods/cart-payment-methods.service.ts
1426
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1427
- */
1428
- /**
1429
- * \@inheritdoc
715
+ * @inheritdoc
1430
716
  */
1431
717
  class DaffInMemoryBackendCartPaymentMethodsService {
1432
- /**
1433
- * @param {?} reqInfo
1434
- * @return {?}
1435
- */
1436
718
  get(reqInfo) {
1437
- return reqInfo.utils.createResponse$((/**
1438
- * @return {?}
1439
- */
1440
- () => ({
719
+ return reqInfo.utils.createResponse$(() => ({
1441
720
  body: this.listPaymentMethods(reqInfo),
1442
721
  status: STATUS.OK,
1443
- })));
722
+ }));
1444
723
  }
1445
- /**
1446
- * @private
1447
- * @param {?} reqInfo
1448
- * @return {?}
1449
- */
1450
724
  getCart(reqInfo) {
1451
725
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1452
726
  }
1453
- /**
1454
- * @private
1455
- * @param {?} reqInfo
1456
- * @return {?}
1457
- */
1458
727
  listPaymentMethods(reqInfo) {
1459
728
  return this.getCart(reqInfo).available_payment_methods;
1460
729
  }
1461
730
  }
731
+ /** @nocollapse */ DaffInMemoryBackendCartPaymentMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartPaymentMethodsService_Factory() { return new DaffInMemoryBackendCartPaymentMethodsService(); }, token: DaffInMemoryBackendCartPaymentMethodsService, providedIn: "root" });
1462
732
  DaffInMemoryBackendCartPaymentMethodsService.decorators = [
1463
733
  { type: Injectable, args: [{
1464
734
  providedIn: 'root',
1465
735
  },] }
1466
736
  ];
1467
- /** @nocollapse */ DaffInMemoryBackendCartPaymentMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartPaymentMethodsService_Factory() { return new DaffInMemoryBackendCartPaymentMethodsService(); }, token: DaffInMemoryBackendCartPaymentMethodsService, providedIn: "root" });
1468
737
 
1469
738
  /**
1470
- * @fileoverview added by tsickle
1471
- * Generated from: backend/cart-payment/cart-payment.service.ts
1472
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1473
- */
1474
- /**
1475
- * \@inheritdoc
739
+ * @inheritdoc
1476
740
  */
1477
741
  class DaffInMemoryBackendCartPaymentService {
1478
- /**
1479
- * @param {?} extraFieldsHook
1480
- */
1481
742
  constructor(extraFieldsHook) {
1482
743
  this.extraFieldsHook = extraFieldsHook;
1483
744
  }
1484
- /**
1485
- * @param {?} reqInfo
1486
- * @return {?}
1487
- */
1488
745
  get(reqInfo) {
1489
- return reqInfo.utils.createResponse$((/**
1490
- * @return {?}
1491
- */
1492
- () => ({
746
+ return reqInfo.utils.createResponse$(() => ({
1493
747
  body: this.getPayment(reqInfo),
1494
748
  status: STATUS.OK,
1495
- })));
749
+ }));
1496
750
  }
1497
- /**
1498
- * @param {?} reqInfo
1499
- * @return {?}
1500
- */
1501
751
  put(reqInfo) {
1502
- return reqInfo.utils.createResponse$((/**
1503
- * @return {?}
1504
- */
1505
- () => ({
752
+ return reqInfo.utils.createResponse$(() => ({
1506
753
  body: this.updatePayment(reqInfo),
1507
754
  status: STATUS.OK,
1508
- })));
755
+ }));
1509
756
  }
1510
- /**
1511
- * @param {?} reqInfo
1512
- * @return {?}
1513
- */
1514
757
  delete(reqInfo) {
1515
- return reqInfo.utils.createResponse$((/**
1516
- * @return {?}
1517
- */
1518
- () => ({
758
+ return reqInfo.utils.createResponse$(() => ({
1519
759
  body: this.removePayment(reqInfo),
1520
760
  status: STATUS.OK,
1521
- })));
761
+ }));
1522
762
  }
1523
- /**
1524
- * @private
1525
- * @param {?} reqInfo
1526
- * @return {?}
1527
- */
1528
763
  getCart(reqInfo) {
1529
764
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1530
765
  }
1531
- /**
1532
- * @private
1533
- * @param {?} reqInfo
1534
- * @return {?}
1535
- */
1536
766
  getPayment(reqInfo) {
1537
767
  return this.getCart(reqInfo).payment;
1538
768
  }
1539
- /**
1540
- * @private
1541
- * @param {?} reqInfo
1542
- * @return {?}
1543
- */
1544
769
  updatePayment(reqInfo) {
1545
- /** @type {?} */
1546
770
  const cart = this.getCart(reqInfo);
1547
771
  const { payment, address } = reqInfo.utils.getJsonBody(reqInfo.req);
1548
772
  cart.payment = payment;
@@ -1551,18 +775,13 @@ class DaffInMemoryBackendCartPaymentService {
1551
775
  }
1552
776
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1553
777
  }
1554
- /**
1555
- * @private
1556
- * @param {?} reqInfo
1557
- * @return {?}
1558
- */
1559
778
  removePayment(reqInfo) {
1560
- /** @type {?} */
1561
779
  const cart = this.getCart(reqInfo);
1562
780
  cart.payment = null;
1563
781
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1564
782
  }
1565
783
  }
784
+ /** @nocollapse */ DaffInMemoryBackendCartPaymentService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartPaymentService_Factory() { return new DaffInMemoryBackendCartPaymentService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartPaymentService, providedIn: "root" });
1566
785
  DaffInMemoryBackendCartPaymentService.decorators = [
1567
786
  { type: Injectable, args: [{
1568
787
  providedIn: 'root',
@@ -1572,86 +791,40 @@ DaffInMemoryBackendCartPaymentService.decorators = [
1572
791
  DaffInMemoryBackendCartPaymentService.ctorParameters = () => [
1573
792
  { type: undefined, decorators: [{ type: Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1574
793
  ];
1575
- /** @nocollapse */ DaffInMemoryBackendCartPaymentService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartPaymentService_Factory() { return new DaffInMemoryBackendCartPaymentService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartPaymentService, providedIn: "root" });
1576
- if (false) {
1577
- /**
1578
- * @type {?}
1579
- * @private
1580
- */
1581
- DaffInMemoryBackendCartPaymentService.prototype.extraFieldsHook;
1582
- }
1583
794
 
1584
795
  /**
1585
- * @fileoverview added by tsickle
1586
- * Generated from: backend/cart-shipping-address/cart-shipping-address.service.ts
1587
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1588
- */
1589
- /**
1590
- * \@inheritdoc
796
+ * @inheritdoc
1591
797
  */
1592
798
  class DaffInMemoryBackendCartShippingAddressService {
1593
- /**
1594
- * @param {?} extraFieldsHook
1595
- */
1596
799
  constructor(extraFieldsHook) {
1597
800
  this.extraFieldsHook = extraFieldsHook;
1598
801
  }
1599
- /**
1600
- * @param {?} reqInfo
1601
- * @return {?}
1602
- */
1603
802
  get(reqInfo) {
1604
- return reqInfo.utils.createResponse$((/**
1605
- * @return {?}
1606
- */
1607
- () => ({
803
+ return reqInfo.utils.createResponse$(() => ({
1608
804
  body: this.getShippingAddress(reqInfo),
1609
805
  status: STATUS.OK,
1610
- })));
806
+ }));
1611
807
  }
1612
- /**
1613
- * @param {?} reqInfo
1614
- * @return {?}
1615
- */
1616
808
  put(reqInfo) {
1617
- return reqInfo.utils.createResponse$((/**
1618
- * @return {?}
1619
- */
1620
- () => ({
809
+ return reqInfo.utils.createResponse$(() => ({
1621
810
  body: this.updateShippingAddress(reqInfo),
1622
811
  status: STATUS.OK,
1623
- })));
812
+ }));
1624
813
  }
1625
- /**
1626
- * @private
1627
- * @param {?} reqInfo
1628
- * @return {?}
1629
- */
1630
814
  getCart(reqInfo) {
1631
815
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1632
816
  }
1633
- /**
1634
- * @private
1635
- * @param {?} reqInfo
1636
- * @return {?}
1637
- */
1638
817
  getShippingAddress(reqInfo) {
1639
818
  return this.getCart(reqInfo).shipping_address;
1640
819
  }
1641
- /**
1642
- * @private
1643
- * @param {?} reqInfo
1644
- * @return {?}
1645
- */
1646
820
  updateShippingAddress(reqInfo) {
1647
- /** @type {?} */
1648
821
  const cart = this.getCart(reqInfo);
1649
- /** @type {?} */
1650
822
  const address = reqInfo.utils.getJsonBody(reqInfo.req);
1651
823
  cart.shipping_address = address;
1652
824
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1653
825
  }
1654
826
  }
827
+ /** @nocollapse */ DaffInMemoryBackendCartShippingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingAddressService_Factory() { return new DaffInMemoryBackendCartShippingAddressService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartShippingAddressService, providedIn: "root" });
1655
828
  DaffInMemoryBackendCartShippingAddressService.decorators = [
1656
829
  { type: Injectable, args: [{
1657
830
  providedIn: 'root',
@@ -1661,110 +834,51 @@ DaffInMemoryBackendCartShippingAddressService.decorators = [
1661
834
  DaffInMemoryBackendCartShippingAddressService.ctorParameters = () => [
1662
835
  { type: undefined, decorators: [{ type: Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1663
836
  ];
1664
- /** @nocollapse */ DaffInMemoryBackendCartShippingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingAddressService_Factory() { return new DaffInMemoryBackendCartShippingAddressService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartShippingAddressService, providedIn: "root" });
1665
- if (false) {
1666
- /**
1667
- * @type {?}
1668
- * @private
1669
- */
1670
- DaffInMemoryBackendCartShippingAddressService.prototype.extraFieldsHook;
1671
- }
1672
837
 
1673
838
  /**
1674
- * @fileoverview added by tsickle
1675
- * Generated from: backend/cart-shipping-information/cart-shipping-information.service.ts
1676
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1677
- */
1678
- /**
1679
- * \@inheritdoc
839
+ * @inheritdoc
1680
840
  */
1681
841
  class DaffInMemoryBackendCartShippingInformationService {
1682
- /**
1683
- * @param {?} extraFieldsHook
1684
- */
1685
842
  constructor(extraFieldsHook) {
1686
843
  this.extraFieldsHook = extraFieldsHook;
1687
844
  }
1688
- /**
1689
- * @param {?} reqInfo
1690
- * @return {?}
1691
- */
1692
845
  get(reqInfo) {
1693
- return reqInfo.utils.createResponse$((/**
1694
- * @return {?}
1695
- */
1696
- () => ({
846
+ return reqInfo.utils.createResponse$(() => ({
1697
847
  body: this.getShippingInformation(reqInfo),
1698
848
  status: STATUS.OK,
1699
- })));
849
+ }));
1700
850
  }
1701
- /**
1702
- * @param {?} reqInfo
1703
- * @return {?}
1704
- */
1705
851
  put(reqInfo) {
1706
- return reqInfo.utils.createResponse$((/**
1707
- * @return {?}
1708
- */
1709
- () => ({
852
+ return reqInfo.utils.createResponse$(() => ({
1710
853
  body: this.updateShippingInformation(reqInfo),
1711
854
  status: STATUS.OK,
1712
- })));
855
+ }));
1713
856
  }
1714
- /**
1715
- * @param {?} reqInfo
1716
- * @return {?}
1717
- */
1718
857
  delete(reqInfo) {
1719
- return reqInfo.utils.createResponse$((/**
1720
- * @return {?}
1721
- */
1722
- () => ({
858
+ return reqInfo.utils.createResponse$(() => ({
1723
859
  body: this.removeShippingInformation(reqInfo),
1724
860
  status: STATUS.OK,
1725
- })));
861
+ }));
1726
862
  }
1727
- /**
1728
- * @private
1729
- * @param {?} reqInfo
1730
- * @return {?}
1731
- */
1732
863
  getCart(reqInfo) {
1733
864
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1734
865
  }
1735
- /**
1736
- * @private
1737
- * @param {?} reqInfo
1738
- * @return {?}
1739
- */
1740
866
  getShippingInformation(reqInfo) {
1741
867
  return this.getCart(reqInfo).shipping_information;
1742
868
  }
1743
- /**
1744
- * @private
1745
- * @param {?} reqInfo
1746
- * @return {?}
1747
- */
1748
869
  updateShippingInformation(reqInfo) {
1749
- /** @type {?} */
1750
870
  const cart = this.getCart(reqInfo);
1751
- /** @type {?} */
1752
871
  const shippingInformation = reqInfo.utils.getJsonBody(reqInfo.req);
1753
872
  cart.shipping_information = shippingInformation;
1754
873
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1755
874
  }
1756
- /**
1757
- * @private
1758
- * @param {?} reqInfo
1759
- * @return {?}
1760
- */
1761
875
  removeShippingInformation(reqInfo) {
1762
- /** @type {?} */
1763
876
  const cart = this.getCart(reqInfo);
1764
877
  cart.shipping_information = null;
1765
878
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1766
879
  }
1767
880
  }
881
+ /** @nocollapse */ DaffInMemoryBackendCartShippingInformationService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingInformationService_Factory() { return new DaffInMemoryBackendCartShippingInformationService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartShippingInformationService, providedIn: "root" });
1768
882
  DaffInMemoryBackendCartShippingInformationService.decorators = [
1769
883
  { type: Injectable, args: [{
1770
884
  providedIn: 'root',
@@ -1774,59 +888,25 @@ DaffInMemoryBackendCartShippingInformationService.decorators = [
1774
888
  DaffInMemoryBackendCartShippingInformationService.ctorParameters = () => [
1775
889
  { type: undefined, decorators: [{ type: Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1776
890
  ];
1777
- /** @nocollapse */ DaffInMemoryBackendCartShippingInformationService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingInformationService_Factory() { return new DaffInMemoryBackendCartShippingInformationService(ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartShippingInformationService, providedIn: "root" });
1778
- if (false) {
1779
- /**
1780
- * @type {?}
1781
- * @private
1782
- */
1783
- DaffInMemoryBackendCartShippingInformationService.prototype.extraFieldsHook;
1784
- }
1785
891
 
1786
892
  /**
1787
- * @fileoverview added by tsickle
1788
- * Generated from: backend/cart-shipping-methods/cart-shipping-methods.service.ts
1789
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1790
- */
1791
- /**
1792
- * \@inheritdoc
893
+ * @inheritdoc
1793
894
  */
1794
895
  class DaffInMemoryBackendCartShippingMethodsService {
1795
- /**
1796
- * @param {?} shippingMethodFactory
1797
- */
1798
896
  constructor(shippingMethodFactory) {
1799
897
  this.shippingMethodFactory = shippingMethodFactory;
1800
898
  }
1801
- /**
1802
- * @param {?} reqInfo
1803
- * @return {?}
1804
- */
1805
899
  get(reqInfo) {
1806
- return reqInfo.utils.createResponse$((/**
1807
- * @return {?}
1808
- */
1809
- () => ({
900
+ return reqInfo.utils.createResponse$(() => ({
1810
901
  body: this.listShippingMethods(reqInfo),
1811
902
  status: STATUS.OK,
1812
- })));
903
+ }));
1813
904
  }
1814
- /**
1815
- * @private
1816
- * @param {?} reqInfo
1817
- * @return {?}
1818
- */
1819
905
  getCart(reqInfo) {
1820
906
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1821
907
  }
1822
- /**
1823
- * @private
1824
- * @param {?} reqInfo
1825
- * @return {?}
1826
- */
1827
908
  listShippingMethods(reqInfo) {
1828
909
  var _a;
1829
- /** @type {?} */
1830
910
  const cart = this.getCart(reqInfo);
1831
911
  if (cart.shipping_address) {
1832
912
  if (((_a = cart.available_shipping_methods) === null || _a === void 0 ? void 0 : _a.length) === 0) {
@@ -1839,6 +919,7 @@ class DaffInMemoryBackendCartShippingMethodsService {
1839
919
  return cart.available_shipping_methods;
1840
920
  }
1841
921
  }
922
+ /** @nocollapse */ DaffInMemoryBackendCartShippingMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingMethodsService_Factory() { return new DaffInMemoryBackendCartShippingMethodsService(ɵɵinject(DaffCartShippingRateFactory)); }, token: DaffInMemoryBackendCartShippingMethodsService, providedIn: "root" });
1842
923
  DaffInMemoryBackendCartShippingMethodsService.decorators = [
1843
924
  { type: Injectable, args: [{
1844
925
  providedIn: 'root',
@@ -1848,59 +929,25 @@ DaffInMemoryBackendCartShippingMethodsService.decorators = [
1848
929
  DaffInMemoryBackendCartShippingMethodsService.ctorParameters = () => [
1849
930
  { type: DaffCartShippingRateFactory }
1850
931
  ];
1851
- /** @nocollapse */ DaffInMemoryBackendCartShippingMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartShippingMethodsService_Factory() { return new DaffInMemoryBackendCartShippingMethodsService(ɵɵinject(DaffCartShippingRateFactory)); }, token: DaffInMemoryBackendCartShippingMethodsService, providedIn: "root" });
1852
- if (false) {
1853
- /**
1854
- * @type {?}
1855
- * @private
1856
- */
1857
- DaffInMemoryBackendCartShippingMethodsService.prototype.shippingMethodFactory;
1858
- }
1859
932
 
1860
933
  /**
1861
- * @fileoverview added by tsickle
1862
- * Generated from: backend/cart/cart.service.ts
1863
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1864
- */
1865
- /**
1866
- * \@inheritdoc
934
+ * @inheritdoc
1867
935
  */
1868
936
  class DaffInMemoryBackendCartService {
1869
- /**
1870
- * @param {?} cartFactory
1871
- * @param {?} extraFieldsHook
1872
- */
1873
937
  constructor(cartFactory, extraFieldsHook) {
1874
938
  this.cartFactory = cartFactory;
1875
939
  this.extraFieldsHook = extraFieldsHook;
1876
940
  }
1877
- /**
1878
- * @param {?} reqInfo
1879
- * @return {?}
1880
- */
1881
941
  get(reqInfo) {
1882
- /** @type {?} */
1883
942
  const cart = this.getCart(reqInfo);
1884
- return reqInfo.utils.createResponse$((/**
1885
- * @return {?}
1886
- */
1887
- () => ({
943
+ return reqInfo.utils.createResponse$(() => ({
1888
944
  body: cart ? Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) }) : cart,
1889
945
  status: cart ? STATUS.OK : STATUS.NOT_FOUND,
1890
- })));
946
+ }));
1891
947
  }
1892
- /**
1893
- * @param {?} reqInfo
1894
- * @return {?}
1895
- */
1896
948
  post(reqInfo) {
1897
- return reqInfo.utils.createResponse$((/**
1898
- * @return {?}
1899
- */
1900
- () => {
1901
- /** @type {?} */
949
+ return reqInfo.utils.createResponse$(() => {
1902
950
  let body;
1903
- /** @type {?} */
1904
951
  const action = this.getAction(reqInfo);
1905
952
  if (reqInfo.id === 'addToCart') {
1906
953
  // deprecated
@@ -1916,50 +963,31 @@ class DaffInMemoryBackendCartService {
1916
963
  body,
1917
964
  status: STATUS.OK,
1918
965
  };
1919
- }));
966
+ });
1920
967
  }
1921
968
  /**
1922
969
  * Gets whatever follows the cart ID section of the request URL.
1923
- * @private
1924
- * @param {?} reqInfo
1925
- * @return {?}
1926
970
  */
1927
971
  getAction(reqInfo) {
1928
972
  return reqInfo.url.replace(`/${reqInfo.resourceUrl}${reqInfo.id}/`, '');
1929
973
  }
1930
- /**
1931
- * @private
1932
- * @param {?} reqInfo
1933
- * @return {?}
1934
- */
1935
974
  clear(reqInfo) {
1936
- /** @type {?} */
1937
975
  const cart = this.getCart(reqInfo);
1938
976
  cart.items = [];
1939
977
  return Object.assign(Object.assign({}, cart), { extra_attributes: this.extraFieldsHook(reqInfo, cart) });
1940
978
  }
1941
- /**
1942
- * @private
1943
- * @param {?} reqInfo
1944
- * @return {?}
1945
- */
1946
979
  create(reqInfo) {
1947
- /** @type {?} */
1948
980
  const cart = this.cartFactory.create();
1949
981
  reqInfo.collection.push(cart);
1950
982
  return {
1951
983
  id: cart.id,
1952
984
  };
1953
985
  }
1954
- /**
1955
- * @private
1956
- * @param {?} reqInfo
1957
- * @return {?}
1958
- */
1959
986
  getCart(reqInfo) {
1960
987
  return reqInfo.utils.findById(reqInfo.collection, reqInfo.id);
1961
988
  }
1962
989
  }
990
+ /** @nocollapse */ DaffInMemoryBackendCartService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartService_Factory() { return new DaffInMemoryBackendCartService(ɵɵinject(DaffCartFactory), ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartService, providedIn: "root" });
1963
991
  DaffInMemoryBackendCartService.decorators = [
1964
992
  { type: Injectable, args: [{
1965
993
  providedIn: 'root',
@@ -1970,43 +998,12 @@ DaffInMemoryBackendCartService.ctorParameters = () => [
1970
998
  { type: DaffCartFactory },
1971
999
  { type: undefined, decorators: [{ type: Inject, args: [DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK,] }] }
1972
1000
  ];
1973
- /** @nocollapse */ DaffInMemoryBackendCartService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartService_Factory() { return new DaffInMemoryBackendCartService(ɵɵinject(DaffCartFactory), ɵɵinject(DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK)); }, token: DaffInMemoryBackendCartService, providedIn: "root" });
1974
- if (false) {
1975
- /**
1976
- * @type {?}
1977
- * @private
1978
- */
1979
- DaffInMemoryBackendCartService.prototype.cartFactory;
1980
- /**
1981
- * @type {?}
1982
- * @private
1983
- */
1984
- DaffInMemoryBackendCartService.prototype.extraFieldsHook;
1985
- }
1986
1001
 
1987
- /**
1988
- * @fileoverview added by tsickle
1989
- * Generated from: backend/cart-root.service.ts
1990
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1991
- */
1992
1002
  /**
1993
1003
  * The root cart in-memory backend.
1994
1004
  * Creates the database and delegates requests to child backends.
1995
1005
  */
1996
1006
  class DaffInMemoryBackendCartRootService {
1997
- /**
1998
- * @param {?} cartService
1999
- * @param {?} cartItemsService
2000
- * @param {?} cartOrderService
2001
- * @param {?} cartCouponService
2002
- * @param {?} cartAddressService
2003
- * @param {?} cartShippingAddressService
2004
- * @param {?} cartBillingAddressService
2005
- * @param {?} cartPaymentMethodsService
2006
- * @param {?} cartShippingMethodsService
2007
- * @param {?} cartPaymentService
2008
- * @param {?} cartShippingInformationService
2009
- */
2010
1007
  constructor(cartService, cartItemsService, cartOrderService, cartCouponService, cartAddressService, cartShippingAddressService, cartBillingAddressService, cartPaymentMethodsService, cartShippingMethodsService, cartPaymentService, cartShippingInformationService) {
2011
1008
  this.cartService = cartService;
2012
1009
  this.cartItemsService = cartItemsService;
@@ -2024,13 +1021,8 @@ class DaffInMemoryBackendCartRootService {
2024
1021
  */
2025
1022
  this.carts = [];
2026
1023
  }
2027
- /**
2028
- * @param {?} reqInfo
2029
- * @return {?}
2030
- */
2031
1024
  createDb(reqInfo) {
2032
1025
  if (reqInfo) {
2033
- /** @type {?} */
2034
1026
  const seedData = reqInfo.utils.getJsonBody(reqInfo.req).carts;
2035
1027
  if (seedData) {
2036
1028
  this.carts = seedData;
@@ -2040,39 +1032,18 @@ class DaffInMemoryBackendCartRootService {
2040
1032
  cart: this.carts,
2041
1033
  };
2042
1034
  }
2043
- /**
2044
- * @param {?} reqInfo
2045
- * @return {?}
2046
- */
2047
1035
  get(reqInfo) {
2048
1036
  return this.delegateRequest(reqInfo);
2049
1037
  }
2050
- /**
2051
- * @param {?} reqInfo
2052
- * @return {?}
2053
- */
2054
1038
  post(reqInfo) {
2055
1039
  return this.delegateRequest(reqInfo);
2056
1040
  }
2057
- /**
2058
- * @param {?} reqInfo
2059
- * @return {?}
2060
- */
2061
1041
  put(reqInfo) {
2062
1042
  return this.delegateRequest(reqInfo);
2063
1043
  }
2064
- /**
2065
- * @param {?} reqInfo
2066
- * @return {?}
2067
- */
2068
1044
  delete(reqInfo) {
2069
1045
  return this.delegateRequest(reqInfo);
2070
1046
  }
2071
- /**
2072
- * @private
2073
- * @param {?} reqInfo
2074
- * @return {?}
2075
- */
2076
1047
  delegateRequest(reqInfo) {
2077
1048
  reqInfo.collection = this.carts;
2078
1049
  switch (reqInfo.collectionName) {
@@ -2099,13 +1070,10 @@ class DaffInMemoryBackendCartRootService {
2099
1070
  case 'cart-shipping-information':
2100
1071
  return this.cartShippingInformationService[reqInfo.method](reqInfo);
2101
1072
  default:
2102
- return reqInfo.utils.createResponse$((/**
2103
- * @return {?}
2104
- */
2105
- () => ({
1073
+ return reqInfo.utils.createResponse$(() => ({
2106
1074
  body: {},
2107
1075
  status: STATUS.OK,
2108
- })));
1076
+ }));
2109
1077
  }
2110
1078
  }
2111
1079
  }
@@ -2126,6 +1094,7 @@ DaffInMemoryBackendCartRootService.COLLECTION_NAMES = [
2126
1094
  'cart-payment',
2127
1095
  'cart-shipping-information',
2128
1096
  ];
1097
+ /** @nocollapse */ DaffInMemoryBackendCartRootService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartRootService_Factory() { return new DaffInMemoryBackendCartRootService(ɵɵinject(DaffInMemoryBackendCartService), ɵɵinject(DaffInMemoryBackendCartItemsService), ɵɵinject(DaffInMemoryBackendCartOrderService), ɵɵinject(DaffInMemoryBackendCartCouponService), ɵɵinject(DaffInMemoryBackendCartAddressService), ɵɵinject(DaffInMemoryBackendCartShippingAddressService), ɵɵinject(DaffInMemoryBackendCartBillingAddressService), ɵɵinject(DaffInMemoryBackendCartPaymentMethodsService), ɵɵinject(DaffInMemoryBackendCartShippingMethodsService), ɵɵinject(DaffInMemoryBackendCartPaymentService), ɵɵinject(DaffInMemoryBackendCartShippingInformationService)); }, token: DaffInMemoryBackendCartRootService, providedIn: "root" });
2129
1098
  DaffInMemoryBackendCartRootService.decorators = [
2130
1099
  { type: Injectable, args: [{
2131
1100
  providedIn: 'root',
@@ -2145,98 +1114,9 @@ DaffInMemoryBackendCartRootService.ctorParameters = () => [
2145
1114
  { type: DaffInMemoryBackendCartPaymentService },
2146
1115
  { type: DaffInMemoryBackendCartShippingInformationService }
2147
1116
  ];
2148
- /** @nocollapse */ DaffInMemoryBackendCartRootService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendCartRootService_Factory() { return new DaffInMemoryBackendCartRootService(ɵɵinject(DaffInMemoryBackendCartService), ɵɵinject(DaffInMemoryBackendCartItemsService), ɵɵinject(DaffInMemoryBackendCartOrderService), ɵɵinject(DaffInMemoryBackendCartCouponService), ɵɵinject(DaffInMemoryBackendCartAddressService), ɵɵinject(DaffInMemoryBackendCartShippingAddressService), ɵɵinject(DaffInMemoryBackendCartBillingAddressService), ɵɵinject(DaffInMemoryBackendCartPaymentMethodsService), ɵɵinject(DaffInMemoryBackendCartShippingMethodsService), ɵɵinject(DaffInMemoryBackendCartPaymentService), ɵɵinject(DaffInMemoryBackendCartShippingInformationService)); }, token: DaffInMemoryBackendCartRootService, providedIn: "root" });
2149
- if (false) {
2150
- /**
2151
- * The collections that the root service manages.
2152
- * Useful for a higher-level backend that delegates to this one based on collection name.
2153
- * @type {?}
2154
- */
2155
- DaffInMemoryBackendCartRootService.COLLECTION_NAMES;
2156
- /**
2157
- * The collection of carts in the backend.
2158
- * @type {?}
2159
- */
2160
- DaffInMemoryBackendCartRootService.prototype.carts;
2161
- /**
2162
- * @type {?}
2163
- * @private
2164
- */
2165
- DaffInMemoryBackendCartRootService.prototype.cartService;
2166
- /**
2167
- * @type {?}
2168
- * @private
2169
- */
2170
- DaffInMemoryBackendCartRootService.prototype.cartItemsService;
2171
- /**
2172
- * @type {?}
2173
- * @private
2174
- */
2175
- DaffInMemoryBackendCartRootService.prototype.cartOrderService;
2176
- /**
2177
- * @type {?}
2178
- * @private
2179
- */
2180
- DaffInMemoryBackendCartRootService.prototype.cartCouponService;
2181
- /**
2182
- * @type {?}
2183
- * @private
2184
- */
2185
- DaffInMemoryBackendCartRootService.prototype.cartAddressService;
2186
- /**
2187
- * @type {?}
2188
- * @private
2189
- */
2190
- DaffInMemoryBackendCartRootService.prototype.cartShippingAddressService;
2191
- /**
2192
- * @type {?}
2193
- * @private
2194
- */
2195
- DaffInMemoryBackendCartRootService.prototype.cartBillingAddressService;
2196
- /**
2197
- * @type {?}
2198
- * @private
2199
- */
2200
- DaffInMemoryBackendCartRootService.prototype.cartPaymentMethodsService;
2201
- /**
2202
- * @type {?}
2203
- * @private
2204
- */
2205
- DaffInMemoryBackendCartRootService.prototype.cartShippingMethodsService;
2206
- /**
2207
- * @type {?}
2208
- * @private
2209
- */
2210
- DaffInMemoryBackendCartRootService.prototype.cartPaymentService;
2211
- /**
2212
- * @type {?}
2213
- * @private
2214
- */
2215
- DaffInMemoryBackendCartRootService.prototype.cartShippingInformationService;
2216
- }
2217
-
2218
- /**
2219
- * @fileoverview added by tsickle
2220
- * Generated from: backend/public_api.ts
2221
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2222
- */
2223
-
2224
- /**
2225
- * @fileoverview added by tsickle
2226
- * Generated from: public_api.ts
2227
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2228
- */
2229
-
2230
- /**
2231
- * @fileoverview added by tsickle
2232
- * Generated from: index.ts
2233
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2234
- */
2235
1117
 
2236
1118
  /**
2237
- * @fileoverview added by tsickle
2238
- * Generated from: daffodil-cart-driver-in-memory.ts
2239
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1119
+ * Generated bundle index. Do not edit.
2240
1120
  */
2241
1121
 
2242
1122
  export { DAFF_CART_IN_MEMORY_EXTRA_ATTRIBUTES_HOOK, DaffCartInMemoryDriverModule, DaffInMemoryBackendCartAddressService, DaffInMemoryBackendCartBillingAddressService, DaffInMemoryBackendCartCouponService, DaffInMemoryBackendCartItemsService, DaffInMemoryBackendCartOrderService, DaffInMemoryBackendCartPaymentMethodsService, DaffInMemoryBackendCartPaymentService, DaffInMemoryBackendCartRootService, DaffInMemoryBackendCartService, DaffInMemoryBackendCartShippingAddressService, DaffInMemoryBackendCartShippingInformationService, DaffInMemoryBackendCartShippingMethodsService, DaffInMemoryCartBillingAddressService, DaffInMemoryCartCouponService, DaffInMemoryCartItemService, DaffInMemoryCartOrderService, DaffInMemoryCartPaymentMethodsService, DaffInMemoryCartPaymentService, DaffInMemoryCartService, DaffInMemoryCartShippingAddressService, DaffInMemoryCartShippingInformationService, DaffInMemoryCartShippingMethodsService, DaffInMemoryCartAddressService as ɵa };