Commit Graph

15 Commits

Author SHA1 Message Date
Adrien de Peretti
b6161d2404 fix(medusa): Export/import fixes including export fields that contains new line char (#2150) 2022-09-12 15:53:45 +02:00
Frane Polić
03221c4a19 feat: product import strategy (#1706)
* init: copy PI files

* feat: add subscribers, refactor strategies folder

* wip: strategies integration tests package

* fix: rename

* wip: use redis

* wip: use redis deps, redis setup in local tests

* fix: naming collision, medusa config

* fix: typing, update apply changes for new event ordering and reimplement interface

* feat: make redis container run in integration tests

* fix: missing yarn lock

* feat: redis setup v2

* fix: setup server imports

* fix: a lot of integration issues

* fix: a lot of integration issues v2, transform tags, fix `ops` object parsing

* wip: parsing product options

* feat: creating product and variants works, processing product/variant options, update schema

* fix: query keys, logic for finding existing variant

* fix: types

* feat: update product variant's options

* feat: parse MA records

* feat: creating/updating MA records, region detection, error handling

* feat: throw an error when creating an MA for nonexistent region

* refactor: remove unused methods

* refactor: use provided ids to track records, extract a couple of methods

* refactor: remove unused method

* refactor/wip: add initial comment for main methods

* refactor: replace usage of RedisJSON functionality with basic k/v api

* feat: async progress report

* types: define more precise types, cleanup

* feat: error handling

* feat: unit testing preprocessing

* feat: integration testing for CI, fix legacy bug where user is unable to create a variant if regional price is also sent as payload, add csv for integration tests

* fix: error throw for logs

* feat: add product endpoint snap

* refactor: remove log

* feat: add snaps, rebase

* refactor: add comments

* feat: snap update

* refactor: typo

* refactor: change error handler

* feat: Redis cleanup after the job is done

* testing :fix product unit test, remove integration snap, add inline object matcher

* testing: fix obsolete snaps

* refactor: update comments

* fix: rebase issue

* fix: rebase issue v2, remove log form an integration test

* fix: try reverting setup server

* fix: insert variants test

* refactor: don't pass tx manager, refactor methods

* refactor: don't use regionRepo, add `retrieveByName` to region repo

* refactor: don't use productRepo

* refactor: don't use `productVariantRepo`

* refactor: remove repo mocks from unit tests

* fix: product import unit tests

* feat: file cleanup on finalize, kill test logs

* wip: use files to persist ops instead of redis, move strategy class into `batch-job` folder

* fix: minio delete method, add file cleanup method to import, fix promise coordination

* fix: replace redis methods

* feat: store import ops as a file instead of Redis

* feat: test cleanup

* fix: change unit tests after Redis logic removal

* feat: use `results` for progress reporting, add `stat_descriptors` info after preprocessing, remove redis mentions

* feat: extract to other files, use directory from property, fix strategy loader to allow other files in `strategies` directory

* feat: fix instance progress counter

* fix: mock services types

* fix: update snaps

* fix: error handling stream, fix test file service name generation

* fix: remove dir with tmp files after testing

* fix: new yarn.lock after rebase

* fix: remove log, change object shape

* fix: add DI types

* refactor: remove container as a csv parser dep

* fix: remove seeder, change typings

* refactor: reimplement `retrieveByName` in the region service

* fix: unit tests typings

* fix: remove ts-ignore, complete typings for csv parser validators

* fix: don't keep track of progress since it is redundant and only keep track of `advancement_count`

* fix: return of the batch job seeder

* fix: update find region by name method

* fix: update types for service typings

* fix: update redis type usage

* fix: update unit tests file

* fix: unit tests

* fix: remove redis from integration test

* feat: refactor region retrieval by name

* feat: refactor product option update

* fix: remove repo import

* fix: return redis in test

* fix: handle stream error

* fix: tmp data cleanup

Co-authored-by: fPolic <frane@medusajs.com>
2022-08-25 22:16:51 +02:00
Adrien de Peretti
bd031ef7ad feat(medusa:) Convert PaymentProvider + PaymentProviderInterface to TS + (#1773)
* feat(payments): Refactor core Payment related

* fix(medusa): typings

* test(unit): fix suite

* test(unit): fix suite

* feat(medusa): Improve payment provider container typings

* fix(medusa): typings

* styles(medusa): renove comments

* feat(medusa): cleanup

* feat(medusa): Add uniq constraint on payment session and idem key on create-payment-session end point

* fix(medusa): migration

* fix(medusa): create payment session

* feat(medusa): cleanup
2022-08-10 17:26:16 +02:00
Sebastian Rindom
8c283ac3b0 fix(medusa): Calculated price on cart shipping options (#1878) 2022-07-20 11:04:31 +02:00
Philip Korsholm
bf47d1aecd feat(medusa): Add batch strategy for order exports (#1603) 2022-06-29 09:54:37 +02:00
Adrien de Peretti
7b09b8c36c feat(medusa/product-export-strategy): Implement the Product export strategy (#1688) 2022-06-22 23:42:31 +02:00
Sebastian Rindom
c56660fca9 feat: new tax api (#979)
* feat: add tax calculation strategy (#885)

* feat: add tax calculation strategy

* fix: adds strategy loader

* fix: eslint ignore

* chore: cleanup

* fix: allow plugin overwrites

* fix: allow plugin overwrites

* fix: fake region

* Update packages/medusa/src/loaders/strategies.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>

* feat: adds tax related db entities + tax provider (#896)

* feat: adds tax related db entities + tax provider

* fix: add tax provider tests

* fix: add tax service unit tests

* fix: tests + migrations

* fix: add inherited tax lines

* chore: rm tax-line repo

* fix: test

* fix: pr comments

* fix: unit test

* feat: totals service to ts (#911)

* feat: adds tax related db entities + tax provider

* fix: add tax provider tests

* fix: add tax service unit tests

* fix: tests + migrations

* feat: totals service to ts

* fix: remove totals.js

* fix: add shipping methods

* fix: add inherited tax lines

* chore: rm tax-line repo

* fix: test

* fix: tests

* fix: tests

* fix: unit test

* fix: adds TotalsServiceProps

* feat: adds integration tests for automatic tax calculation + shipping tax rates (#945)

* feat: adds tax related db entities + tax provider

* fix: add tax provider tests

* fix: add tax service unit tests

* fix: tests + migrations

* feat: totals service to ts

* fix: remove totals.js

* fix: add shipping methods

* fix: add inherited tax lines

* chore: rm tax-line repo

* fix: test

* fix: tests

* fix: tests

* fix: unit test

* fix: integration test helpers

* fix: adds factories + tests automatic tax rates

* fix: remove verbose

* fix: adds TotalsServiceProps

* fix: add shipping tax lines

* fix: add migration for shipping taxes

* fix: integration tests for shipping taxes

* fix: integration tests for shipping taxes

* fix: jsdoc types

* Feat/manual taxes (#950)

* feat: adds tax related db entities + tax provider

* fix: add tax provider tests

* fix: add tax service unit tests

* fix: tests + migrations

* feat: totals service to ts

* fix: remove totals.js

* fix: add shipping methods

* fix: add inherited tax lines

* chore: rm tax-line repo

* fix: test

* fix: tests

* fix: tests

* fix: unit test

* fix: integration test helpers

* fix: adds factories + tests automatic tax rates

* fix: remove verbose

* fix: adds TotalsServiceProps

* fix: add shipping tax lines

* fix: add migration for shipping taxes

* fix: integration tests for shipping taxes

* fix: integration tests for shipping taxes

* fix: add integration tests for manual taxes

* fix: cart service - cleanup jsdoc

* feat: add /carts/id/taxes to manually calculate taxes

* feat: add integration tests for order tax calculations

* fix: unit tests

* fix: merge

* fix: rm verbose

* fix: unit tests

* fix: object -> cartOrOrder

* fix: rounding

* Feat/complete order w tax lines (#951)

* feat: adds tax related db entities + tax provider

* fix: add tax provider tests

* fix: add tax service unit tests

* fix: tests + migrations

* feat: totals service to ts

* fix: remove totals.js

* fix: add shipping methods

* fix: add inherited tax lines

* chore: rm tax-line repo

* fix: test

* fix: tests

* fix: tests

* fix: unit test

* fix: integration test helpers

* fix: adds factories + tests automatic tax rates

* fix: remove verbose

* fix: adds TotalsServiceProps

* fix: add shipping tax lines

* fix: add migration for shipping taxes

* fix: integration tests for shipping taxes

* fix: integration tests for shipping taxes

* fix: add integration tests for manual taxes

* fix: cart service - cleanup jsdoc

* feat: add /carts/id/taxes to manually calculate taxes

* feat: add integration tests for order tax calculations

* feat: adds cart completion strategy + create order w. tax lines

* fix: unit tests

* fix: merge

* fix: rm verbose

* fix: unit tests

* fix: unit tests

* fix: unit tests

* fix: ensure calculation for list orders

* fix: unit tests

* fix: integration tests

* fix: adds cart order type gaurds

* Docs/tax api (#954)

* feat: adds tax related db entities + tax provider

* fix: add tax provider tests

* fix: add tax service unit tests

* fix: tests + migrations

* feat: totals service to ts

* fix: remove totals.js

* fix: add shipping methods

* fix: add inherited tax lines

* chore: rm tax-line repo

* fix: test

* fix: tests

* fix: tests

* fix: unit test

* fix: integration test helpers

* fix: adds factories + tests automatic tax rates

* fix: remove verbose

* fix: adds TotalsServiceProps

* fix: add shipping tax lines

* fix: add migration for shipping taxes

* fix: integration tests for shipping taxes

* fix: integration tests for shipping taxes

* fix: add integration tests for manual taxes

* fix: cart service - cleanup jsdoc

* feat: add /carts/id/taxes to manually calculate taxes

* feat: add integration tests for order tax calculations

* feat: adds cart completion strategy + create order w. tax lines

* fix: unit tests

* fix: merge

* fix: rm verbose

* fix: unit tests

* fix: unit tests

* fix: unit tests

* fix: ensure calculation for list orders

* fix: unit tests

* fix: integration tests

* docs: documents tax related methods and types

* fix: require either item_id or shipping_method_id

* feat: product type tax rate (#969)

* feat: adds tax related db entities + tax provider

* fix: add tax provider tests

* fix: add tax service unit tests

* fix: tests + migrations

* feat: totals service to ts

* fix: remove totals.js

* fix: add shipping methods

* fix: add inherited tax lines

* chore: rm tax-line repo

* fix: test

* fix: tests

* fix: tests

* fix: unit test

* fix: integration test helpers

* fix: adds factories + tests automatic tax rates

* fix: remove verbose

* fix: adds TotalsServiceProps

* fix: add shipping tax lines

* fix: add migration for shipping taxes

* fix: integration tests for shipping taxes

* fix: integration tests for shipping taxes

* fix: add integration tests for manual taxes

* fix: cart service - cleanup jsdoc

* feat: add /carts/id/taxes to manually calculate taxes

* feat: add integration tests for order tax calculations

* feat: adds cart completion strategy + create order w. tax lines

* fix: unit tests

* fix: merge

* fix: rm verbose

* fix: unit tests

* fix: unit tests

* fix: unit tests

* fix: ensure calculation for list orders

* fix: unit tests

* fix: integration tests

* docs: documents tax related methods and types

* fix: require either item_id or shipping_method_id

* feat: adds returns tests for new tax system

* feat: adds return lines + integration tests for swaps

* feat: return integration tests

* feat: adds product type tax rates

* feat: add tax management endpoints

* fix: create single migration

* fix: adds tax rates to js client

* fix: strats

* Fix/plugin tests (#998)

* plugin testing setup

* fix: test sendgrid plugin

* fix: test sendgrid plugin

* chore: clean

* chore: clean

* fix: clean up tests

* fix: remove dirty import

* fix: sendgrid + brightpearl

* fix: plugin integration tests

* fix: klarna

* fix: shipping method tax

* fix: remove taxrates

* fix: unit tests

* fix: integration

* fix: integration

* fix: plugins tests

* fix: ignore plugins

* fix: tests

* fix: taxes (#1017)

* fix: taxes

* fix: taxes

* fix: faulty ref

* fix: create tax-lines with claim items

* fix: snapshot tax-liens

* fix: allows integration test teardown to force deleting tables

* fix: tests

* fix: merge

* fix: adds tax-rates to client

* fix: adds tax-rates to medusa-react

* fix: tests

* fix: tests

* fix: add product types

* fix: adds tax provider endpoint + cascaded deletes on tax rate relations

* fix: move errors to service layer

* fix: cleanup api

* fix: unit tests

* fix: error handler in base-service

* fix: Add order region to swap on createFulfillment (#1110)

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-02-24 20:14:09 +01:00
Mark
3d891c9b4f Issue #442 Prettier rules not applied to some integration tests files (#445) 2021-10-08 12:11:58 +02:00
olivermrbl
d55c24e28c Merge branch 'develop' into feat/draft-orders 2021-03-11 08:35:41 +01:00
Sebastian Rindom
252db5ef7e feat(medusa): storefront return (#194)
* feat: adds endpoint to lookup an order by its display_id and email

* feat: adds storefront returns

* fix: pr comments
2021-03-10 17:42:39 +01:00
olivermrbl
c31e1ea691 fixed merge conflicts 2021-02-19 08:47:24 +01:00
Sebastian Rindom
99ad43bf47 feat(medusa): tracking links (#177)
* fix: creates tracking links on fulfillments

* fix: typo
2021-02-18 16:59:19 +01:00
olivermrbl
3ac71e4a4c draft order func. complete 2021-02-18 15:46:40 +01:00
olivermrbl
362c5c6055 adds endpoints for draft orders 2021-02-16 16:53:55 +01:00
Sebastian Rindom
690d339667 feat(medusa,brightpearl,segment,webshipper): claims (#163)
* chore: create tests

* chore: models

* fix: passing initial tests

* test: adds integration test

* test: clean up integration implementation

* fix: claims

* fix: brightpearl + webshipper

* tests: passing

* fix: update claim items

* fix: adds gitignore

* fix: pr comments

* fix: single migration

* fix(medusa-plugin-segment): adds item claimed event to segment
2021-02-03 09:49:12 +01:00