Return product image ID instead of image URL in listCatalog API. How can I return the Image URL In Node JS

I am using node js API to do all the B/E parts of my shop. I have one problem with getting all the products. I must show all the products in my NEXT js F/E with product images. But it listCatalog return image IDs instead of image URL. So how can I replace this image ID with the image URL?
I need your help with that. Thanks.

My Node Js Code:-

  // Get all products
  async getAllProducts(req: Request, res: Response) {
    try {
      appLogger.info("Fetching products");
      const catalogApi = this.client.catalogApi;
      const response = await catalogApi.listCatalog(
        undefined,
        undefined,
        undefined,
        undefined
      );
      const allProducts = response.result.objects.filter(
        (obj) => obj.type === "ITEM"
      );

      const filteredProducts = allProducts.filter((obj) => {
        const isPresentAtLocation = obj?.presentAtLocationIds?.includes(
          req.params.locationId
        );
        const isPresentAtAllLocations = obj?.presentAtAllLocations === true;
        return isPresentAtLocation || isPresentAtAllLocations;
      });
      return res.status(200).json(serializeBigInts(filteredProducts));
    } catch (error) {
      appLogger.error(`Error fetching products:", ${error}`);
      return handleError({ error }, res);
    }
  }

Found a solution for my own problem. This is my code implementation for other developers that were struck with this problem.

  // Get all products
  async getAllProducts(req: Request, res: Response) {
    try {
      appLogger.info("Fetching products");

      /**
       * @get_all_products
       */
      const catalogApi = this.client.catalogApi;
      const allProducts = await catalogApi.listCatalog(
        undefined,
        "ITEM",
        undefined,
        undefined
      );
      const filteredProducts = allProducts.result.objects.filter((obj) => {
        const isPresentAtLocation = obj?.presentAtLocationIds?.includes(
          req.params.locationId
        );
        const isPresentAtAllLocations = obj?.presentAtAllLocations === true;
        return isPresentAtLocation || isPresentAtAllLocations;
      });

      /**
       * @get_all_images
       */
      const allImages = await catalogApi.searchCatalogObjects({
        objectTypes: ["ITEM"],
        includeRelatedObjects: true,
        includeDeletedObjects: false,
      });
      const imageMap = new Map();
      allImages.result.relatedObjects.forEach((obj) => {
        if (obj.type === "IMAGE") {
          imageMap.set(obj.id, obj.imageData.url);
        }
      });
      /**
       * @combine_images_and_products
       */
      const productsWithImage = [];
      for (const product of filteredProducts) {
        let productImage;
        if (product.itemData.imageIds?.length) {
          productImage = imageMap.get(product.itemData.imageIds[0]);
        }
        productsWithImage.push({ ...product, productImage });
      }
      return res.status(200).json(serializeBigInts(productsWithImage));
    } catch (error) {
      appLogger.error(`Error fetching products:", ${error}`);
      return handleError({ error }, res);
    }
  }