diff --git a/datasets/demo-shop/data/seed-data/fulfillment_couriers.yaml b/datasets/demo-shop/data/seed-data/fulfillment_couriers.yaml new file mode 100644 index 0000000..cb4417d --- /dev/null +++ b/datasets/demo-shop/data/seed-data/fulfillment_couriers.yaml @@ -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 +--- \ No newline at end of file diff --git a/datasets/demo-shop/data/seed-data/fulfillment_products.yaml b/datasets/demo-shop/data/seed-data/fulfillment_products.yaml new file mode 100644 index 0000000..049d742 --- /dev/null +++ b/datasets/demo-shop/data/seed-data/fulfillment_products.yaml @@ -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 +--- \ No newline at end of file diff --git a/datasets/demo-shop/jobs/job_fulfillment.json b/datasets/demo-shop/jobs/job_fulfillment.json new file mode 100644 index 0000000..93d750f --- /dev/null +++ b/datasets/demo-shop/jobs/job_fulfillment.json @@ -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 } } } } } }" + } + ] +} \ No newline at end of file diff --git a/datasets/demo-shop/jobs/job_master.json b/datasets/demo-shop/jobs/job_master.json index 30a64fb..eadc121 100644 --- a/datasets/demo-shop/jobs/job_master.json +++ b/datasets/demo-shop/jobs/job_master.json @@ -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", diff --git a/package.json b/package.json index acc5f6c..4a5aea8 100644 --- a/package.json +++ b/package.json @@ -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",