- Added CustomerGroups domain
- Added
currency
relation toprices
- Added
customer_group
relation toprices
- Monorepo 🎉
- Removed relationship links from responses by default
- Added complete
User
model - Added create (register) user endpoint (
POST
/users
) - Added update user endpoint (
PATCH
/users
) - Added change user password endpoint (
PATCH
/users/-actions/change-password
) - Added
AuthUser
json-api proxy - Added custom
ProxySchema
- Added login endpoint for logged in user (
POST
/auth/-actions/login
) - Added logout endpoint for logged in user (
POST
/auth/-actions/logout
) - Added "me" endpoint for logged in user (
GET
/auth/-actions/me
) - Added "my orders" endpoint for logged in user (
/auth/-actions/me/orders
) - Added "register without password" endpoint (
POST
/auth/-actions/register-without-password
) - Added forgotten password endpoint (
POST
/auth/-actions/forgot-password
) - Added reset password endpoint (
POST
/auth/-actions/reset-password
) - Added create new password endpoint (
GET
/auth/-actions/reset-password/{token}
) - Added
variantValues
relationship toProduct
model - Added
product_option_values
relationship toProductSchema
(scoped to variant values usingvariantValues
relationship) - Added
product_option_handle
toProductOptionValueSchema
- Renamed
lunar_model
tomodel_contract
indomains.php
config file
- Fixed attribute mapping for
collections
- Added tests for
collections
default_url
relationship and includes - Fixed dynamic relationships
- Added configurable auth guard
/Dystcz/LunarApi/Facades/LunarApi::authGuard($guard)
- Updated policies to grant more privileges to Filament admins
- Added
product_options
relationship forproducts
-
Changed relationship names.
Relationships:
product_options.values
→product_options.product_option_values
product_variants.values
→product_variants.product_option_values
- Model logic extracted to traits
- Added contracts for all models
- Added
images
relationship route forcollections
- Added countable relationship tests
-
Changed relationship names and routes, because Schemas now use type naming derived from snake_cased, pluralized morph aliases, relationship names and thus routes had to change as well.
Relationships:
associations
→product_associations
cheapest_variant
→cheapest_product_variant
inverse_associations
→inverse_product_associations
most_expensive_variant
→most_expensive_product_variant
other_variants
→other_product_variants
variants
→product_variants
Routes:
/cart-addresses
→/cart_addresses
/orders/{order}/order-lines
→/orders/{order}/order_lines
/products/{product}/relationships/lowest-price
→/products/{product}/relationships/lowest_price
... -
Changed withCount query parameter
?withCount=
→?with_count=
- Carts do not get automatically created when fetching them unless configured with
lunar.cart.auto_create = true
. However, they are created on demand by adding a firstCartLine
to aCart
. - Added custom
CartSessionAuthListener
which merges current cart in the session with previously associated user cart and returns the updated user cart. - Added
CreateEmptyCartAddresses
action from a listener with the same name.
- Empty
CartAddress
es are not created automatically withCart
anymore. You will have to create them manually by calling the endpoint below or using your own listener for theCartCreated
event.
Description | Related Model / Entity | Endpoint | Method |
---|---|---|---|
Create empty cart addresses | Cart |
/carts/-actions/create-empty-addresses |
post |
Description | Related Model | Endpoint change | Method change |
---|---|---|---|
Set coupon action | Cart |
/apply-coupon → /set-coupon |
patch → post |
Unset coupon action | Cart |
/remove-coupon → /unset-coupon |
delete → post |
Set shipping option | CartAddress |
/attach-shipping-option → /set-shipping-option |
--- |
Unset shipping option | CartAddress |
/detach-shipping-option → /unset-shipping-option |
delete → patch |
In the same fashion as shipping options, purchasable payment options are now available.
- Create a custom
PaymentModifier
- Add
PaymentOption
s in the modifier handle method by callingPaymentManifest@addOption
- Register the modifier in a service provider like so:
App::get(PaymentModifiers::class)->add(PaymentModifier::class);
- You should now see your payment options when calling the
/payment-options
endpoint
Description | Related Model / Entity | Endpoint | Method |
---|---|---|---|
List available payment options | PaymentOption |
/payment-options |
get |
Set payment option | Cart |
/carts/-actions/set-payment-option |
post |
Unset payment option | Cart |
/carts/-actions/unset-payment-option |
post |
- Find order redundancy by @theimerj in dystcz/dystore-api#91. Added more actions which can find order by payment intent id. This increases the success rate of identifying the order connected with the payment intent. Especially useful when data integrity is not ideal.