woocommerce/plugins/woocommerce-blocks/packages/checkout/utils
Thomas Roberts a20f3425b1 Add cart/extensions endpoint to allow third party extensions to process server-side and get a new cart (https://github.com/woocommerce/woocommerce-blocks/pull/4298)
* Move text-input to checkout package

* Add support to TextInput for inputs with type number

* Add ExperimentalDiscountsMeta.Slot to Cart sidebar

* Add extra styles for Button and Panel components

* Add updateCartFromApi util to @woocommerce/blocks-checkout

* Change updateCartFromApi to TypeScript

* Stop passing contexts through the discounts slot fill

* Add CartExtensionsSchema class

* Add CartExtensions Route

* Add register_update_callback and get_update_callback fns

* Add extensionCartUpdate function

* Add applyExtensionCartUpdate action

* Make extensionCartUpdate use batching

* Add ExtensionCartUpdateArgs type definition

* Execute a success/error function after request in extensionCartUpdate

* Remove success and error functions

* Avoid including all schemas in CartExtensionsSchema instantiation

This is achieved by inheriting AbstractSchema and slightly modifying the way in which the latest cart data is returned from this endpoint.

* Update docs for extensionCartUpdate

* Handle errors from extension callbacks

* Throw better errors when incorrect namespace/functions are used

* Add tests for CartExtensions route,  ExtendRestApi update callback registration

* Add dummy get_properties method to CartExtensionsSchema
2021-06-07 12:16:47 +03:00
..
validation remove usage of mustBeString (https://github.com/woocommerce/woocommerce-blocks/pull/4294) 2021-06-01 09:46:02 +01:00
extension-cart-update.ts Add cart/extensions endpoint to allow third party extensions to process server-side and get a new cart (https://github.com/woocommerce/woocommerce-blocks/pull/4298) 2021-06-07 12:16:47 +03:00
index.js Add cart/extensions endpoint to allow third party extensions to process server-side and get a new cart (https://github.com/woocommerce/woocommerce-blocks/pull/4298) 2021-06-07 12:16:47 +03:00