4230: added functionality for new interior generation (#156)

* added functionality for new interior generation

* update

* fixes
This commit is contained in:
Arwid Thornström
2023-09-12 11:26:17 +02:00
committed by GitHub
parent a51cbca616
commit 91d6aa1d1a
6 changed files with 65 additions and 19 deletions
+16
View File
@@ -299,6 +299,22 @@ export const productMutationTypeDefs = {
return product;
},
/**
* @function generateInteriors
* @description Will generate one interior for a specific product
*/
async generateInteriors(_, { productId, roomIds }, { dataSources }) {
const product = await (<ProductAPI>dataSources.productApi).getProduct(
productId,
);
await (<InteriorsLambdaAPI>(
dataSources.interiorsLambdaApi
)).generateInteriors(product, roomIds);
return {
value: 'OK',
};
},
/**
* @function productGroupInteriors
* @description Mutate the list of interiors on a product and its groups.