Commit Graph

135 Commits

Author SHA1 Message Date
Philip Korsholm
d1b8f4b50b Feat: Extend user api (#460)
* api routes for user management

* add invites and roles to db

* services

* invite repo

* include user in accepting invitation

* include user role in create user

* api password reset

* delete invite

* include email in reset password token

* added metadata as dbawarecolumn

* added events for invite handling and delete functionality

* added invite model to exports

* add default value member and allow null roles

* conditional inclusion of invites in "list-users"

* integration tests for users

* helpers for user testing

* add unauthenticated routes to users

* simplifying create invite

* create users with first and last name, and dev role

* reset password endpoint

* removed token from response

* update user with firstname, lastname and role

* create invite refactor

* test password reset without email in body

* removed redundant router variable

* cleanup

* unit tests

* adjustments

* service tests

* adjustments according to api changes

* fix cart test

* cloned now works

* change name to verified token for the verified token

* add a space

* db aware columns

* fix: timestampz dbaware

* more testing

* add list-invites endpoint

* reset-password error handling

* pr issues adjusted

* fixed test

* add optional to link templates

* move invites to a new endpoint

* migrate invites to own testsuite

* adjust snapshots

* email constraint for invite

* fix integration tests

* addressing pr feedback

* unit tests for extended user api

* linting

* fix integration tests

* fix unit tests

* fix: Addresses breaking change from class-transformer

* fix orders testing

* merge "create-claim" js and ts files

* add out commented tests

* update typescript endpoints to reflect changes made for user management

* converted invites to typescript

* add exports from api endpoints

* remove old js files used for reference

* integration test

* import reflect metadata

* invite service conversion to ts

* removed unused import

* update invite service to match styleguide

* add "expires_at" and "token" to invite table

* update invite service to save tokens and validate expires_at

* fix failing tests

* fix tests after adding token and expires_at to invite

* add expiration to create

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
Co-authored-by: olivermrbl <oliver@mrbltech.com>
2021-12-08 10:15:22 +01:00
Kasper Fabricius Kristensen
577bcc23d4 feat: medusa-source-shopify loader (#563)
* added statuses to product + unit test for updating status

* add update to product model

* added integration tests

* added integration test to validate that updating status to null results in invalid_data error

* removed comment

* update GET /store/products integration test

* fixed unit test with IdMap

* init plugin

* changed dbehaviour on invalid status input on admin list products

* mprices

* updated migration to add status = published on all existing products + added integration test on GET /admin/products when status null is provided

* merged product status

* init ShopifyService

* made requested changes to migration and GET /store/products

* fixed test

* made requested changes to migration

* push progress on source plugin

* add webhook product/create handler

* fixed normalization of variant weight

* removed weight func

* work on events

* finished product hooks (error on new variant needs to be fixed)

* fixed order status

* create fulfillments

* update fulfillment on cancel

* refactored services, handle returns though medusa, helper methods

* order updates

* removed dist

* update gitignore

* emit cahnges to product

* added redis ignore check to prevent update loops

* fixed product-variant.deleted event

* fix more events

* fix test

* fix: order taxes

* added refund with no items

* fixes to hooks

* fixed handling refunds and returns issued from Shopify

* added unit tests to ShopifyProductService and ShopifyCollectionService

* linting fix

* prepared loader PR

* fix: jsDocs

* fix: pager

* fix: build output and babelrc

* chore: linting

* fix: address type

* fix: migration clean up

* fix: update snapshots with ext_ids

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2021-12-08 10:09:21 +01:00
Sebastian Rindom
2c9df0f7f7 chore: merge master 2021-12-08 09:56:59 +01:00
Adrien de Peretti
b212afae50 Feat() Add readme to integration-tests (#862) 2021-12-08 09:54:45 +01:00
Sebastian Rindom
ed04132533 fix(medusa): migrate cart service to typescript (#884)
* fix: migrate cart service to typescript

* fix: jsdoc inventory service

* fix: revert route unit test change

* fix: typo

* fix: revert integration test packages

* fix: cleanup

* fix: tests

* fix: integration tests

* fix: create props type guards

* fix: move total field to common types
2021-12-07 19:26:00 +01:00
Oliver Windall Juhl
6579c13111 feat: Admin shipping options routes to Typescript (#891) 2021-12-07 17:07:23 +01:00
Zakaria El Asri
74bc9c618f fix: create cart with items (#851)
* fix: create cart with items

* remove: verbose mode

* fix: unit test
2021-12-01 10:53:01 +01:00
Oliver Windall Juhl
0380cdf0b2 docs: Adds new index page and design tweaks (#833) 2021-11-22 17:01:18 +01:00
olivermrbl
72c5030da3 Merge branch 'master' into develop 2021-11-22 13:40:55 +01:00
Oliver Windall Juhl
f387b4919f fix: Addresses breaking change from library class-transformer (#835)
Co-authored-by: Philip Korsholm <philip.korsholm@hotmail.com>
2021-11-22 13:39:38 +01:00
Sebastian Rindom
59761163c2 chore: merge release 2021-11-20 15:59:31 +01:00
Derek Wene
ebb7c0aa53 Fix: admin api create customer (#826) 2021-11-20 11:50:28 +01:00
Derek Wene
2d9879ea09 feat: admin api - allow customers to be created and updated with metadata (#824)
* feat: admin api - allow customers to be created and updated with metadata

* feat: add integration test for metadata
2021-11-18 18:50:36 +01:00
Oliver Windall Juhl
373532ecbc feat: Typescript for API layer (#817)
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
Co-authored-by: Zakaria El Asri <33696020+zakariaelas@users.noreply.github.com>
Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
Co-authored-by: Philip Korsholm <philip.korsholm@hotmail.com>
Co-authored-by: Sebastian Rindom <seb@medusa-commerce.com>
2021-11-18 15:19:17 +01:00
Oliver Windall Juhl
1e50aee4fe feat: Allow retrieval of soft-deleted products (#723) 2021-11-10 22:23:56 +01:00
Sebastian Rindom
7ecfe207de hotfix: joins discounts when creating claims (#760)
* fix: join discounts when creating claims

* fix: rm verbose/only

* fix: rm dup tests
2021-11-09 12:27:38 +01:00
Sebastian Rindom
e0fa06fe96 fix: make it possible to update order shipping address (#668) 2021-11-05 16:48:29 +01:00
Sebastian Rindom
45b344fbe1 fix: add product count to storefront (#719) 2021-11-04 15:32:48 +01:00
Zakaria El Asri
0a65eca3de fix: delete region causes cascade error (#672)
Co-authored-by: olivermrbl <oliver@mrbltech.com>
2021-11-03 15:19:46 +01:00
Sebastian Rindom
692cccf53a Merge remote-tracking branch 'origin/master' into develop 2021-11-03 14:13:58 +01:00
Sebastian Rindom
a5fe1c2e28 fix: include discount rule in swap retrieval (#682) 2021-11-03 14:11:27 +01:00
Sebastian Rindom
e82737a035 fix: adds options to default relations in storefront product endpoints (#712) 2021-11-03 13:15:36 +01:00
Sebastian Rindom
58127564d7 feat(medusa): adds collection endpoints to storefront (#711)
Adds:
- `/store/collections/:id`
- `/store/collections`
2021-11-03 11:24:45 +01:00
Philip Korsholm
68c2a4fe3a Fix/polish discount (#569)
* formatting and optional "is_dynamic" on updates

* formatting

* uppercasing discount code on update

* multiple regions fail with fixed discounts

* discount testing

* testing

* spelling

* removed comment

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2021-10-26 13:20:38 +02:00
Sebastian Rindom
531075208f Merge remote-tracking branch 'origin/master' into develop 2021-10-24 14:08:45 +02:00
Sebastian Rindom
caa9ab81df fix: add integration test 2021-10-23 13:15:04 +02:00
Philip Korsholm
6b83653bf6 Fix/cascading product variant deletion (#570)
* testing for deletes of variants when a product is deleted

* remove variants with products

* test using direct db query

* formatting

* removed unused imports
2021-10-22 09:20:59 +02:00
Sebastian Rindom
5441d47f88 fix: cleanup 2021-10-19 19:16:47 +02:00
Sebastian Rindom
06f5fe2670 fix: allow changing regions safely 2021-10-19 18:56:52 +02:00
Sebastian Rindom
fe34ab5976 fix: tests 2021-10-15 20:00:27 +02:00
Sebastian Rindom
690cdd2392 Merge branch 'develop' into feat/rma-shipping-options 2021-10-15 19:55:06 +02:00
Sebastian Rindom
dc7ecc959a fix: add possiblity to unset billing address 2021-10-15 19:24:44 +02:00
Sebastian Rindom
9c72acda40 fix: failing integration tests 2021-10-15 19:14:44 +02:00
Sebastian Rindom
2297a84cb9 fix: merge develop 2021-10-15 18:44:19 +02:00
zakariaelas
569595d0bb fix: include shipping profile and requirement relations when fetching custom shipping options 2021-10-15 15:01:23 +01:00
Sebastian Mateos Nicolajsen
fbd08e0feb feat:swap/claim on claim and claim on swap (#424) 2021-10-14 18:21:38 +02:00
zakariaelas
29c5a1f8d2 fix: store cart integration test by removing custom shipping options when creating a swap 2021-10-14 16:03:59 +01:00
zakariaelas
7cdd628997 merge develop and resolve conflicts 2021-10-14 15:44:58 +01:00
zakariaelas
36aeb4fffa fix: remove verbose mode in integration test + fix jsdoc 2021-10-14 14:50:28 +01:00
zakariaelas
dba1d5bb69 fix: adjustments based on seb's feedback
- remove eager from shipping_option relationship in `models/custom-shipping-options.ts`
- remove custom_shipping_options relation from cart model
2021-10-14 14:44:36 +01:00
Kasper Fabricius Kristensen
fc50aacde2 fix: options relations on GET variant (#532) 2021-10-13 19:46:44 +02:00
pKorsholm
5ef2a3fbcb feat: Product filtering (#439) 2021-10-13 16:01:59 +02:00
Sebastian Mateos Nicolajsen
c0e947f47a fix: update product images (#494) 2021-10-13 12:05:58 +02:00
Mark
3d891c9b4f Issue #442 Prettier rules not applied to some integration tests files (#445) 2021-10-08 12:11:58 +02:00
zakariaelas
3d088c351b fix: more adjustments
add: composite unique constraint for shipping_option_id and cart_id
fix: fetchCartOptions to format custom shipping options like normal shipping options
fix: addShippingMethod should throw when custom shipping options is not empty and no optionId corresponds to custom shipping options
2021-10-07 14:54:05 +01:00
Sebastian Rindom
b8d515cb0b wip 2021-10-06 15:21:16 +02:00
zakariaelas
52be911e50 fix: adjustments based on feedback
rename RMAShippingOption to CustomShippingOption
update models and relations
update unit and integration tests
update services
2021-10-06 14:17:36 +01:00
Oliver Windall Juhl
17b192fe37 fix: Throw on cart creation when no region exist (#455)
If you try to create a cart without a region in your setup, we should throw a proper error message.
2021-10-06 11:19:38 +02:00
Sebastian Rindom
38813ec66f fix: add integration test 2021-10-05 12:36:43 +02:00
zakariaelas
db83448d18 fix: tests 2021-10-01 16:41:27 +01:00