Commit Graph

1315 Commits

Author SHA1 Message Date
Frane Polić
d80eaa172d feat: customer group update (#1098) 2022-02-25 18:53:49 +01:00
Sebastian Rindom
f983cfada6 fix: atomic phase error handler (#1104)
* fix: adds atomic phase clean up callback

* fix: call error handler in new transaction block too

* fix: error handler in no isolation case
2022-02-25 18:53:49 +01:00
Philip Korsholm
44fb9531d2 Feat: Delete customer group (#1102) 2022-02-25 18:53:49 +01:00
Niel Swart
a9f516ead2 Changed medusa-client default request payload to null (#1044) 2022-02-25 18:53:49 +01:00
Zakaria El Asri
59d5d8a185 fix: variant price update (#1093)
* fix: variant prices update + integration tests

* add: unit tests

* fix: rename variable

* add: integration tests

* fix: integration tests

* fix: test name

* fix: move db logic to repo layer + create upsert method

* fix: linting
2022-02-25 18:53:49 +01:00
Frane Polić
378c11dcf8 Update packages/medusa/src/api/routes/admin/customer-groups/get-customer-group.ts
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2022-02-25 18:53:49 +01:00
fPolic
9d6489d7e2 fix: export params type 2022-02-25 18:53:49 +01:00
Frane Polić
00a0f51d8c Update packages/medusa/src/api/routes/admin/customer-groups/get-customer-group.ts
Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2022-02-25 18:53:49 +01:00
fPolic
aa8bbfdd58 fix: unit test case for CustomerGroupServiceMock.retrieve 2022-02-25 18:53:49 +01:00
fPolic
bf3e04f41a feat: add extend param for customer groups 2022-02-25 18:53:49 +01:00
fPolic
de06b47b15 feat: GET customer group endpoint 2022-02-25 18:53:49 +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
Frane Polić
73359a632b feat: update customer groups (#1075)
* update customer service prep

* expand on the update customer groups test case

* add the test case for customer group update

* docs for `groups` prop on update customer endpoint

* refactor, update comments

* expend on integration tests, add customer mock with a group

* refactor to use `customerGroupService.list` method

* update units

* remove `updateCustomerGroups`

* fix rebase conflict

* fix customer seed data, add JoinTable on groups

* group retrieval using the expand param

* fix: use `buildQuery_`

* fix: validation for `groups`, enable `expand`param on update customer endpoint

* fix: remove fileds form the `FilterableCustomerGroupProps`

* fix: spearate body/query validation

Co-authored-by: fPolic <frane@medusajs.com>
2022-02-25 18:53:49 +01:00
Zakaria El Asri
a81def2f75 fix: allow offset and limit in products free text search (#1082) 2022-02-25 18:53:49 +01:00
Philip Korsholm
3b878bc5dd Feat: Create customer group (#1074)
* fix babel transform-runtime regenerator required for migrations

* add customer group model

* add migration for customer group

* add customer group model export

* add customer group repository

* add customer group service

* add CustomerGroupRepository to "withTransaction" in CustomerGroupService

* remove unnecessary argument to runtime plugin

* service export ordering

* add create customer group endpoint

* add customergroup to route index in admin

* add customer group service

* add customer groups test

* cleanup

* duplicate error handling

* ducplicate name integration test

* add jsdoc

* customergroup not customer

* pr feedback

* pipeline test

* fix weird merge

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2022-02-25 18:53:49 +01:00
Adrien de Peretti
8a2e4f74ff Feat(medusajs) Allow to pass custom headers (#1009)
* Feat(medusajs) Allow to pass custom headers

* fix: axios exprexted output

* fix: integration test cart

* refactor: Update types object > Record<string, any>

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
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
Oliver Windall Juhl
7c31acb064 Add expand to /admin/customers/:id (#1070)
* fix: 1055 add expand to /admin/customers/:id

* fix tests

* fix tests
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
Rishi Kumar Ray
07a13f6faf Mark draft order endpoint wrong in medusa-js (#1046) 2022-02-25 18:53:49 +01:00
Oliver Windall Juhl
7a3a1837a1 fix: use /admin/returns/:id/receive for swap returns (#1041) 2022-02-25 18:53:49 +01:00
Adrien de Peretti
88ac3c0785 Fix() Try to load index files (#1016) 2022-02-25 18:53:49 +01:00
Oliver Windall Juhl
9bb544e967 bump (#1040) 2022-02-25 18:53:49 +01:00
Philip Korsholm
cd842138ba add pagination and date filtering to regions (#976) 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
Mithushan Jalangan
821ad18eb7 chore: change @medusajs/medusa-react to medusa-react (#1083)
Co-authored-by: octalpixel <mithushan>
2022-02-18 10:43:06 +01:00
Sebastian Rindom
38762961e6 chore(release): Publish
- gatsby-source-medusa@0.0.49
 - medusa-interfaces@1.1.34
 - @medusajs/medusa-js@1.0.12
 - medusa-payment-klarna@1.1.41
 - medusa-payment-paypal@1.0.40
 - medusa-plugin-algolia@0.0.8
 - medusa-plugin-brightpearl@1.1.45
 - medusa-plugin-mailchimp@1.1.39
 - medusa-plugin-meilisearch@0.0.14
 - medusa-plugin-restock-notification@0.0.32
 - medusa-plugin-segment@1.1.42
 - medusa-react@0.1.5
 - medusa-source-shopify@1.0.5
 - @medusajs/medusa@1.1.64
2022-02-06 19:29:53 +01:00
Sebastian Rindom
fc3fbc897f fix: release 2022-02-06 19:29:31 +01:00
Sebastian Rindom
cd1f5afa5a chore(release): Publish
- gatsby-source-medusa@0.0.48
 - medusa-interfaces@1.1.33
 - @medusajs/medusa-js@1.0.11
 - medusa-payment-klarna@1.1.40
 - medusa-payment-paypal@1.0.39
 - medusa-plugin-algolia@0.0.7
 - medusa-plugin-brightpearl@1.1.44
 - medusa-plugin-mailchimp@1.1.38
 - medusa-plugin-meilisearch@0.0.13
 - medusa-plugin-restock-notification@0.0.31
 - medusa-plugin-segment@1.1.41
 - medusa-react@0.1.4
 - medusa-source-shopify@1.0.4
 - @medusajs/medusa@1.1.63
2022-02-06 19:28:19 +01:00
Sebastian Rindom
7d2b5b8bab fix: adds return reasons to swaps (#1026) 2022-02-04 16:25:00 +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
Sebastian Rindom
a81227fa74 Fix/count variants (#1020)
* fix: adds listAndCount to product variants

* fix: adds list and count with relations

* lint fix

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

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

* Update packages/medusa/src/services/product-variant.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-02 19:29:06 +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
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
Adrien de Peretti
f115855282 Fix(request) retries is broken (#1005)
At the moment, when the method `shouldRetryCondition` is called, the condition are using OR which does not take in count 0 which is also considered as false
a simple fix is the usage of nullish coalescing
2022-02-01 17:25:16 +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
olivermrbl
c16df9383c chore(release): Publish
- create-medusa-app@0.0.6
 - gatsby-source-medusa@0.0.47
 - @medusajs/medusa-cli@1.1.27
 - medusa-file-minio@1.0.4
 - medusa-file-s3@1.0.12
 - medusa-file-spaces@1.1.37
 - @medusajs/medusa-js@1.0.10
 - medusa-payment-adyen@1.1.39
 - medusa-payment-klarna@1.1.39
 - medusa-payment-manual@1.0.16
 - medusa-payment-paypal@1.0.38
 - medusa-payment-stripe@1.1.38
 - medusa-plugin-add-ons@1.1.37
 - medusa-plugin-brightpearl@1.1.43
 - medusa-plugin-contentful@1.1.40
 - medusa-plugin-economic@1.1.37
 - medusa-plugin-mailchimp@1.1.37
 - medusa-plugin-permissions@1.1.37
 - medusa-plugin-restock-notification@0.0.30
 - medusa-plugin-segment@1.1.40
 - medusa-plugin-sendgrid@1.1.38
 - medusa-plugin-slack-notification@1.1.37
 - medusa-plugin-twilio-sms@1.1.37
 - medusa-plugin-wishlist@1.1.37
 - medusa-react@0.1.3
 - medusa-source-shopify@1.0.3
 - medusa-test-utils@1.1.37
 - @medusajs/medusa@1.1.62
2022-01-11 16:54:08 +01:00
Philip Korsholm
f61eaeec12 feat: expand store product filtering (#973) 2022-01-11 16:06:16 +01:00
Sebastian Rindom
6dbd8d318d Merge remote-tracking branch 'origin/master' into develop 2022-01-11 14:07:04 +01:00
Sebastian Rindom
bbc16d6b11 feat(create-medusa-app): add medusa.express (#981)
* feat(create-medusa-app): add medusa.express

* fix: pr comments
2022-01-11 14:06:16 +01:00
Oliver Windall Juhl
a0a21d15ef fix: Adds default currency to store currencies on create (#982) 2022-01-10 16:08:26 +01:00
Adrien de Peretti
ec7c10e446 Fix(medusa) product-option values type (#983) 2022-01-10 14:50:06 +01:00
Zakaria El Asri
d365839a08 fix: api claim types + tests (#967) 2022-01-07 11:45:23 +01:00
Zakaria El Asri
7cc3640796 fix: medusa-js admin endpoint types (#968) 2022-01-07 11:44:59 +01:00
Adrien de Peretti
0ac52b70fa fix: Type in AdminProductListTagsRes to use tags instead of types (#958) 2022-01-06 17:45:15 +01:00
Philip Korsholm
5754534beb Feat: Client admin uploads (#952)
* convert uploads to ts

* add custom headers to request

* uploads resource

* uploads routes updates

* index export

* add oas

* remove delete uploads endpoint

* add new package for form-data

* remove exports for delete upload endpoint

* remove dev package from medusa-js

* automatic package upgrade of medusa
2022-01-04 16:18:17 +01:00