import { NonNullablePaths } from '@wix/sdk-types'; interface Tpa { } interface ListAccountIdsRequest { /** * Instance ID. * @format GUID */ instanceId: string; } interface ListAccountIdsResponse { /** Account IDs. */ accountIds?: string[]; } interface BusinessStatusRequest { /** * Instance ID. * @format GUID */ instanceId: string; /** Account ID. */ accountId: string; } interface BusinessStatusResponse { /** List of statue. */ status?: BusinessStatusWithLiterals; /** The reason for the error in free text. */ failureReasonMessage?: string | null; } /** Business Status. */ declare enum BusinessStatus { NONE = "NONE", READY = "READY", PENDING = "PENDING", ERROR = "ERROR", NOT_STARTED = "NOT_STARTED" } /** @enumType */ type BusinessStatusWithLiterals = BusinessStatus | 'NONE' | 'READY' | 'PENDING' | 'ERROR' | 'NOT_STARTED'; interface EstimateDeliveryRequest extends EstimateDeliveryRequestDispatchTimeOneOf { /** Estimated pickup time. */ pickupTime?: Date | null; /** Estimated dropoff time. */ dropoffTime?: Date | null; /** * Instance ID. * @format GUID */ instanceId: string; /** Account ID. */ accountId: string; /** Delivery pickup address. */ pickupAddress?: Address; /** Delivery dropoff address. */ dropoffAddress?: Address; /** Unique identifier of the specific store that the delivery is for. */ storeLocationId: string; /** The subtotal for all items in the order, excluding tax/tip. */ orderTotal: Money; } /** @oneof */ interface EstimateDeliveryRequestDispatchTimeOneOf { /** Estimated pickup time. */ pickupTime?: Date | null; /** Estimated dropoff time. */ dropoffTime?: Date | null; } /** Physical address */ interface Address { /** * Country code. * @format COUNTRY */ country?: string; /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision?: string | null; /** City name. */ city?: string; /** Zip/postal code. */ postalCode?: string | null; /** Street name and number. */ streetAddress?: StreetAddress; /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2?: string | null; /** Coordinates of the physical address. */ location?: AddressLocation; } interface StreetAddress { /** Street number. */ number?: string; /** Street name. */ name?: string; } interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } /** * Money. * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003. */ interface Money { /** * Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. * @format DECIMAL_VALUE */ value?: string; /** * Currency code. Must be valid ISO 4217 currency code (e.g., USD). * @format CURRENCY */ currency?: string; /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */ formattedValue?: string | null; } interface EstimateDeliveryResponse { /** Optional. Used as reference to the estimate when creating a new order. */ _id?: string | null; /** Amount that is charged for this delivery. */ fee?: Money; /** Estimated pickup time. */ promisedPickupTime?: Date | null; /** Estimated dropoff time. */ promisedDropoffTime?: Date | null; } interface CreateDeliveryRequest extends CreateDeliveryRequestDispatchTimeOneOf { /** The requested time at which the order should be picked up. */ pickupTime?: Date | null; /** The requested time at which the order should be delivered. */ dropoffTime?: Date | null; /** * Instance ID. * @format GUID */ instanceId: string; /** Account ID. */ accountId: string; /** Unique identifier of the specific store that the delivery is for. */ storeLocationId: string; /** The name of the business where the order should be picked up from. */ pickupBusinessName: string; /** Estimate ID. */ estimateId?: string | null; /** Delivery pickup address. */ pickupAddress: Address; /** Delivery dropoff address. */ dropoffAddress: Address; /** Phone number of the store where the order should be picked up from. */ pickupPhoneNumber: string; /** Customer details. */ customer: Customer; /** Instructions for the courier at the pickup location. */ pickupInstructions?: string | null; /** Instructions for the courier at the dropoff location. */ dropoffInstructions?: string | null; /** Is contactless delivery. */ contactlessDelivery?: boolean | null; /** Order ID. */ orderId: string; /** The subtotal for all items in the order, excluding tax/tip. */ orderTotal: Money; /** Amount that will be paid to the courier. */ orderTip: Money; } /** @oneof */ interface CreateDeliveryRequestDispatchTimeOneOf { /** The requested time at which the order should be picked up. */ pickupTime?: Date | null; /** The requested time at which the order should be delivered. */ dropoffTime?: Date | null; } interface Customer { /** First name. */ firstName?: string; /** Last name. */ lastName?: string; /** Phone number. */ phoneNumber?: string; /** * Email address. * @format EMAIL */ email?: string; } interface CreateDeliveryResponse { /** The vendor new order id */ _id?: string; /** When a delivery is ready to be picked up. This is the start of the pickup window. */ pickupWindowStartTime?: Date | null; /** When a delivery must be picked up by. This is the end of the pickup window. */ pickupWindowEndTime?: Date | null; /** When a delivery is ready to be dropped off. This is the start of the dropoff window. */ dropoffWindowStartTime?: Date | null; /** When a delivery must be dropped off by. This is the end of the dropoff window. */ dropoffWindowEndTime?: Date | null; /** Amount that is charged for this delivery. */ fee?: Money; } /** @docsIgnore */ type EstimateDeliveryApplicationErrors = { code?: 'ESTIMATE_DELIVERY_REJECTED'; description?: string; data?: Record; }; /** @docsIgnore */ type CreateDeliveryApplicationErrors = { code?: 'CREATE_DELIVERY_REJECTED'; description?: string; data?: Record; }; /** * Retrieves list of account belongs to given instance * @param instanceId - Instance ID. * @public * @documentationMaturity preview * @requiredField instanceId * @permissionId WIX_RESTAURANTS.READ_LOCAL_DELIVERY * @applicableIdentity APP * @fqn com.wixpress.localdelivery.spi.v1.LocalDeliveryProvider.ListAccountIds */ declare function listAccountIds(instanceId: string): Promise>; /** * Retrieves the delivery vendor business status * @param instanceId - Instance ID. * @public * @documentationMaturity preview * @requiredField instanceId * @requiredField options * @requiredField options.accountId * @permissionId WIX_RESTAURANTS.READ_LOCAL_DELIVERY * @applicableIdentity APP * @fqn com.wixpress.localdelivery.spi.v1.LocalDeliveryProvider.BusinessStatus */ declare function businessStatus(instanceId: string, options: NonNullablePaths): Promise>; interface BusinessStatusOptions { /** Account ID. */ accountId: string; } /** * Retrieves an estimate of the delivery * @param instanceId - Instance ID. * @public * @documentationMaturity preview * @requiredField instanceId * @requiredField options.accountId * @requiredField options.dispatchTime * @requiredField options.orderTotal * @requiredField options.storeLocationId * @permissionId WIX_RESTAURANTS.READ_LOCAL_DELIVERY * @applicableIdentity APP * @fqn com.wixpress.localdelivery.spi.v1.LocalDeliveryProvider.EstimateDelivery */ declare function estimateDelivery(instanceId: string, options?: NonNullablePaths): Promise & { __applicationErrorsType?: EstimateDeliveryApplicationErrors; }>; interface EstimateDeliveryOptions extends EstimateDeliveryOptionsDispatchTimeOneOf { /** Account ID. */ accountId: string; /** Delivery pickup address. */ pickupAddress?: Address; /** Delivery dropoff address. */ dropoffAddress?: Address; /** Estimated pickup time. */ pickupTime?: Date | null; /** Estimated dropoff time. */ dropoffTime?: Date | null; /** Unique identifier of the specific store that the delivery is for. */ storeLocationId: string; /** The subtotal for all items in the order, excluding tax/tip. */ orderTotal: Money; } /** @oneof */ interface EstimateDeliveryOptionsDispatchTimeOneOf { /** Estimated pickup time. */ pickupTime?: Date | null; /** Estimated dropoff time. */ dropoffTime?: Date | null; } /** * Creates a new delivery order * @param instanceId - Instance ID. * @public * @documentationMaturity preview * @requiredField instanceId * @requiredField options.accountId * @requiredField options.customer * @requiredField options.customer.email * @requiredField options.customer.firstName * @requiredField options.customer.lastName * @requiredField options.customer.phoneNumber * @requiredField options.dispatchTime * @requiredField options.dropoffAddress * @requiredField options.orderId * @requiredField options.orderTip * @requiredField options.orderTotal * @requiredField options.pickupAddress * @requiredField options.pickupBusinessName * @requiredField options.pickupPhoneNumber * @requiredField options.storeLocationId * @permissionId WIX_RESTAURANTS.WRITE_LOCAL_DELIVERY * @applicableIdentity APP * @fqn com.wixpress.localdelivery.spi.v1.LocalDeliveryProvider.CreateDelivery */ declare function createDelivery(instanceId: string, options?: NonNullablePaths): Promise & { __applicationErrorsType?: CreateDeliveryApplicationErrors; }>; interface CreateDeliveryOptions extends CreateDeliveryOptionsDispatchTimeOneOf { /** Account ID. */ accountId: string; /** Unique identifier of the specific store that the delivery is for. */ storeLocationId: string; /** The name of the business where the order should be picked up from. */ pickupBusinessName: string; /** Estimate ID. */ estimateId?: string | null; /** The requested time at which the order should be picked up. */ pickupTime?: Date | null; /** The requested time at which the order should be delivered. */ dropoffTime?: Date | null; /** Delivery pickup address. */ pickupAddress: Address; /** Delivery dropoff address. */ dropoffAddress: Address; /** Phone number of the store where the order should be picked up from. */ pickupPhoneNumber: string; /** Customer details. */ customer: Customer; /** Instructions for the courier at the pickup location. */ pickupInstructions?: string | null; /** Instructions for the courier at the dropoff location. */ dropoffInstructions?: string | null; /** Is contactless delivery. */ contactlessDelivery?: boolean | null; /** Order ID. */ orderId: string; /** The subtotal for all items in the order, excluding tax/tip. */ orderTotal: Money; /** Amount that will be paid to the courier. */ orderTip: Money; } /** @oneof */ interface CreateDeliveryOptionsDispatchTimeOneOf { /** The requested time at which the order should be picked up. */ pickupTime?: Date | null; /** The requested time at which the order should be delivered. */ dropoffTime?: Date | null; } export { type Address, type AddressLocation, BusinessStatus, type BusinessStatusOptions, type BusinessStatusRequest, type BusinessStatusResponse, type BusinessStatusWithLiterals, type CreateDeliveryApplicationErrors, type CreateDeliveryOptions, type CreateDeliveryOptionsDispatchTimeOneOf, type CreateDeliveryRequest, type CreateDeliveryRequestDispatchTimeOneOf, type CreateDeliveryResponse, type Customer, type EstimateDeliveryApplicationErrors, type EstimateDeliveryOptions, type EstimateDeliveryOptionsDispatchTimeOneOf, type EstimateDeliveryRequest, type EstimateDeliveryRequestDispatchTimeOneOf, type EstimateDeliveryResponse, type ListAccountIdsRequest, type ListAccountIdsResponse, type Money, type StreetAddress, type Tpa, businessStatus, createDelivery, estimateDelivery, listAccountIds };