2530 Commits
Author SHA1 Message Date
Oliver Windall Juhl 9f4a9f7db4 Add expand to /admin/customers/:id (#1070)
* fix: 1055 add expand to /admin/customers/:id

* fix tests

* fix tests
2022-02-16 23:41:30 +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
Adrien de Peretti 6f339e366a Fix() Try to load index files (#1016) 2022-02-15 10:39:29 +01:00
Philip Korsholm 8141e12a3d add pagination and date filtering to regions (#976) 2022-02-10 09:15:07 +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
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 RindomandOliver Windall Juhl 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 RindomandOliver Windall Juhl 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
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
Sebastian Rindom 6dbd8d318d Merge remote-tracking branch 'origin/master' into develop 2022-01-11 14:07:04 +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
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
Adrien de Peretti ae839513b8 Feat(plugins) Pass plugin options to the routes to be able to access specific options from the plugin configuration (#959) 2022-01-04 15:56:00 +01:00
Adrien de Peretti 77d2014ab4 Fix(admin) create product type tag (#963) 2022-01-03 18:13:04 +01:00
Adrien de Peretti 4f2d2d8b5e fix(medusa) Enforce authentication on users and invites (#953) 2021-12-29 12:56:40 +01:00
Philip Korsholm f405e9c874 notifications client (#949) 2021-12-20 14:09:12 +01:00
Philip KorsholmandOliver Windall Juhl e0be2da15e Feat: Client admin products (#930)
* add exports in product

* add product resource

* fix failling tests

* import reflect metadata

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2021-12-17 12:30:04 +01:00
Philip KorsholmandSebastian Rindom 59e268b919 Feat: Add users endpoint to medusajs (#925)
* add users endpoint to medusajs

* add exports to medusa

* use native omit

Co-authored-by: Sebastian Rindom <seb@medusajs.com>
2021-12-16 16:22:40 +01:00
31fad7439c feat: add store admin endpoints to medusa-js (#938)
* add: store admin endpoint to medusa-js

* add: resource to admin class

Co-authored-by: Sebastian Rindom <seb@medusajs.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2021-12-16 16:14:58 +01:00
Zakaria El AsriandSebastian Rindom b9d6f95dbd feat: add returns admin endpoints to medusa-js (#935)
* add: returns admin endpoint to medusa-js

* fix: http verbs

* fix duplicate import

* fix: type for cancel

* fix: conflicting import

Co-authored-by: Sebastian Rindom <seb@medusajs.com>
2021-12-16 15:10:41 +01:00
Zakaria El AsriandSebastian Rindom 8b1b551260 feat: medusa js admin shipping options (#934)
* add: shipping-options admin endpoint to medusa-js

* fix: retrieve return type for Collections

* fix typo in routes

Co-authored-by: Sebastian Rindom <seb@medusajs.com>
2021-12-16 14:55:03 +01:00
Philip KorsholmandSebastian Rindom 01b915585b Feat/client admin orders (#932)
* add export to medusa index

* add orders to medusa-client

* correct update entity

* add orders to admin resource

Co-authored-by: Sebastian Rindom <seb@medusajs.com>
2021-12-16 14:43:16 +01:00
Zakaria El AsriandSebastian Rindom 0acc462e1e feat: medusa-js admin return reasons (#931)
* add: return-reasons admin endpoint to medusa-js

* fix types

* fix jsdoc

* fix typo jsdoc collection

Co-authored-by: Sebastian Rindom <seb@medusajs.com>
2021-12-16 14:34:14 +01:00
Zakaria El Asri 8532c966b5 feat: medusa js admin regions (#939) 2021-12-16 14:30:03 +01:00
Philip Korsholm 3da46723a0 Feat: add variants to medusa client (#927) 2021-12-16 14:28:54 +01:00
Philip Korsholm f5d3e4de10 swaps in admin resources (#928) 2021-12-15 16:57:39 +01:00
Philip Korsholm b70df6be94 Feat: client admin shipping profiles (#929)
* shipping profiles resource

* spelling
2021-12-15 14:21:43 +01:00
Ajibola Ojo e4d4fd7671 Product typo corrected (#846) 2021-12-14 21:51:14 +01:00
Philip Korsholmandolivermrbl 40f6e88875 Feat/medusa js admin collections (#916)
* feat: Add Auth Admin routes to JS client

* include api key verification for admin

* add admin/collections to medusa-js

* undo file changes

* jsdoc

Co-authored-by: olivermrbl <oliver@mrbltech.com>
2021-12-14 17:33:55 +01:00
Oliver Windall Juhl 85ef51ad34 Adds admin giftcard API to medusa-js (#921) 2021-12-14 16:06:39 +01:00
Oliver Windall Juhl 006e67eea1 Adds admin invites API to medusa-js (#922) 2021-12-14 15:34:23 +01:00
Oliver Windall Juhl 4ffe50a798 Adds admin notes API to medusa-js (#923) 2021-12-14 15:27:31 +01:00
Oliver Windall Juhl 7f4a7cbed0 Adds DraftOrder Admin routes to JS client (#920) 2021-12-14 09:48:16 +01:00
Oliver Windall Juhl 2ca1a8762d feat: Add Discount Admin endpoint to JS client (#919) 2021-12-14 09:47:15 +01:00
Oliver Windall Juhl 25fe224a10 feat: Adds Customer Admin routes to JS client (#918) 2021-12-13 21:32:47 +01:00
Oliver Windall Juhl 5c47184b10 feat: Adds Auth Admin API to medusa-js (#917) 2021-12-13 19:35:57 +01:00
Adrien de Peretti a0b6946b5f Fix(medusa/loaders/plugins) jsdoc (#904) 2021-12-09 12:06:43 +01:00
Zakaria El Asri 2e837fcdee fix: complete cart return type (#902) 2021-12-08 22:37:13 +01:00
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 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
Sebastian Rindom 329767e279 fix: ensures that delayed restock notifications are being sent (#881)
* fix: ensures that delayed restock notifications are being sent

* fix: default options to empty object

* fix: tests
2021-12-08 09:55:00 +01:00
Sebastian Rindom 7d6fc5c9e1 fix: widen range of discount limit conditions (#895) 2021-12-08 09:42:45 +01:00