|
@@ -72,10 +72,10 @@ export default async function seedDemoData({ container }: ExecArgs) {
|
|
|
supported_currencies: [
|
|
|
{
|
|
|
currency_code: "eur",
|
|
|
- is_default: true
|
|
|
+ is_default: true,
|
|
|
},
|
|
|
{
|
|
|
- currency_code: "usd"
|
|
|
+ currency_code: "usd",
|
|
|
},
|
|
|
],
|
|
|
default_sales_channel_id: defaultSalesChannel[0].id,
|
|
@@ -106,6 +106,34 @@ export default async function seedDemoData({ container }: ExecArgs) {
|
|
|
});
|
|
|
logger.info("Finished seeding tax regions.");
|
|
|
|
|
|
+ logger.info("Seeding stock location data...");
|
|
|
+ const { result: stockLocationResult } = await createStockLocationsWorkflow(
|
|
|
+ container
|
|
|
+ ).run({
|
|
|
+ input: {
|
|
|
+ locations: [
|
|
|
+ {
|
|
|
+ name: "European Warehouse",
|
|
|
+ address: {
|
|
|
+ city: "Copenhagen",
|
|
|
+ country_code: "DK",
|
|
|
+ address_1: "",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ });
|
|
|
+ const stockLocation = stockLocationResult[0];
|
|
|
+
|
|
|
+ await remoteLink.create({
|
|
|
+ [Modules.STOCK_LOCATION]: {
|
|
|
+ stock_location_id: stockLocation.id,
|
|
|
+ },
|
|
|
+ [Modules.FULFILLMENT]: {
|
|
|
+ fulfillment_provider_id: "manual_manual",
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
logger.info("Seeding fulfillment data...");
|
|
|
const { result: shippingProfileResult } =
|
|
|
await createShippingProfilesWorkflow(container).run({
|
|
@@ -122,7 +150,7 @@ export default async function seedDemoData({ container }: ExecArgs) {
|
|
|
|
|
|
const fulfillmentSet = await fulfillmentModuleService.createFulfillmentSets({
|
|
|
name: "European Warehouse delivery",
|
|
|
- type: "delivery",
|
|
|
+ type: "shipping",
|
|
|
service_zones: [
|
|
|
{
|
|
|
name: "Europe",
|
|
@@ -160,6 +188,15 @@ export default async function seedDemoData({ container }: ExecArgs) {
|
|
|
],
|
|
|
});
|
|
|
|
|
|
+ await remoteLink.create({
|
|
|
+ [Modules.STOCK_LOCATION]: {
|
|
|
+ stock_location_id: stockLocation.id,
|
|
|
+ },
|
|
|
+ [Modules.FULFILLMENT]: {
|
|
|
+ fulfillment_set_id: fulfillmentSet.id,
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
await createShippingOptionsWorkflow(container).run({
|
|
|
input: [
|
|
|
{
|
|
@@ -242,40 +279,12 @@ export default async function seedDemoData({ container }: ExecArgs) {
|
|
|
});
|
|
|
logger.info("Finished seeding fulfillment data.");
|
|
|
|
|
|
- logger.info("Seeding stock location data...");
|
|
|
- const { result: stockLocationResult } = await createStockLocationsWorkflow(
|
|
|
- container
|
|
|
- ).run({
|
|
|
- input: {
|
|
|
- locations: [
|
|
|
- {
|
|
|
- name: "European Warehouse",
|
|
|
- address: {
|
|
|
- city: "Copenhagen",
|
|
|
- country_code: "DK",
|
|
|
- address_1: "",
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- });
|
|
|
- const stockLocation = stockLocationResult[0];
|
|
|
-
|
|
|
await linkSalesChannelsToStockLocationWorkflow(container).run({
|
|
|
input: {
|
|
|
id: stockLocation.id,
|
|
|
add: [defaultSalesChannel[0].id],
|
|
|
},
|
|
|
});
|
|
|
-
|
|
|
- await remoteLink.create({
|
|
|
- [Modules.STOCK_LOCATION]: {
|
|
|
- stock_location_id: stockLocation.id,
|
|
|
- },
|
|
|
- [Modules.FULFILLMENT]: {
|
|
|
- fulfillment_set_id: fulfillmentSet.id,
|
|
|
- },
|
|
|
- });
|
|
|
logger.info("Finished seeding stock location data.");
|
|
|
|
|
|
logger.info("Seeding publishable API key data...");
|