Commit Graph

148 Commits

Author SHA1 Message Date
Kasper Fabricius Kristensen
ff9e2e58cb adds ability to update balance to 0 and adds integration test (#1036) 2022-02-10 09:11:32 +01:00
Kasper Fabricius Kristensen
d2a7534615 fix: admin collections default relations (#1023)
* added default relations to retrieve collection endpoint

* push snapshot

* added created at and updated at to collection list endpoint

* updated integration tests

* added q param to list collections

* updated snapshots
2022-02-04 16:24:42 +01:00
Oliver Windall Juhl
59bb413245 fix: Updating store currencies (#984)
* fix: Adds default currency to store currencies on create

* fix: Adds integration tests + currency update error handling

* add test

* Lowercase currency codes

* fix tests

* fix: Await drop database to stop Jest from complaining

* revert itnegration tests fix

* fix store tests
2022-02-03 20:03:25 +01:00
Sebastian Rindom
3bf32e5dc9 fix: adds order by functionality to products (#1021)
* fix: adds order by functionality to products

* feat: adds product tags list

* fix: adds client and react support for product tags

* fix: unit test

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/medusa/src/services/product-tag.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-02-03 19:03:15 +01:00
Zakaria El Asri
2e384842d5 feat: medusa-react admin hooks (#978)
* add: medusa admin hooks + tests

* fix: remove unneeded props

* fix: deps

* fix: deps

* fix: deps

* fix: failing tests

* fix: failing tests

* fix: query key

* add: yarn workspaces

* fix: linting medusa-react

* fix: add prepare script

* fix: buildOptions

* fix: useAdminShippingOptions query

* fix: use qs instead for query params (#1019)

* fix: formatting

* debug: ci pipeline

* debug: log node_modules structure

* debug: use lerna bootstrap

* debug: update node version

* debug: print pkgs in workspace

* debug: print pkgs in workspace

* debug: print pkgs in workspace

* debug: print pkgs in workspace

* debug: add explicit build step

* fix: jsdoc

* debug: run build step

* debug: fix build errors

* debug: add build step to integration tests

* fix: failing test

* cleanup

Co-authored-by: Sebastian Rindom <seb@medusajs.com>
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2022-02-02 17:10:56 +01:00
Philip Korsholm
24175025d1 Fix: admin list products expand integration test (#974) 2022-02-02 08:35:16 +01:00
Philip Korsholm
7fcdac51ea Feat: object notation in queryparams (#1002)
* add object notation for queryparams

* test rule.type query params in list-discount

* pr feedback
2022-02-01 17:31:12 +01:00
Philip Korsholm
f4f9653efc Feat: admin collections filtering (#977)
* collections filtering

* filtering collection tests

* oas for list collections
2022-02-01 17:24:47 +01:00
Oliver Windall Juhl
fdc493df7f fix: Support array of payment status filters when listing orders (#1013) 2022-02-01 17:24:13 +01:00
Philip Korsholm
f61eaeec12 feat: expand store product filtering (#973) 2022-01-11 16:06:16 +01:00
SaintMalik
0f9fbbb732 docs: Fix typos in docs (#497) 2022-01-04 16:35:38 +01:00
Zakaria El Asri
321c271e53 fix: allow integration tests to run from integration-test/api folder (#940) 2021-12-16 14:56:25 +01:00
Zakaria El Asri
69620e572e chore: parallelize integration tests and use template dbs (#907) 2021-12-14 21:45:57 +01:00
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