Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(types, product): added product module update #4504

Merged
merged 95 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from 94 commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
a3fb9e4
Feat: create product with product module
adrien2p Jul 3, 2023
9a187d2
feat: create product wip
adrien2p Jul 3, 2023
0448539
feat: create product wip
adrien2p Jul 3, 2023
57572e6
feat: update product relation and generate image migration
adrien2p Jul 3, 2023
72a9335
lint
adrien2p Jul 3, 2023
6288d74
conitnue implementation
adrien2p Jul 3, 2023
6f96f2e
continue implementation and add integration tests for produceService.…
adrien2p Jul 3, 2023
50b6f96
Add integration tests for product creation at the module level for th…
adrien2p Jul 3, 2023
47173af
only use persist since write operations are always wrapped in a trans…
adrien2p Jul 3, 2023
010bc79
simplify the transaction wrapper to make future changes easier
adrien2p Jul 3, 2023
1cc8115
feat: move some utils to the utils package to simplify its usage
adrien2p Jul 3, 2023
fc71428
tests: fix unit tests
adrien2p Jul 4, 2023
a802895
feat: create variants along side the product
adrien2p Jul 4, 2023
0dab759
Add more integration tests an update migrations
adrien2p Jul 4, 2023
89b7eed
Merge branch 'develop' into feat/product-module-create
adrien2p Jul 4, 2023
8da124b
chore: Update actions workflow to include packages integration tests
adrien2p Jul 4, 2023
7c63417
small types and utils cleanup
adrien2p Jul 4, 2023
0760311
chore: Add support for database debug option
adrien2p Jul 4, 2023
b0cb6c8
chore: Add missing types in package.json from types and util, validat…
adrien2p Jul 4, 2023
d00e357
expose retrieve method
adrien2p Jul 4, 2023
e0f3a25
fix types issues
adrien2p Jul 4, 2023
9a51010
fix unit tests and move integration tests workflow with the plugins i…
adrien2p Jul 4, 2023
b203071
chore: remove migration function export from the definition to preven…
adrien2p Jul 4, 2023
ddb5620
fix package.json script
adrien2p Jul 4, 2023
e45402d
chore: workflows
adrien2p Jul 5, 2023
4b410b1
feat: start creating the create product workflow
adrien2p Jul 5, 2023
f20cccc
feat: add empty step for prices and sales channel
adrien2p Jul 5, 2023
09bec65
tests: update scripts and action envs
adrien2p Jul 5, 2023
01b23b9
fix imports
adrien2p Jul 5, 2023
87616c7
feat: Add proper soft deleted support + add product deletion service …
adrien2p Jul 5, 2023
2776118
chore: update migrations
adrien2p Jul 5, 2023
41cdb1c
chore: update migrations
adrien2p Jul 5, 2023
855d583
chore: update todo
adrien2p Jul 5, 2023
5e410bb
feat: Add product deletion to the create-product workflow as compensa…
adrien2p Jul 5, 2023
04b3f55
chore: cleanup product utils
adrien2p Jul 5, 2023
c72b37d
feat: Add support for cascade soft-remove
adrien2p Jul 5, 2023
38f5d24
feat: refactor repository to take into account withDeleted
adrien2p Jul 5, 2023
da17a42
fix integration tests
adrien2p Jul 5, 2023
2f7203d
Add support for force delete -> delete, cleanup repositories and impr…
adrien2p Jul 5, 2023
77096ba
Add support for restoring a product and add integration tests
adrien2p Jul 5, 2023
770c860
cleaup + tests
adrien2p Jul 6, 2023
bd4e7c2
types
adrien2p Jul 6, 2023
d082bfb
fix integration tests
adrien2p Jul 6, 2023
7e00cc4
remove unnecessary comments
adrien2p Jul 6, 2023
58e784c
move specific mikro orm usage to the DAL
adrien2p Jul 6, 2023
3cbad78
Cleanup workflow functions
adrien2p Jul 6, 2023
5c37f51
Make deleted_at optional at the property level and add url index for …
adrien2p Jul 7, 2023
ccdffa0
address feedback + cleanup
adrien2p Jul 10, 2023
b8943b4
fix export
adrien2p Jul 10, 2023
c65edd5
merge migrations into one
adrien2p Jul 10, 2023
f5ad774
feat(product, types): added missing product variant methods (#4475)
riqwan Jul 10, 2023
51f017e
Merge branch 'develop' into feat/product-module-create
olivermrbl Jul 10, 2023
64b090b
Create chilled-mice-deliver.md
adrien2p Jul 10, 2023
737f129
Merge branch 'develop' into feat/product-module-create
adrien2p Jul 10, 2023
bcb3bf5
Merge branch 'develop' into feat/product-module-create
adrien2p Jul 10, 2023
b9b10d7
Merge branch 'develop' into feat/product-module-create
adrien2p Jul 10, 2023
85bcb2e
update integration fixtuers
adrien2p Jul 10, 2023
8b2f0ed
update pipeline node version
adrien2p Jul 10, 2023
dabbb89
rename github action
adrien2p Jul 10, 2023
81a8e5b
fix pipeline
adrien2p Jul 10, 2023
aa38dfd
Merge branch 'develop' into feat/product-module-create
adrien2p Jul 11, 2023
10f01ec
feat(medusa, types): added missing category tests and service methods…
riqwan Jul 11, 2023
d1319d8
Merge branch 'develop' into feat/product-module-create
carlos-r-l-rodrigues Jul 11, 2023
c69e716
chore: added product module update
riqwan Jul 11, 2023
e562932
chore: use status enum type from common types
riqwan Jul 11, 2023
94c2b74
chore: remove flushing at repo level, pass in relation instead of ID
riqwan Jul 12, 2023
d77345f
chore: update error message for missing id
riqwan Jul 12, 2023
f10dd1f
update repositories manager usage and serialisation from the write pu…
adrien2p Jul 12, 2023
fd12b4a
Merge branch 'develop' into feat/product-module-create
adrien2p Jul 12, 2023
f1ce710
move serializisation to the DAL
adrien2p Jul 12, 2023
bea3670
rename template args
adrien2p Jul 12, 2023
af3cc1d
chore: address feedback
riqwan Jul 12, 2023
317ba52
chore: wip
riqwan Jul 12, 2023
e144aa3
chore: added collection methods for module and collection service (#4…
riqwan Jul 13, 2023
1e7f78d
Merge branch 'feat/product-module-create' into feat/product-module-up…
riqwan Jul 13, 2023
b1e4ae3
Merge branch 'develop' into feat/product-module-create
adrien2p Jul 13, 2023
f2913b5
chore: added categories, collections and other relations to update
riqwan Jul 13, 2023
a22c7d8
feat(product): Apply transaction decorators to the services (#4512)
adrien2p Jul 13, 2023
3b5beef
Merge branch 'develop' into feat/product-module-create
adrien2p Jul 13, 2023
e8c03ad
chore: handle variant update, create and delete through products update
riqwan Jul 13, 2023
cf1c88e
chore: merge with latest base branch
riqwan Jul 13, 2023
8f5d722
chore: cleanup types, self review
riqwan Jul 13, 2023
b12c330
chore: remove relations that are not present in collection
riqwan Jul 17, 2023
866f8cf
chore: address reviews p1
riqwan Jul 17, 2023
dbc7dd2
chore: add test for incorrect ID + remove extra check on variant id e…
riqwan Jul 18, 2023
43cc5e7
chore: merge with latest develop
riqwan Jul 18, 2023
f95031c
Merge branch 'develop' into feat/product-module-update
riqwan Jul 19, 2023
c484434
merge with latest develop
riqwan Jul 24, 2023
118c515
chore: merge with latest develop
riqwan Jul 25, 2023
cf4cfe3
Merge branch 'develop' into feat/product-module-update
riqwan Jul 25, 2023
2725d51
Merge branch 'develop' into feat/product-module-update
adrien2p Jul 26, 2023
a665558
chore: cleanup + add changeset
riqwan Jul 26, 2023
2a0f19d
Merge branch 'develop' into feat/product-module-update
riqwan Jul 26, 2023
dac42e8
chore: wip
riqwan Jul 26, 2023
d1289f5
chore: add todos for getter method
riqwan Jul 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/swift-ghosts-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@medusajs/product": patch
"@medusajs/types": patch
---

feat(product, types): added product module service update
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Product,
ProductCategory,
ProductCollection,
ProductType,
ProductVariant,
} from "@models"
import ProductOption from "../../../src/models/product-option"
Expand Down Expand Up @@ -59,6 +60,22 @@ export async function createCollections(
return collections
}

export async function createTypes(
manager: SqlEntityManager,
typesData: {
id?: string
value: string
}[]
) {
const types: any[] = typesData.map((typesData) => {
return manager.create(ProductType, typesData)
})

await manager.persistAndFlush(types)

return types
}

export async function createOptions(
manager: SqlEntityManager,
optionsData: {
Expand Down
Loading