Skip to content

Commit

Permalink
feat(fulfillment): add fulfillment_couriers and fulfillment_product t…
Browse files Browse the repository at this point in the history
…o data
  • Loading branch information
Gerald Baulig committed Apr 12, 2024
1 parent 29ae783 commit 6c5595a
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 4 deletions.
20 changes: 20 additions & 0 deletions datasets/demo-shop/data/seed-data/fulfillment_couriers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
id: restorecommerce-demo-shop-courier-000
shopIds:
- restorecommerce-demo-shop-000
name: In House Courier
description: Fulfillments operated by us
logo: ""
website: ""
stubType: DummyStub
configuration:
typeUrl: ""
value: ""
meta:
owners:
- id: 'urn:restorecommerce:acs:names:ownerIndicatoryEntity'
value: 'urn:restorecommerce:acs:model:organization.Organization'
attributes:
- id: 'urn:restorecommerce:acs:names:ownerInstance'
value: restorecommecre-demo-shop-000-organization
---
35 changes: 35 additions & 0 deletions datasets/demo-shop/data/seed-data/fulfillment_products.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
id: restorecommerce-demo-shop-fulfillment-product-000
name: Self Pickup
description: I gonna pickup the wares by myself
courierId: restorecommerce-demo-shop-courier-000
startZones:
- DE
destinationZones:
- DE
taxIds:
- germany-standard-rate
attributes: [ ]
variants:
- id: for-free
name: For Free
description: Self Pickup is for free
price:
currencyId: euro
regularPrice: 0.0
sale: false
salePrice: 0.0
maxSize:
width: 9999.9
height: 9999.9
length: 9999.9
maxWeight: 9999.9
attributes: [ ]
meta:
owners:
- id: 'urn:restorecommerce:acs:names:ownerIndicatoryEntity'
value: 'urn:restorecommerce:acs:model:organization.Organization'
attributes:
- id: 'urn:restorecommerce:acs:names:ownerInstance'
value: restorecommecre-demo-shop-000-organization
---
20 changes: 20 additions & 0 deletions datasets/demo-shop/jobs/job_fulfillment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"options": {
"base": "./datasets/demo-shop/data/seed-data/",
"concurrency": 1
},
"tasks": [
{
"name": "fulfillment_courier",
"operation": "sync",
"filter": "fulfillment_couriers*.yaml",
"mutation": "mutation { fulfillment { fulfillment_courier { Mutate( input: { items: ${resource_list}, totalCount: 0, mode: UPSERT } ) { details{ items {status {id, code, message} }, operationStatus { code message } } } } } }"
},
{
"name": "fulfillment_product",
"operation": "sync",
"filter": "fulfillment_products*.yaml",
"mutation": "mutation { fulfillment { fulfillment_product { Mutate( input: { items: ${resource_list}, totalCount: 0, mode: UPSERT } ) { details{ items {status {id, code, message} }, operationStatus { code message } } } } } }"
}
]
}
6 changes: 3 additions & 3 deletions datasets/demo-shop/jobs/job_master.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
"name": "addresses",
"operation": "sync",
"filter": "addresses.yaml",
"mutation": "mutation{ master_data { address { Mutate( input: { items: ${resource_list}, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } }}"
"mutation": "mutation{ master_data { address { Mutate( input: { items: ${resource_list}, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } } }"
},
{
"name": "contact_points",
"operation": "sync",
"filter": "contact_points.yaml",
"mutation": "mutation{ master_data { contact_point { Mutate( input: { items: ${resource_list}, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } }}"
"mutation": "mutation{ master_data { contact_point { Mutate( input: { items: ${resource_list}, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } } }"
},
{
"name": "organizations",
"operation": "sync",
"filter": "organizations.yaml",
"mutation": "mutation mutateOrganizations($var: [IIoRestorecommerceOrganizationOrganization!]!){ master_data { organization { Mutate( input: { items: $var, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } }}"
"mutation": "mutation mutateOrganizations($var: [IIoRestorecommerceOrganizationOrganization!]!){ master_data { organization { Mutate( input: { items: $var, totalCount: 0, mode: UPSERT } ) { details{items {status {id, code, message}}, operationStatus { code message } } } } } }"
},
{
"name": "customers",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@
"import:system:rules": "node dataset.js import -d system -j rules",
"import:system:identity": "node dataset.js import -d system -j identity",
"import:system:extra": "node dataset.js import -d system -j extra",
"import:demoshop": "npm-run-all import:demoshop:master import:demoshop:catalog",
"import:demoshop": "npm-run-all import:demoshop:master import:demoshop:catalog import:demoshop:fulfillment",
"import:demoshop:master": "node dataset.js import -d demo-shop -j master",
"import:demoshop:identity": "node dataset.js import -d demo-shop -j identity",
"import:demoshop:catalog": "node dataset.js import -d demo-shop -j catalog",
"import:demoshop:fulfillment": "node dataset.js import -d demo-shop -j fulfillment",
"import:demoshop:samples": "node dataset.js import -d demo-shop -j samples",
"import:demoshop:objects": "node ./datasets/demo-shop/objects/object_importer.js",
"transform": "npm-run-all transform:system transform:demoshop",
Expand Down

0 comments on commit 6c5595a

Please sign in to comment.