import { ImageConversionMethod, Resolution, WebhookContentType } from '../enums'; /** * You can use the default created service, or create multiple services within the same project to have different default behavior for all your different faxing use cases. */ export interface ServiceRequest { /** A friendly name for the service. Maximum is 60 characters. */ name?: string; /** * The URL to which Sinch will post when someone sends a fax to your Sinch number. To accept incoming faxes this must be set and your Sinch phone number must be configured to receive faxes. * * Note: If a webhook uses basicauth credentials, when the webhook URL is retrieved those credentials are masked. It is not possible to retrieve previously-set credentials through the API. */ incomingWebhookUrl?: string; /** The content type of the webhook. */ webhookContentType?: WebhookContentType; /** If set to true this is the service used to create faxes when no serviceId is specified in the API endpoints. */ defaultForProject?: boolean; /** One of your Sinch numbers connected to this service or any of your verified numbers */ defaultFrom?: string; /** The number of times to retry sending a fax if it fails. Default is 3. Maximum is 5. */ numberOfRetries?: number; /** The number of seconds to wait between retries if the fax is not yet completed. */ retryDelaySeconds?: number; /** Determines how documents are converted to black and white on OUTBOUND faxes only. Image conversion is not done on INBOUND faxes. Defaults to value selected on Fax Service object. */ imageConversionMethod?: ImageConversionMethod; /** If a value is set, it will always add that cover page id to outbound faxes */ coverPageId?: string; /** Save fax documents with sinch when you send faxes */ saveOutboundFaxDocuments?: boolean; /** Save fax documents with sinch when you receive faxes */ saveInboundFaxDocuments?: boolean; /** If set to true, barcodes will be detected on incoming faxes. */ scanIncomingBarcodes?: boolean; /** @see Resolution */ resolution?: Resolution; } export interface ServiceResponse extends ServiceRequest { /** ID of the fax service used. */ id?: string; /** The `Id` of the project associated with the call. */ projectId?: string; }