import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { Currency } from "./currency.js";
import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js";
/**
 * Set to sms for SMS messages and mms for MMS messages.
 */
export declare const MessageType: {
    readonly Sms: "sms";
    readonly Mms: "mms";
};
/**
 * Set to sms for SMS messages and mms for MMS messages.
 */
export type MessageType = ClosedEnum<typeof MessageType>;
/**
 * The direction of the message.
 */
export declare const Direction: {
    readonly Inbound: "inbound";
    readonly OutboundApi: "outbound-api";
    readonly OutboundCall: "outbound-call";
    readonly OutboundReply: "outbound-reply";
    readonly Unknown: "unknown";
};
/**
 * The direction of the message.
 */
export type Direction = ClosedEnum<typeof Direction>;
/**
 * Status of the delivery of the message.
 */
export declare const MessageStatus: {
    readonly Accepted: "accepted";
    readonly Scheduled: "scheduled";
    readonly Canceled: "canceled";
    readonly Queued: "queued";
    readonly Sending: "sending";
    readonly Sent: "sent";
    readonly Failed: "failed";
    readonly Delivered: "delivered";
    readonly Undelivered: "undelivered";
    readonly Receiving: "receiving";
    readonly Received: "received";
    readonly Read: "read";
};
/**
 * Status of the delivery of the message.
 */
export type MessageStatus = ClosedEnum<typeof MessageStatus>;
/**
 * Price of the message.
 */
export type Price = {
    perUnit?: string | undefined;
    totalAmount?: string | undefined;
    /**
     * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
     */
    currency?: Currency | null | undefined;
};
/**
 * The error returned if your message status is failed or undelivered.
 */
export type ErrorT = {
    /**
     * The error_code provides more information about the failure. If the message was successful, this value is null
     */
    code?: string | undefined;
    message?: string | undefined;
};
export type Message = {
    /**
     * A unique identifier for an object.
     */
    id?: string | undefined;
    /**
     * The phone number that initiated the message.
     */
    from: string;
    /**
     * The phone number that received the message.
     */
    to: string;
    subject?: string | undefined;
    /**
     * The message text.
     */
    body: string;
    /**
     * Set to sms for SMS messages and mms for MMS messages.
     */
    type?: MessageType | undefined;
    /**
     * The number of units that make up the complete message. Messages can be split up due to the constraints of the message size.
     */
    numberOfUnits?: number | undefined;
    /**
     * The number of media files associated with the message.
     */
    numberOfMediaFiles?: number | undefined;
    /**
     * The direction of the message.
     */
    direction?: Direction | undefined;
    /**
     * Status of the delivery of the message.
     */
    status?: MessageStatus | undefined;
    /**
     * The scheduled date and time of the message.
     */
    scheduledAt?: Date | undefined;
    /**
     * The date and time that the message was sent
     */
    sentAt?: Date | undefined;
    /**
     * Define a webhook to receive delivery notifications.
     */
    webhookUrl?: string | undefined;
    /**
     * A client reference.
     */
    reference?: string | undefined;
    /**
     * Price of the message.
     */
    price?: Price | undefined;
    /**
     * The error returned if your message status is failed or undelivered.
     */
    error?: ErrorT | undefined;
    /**
     * The ID of the Messaging Service used with the message. In case of Plivo this links to the Powerpack ID.
     */
    messagingServiceId?: string | undefined;
    /**
     * When custom mappings are configured on the resource, the result is included here.
     */
    customMappings?: {
        [k: string]: any;
    } | null | undefined;
    /**
     * The user who last updated the object.
     */
    updatedBy?: string | null | undefined;
    /**
     * The user who created the object.
     */
    createdBy?: string | null | undefined;
    /**
     * The date and time when the object was last updated.
     */
    updatedAt?: Date | null | undefined;
    /**
     * The date and time when the object was created.
     */
    createdAt?: Date | null | undefined;
    /**
     * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
     */
    passThrough?: Array<PassThroughBody> | undefined;
};
export type MessageInput = {
    /**
     * The phone number that initiated the message.
     */
    from: string;
    /**
     * The phone number that received the message.
     */
    to: string;
    subject?: string | undefined;
    /**
     * The message text.
     */
    body: string;
    /**
     * Set to sms for SMS messages and mms for MMS messages.
     */
    type?: MessageType | undefined;
    /**
     * The scheduled date and time of the message.
     */
    scheduledAt?: Date | undefined;
    /**
     * Define a webhook to receive delivery notifications.
     */
    webhookUrl?: string | undefined;
    /**
     * A client reference.
     */
    reference?: string | undefined;
    /**
     * The ID of the Messaging Service used with the message. In case of Plivo this links to the Powerpack ID.
     */
    messagingServiceId?: string | undefined;
    /**
     * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
     */
    passThrough?: Array<PassThroughBody> | undefined;
};
/** @internal */
export declare const MessageType$inboundSchema: z.ZodNativeEnum<typeof MessageType>;
/** @internal */
export declare const MessageType$outboundSchema: z.ZodNativeEnum<typeof MessageType>;
/** @internal */
export declare const Direction$inboundSchema: z.ZodNativeEnum<typeof Direction>;
/** @internal */
export declare const MessageStatus$inboundSchema: z.ZodNativeEnum<typeof MessageStatus>;
/** @internal */
export declare const Price$inboundSchema: z.ZodType<Price, z.ZodTypeDef, unknown>;
export declare function priceFromJSON(jsonString: string): SafeParseResult<Price, SDKValidationError>;
/** @internal */
export declare const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown>;
export declare function errorFromJSON(jsonString: string): SafeParseResult<ErrorT, SDKValidationError>;
/** @internal */
export declare const Message$inboundSchema: z.ZodType<Message, z.ZodTypeDef, unknown>;
export declare function messageFromJSON(jsonString: string): SafeParseResult<Message, SDKValidationError>;
/** @internal */
export type MessageInput$Outbound = {
    from: string;
    to: string;
    subject?: string | undefined;
    body: string;
    type?: string | undefined;
    scheduled_at?: string | undefined;
    webhook_url?: string | undefined;
    reference?: string | undefined;
    messaging_service_id?: string | undefined;
    pass_through?: Array<PassThroughBody$Outbound> | undefined;
};
/** @internal */
export declare const MessageInput$outboundSchema: z.ZodType<MessageInput$Outbound, z.ZodTypeDef, MessageInput>;
export declare function messageInputToJSON(messageInput: MessageInput): string;
//# sourceMappingURL=message.d.ts.map