@webshop/root - v1.0.0
    Preparing search index...

    Interface for the ShippingService.

    apps/api/src/interfaces/IShippingService.ts

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Calculates the shipping cost based on the order total.

      Parameters

      • orderTotal: number

        The total price of the order.

      Returns IShippingCostResult

      The shipping cost and total including shipping.

    • Creates a fake delivery for the given user and sends a track & trace email.

      Parameters

      • userId: number

        The ID of the user.

      • orderTotal: number

        The total price of the order.

      Returns Promise<IDeliveryResult>

      A DeliveryResult with track & trace code and cost details.

    • Retrieves all deliveries for a given user, ordered by creation date descending.

      Parameters

      • userId: number

        The ID of the user.

      Returns Promise<IUserDelivery[]>

      An array of UserDelivery objects.

    • Sends a fake track & trace email to the given email address.

      Parameters

      • email: string

        The email address of the customer.

      • trackAndTrace: string

        The track & trace code.

      • estimatedDelivery: string

        The estimated delivery date.

      Returns void