Commit Graph
30 Commits
Author SHA1 Message Date
5300926db8 feat: Implement PriceList and extend MoneyAmount (#1152)
* init

* added buld id validation to repo

* admin done

* updated price reqs

* intial implementation of PriceList

* integration tests for price lists

* updated admin/product integration tests

* update updateVariantPrices method

* remove comment from error handler

* add integration test for batch deleting prices associated with price list

* make update to prices through variant service limited to default prices

* update store/products.js snapshot

* add api unit tests and update product integration tests to validate that prices from Price List are ignored

* fix product test

* requested changes

* cascade

* ensure delete variant cascades to MoneyAmount

* addresses PR feedback

* removed unused endpoint

* update mock

* fix failing store integration tests

* remove medusajs ressource

* re add env.template

* Update integration-tests/api/__tests__/admin/price-list.js

Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>

* Update integration-tests/api/__tests__/admin/price-list.js

Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>

* fix: update snapshots

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
2022-03-18 15:18:50 +01:00
Kasper Fabricius Kristensen 4be991c156 fix: source-shopify tests (#1192) 2022-03-15 20:12:52 +01:00
Kasper Fabricius KristensenandSebastian Rindom eb8e247e7d fix: source shopify handle duplicate unique values and more efficient updates (#1154)
* fix: added functionality to handle duplicate sku, ean, upc, and barcodes on product variants

* handle unique variant values

* save

* clear ignored keys in redis

* fixed plugin to handle duplicates and use last build time to make queries more effective

* v1.1.1-canary.0

* removed console log

* v1.1.1-canary.1

* reduce amounts of calls to shopify api

* v1.1.1-canary.2

* added README and support for SmartCollections

* v1.1.1-canary.4

* v1.1.1-canary.5

* v1.1.1-canary.5

* fix dropped products in smart collections

* cleanup

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2022-03-10 13:10:57 +01:00
Kasper Fabricius Kristensen 4e7435e4d7 fix: default POST request payloads to an empty object (#1141)
* defaulted carts.create payload to an empty object

* fix linting

* requested changes
2022-03-09 17:19:38 +01:00
Kasper Fabricius Kristensen a6f352d9f1 fixed type of value and valid_for in AdminPostDiscountsDiscountReq (#1128)
* fixed type of value in update/rule

* update type of valid_for
2022-03-06 20:44:11 +01:00
Kasper Fabricius Kristensen 508dc33dd3 updated invite.created event with user_email so it can be used to send an email invitation (#1069) 2022-02-25 18:53:49 +01:00
Kasper Fabricius Kristensen 91263fbc8e fix: reset user password subscription in sendgrid plugin (#1072)
* fixed reset password subscription

* cleanup
2022-02-25 18:53:49 +01:00
Kasper Fabricius Kristensen 1f2ee04abe fix: export request types from add and remove product endpoints (#1078) 2022-02-25 18:53:49 +01:00
Kasper Fabricius Kristensen 1e4cc2fc80 feat: add and remove products to/from collection in bulk endpoints (#1032)
* adds bulk add/remove products to/from collection. Adds endpoint updateProducts on collections that uses these bulk operations

* fix integration tests and test description

* undo change to swap

* made requested changes

* added removeProducts endpoint

* made requested changes

* fix: set collection_id null

* updated collection_id to type string | undefined
2022-02-25 18:53:49 +01:00
Kasper Fabricius Kristensen 82ecc7ad24 adds ability to update balance to 0 and adds integration test (#1036) 2022-02-25 18:53:49 +01:00
Kasper Fabricius Kristensen ed612df2b5 updated invite.created event with user_email so it can be used to send an email invitation (#1069) 2022-02-21 19:53:03 +01:00
Kasper Fabricius Kristensen 90121dd19d fix: reset user password subscription in sendgrid plugin (#1072)
* fixed reset password subscription

* cleanup
2022-02-21 19:52:03 +01:00
Kasper Fabricius Kristensen 449e666428 fix: export request types from add and remove product endpoints (#1078) 2022-02-17 14:47:15 +01:00
Kasper Fabricius Kristensen 66294038f0 feat: add and remove products to/from collection in bulk endpoints (#1032)
* adds bulk add/remove products to/from collection. Adds endpoint updateProducts on collections that uses these bulk operations

* fix integration tests and test description

* undo change to swap

* made requested changes

* added removeProducts endpoint

* made requested changes

* fix: set collection_id null

* updated collection_id to type string | undefined
2022-02-16 22:45:19 +01:00
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
Kasper Fabricius Kristensen b8ff364276 feat: gatsby source medusa (#924) 2021-12-14 20:56:31 +01:00
Kasper Fabricius KristensenandSebastian Rindom 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
Kasper Fabricius Kristensen fc50aacde2 fix: options relations on GET variant (#532) 2021-10-13 19:46:44 +02:00
Kasper Fabricius Kristensen 22f3f2af93 fix: shipping option updates (#426)
* fix to remove req

* tested fix
2021-10-01 08:18:56 +02:00
Kasper Fabricius Kristensen a82332da3e feat: add product status (#400)
* 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

* changed dbehaviour on invalid status input on admin list products

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

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

* fixed test

* made requested changes to migration
2021-09-21 11:22:17 +02:00
Kasper Fabricius Kristensenandolivermrbl 16b0fa377a fix: make shipping_option_id on requirements optional (#340)
* changed validator so that reqiurement shipping_option_id is now optional + added integration test that confirms that when an update contains a requirement without an ID it is created

* fix: formatting

* fix: un-bump babel-preset-medusa-package

* chore: update yarn.lock

* fix: implemented suggested changes, need to validate behaviour on clean branch so NOT ready for merging just yet

* fix: implemented suggested changes, need to validate behaviour on clean branch so NOT ready for merging just yet

* afix: made it impossible to set a min. subtotal requirement that is greater than max. subtotal

* fix: added explanation to error

* fix: Error when removing requirement on update

Co-authored-by: olivermrbl <oliver@mrbltech.com>
2021-09-09 09:03:00 +02:00
Kasper Fabricius Kristensen 56a1d99a07 fix: the topbar was positioned above the mobile docsearch search input. This fixes the z-index order of components (#371) 2021-09-07 16:59:53 +02:00
Kasper Fabricius Kristensen 4602cfc083 fix: docsearch link behaviour on navigate (#368) 2021-09-06 09:29:58 +02:00
Kasper Fabricius Kristensen d652b512c3 fix: docusaurus link behaviour (#363) 2021-09-01 08:54:20 +02:00
Kasper Fabricius Kristensen cdf9c972c9 fix: formatting of links from production environment (#358) 2021-08-30 14:20:09 +02:00
Kasper Fabricius Kristensen d89332b91a fix: improvements to Algolia DocSearch (#357)
What

Changes selectors of API references to improve DocSearch results
Implements custom navigation for DocSearch in both API ref and docs. (Uses goTo method for in page navigation, Gatsby navigate for navigation within Gatsby site, changes URL's to API reference to make use of methods implemented to provide better metadata etc.)
Implements a new way to make all HTML available in API reference without need the crawler to have Javascript enabled which should allow Algolia to crawl our site faster.
Why

To provide users with a good search experience within our docs and API reference
Testing

Tested using a local setup of the Algolia crawler
2021-08-27 14:38:35 +02:00
Kasper Fabricius Kristensen 15161bb0e9 feat: Enable API search (#353)
* enabled search in ref and changed from section -> main so Algolia will index ref content

* fix: algolia apu key
2021-08-25 15:51:00 +02:00
143f06aa39 feat: Update to API references look and feel (#343)
Co-authored-by: Vadim Smirnov <smirnou.vadzim@gmail.com>
Co-authored-by: zakariasaad <zakaria.elas@gmail.com>
Co-authored-by: Vilfred Sikker <vilfredsikker@gmail.com>
Co-authored-by: olivermrbl <oliver@mrbltech.com>
2021-08-20 10:26:29 +02:00
Kasper Fabricius Kristensenandolivermrbl f07cc0fa40 feat: In band inventory updates (#311)
Co-authored-by: olivermrbl <oliver@mrbltech.com>
2021-08-05 12:21:15 +02:00