import Joi from 'joi';

export enum CarrierAttributeEnum {
  /** @description Manifesting is done electronically. */
  ManifestDigital = 'ManifestDigital',
  /** @description Manifesting is done via print forms. */
  ManifestPhysical = 'ManifestPhysical',
  /** @description The shipping provider is a shipping consolidator. */
  Consolidator = 'Consolidator',
  /** @description The shipping provider is a regional carrier. */
  Regional = 'Regional',
  /** @description The shipping provider requires a inbound webhook id. */
  RequiresInboundWebhook = 'RequiresInboundWebhook',
  /** @description The shipping provider is capable of returning rate for all services. */
  NonZeroRating = 'NonZeroRating',
  /** @description The shipping provider can receive tracking updates via inbound webhooks or file based tracking for all services */
  InboundTrackingUpdates = 'InboundTrackingUpdates',
  /** @description The shipping provider returns status details via tracking */
  DetailedStatuses = 'DetailedStatuses',
  /** @description The shipping provider returns an image captured at the time of delivery, serving as evidence that the shipment was successfully delivered to the recipient via tracking */
  ProofOfDelivery = 'ProofOfDelivery',
  /** @description The shipping provider returns estimated event location and timezone via tracking */
  CountryTimezoneEstimation = 'CountryTimezoneEstimation',
}

export const CarrierAttributeEnumSchema = Joi.string().valid(
  ...Object.values(CarrierAttributeEnum),
);
