export declare interface Credentials {
  webshop_id: string
  apikey: string
}

export declare interface CredentialsResponse {
  validCredentials: boolean
  validWebshopId: boolean
  accessToWebshop: boolean
}

export declare interface ValidationError {
  bookingDisabled: boolean
  message: string
}

export declare interface Order {
  order_id: string
  from_country: string
  to_country: string
  order_shipping_option?: string
  total_weight: number
  mybring_bookings: Array<MybringBooking>
  order_validation_errors: Array<ValidationError>
  items: Array<OrderItem>
  recipientName: string
  recipientAddressLine: string
  recipientPostalCode: string
  recipientCity: string
  nvit: boolean
}

export declare interface ValidationError {
  message: string
  bookingDisabled: boolean
}

export declare interface BookingRequest {
  orderRef: string
  testIndicator: boolean
  selectedShippingOption: string
  customerNumber: string
  packages: Array<Package>
}

export declare interface Package {
  weightInKg: number
  dimensions?: Dimensions
}

export declare interface Dimensions {
  height: number
  width: number
  length: number
}

export declare interface OrderItem {
  product_id: string
  name: string
  weight_in_grams: number
  quantity: number
  hs_code?: string
  image_url?: string
}

export declare interface MybringBooking {
  consignmentNumber: string
  externalOrderId: string
  labelUrl: string
  serviceId: string
  returnLabelUrl: string
  trackingUrl: string
  waybillUrl?: string
}

export declare interface MybringCustomerAndServices {
  customerNumber: string
  displayName: string
  services: Array<MybringService>
  defaultCustomer: boolean
}

export declare interface MybringService {
  id: string
  serviceCode: string
}

export declare interface ServiceDetails {
  service_id: string
  name: string
  delivery_type: string
  max_weight_in_kgs: number
  max_dimensions?: MaxDimensions
  max_edges?: MaxEdges
  max_circumference?: MaxCircumference
}

export declare interface HsCode {
  code: string
  description: string
}

export declare interface MaxDimensions {
  height: number
  width: number
  length: number
}

export declare interface MaxEdges {
  max_longest_edge: number
  max_sum_of_edges: number
}

export declare interface MaxCircumference {
  max_longest_side: number
  max_circumference_plus_longest_side: number
}

export declare interface SelectOption {
  label: string
  value: string
  disabled?: boolean
}

export declare interface Parcel {
  weightInGrams: number
}

export interface Customer {
  name: string
  customerNumber: string
}
